:root{--ink:#1d1d1f;--muted:#6e6e73;--soft:#f5f5f7;--line:#e5e5e9;--paper:#fff;--success:#32664b;--warning:#835d21;--error:#aa342c;--radius:18px;--viewport-height:100dvh;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--soft);font-synthesis:none;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}html,body{margin:0;width:100%;min-height:100%;overscroll-behavior-y:none}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;border:0;background:none}button:disabled{cursor:default;opacity:.38}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #73737b;outline-offset:3px}input,select,textarea{font-size:16px;width:100%;border:1px solid var(--line);border-radius:14px;background:var(--soft);padding:16px;min-height:54px;outline-offset:2px}input[type=time]{min-height:60px;font-size:22px;letter-spacing:-.5px;-webkit-appearance:none;appearance:none;text-align:left}input[type=checkbox]{width:21px;height:21px;min-height:21px;flex:0 0 21px;margin:0;accent-color:var(--ink)}input[type=number]{appearance:textfield;-moz-appearance:textfield}input::-webkit-inner-spin-button{display:none}label{display:block}label.field{font-size:13px;font-weight:600;margin-bottom:18px}label.field input,label.field select,label.field textarea{margin-top:8px;font-weight:400}.check{display:flex;align-items:flex-start;gap:11px;font-size:13px;line-height:1.45;padding:13px 0}.check small{display:block;color:var(--muted);font-size:12px}.check input{margin-top:1px}h1,h2,p{margin:0}h1{font-size:34px;font-weight:650;letter-spacing:-1.2px;line-height:1.12}h2{font-size:21px;letter-spacing:-.5px;font-weight:650}p{line-height:1.5}.muted,.subtext{color:var(--muted)}small{font-size:12px;line-height:1.4}.brandbar{max-width:1060px;height:70px;margin:0 auto;display:flex;align-items:center;gap:10px;padding:0 32px;font-size:13px;font-weight:600}.brand-note{margin-left:auto;font-weight:400;font-size:12px;color:var(--muted)}.brand-mark{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:var(--ink);color:#fff;font-family:Georgia,serif;font-style:italic;font-size:22px;padding-bottom:3px}.brand-mark.large{width:68px;height:68px;font-size:48px;border-radius:22px;margin-bottom:30px}
#app{width:100%;min-width:0;max-width:540px;margin:18px auto 30px;height:calc(var(--viewport-height) - 118px);max-height:850px;min-height:470px}.screen{height:100%;display:flex;flex-direction:column;background:var(--paper);border-radius:28px;overflow:hidden;box-shadow:0 8px 40px #16161606;border:1px solid #e5e5e966}.screen-header{flex:none;padding:19px 30px 0}.screen-top{display:flex;align-items:center;justify-content:space-between;height:34px;gap:10px}.back-button,.text-button{padding:8px 0;min-height:44px;color:var(--muted);font-size:13px}.back-button{min-width:54px;text-align:left}.back-button span{font-size:20px;vertical-align:-1px;margin-right:4px}.eyebrow{text-transform:uppercase;font-size:10px;font-weight:650;letter-spacing:1.6px;color:var(--muted)}.close-button{min-width:50px;min-height:40px;font-size:12px;color:var(--muted)}.step-dots{display:flex;gap:5px;width:72px;margin:7px auto 0}.step-dots i{height:3px;border-radius:3px;background:var(--line);flex:1}.step-dots .active{background:var(--ink)}.workflow-form{display:flex;flex-direction:column;flex:1;min-height:0}.screen-body{padding:26px 30px 10px;display:flex;flex-direction:column;gap:20px;flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin}.screen-body> :not(.scroll-region):not(.subject-list):not(.day-work){flex-shrink:0}.screen-title .subtext{margin-top:12px;font-size:14px}.screen-title .context{display:inline-block;font-size:11px;color:var(--muted);margin-bottom:10px;letter-spacing:.2px}.screen-footer{flex:none;padding:14px 30px 25px;border-top:1px solid transparent;background:var(--paper)}.screen-footer:has(.selection-summary){border-top-color:var(--line)}.primary,.secondary,.choice,.list-row,.upload-button{width:100%;min-height:52px;border-radius:14px;font-size:14px;font-weight:600;display:flex;justify-content:center;align-items:center;gap:9px;transition:background .12s,border-color .12s,transform .12s}.primary{color:#fff;background:var(--ink);border:1px solid var(--ink)}.primary:not(:disabled):active{transform:scale(.985)}.secondary{background:var(--soft);border:1px solid transparent;color:var(--ink)}.footer-link{display:block;text-align:center;width:100%;min-height:40px;font-size:12px;color:var(--muted);padding:12px 0 0}.button-arrow{margin-left:auto;font-weight:400;font-size:18px}.primary .button-arrow{margin-left:8px}.choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.choices.three{grid-template-columns:repeat(3,minmax(0,1fr))}.choice{background:var(--soft);border:1.5px solid transparent;min-height:78px;font-size:23px;font-weight:600;letter-spacing:-.5px;flex-direction:column;gap:4px}.choice small{font-size:11px;font-weight:400;letter-spacing:0;color:var(--muted)}.choice.selected{border-color:var(--ink);background:var(--ink);color:#fff}.choice.selected small{color:#d2d2d7}.choice.compact{min-height:54px;font-size:16px}.divider-text{font-size:12px;text-align:center;color:var(--muted);margin:0}.inline-field{position:relative}.inline-field .suffix{position:absolute;right:17px;bottom:18px;font-size:13px;color:var(--muted)}.inline-field input{padding-right:65px}.hint{font-size:12px;color:var(--muted);line-height:1.5}.small-note{font-size:11px;line-height:1.5;color:var(--muted)}.footnote{text-align:center;font-size:11px;color:var(--muted);margin-top:12px}.quiet-card{background:var(--soft);padding:16px;border-radius:16px;font-size:13px}.quiet-card .hint{margin-top:5px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.stack{display:flex;flex-direction:column;gap:10px}.list-row{padding:15px 16px;min-height:64px;justify-content:flex-start;text-align:left;border:1.5px solid var(--line);background:#fff;border-radius:16px}.list-row .row-main{flex:1;min-width:0}.list-row strong{font-size:14px;font-weight:600;line-height:1.35;display:block}.list-row small{display:block;color:var(--muted);margin-top:4px;font-weight:400}.list-row.selected{border-color:var(--ink);background:var(--soft)}.tick{width:20px;height:20px;border-radius:50%;border:1.5px solid #c9c9ce;display:grid;place-items:center;flex:0 0 20px;font-size:12px}.selected .tick{background:var(--ink);border-color:var(--ink);color:white}.pill{font-size:10px;padding:5px 8px;border-radius:7px;background:var(--soft);color:var(--muted);white-space:nowrap}.pill.dark{background:var(--ink);color:white}.success{color:var(--success)}.warning{background:#faf5eb;color:var(--warning);padding:13px 14px;border-radius:12px;font-size:12px;line-height:1.5}.error-text{color:var(--error)}.icon-circle{width:54px;height:54px;background:var(--soft);border-radius:18px;display:grid;place-items:center;font-size:26px;flex:none}.welcome-body{justify-content:center;gap:26px;padding-bottom:25px}.welcome-title{font-size:43px;letter-spacing:-1.8px;line-height:1.08}.welcome-sub{font-size:16px;color:var(--muted);max-width:330px}.welcome-caption{font-size:11px;color:var(--muted);line-height:1.5}.search-box{position:relative}.search-box input{padding-left:42px;background:var(--soft);border-color:transparent}.search-icon{position:absolute;left:16px;top:17px;font-size:19px;color:var(--muted)}.scroll-region,.subject-list{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;flex:1}.subject-list{display:flex;flex-direction:column;gap:7px;padding:2px 3px 3px 0}.subject-list .list-row{flex-shrink:0;min-height:64px;padding:12px 14px}.list-section{font-size:10px;letter-spacing:1px;text-transform:uppercase;font-weight:600;color:var(--muted);padding:10px 2px 5px}.list-empty{font-size:13px;color:var(--muted);padding:22px 3px;line-height:1.5}.weekday-list{display:flex;flex-direction:column;gap:7px}.weekday-list .list-row{min-height:48px;padding:10px 15px}.activity-chips{display:flex;gap:8px;flex-wrap:wrap}.activity-chips button{border:1px solid var(--line);border-radius:10px;padding:12px;min-height:44px;font-size:12px}.preview-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stat{padding:15px;border-radius:16px;background:var(--soft)}.stat strong{display:block;font-size:24px;font-weight:600;letter-spacing:-.7px}.stat small{color:var(--muted);font-size:11px}.time-row{padding:12px 3px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);font-size:13px}.time-row:last-child{border-bottom:0}.time-row strong{font-size:12px}.time-row .muted{font-size:12px}.time-row.non-teaching{color:var(--muted)}.time-row.short-period strong{color:var(--warning)}.time-row small{display:block;margin-top:3px}.upload-button{min-height:118px;flex-direction:column;background:var(--soft);border:1px dashed #c8c8ce;cursor:pointer;text-align:center;padding:16px}.upload-button .upload-symbol{font-size:27px;font-weight:400}.upload-button small{color:var(--muted);font-weight:400}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.name-preview{margin:0;padding:0;list-style:none;counter-reset:names}.name-preview li{padding:10px 2px;border-bottom:1px solid var(--line);font-size:13px;counter-increment:names;display:flex;gap:12px}.name-preview li:before{content:counter(names,decimal-leading-zero);font-size:11px;color:var(--muted);min-width:22px;line-height:19px}.inline-actions{display:flex;gap:10px}.inline-actions>*{flex:1}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.section-heading h2{font-size:15px}.section-heading small{color:var(--muted);font-size:11px}.day-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.day-tab{min-height:44px;border:1px solid var(--line);border-radius:12px;font-size:12px;position:relative}.day-tab.current{background:var(--ink);border-color:var(--ink);color:#fff}.day-tab .day-dot{display:block;width:3px;height:3px;background:currentColor;border-radius:50%;margin:3px auto 0}.day-work{display:flex;flex-direction:column;gap:15px;flex:1;min-height:0}.period-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;flex:none}.period{min-height:57px;border:1px solid var(--line);background:#fff;border-radius:12px;padding:8px 3px;text-align:center}.period strong{display:block;font-size:13px;font-weight:600}.period small{display:block;font-size:10px;margin-top:4px;color:var(--muted);letter-spacing:-.15px}.period.selected{background:var(--ink);border-color:var(--ink);color:#fff}.period.selected small{color:#e0e0e3}.period.reserved{background:var(--soft);border-color:transparent;opacity:.65}.period.occupied{background:#ededf0;border-color:#e0e0e5;opacity:.75}.period .nonteach{font-size:10px}.selection-summary{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:12px;margin-bottom:13px}.selection-summary strong{font-size:13px}.selection-summary small{font-size:11px;color:var(--muted)}.entry-list{display:flex;flex-direction:column;gap:8px}.entry{padding:13px 14px;border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;gap:12px;text-align:left;width:100%;min-height:66px;flex-shrink:0}.entry-label{background:var(--soft);border-radius:8px;padding:8px 7px;font-size:11px;white-space:nowrap;min-width:40px;text-align:center}.entry strong{display:block;font-size:12px;line-height:1.4}.entry small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.entry .row-main{flex:1;min-width:0}.empty-note{padding:14px;text-align:center;color:var(--muted);font-size:12px;background:var(--soft);border-radius:12px;line-height:1.5}.dashboard-card{min-height:100px}.dashboard-card .num{font-size:24px;font-weight:500;letter-spacing:-1px;width:32px;flex:none}.section-tag{font-size:10px;color:var(--muted);letter-spacing:1.4px;text-transform:uppercase}.notice{position:fixed;z-index:50;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:calc(100% - 32px);width:440px;background:var(--ink);color:white;font-size:13px;line-height:1.5;padding:16px 45px 16px 18px;border-radius:16px;box-shadow:0 8px 30px #0003}.notice button{position:absolute;right:9px;top:9px;color:inherit;min-width:32px;min-height:32px;font-size:19px}.notice[hidden]{display:none}.loading{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);font-size:14px}.busy .primary{opacity:.5;pointer-events:none}dialog{border:0;border-radius:22px;padding:27px;width:calc(100% - 40px);max-width:430px;box-shadow:0 20px 90px #0003}dialog::backdrop{background:#0005;backdrop-filter:blur(3px)}dialog p{font-size:14px;color:var(--muted);margin-top:14px}.dialog-actions{display:flex;gap:10px;margin-top:25px}.dialog-actions button{flex:1}.year-note{font-size:10px;text-align:center;color:var(--muted)}
@media (hover:hover){.list-row:not(:disabled):hover,.period:not(:disabled):not(.selected):hover{border-color:#939398}.secondary:hover{background:#eaeaee}.text-button:hover,.footer-link:hover,.back-button:hover{color:var(--ink)}}
@media (max-width:600px){html,body{background:#fff}.brandbar{display:none}#app{height:var(--viewport-height);min-height:0;max-height:none;max-width:none;margin:0}.screen{border:0;border-radius:0;box-shadow:none}.screen-header{padding:calc(12px + env(safe-area-inset-top)) 24px 0}.screen-body{padding:22px 24px 8px;gap:19px}.screen-footer{padding:12px 24px calc(15px + env(safe-area-inset-bottom))}h1{font-size:33px}.welcome-title{font-size:41px}.period-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.notice{bottom:max(15px,env(safe-area-inset-bottom))}.brand-mark.large{margin-bottom:18px}.dashboard-card{min-height:95px}}
@media (max-height:740px){.screen-body{gap:15px;padding-top:17px}.screen-title .subtext{margin-top:9px;font-size:13px}h1{font-size:29px}.screen-header{padding-top:10px}.screen-footer{padding-top:10px;padding-bottom:max(12px,env(safe-area-inset-bottom))}.choice{min-height:70px}.choice.compact{min-height:49px}.period-grid{gap:6px;grid-template-columns:repeat(4,minmax(0,1fr))}.period{min-height:53px}.period small{font-size:9px}.screen-body.day-body{gap:12px}.day-tabs{gap:5px}.day-tab{min-height:40px}.day-work{gap:12px}.screen-body>label.field{margin-bottom:10px}.welcome-body{gap:20px}.welcome-title{font-size:37px}}
@media (max-width:350px){.screen-body{padding-left:18px;padding-right:18px}.screen-header{padding-left:18px;padding-right:18px}.screen-footer{padding-left:18px;padding-right:18px}h1{font-size:27px}.period-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.period{min-height:46px;padding-top:6px;padding-bottom:6px}.period small{font-size:9px}.screen-body.day-body .screen-title .subtext{display:none}.weekday-list .list-row{min-height:45px}.list-row strong{font-size:13px}.check{font-size:12px}.choice{min-height:63px}}
@media (max-height:500px){.screen-body{overflow-y:auto;min-height:90px}.screen-header{padding-top:4px}.screen-top{height:28px}.step-dots{display:none}.screen-footer{padding-top:8px;padding-bottom:8px}.screen-footer .primary{min-height:44px}.footer-link{padding-top:6px;min-height:30px}h1{font-size:26px}.screen-body{padding-top:12px}.screen-body .screen-title{flex-shrink:0}.period-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Short phones retain the same controls without forcing page scrolling. */
@media (max-height:640px){.screen-body{gap:12px;padding-top:12px}.screen-body>label.field{margin-bottom:0}.check{padding:7px 0}.screen-title .context{margin-bottom:8px}.screen-title .subtext{margin-top:8px}}
/* Status messages never cover Next or the day-completion action. */
.notice{top:max(12px,env(safe-area-inset-top));bottom:auto}
@media (min-height:741px){.period small{font-size:11px}}

.compact-summary .row-main{display:flex;align-items:center;justify-content:space-between;gap:8px}.compact-summary .list-row{min-height:43px;padding:9px 12px}.compact-summary .list-row small{font-size:11px;margin:0;white-space:nowrap}.compact-summary .list-row strong{font-size:12px}
@media(max-height:640px){.compact-summary{gap:5px}.compact-summary .list-row{min-height:38px;padding:7px 10px}.compact-summary .pill{font-size:9px;padding:4px 6px}}
@media(max-height:640px){.compact-summary .list-row{min-height:36px;padding:6px 10px}}

/* 0.3.0 — summary-first timetable. Only long lists scroll, not the whole day. */
.screen-body.day-summary-body{gap:20px}
.day-summary-content{display:flex;flex-direction:column;gap:16px;padding:2px 2px 5px;}
.day-summary-content>*{flex-shrink:0}
.lesson-card{min-height:96px;padding:16px 15px;gap:13px;align-items:center}
.lesson-card .entry-label{min-width:64px;padding:11px 8px;font-size:12px;font-weight:500}
.lesson-card strong{font-size:15px;line-height:1.35;overflow-wrap:anywhere}
.lesson-card .entry-subject{display:block;font-size:13px;line-height:1.4;margin-top:3px;overflow-wrap:anywhere}
.lesson-card small{font-size:12px;margin-top:5px;font-variant-numeric:tabular-nums}
.entry-chevron{color:var(--muted);font-size:24px;font-weight:400;flex:none}
.add-lesson-button{margin-top:0;min-height:52px;background:var(--soft);border:1px solid transparent}
.add-lesson-button>span{font-size:20px;font-weight:400}
.day-summary-hint{text-align:center;color:var(--muted);font-size:12px;line-height:1.5;padding:0 8px}
.review-state{font-size:11px;color:var(--muted);text-align:center;margin:0 0 12px;line-height:1.5}
.day-complete-button{font-size:13px;line-height:1.4;padding:12px 10px;white-space:normal}
.day-empty{text-align:center;padding:29px 18px 25px;background:var(--soft);border-radius:18px}
.day-empty h2{font-size:18px;letter-spacing:-.3px;line-height:1.3}
.day-empty p{max-width:300px;margin:12px auto 0;color:var(--muted);font-size:13px;line-height:1.5}
.empty-rule{display:block;width:34px;height:3px;border-radius:2px;background:#d2d2d7;margin:0 auto 19px}
.edit-field{display:flex;gap:14px;align-items:center;justify-content:space-between;text-align:left;width:100%;min-height:114px;padding:20px 18px;border:1px solid var(--line);border-radius:16px}
.edit-field .row-main{min-width:0;flex:1}
.edit-field strong{display:block;font-size:19px;letter-spacing:-.4px;margin-top:8px;overflow-wrap:anywhere}
.edit-field small{display:block;color:var(--muted);font-size:13px;margin-top:5px;overflow-wrap:anywhere}
.edit-field-action{font-size:12px;color:var(--muted);flex:none}
.edit-field-action span{font-size:19px;vertical-align:-1px;margin-left:3px}
.lesson-edit-fields{gap:12px}
.lesson-edit-body~.screen-footer .footer-link{padding:0 0 12px;margin:0 0 6px}
.period-picker{padding:3px;flex:1;min-height:0}
.period-picker .period-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-content:start}
.period-picker .period{min-height:66px;padding:10px 4px}
.period-picker .period strong{font-size:14px}
.period-picker .period small{font-size:11px;letter-spacing:-.2px}
.period-picker .period .nonteach{font-size:11px;overflow-wrap:anywhere}
.picker-legend{font-size:12px;line-height:1.5}
.selection-summary{flex-wrap:wrap;row-gap:4px}
.week-review-list .list-row{padding:13px 14px;min-height:69px;flex-shrink:0;justify-content:space-between;text-align:left}
.week-review-list .row-main{min-width:0;flex:1}
.week-review-list .pill{font-size:10px}
@media(hover:hover){.lesson-card:hover,.edit-field:hover{border-color:#b1b1b7;background:#fafafa}}
@media(max-height:740px){.screen-body.day-summary-body{gap:16px}.day-summary-content{gap:13px}.lesson-card{min-height:85px;padding:13px 12px}.period-picker .period{min-height:60px}.day-empty{padding:23px 16px}.edit-field{min-height:102px;padding:15px 16px}}
@media(max-width:350px){.lesson-card{gap:10px}.lesson-card .entry-label{min-width:53px;padding:9px 6px;font-size:11px}.lesson-card strong{font-size:14px}.lesson-card .entry-subject{font-size:12px}.period-picker .period small{font-size:10px}.period-picker .period{min-height:57px}.day-complete-button{font-size:12px}}
@media(max-height:590px){.day-tabs .day-tab{min-height:44px}.period-picker .period{min-height:56px}.picker-legend{font-size:11px}.lesson-edit-body .hint{font-size:12px}.week-review-list .list-row{min-height:60px}}
.selection-copy strong,.selection-copy small{display:block}
.selection-copy small{margin-top:3px}
.selection-summary [data-action=period-clear]{min-width:44px;text-align:right;padding:8px 2px}
