:root{--bg:#f3f6fa;--surface:#fff;--ink:#172438;--muted:#7f8fa5;--line:#e6edf4;--blue:#258bda;--blue-soft:#eaf5ff;--green:#16855b;--green-soft:#e5f6ee;--red:#db4c59;--red-soft:#ffedf0;--amber:#b97412;--amber-soft:#fff3dc;--shadow:0 7px 22px rgba(18,44,70,.045);--radius:17px}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.48;cursor:default}a{color:var(--blue)}#app{max-width:780px;margin:0 auto;min-height:100vh;min-height:100dvh}.shell{padding:18px 18px calc(101px + env(safe-area-inset-bottom));max-width:650px;margin:auto}h1{font-size:25px;line-height:1.15;margin:9px 0 4px;font-weight:750;letter-spacing:-.6px}h2{font-size:17px;line-height:1.24;margin:26px 0 12px;letter-spacing:-.2px}h3{font-size:14px;margin:0 0 9px}p{margin:0}.muted{color:var(--muted)}.small{font-size:12px}.tiny{font-size:11px}.header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 23px}.section-sub{font-size:12px;color:var(--muted)}.pill{padding:5px 11px;border-radius:50px;font-size:11px;font-weight:650;background:var(--blue-soft);color:var(--blue);white-space:nowrap}.card{background:var(--surface);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}.card+.card{margin-top:9px}.stack{display:grid;gap:10px}.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.row.wrap{flex-wrap:wrap}.grow{flex:1;min-width:0}.form-row{margin:13px 0}.form-row label,.fieldlabel{font-weight:650;font-size:12px;margin:0 0 7px;display:block}.field{width:100%;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:12px 13px;color:var(--ink);min-height:44px;outline:none}.field:focus{border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-soft)}.field[type=date]{min-width:0}textarea.field{resize:vertical;min-height:76px}.btn{display:inline-flex;align-items:center;justify-content:center;min-height:43px;border:0;border-radius:12px;padding:10px 15px;background:var(--blue);color:#fff;font-weight:700;gap:6px;transition:transform .12s,background .12s}.btn:active{transform:scale(.985)}.btn.secondary{background:var(--blue-soft);color:var(--blue)}.btn.quiet{background:var(--surface);color:var(--ink)}.btn.danger{background:var(--red-soft);color:var(--red)}.btn.full{width:100%}.btn.slim{padding:7px 12px;min-height:34px;font-size:12px}.nav{position:fixed;z-index:10;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--line);padding:7px 12px max(9px,env(safe-area-inset-bottom));display:flex;justify-content:space-between;gap:5px;max-width:650px;margin:auto}.nav button{border:none;background:none;color:var(--muted);padding:7px 5px;font-size:10px;font-weight:600;border-radius:13px;flex:1;display:grid;place-items:center;gap:0;min-width:0}.nav button .ico{font-size:21px;line-height:24px}.nav button.active{color:var(--blue);background:var(--blue-soft)}.kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.kpi{padding:14px;border-radius:17px;background:var(--surface);min-height:94px}.kpi .count{font-size:30px;line-height:1.2;font-weight:750;margin-top:10px}.kpi .dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px}.green{color:var(--green)}.red{color:var(--red)}.amber{color:var(--amber)}.status{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:5px 10px;font-size:11px;font-weight:650;border-radius:22px;white-space:nowrap}.status.present{background:var(--green-soft);color:var(--green)}.status.late{background:var(--amber-soft);color:var(--amber)}.status.absent{background:var(--red-soft);color:var(--red)}.status.pending,.status.none{background:#eef1f5;color:var(--muted)}.status.verified{background:var(--green-soft);color:var(--green)}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;flex:0 0 auto;background:#eaf1fa;color:#24466a;font-weight:700;font-size:12px}.student-row{display:flex;align-items:center;gap:10px;min-height:64px;width:100%;padding:11px 12px;background:#fff;border:none;text-align:left;border-radius:14px;color:var(--ink)}.student-row .name{font-size:13px;font-weight:700}.student-row .sub{color:var(--muted);font-size:11px;margin-top:4px}.student-row .status{margin-left:auto}.search{margin:13px 0}.filters{display:flex;gap:7px;overflow:auto;scrollbar-width:none;margin:12px 0}.filters::-webkit-scrollbar{display:none}.filter{border:none;border-radius:40px;background:#fff;color:var(--muted);padding:9px 14px;font-size:12px;white-space:nowrap}.filter.active{background:var(--blue-soft);color:var(--blue);font-weight:650}.lesson{border-radius:17px;background:var(--surface);padding:17px;margin:10px 0}.lesson-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.lesson-title{font-size:16px;font-weight:750}.lesson-time{font-size:12px;color:var(--muted);margin-top:4px}.lesson-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:15px 0 8px}.lesson-actions .btn{padding:10px 2px;font-size:11px;font-weight:650}.lesson-actions .sel{box-shadow:0 0 0 2px var(--blue) inset}.progress{height:11px;background:#eef1f5;border-radius:50px;overflow:hidden;margin-top:11px}.progress b{display:block;background:var(--blue);height:100%;border-radius:50px}.split{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:16px 0}.subtle{border:none;border-top:1px solid var(--line);margin:15px 0}.empty{border-radius:17px;padding:28px 18px;color:var(--muted);text-align:center;background:#fff;font-size:13px}.loading{text-align:center;padding:18vh 20px;color:var(--muted)}.spinner{width:28px;height:28px;display:inline-block;border:3px solid #d6e8f7;border-top-color:var(--blue);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.bar{height:8px;border-radius:20px;background:#eef1f5;overflow:hidden;margin-top:9px}.bar i{display:block;background:var(--blue);height:100%;border-radius:20px}.stat-subject{background:#fff;padding:12px 13px;border-radius:12px;margin:6px 0}.overlay{position:fixed;z-index:25;inset:0;background:rgba(23,36,56,.42);display:flex;justify-content:center;align-items:flex-end}.sheet{width:100%;max-width:650px;background:#fff;border-radius:23px 23px 0 0;max-height:88vh;overflow-y:auto;padding:16px 20px calc(24px + env(safe-area-inset-bottom))}.grab{width:43px;height:4px;border-radius:12px;background:#c5d4e0;margin:0 auto 20px}.choice{border:1px solid var(--line);border-radius:12px;min-height:49px;background:var(--bg);padding:12px;text-align:left;width:100%;margin-bottom:7px;color:var(--ink);font-weight:600}.choice.active{background:var(--blue-soft);border-color:var(--blue)}.alert{background:var(--blue-soft);color:#20547f;padding:11px;border-radius:12px;font-size:12px;margin:12px 0}.alert.red{background:var(--red-soft);color:var(--red)}#toast{position:fixed;bottom:95px;left:50%;transform:translateX(-50%);z-index:40;max-width:90vw;min-width:min(310px,80vw);padding:12px 16px;background:#263b52;color:#fff;border-radius:13px;opacity:0;pointer-events:none;transition:opacity .2s;font-size:13px;text-align:center}#toast.visible{opacity:1}.table-wrap{overflow:auto;max-width:100%;background:#fff;border-radius:13px}.table-wrap table{border-collapse:collapse;width:100%;font-size:12px}.table-wrap td,.table-wrap th{padding:11px 13px;border-bottom:1px solid var(--line);text-align:left}.table-wrap th{background:var(--blue-soft)}.muted-link{border:none;background:none;color:var(--blue);font-size:12px;font-weight:650;padding:8px}.note{font-size:11px;color:var(--muted);line-height:1.45}.statcards{display:grid;grid-template-columns:1fr 1fr;gap:9px}.bordered{border:1px solid var(--line)}
@media(min-width:700px){.nav{border-radius:16px 16px 0 0}.shell{padding-top:28px}}@media(prefers-color-scheme:dark){:root{--bg:#111b28;--surface:#1e2a3a;--ink:#f1f5f9;--muted:#9aaac0;--line:#344357;--blue-soft:#193c5a;--green-soft:#163f33;--red-soft:#4a2533;--amber-soft:#47371d;--shadow:none}.field,.filter{background:var(--surface)}.student-row,.lesson,.stat-subject,.kpi,.empty,.sheet{background:var(--surface)}.avatar{background:#33445c;color:#dceafe}.status.pending,.status.none{background:#384659}.progress,.bar{background:#3a4656}.alert{background:#193c5a;color:#c2e2ff}.alert.red{background:#4a2533;color:#ffb5bf}.choice{background:#283647}.choice.active{background:#193c5a}.pill{background:var(--blue-soft)}}

/* HaPareBot / Figma design system 2026.10 — append after legacy styles. */
:root,
html[data-theme="light"]{
  --bg:#f3f6fa;--surface:#fff;--ink:#172438;--muted:#8190a5;
  --line:#e6ecf3;--blue:#258bda;--blue-soft:#eaf5ff;
  --green:#16855b;--green-soft:#e7f7f0;--red:#db4c59;--red-soft:#feedf0;
  --amber:#b97412;--amber-soft:#fff3db;--radius:17px;--shadow:none;
  --surface-alt:#f3f6fa;--nav-active:#eaf5ff;--track:#edf1f6;
}
html[data-theme="dark"]{
  --bg:#111b28;--surface:#1e2a3a;--ink:#eff5fd;--muted:#9dacc1;
  --line:#354457;--blue:#68baf6;--blue-soft:#193c5a;
  --green:#5ed0a3;--green-soft:#164135;--red:#ff8897;--red-soft:#482936;
  --amber:#ffcf77;--amber-soft:#4a391e;--surface-alt:#27364a;
  --nav-active:#193c5a;--track:#3b4a5e;
}
body{background:var(--bg);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;font-size:14px;line-height:1.45;overscroll-behavior-y:contain}
#app{max-width:650px}.shell{padding:27px 20px calc(111px + env(safe-area-inset-bottom));max-width:650px;min-height:100dvh}
h1{font-weight:750;font-size:25px;line-height:1.18;letter-spacing:-.6px;margin:0 0 4px}
h2{font-size:17px;letter-spacing:-.35px;font-weight:760;margin:26px 0 12px}
h3{font-size:14px;font-weight:750;line-height:1.35}
.header{margin:4px 0 20px;align-items:flex-start;gap:8px}.header-copy{min-width:0;flex:1}
.header .section-sub{font-size:12px;color:var(--muted);line-height:1.45;margin-top:4px}
.status.brand{color:var(--blue);background:var(--blue-soft);font-weight:600}
.header>.status{flex-shrink:0;margin-top:4px;max-width:32%;overflow:hidden;text-overflow:ellipsis}
.status{padding:5px 11px;min-height:27px;font-size:11.5px;border:0;font-weight:620;letter-spacing:-.1px}
.status.none,.status.pending{background:var(--track);color:var(--muted)}
.card,.kpi,.student-row,.lesson,.stat-subject,.empty,.sheet{box-shadow:none;border:none}
.card,.kpi{background:var(--surface);border-radius:17px}
.card{padding:16px}.card+.card{margin-top:10px}
.kpis{gap:10px}.kpi{min-height:99px;padding:13px 14px}
.kpi .count{font-size:29px;font-weight:750;margin-top:11px;letter-spacing:-.75px;line-height:1.13}
.metric-name{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;white-space:normal}
.metric-name .dot{width:9px;height:9px;border-radius:50%;flex:none}
.btn{font-size:13px;border-radius:13px;min-height:45px;padding:11px 15px;letter-spacing:.02px;transition:transform .16s ease,filter .16s ease,background .16s ease}
.btn.full{width:100%}.btn.slim{min-height:34px;padding:7px 12px;font-size:12px}
.btn.secondary{background:var(--blue-soft);color:var(--blue)}
.btn.quiet{background:transparent;color:var(--muted)}
.btn.danger{background:var(--red-soft);color:var(--red)}
.btn:focus-visible,.student-row:focus-visible,.choice:focus-visible,.filter:focus-visible,.nav button:focus-visible{outline:3px solid var(--blue);outline-offset:2px}
.btn:active:not(:disabled){transform:scale(.98);filter:brightness(.985)}
.fi{display:inline-block;vertical-align:middle;flex-shrink:0}
.nav{max-width:650px;min-height:74px;border-top:1px solid var(--line);padding:7px 12px max(9px,env(safe-area-inset-bottom));gap:3px;box-shadow:0 -6px 22px rgba(24,46,70,.015);background:var(--surface)}
.nav button{padding:7px 3px 6px;border-radius:15px;min-height:53px;gap:3px;font-size:10px;font-weight:570;line-height:1.1;display:flex;flex-direction:column;align-items:center;justify-content:center;letter-spacing:-.1px}
.nav button .ico{font-size:initial;display:flex;align-items:center;justify-content:center;height:24px;line-height:1}
.nav button.active{font-weight:730;color:var(--blue);background:var(--blue-soft)}
.ui-section-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:22px 0 12px}
.ui-section-heading h2{margin:0;font-size:17px;line-height:1.35;font-weight:760;letter-spacing:-.3px}
.pill-button{border:0;border-radius:18px;background:var(--blue-soft);color:var(--blue);padding:8px 12px;display:inline-flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap;cursor:pointer}
.subtle-caption{color:var(--muted);font-size:11.5px;white-space:nowrap}
.overview-controls{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1fr);gap:9px;align-items:stretch;margin:7px 0 19px}
.date-stepper{height:37px;background:var(--surface);border-radius:24px;display:flex;align-items:center;justify-content:space-between;min-width:0;overflow:hidden}
.date-stepper button{width:29px;min-width:29px;height:37px;display:grid;place-items:center;border:0;background:transparent;color:var(--ink);padding:0;cursor:pointer}
.date-stepper button:active{background:var(--blue-soft)}
.step-date{min-width:0;flex:1;height:35px;display:flex;align-items:center}
.step-date .field{border:0;padding:6px 0;width:100%;min-height:35px;background:transparent;font-size:11px;text-align:center;outline:0;box-shadow:none;letter-spacing:-.3px;font-weight:620;color:var(--ink)}
.step-date .field:focus{box-shadow:none}
.step-date input[type=date]::-webkit-calendar-picker-indicator{width:10px;opacity:.65;margin-left:0}
.lesson-switch-wrap{min-width:0}.lesson-switch{appearance:none;-webkit-appearance:none;width:100%;height:37px;background:var(--blue-soft);border:none;border-radius:22px;color:var(--blue);font-size:11.7px;font-weight:620;padding:8px 21px 8px 12px;text-align:center;text-align-last:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;outline-color:var(--blue)}
.empty-switch{display:grid;place-items:center}
.accent-number{color:var(--blue);font-weight:750}
.ui-progress-card{margin-top:20px;padding:16px 15px 16px;border-radius:16px}
.ui-progress-card .row{font-size:13px}
.progress{height:11px;border-radius:10px;background:var(--track);margin-top:17px}
.progress b{background:var(--blue);transition:width .24s ease}
.progress-foot{font-size:10.5px;color:var(--muted);margin-top:9px}
.student-row{min-height:65px;padding:11px 12px;gap:10px;background:var(--surface);border-radius:14px;width:100%;color:var(--ink);text-align:left;display:flex;align-items:center}
button.student-row{cursor:pointer;transition:background .14s ease,transform .14s ease}
button.student-row:active{transform:scale(.993)}
.student-row .name{display:block;font-size:13px;font-weight:730;letter-spacing:-.14px;white-space:normal;overflow-wrap:anywhere;line-height:1.3}
.student-row .sub{display:block;font-size:11px;color:var(--muted);margin-top:5px;line-height:1.25}
.student-row .status{flex-shrink:0;max-width:36%;font-size:11px;overflow:hidden;text-overflow:ellipsis}
.avatar{width:39px;height:39px;border-radius:50%;background:#e9f0fa;color:#20385c;font-weight:760;font-size:12px}
html[data-theme="dark"] .avatar{background:#344b69;color:#d9eafd}
.attention-row{margin-bottom:8px}.ui-main-cta{margin-top:14px;min-height:48px}
.next-lesson{margin-bottom:8px}.time-avatar{background:var(--blue-soft);color:var(--blue);padding:7px 9px;border-radius:12px;font-size:11px;min-width:54px;text-align:center;font-weight:730}
.settings-entry{margin-top:10px}.next-lesson .fi{color:var(--muted)}
.empty-compact{display:flex;align-items:center;gap:10px;border-radius:14px;padding:15px;color:var(--green);background:var(--green-soft);font-size:12px}
.empty-state{background:var(--surface);border-radius:18px;padding:30px 22px;min-height:200px;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:10px;color:var(--muted)}
.empty-state .fi{color:var(--blue)}.empty-state b{color:var(--ink);font-size:15px}.empty-state p{font-size:12px}
.empty-state .btn{margin-top:8px}
.form-row .field,.field{min-height:44px;border-radius:13px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.form-row label,.fieldlabel{font-size:12px;color:var(--ink);font-weight:690}
.field:focus{box-shadow:0 0 0 3px var(--blue-soft);border-color:var(--blue)}
.ui-date-row{margin:6px 0 8px}.ui-date-row .field{background:var(--surface);border:none;min-height:38px;text-align:center;font-size:12px}
.ui-lesson-select{margin:5px 0 11px}.ui-lesson-select .field{background:var(--surface);border:none;text-align:center;text-align-last:center;font-size:12px;font-weight:620}
.filters{margin:13px 0;gap:8px;padding:2px 0;scrollbar-width:none}
.filter{background:var(--surface);color:var(--muted);padding:9px 15px;font-size:12px;min-height:32px;border-radius:50px;flex:none;transition:background .15s}
.filter.active{background:var(--blue-soft);color:var(--blue);font-weight:650}
.search-wrap{display:flex;align-items:center;background:var(--surface);height:45px;border-radius:13px;padding:0 13px;color:var(--muted);gap:8px;margin:14px 0 21px}
.search-wrap:focus-within{outline:2px solid var(--blue-soft)}
.search-wrap .field{border:none;padding:4px 0;min-height:40px;height:40px;margin:0;box-shadow:none;background:transparent;flex:1;width:100%;font-size:13px}
.search-wrap .field:focus{box-shadow:none}
.search-wrap .field::placeholder{color:var(--muted)}
.stack{gap:7px}
.journal-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:17px}
.journal-actions .btn{flex:1;white-space:nowrap;padding:8px 8px;min-height:37px}
.privacy-note{display:flex;align-items:flex-start;gap:9px;font-size:11px;color:var(--muted);line-height:1.5;margin:12px 2px}
.privacy-note .fi{color:var(--blue)}
.owner-tools{margin:7px 0 3px;gap:6px}.owner-tools .btn{display:flex;gap:5px}
.student-profile-row{margin:8px 0;min-height:70px;border-radius:15px}
.period-card{margin:11px 0 20px;display:flex;align-items:flex-end;gap:8px}
.period-dates{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;flex:1;min-width:0}
.period-card .field,.period-plain .field{background:var(--surface);font-size:12px;text-align:center;padding:8px 5px}
.period-card .btn{margin-bottom:0;min-height:44px}
.chart-card{padding:16px;margin-top:20px;border-radius:16px}.chart-card h3{font-size:15px;margin:0 0 3px}
.mini-chart{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:178px;gap:20px;padding:9px 8px 0;margin-top:7px;align-items:end}
.chart-col{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:4px;min-width:0}
.chart-col>b{font-size:12px;color:var(--ink);line-height:16px}
.chart-track{width:100%;height:126px;max-width:43px;position:relative;background:var(--track);border-radius:10px 10px 9px 9px;overflow:hidden}
.chart-fill{position:absolute;bottom:0;width:100%;left:0;background:var(--blue);border-radius:7px 7px 0 0;transition:height .3s ease}
.chart-fill.last{background:var(--green)}
.chart-col>span{color:var(--muted);font-size:10px;white-space:nowrap}
.stat-subject{border-radius:13px;padding:13px;margin:7px 0;color:var(--ink)}
.stat-subject .row{font-size:12px}.stat-subject .row b{font-size:12px}
.stat-subject .bar{margin-top:8px;height:7px;background:var(--track)}
.stat-subject .bar i{background:var(--blue)}
.audit-progress{margin-top:18px}.audit-progress .note{margin-top:11px}
.period-plain{padding:12px;display:flex;align-items:flex-end;gap:7px}
.ui-select-card{min-height:44px;display:flex;align-items:center;justify-content:space-between;padding:13px;font-size:12px}
.ui-select-card span{font-size:19px;color:var(--muted)}
.segmented{display:flex;gap:12px}.segment{background:var(--surface);border:0;border-radius:21px;flex:1;min-height:41px;color:var(--muted);font-size:12px;font-weight:600}
.segment.selected{background:var(--blue-soft);color:var(--blue)}
.export-items{display:grid;gap:6px}.export-item{background:var(--surface);border-radius:11px;padding:12px 14px;display:flex;align-items:center;gap:11px;min-height:41px;font-size:12px}
.export-item .fi{color:var(--ink)}
.export-privacy{display:flex;gap:9px;background:var(--blue-soft);color:var(--ink);border-radius:13px;margin:24px 0 17px;padding:14px;font-size:11px;line-height:1.5}
.export-privacy .fi{color:var(--blue)}.export-privacy p{color:var(--muted);margin-top:4px}
.myday-controls{margin-bottom:19px;max-width:260px}
.student-lesson{margin:11px 0;padding:16px 15px;position:relative}
.lesson-head{align-items:flex-start}.student-lesson .lesson-head>.status{font-size:10px;max-width:30%}
.student-lesson .lesson-title{font-size:16px;margin:7px 0 3px}
.eyebrow{color:var(--blue);font-size:11px;font-weight:650}
.lesson-time{font-size:11px;display:flex;align-items:center;gap:4px}
.lesson-status-row{display:flex;align-items:center;justify-content:space-between;margin:17px 0 12px;border-top:1px solid var(--line);padding-top:12px}
.lesson-actions{margin:10px 0 11px;gap:6px}
.lesson-actions .btn{min-height:43px;padding:8px 3px;font-size:10px;gap:4px;font-weight:650;border-radius:11px;white-space:normal;line-height:1.2}
.lesson-actions .btn .fi{width:14px;min-width:14px}.lesson-actions .btn.sel{box-shadow:inset 0 0 0 2px var(--blue)}
.lesson-actions .btn:disabled{opacity:.42}
.student-lesson>.note{line-height:1.45}
.refresh-btn{margin-top:15px;min-height:43px}
.profile-hero{display:flex;gap:13px;flex-wrap:wrap;align-items:center;padding:18px 17px;min-height:137px}
.profile-avatar{width:58px;height:58px;font-size:17px;color:var(--blue);background:var(--blue-soft)}
.profile-copy{min-width:0;flex:1}.profile-copy h2{font-size:16px;margin:0 0 5px}.profile-copy h3{font-size:15px;margin:0 0 4px}
.profile-copy p{color:var(--muted);font-size:11px}
.profile-foot{width:100%;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;margin-top:7px;gap:7px}
.profile-foot>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.tip-card{display:flex;gap:10px;align-items:flex-start;margin-top:12px;font-size:12px;color:var(--muted);line-height:1.5}
.tip-card .fi{color:var(--blue)}
.overlay{background:rgba(20,35,56,.40);z-index:30;backdrop-filter:blur(2px)}
.sheet{width:100%;max-width:650px;max-height:min(89dvh,930px);border-radius:24px 24px 0 0;padding:12px 20px calc(21px + env(safe-area-inset-bottom));overflow-y:auto;background:var(--surface);box-shadow:0 -8px 35px rgba(10,25,55,.10);animation:sheet-enter .23s cubic-bezier(.2,.8,.25,1)}
@keyframes sheet-enter{from{transform:translateY(22px);opacity:.7}to{transform:translateY(0);opacity:1}}
.sheet .grab{width:43px;height:4px;background:#c7d4e1;margin:0 auto 18px}
.sheet>h2{font-size:20px;margin:5px 0 4px;line-height:1.3}
.choice-heading{font-size:13px;margin:20px 0 13px}
.choice{border:none;border-radius:13px;background:var(--bg);display:flex;align-items:center;gap:11px;min-height:54px;padding:10px 12px;margin-bottom:7px;font-size:13px;font-weight:620;color:var(--ink);width:100%;text-align:left}
.choice.active{background:var(--blue-soft);border:none;color:var(--ink)}
.choice-icon{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--track);color:var(--muted)}
.choice-present{color:var(--green);background:var(--green-soft)}
.choice-late{color:var(--amber);background:var(--amber-soft)}
.choice-absent{color:var(--red);background:var(--red-soft)}
.choice-check{display:none;margin-left:auto;color:var(--blue)}.choice.active .choice-check{display:flex}
.reason-row{margin-top:22px}.reason-row .field{min-height:64px;background:var(--bg);border:none;font-size:12px;padding:13px}
.reason-row label{font-size:13px}.sheet .note{margin-top:8px}
.in-sheet{padding:15px 0;margin:13px 0 9px;min-height:102px}.profile-metrics{margin:15px 0}
.history-row{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--bg);border-radius:13px;padding:13px;margin:8px 0;font-size:12px;min-height:61px}
.history-row b{display:block}.history-row p{margin-top:5px}
.preview-head{margin:18px 0 16px;background:var(--bg)}.preview-head>p{margin:6px 0 9px}
.preview-table table th{background:var(--blue-soft);color:var(--ink)}
.preview-table table td,.preview-table table th{font-size:11px;padding:11px 9px}
.loading{padding:21vh 20px}.spinner{width:30px;height:30px}
#toast{max-width:min(470px,90vw);bottom:calc(92px + env(safe-area-inset-bottom));background:#263b52;box-shadow:0 8px 25px rgba(0,0,0,.19)}
@media(max-width:350px){.shell{padding-left:14px;padding-right:14px}.lesson-actions .btn{font-size:9px}.journal-actions .btn{font-size:10px}.overview-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.kpi .count{font-size:27px}.status{font-size:10px}}
@media(min-width:700px){.shell{padding:36px 30px 115px}.nav{border-radius:18px 18px 0 0}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}}
html[data-theme="dark"] .field,html[data-theme="dark"] .filter,html[data-theme="dark"] .student-row,html[data-theme="dark"] .kpi,html[data-theme="dark"] .stat-subject,html[data-theme="dark"] .card,html[data-theme="dark"] .lesson,html[data-theme="dark"] .sheet{background:var(--surface)}
html[data-theme="dark"] .date-stepper,html[data-theme="dark"] .period-card .field,html[data-theme="dark"] .period-plain .field,html[data-theme="dark"] .step-date .field{background:var(--surface)}
html[data-theme="dark"] .filter.active,html[data-theme="dark"] .lesson-switch,html[data-theme="dark"] .pill-button{background:var(--blue-soft)}
html[data-theme="dark"] .choice,html[data-theme="dark"] .reason-row .field,html[data-theme="dark"] .history-row{background:var(--surface-alt)}
html[data-theme="dark"] .choice.active{background:var(--blue-soft)}

/* Accessible dismissal for all action sheets. */
.sheet{position:relative}
.sheet-close{position:absolute;top:12px;right:16px;width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;background:var(--bg);color:var(--muted);font-size:21px;line-height:1;cursor:pointer}
.sheet-close:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
