*{box-sizing:border-box}
:root{
  --orange:#f37021;
  --orange-dark:#d9570d;
  --bg:#f1f3f2;
  --paper:#fbfbfa;
  --white:#fff;
  --ink:#252b28;
  --muted:#69716d;
  --line:rgba(37,43,40,.13);
  --soft-orange:#fff1e7;
  --soft-green:#edf5ef;
  --radius:20px;
  --control-radius:14px;
  --shadow:0 16px 42px rgba(37,43,40,.08);
}
html{background:var(--bg)}
body{margin:0;min-height:100svh;font-family:Manrope,"Avenir Next","Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--ink);font-size:16px;line-height:1.45}
button,input,select,textarea{font:inherit;color:inherit}
button{touch-action:manipulation}
.appHeader{height:68px;background:rgba(251,251,250,.96);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(16px,calc((100vw - 980px)/2));position:sticky;top:0;z-index:20;backdrop-filter:blur(10px)}
.brand{display:flex;gap:11px;align-items:center}.brand strong{display:block;font-size:15px;font-weight:850}.brand small{display:block;color:var(--muted);font-size:12px}.productLogo{width:46px;height:46px;object-fit:contain;display:block}.iconButton{width:42px;height:42px;border:1px solid var(--line);border-radius:14px;background:var(--white);font-size:18px;cursor:pointer}
main{max-width:980px;margin:auto;padding:24px 16px 72px}.view{display:none}.view.active{display:block}.eyebrow{display:block;color:var(--orange);font-size:11px;font-weight:900;letter-spacing:.13em}.muted{color:var(--muted)}
h1,h2,p{overflow-wrap:anywhere}h1{letter-spacing:-.035em}.setupCard{max-width:620px;margin:28px auto;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:30px;box-shadow:var(--shadow)}.setupCard h1{font-size:clamp(30px,5vw,42px);line-height:1.08;margin:8px 0 12px}.setupCard>p{color:var(--muted);max-width:540px}.setupMascot{width:112px;height:112px;object-fit:contain;display:block;margin:0 0 16px}.setupCard label,.panel label,dialog label{display:grid;gap:7px;margin:14px 0;font-size:13px;font-weight:750}
input,select,textarea{width:100%;border:1px solid rgba(37,43,40,.18);border-radius:var(--control-radius);padding:12px 13px;background:var(--white);outline:none}textarea{resize:vertical;line-height:1.5}input:focus,select:focus,textarea:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(243,112,33,.13)}
.primary,.secondary,.back,.textButton{border:0;border-radius:var(--control-radius);padding:12px 16px;font-weight:800;cursor:pointer}.primary{background:var(--orange);color:#fff}.primary:hover{background:var(--orange-dark)}.secondary{background:var(--white);border:1px solid var(--line)}.secondary:hover{border-color:rgba(243,112,33,.45)}.back{background:transparent;padding-left:0}.textButton{padding:8px 0;background:transparent;color:var(--orange)}
.hello{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:24px 24px 20px;display:grid;grid-template-columns:1fr auto;gap:20px;align-items:center;box-shadow:0 8px 28px rgba(37,43,40,.045)}.hello h1{font-size:clamp(30px,5vw,42px);line-height:1.05;margin:6px 0 8px}.hello p{margin:0;color:var(--muted)}.homeMascot{width:112px;height:112px;object-fit:contain;display:block}
.quickActions{display:grid;grid-template-columns:2fr repeat(3,1fr);gap:10px;margin:14px 0 20px}.quickAction{min-height:86px;display:flex;align-items:center;gap:12px;text-align:left;padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);cursor:pointer}.quickAction:hover{border-color:rgba(243,112,33,.4);transform:translateY(-1px)}.quickAction--primary{background:var(--orange);border-color:var(--orange);color:#fff}.quickActionIcon{display:grid;place-items:center;flex:0 0 38px;width:38px;height:38px;border-radius:13px;background:rgba(37,43,40,.06);font-size:20px;font-weight:900}.quickAction--primary .quickActionIcon{background:rgba(255,255,255,.2)}.quickAction strong,.quickAction small{display:block}.quickAction strong{font-size:14px}.quickAction small{margin-top:3px;color:var(--muted);font-size:11px;line-height:1.3}.quickAction--primary small{color:rgba(255,255,255,.82)}
.day{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);margin:11px 0;overflow:hidden}.dayHead{display:flex;justify-content:space-between;align-items:center;padding:14px 17px;background:#f7f8f7}.dayHead.weekend{background:var(--soft-orange)}.dayHead span{color:var(--muted);font-size:12px}.event{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start;padding:14px 17px;border-top:1px solid var(--line)}.event.done{opacity:.58}.event.done .eventTitle{text-decoration:line-through}.checkBtn{width:32px;height:32px;border:2px solid var(--orange);border-radius:11px;background:var(--white);font-weight:900;cursor:pointer}.event.done .checkBtn{background:var(--orange);color:#fff}.type{font-size:10px;color:var(--orange);font-weight:900;letter-spacing:.08em;text-transform:uppercase}.eventTitle{font-weight:800;margin-top:2px}.eventMeta{display:flex;flex-wrap:wrap;gap:6px;margin-top:5px;color:var(--muted);font-size:12px}.materialPill{display:inline-flex;padding:4px 8px;border-radius:999px;background:var(--bg);color:var(--ink);font-size:10px;font-weight:800}.homeworkThumbButton{display:block;width:min(220px,100%);margin-top:10px;padding:0;border:0;border-radius:14px;overflow:hidden;background:var(--bg);cursor:pointer}.homeworkThumb{display:block;width:100%;max-height:150px;object-fit:cover}
.toolbar,.panelHead{display:flex;align-items:center;justify-content:space-between;gap:12px}.toolbar{margin-bottom:16px}.toolbar h1{margin:0;font-size:32px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:22px}.noteInfo{background:var(--soft-orange);border:1px solid rgba(243,112,33,.25);padding:15px 16px;border-radius:var(--control-radius);margin-bottom:16px}.grade{display:grid;grid-template-columns:1fr auto;gap:10px;padding:13px 0;border-bottom:1px solid var(--line)}.gradeValue{font-size:24px;font-weight:900}.grade small{color:var(--muted)}
.scheduleHead{align-items:flex-start;margin-bottom:18px}.scheduleHead p:first-child{margin-top:0}.scheduleHeadActions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.emptySchedule{padding:28px;border:1px dashed rgba(37,43,40,.22);border-radius:var(--radius);background:#f8f9f8;text-align:center}.emptySchedule p{max-width:620px;margin:8px auto 18px;color:var(--muted)}.emptyScheduleActions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.scheduleTable{display:grid;grid-template-columns:108px repeat(var(--schedule-days,5),minmax(120px,1fr));overflow:auto;border:1px solid var(--line);border-radius:var(--control-radius);background:var(--white)}.scheduleCorner,.scheduleDayHead,.scheduleTime,.scheduleCell{padding:10px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.scheduleCorner,.scheduleDayHead{font-weight:900;background:#f7f8f7;position:sticky;top:0;z-index:1}.scheduleTime{display:grid;gap:2px;background:#f7f8f7}.scheduleTime span{font-size:12px;color:var(--muted)}.scheduleCell input{min-width:105px}.weekdayField{border:1px solid var(--line);border-radius:var(--control-radius);padding:14px;margin:14px 0}.weekdayField legend{font-weight:900}.weekdayChoices{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.weekdayChoices label{display:flex;align-items:center;gap:7px;margin:0}.weekdayChoices input{width:auto}.setupGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.fieldHint{display:block;font-size:12px;color:var(--muted);margin-top:4px}.breakSetup{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}.breakRow{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:end;margin:8px 0}.breakRow label{margin:0}.breakRow label:first-child{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:7px}.breakRow label:nth-child(2){display:grid;grid-template-columns:1fr auto;align-items:center;gap:7px}.removeBreak{width:42px;height:42px;border:1px solid var(--line);border-radius:var(--control-radius);background:var(--white);font-size:22px;cursor:pointer}
.scheduleImportReview{background:var(--soft-orange);border:1px solid rgba(243,112,33,.25);border-radius:var(--control-radius);padding:15px 16px;margin:0 0 16px}.scheduleImportReview strong{display:block;font-size:17px}.scheduleImportReview span{display:block;margin-top:4px;color:#8a4a22;font-weight:800}.scheduleImportReview p{margin:7px 0 0;color:#5f635f}.scheduleImportPreview{margin:12px 0;border:1px solid var(--line);background:#f8f9f8;border-radius:var(--control-radius);padding:10px;max-height:260px;overflow:auto}.scheduleImportPreview img{display:block;max-width:100%;max-height:230px;margin:auto;border-radius:10px}.importStatus{margin:12px 0;padding:11px 12px;border-radius:var(--control-radius);background:var(--soft-green);color:#2f523d}.importStatus.error{background:#fff0ed;color:#8c3429}.importedScheduleGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}.importedDay{border:1px solid var(--line);border-radius:var(--control-radius);background:#f8f9f8;overflow:hidden}.importedDayHead{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:11px 12px;border-bottom:1px solid var(--line);background:var(--white)}.addImportRow{border:0;background:transparent;color:var(--orange);font-weight:900;cursor:pointer}.importedRows{padding:9px}.importedRow{position:relative;background:var(--white);border:1px solid var(--line);border-radius:var(--control-radius);padding:10px 42px 10px 10px;margin-bottom:9px}.importedRow.isUncertain{border-style:dashed;border-color:#f0a16c}.importedTimeFields{display:grid;grid-template-columns:1.25fr .8fr .8fr;gap:7px}.importedRow label{display:grid;gap:4px;margin:0;font-size:12px;color:var(--muted)}.importedRow input{padding:8px;font-size:14px}.importSubjectLabel{margin-top:7px!important}.removeImportRow{position:absolute;right:8px;top:8px;width:28px;height:28px;border:0;border-radius:9px;background:var(--bg);font-size:20px;line-height:1;cursor:pointer}

dialog{border:1px solid var(--line);border-radius:var(--radius);width:min(520px,calc(100vw - 28px));max-height:calc(100svh - 28px);padding:0;box-shadow:0 24px 80px rgba(37,43,40,.24);background:var(--paper)}dialog::backdrop{background:rgba(37,43,40,.4);backdrop-filter:blur(3px)}dialog form{padding:24px}.largeDialog{width:min(660px,calc(100vw - 24px))}.dialogHeader h2{margin:5px 0 6px;font-size:30px;letter-spacing:-.03em}.dialogHeader p{margin:0;color:var(--muted)}.dialogActions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.formSection{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}.formSectionTitle{display:flex;align-items:center;gap:9px;margin-bottom:12px}.formSectionTitle>span{display:grid;place-items:center;width:26px;height:26px;border-radius:999px;background:var(--soft-orange);color:var(--orange);font-size:12px;font-weight:900}.formSectionTitle strong{font-size:14px}.formSectionTitle small{margin-left:auto;color:var(--muted);font-size:11px}.choiceButtons{display:flex;flex-wrap:wrap;gap:8px}.choiceButtons button,.dueModeButtons button{border:1px solid var(--line);border-radius:999px;background:var(--white);padding:10px 14px;font-weight:800;cursor:pointer}.choiceButtons button.choiceActive,.dueModeButtons button.choiceActive{border-color:var(--orange);background:var(--soft-orange);color:#a54810;box-shadow:inset 0 0 0 1px var(--orange)}.choiceButtons--small button{padding:8px 12px;font-size:13px}.photoButton{width:100%;text-align:center}.homeworkPhotoPreview{margin-top:10px;padding:10px;border:1px solid var(--line);border-radius:var(--control-radius);background:var(--white)}.homeworkPhotoPreview img{display:block;width:100%;max-height:260px;object-fit:contain;border-radius:10px;background:var(--bg)}.dueModeButtons{display:grid;grid-template-columns:1fr 1fr;gap:8px}.dueModeButtons button{border-radius:var(--control-radius)}.dueModeButtons button:disabled{opacity:.45;cursor:not-allowed}.nextLessonInfo{margin-top:10px;padding:11px 12px;border-radius:var(--control-radius);background:#f7f8f7;color:var(--muted);font-size:13px}.nextLessonInfo strong{color:var(--ink)}.stickyDialogActions{position:sticky;bottom:-24px;margin:22px -24px -24px;padding:14px 24px 24px;background:linear-gradient(180deg,rgba(251,251,250,.25),var(--paper) 28%)}.visuallyHidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.photoDialog{width:min(900px,calc(100vw - 24px));background:#101312;border:0;padding:48px 14px 14px}.photoDialog img{display:block;max-width:100%;max-height:calc(100svh - 90px);margin:auto;object-fit:contain}.photoClose{position:absolute;right:12px;top:10px;width:34px;height:34px;border:0;border-radius:999px;background:#fff;color:var(--ink);font-size:24px;cursor:pointer}
#celebrate{position:fixed;inset:0;background:rgba(37,43,40,.62);display:none;place-items:center;z-index:99;color:#fff;text-align:center}#celebrate.show{display:grid}#celebrate>div{display:grid;justify-items:center;gap:8px}#celebrate img{width:170px;height:170px;object-fit:contain;animation:jump .55s ease infinite alternate}#celebrate strong{font-size:22px}@keyframes jump{to{transform:translateY(-12px) rotate(2deg)}}
@media(max-width:820px){.quickActions{grid-template-columns:1fr 1fr}.quickAction--primary{grid-column:1/-1}.scheduleHead{display:grid}.scheduleHeadActions{display:grid;grid-template-columns:1fr;width:100%}.scheduleHeadActions .secondary{width:100%}.setupGrid{grid-template-columns:1fr}.importedScheduleGrid{grid-template-columns:1fr}}
@media(max-width:600px){main{padding:16px 12px 64px}.brand small{display:none}.setupCard{margin:5px auto;padding:22px}.hello{padding:20px}.homeMascot{width:86px;height:86px}.quickActions{grid-template-columns:1fr 1fr}.quickAction{min-height:76px;padding:12px}.quickAction--primary{grid-column:1/-1}.quickAction small{display:none}.event{padding:13px 14px}.toolbar h1{font-size:28px}.panel{padding:17px}.weekdayChoices{grid-template-columns:1fr 1fr}.breakRow{grid-template-columns:1fr auto}.breakRow label:nth-child(2){grid-column:1}.scheduleTable{font-size:14px}.scheduleCorner,.scheduleDayHead,.scheduleTime,.scheduleCell{padding:8px}.importedTimeFields{grid-template-columns:1fr 1fr}.importedTimeFields label:first-child{grid-column:1/-1}.largeDialog{width:calc(100vw - 14px);max-height:calc(100svh - 14px)}dialog form{padding:20px}.stickyDialogActions{bottom:-20px;margin-left:-20px;margin-right:-20px;margin-bottom:-20px;padding-left:20px;padding-right:20px}.dialogHeader h2{font-size:27px}.choiceButtons button{flex:1 1 auto}.dialogActions{display:grid;grid-template-columns:1fr 1fr}.dialogActions .primary,.dialogActions .secondary{width:100%}}
.dayHead.holiday{background:#fff3e8}.dayOffInfo{background:#fffdf9}.holidayStatus{margin:10px 0 14px;padding:11px 12px;border-radius:var(--control-radius);background:#f7f8f7;color:var(--muted);font-size:12px;line-height:1.45}.holidayStatus:empty{display:none}
.dayNavigation{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0 10px}.dayNavigation button{padding:9px 12px}.dayRangeLabel{margin-left:auto;color:var(--muted);font-size:13px;font-weight:750}.scheduleReminder{margin:10px 0;padding:12px 14px;border:1px solid rgba(243,112,33,.25);border-radius:14px;background:var(--soft-orange);color:var(--muted);font-size:13px}.scheduleReminder button{border:0;background:transparent;color:var(--orange-dark);font-weight:850;cursor:pointer}.dayHead.schoolOverride{background:var(--soft-green)}.retentionChoice{display:flex!important;grid-template-columns:none!important;align-items:center;gap:9px!important}.retentionChoice input{width:auto}.attachmentActions{display:flex;align-items:center;gap:10px;margin-top:9px}.exceptionRow{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:11px 0;border-top:1px solid var(--line)}.exceptionRow:first-child{border-top:0}.exceptionRow strong,.exceptionRow span{display:block}.exceptionRow span{font-size:13px;color:var(--muted)}.dataActions{display:flex;flex-wrap:wrap;gap:9px}
.scheduleHeadActions[hidden]{display:none}
@media(max-width:600px){.dayRangeLabel{width:100%;margin-left:0}.dayNavigation{position:sticky;top:74px;z-index:8;padding:8px;background:rgba(241,243,242,.95);border-radius:14px}.dayNavigation button{flex:1}.dayNavigation #historyBtn{flex-basis:100%}}
