:root{font-family:system-ui,sans-serif;color:var(--text);background:var(--page);color-scheme:light;--muted:#4e5d76;--line:#dce2ef;--primary:#2947a5;--text:#172345;--page:#f3f5fa;--header:#18274d;--header-caption:#c8d3f1;--controls:#e9edf7;--focus:#597af2}
*{box-sizing:border-box}body{margin:0}header{background:var(--header);color:white;padding:1rem 0}.wrap{width:min(1100px,calc(100% - 2rem));margin:auto}.brand{display:flex;align-items:center;gap:.8rem}.brand strong{font-size:1.13rem}.brand small{display:block;color:var(--header-caption)}.brand img{border-radius:10px}main{padding:2rem 0}h1,h2,p{margin:0}h1{font-size:clamp(1.8rem,5vw,2.75rem);letter-spacing:-.05em}h2{font-size:1.35rem}.heading,.toolbar,.dialog-head,.form-actions{display:flex;justify-content:space-between;align-items:center;gap:.6rem}.heading{margin-bottom:1.2rem}.heading p,footer,#lesson-meta{color:var(--muted)}.toolbar{background:white;border:1px solid var(--line);border-radius:14px;padding:.55rem;margin-bottom:.85rem}.actions,.seg{display:flex;gap:.25rem}.seg{background:var(--controls);border-radius:11px;padding:.2rem}button{font:inherit;color:inherit;cursor:pointer;background:white;border:1px solid var(--line);border-radius:9px;min-height:44px;padding:.35rem .7rem}.seg button{border-color:transparent;background:transparent;white-space:nowrap}button[aria-pressed=true],.primary{background:var(--primary)!important;color:white;border-color:var(--primary)}:focus-visible{outline:3px solid var(--focus);outline-offset:2px}nav{display:grid;grid-template-columns:repeat(5,1fr);gap:.4rem;margin-bottom:1rem}nav button{display:flex;flex-direction:column;align-items:center;padding:.4rem .1rem}nav small{font-size:.8rem}#schedule{display:grid;gap:.55rem}.daily{display:grid;grid-template-columns:4rem minmax(0,1fr);gap:.5rem;align-items:center}.period{color:var(--muted);font-size:.88rem;font-weight:650}.cell{min-width:0;display:grid;gap:.3rem}.lesson,.event,.empty{display:block;text-align:left;width:100%;overflow-wrap:anywhere;border-radius:10px;padding:.7rem .8rem}.lesson{border:0;border-left:4px solid #596ce2;background:#e9edff}.business{border-left-color:#0b8469;background:#e0f5ec}.computing{border-left-color:#9754bb;background:#f5eafa}.event,.empty{background:#fff;border:1px solid var(--line);font-size:.87rem;color:var(--muted)}.lesson strong,.lesson span{display:block}.lesson span{font-size:.82rem;margin-top:.18rem;color:#40516b}.lesson .status{color:#254395;font-weight:700}footer{margin-top:1.2rem;font-size:.85rem}.table-wrap{overflow:auto}table{width:100%;min-width:740px;border-spacing:.35rem;table-layout:fixed}th{font-size:.88rem;text-align:left}th:first-child{width:4rem}td{vertical-align:top}.empty{min-height:100%}dialog{width:min(520px,calc(100% - 1.5rem));max-height:90dvh;border:none;border-radius:18px;padding:1.15rem;color:inherit;box-shadow:0 12px 60px #15244855}dialog::backdrop{background:#121d3d96}label{display:block;margin-top:.8rem;font-weight:650}label small{display:block;color:var(--muted);font-weight:400}input,textarea{font:inherit;width:100%;display:block;margin-top:.28rem;border:1px solid #aab7d1;border-radius:8px;padding:.5rem .6rem;color:inherit;background:white}textarea{resize:vertical}#feedback{color:#9d2434;margin:.5rem 0}#links{display:grid;gap:.3rem;margin:.4rem 0;overflow-wrap:anywhere}.form-actions{justify-content:flex-end}@media(max-width:400px){.wrap{width:calc(100% - 1.25rem)}button{padding-inline:.5rem}.daily{grid-template-columns:3.2rem minmax(0,1fr)}}
#sign-in{padding-block:2rem}#sign-in p{margin:.5rem 0 1rem}.sign-in-link{display:inline-flex;align-items:center;min-height:44px;padding:.5rem .85rem;border-radius:9px;text-decoration:none}.sign-out{margin-top:.7rem}
nav{grid-template-columns:repeat(7,minmax(0,1fr))}
.planner-events h2{font-size:1rem;margin-bottom:.45rem}
.event-list{display:grid;gap:.35rem}
.custom-event{width:100%;text-align:left;background:#fff2d8;border-color:#e5c180;overflow-wrap:anywhere}
.custom-event strong,.custom-event span{display:block}
.custom-event span{font-size:.82rem;margin-top:.2rem;color:#5c461c}
.event-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;align-items:end}
#event-feedback{margin:.5rem 0;color:#9d2434}
.table-wrap table{min-width:950px}

:root[data-theme="forest"]{--primary:#21624c;--text:#18362c;--page:#edf5ef;--header:#183e32;--header-caption:#c9e5d7;--controls:#dcece3;--line:#cdded4;--focus:#377d61}
:root[data-theme="plum"]{--primary:#714477;--text:#37243e;--page:#f6f0f8;--header:#472b50;--header-caption:#ead4ed;--controls:#eee1f2;--line:#e2d2e8;--focus:#94539c}
:root[data-theme="slate"]{--primary:#405366;--text:#263444;--page:#eff3f6;--header:#263748;--header-caption:#d4e0ec;--controls:#e0e8ef;--line:#d3dde6;--focus:#526d89}
#theme-feedback{font-size:.85rem;color:var(--muted)}
.sample-notice{margin:0 0 .75rem;color:var(--muted)}
#manage-users{margin-top:.75rem}
#users-list{list-style:none;padding:0}
.user-row{display:flex;justify-content:space-between;align-items:center;gap:.75rem;border-top:1px solid var(--line);padding:.5rem 0}
.user-row span{overflow-wrap:anywhere}
#users-feedback{margin-top:.65rem}
#users-dialog[aria-busy="true"] form,#users-dialog[aria-busy="true"] ul{pointer-events:none;opacity:.65}

.settings-select{appearance:none;font:inherit;color:inherit;background:white;border:1px solid var(--line);border-radius:9px;min-height:44px;padding:.35rem 2rem .35rem .65rem;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 16px) 52%,calc(100% - 11px) 52%;background-size:5px 5px;background-repeat:no-repeat}
.settings-cog{margin-left:auto;min-width:44px;display:grid;place-items:center;background:transparent;border-color:#ffffff59;color:white;font-size:1.55rem;line-height:1}
.settings-cog[hidden]{display:none}
.settings-select{display:block;width:100%;margin-top:.35rem}
.settings-hint{margin-top:.45rem;color:var(--muted);font-size:.875rem}
#open-classroom,#classroom-disconnect{margin-top:.75rem}
#classroom-dialog [hidden]{display:none}
#classroom-status{margin:.65rem 0;color:var(--muted)}
#classroom-deadlines{margin-top:1rem;padding:.75rem;background:white;border:1px solid var(--line);border-radius:10px}
#classroom-deadlines summary{cursor:pointer;font-weight:650}
#classroom-deadline-status:not(:empty){margin-top:.5rem;color:var(--muted)}
#classroom-deadline-list{list-style:none;padding:0;margin:0}
#classroom-deadline-list li{padding:.55rem 0;border-top:1px solid var(--line);margin-top:.35rem;overflow-wrap:anywhere}
#classroom-deadline-list small{display:block;color:var(--muted)}
.lesson .lesson-deadline{display:block;margin-top:.35rem;font-weight:650;color:var(--text)}
.lesson .lesson-deadline[hidden]{display:none}
#sign-in [hidden]{display:none}
#sync-feedback:not(:empty),#import-feedback:not(:empty),#cycle-feedback:not(:empty){margin:.5rem 0;color:var(--muted)}
#import-browser{margin-top:.75rem}
.lesson .previous-notes-badge{margin-top:.35rem;font-weight:650;color:var(--text)}
#previous-notes{margin-top:.75rem;padding:.65rem .75rem;background:var(--controls);border:1px solid var(--line);border-radius:8px}
#previous-notes-heading{margin:0;font-size:.95rem}
#previous-notes-source{margin:.15rem 0 .45rem;color:var(--muted);font-size:.85rem}
#previous-notes-text{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}

.todo-note{position:relative;margin:0 0 1rem;background:#ffeda3;color:#392d12;border:1px solid #d9b94b;border-radius:6px 6px 10px 6px;box-shadow:2px 4px 0 #cdaa4733}
.todo-note summary{display:flex;align-items:center;gap:.65rem;min-height:48px;padding:.5rem .85rem;cursor:pointer;list-style:none}
.todo-note summary::-webkit-details-marker{display:none}
.todo-note summary::after{content:"";width:.5rem;height:.5rem;flex:none;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);margin-left:auto}
.todo-note[open] summary::after{transform:rotate(225deg)}
.todo-tab{width:.7rem;height:.85rem;flex:none;border-radius:2px;background:#a44929;transform:rotate(-12deg)}
#todo-count{font-size:.85rem;color:#65501c}
.todo-body{padding:0 .85rem .7rem}
.todo-label{margin:0 0 .3rem}
.todo-add{display:flex;gap:.45rem;align-items:center}
.todo-add input{min-width:0;margin:0;background:#fff9e3;color:#392d12;border-color:#ad8d3f;min-height:44px}
.todo-add button,.todo-remove{background:#fff9e3;color:#392d12;border-color:#ad8d3f;white-space:nowrap}
#todo-list{list-style:none;margin:.5rem 0 0;padding:0}
.todo-row{display:flex;justify-content:space-between;align-items:center;gap:.6rem;border-top:1px solid #dbbf67}
.todo-row label{display:flex;align-items:center;gap:.6rem;flex:1;min-width:0;min-height:44px;margin:0;cursor:pointer;overflow-wrap:anywhere}
.todo-row input{width:1.1rem;height:1.1rem;margin:0;flex:none;accent-color:#6b421a}
.todo-row .todo-done span{text-decoration:line-through;color:#65501c}
.todo-remove{min-width:44px;margin:.15rem 0}
#todo-feedback:not(:empty){margin:.4rem 0 0;font-size:.875rem}
.drive-actions{margin-top:.55rem}
#drive-feedback:not(:empty){margin:.35rem 0 0;font-size:.875rem;color:var(--muted)}
#links a{overflow-wrap:anywhere}
