

:root {
  color-scheme: light;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"PingFang SC","Segoe UI","Microsoft YaHei",sans-serif;
  font-synthesis:none;
  --background:#f0f2f5;--surface:#fff;--surface-grouped:#edf0f4;--timer-surface:#e9eef4;
  --surface-selected:#dce6f1;--surface-selected-hover:#d1ddeb;--secondary-action:#fff;
  --text-primary:#20242b;--text-secondary:#525d6d;--text-muted:#657183;
  --border:#dce1e8;--control-border:#8793a4;--accent:#3f5e85;--accent-hover:#334e71;--on-accent:#fff;
  --success:#236747;--success-surface:#eaf5ee;--warning:#795118;--warning-surface:#fff3df;
  --error:#ad3030;--error-surface:#fff0ee;--disabled-surface:#eceff3;--disabled-text:#667080;
  --annotation-important:#b62d35;--annotation-unclear:#946100;--annotation-bookmark:#235f9e;--badge-amber:#e8bd59;--on-amber:#4b3300;
  --shadow:0 4px 24px #17233626;--radius-card:18px;--radius-action:12px;--radius-input:14px;
  --type-title:1.375rem;--type-section:1.0625rem;--type-body:1rem;--type-label:.9375rem;--type-meta:.875rem;
  --target:44px;--outline-width:clamp(336px,28vw,384px);
  color:var(--text-primary);background:var(--surface);
}
@media(prefers-color-scheme:dark){:root:not([data-appearance="light"]){
  color-scheme:dark;--background:#101216;--surface:#1b1f26;--surface-grouped:#282f39;--timer-surface:#2a323e;
  --surface-selected:#344b65;--surface-selected-hover:#3b5674;--secondary-action:#414e60;
  --text-primary:#f3f5f8;--text-secondary:#c3ccd9;--text-muted:#acb8c9;--border:#3e4856;--control-border:#8995a8;
  --accent:#a6bddc;--accent-hover:#c2d2e9;--on-accent:#0c2547;--success:#9bd8b6;--success-surface:#20392c;
  --warning:#f2d095;--warning-surface:#3c2e1b;--error:#ffb0ac;--error-surface:#3c2427;--disabled-surface:#2d3540;--disabled-text:#b4bfce;
  --annotation-important:#ffb9c3;--annotation-unclear:#f5cc74;--annotation-bookmark:#9dc6fa;--on-amber:#372403;
  --shadow:0 4px 24px #0005;
}}
:root[data-appearance="dark"]{
  color-scheme:dark;--background:#101216;--surface:#1b1f26;--surface-grouped:#282f39;--timer-surface:#2a323e;
  --surface-selected:#344b65;--surface-selected-hover:#3b5674;--secondary-action:#414e60;
  --text-primary:#f3f5f8;--text-secondary:#c3ccd9;--text-muted:#acb8c9;--border:#3e4856;--control-border:#8995a8;
  --accent:#a6bddc;--accent-hover:#c2d2e9;--on-accent:#0c2547;--success:#9bd8b6;--success-surface:#20392c;
  --warning:#f2d095;--warning-surface:#3c2e1b;--error:#ffb0ac;--error-surface:#3c2427;--disabled-surface:#2d3540;--disabled-text:#b4bfce;
  --annotation-important:#ffb9c3;--annotation-unclear:#f5cc74;--annotation-bookmark:#9dc6fa;--on-amber:#372403;--shadow:0 4px 24px #0005;
}
*{box-sizing:border-box}body{margin:0;font-size:var(--type-body);line-height:1.5;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit}button{border:0;background:none;color:inherit;cursor:pointer;transition:background 140ms,color 140ms}
button:disabled{cursor:default}button,input,select,textarea{-webkit-tap-highlight-color:transparent}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
svg{flex-shrink:0}button[hidden],[hidden]{display:none!important}
.page{min-height:100dvh;background:var(--surface)}
.app-shell{width:100%;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--surface)}
.app-header{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:6px 24px;border-bottom:1px solid var(--border);flex-shrink:0}
.header-left,.brand-group,.header-metrics,.header-right{display:flex;align-items:center}
.header-left{min-width:0;gap:28px}.brand-group{gap:4px;flex-shrink:0}.brand{display:flex;align-items:center;gap:10px;font-weight:600;white-space:nowrap}
.brand-toggle{padding:0 4px;min-height:44px;border-radius:12px}.brand-toggle:hover{background:var(--surface-grouped)}
.brand-mark{font-size:22px;letter-spacing:-.5px}.brand-divider{width:1px;height:18px;background:var(--border)}.brand-toggle>svg{color:var(--text-secondary)}
.header-metrics{gap:24px;font-size:var(--type-label);color:var(--text-secondary);flex-wrap:wrap}.header-metrics strong{font-weight:600;color:var(--text-primary);font-variant-numeric:tabular-nums;margin-left:4px}
.exam-countdown,.today-study{white-space:nowrap}.today-count{margin-left:12px}.today-count strong{margin-left:0;margin-right:2px}.header-right{gap:16px;flex-shrink:0}
.sync-status{display:flex;align-items:center;gap:6px;font-size:var(--type-meta);color:var(--text-secondary);white-space:nowrap}.sync-status.offline{color:var(--warning)}
.theme-toggle{display:flex;align-items:center;gap:4px;font-size:var(--type-label);color:var(--text-secondary)}
.theme-toggle>button{display:flex;align-items:center;justify-content:center;min-width:48px;min-height:44px;padding:4px;border-radius:12px}
.switch-track{width:38px;height:24px;border-radius:20px;background:var(--control-border);display:block;position:relative}
.switch-thumb{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:transform 140ms}
.theme-toggle>button[aria-checked=true] .switch-track{background:var(--accent)}.theme-toggle>button[aria-checked=true] .switch-thumb{transform:translateX(14px);background:var(--on-accent)}
.icon-button{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;padding:8px;color:var(--text-secondary);flex-shrink:0}
.icon-button:hover:not(:disabled),.settings-button:hover{background:var(--surface-grouped)}
.filter-wrap,.annotation-wrap{position:relative}.settings-button{min-height:44px;display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:12px;font-size:var(--type-label);white-space:nowrap}
.popover,.filter-panel,.annotation-menu{position:absolute;z-index:50;background:var(--surface);border-radius:14px;box-shadow:var(--shadow);padding:6px}
.popover{right:0;top:calc(100% + 8px);min-width:220px}.popover>button{width:100%;min-height:44px;text-align:left;padding:12px;border-radius:10px;font-size:var(--type-label)}.popover>button:hover{background:var(--surface-selected)}
.subjects{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:12px 16px;border-bottom:1px solid var(--border);flex-shrink:0}
.subject{display:flex;flex-direction:column;align-items:stretch;justify-content:center;min-height:92px;gap:10px;padding:14px 16px;border-radius:14px;background:var(--surface-grouped);color:var(--text-primary)}
.subject:hover,.subject.active:hover{background:var(--surface-selected-hover)}.subject.active{background:var(--surface-selected)}
.subject-top{display:flex;align-items:baseline;justify-content:space-between;gap:12px;line-height:1.5}.subject-name{display:flex;align-items:center;gap:5px;font-size:var(--type-label);font-weight:600;white-space:nowrap}
.subject-top>strong{font-size:var(--type-meta);font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}.subject-track{height:5px;width:100%;background:var(--border);border-radius:5px;overflow:hidden}.subject-track>span{display:block;height:100%;border-radius:5px}.subject.active .subject-track>span{background:var(--accent)!important}
.subject-progress{font-size:var(--type-meta);color:var(--text-secondary);text-align:left;line-height:1.2}
.app-body{display:grid;grid-template-columns:var(--outline-width) minmax(0,1fr);flex:1;min-height:0}
.sidebar{display:flex;flex-direction:column;min-height:0;padding:10px 8px 8px 12px;background:var(--surface-grouped);border-right:1px solid var(--border)}
.sidebar-heading{display:flex;align-items:baseline;gap:8px;justify-content:space-between;font-size:var(--type-label);margin-right:8px;flex-shrink:0}.sidebar-heading strong{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums}.sidebar-heading small{font-size:14px;font-weight:400;margin-left:3px}
.progress-track{height:5px;width:calc(100% - 8px);background:var(--border);border-radius:4px;overflow:hidden;margin:8px 8px 8px 0;flex-shrink:0}.progress-track>span{display:block;height:100%;background:var(--accent);border-radius:4px}
.progress-caption{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-right:8px;font-size:14px;color:var(--text-secondary);flex-shrink:0}.progress-caption b{font-weight:600;color:var(--text-primary)}
.outline-tools{display:flex;align-items:center;gap:0;margin:6px 8px 8px 0;flex-shrink:0}.outline-tool{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;flex:1;padding:8px 6px;border-radius:12px;font-size:14px;white-space:nowrap;color:var(--text-secondary)}
.outline-tool:hover,.outline-tools .icon-button.active{background:var(--surface-selected);color:var(--text-primary)}.filter-wrap{flex-shrink:0}.filter-wrap>.icon-button{position:relative}.filter-dot{position:absolute;top:8px;right:8px;width:5px;height:5px;border-radius:50%;background:var(--accent)}
.filter-panel{top:calc(100% + 4px);left:-44px;width:256px;padding:16px}.filter-panel label{display:flex;flex-direction:column;gap:8px;margin-bottom:12px;font-size:var(--type-label)}.filter-panel select{min-height:44px;width:100%;border:0;padding:8px 12px;border-radius:12px;background:var(--surface-grouped);color:var(--text-primary);font-size:var(--type-label)}.filter-panel .text-button{width:100%}
.search{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;margin:0 8px 8px 0;border-radius:14px;background:var(--surface);color:var(--text-secondary);flex-shrink:0}.search:focus-within{outline:2px solid var(--accent);outline-offset:1px}.search input{min-height:44px;width:100%;min-width:0;background:none;border:0;outline:0;color:var(--text-primary);font-size:var(--type-label)}.search input::placeholder{color:var(--text-muted);opacity:1}.search button{min-width:44px;min-height:44px;display:flex;align-items:center;justify-content:center;padding:8px;margin-right:-8px}
.point-list{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--control-border) transparent}.outline-list{margin:0 -8px 0 -4px;padding:0 0 8px 4px}.outline-chapter{margin-bottom:4px}
.outline-chapter-button,.outline-lecture-button{width:100%;display:flex;align-items:center;min-height:44px;gap:12px;padding:4px 8px;text-align:left;border-radius:14px;line-height:1.4}
.outline-chapter-button{font-size:16px;font-weight:600}.outline-lecture-button{font-size:15px;font-weight:500;color:var(--text-secondary)}
.outline-chapter-button>span,.outline-lecture-button>span{flex:1;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.outline-chapter-button>small,.outline-lecture-button>small{font-size:14px;font-weight:400;white-space:nowrap;color:var(--text-secondary);margin-left:4px}
.outline-chapter-button:hover,.outline-lecture-button:hover{background:var(--surface-selected)}.outline-chapter-button>svg,.outline-lecture-button>svg{width:16px;height:16px}
.point-row{position:relative;display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;column-gap:6px;padding:2px 0 2px 8px;border-radius:14px}.point-row:hover{background:var(--surface)}.point-row.selected{background:var(--surface-selected)}
.point-state{width:22px;min-height:44px;display:flex;align-items:center;justify-content:center;cursor:default}.state-circle{width:18px;height:18px;display:flex;align-items:center;justify-content:center;border:1.5px solid var(--control-border);border-radius:50%;color:var(--surface)}
.point-state.complete .state-circle{background:var(--success);border-color:var(--success)}.point-state.running .state-circle{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.point-state.paused .state-circle,.point-state.marked-complete .state-circle{background:var(--badge-amber);border-color:var(--badge-amber);color:var(--on-amber)}
.point-select{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;min-height:44px;min-width:0;padding:0 12px 0 0;text-align:left}.point-title{font-size:16px;line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.point-row.selected .point-title{font-weight:600}.point-meta{display:flex;align-items:center;justify-content:flex-end;gap:6px;font-size:14px;line-height:1.5;white-space:nowrap;color:var(--text-secondary);font-variant-numeric:tabular-nums}
.book-page{font-size:14px;color:var(--text-secondary);white-space:nowrap;font-weight:400;margin-left:4px}.search-empty{padding:24px 8px;text-align:center;font-size:var(--type-label);color:var(--text-secondary)}
.workspace{min-width:0;min-height:0;display:flex;flex-direction:column;padding:20px;overflow:hidden;scrollbar-width:thin;scrollbar-color:var(--control-border) transparent}.point-heading{flex-shrink:0;padding-inline:20px;margin-bottom:20px}.point-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:10px;line-height:1.6;font-size:14px;color:var(--text-secondary);margin-bottom:10px;font-variant-numeric:tabular-nums}
.completion-status{display:flex;align-items:center;gap:4px;margin-left:auto;padding:4px 8px;border-radius:8px;font-size:14px}.completion-status.done{color:var(--success);background:var(--success-surface)}h1{font-size:22px;font-weight:600;line-height:1.45;letter-spacing:-.3px;margin:0;overflow-wrap:anywhere}.lecture-subtitle{display:none;margin:8px 0 0;font-size:15px;line-height:1.6;color:var(--text-secondary)}
.other-active{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;text-align:left;padding:12px 16px;margin-bottom:12px;border-radius:14px;background:var(--success-surface);color:var(--success);font-size:14px}.other-active>span{display:flex;align-items:center;gap:6px;min-width:0}.live-dot{width:6px;height:6px;flex-shrink:0;border-radius:50%;background:var(--success)}
.timer-panel{position:relative;flex-shrink:0;border-radius:18px;background:var(--timer-surface);padding:20px;overflow:visible}
.timer-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;line-height:1.5}.metric-label{font-size:15px;font-weight:500}.timer-label{display:flex;align-items:center;gap:6px;font-size:14px;color:var(--text-secondary);white-space:nowrap}.status-dot{width:6px;height:6px;border-radius:50%;background:var(--text-muted)}.status-dot.running{background:var(--success)}
.timer-digits{font-size:44px;font-weight:600;line-height:1.25;letter-spacing:-1px;font-variant-numeric:tabular-nums;margin:12px 0 20px}.timer-digits.muted{color:var(--text-secondary)}
.time-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.time-details>div{display:flex;flex-direction:column;gap:6px;min-width:0}.time-details span{font-size:14px;color:var(--text-secondary)}.time-details strong{font-size:15px;font-weight:500;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.timer-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:24px}.button{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px;border-radius:12px;font-size:16px;font-weight:500;line-height:1.3;white-space:nowrap}.timer-controls>.button{width:100%;min-width:0}
.button.primary{background:var(--accent);color:var(--on-accent)}.button.primary:hover:not(:disabled){background:var(--accent-hover)}.button.secondary{background:var(--secondary-action);color:var(--text-primary);box-shadow:0 1px 3px #17233610}.button.secondary:hover:not(:disabled){background:var(--surface-selected)}.button:disabled{background:var(--disabled-surface);color:var(--disabled-text)}
.annotation-wrap{display:flex;min-width:0}.annotation-wrap>.button{width:100%}.annotation-menu{right:0;top:calc(100% + 8px);width:180px}.annotation-menu>button{width:100%;min-height:44px;display:flex;align-items:center;gap:12px;padding:10px 12px;text-align:left;border-radius:10px;font-size:15px}.annotation-menu>button>span{flex:1}.annotation-menu>button:hover,.annotation-menu>button[aria-pressed=true]{background:var(--surface-selected)}.annotation-menu>.clear-annotation{border-top:1px solid var(--border);border-radius:0;color:var(--text-secondary);margin-top:4px}
.annotation-important{color:var(--annotation-important)!important}.annotation-unclear{color:var(--annotation-unclear)!important}.annotation-bookmark{color:var(--annotation-bookmark)!important}
.pending-message{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;padding:12px 16px;margin-top:12px;border-radius:14px;background:var(--warning-surface);color:var(--warning);font-size:14px}.pending-message button{display:flex;align-items:center;gap:4px;min-height:44px;font-weight:600;white-space:nowrap}
.summary-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;flex-shrink:0;padding:20px;margin-bottom:20px;border-bottom:1px solid var(--border)}.summary-strip>div{display:flex;flex-direction:column;gap:6px}.summary-strip span{font-size:14px;color:var(--text-secondary)}.summary-strip strong{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.summary-strip small{font-size:15px;font-weight:400;margin-left:3px}
.history{display:flex;flex-direction:column;flex:1;min-height:140px;padding-inline:20px}.section-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0;margin-bottom:12px}h2{font-size:17px;line-height:1.5;font-weight:600;margin:0}.history-controls{display:flex;align-items:center;gap:12px}.segmented{display:flex;align-items:center;padding:4px;border-radius:14px;background:var(--timer-surface)}.segmented button{min-width:44px;min-height:44px;padding:8px 12px;border-radius:10px;font-size:14px;color:var(--text-secondary)}.segmented button.on{background:var(--surface);color:var(--text-primary);font-weight:600;box-shadow:0 1px 4px #17233628}
.text-button{display:flex;align-items:center;justify-content:center;gap:4px;min-height:44px;padding:8px 0;color:var(--accent);font-size:15px;font-weight:500}.record-list{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--control-border) transparent}.record-day{margin:8px 0 4px;font-size:14px;font-weight:500;color:var(--text-secondary)}
.record-row{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;align-items:center;gap:12px;padding:16px 0;border-bottom:1px solid var(--border)}.record-start{min-width:0}.record-range{font-size:16px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}.record-range>span{display:inline-block;margin:0 6px;font-weight:400;color:var(--text-secondary)}.record-topic,.record-note{margin-top:6px;font-size:14px;line-height:1.6;color:var(--text-secondary);overflow-wrap:anywhere}.record-totals{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.record-totals strong{font-size:16px;font-weight:600}.record-totals span{font-size:14px;white-space:nowrap;color:var(--text-secondary)}.empty-history{padding:16px;text-align:center;color:var(--text-secondary);font-size:16px}.empty-history p{margin:0}.load-more{width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px;font-size:15px;color:var(--accent)}
.toast{position:fixed;z-index:100;left:50%;bottom:24px;transform:translateX(-50%);max-width:calc(100% - 32px);padding:12px 16px;font-size:15px;line-height:1.6;background:var(--text-primary);color:var(--surface);border-radius:12px;box-shadow:var(--shadow)}
.record-dialog{width:520px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow-y:auto;margin:auto;border:0;padding:24px;border-radius:18px;background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow)}.record-dialog::backdrop{background:#10172566}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px}.dialog-heading h2{font-size:18px}
.field{display:flex;flex-direction:column;gap:8px;min-width:0;margin-bottom:16px}.field>span{font-size:15px;font-weight:500}.field small{font-size:14px;font-weight:400;color:var(--text-secondary);margin-left:4px}.field input,.field select,.field textarea{min-width:0;width:100%;min-height:44px;border:0;background:var(--surface-grouped);color:var(--text-primary);border-radius:14px;padding:12px;font-size:16px;line-height:1.5;resize:vertical}.field input::placeholder,.field textarea::placeholder{color:var(--text-muted);opacity:1}.field input[type=number]{width:150px}.field input[type=datetime-local]{font-size:15px;padding:10px}.field-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.effective-preview{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 16px;background:var(--surface-grouped);border-radius:14px;margin-bottom:16px;font-size:15px}.effective-preview strong{font-size:16px;font-weight:600}
.dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px}.dialog-save{display:flex;gap:8px;margin-left:auto}.delete-button{min-height:44px;padding:8px 0;color:var(--error);font-size:15px;font-weight:500}.delete-confirm{display:flex;align-items:center;gap:12px;font-size:15px;width:100%}.delete-confirm>span{margin-right:auto;color:var(--error)}.delete-confirm button{min-height:44px;padding:8px;font-weight:600}.delete-confirm .danger{color:var(--error)}.form-error{font-size:15px;line-height:1.6;padding:12px;border-radius:14px;color:var(--error);background:var(--error-surface)}
.lecture-picker{position:relative;min-width:0;width:100%}.picker-trigger{width:100%;min-height:44px;display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:12px;border-radius:14px;background:var(--surface-grouped);font-size:16px;line-height:1.5;text-align:left}.picker-trigger>span{min-width:0;overflow-wrap:anywhere}.picker-trigger>svg{margin-top:3px}.picker-options{position:absolute;top:calc(100% + 6px);left:0;width:100%;max-height:280px;overflow-y:auto;padding:4px;border-radius:14px;background:var(--surface);box-shadow:var(--shadow);z-index:60}.picker-options>button{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px;text-align:left;font-size:16px;line-height:1.5;border-radius:10px}.picker-options>button[aria-selected=true],.picker-options>button:hover{background:var(--surface-selected)}
.mobile-menu{display:none}
@media(min-width:721px) and (max-width:1000px){.header-left{gap:16px}.header-metrics{gap:16px}.header-right{gap:8px}.subject{padding:12px}.workspace{padding:16px}}
@media(min-width:721px) and (max-width:880px){:root{--outline-width:320px}.timer-controls{gap:8px}.timer-controls .button{padding-inline:6px}}
@media(min-width:721px) and (max-height:760px){.workspace{overflow-y:auto}.history{min-height:160px;flex:none}.record-list{max-height:240px}}
@media(max-width:720px){
  :root{--type-body:1.0625rem;--type-label:1rem;--type-meta:.875rem}
  .app-header{display:grid;grid-template-columns:1fr auto;gap:0 4px;padding:6px 12px 8px}.header-left{display:contents}.brand-group{grid-column:1;grid-row:1;gap:0}.brand-toggle{font-size:14px;padding:0;gap:5px}.brand-mark{font-size:18px}.brand-divider{display:none}.header-right{grid-column:2;grid-row:1;gap:0}.header-metrics{grid-column:1/-1;grid-row:2;justify-content:space-between;gap:8px;font-size:14px}.header-metrics strong{margin-left:2px}.theme-toggle>span{display:none}.settings-button{gap:4px;padding:8px}
  .subjects{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px 12px}.subject{min-height:68px;padding:12px;gap:8px}.subject-name{font-size:15px}.subject-top>strong{font-size:14px}.subject-track{height:4px}.subject-progress{display:none}
  .app-body{display:block;position:relative}.mobile-menu{display:inline-flex}.sidebar{position:fixed;inset:0 auto 0 0;width:min(384px,100vw);z-index:41;transform:translateX(-100%);transition:transform 160ms;padding:10px 8px calc(8px + env(safe-area-inset-bottom)) 12px}.sidebar.open{transform:translateX(0)}.sidebar-heading{align-items:center}.sidebar-heading>strong{margin-left:auto}.sidebar-backdrop{position:fixed;inset:0;z-index:40;background:#10172566}
  .workspace{display:block;height:100%;overflow-y:auto;padding:20px 16px}.point-heading,.history{padding-inline:0}.lecture-subtitle{display:block}.timer-panel{padding:16px}.time-details{gap:12px}.timer-controls{gap:8px;margin-top:20px}.timer-controls .button{font-size:16px;gap:6px;padding-inline:6px}.annotation-menu{top:auto;bottom:calc(100% + 8px)}.summary-strip{padding:20px 0}.history{display:block}.record-list{overflow:visible}.history-controls{gap:8px}.segmented button{padding:8px}.record-range{font-size:15px;white-space:normal}.record-row{gap:8px}.record-totals strong{font-size:15px}.field-pair{grid-template-columns:1fr;gap:0}.field input[type=datetime-local]{font-size:16px}.record-dialog{padding:16px}.filter-panel select{font-size:16px}
}
@media(max-width:360px){.time-details{grid-template-columns:repeat(2,minmax(0,1fr))}.time-details>div:last-child{grid-column:1/-1}.record-row{grid-template-columns:minmax(0,1fr) 44px}.record-totals{grid-column:1;grid-row:2;align-items:flex-start;flex-direction:row;gap:12px}.edit-record{grid-column:2;grid-row:1/3}.sync-status{display:none}.timer-topline{gap:8px;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

.settings-dialog{width:440px;max-width:calc(100vw - 24px)}.settings-dialog .dialog-heading{margin-bottom:16px}.settings-section+.settings-section{margin-top:24px}.settings-section h3{font-size:15px;font-weight:600;margin:0 0 12px}.settings-section p{font-size:15px;line-height:1.6;color:var(--text-secondary);margin:0 0 12px}.settings-row{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:12px;border-radius:12px;background:var(--surface-grouped);font-size:16px;text-align:left}.settings-row+.settings-row{margin-top:8px}.settings-row span{flex:1}.settings-row small{font-size:14px;color:var(--text-secondary)}.settings-row:hover{background:var(--surface-selected)}.settings-logout{color:var(--error)}.settings-row:disabled{color:var(--disabled-text);cursor:default}
.login-page{min-height:100dvh;display:flex;align-items:center;justify-content:center;background:var(--background);padding:24px}
.login-card{width:100%;max-width:380px;background:var(--surface);border-radius:18px;padding:32px}
.login-description{color:var(--text-secondary);font-size:15px;margin:10px 0 28px}
.login-card .field{margin-bottom:20px}.login-card .field input{font-size:16px}
.login-card form>.button{width:100%;margin-top:4px}
#login-status{font-size:15px;line-height:1.5;color:var(--error);margin:0 0 16px}#login-status:empty{display:none}
.connection-error{max-width:420px;margin:15dvh auto;padding:24px;font-size:16px}
