:root{--bg:#f3f1ec;--panel:#fff;--ink:#1f2328;--muted:#6b6f76;--line:#dcd8cf;--primary:#1f6f5c;--primary-ink:#fff;--late:#d98a00;--absent:#c0392b;--leave:#7a7f87;--radius:14px;color:var(--ink);background:var(--bg);font-family:-apple-system,PingFang TC,Noto Sans TC,Microsoft JhengHei,sans-serif;font-size:18px}*{box-sizing:border-box}html,body,#root{overscroll-behavior:none;height:100%;margin:0;overflow:hidden}#root{height:100dvh;position:fixed;inset:0}button{font:inherit;color:inherit;cursor:pointer}input{font:inherit}.btn{border-radius:var(--radius);border:1px solid var(--line);background:var(--panel);white-space:nowrap;justify-content:center;align-items:center;gap:10px;min-height:52px;padding:0 20px;font-weight:600;display:inline-flex}.btn:disabled{opacity:.45;cursor:default}.btn-primary{background:var(--primary);border-color:var(--primary);color:var(--primary-ink)}.btn-ghost{color:var(--primary);background:0 0;border-color:#0000}.btn.big{min-height:72px;padding:0 44px;font-size:1.4rem}.muted{color:var(--muted)}.error,.warn{color:var(--absent);font-weight:600}.login{flex-direction:column;justify-content:safe center;align-items:center;gap:40px;height:100%;padding:24px;display:flex;overflow-y:auto}.login>*{flex-shrink:0}.login h1{letter-spacing:.1em;margin:0;font-size:3rem}.google-button{min-height:44px}.app{flex-direction:column;height:100%;min-height:0;display:flex;overflow:hidden}.topbar{background:var(--panel);border-bottom:1px solid var(--line);flex-wrap:wrap;flex-shrink:0;align-items:center;gap:8px 16px;padding:8px 16px;display:flex}.context{white-space:nowrap;flex:auto;align-items:baseline;gap:14px;display:flex}.context strong{font-size:1.35rem}.tabs,.segmented{background:var(--bg);border-radius:var(--radius);gap:4px;padding:4px;display:flex}.tabs button,.segmented button{background:0 0;border:none;border-radius:11px;min-width:88px;min-height:48px;padding:0 18px;font-weight:600}.tabs button.active,.segmented button.active{background:var(--panel);color:var(--primary);box-shadow:0 1px 3px #00000026}.segmented.small button{min-width:60px}.segmented.full button{flex:1}.account{color:var(--muted);flex:auto;justify-content:flex-end;align-items:center;gap:4px;font-size:.9rem;display:flex}.toolbar{flex-wrap:wrap;align-items:center;gap:12px;padding:8px 16px;display:flex}.toolbar .hint{color:var(--muted);flex:1;font-size:.9rem}.toolbar .spacer{flex:1}.counts{align-items:center;gap:8px;display:flex}.count{background:var(--panel);border-radius:10px;padding:6px 10px;font-size:.95rem;font-weight:600}.seating{flex-direction:column;flex:1;min-height:0;display:flex}.board{flex:1;min-height:0;display:flex}.board .grid{flex:1}.board.with-notes .grid{padding-right:8px}.notes{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);flex-shrink:0;width:240px;margin:0 16px 12px 0;padding:10px 12px;overflow-y:auto}.notes h3{margin:0 0 8px;font-size:1rem}.notes ul{margin:0;padding:0;list-style:none}.notes li{border-bottom:1px solid var(--line);align-items:center;display:flex}.note{text-align:left;background:0 0;border:none;flex:1;align-items:center;gap:6px;min-width:0;padding:6px 0;display:flex}.note-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:600;overflow:hidden}.note-remove{width:36px;height:36px;color:var(--muted);background:0 0;border:none;border-radius:50%;flex-shrink:0;font-size:1.2rem}.note-remove:hover{color:var(--absent);background:#fbeeec}.tile-body.role-monitor{background:#fff1c9}.tile-body.role-rep{background:#dcefe8}.student-row.role-monitor{background:#fff1c9}.student-row.role-rep{background:#dcefe8}.tile-body.has-issue{box-shadow:inset 0 0 0 3px var(--absent);border-radius:var(--radius)}.grid{flex:1;grid-template-rows:repeat(6,1fr);grid-auto-flow:column;gap:8px;min-height:0;padding:0 16px 12px;display:grid}.podium{color:var(--muted);letter-spacing:.3em;background:#e4e0d6;border-radius:8px;margin:2px auto 6px;padding:3px 48px;font-size:.85rem}.cell{border-radius:var(--radius);min-width:0;min-height:0;display:flex}.cell-empty{border:2px dashed var(--line)}.cell-over{outline:3px solid var(--primary);outline-offset:2px}.tile{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);text-align:left;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;flex:1;min-width:0;padding:0;overflow:hidden}.tile:active{transform:scale(.98)}.tile-hidden{opacity:.25}.tile-overlay{height:100%;transform:scale(1.05);box-shadow:0 12px 28px #0000004d}.tile-body{height:100%;display:flex;position:relative}.tile-body.status-absent,.tile-body.status-leave{opacity:.45}.tile-body.status-late{box-shadow:inset 0 0 0 3px var(--late);border-radius:var(--radius)}.tile-photo-wrap{aspect-ratio:1;flex-shrink:0;height:100%;position:relative}.tile-photo{width:100%;height:100%}.role-badges{flex-wrap:wrap;gap:1px;display:flex;position:absolute;bottom:3px;left:3px;right:3px}.role-badge{color:#ffd66b;white-space:nowrap;text-overflow:ellipsis;background:#14201cd1;border-radius:6px;max-width:100%;padding:1px 3px;font-size:.65rem;font-weight:700;line-height:1.1;overflow:hidden}.issue-tag{color:var(--absent);white-space:nowrap;background:#fde2df;border:1px solid #f3b3ab;border-radius:6px;padding:1px 6px;font-size:.72rem;font-weight:700}.issue-tag.big{padding:4px 10px;font-size:1rem}.role-chip{color:#7a5a00;white-space:nowrap;background:#fff4d1;border:1px solid #f0d78a;border-radius:8px;padding:3px 10px;font-size:.85rem;font-weight:700}.chip-row{flex-wrap:wrap;gap:4px;margin-bottom:8px;display:flex}.text-input{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);min-width:200px;min-height:52px;color:var(--ink);padding:0 14px}.inline-form{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.inline-form .text-input{flex:1}.issue-list{margin:0 0 8px;padding:0;list-style:none}.issue-list li{border-bottom:1px solid var(--line);align-items:center;gap:12px;display:flex}.issue-list .muted{flex:1;font-size:.9rem}.issue-list .spacer{flex:1}.btn.danger{color:var(--absent)}.tile-info{flex-direction:column;flex:1 1 0;justify-content:space-between;min-width:0;padding:6px 8px;display:flex}.tile-top{flex-wrap:wrap;align-items:center;gap:3px;max-height:2.9em;display:flex;overflow:hidden}.tile-name{white-space:nowrap;text-overflow:ellipsis;font-size:1.15rem;font-weight:700;overflow:hidden}.tile-points{color:var(--primary);font-size:.9rem;font-weight:700}.seat-no{background:var(--bg);border-radius:8px;justify-content:center;align-items:center;min-width:28px;height:24px;padding:0 6px;font-size:.85rem;font-weight:700;display:inline-flex}.status-tag{color:#fff;background:var(--primary);border-radius:6px;padding:2px 6px;font-size:.75rem;font-weight:700}.status-tag.status-late,.count.status-late{background:var(--late);color:#fff}.status-tag.status-absent,.count.status-absent{background:var(--absent);color:#fff}.status-tag.status-leave,.count.status-leave{background:var(--leave);color:#fff}.flash{color:var(--primary);pointer-events:none;font-size:1.8rem;font-weight:800;animation:.9s ease-out forwards flash;position:absolute;top:4px;right:8px}@keyframes flash{0%{opacity:1;transform:translateY(0)scale(1.2)}to{opacity:0;transform:translateY(-24px)scale(1)}}@media (orientation:portrait){.tile-body{flex-direction:column}.tile-photo-wrap{aspect-ratio:auto;flex:1;width:100%;height:auto;min-height:0}.tile-info{flex:none;gap:2px}}.avatar{object-fit:cover;background:#ddd;display:block}.avatar-missing{color:var(--absent);background:repeating-linear-gradient(45deg,#f8e1de,#f8e1de 8px,#fbeeec 8px 16px);justify-content:center;align-items:center;font-size:.8rem;font-weight:700;display:flex}.students{flex-direction:column;flex:1;min-height:0;display:flex}.student-list{flex:1;grid-template-columns:repeat(auto-fill,minmax(360px,1fr));align-content:start;gap:8px;padding:0 16px 16px;display:grid;overflow-y:auto}.student-row{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);text-align:left;align-items:center;gap:12px;min-height:72px;padding:6px 14px 6px 6px;display:flex}.row-photo{border-radius:10px;flex-shrink:0;width:60px;height:60px}.row-name{font-size:1.1rem;font-weight:700}.row-main{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.row-main .chip-row{margin:0}.row-no{color:var(--muted);font-size:.85rem;font-weight:400}.row-points{color:var(--primary);font-weight:700}.modal-backdrop{z-index:20;background:#14141473;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal{background:var(--panel);border-radius:20px;width:min(760px,94vw);max-height:92dvh;padding:24px 28px;position:relative;overflow-y:auto}.modal h2{margin:0 0 12px;font-size:1.8rem}.modal h3{color:var(--muted);margin:20px 0 8px;font-size:1rem}.close{background:var(--bg);border:none;border-radius:50%;width:52px;height:52px;font-size:1.8rem;line-height:1;position:absolute;top:12px;right:12px}.card-head{gap:24px;display:flex}.card-photo{flex-direction:column;align-items:center;display:flex}.card-avatar{border-radius:16px;width:200px;height:200px}.card-meta dl{grid-template-columns:auto 1fr;gap:8px 16px;margin:0;display:grid}.card-meta dt{color:var(--muted)}.card-meta dd{margin:0;font-weight:600}.segmented button.active.status-late{color:var(--late)}.segmented button.active.status-absent{color:var(--absent)}.segmented button.active.status-leave{color:var(--leave)}.point-log{margin:0;padding:0;list-style:none}.point-log li{border-bottom:1px solid var(--line);align-items:center;gap:16px;display:flex}.point-log li span{color:var(--muted);width:70px}.point-log li strong{flex:1}.import-controls{flex-wrap:wrap;align-items:end;gap:12px;display:flex}.import-controls label:first-child{color:var(--muted);flex-direction:column;gap:4px;font-size:.9rem;display:flex}.import-controls input{border:1px solid var(--line);border-radius:var(--radius);min-height:52px;color:var(--ink);padding:0 14px}.preview{border:1px solid var(--line);border-radius:var(--radius);max-height:40dvh;overflow-y:auto}.preview table{border-collapse:collapse;width:100%}.preview th,.preview td{border-bottom:1px solid var(--line);text-align:left;padding:8px 12px}.preview th{background:var(--bg);position:sticky;top:0}.row-error{color:var(--absent);background:#fbeeec}.error.small{word-break:break-all;font-size:.85rem;font-weight:400}.modal-actions{justify-content:flex-end;margin-top:16px;display:flex}.seating .tile:disabled{opacity:1;cursor:default}.seating .tile.seat-lottery-rolling{outline-offset:-3px;z-index:1;outline:3px solid #bd790d;position:relative}.seating .tile.seat-lottery-rolling .tile-info{background:#fff0c2}.seating .tile.seat-lottery-winner{outline-offset:-4px;z-index:1;outline:4px solid #16765c;position:relative;box-shadow:0 0 0 2px #b7e3cb}.seating .tile.seat-lottery-winner .tile-info{color:#124e3c;background:#c9efdc}.toast{z-index:40;color:#fff;background:#1f2328;border-radius:16px;align-items:center;gap:16px;padding:8px 8px 8px 22px;font-weight:600;display:flex;position:fixed;bottom:24px;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #00000040}.toast button{color:#fff;background:#ffffff26;border:none;border-radius:12px;min-height:48px;padding:0 18px;font-weight:700}select,textarea{font:inherit;color:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}:focus-visible{outline-offset:3px;outline:3px solid #64a58e}.sr-only{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.topbar{gap:10px 20px;padding:12px 22px}.context{gap:9px}.context .brand{margin-right:8px;font-size:1.15rem}.system-switcher{flex-shrink:0;position:relative}.context .system-switcher-trigger{border:1px solid var(--line);background:var(--panel);min-height:48px;color:var(--ink);border-radius:9px;align-items:center;gap:6px;margin:0;padding:6px 8px;font-weight:650;display:flex}.system-switcher-trigger svg{flex-shrink:0;transition:transform .15s}.system-switcher-trigger[aria-expanded=true]{background:var(--bg)}.system-switcher-trigger[aria-expanded=true] svg{transform:rotate(180deg)}.system-switcher-menu{z-index:40;border:1px solid var(--line);background:var(--panel);border-radius:12px;min-width:240px;max-width:calc(100vw - 24px);max-height:70dvh;padding:6px;position:absolute;top:calc(100% + 8px);left:0;overflow-y:auto;box-shadow:0 8px 28px #182b2026}.system-switcher-menu a{min-height:52px;color:var(--ink);border-radius:8px;justify-content:space-between;align-items:center;gap:16px;padding:10px 14px;font-size:1rem;text-decoration:none;display:flex}.system-switcher-menu a:hover,.system-switcher-menu a:focus-visible{background:var(--bg)}.system-switcher-menu a[aria-current=page]{color:var(--primary);background:var(--bg);font-weight:650}.system-current{color:var(--primary)}.class-select{border:1px solid var(--line);background:var(--bg);border-radius:9px;max-width:180px;padding:9px 12px;font-size:1rem;font-weight:600}.icon-button{border:1px solid var(--line);background:var(--panel);border-radius:9px;width:42px;height:42px}.account{flex:0 auto;max-width:300px}.account>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.save-strip{color:var(--muted);border-bottom:1px solid var(--line);justify-content:space-between;gap:12px;padding:7px 22px;font-size:.75rem;display:flex}.save-error{color:#673e0c;background:#fff1c9;align-items:center;gap:12px;padding:12px 22px;display:flex}.page{flex:1;min-height:0;padding:26px;overflow-y:auto}.page-heading{justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px;display:flex}h1{letter-spacing:-.03em;margin:0;font-size:1.7rem;font-weight:650;line-height:1.3}.eyebrow{color:var(--primary);margin:0 0 6px;font-size:.8rem;font-weight:600}.summary-grid{grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:26px;display:grid}.summary-grid>button{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);flex-direction:column;align-items:flex-start;gap:14px;padding:20px 24px;display:flex}.summary-grid>button>span{color:var(--muted);font-size:.9rem}.summary-grid strong{font-size:2.1rem;font-weight:600}.summary-grid small{color:var(--muted);margin-left:10px;font-size:.85rem;font-weight:400}.overview-grid{grid-template-columns:1fr 1.3fr;align-items:start;gap:22px;display:grid}.surface{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);padding:20px 24px}.section-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin:14px 0;display:flex}.section-heading h2,.section-heading h3{color:var(--ink);margin:0;font-size:1.05rem}.surface .section-heading{margin-top:0}.text-button{color:var(--primary);text-align:left;background:0 0;border:0;padding:4px 0;font-weight:600}.text-button:hover{text-decoration:underline}.class-overview{border:0;border-top:1px solid var(--line);text-align:left;background:0 0;justify-content:space-between;align-items:center;gap:15px;width:100%;padding:20px 0;display:flex}.class-overview small{color:var(--muted);margin-top:7px;font-size:.8rem;display:block}.class-overview>span:last-child{font-size:.85rem}.recent-work{text-align:left;border:0;border-top:1px solid var(--line);background:0 0;flex-direction:column;align-items:flex-start;gap:7px;width:100%;padding:16px 0;display:flex}.recent-work:hover{background:#f4f8f5}.recent-work strong{overflow-wrap:anywhere;font-size:1rem}.recent-work>span:last-child{font-size:.85rem}.recent-meta{color:var(--muted);font-size:.8rem}.filter-bar{border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);flex-wrap:wrap;align-items:flex-end;gap:14px;padding:18px 20px;display:flex}.filter-bar label,.homework-form label{color:var(--muted);flex-direction:column;gap:7px;font-size:.8rem;display:flex}.filter-bar input,.filter-bar select,.homework-form input,.homework-form select,.homework-form textarea,.compact-field input{border:1px solid var(--line);min-height:46px;color:var(--ink);background:#fff;border-radius:8px;width:100%;min-width:0;padding:10px 12px;font-size:1rem}.homework-form textarea{resize:vertical;line-height:1.5}.homework-form{flex-direction:column;gap:18px;display:flex}.homework-form small{font-size:.8rem}.form-two{grid-template-columns:1fr 1fr;gap:18px;display:grid}.filter-bar input[type=date]{font-size:.9rem}.filter-bar .search-field{flex:1;min-width:150px}.filter-bar .checkbox-label{white-space:nowrap;flex-direction:row;align-items:center;height:46px}input[type=checkbox]{width:21px;height:21px;min-height:0;accent-color:var(--primary);flex-shrink:0}.result-count{color:var(--muted);margin:20px 0 12px;font-size:.85rem}.homework-table-wrap{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);overflow:auto}.homework-table{border-collapse:collapse;text-align:left;width:100%}.homework-table th{color:var(--muted);white-space:nowrap;background:#f8f8f5;padding:14px 18px;font-size:.8rem;font-weight:500}.homework-table td{border-top:1px solid var(--line);padding:18px;font-size:.9rem}.homework-table .date-cell{white-space:nowrap;color:var(--muted);font-size:.85rem}.homework-table .title-cell{width:45%;min-width:220px}.title-cell .text-button{color:var(--ink);overflow-wrap:anywhere;line-height:1.5}.title-cell small{color:var(--muted);overflow-wrap:anywhere;margin-top:6px;font-size:.8rem;display:block}.class-badge{white-space:nowrap;font-weight:600}.format-tag{color:#6c6147;white-space:nowrap;background:#edeae3;border-radius:6px;flex-direction:column;padding:4px 9px;font-size:.8rem;display:inline-flex}.format-google_form{color:#765097;background:#eee6f5}.format-classwork{color:#326a50;background:#e0ede7}.format-other{color:#4a647c;background:#e7edf3}.format-tag small{white-space:normal;font-size:.75rem}.pending-count{color:#b84d37;white-space:nowrap;font-weight:600}.success-text{color:var(--primary)}.empty-state{text-align:center;color:var(--muted);padding:65px 24px;line-height:1.7}.empty-state strong{color:var(--ink)}.empty-state p{font-size:.9rem}.empty-state.compact{background:#f8f8f5;border-radius:10px;padding:24px 15px}.homework-modal{padding:28px 30px}.homework-modal.wide{width:min(900px,94vw)}.homework-modal h2{margin-bottom:24px;padding-right:45px;font-size:1.4rem}.homework-modal .close{width:40px;height:40px;top:20px;right:20px}.work-meta{color:var(--muted);flex-wrap:wrap;align-items:center;gap:15px;font-size:.85rem;display:flex}.work-meta .class-badge{color:var(--ink)}.homework-modal .work-title{color:var(--ink);white-space:pre-wrap;overflow-wrap:anywhere;margin:20px 0 10px;font-size:1.3rem;line-height:1.5}.form-link{color:var(--primary);margin:5px 0;display:inline-block}.work-notes{color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere;font-size:.9rem}.detail-actions{border-bottom:1px solid var(--line);flex-wrap:wrap;gap:10px;margin-bottom:22px;padding:20px 0;display:flex}.count-pill{color:#b84d37;background:#fde2df;border-radius:6px;margin-left:5px;padding:2px 8px;display:inline-block}.compact-field{color:var(--muted);align-items:center;gap:9px;font-size:.8rem;display:flex}.compact-field input{width:auto;font-size:.9rem}.missing-row{border-bottom:1px solid var(--line);align-items:center;gap:12px;padding:9px 0;display:flex}.student-name{color:var(--ink);flex:1}.history{border-top:1px solid var(--line);margin-top:24px;padding-top:16px}.history summary{cursor:pointer;color:var(--muted);padding:8px 0;font-size:.9rem}.history-row{border-bottom:1px solid var(--line);gap:20px;padding:14px 0;font-size:.9rem;display:flex}.history-row strong{min-width:110px}.history-events{flex-direction:column;gap:6px;font-size:.85rem;display:flex}.event-made_up{color:var(--primary)}.event-void{color:var(--muted)}.event-missing{color:#b84d37}.checklist-panel>.muted{font-size:.8rem;line-height:1.6}.search-input{width:100%;min-width:0;margin-bottom:15px}.student-checklist{grid-template-columns:repeat(3,1fr);gap:8px;max-height:43vh;display:grid;overflow-y:auto}.student-checklist label{border:1px solid var(--line);cursor:pointer;border-radius:8px;align-items:center;gap:8px;padding:12px 8px;font-size:.9rem;display:flex}.student-checklist label.selected{background:#fff4ee;border-color:#c77662}.student-checklist small{color:var(--muted);font-size:.65rem}.modal-actions{gap:10px}.student-homework .recent-work{padding:12px 0}@media (width<=1100px){.topbar{gap:10px}.tabs button{min-width:64px;padding:0 10px}.account{margin-left:auto}.account>span{max-width:140px}.overview-grid{grid-template-columns:1fr 1fr}.homework-table td,.homework-table th{padding:14px 12px}.board{overflow:auto}.board .grid{min-width:690px;min-height:570px}.notes{width:200px}}@media (width>=761px) and (width<=900px){.topbar{gap:6px;padding:12px 10px}.context{gap:4px}.context .system-switcher-trigger{padding-inline:6px}.class-select{padding-inline:8px}.topbar .tabs{gap:2px}.topbar .tabs button{min-width:56px;padding-inline:8px}.account .btn{padding-inline:8px}}@media (width<=760px){.topbar{padding:10px 12px}.context{flex:1}.context .brand{font-size:1rem}.account{font-size:.75rem}.account>span{display:none}.tabs{order:3;width:100%}.tabs button{flex:1}.save-strip{padding:6px 12px;font-size:.65rem}.save-strip>span:last-child{text-align:right}.page{padding:18px 14px}.page-heading{flex-wrap:wrap;align-items:flex-start;margin-bottom:20px}h1{font-size:1.35rem}.summary-grid{gap:8px}.summary-grid>button{gap:10px;padding:14px 10px}.summary-grid>button>span{font-size:.75rem}.summary-grid strong{font-size:1.7rem}.summary-grid small{margin-left:4px;font-size:.65rem}.overview-grid{grid-template-columns:1fr}.surface{padding:18px}.filter-bar{gap:12px;padding:12px}.filter-bar>label{flex:40%;min-width:0}.filter-bar .checkbox-label{flex:100%}.homework-table{min-width:700px}.student-checklist{grid-template-columns:repeat(2,1fr)}.form-two{grid-template-columns:1fr}.homework-modal{padding:22px 18px}.compact-field{flex-wrap:wrap}.student-list{grid-template-columns:1fr}.student-row{gap:8px;min-width:0;padding-right:10px}.row-no{display:none}.toolbar .text-input{width:100%;min-width:0}.card-head{flex-direction:column;gap:15px}.card-avatar{width:120px;height:120px}.card-photo{align-items:flex-start}.history-row{flex-direction:column;gap:8px}}@media (width<=1200px){.account>span{display:none}}.homework-table td:nth-child(5){white-space:nowrap}.cloud-toolbar{border-bottom:1px solid var(--line);color:var(--muted);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:8px 18px;font-size:13px;display:flex}.cloud-status{color:var(--muted);padding:8px 18px;font-size:.8rem}.workspace-feedback{display:contents}.seating-feedback{bottom:calc(12px + env(safe-area-inset-bottom,0px));z-index:40;pointer-events:none;flex-direction:column;align-items:center;gap:8px;width:min(560px,100vw - 24px);max-height:45dvh;display:flex;position:fixed;left:50%;overflow-y:auto;transform:translate(-50%)}.seating-feedback>*{pointer-events:auto;border-radius:12px;max-width:100%;box-shadow:0 4px 18px #18372b26}.seating-feedback .cloud-status{color:#285d48;pointer-events:none;background:#edf5f1}.seating-feedback .save-error{overflow-wrap:anywhere;flex-wrap:wrap;padding:12px 14px;font-size:.85rem}.seating-feedback .save-error .btn{white-space:normal;min-height:44px;font-size:.85rem}.seating-feedback .toast{flex-shrink:0;font-size:.9rem;position:static;transform:none}.cloud-import-counts{text-align:center;justify-content:space-around;gap:20px;padding:18px 0;display:flex}.cloud-import-counts dt{color:var(--muted);font-size:13px}.cloud-import-counts dd{margin:4px 0 0;font-size:28px;font-weight:600}.cloud-setup-note{max-width:440px;line-height:1.7}@media (width<=900px){.board .notes{display:none}.board.with-notes .grid{padding-right:16px}}@media (orientation:portrait){.board .grid{min-height:1080px}}.classroom-toolbar{flex-shrink:0;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:6px 12px;display:grid}.room-tabs{background:#e9e6df;border-radius:11px;align-items:center;gap:2px;padding:2px;display:flex}.room-tabs button{color:#64675f;white-space:nowrap;background:0 0;border:1px solid #0000;border-radius:9px;min-height:40px;padding:0 10px;font-size:.85rem}.room-tabs button.active{color:var(--primary);border-color:var(--line);background:#fff;font-weight:650}.classroom-actions{justify-content:center;align-items:center;gap:8px;min-width:0;display:flex}.classroom-actions .btn{border-radius:10px;min-height:44px;padding:0 12px;font-size:.9rem}.classroom-meta{color:var(--muted);white-space:nowrap;align-items:center;gap:6px;font-size:.8rem;display:flex}.classroom-modes{background:#e0e8f4;flex-wrap:nowrap;gap:2px;padding:2px}.classroom-modes button{color:#42597b;white-space:nowrap;min-width:54px;min-height:40px;padding:0 10px;font-size:.9rem}.classroom-modes button.active{color:#fff;box-shadow:none;background:#45638d}.classroom-notes{position:relative}.classroom-notes>summary{white-space:nowrap;cursor:pointer;border:1px solid var(--line);border-radius:10px;align-items:center;min-height:40px;padding:0 7px;font-size:.75rem;list-style:none;display:flex}.classroom-notes>summary::-webkit-details-marker{display:none}.classroom-notes[open]>summary{background:var(--panel);color:var(--primary)}.classroom-notes .notes{z-index:10;width:min(380px,85vw);max-height:60vh;margin:0;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 10px 25px #182b2026}.classroom-mode-controls{flex-wrap:wrap;grid-column:1/-1;align-items:center;gap:6px;min-width:0;display:flex}.classroom-mode-controls .segmented{padding:2px}.classroom-mode-controls .segmented button{min-width:48px;min-height:40px;padding:0 10px;font-size:.9rem}.classroom-mode-controls .counts{flex-wrap:wrap;gap:6px}.classroom-mode-controls .count{padding:5px 8px;font-size:.8rem}.classroom-mode-controls .btn{min-height:40px;padding:0 10px;font-size:.9rem}.classroom-mode-controls .text-input{max-width:100%;min-height:40px;font-size:.9rem}.seating .board{padding:0 10px;overflow:auto}.seating .board .grid{grid-template-rows:repeat(6,minmax(0,1fr));gap:5px;min-width:660px;min-height:0;padding:0}.seating .tile-body{flex-direction:column;min-height:0}.seating .tile-photo-wrap{aspect-ratio:auto;background:#e8ebe9;flex:1;justify-content:center;width:100%;height:auto;min-height:0;display:flex;overflow:hidden}.seating .tile-photo{aspect-ratio:1.25;object-fit:cover;object-position:center top;width:auto;max-width:100%;height:100%}.seating .tile-info{flex:none;gap:1px;padding:3px 6px}.tile-identity{align-items:center;gap:4px;min-width:0;display:flex}.tile-identity .seat-no{flex-shrink:0}.seating .tile-name{min-width:0;font-size:.85rem;line-height:1.2}.seating .seat-no{min-width:20px;height:20px;padding:0 3px;font-size:.75rem}.seating .tile-points{font-size:.7rem;line-height:1.15}.seating .tile-top{max-height:20px;position:absolute;bottom:38px;left:3px;right:3px}.seating .tile-top .issue-tag,.seating .tile-top .status-tag{padding:1px 3px;font-size:.65rem}.seating .role-badges .tile-top{display:contents}.tile-top:empty{display:none}.seating>.podium{text-align:center;color:#675a42;letter-spacing:.3em;background:#d9d0bc;border-radius:6px;flex-shrink:0;min-height:26px;margin:6px 10px;padding:3px 12px;font-size:.8rem;font-weight:650}.seating>.podium-lottery{grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;min-height:40px;display:grid}.seat-lottery-result{text-align:left;letter-spacing:normal;color:#325947;min-width:0;font-size:.75rem;line-height:1.3}.seat-lottery-result strong{font-weight:750}.seat-lottery-result>span{white-space:nowrap}.seat-lottery-reset{color:#675a42;letter-spacing:normal;background:#ffffffad;border:1px solid #b6aa92;border-radius:7px;justify-self:end;min-height:34px;padding:3px 10px;font-size:.75rem}.card-meta{min-width:0}.card-identity{flex-wrap:wrap;align-items:center;gap:16px;margin-bottom:12px;padding-right:24px;display:flex}.card-identity h2{overflow-wrap:anywhere;margin:0}.card-student-number{overflow-wrap:anywhere;flex-direction:column;gap:4px;display:flex}.card-student-number small{color:var(--muted);font-size:.8rem}.student-groups{flex:1;grid-template-rows:repeat(3,minmax(0,1fr));grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;min-width:660px;min-height:0;display:grid}.student-group{--group-bg:#e6f1e9;--group-border:#76a88a;border:2px solid var(--group-border);background:var(--group-bg);border-radius:12px;grid-template-rows:auto minmax(0,1fr);gap:3px;min-width:0;min-height:0;padding:3px 4px 4px;display:grid}.student-group-title{text-align:center;color:#33433c;margin:0;font-size:.7rem;font-weight:650;line-height:1.2}.student-group-seats{grid-template-rows:repeat(2,minmax(0,1fr));grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;min-width:0;min-height:0;display:grid}.student-group .cell,.student-group .tile{border-radius:8px}.student-group .cell-empty{border-color:var(--group-border);justify-content:center;align-items:center}.student-group .cell-empty:after{content:"空位";color:#65736b;font-size:.7rem}.group-tone-2{--group-bg:#e7eff9;--group-border:#7a9fc5}.group-tone-3{--group-bg:#f9ebda;--group-border:#caa16e}.group-tone-4{--group-bg:#efe7f5;--group-border:#a88aba}.group-tone-5{--group-bg:#f8e6ea;--group-border:#c38d9b}.group-tone-6{--group-bg:#e1f1f0;--group-border:#71aaa7}.group-tone-7{--group-bg:#f4f0d8;--group-border:#b6aa60}.group-tone-8{--group-bg:#e9ecf4;--group-border:#929db9}.group-tone-9{--group-bg:#f2e9e1;--group-border:#b89c86}.attendance-date{color:var(--muted);font-size:.8em;font-weight:400}.absence-log{flex-wrap:wrap;gap:8px;margin:12px 0;padding:0;list-style:none;display:flex}.absence-log li{color:#91372d;background:#f7eeee;border-radius:7px;padding:5px 10px}@media (width>=900px) and (height<=800px){.seating .student-group .tile-body{flex-direction:row}.seating .student-group .tile-photo-wrap{width:0;height:100%;position:static;overflow:visible}.seating .student-group .tile-info{justify-content:flex-start;width:82px;height:100%;padding:3px}.seating .student-group .tile-name{font-size:.78rem}.seating .student-group .seat-no{min-width:17px;height:18px;font-size:.7rem}.student-group .tile-identity{gap:2px}.seating .student-group .role-badges{width:76px;bottom:2px;left:auto;right:3px}.seating .student-group .role-badge,.seating .student-group .role-badges .issue-tag,.seating .student-group .role-badges .status-tag{padding:1px 2px;font-size:.55rem;line-height:1}.seating .student-group .tile-points{background:#ffffffe8;border-radius:3px;padding:1px 3px;font-size:.6rem;position:absolute;bottom:2px;left:3px}}.lab-tables{flex:1;grid-template-rows:repeat(3,minmax(0,1fr));grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;min-width:660px;min-height:0;display:grid}.lab-table{grid-template-rows:repeat(3,minmax(0,1fr));gap:4px;min-width:0;min-height:0;display:grid}.lab-table-horizontal{grid-template-columns:repeat(4,minmax(0,1fr))}.lab-table-vertical{grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr)}.table-surface{color:#76664a;background:#e9dfc9;border:2px solid #c4b493;border-radius:10px;justify-content:center;align-items:center;font-size:.75rem;font-weight:650;display:flex;box-shadow:inset 0 0 0 3px #f1eadb}.lab-table-horizontal .table-surface{grid-area:2/2/auto/4;margin-block:16%}.lab-table-vertical .table-surface{grid-area:1/2/4}.lab-table-vertical .table-surface span{writing-mode:vertical-rl;letter-spacing:.15em}.seating .lab-table .tile-info{padding:2px 3px}.seating .lab-table .tile-name{font-size:.75rem}.seating .lab-table .seat-no{min-width:17px;height:17px;padding:0 2px;font-size:.7rem}.lab-table .tile-identity{gap:2px}.seating .lab-table .tile-points{font-size:.62rem}.seating .lab-table .tile-top{bottom:32px}.lab-table .cell-empty:after{content:"空位";color:#a7a69e;font-size:.7rem}.lab-table .cell-empty{justify-content:center;align-items:center;display:flex}.seating .lab-table-vertical .tile-body{flex-direction:row-reverse;container-type:size}.seating .lab-table-vertical .tile-photo-wrap{width:0;height:100%}.seating .lab-table-vertical .tile-info{justify-content:flex-start;align-items:center;gap:0;width:30px;padding:2px 1px}.lab-table-vertical .tile-identity{flex-direction:column;gap:1px;height:100%;min-height:0}.seating .lab-table-vertical .seat-no{height:clamp(12px,20cqh,17px);font-size:clamp(9px,15cqh,12px)}.seating .lab-table-vertical .tile-name{writing-mode:vertical-rl;text-orientation:upright;text-overflow:ellipsis;min-height:0;font-size:clamp(9px,17cqh,14px);line-height:1;overflow:hidden}.seating .lab-table-vertical .tile-points{white-space:nowrap;background:#ffffffe8;border-radius:3px;padding:1px 3px;font-size:.55rem;position:absolute;bottom:2px;right:3px}.seating .lab-table-vertical .tile-top{bottom:2px;left:32px}.seating .lab-table-vertical .role-badges{bottom:17px}@media (width<=900px){.classroom-toolbar{gap:6px;padding-inline:10px}.room-tabs button{padding-inline:7px}.classroom-actions{gap:5px}.classroom-modes button{min-width:50px;padding-inline:8px}}@media (width<=760px){.classroom-toolbar{grid-template-columns:auto 1fr}.classroom-actions{justify-content:flex-end}.classroom-modes{grid-column:1/-1;justify-self:end}.classroom-mode-controls{grid-column:1/-1}.classroom-meta{font-size:.75rem}.seating .board .grid{min-height:560px}.lab-tables{min-height:720px}.student-groups{min-height:600px}}.settings-page{width:100%}.settings-section{max-width:900px;margin-bottom:18px}.settings-section p{margin:0 0 18px;line-height:1.7}.settings-actions{flex-wrap:wrap;gap:12px;display:flex}.settings-section .settings-help{margin:14px 0 0;font-size:.85rem}@media (width>=761px){.topbar{flex-wrap:nowrap}.topbar .context,.topbar .tabs,.topbar .account{flex-shrink:0}.topbar .tabs button{white-space:nowrap}}@media (width<=760px){.topbar .tabs{flex-wrap:wrap}.topbar .tabs button{flex:calc(33.333% - 8px);min-width:0}}.students .student-toolbar{flex-wrap:nowrap;gap:8px;padding:6px 10px}.student-toolbar .text-input{flex:1;width:0;min-width:120px;min-height:40px;font-size:.85rem}.student-toolbar .segmented{flex-wrap:nowrap;padding:2px}.student-toolbar .segmented button{white-space:nowrap;min-height:40px;padding:0 10px;font-size:.8rem}.student-more{position:relative}.student-more>summary{cursor:pointer;border:1px solid var(--line);white-space:nowrap;background:#fff;border-radius:9px;padding:9px 12px;font-size:.8rem;list-style:none}.student-more>summary::-webkit-details-marker{display:none}.student-more[open]>div{z-index:8;border:1px solid var(--line);background:#fff;border-radius:10px;width:max-content;max-width:85vw;max-height:60dvh;padding:12px;position:absolute;top:calc(100% + 4px);right:0;overflow-y:auto;box-shadow:0 6px 20px #182b2026}.student-more[open]>div>.segmented{margin-bottom:10px}.student-pagination{white-space:nowrap;align-items:center;gap:6px;font-size:.7rem;display:flex}.student-pagination .btn{min-width:36px;min-height:36px;padding:0;font-size:1.2rem}.students .student-portraits{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(var(--student-rows), minmax(0, 1fr));align-content:stretch;gap:6px;min-height:0;padding:0 10px 8px}.students .student-portrait{background:#e8ebe9;border-radius:10px;justify-content:center;gap:0;min-width:0;min-height:0;padding:0;display:flex;position:relative;overflow:hidden;container-type:size}.student-portrait.role-monitor{border-color:#d2ae53}.student-portrait.role-rep{border-color:#65a496}.student-portrait .student-portrait-photo{border-radius:0;height:100%}.student-portrait img.student-portrait-photo{width:min(100%,160cqh - 41.6px);max-width:none;height:auto;transform:translate(-50%, calc(-1 * var(--portrait-top,0%)));position:absolute;top:0;left:50%}.student-portrait .avatar-missing{flex:1;padding-bottom:28px;font-size:.8rem}.student-portrait-caption{z-index:1;min-height:26px;color:var(--ink);background:#fffffff0;align-items:center;gap:4px;padding:3px 5px;line-height:1.15;display:flex;position:absolute;bottom:0;left:0;right:0}.student-portrait-caption .seat-no{flex-shrink:0;min-width:18px;height:19px;padding:0 2px;font-size:.72rem}.student-portrait-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:.78rem;font-weight:650;overflow:hidden}.student-portrait-number{color:#636963;white-space:nowrap;margin-left:auto;font-size:.58rem}.student-portrait-flags{flex-direction:column;align-items:flex-start;gap:2px;display:flex;position:absolute;bottom:30px;left:3px;right:3px}.student-portrait-roles{flex-wrap:wrap;gap:2px;max-width:100%;display:flex}.student-portrait-roles .role-chip{flex:none}.student-portrait-details{justify-content:space-between;gap:4px;width:100%;display:flex}.student-portrait-issues,.student-portrait-status{flex-direction:column;align-items:flex-start;gap:2px;min-width:0;max-width:48%;display:flex}.student-portrait-status{align-items:flex-end;margin-left:auto}.student-portrait-flags .role-chip,.student-portrait-flags .issue-tag,.student-portrait-status .status-tag,.student-portrait-status .row-points{text-overflow:ellipsis;white-space:nowrap;border-radius:3px;max-width:100%;padding:2px 3px;font-size:.55rem;line-height:1.1;overflow:hidden}.student-portrait-status .row-points{background:#fffffff0}@media (width<=600px){.students .student-toolbar{flex-wrap:wrap}.student-toolbar .text-input{flex-basis:100%}.student-toolbar .segmented{flex:1}.students .student-portraits{min-height:calc(var(--student-rows) * 90px)}.students{overflow-y:auto}.student-portrait-number{display:none}.student-portrait-name{font-size:.7rem}}.session-loading{gap:14px}.session-loading p{margin:0}.session-spinner{border:3px solid #e5e7df;border-top-color:#56745b;border-radius:50%;width:28px;height:28px;animation:.9s linear infinite session-spin}@keyframes session-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.session-spinner{animation:none}}.school-day{color:var(--muted);flex-wrap:wrap;align-items:center;gap:3px 8px;font-size:12px;font-weight:500;line-height:1.6;display:flex}.school-day span{color:#1c725f;white-space:nowrap;background:#e7f1ec;border-radius:4px;padding:0 5px}.planner-home-title{flex-shrink:0}.planner-home-title h1{margin-bottom:2px}.curriculum-library{min-width:0;color:var(--ink,#20394b)}.planner-page>.curriculum-library{flex-direction:column;flex:1;min-height:0;display:flex;overflow:hidden}.curriculum-library>.library-version-note{flex-shrink:0}.library-content{overscroll-behavior:contain;flex:1;min-height:0;overflow:auto}.library-content:focus-visible{outline-offset:-2px;outline:2px solid #3981aa}.library-toolbar{flex:1;align-items:center;gap:6px;min-width:0;display:flex}.library-toolbar select,.library-toolbar input{min-height:44px;font:inherit;color:inherit;background:#fff;border:1px solid #cbd6de;border-radius:7px;padding:7px 8px;font-size:.9rem}.library-toolbar .library-course-select{flex:0 0 140px;width:140px}.library-toolbar .library-class-select{flex:0 0 112px;width:112px}.library-toolbar input{flex:1;width:0;min-width:110px}.library-version-note{color:#687a88;margin:8px 0 10px;font-size:.8rem;line-height:1.6}.library-table-wrap{background:#fff;border:1px solid #d9e1e7;border-radius:9px}.library-table{border-collapse:collapse;table-layout:fixed;width:100%;font-size:.9rem;line-height:1.6}.library-table thead{z-index:1;color:#3b5263;background:#edf2f5;position:sticky;top:0}.library-table th,.library-table td{text-align:left;vertical-align:top;overflow-wrap:anywhere;white-space:pre-line;border-bottom:1px solid #e5eaee;padding:11px 12px}.library-table tbody tr:last-child>*{border-bottom:0}.library-table tbody tr:nth-child(2n){background:#fafcfd}.library-table tbody tr:hover{background:#f4f8fa}.library-table thead th{padding-top:9px;padding-bottom:9px;font-size:.8rem;font-weight:700}.library-chapters-table th:first-child{width:16%}.library-chapters-table th:nth-child(2){width:22%}.library-chapters-table th:nth-child(3){width:24%}.library-chapters-table th:nth-child(4),.library-chapters-table th:nth-child(5){width:19%}.library-chapter-link,.library-preview,.library-lesson-link{text-align:left;color:inherit;width:100%;font:inherit;cursor:pointer;background:0 0;border:0;padding:0}.library-chapter-link{color:#1d536f;min-height:44px;font-weight:700;line-height:1.6}.library-chapter-link>span{color:#587386;margin-top:4px;font-size:.75rem;font-weight:400;display:block}.library-preview{line-height:1.7;display:block}.library-preview>span{-webkit-line-clamp:3;white-space:pre-line;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.library-class-schedule+.library-class-schedule{border-top:1px solid #e4eaee;margin-top:9px;padding-top:8px}.library-class-schedule>strong{font-size:.8rem;display:inline}.library-class-schedule>span:not(.library-flag),.library-class-schedule>small{font-variant-numeric:tabular-nums;color:#526877;font-size:.75rem;display:block}.library-class-schedule>small{margin-top:2px}.library-flag{border-radius:4px;margin:4px 4px 0 0;padding:2px 5px;font-size:.75rem;font-weight:500;line-height:1.5;display:inline-block}.library-flag.pending{color:#8a4f10;background:#fff0db}.library-flag.candidate{color:#566777;background:#edf0f3}.library-flag.changed{color:#245d87;background:#e5f0fa}.library-materials-table th:first-child{width:29%}.library-materials-table th:nth-child(2){width:23%}.library-materials-table th:nth-child(3){width:32%}.library-materials-table th:nth-child(4){width:16%}.library-materials-table tbody th{font-weight:400}.library-materials-table small{color:#627785;margin-top:5px;font-size:.75rem;display:block}.library-materials-table p{margin:0}.library-material-quantity{margin-bottom:4px;display:block}.library-lesson-materials-table thead th:first-child{width:18%}.library-lesson-materials-table thead th:nth-child(2){width:30%}.library-lesson-materials-table thead th:nth-child(3){width:52%}.library-lesson-materials-table time{font-variant-numeric:tabular-nums;font-size:.8rem;display:block}.school-term-neutral{--term-color:#88939c;--term-bg:#edf0f3;--term-ink:#50616d}.library-material-term>tr>:first-child{border-left:5px solid var(--term-color)}.library-material-term>tr>:last-child{border-right:5px solid var(--term-color)}.library-table .library-material-term-heading th{background:var(--term-bg);color:var(--term-ink);border-top:4px solid var(--term-color)}.library-material-term-heading th>div{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.library-material-term-heading strong{font-size:.95rem}.library-material-term-heading span{font-size:.8rem;font-weight:500}.library-material-term-heading time{display:inline}.library-table .library-material-term tr:last-child>*{border-bottom:4px solid var(--term-color)}.library-material-reference{margin-top:14px;padding-bottom:4px}.library-material-reference>summary{cursor:pointer;color:#526877;width:fit-content;min-height:44px;padding:10px 0;font-size:.9rem}.library-empty{color:#647987;margin:0;padding:20px;font-size:.85rem}.library-dialog-host .homework-modal.wide{width:min(1000px,96vw);padding:22px 26px}.library-dialog-host .homework-modal h2{margin-bottom:8px;font-size:1.4rem}.library-chapter-fields{border-top:1px solid #dde5eb;margin:14px 0 22px}.library-chapter-fields>div{border-bottom:1px solid #e4eaef;grid-template-columns:76px minmax(0,1fr);gap:14px;padding:13px 0;display:grid}.library-chapter-fields dt{color:#3d5a6d;font-size:.85rem;font-weight:700}.library-chapter-fields dd{white-space:pre-line;overflow-wrap:anywhere;margin:0;font-size:.9rem;line-height:1.8}.library-linked-lessons>h3{margin-bottom:10px;font-size:1.05rem}.library-lesson-group{border:1px solid #d9e3e9;border-radius:8px;margin-top:14px;overflow:hidden}.library-lesson-group-heading{background:#edf3f6;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 12px;font-size:.85rem;display:flex}.library-lesson-group-heading span{color:#597181;font-size:.8rem}.library-linked-lesson{border-top:1px solid #e3eaf0;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;padding:10px 12px;display:grid}.library-lesson-link{min-height:44px;line-height:1.7}.library-lesson-link strong{color:#245a78;font-size:.9rem;display:block}.library-lesson-link>span,.library-lesson-meta>small{color:#607583;font-size:.8rem;display:block}.library-lesson-meta{text-align:right;max-width:215px}.library-pending-detail{color:#846027;grid-column:1/-1;margin:1px 0 0;font-size:.8rem;line-height:1.7}.curriculum-library button:focus-visible,.library-toolbar input:focus-visible,.library-toolbar select:focus-visible{outline-offset:3px;outline:2px solid #3981aa}@media (width<=1050px){.planner-library-toolbar .planner-view-tabs button{padding-inline:6px;font-size:.9rem}.library-toolbar select,.library-toolbar input{font-size:.85rem}.library-toolbar .library-course-select{flex-basis:124px;width:124px}.library-toolbar .library-class-select{flex-basis:104px;width:104px}.library-table th,.library-table td{padding:9px 8px}.library-preview>span{-webkit-line-clamp:4}}@media (width<=760px){.planner-library-toolbar .library-toolbar{flex-basis:100%}.library-table{min-width:650px}.library-dialog-host .homework-modal.wide{padding:18px}.library-chapter-fields>div{grid-template-columns:63px minmax(0,1fr);gap:9px}.library-linked-lesson{grid-template-columns:1fr}.library-lesson-meta{text-align:left;max-width:none}}.planner-page{background:#f7f8fa;flex-direction:column;flex:1;min-height:0;padding:18px 24px;font-size:1rem;display:flex;overflow:hidden}.planner-page button,.planner-dialog-host button{font:inherit}.planner-page .btn,.planner-dialog-host .btn{border-radius:7px;gap:7px;min-height:48px;padding:0 12px;font-size:1rem}.planner-page h1{letter-spacing:-.5px;margin:0;font-size:1.7rem}.planner-page h2{margin:0;font-size:1.05rem}.planner-page h3{font-size:1.05rem}.planner-toolbar{flex-wrap:nowrap;align-items:center;gap:8px;margin-bottom:12px;display:flex}.planner-toolbar h1{white-space:nowrap;flex-shrink:0}.planner-view-tabs{flex-shrink:0;align-items:center;gap:4px;margin:0;display:flex}.planner-view-tabs button{min-height:44px;color:var(--muted);cursor:pointer;white-space:nowrap;background:#fff;border:1px solid #d9dfe3;border-radius:7px;padding:7px 8px}.planner-view-tabs button.active{color:var(--primary);border-color:var(--primary);background:#edf5f1;font-weight:700}.planner-actions{flex-wrap:wrap;flex-shrink:0;align-items:center;gap:6px;margin-left:auto;display:flex}.planner-actions .selected{border-color:var(--primary);color:var(--primary);background:#edf5f1}.planner-filter{flex:1;align-items:center;gap:8px;min-width:0;margin:0;display:flex}.planner-filter select{flex-shrink:0;width:120px}.planner-filter input,.planner-filter select{font:inherit;min-height:46px;color:var(--ink);background:#fff;border:1px solid #d9dfe3;border-radius:6px;padding:8px 10px;font-size:1rem}.planner-filter input{flex:1;width:0;min-width:120px}.planner-note{color:var(--muted);margin-bottom:12px;font-size:.85rem}.planner-note summary{cursor:pointer;width:fit-content}.planner-note p{margin:6px 0;line-height:1.6}.planner-more{font-size:.9rem;position:relative}.planner-more summary{cursor:pointer;border:1px solid var(--line);background:#fff;border-radius:7px;padding:10px;list-style:none}.planner-more>div{z-index:4;border:1px solid var(--line);background:#fff;border-radius:8px;min-width:180px;padding:5px;position:absolute;top:100%;right:0;box-shadow:0 4px 20px #0002}.planner-more button{text-align:left;background:0 0;border:0;width:100%;padding:12px;display:block}.planner-more button:hover{background:#f0f4f2}.planner-more button:disabled{opacity:.4}.planner-alert{color:#80491d;background:#fff4e7;border:1px solid #ead5b9;border-radius:7px;margin:10px 0;padding:12px 14px;font-size:.9rem;line-height:1.5}.planner-alert>div{gap:8px;margin-top:9px;display:flex}.planner-alert ul{margin:6px 0 0;padding-left:20px}.planner-notice{color:#285d48;background:#e7f3ec;border-radius:6px;justify-content:space-between;align-items:center;gap:12px;margin:10px 0;padding:9px 12px;font-size:.85rem;display:flex}.planner-notice button{background:0 0;border:0;font-size:1.1rem}.planner-table-wrap{background:#fff;border:1px solid #dce2e6;border-radius:8px;overflow:clip}.planner-table{border-collapse:collapse;text-align:left;table-layout:fixed;width:100%}.planner-table thead{z-index:2;position:sticky;top:-18px}.planner-table th{color:#63707c;background:#eef1f4;border-bottom:1px solid #dce2e6;padding:11px 14px;font-size:.8rem;font-weight:500}.planner-table td{vertical-align:middle;border-bottom:1px solid #e9edf0;padding:11px 14px}.planner-table tr:last-child td{border-bottom:0}.planner-table tr:hover{background:#f9fbfc}.planner-table tr.next-lesson{background:#edf3fc}.planner-table tr.next-lesson td:first-child{box-shadow:inset 3px 0 #6584aa}.planner-table tr.completed-lesson{background:#e6f4ea}.planner-table tr.completed-lesson:hover{background:#dcefe1}.planner-table th:first-child{width:122px}.planner-table th:nth-child(2){width:110px}.planner-table th:nth-child(4){width:115px}.planner-table th:nth-child(5){width:70px}.planner-date button{background:0 0;border:0;flex-direction:column;align-items:flex-start;gap:5px;padding:0;display:flex}.planner-date time{font-variant-numeric:tabular-nums;font-size:1.05rem;font-weight:650}.planner-date small{color:var(--muted);white-space:normal;font-size:.8rem}.subject-tag{white-space:nowrap;color:#406375;background:#eaf0f5;border-radius:4px;padding:4px 6px;font-size:.75rem;display:inline-block}.subject-tag.technology{color:#776137;background:#f5f0e6}.planner-topic>button{text-align:left;background:0 0;border:0;width:100%;padding:2px 0;line-height:1.45;display:block}.planner-topic strong{font-size:1rem;font-weight:550;display:block}.planner-topic span{color:#7a848e;margin-top:4px;font-size:.8rem;display:block}.planner-topic strong small{color:var(--muted);font-weight:400;display:inline}.slot-note{color:#7a848e;margin-top:4px;font-size:.8rem;display:block}.planner-open{color:var(--primary);background:0 0;border:0;padding:8px 0;font-size:.85rem!important}.lesson-status{white-space:nowrap;font-size:.8rem;display:inline-block}.lesson-status.complete{color:#598072}.lesson-status.partial{color:#ac6a23}.lesson-status.cancelled{color:#8c9299}.lesson-status.scheduled{color:#607389}.cancelled-lesson .planner-date time{color:#9aa1a8;text-decoration:line-through}.cancelled-lesson .planner-topic{color:#8c9299}.planner-empty{text-align:center;color:var(--muted);padding:30px}.planner-pending,.planner-history{background:#fff;border:1px solid #dddfda;border-radius:8px;margin:12px 0;padding:14px 16px}.planner-section-heading{justify-content:space-between;align-items:center;gap:12px;display:flex}.planner-section-heading>span{color:var(--muted);font-size:.8rem}.pending-row{border-bottom:1px solid #eceeea;align-items:center;gap:12px;padding:12px 0;display:flex}.pending-row:last-child{border-bottom:0}.pending-title{text-align:left;background:0 0;border:0;flex:1;padding:0}.pending-title strong{font-size:.9rem;font-weight:550;display:block}.pending-title small{color:#946228;margin-top:5px;font-size:.8rem;display:block}.pending-row>span{color:var(--muted);white-space:nowrap;font-size:.85rem}.planner-history p{gap:16px;margin:10px 0;font-size:.85rem;display:flex}.planner-history time{color:var(--muted);flex-shrink:0}.planner-dialog-host .modal-backdrop{z-index:50;background:#18292b35;justify-content:flex-end;align-items:stretch;padding:0}.planner-dialog-host .modal{background:#fff;border-radius:0;width:min(680px,100vw);max-width:none;height:100dvh;max-height:100dvh;padding:25px 28px;font-size:1rem;overflow:auto;box-shadow:-12px 0 35px #1b2a3a16}.planner-dialog-host .modal h2{margin:0 0 12px;padding-right:34px;font-size:1.4rem;line-height:1.4}.planner-dialog-host .modal .close{top:17px;right:17px}.lesson-meta{color:var(--muted);flex-wrap:wrap;gap:8px;margin-bottom:16px;font-size:.8rem;display:flex}.detail-tabs{border-bottom:1px solid #dce2e6;gap:14px;margin-bottom:16px;display:flex}.detail-tabs button{background:0 0;border:0;border-bottom:2px solid #0000;padding:10px 0;font-size:.85rem}.detail-tabs button.active{border-bottom-color:var(--primary);color:var(--primary);font-weight:600}.detail-controls{flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:18px;display:flex}.detail-controls .text-button{font-size:.85rem}.lesson-content section{margin-bottom:23px}.lesson-content h3{color:#285e4e;margin:0 0 10px;font-size:1rem}.lesson-content h4,.baseline-content h4{color:#707c86;margin:10px 0 5px;font-size:.85rem}.lesson-content p,.baseline-content p{white-space:pre-wrap;margin:4px 0;font-size:1rem;line-height:1.9}.lesson-content .teacher-roles{color:#5b6a63;background:#f4f7f6;border-radius:6px;margin-top:12px;padding:9px 12px;font-size:.85rem}.lesson-content details{color:var(--muted);font-size:.85rem;line-height:1.7}.lesson-content summary,.planner-form summary{cursor:pointer}.baseline-content{background:#f8f7f3;border:1px solid #e7e1d8;border-radius:6px;margin-top:18px;padding:14px}.baseline-content h3{font-size:1rem}.baseline-content p{font-size:.85rem}.baseline-list p{border-bottom:1px solid var(--line);flex-direction:column;gap:5px;margin:0;padding:12px 0;font-size:.9rem;line-height:1.5;display:flex}.baseline-list time{color:var(--muted);font-size:.8rem}.planner-form{flex-direction:column;gap:16px;display:flex}.planner-form>label,.planner-form-grid>label{color:#65727b;flex-direction:column;gap:7px;font-size:.85rem;display:flex}.planner-form input,.planner-form select,.planner-form textarea,.planner-inline-field select{font:inherit;color:var(--ink);background:#fff;border:1px solid #d7dfe2;border-radius:6px;width:100%;min-height:46px;padding:9px 10px;font-size:1rem;line-height:1.6}.planner-form textarea{resize:vertical;font-size:1rem}.planner-form p{margin:0;font-size:.85rem;line-height:1.65}.planner-form-grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.planner-form fieldset{border:1px solid var(--line);border-radius:6px;margin:14px 0;padding:12px;font-size:.85rem}.planner-form .checkbox-label{color:var(--ink);flex-direction:row;align-items:center;gap:8px;margin:6px 0;display:flex}.planner-form .checkbox-label input{width:17px;height:17px;min-height:0;accent-color:var(--primary);flex-shrink:0}.prerequisite-options{max-height:210px;overflow:auto}.planner-form details{font-size:.85rem}.planner-form details>div{margin-top:12px}.planner-footer{background:#fff;border-top:1px solid #e9edf0;justify-content:flex-end;margin-top:6px;padding:14px 0;display:flex;position:sticky;bottom:-25px}.planner-inline-field{color:var(--muted);margin-bottom:12px;font-size:.85rem;display:block}.planner-inline-field select{margin-top:6px}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.planner-page>div,.planner-page>p,.planner-page>details,.planner-page>section{flex-shrink:0}.planner-page>.planner-table-wrap{flex:1;min-height:130px;overflow:auto}.planner-page .planner-table thead{top:0}.planner-page>.planner-pending,.planner-page>.planner-history{max-height:30vh;overflow:auto}.planner-page>.planner-alert{max-height:130px;overflow:auto}.planner-page>.planner-note{max-height:100px;overflow:auto}@media (width<=1050px){.planner-page{padding:15px 16px}.planner-table th:first-child{width:106px}.planner-table th:nth-child(2){width:92px}.planner-table th:nth-child(4){width:100px}.planner-table th,.planner-table td{padding:11px 10px}.planner-actions .btn{padding:0 10px}.planner-table thead{top:-15px}}@media (width<=700px){.planner-page{padding:12px 10px}.planner-toolbar{flex-wrap:wrap;gap:8px}.planner-filter{flex-basis:100%;order:4}.planner-filter input{max-width:none}.planner-table th:first-child{width:85px}.planner-table th:nth-child(2){width:0;padding:0}.planner-table th:nth-child(4){width:80px}.planner-table th:nth-child(5){width:0;padding:0}.planner-table td:nth-child(2),.planner-table td:nth-child(5){display:none}.planner-table th,.planner-table td{padding:10px 8px}.planner-section-heading>span{display:none}.pending-row{flex-wrap:wrap;gap:8px}.planner-dialog-host .modal{width:100%;padding:20px 18px}.planner-footer{bottom:-20px}.detail-tabs{gap:12px}.planner-history p{flex-direction:column;gap:4px}.planner-table thead{top:-12px}}.planner-comparison{grid-template-columns:1fr 1fr;gap:20px;display:grid}.planner-comparison h3{margin:8px 0 12px;font-size:1rem}.planner-comparison ol{margin:0;padding-left:22px}.planner-comparison li{padding:5px 0;font-size:.85rem;line-height:1.6}.planner-comparison .baseline-list{max-height:none}.planner-comparison .baseline-list p{font-size:.85rem}@media (width<=600px){.planner-comparison{grid-template-columns:1fr}}@media (width<=760px){.planner-page h1{font-size:1.35rem}.planner-toolbar{flex-wrap:wrap}.planner-filter{flex-basis:100%;order:4}}.planner-more summary::-webkit-details-marker{display:none}.planner-more summary:focus-visible,.planner-more button:focus-visible{outline:2px solid var(--primary);outline-offset:2px}.planner-more button.selected{color:var(--primary);background:#edf5f0}.planner-more>div{max-height:min(70dvh,400px);overflow:auto}.school-term-1{--term-color:#4b79a6;--term-bg:#eaf2fb;--term-ink:#315b83}.school-term-2{--term-color:#9270af;--term-bg:#f2ecf8;--term-ink:#704c8d}.school-term-3{--term-color:#bb8738;--term-bg:#fbf1df;--term-ink:#805a20}.planner-table .planner-term-heading th{background:var(--term-bg);width:auto;color:var(--term-ink);border-top:4px solid var(--term-color);border-inline:5px solid var(--term-color);padding:12px 14px}.planner-term-heading th>div{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;display:flex}.planner-term-heading strong{font-size:.95rem}.planner-term-heading span{font-size:.8rem}.planner-table .term-lesson td:first-child{border-left:5px solid var(--term-color)}.planner-table .term-lesson td:last-child{border-right:5px solid var(--term-color)}.planner-table tr.term-end td{border-bottom:4px solid var(--term-color)}@media (width<=700px){.planner-table .term-lesson td:nth-child(4){border-right:5px solid var(--term-color)}}.lesson-ai{background:#f0f6f3;border:1px solid #bdcfc8;border-radius:8px;flex-direction:column;gap:8px;padding:12px 14px;display:flex}.lesson-ai-actions{flex-wrap:wrap;align-items:center;gap:14px;display:flex}.lesson-ai-button{color:#245945;background:#e0eee7;border-color:#78a38f;font-weight:650}.lesson-ai p{color:#51675d}.lesson-ai .error{color:#a03929}.planner-form fieldset.lesson-edit-fields{border:0;flex-direction:column;gap:16px;min-width:0;margin:0;padding:0;display:flex}.lesson-edit-fields>label{color:#65727b;flex-direction:column;gap:7px;font-size:.85rem;display:flex}.lesson-edit-fields:disabled{opacity:.65}.app.grades-active{height:100%;min-height:0;overflow:hidden}.grades-page{flex-direction:column;flex:1;gap:10px;min-width:0;min-height:0;padding:14px 18px;display:flex;overflow:hidden}.grade-toolbar,.grade-tools,.grade-settings-heading,.grade-settings-footer{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.grade-toolbar h1{margin:0 auto 0 0;font-size:1.3rem}.grade-toolbar label{color:var(--muted);align-items:center;gap:6px;font-size:.8rem;display:flex}.grade-toolbar select,.grade-tools input,.grade-item input{font:inherit;border:1px solid var(--line);min-height:44px;color:var(--ink);background:#fff;border-radius:8px;padding:9px}.grade-toolbar select{max-width:160px}.grade-toolbar .btn{min-height:44px;padding:0 12px;font-size:.85rem}.grade-status{height:46px;color:var(--muted);flex:none;align-items:center;gap:10px;font-size:.72rem;display:flex;overflow:auto}.grade-status span:first-child,.grade-status button{white-space:nowrap}.grade-tools{font-size:.82rem}.grade-tools input{width:230px}.grade-draft{color:#9c6117;background:#fff2dc;border-radius:8px;padding:5px 9px}.grade-scroll{border:1px solid var(--line);overscroll-behavior:contain;background:#fff;border-radius:12px;flex:1;min-height:0;position:relative;overflow:auto}.grade-table{border-collapse:separate;border-spacing:0;width:100%;font-size:.88rem}.grade-table th,.grade-table td{text-align:center;background:#fff;border-bottom:1px solid #e7e7e0;border-right:1px solid #eee;min-width:138px;padding:9px 8px}.grade-table thead th{z-index:3;background:#e9f0eb;height:66px;position:sticky;top:0}.grade-table small{color:var(--muted);margin-top:4px;font-size:.7rem;font-weight:400;display:block}.grade-table .grade-number{z-index:2;width:58px;min-width:58px;max-width:58px;position:sticky;left:0}.grade-table .grade-name{z-index:2;width:115px;min-width:115px;max-width:115px;position:sticky;left:58px;box-shadow:3px 0 5px #00000008}.grade-table thead .grade-number,.grade-table thead .grade-name{z-index:4;background:#e9f0eb}.grade-table tbody tr:nth-child(2n)>td,.grade-table tbody tr:nth-child(2n)>th{background:#fafbf9}.grade-cell input{width:100%;max-width:115px;min-height:44px;font:inherit;text-align:center;background:#fff;border:1px solid #ddd;border-radius:7px}.grade-cell input:focus{border-color:var(--primary);outline:3px solid #6fab9880}.grade-cell input[aria-invalid=true]{border-color:#b94a36}.grade-cell small{color:#b94a36}.grade-total{color:var(--primary);font-weight:650}.grade-settings{border:1px solid var(--line);background:#fff;border-radius:12px;flex:1;min-height:0;padding:18px;overflow:auto}.grade-settings h2{margin:0 auto 0 0;font-size:1.1rem}.grade-settings p{font-size:.85rem}.grade-item{border-bottom:1px solid var(--line);grid-template-columns:minmax(150px,1fr) 95px 95px auto;align-items:end;gap:10px;padding:15px 0;display:grid}.grade-item label{flex-direction:column;gap:5px;font-size:.8rem;display:flex}.grade-item input{width:100%}.grade-item.archived{background:#f2f2ee;padding:15px 8px}.grade-item-actions{gap:5px;display:flex}.grade-item-actions button{border:1px solid var(--line);background:#fff;border-radius:7px;min-width:40px;min-height:44px}.grade-item>small{color:var(--muted);grid-column:1/-1}.grade-settings-footer{background:#fff;justify-content:flex-end;padding:15px 0;position:sticky;bottom:-18px}@media (width<=650px){.grades-page{padding:10px}.grade-toolbar{gap:7px}.grade-toolbar h1{width:100%}.grade-toolbar label{font-size:.65rem}.grade-toolbar select{max-width:118px}.grade-item{grid-template-columns:1fr 80px 80px}.grade-item-actions{grid-column:1/-1}.grade-tools input{width:180px}}.reference-documents-dialog .modal.homework-modal.wide{flex-direction:column;width:min(1440px,96vw);height:min(1100px,94dvh);max-height:94dvh;padding:20px;display:flex;overflow:hidden}.reference-documents-dialog .modal h2{flex:none;margin:0 48px 16px 0;padding:0;font-size:1.4rem}.reference-document-toolbar{flex-wrap:wrap;flex-shrink:0;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;display:flex}.reference-document-tabs{background:var(--bg);border-radius:12px;gap:4px;padding:4px;display:flex}.reference-document-tabs button{min-height:44px;color:var(--muted);font:inherit;background:0 0;border:0;border-radius:8px;padding:8px 14px;font-weight:650}.reference-document-tabs button[aria-pressed=true]{background:var(--panel);color:var(--primary);box-shadow:0 1px 4px #0002}.reference-document-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.reference-document-actions label{color:var(--muted);align-items:center;gap:8px;font-size:.9rem;display:flex}.reference-document-actions select{background:var(--panel);border:1px solid var(--line);max-width:150px;min-height:44px;color:var(--ink);font:inherit;border-radius:8px;padding:6px 10px}.reference-document-actions .btn{white-space:nowrap;justify-content:center;align-items:center;min-height:44px;text-decoration:none;display:inline-flex}.reference-document-stage{overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;border:1px solid var(--line);background:#e9edf1;border-radius:12px;flex:1 1 0;min-width:0;min-height:0;overflow:auto}.reference-document-stage img{max-width:none;height:auto;display:block}.reference-document-fit img{object-fit:contain;width:100%;height:100%}.reference-document-zoomed img{margin:0 auto}.reference-document-message{text-align:center;min-height:100%;color:var(--muted);flex-direction:column;justify-content:center;align-items:center;gap:16px;padding:24px;display:flex}.reference-document-caption{color:var(--muted);flex:none;margin:10px 0 0;font-size:.85rem}@media (width<=600px){.reference-documents-dialog .modal.homework-modal.wide{padding:16px 12px}.reference-documents-dialog .modal h2{font-size:1.15rem}.reference-document-toolbar{gap:8px}.reference-document-tabs{width:100%}.reference-document-tabs button{flex:1}.reference-document-actions{justify-content:space-between;gap:6px;width:100%}.reference-document-actions label{gap:4px}.reference-document-actions select{max-width:115px}.reference-document-actions .btn{padding:6px 10px}}
