@font-face{font-family:Setka;src:local('Segoe UI')}*{box-sizing:border-box} :root{font-family:Setka,system-ui,-apple-system,sans-serif;color:#29384c;background:#f5f4ee;font-synthesis:none;--blue:#24466f;--line:#d8dfe8;--muted:#6c7b8f;--accent:#e2bc69}body{margin:0}button,input,select{font:inherit}button,a,input,select,summary{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button,a,input,select{outline-offset:4px}button:focus-visible,a:focus-visible{outline:3px solid #bc8b34}button{color:inherit}a{color:inherit;text-decoration:none}p{line-height:1.55}h1,h2,h3,p{margin:0}h1{font-size:48px;line-height:1.15;font-weight:600;letter-spacing:-2px}h2{font-size:21px;font-weight:600;letter-spacing:-.4px}h3{font-size:17px;line-height:1.35;font-weight:600}small{line-height:1.5}.sidebar{position:fixed;inset:0 auto 0 0;width:238px;padding:35px 25px;background:#edf1f7;border-right:1px solid var(--line);display:flex;flex-direction:column}.brand{display:flex;align-items:center;font-size:36px;letter-spacing:-2px;font-weight:650;gap:10px}.brand-mark{font-size:35px;color:var(--blue);letter-spacing:0}.brand-dot{color:#ba8733;margin-left:-10px}.workspace-label{font-size:9px;letter-spacing:1.5px;margin:21px 0 36px;color:var(--muted)}.sidebar nav{display:grid;gap:7px}.nav-item{border:0;background:none;padding:14px 17px;text-align:left;display:flex;gap:15px;align-items:center;font-weight:550;color:#48658e;font-size:15px;border-radius:4px}.nav-item span{font-size:22px;line-height:1}.nav-item:hover{background:#cfdbec}.nav-item.active{background:var(--blue);color:#fff}.sidebar-bottom{margin-top:auto;border-top:1px solid #bacae1;padding-top:22px}.term-label{font-size:12px;color:var(--muted);margin-bottom:10px}.sidebar-bottom strong{font-size:18px}.sidebar-bottom p{font-size:12px;margin:5px 0 22px;color:var(--muted)}.local-state{font-size:11px;color:#46638b;display:flex;align-items:center;gap:7px}.local-state i{width:6px;height:6px;background:#476fa6;border-radius:50%}.shell{margin-left:238px;min-height:100vh}.topbar{height:80px;padding:0 48px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:18px;font-size:12px;font-weight:550}.divider{color:#a1b5d2;padding:0 13px}.desktop-note{margin-left:auto;color:var(--muted)}main{max-width:1240px;margin:auto;padding:42px 48px 40px}.page-heading{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:30px}.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:650;color:var(--muted);margin-bottom:13px}.page-heading p{color:var(--muted);font-size:13px;margin-top:12px}.date-control{display:flex;align-items:center;border:1px solid var(--line);background:#fafaf5;padding:3px;border-radius:4px;gap:2px}.date-control input{font-size:12px;border:0;background:none;width:116px;padding:5px}.icon-button{background:transparent;border:0;min-width:32px;min-height:36px;font-size:24px;padding:2px 8px}.subtle{border:0;background:transparent;font-size:12px;font-weight:550;padding:10px 12px;min-height:38px}.subtle:hover{background:#dae4f1}.primary,.secondary{border:1px solid var(--blue);border-radius:3px;min-height:43px;padding:11px 17px;font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:16px}.primary{color:#fff;background:var(--blue)}.primary:hover{background:#315b8a}.secondary{background:transparent;border-color:#b6c7de}.secondary:hover{background:#dae3f0}.primary.small{font-size:12px;min-height:37px;padding:9px 13px}.full{width:100%;margin-top:12px}.today-layout{display:grid;grid-template-columns:minmax(0,1fr) 272px;gap:38px;align-items:start}.now-panel{background:var(--blue);color:#f0f5fc;padding:25px 27px 0;border-radius:5px;margin-bottom:31px;position:relative;overflow:hidden}.now-top{display:flex;align-items:center;gap:8px;font-size:10px;letter-spacing:1.5px;color:#d4e4fa;margin-bottom:18px}.live-dot{width:6px;height:6px;background:#e4bc65;border-radius:50%;box-shadow:0 0 0 4px #e4bc6515}.now-symbol{margin-left:auto;font-size:21px;color:#b9d5fd}.now-panel h2{font-size:27px;line-height:1.2;max-width:450px;letter-spacing:-.7px;font-weight:550}.now-panel>p{font-size:12px;color:#cbddf5;margin:12px 0 24px}.next-line{display:flex;align-items:center;gap:12px;border-top:1px solid #587597;padding:17px 0;font-size:12px;line-height:1.5}.next-line>span:first-child{font-size:9px;letter-spacing:1.4px;color:#c1d9fa;flex-shrink:0}.next-line strong{font-variant-numeric:tabular-nums;flex-shrink:0}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:17px}.section-heading h2{font-size:20px}.timeline-row{display:grid;grid-template-columns:58px minmax(0,1fr);gap:17px;margin-bottom:15px;position:relative}.time-label{display:flex;flex-direction:column;font-size:11px;gap:4px;align-items:flex-start;padding-top:16px;font-variant-numeric:tabular-nums}.time-label strong{font-size:13px;font-weight:600}.time-label span{color:#718eb7}.event-card{text-align:left;background:#fcfcf7;border:1px solid #c8d5e8;border-left:3px solid #577db2;border-radius:3px;padding:17px 20px;width:100%;min-width:0}.event-card:hover{border-color:#557bb0}.event-card p{font-size:11px;color:var(--muted);margin-top:8px}.card-meta{font-size:9px;letter-spacing:1.1px;font-weight:650;color:#4f709f;margin-bottom:8px}.event-card.current{border-left-color:#c49339;background:#fff9e7}.event-card.sport{background:#edf1f3;border-left-color:#8b9ca9}.event-card.work{background:#e2ebfa;border-left-color:#3869ae}.past .event-card{background:#e4eaf3}.past .event-card h3{color:#5273a0}.tiny-tag{display:inline-block;margin-top:8px;font-size:10px;color:#967027}.free-card{padding:16px 19px 18px;border:1px dashed #9eb7d9;border-radius:3px;background:#eaf1fc}.free-label{display:flex;justify-content:space-between;font-size:9px;letter-spacing:1.5px;color:#3d5e8b}.free-label strong{font-size:11px;letter-spacing:0;font-weight:550}.recommendation{margin-top:20px}.recommendation .card-meta{font-size:8px;color:#4771ab}.recommendation p{font-size:11px;color:#446593;margin-top:7px}.recommend-actions{display:flex;align-items:center;gap:4px;margin-top:15px;flex-wrap:wrap}.free-hint{font-size:12px;color:#5276a9;margin-top:12px}.free-time{color:#4d72a5}.summary-strip{display:grid;grid-template-columns:1.4fr 1fr;border-bottom:1px solid var(--line);padding-bottom:27px;margin:3px 0 27px}.summary-strip>div{display:flex;flex-direction:column;gap:6px}.summary-strip>div+div{padding-left:24px;border-left:1px solid var(--line)}.summary-strip strong{font-size:27px;font-weight:550;letter-spacing:-.8px}.summary-strip span{font-size:11px;color:var(--muted)}.count{font-size:11px;background:#d5dfee;border-radius:3px;padding:3px 7px}.section-caption{font-size:12px;line-height:1.6;color:var(--muted);margin:12px 0}.aside-section .section-caption{font-size:11px;margin-top:-7px;margin-bottom:19px}.task-row{display:flex;gap:11px;align-items:flex-start;border-bottom:1px solid var(--line);padding:17px 0}.task-row>div{flex:1;min-width:0}.task-row strong{display:block;font-size:13px;line-height:1.5;font-weight:550;overflow-wrap:anywhere}.task-row p{font-size:10px;color:#5c7dac;margin-top:5px}.check{width:19px;height:19px;min-width:19px;border:1px solid #9ab2d4;border-radius:3px;background:transparent;margin-top:3px;padding:0;position:relative}.check:before{content:'';position:absolute;inset:-10px}.check:hover{background:#bccde6}.check.checked{background:#315280;color:white}.text-link{display:flex;width:100%;justify-content:space-between;align-items:center;background:none;border:0;padding:19px 0;font-size:12px;font-weight:600;text-align:left}.text-link:hover{color:#8b6a2f}.quiet-note{display:flex;gap:12px;margin:30px 0;color:#6184b4}.quiet-note>span{font-size:23px}.quiet-note p{font-size:11px;line-height:1.8}.page-footer{max-width:1240px;margin:auto;padding:20px 48px 30px;font-size:10px;color:#7491ba;display:flex;justify-content:space-between}.empty{padding:35px 20px;border:1px dashed #b3c5df;color:var(--muted);font-size:13px;line-height:1.8}.empty.small{padding:22px 10px;border:0;font-size:12px}.setup-banner{display:flex;gap:22px;align-items:center;justify-content:space-between;border:1px solid #bccce3;background:#dae4f2;padding:18px 22px;margin-bottom:27px;border-radius:3px}.setup-banner strong{font-size:14px}.setup-banner p{font-size:11px;color:var(--muted);margin-top:5px}.notice{padding:12px 15px;background:#dfe8f4;font-size:12px;line-height:1.6;margin-bottom:18px;border-left:3px solid #7597c7}.notice.warning{background:#f8ecd5;border-color:#c49443}.notice.error{background:#f6e3dc;border-color:#bc6852}.segmented{display:inline-flex;border:1px solid #c1d0e6;background:#e3eaf3;border-radius:4px;padding:3px;gap:2px}.segmented button{border:0;background:none;padding:9px 15px;font-size:12px;border-radius:3px}.segmented .selected{background:#fffef7;box-shadow:0 1px 3px #14233813}.task-list{margin-top:28px;max-width:800px}.task-list .task-row{padding:25px 0}.task-list .task-row strong{font-size:16px}.task-list .task-row p{font-size:12px}.task-meta{font-size:11px;color:#6385b4;display:block;margin-top:8px}.week-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.grid-scroll{overflow-x:auto;border:1px solid var(--line);background:#fafaf6}.week-grid{display:grid;grid-template-columns:65px repeat(6,minmax(125px,1fr));grid-template-rows:55px repeat(7,minmax(118px,auto));min-width:850px;isolation:isolate}.grid-corner,.grid-day{padding:17px 9px;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#dae4f1;font-size:11px;text-align:center;grid-row:1}.grid-corner{font-size:9px;letter-spacing:1px}.grid-day strong{margin-left:4px;font-size:14px}.grid-day.is-today{background:#b9d5fd}.grid-slot{padding:15px 10px;display:flex;flex-direction:column;gap:7px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#e5ecf5;text-align:center}.grid-slot b{font-size:16px;font-weight:500}.grid-slot span{font-size:9px;line-height:1.8;color:var(--muted)}.grid-cell{border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.grid-lesson{margin:4px;padding:10px 9px;background:#e2edfc;border:1px solid #c0d1e8;border-left:3px solid #507bb7;border-radius:2px;text-align:left;display:flex;flex-direction:column;align-self:stretch;gap:6px;z-index:1;min-width:0}.grid-lesson span{font-size:8px;color:#4a6ea0;letter-spacing:.6px;text-transform:uppercase}.grid-lesson strong{font-size:11px;line-height:1.4;overflow-wrap:anywhere}.grid-lesson small{font-size:9px;color:#5074a7}.grid-lesson.sport{background:#e6edef;border-color:#c5d4db}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.settings-panel{padding:25px;border:1px solid var(--line);background:#fafaf4}.settings-panel h2{font-size:19px;margin-bottom:16px}.settings-panel>p{font-size:12px;color:var(--muted);margin-bottom:20px}.settings-panel>.secondary{margin:8px 0}.file-button{position:relative;cursor:pointer;overflow:hidden}.file-button input{position:absolute;inset:0;width:100%;opacity:0;cursor:pointer}.rule-row{display:flex!important;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding:15px 0!important;margin:0!important}.rule-row span{flex:1}.rule-row strong{font-size:13px;display:block}.rule-row small{display:block;font-size:11px;color:var(--muted);margin-top:4px}input[type=checkbox]{accent-color:var(--blue);width:18px;height:18px;flex-shrink:0}dialog{border:1px solid #b7c7de;background:#f4f7fc;color:#29384c;border-radius:7px;padding:26px;width:560px;max-width:calc(100vw - 24px);max-height:90dvh;box-shadow:0 20px 100px #12203540}dialog::backdrop{background:#111f3255;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:23px}.dialog-head h2{font-size:23px;line-height:1.3}.dialog-head .icon-button{margin-top:-7px}dialog>p{font-size:13px;color:var(--muted);margin:10px 0 20px}form label,dialog>label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:550;margin:16px 0}input:not([type=checkbox]):not([type=file]),select{border:1px solid #b3c5df;border-radius:3px;background:#fffef9;min-height:40px;padding:9px 11px;color:#29384c;min-width:0}form .form-row{display:grid;grid-template-columns:1fr 1fr;gap:15px}.checkbox-label{flex-direction:row;align-items:center}.plan-title{font-size:16px;font-weight:550;margin-bottom:20px}.source-box{border-top:1px solid var(--line);padding-top:22px;margin-top:25px;font-size:12px}.source-box blockquote{margin:16px 0;background:#e0e8f4;padding:15px;line-height:1.7;white-space:pre-wrap}.source-warning{font-size:11px;color:#9b6b25!important;line-height:1.6}.import-records{max-height:43dvh;overflow:auto;border-top:1px solid var(--line)}.import-record{display:flex;flex-direction:row;align-items:flex-start;gap:12px;padding:16px 0;margin:0;border-bottom:1px solid var(--line)}.import-record>span{flex:1}.import-record strong{font-size:13px;display:block;line-height:1.5}.import-record small{display:block;font-size:10px;color:var(--muted);margin:5px 0}.import-record details{font-size:11px;font-weight:400}.import-record summary{cursor:pointer;color:#5073a5;padding:5px 0}.import-record details>span{font-size:11px;display:block;line-height:1.6;padding:9px;background:#f0f0e6}.sticky-button{position:sticky;bottom:0}.diff-list{max-height:50dvh;overflow:auto;font-size:13px}.diff-list p{padding:12px 0;border-bottom:1px solid var(--line)}.diff-list small{display:block;color:var(--muted);margin:3px 0}.diff-tag{font-size:10px;color:#4d72a5;margin-right:10px}.semester-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.semester-grid button{display:flex;flex-direction:column;gap:4px;text-align:left;background:#dbe5f3;border:1px solid #b3c7e2;padding:13px}.semester-grid b{font-size:20px}.semester-grid span,.semester-grid small{font-size:10px}.mobile-nav{display:none}#toast{position:fixed;left:50%;bottom:30px;transform:translateX(-50%) translateY(20px);background:#203c5e;color:#fff;padding:14px 22px;box-shadow:0 5px 25px #142e3030;border-radius:5px;max-width:90vw;width:max-content;font-size:13px;z-index:10000;opacity:0;pointer-events:none;transition:.15s}#toast.visible{opacity:1;transform:translateX(-50%)}.loading{padding:50px}
@media(min-width:1450px){main{padding-top:55px}.today-layout{grid-template-columns:minmax(0,1fr) 300px;gap:50px}}
@media(max-width:1150px){.sidebar{width:190px;padding:28px 18px}.shell{margin-left:190px}main{padding:32px 28px}.topbar{padding:0 28px}.today-layout{grid-template-columns:minmax(0,1fr) 225px;gap:25px}.page-heading{align-items:flex-start}.date-control{flex-wrap:wrap;max-width:190px}.date-control .subtle{display:none}.summary-strip strong{font-size:24px}.page-footer{padding:20px 28px}.now-panel{padding:23px 22px 0}.settings-grid{gap:16px}}
@media(max-width:850px){.today-layout{grid-template-columns:1fr}.day-aside{display:grid;grid-template-columns:1fr 1fr;gap:25px}.summary-strip{grid-column:1/-1;margin:0}.quiet-note{display:none}.aside-section{grid-column:1/-1}.day-aside>.full{grid-column:1/-1}.desktop-note{display:none}.topbar .subtle{margin-left:auto}.settings-grid{grid-template-columns:1fr}}
@media(max-width:650px){.sidebar{display:none}.shell{margin:0}.topbar{height:57px;padding:0 20px;font-size:11px}.topbar:before{content:'▦';font-size:26px;color:var(--blue);margin-right:0}.topbar .divider{padding:0 7px}.topbar .subtle{font-size:11px;padding:8px}main{padding:27px 20px 25px}.page-heading{display:block;margin-bottom:25px}.page-heading h1{font-size:39px;letter-spacing:-1.5px}.page-heading p{font-size:12px;margin-top:10px}.eyebrow{font-size:8px;letter-spacing:1.3px;margin-bottom:10px}.date-control{margin-top:20px;max-width:none;justify-content:space-between}.date-control input{width:135px}.date-control .subtle{display:block}.page-heading>.primary{margin-top:20px}.today-layout{gap:28px}.now-panel{padding:21px 20px 0;margin-bottom:27px}.now-panel h2{font-size:25px}.now-top{font-size:8px;margin-bottom:15px}.now-panel>p{font-size:11px;margin-bottom:20px}.next-line{font-size:11px;gap:9px;padding:15px 0}.next-line>span:first-child{font-size:8px}.section-heading h2{font-size:19px}.timeline-row{grid-template-columns:43px minmax(0,1fr);gap:11px;margin-bottom:13px}.time-label{font-size:9px;padding-top:16px}.time-label strong{font-size:11px}.event-card{padding:15px 14px}.event-card h3,.recommendation h3{font-size:15px}.event-card p{font-size:10px}.card-meta{font-size:8px;letter-spacing:.65px}.free-card{padding:15px 14px}.free-label{font-size:8px;letter-spacing:1px}.free-label strong{font-size:10px}.recommendation p{font-size:10px}.primary.small{font-size:11px;gap:8px;padding:9px 11px}.recommend-actions .subtle{font-size:10px;padding:6px}.recommendation{margin-top:17px}.mobile-nav{display:flex;position:fixed;inset:auto 0 0;background:#edf2faf5;backdrop-filter:blur(16px);border-top:1px solid #c4d2e6;padding:8px 12px calc(8px + env(safe-area-inset-bottom));z-index:20;justify-content:space-around}.mobile-nav .nav-item{display:flex;flex-direction:column;gap:6px;text-align:center;font-size:9px;font-weight:550;padding:6px 15px;color:#6183b2;border-radius:3px;min-width:65px}.mobile-nav .nav-item span{font-size:22px}.mobile-nav .active{background:#b9d5fd;color:var(--blue)}.page-footer{margin-bottom:83px;padding:15px 20px;display:block;font-size:9px;line-height:2}.page-footer span{display:block}.setup-banner{display:block;padding:18px}.setup-banner p{font-size:11px}.setup-banner .primary{margin-top:15px;font-size:11px;width:100%}.week-toolbar{display:block}.week-toolbar>.section-caption{display:none}.segmented{width:100%;display:flex}.segmented button{flex:1;padding:9px 10px;font-size:11px}.grid-scroll{margin:0 -20px}.grid-slot{position:sticky;left:0;z-index:2}.grid-corner{position:sticky;left:0;z-index:3}.task-list .task-row strong{font-size:14px}.task-list .task-row p{font-size:11px}.task-meta{font-size:10px}.settings-panel{padding:20px}.settings-panel h2{font-size:18px}.file-button,.settings-panel>.secondary{width:100%}dialog{padding:21px;max-height:88dvh}.dialog-head h2{font-size:21px}dialog input:not([type=checkbox]),dialog select{font-size:16px}.import-records{max-height:35dvh}.form-row{gap:10px!important}#toast{bottom:95px;font-size:12px}.summary-strip{padding-top:12px}.section-caption{font-size:11px}}

.origin-link{border:0;background:none;color:#395c8d;font-size:11px;padding:6px 0;text-align:left}.catalog-list{display:grid;gap:10px}.catalog-item{display:grid;gap:7px;text-align:left;padding:16px;background:#e0e8f4;border:1px solid #b3c6e0;border-radius:4px}.catalog-item small{color:#476793}.source-status{border-bottom:1px solid #c1d0e6;padding-bottom:16px;margin-bottom:18px}.source-status p,.source-status small{font-size:12px;color:#436391}.source-status .secondary{margin-top:12px}.settings-panel .rule-row{font-size:12px}


/* Kind colors stay consistent in Today and the academic Week grid. */
.event-card.lecture,.grid-lesson.lecture{background:#f8e7ef;border-color:#e6cbd8;border-left-color:#b7809c}
.event-card.seminar,.grid-lesson.seminar{background:#e5efff;border-color:#c6d8f3;border-left-color:#7d9fce}
.event-card.practice,.event-card.lab,.grid-lesson.practice,.grid-lesson.lab{background:#fff1d8;border-color:#ecd9b2;border-left-color:#c2a160}
.event-card.sport,.grid-lesson.sport{background:#e3f2f5;border-color:#bedde3;border-left-color:#7faab7}
.event-card.work{background:#eee8fa;border-color:#d8ccee;border-left-color:#9e87c1}
.event-card.personal{background:#f9e9df;border-color:#e8cfc0;border-left-color:#c09276}
.event-card.other,.grid-lesson.other{background:#f0f0f4;border-color:#dcdce4;border-left-color:#9b9cae}
.past .event-card{opacity:.72}.event-card.current{box-shadow:0 0 0 2px #b9d5fd;border-left-width:5px}
.topbar>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar>button{flex-shrink:0}

/* Alpha usability: retain the existing palette and academic grid. */
body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.topbar{height:calc(80px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}
.date-control .subtle{display:block;font-weight:700;text-decoration:underline;text-underline-offset:4px}
.primary-actions,.quick-dates{display:flex;gap:8px;flex-wrap:wrap}.primary-actions button{padding:9px;font-size:12px}
.task-title{border:0;background:none;text-align:left;padding:0;width:100%;color:inherit}.task-title:hover{text-decoration:underline}
textarea{width:100%;resize:vertical;border:1px solid var(--line);padding:12px;font:inherit;background:#fffef9;color:inherit;border-radius:3px}
.week-jump{display:none}.welcome-steps{padding-left:22px;line-height:1.8;font-size:14px;margin-bottom:24px}.setup-rule{display:grid;grid-template-columns:1fr 100px;gap:15px;border-bottom:1px solid var(--line)}
.correction-source{margin:0;background:#e0e8f4;padding:15px;font-size:13px;white-space:pre-wrap}.quick-dates button{padding:8px;font-size:12px}
.event-card.class,.grid-lesson.class{background:#edf1f9;border-left-color:#8c9fb8}
button:focus-visible{outline:3px solid #668bbc;outline-offset:3px}button{touch-action:manipulation}
@media(max-width:650px){
 .topbar{height:calc(57px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top)}
 .topbar .secondary{margin-left:auto;padding:8px 12px;font-size:12px}
 .mobile-nav{inset:auto 12px calc(8px + env(safe-area-inset-bottom));border:1px solid #c4d2e6;border-radius:18px;padding:5px;box-shadow:0 4px 20px #24466f18;gap:2px}
 .mobile-nav .nav-item{flex:1;min-width:0;padding:7px 8px;gap:3px;border-radius:12px}.mobile-nav .nav-item span{font-size:19px}
 .page-footer{margin-bottom:80px}.week-jump{display:flex;gap:5px;margin:12px 0}.week-jump button{flex:1;padding:10px 3px}
 .week-grid{grid-template-columns:65px repeat(6, minmax(205px,1fr));min-width:1295px;position:relative}
 .grid-lesson strong{font-size:13px}.grid-lesson small{font-size:11px}.grid-day{font-size:13px}
 .task-list .task-row{flex-wrap:wrap}.task-row>div{flex-basis:60%}.next-line{flex-wrap:wrap}
 dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 32px)}
 .section-heading{align-items:flex-start}.primary-actions{justify-content:flex-end}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.brand-mark{display:block;flex-shrink:0}.header-mark{display:block;flex-shrink:0;border-radius:7px}.topbar:before{content:none}

/* 0.3.1: form geometry and a larger academic workspace. */
form .rule-row,form .checkbox-label{flex-direction:row;align-items:center}
form .form-row{align-items:stretch}form .form-row>label{min-width:0;justify-content:flex-end}
form .form-row>.checkbox-label{justify-content:flex-start}
.mobile-brand{display:flex;align-items:center;gap:8px;flex-shrink:0}.mobile-brand strong{font-size:18px;color:var(--blue)}
.topbar>.mobile-brand+span{border-left:1px solid var(--line);padding-left:14px;overflow-wrap:anywhere}
.welcome-logo{display:block;margin:8px auto 20px}.task-options{margin:16px 0}.task-options summary,details>summary{cursor:pointer;padding:12px 0;font-size:13px}
.task-notes{white-space:pre-wrap;overflow-wrap:anywhere}.task-origin-filter{display:flex;align-items:center;gap:12px;font-size:13px;margin-top:16px}
.review-warning{border-left:3px solid #b27a25;padding-left:10px;background:#fff4df}.import-record{font-size:12px}.import-record input{margin-top:5px}.import-record>span{min-width:0}
.week-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.week-controls label{font-size:13px;display:flex;align-items:center;gap:8px}
.week-expanded .sidebar{width:150px;padding-left:14px;padding-right:14px}.week-expanded .shell{margin-left:150px}.week-expanded main{padding:20px}.week-expanded .workspace-label,.week-expanded .sidebar-bottom{display:none}
.week-expanded .grid-lesson strong{font-size:13px}.mobile-day-hint{display:none}
dialog .sticky-button{margin-top:12px;z-index:2}dialog .dialog-head{position:sticky;top:-22px;background:#f4f7fc;z-index:3;padding-top:8px;padding-bottom:8px}
@media(pointer:coarse),(max-width:650px){.grid-day{cursor:default}.desktop-day-hint{display:none}.mobile-day-hint{display:inline}}
@media(max-width:650px){
 .topbar{gap:10px;padding-left:16px;padding-right:16px}.header-mark{width:26px;height:26px}.mobile-brand strong{font-size:17px}
 .week-expanded .shell{margin:0}.week-expanded main{padding:16px}.week-expanded .grid-scroll{margin:0 -16px}
 .week-controls{gap:8px}.week-controls button{padding:10px;font-size:12px}.week-controls select{max-width:130px}
 dialog{padding:16px;max-height:calc(var(--visual-height,100dvh) - 24px);top:var(--visual-top,0px);margin:auto;overflow:auto;scroll-padding:60px 0 70px}
 .dialog-head{margin-bottom:12px}form label{margin:12px 0;font-size:13px}#task-form>label:first-child{margin-top:4px}
 #task-form .section-caption{margin:8px 0}.task-options summary{font-size:12px}textarea{font-size:16px}
 .task-origin-filter{flex-wrap:wrap}.task-origin-filter select{flex:1}.grid-scroll{max-width:calc(100% + 40px)}
}
@media print{
 @page{size:A4 landscape;margin:8mm}
 body{background:white!important;padding:0!important}.sidebar,.topbar,.mobile-nav,.page-footer,.date-control,.week-toolbar,.week-controls,.week-jump,main>.notice,main>.section-caption{display:none!important}
 .shell,.week-expanded .shell{margin:0!important}main,.week-expanded main{padding:0!important;max-width:none!important}.page-heading{margin:0 0 10px!important;display:block!important}.page-heading h1{font-size:20px!important}.page-heading p{margin:0!important;font-size:12px!important}
 .grid-scroll{overflow:visible!important;margin:0!important;max-width:none!important;border:1px solid #aaa}.week-grid{zoom:1!important;min-width:0!important;grid-template-columns:45px repeat(6,minmax(0,1fr))!important;grid-template-rows:30px repeat(7,minmax(65px,auto))!important}
 .grid-lesson{padding:4px!important;gap:2px!important;break-inside:avoid}.grid-lesson strong{font-size:9px!important}.grid-lesson small,.grid-lesson span{font-size:7px!important}.grid-slot,.grid-day{padding:5px!important;position:static!important}*{print-color-adjust:exact;-webkit-print-color-adjust:exact}
}

.week-expanded .page-heading{display:flex;align-items:center;gap:12px;margin-bottom:12px}.week-expanded .page-heading h1{font-size:26px}.week-expanded .page-heading .eyebrow,.week-expanded .page-heading p{display:none}.week-expanded .date-control{margin-top:0}.week-expanded .week-toolbar{margin-bottom:8px}.week-expanded .week-jump{display:none}.week-expanded .grid-scroll{max-height:calc(100dvh - 270px);overflow:auto}.week-expanded .brand{font-size:24px;gap:5px}.week-expanded .brand-mark{width:26px;height:26px}.week-expanded .brand-dot{margin-left:-5px}
@media(max-width:650px){.week-expanded .page-heading{display:block}.week-expanded .page-heading h1{display:none}.week-expanded .week-controls{margin-bottom:8px}.week-expanded .grid-scroll{max-height:calc(100dvh - 320px)}.week-expanded .date-control{gap:4px}.week-expanded .week-controls button{min-height:40px}}
@media print{.week-expanded .grid-scroll{max-height:none!important}.week-expanded .page-heading h1,.week-expanded .page-heading p{display:block!important}#toast,dialog{display:none!important}}

@media(max-height:500px) and (min-width:651px) and (max-width:1100px){
 .week-expanded .sidebar{width:110px;padding:12px 8px}.week-expanded .shell{margin-left:110px}.week-expanded .brand{font-size:20px}.week-expanded .nav-item{padding:10px 6px;gap:6px;font-size:12px}.week-expanded .topbar{height:40px;padding:0 12px}.week-expanded main{padding:8px 12px}.week-expanded .page-heading{margin-bottom:4px}.week-expanded .page-heading h1{font-size:18px}.week-expanded .date-control{max-width:none;flex-wrap:nowrap}.week-expanded .date-control input{width:125px}.week-expanded .week-toolbar{display:inline-flex;margin:0 8px 4px 0}.week-expanded .week-toolbar>.section-caption{display:none}.week-expanded .week-controls{display:inline-flex;margin:0 0 4px;gap:6px}.week-expanded .week-controls button,.week-expanded .segmented button{font-size:11px;padding:7px}.week-expanded .week-controls select{padding:4px;min-height:32px;max-width:110px}.week-expanded .grid-scroll{max-height:calc(100dvh - 158px)}
}

/* Expanded Week is the page itself, not a nested scrolling panel. */
@media(min-width:651px){.mobile-brand{display:none}.topbar>.mobile-brand+span{border:0;padding-left:0}}
.week-expanded .topbar,.week-expanded .page-heading,.week-expanded .week-toolbar,.week-expanded .week-jump,.week-expanded .page-footer,.week-expanded main>.section-caption,.week-expanded main>.notice{display:none!important}
.week-expanded main{max-width:none;padding:8px!important;margin:0}.week-expanded .week-controls{display:flex;margin:0 0 8px;padding:0;min-height:44px}.week-expanded .grid-scroll{max-height:none!important;overflow:visible!important;margin:0!important;max-width:none!important}.week-expanded .week-grid{min-height:calc((100dvh - 70px) / 1);}.week-expanded .grid-slot,.week-expanded .grid-corner{position:static}
.mobile-expanded .sidebar,.mobile-expanded .mobile-nav{display:none!important}.mobile-expanded .shell{margin:0!important}.mobile-expanded .week-controls{padding-top:env(safe-area-inset-top)}.mobile-expanded .week-grid{min-width:850px;grid-template-columns:65px repeat(6,minmax(125px,1fr))}
@media print{
 @page{size:A4 landscape;margin:0}
 html,body,#app,.shell,.week-expanded .shell,main{min-height:0!important;height:auto!important;margin:0!important;padding:0!important;background:white!important}
 main>:not(.grid-scroll),.week-expanded .page-heading,.week-expanded .page-heading h1,.week-expanded .page-heading p{display:none!important}
 .grid-scroll,.week-expanded .grid-scroll{margin:6mm!important;width:285mm!important;max-height:none!important;overflow:visible!important;border:0!important}
 .week-grid,.week-expanded .week-grid{width:285mm!important;height:196mm!important;min-height:0!important;min-width:0!important;zoom:1!important;grid-template-columns:40px repeat(6,minmax(0,1fr))!important;grid-template-rows:28px repeat(7,minmax(0,1fr))!important;break-inside:avoid;page-break-inside:avoid}
 .grid-lesson{min-height:0;overflow:hidden}.grid-lesson strong{font-size:9px!important;line-height:1.2}.grid-lesson small{font-size:7px!important;line-height:1.15}
}

@media print{.week-expanded main{padding:0!important;margin:0!important}.week-grid,.week-expanded .week-grid{height:190mm!important}}

/* Expanded mobile zoom is contained, preventing WebView viewport auto-scaling. */
@media screen{
 body.mobile-expanded{overflow:hidden;width:100%;height:100dvh}
 .mobile-expanded .shell{min-height:0!important;height:100dvh;width:100%}
 .mobile-expanded main{height:100%;width:100%;display:flex;flex-direction:column;overflow:hidden}
 .mobile-expanded .week-controls{flex:none;flex-wrap:nowrap;gap:8px;min-width:0}
 .mobile-expanded .grid-scroll{flex:1;min-height:0;width:100%;overflow:auto!important;overscroll-behavior:contain;touch-action:none}
 .mobile-expanded .week-grid{width:850px;min-width:850px;min-height:0!important;grid-template-columns:65px repeat(6,minmax(0,1fr));grid-template-rows:55px repeat(7,minmax(118px,auto))}
 .zoom-slider{flex:1;min-width:0;font-size:12px!important}.zoom-slider input[type=range]{width:100%;min-width:50px;min-height:36px;padding:0;touch-action:pan-x}.zoom-slider output{font-variant-numeric:tabular-nums;min-width:36px}
 .mobile-expanded .week-controls button{white-space:nowrap;padding:8px;font-size:12px}
}
@media screen{.mobile-expanded .week-grid{grid-template-rows:40px repeat(7,minmax(70px,auto))}}
@media screen{
 body.mobile-expanded,.mobile-expanded .shell{height:var(--visual-height,100vh)}
 .week-zoom-stage{position:relative;min-width:100%;min-height:100%}
 .week-zoom-stage>.week-grid{top:0;left:0}
}
@media print{.week-zoom-stage{position:static!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important}.week-grid{transform:none!important;position:static!important}}

/* Full-screen setup and native dialog scroll containment. */
html.modal-open{overflow:hidden;overscroll-behavior:none}
dialog{overscroll-behavior:contain;touch-action:pan-y}
dialog::backdrop{touch-action:none}
body.onboarding #app{visibility:hidden}
dialog.onboarding-flow{position:fixed;inset:0;margin:0;border:0;border-radius:0;width:100%;max-width:none;height:var(--visual-height,100dvh);max-height:none;padding:clamp(20px,5vw,64px);box-shadow:none;overflow-y:auto;background:var(--bg,#f4f7fc)}
dialog.onboarding-flow::backdrop{background:#f4f7fc;backdrop-filter:none}
dialog.onboarding-flow>*{max-width:760px;margin-left:auto;margin-right:auto}
dialog.onboarding-flow .import-records{max-height:none}
.study-panel{padding:18px;border:1px solid var(--line);background:#eee8fa;margin:16px 0 24px;display:flex;gap:14px;flex-wrap:wrap;align-items:center;justify-content:space-between}
.study-panel p{font-size:13px;line-height:1.6;margin:6px 0}.study-panel output{font-size:22px;font-variant-numeric:tabular-nums}.study-panel>.section-caption{flex-basis:100%}
.study-summary{padding:14px 0;border-bottom:1px solid var(--line);display:flex;gap:8px;flex-wrap:wrap;justify-content:space-between}.study-summary p{flex-basis:100%;font-size:13px}
@media(max-width:650px){.study-panel .primary-actions{flex-wrap:wrap}.mobile-brand strong{font-size:13px}}
@media print{.study-panel{display:none}}
.today-heading{flex-wrap:wrap}.today-heading>.study-panel{flex-basis:100%;margin:0}.study-label-short{display:none}
@media(max-width:650px){
  .today-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;margin-bottom:16px;align-items:center}
  .today-heading-copy{display:contents}.today-heading-copy>.eyebrow{grid-column:1/-1;grid-row:1;margin:0;font-size:9px;letter-spacing:1px}
  .today-heading-copy>h1{grid-column:1;grid-row:2;font-size:30px;letter-spacing:-1px}.today-heading-copy>p{display:none}
  main:has(>.today-heading){padding-top:20px}
  .today-heading>.date-control{grid-column:1/-1;grid-row:3;justify-self:stretch;margin-top:0;flex-wrap:nowrap;width:100%;gap:0}
  .today-heading>.date-control input{width:116px;min-width:0;flex:1}
  .today-heading>.date-control button{flex-shrink:0;min-height:40px}
  .today-heading>.date-control .subtle{padding:8px 6px}
  .today-heading>.study-panel{grid-column:2;grid-row:2;padding:0;border:0;background:none;gap:0;min-width:0}
  .today-heading>.study-panel:not(.is-active)>div:first-child{display:none}
  .study-label-long{display:none}.study-label-short{display:inline}
  .today-heading .study-panel .primary-actions{gap:2px;flex-wrap:nowrap}
  .today-heading .study-panel button{min-height:44px;padding:8px 10px;font-size:12px}
  .today-heading .study-panel [data-study=stats]{min-width:40px;font-size:20px;padding:6px}
  .today-heading:has(.study-panel.is-active)>.date-control{grid-row:4}
  .today-heading>.study-panel.is-active{grid-column:1/-1;grid-row:3;display:flex;padding:8px 10px;background:#eee8fa;gap:6px 10px}
  .study-panel.is-active>div:first-child{flex:1;min-width:80px}.study-panel.is-active strong{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .today-heading .study-panel.is-active button{padding:6px}.today-heading .study-panel.is-active [data-study=stats]{min-width:32px}
  .study-panel.is-active .study-running-state{display:none}
  .today-heading .study-panel.is-active p{font-size:11px;margin:0}.study-panel.is-active output{font-size:18px}
  .study-panel.is-active>.section-caption,.study-panel.is-active>.notice{flex-basis:100%;margin:0}
  .now-panel{padding:12px 14px 0;margin-bottom:16px}.now-top{margin-bottom:6px;font-size:9px;letter-spacing:1px}.now-symbol{display:none}
  .now-panel h2{font-size:18px;line-height:1.25;letter-spacing:-.2px}.now-panel>p{font-size:11px;margin:6px 0 8px}
  .next-line{padding:8px 0;gap:6px;font-size:11px;line-height:1.4}
  .day-column>.section-heading{gap:6px;margin-bottom:12px}
  .day-column>.section-heading h2{font-size:17px;white-space:nowrap}
  .day-column>.section-heading .primary-actions{gap:4px;flex-shrink:0;flex-wrap:nowrap}
  .day-column>.section-heading .secondary{font-size:11px;padding:8px;white-space:nowrap}
}
