:root{--mq-slate:#102825;--mq-panel:#1c3531;--mq-ink:#f5eddb;--mq-muted:#c8d9d0;--mq-gold:#efce83;--mq-line:#537568;--mq-paper:#f7f3e9;--mq-space:16px;--mq-radius:16px;--mq-fast:160ms;--mq-shadow:0 12px 36px #071c2330}
.mq-emblem{display:inline-block;flex:0 0 38px;width:38px;height:56px;background:url('interface/emblems.webp') no-repeat;background-size:300% 200%;vertical-align:middle}.emblem-0{background-position:0 0}.emblem-1{background-position:50% 0}.emblem-2{background-position:100% 0}.emblem-3{background-position:0 100%}.emblem-4{background-position:50% 100%}.emblem-5{background-position:100% 100%}
body[data-surface=teacher]{background:#102522 url('interface/command-wall.webp') center top/cover fixed;color:var(--mq-ink)}
body[data-surface=teacher] .teacher-page{max-width:1600px;width:100%;padding:20px 24px 60px;display:grid;grid-template-columns:230px minmax(0,1fr);gap:24px;margin:auto;background:none}
.teacher-page>.command-header{grid-column:1/-1;position:static;background:#112e2bea;border:1px solid var(--mq-line);border-radius:var(--mq-radius);padding:12px 18px;color:var(--mq-ink);min-height:76px;box-shadow:var(--mq-shadow)}
.teacher-page .command-header .brand{color:var(--mq-ink);font-size:20px}.teacher-page .command-header .flex{gap:10px;flex-wrap:wrap}.teacher-page .command-header .brand-logo{width:38px;height:38px}
.teacher-page>.command-main-nav{grid-column:1;display:flex;flex-direction:column;align-self:start;position:sticky;top:16px;margin:0;padding:10px;gap:4px;background:#102b27ee;border:1px solid #647866;border-radius:18px;max-height:calc(100dvh - 32px);overflow:auto}
.command-main-nav button{display:flex;align-items:center;gap:9px;text-align:left;white-space:normal;min-height:62px;border:1px solid transparent;background:none;color:#e5eadc;padding:5px 10px;font-weight:650}.command-main-nav button[aria-current=page]{background:#344a38;border-color:#d1ab62;color:#fff5d9;box-shadow:inset 3px 0 #efce83}.command-main-nav button:hover{background:#29423a}.command-main-nav .mq-emblem{transition:filter var(--mq-fast)}.command-main-nav button:hover .mq-emblem,.command-main-nav button[aria-current=page] .mq-emblem{filter:drop-shadow(0 0 7px #dfb34d60)}
.command-content{grid-column:2;min-width:0}.command-page{padding:24px;background:#16312def;border:1px solid #65806b;border-radius:20px;box-shadow:var(--mq-shadow)}.command-page[hidden]{display:none!important}.command-page-heading{display:flex;align-items:center;gap:16px;border-bottom:1px solid #617762;padding-bottom:20px;margin-bottom:24px}.command-page-heading h1{font-size:clamp(24px,3vw,34px);margin:0;line-height:1.2}.command-page-heading .eyebrow{margin:0 0 5px;color:var(--mq-gold)}
.teacher-page .command-page :is(.school-control,.admin-hub,.teacher-roster,.command-expeditions,.command-routes,.finale-command,.royale-command,.alpha-command,.thief-teacher,.monster-teacher,.compass-command,.student-detail){padding:20px;margin:0 0 20px;border:1px solid #607463;border-radius:14px;background:#1d3833;color:var(--mq-ink);box-shadow:none;min-width:0}
.teacher-page .command-page :is(h1,h2,h3,h4,p,label,legend,td,th,summary,small,.muted,.small,.group-label){color:inherit}.teacher-page .command-page h2{font-size:24px}.teacher-page .command-page .eyebrow{color:#efce83}.teacher-page :is(.school-group,.school-staff,.stat,.roster-bulk,.compass-card,.report-task,.chapter-report,.command-page>article){background:#23433a;color:var(--mq-ink);border:1px solid #607762;box-shadow:none;border-radius:14px;padding:16px}.teacher-page .stat-grid{margin:0 0 24px;gap:14px}.teacher-page .stat strong{color:#ffe3a5}.teacher-page .stat-icon{display:none}.teacher-page .command-page :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#f6f2e7;color:#173b31;border:1px solid #9daf9f;border-radius:10px;min-height:44px;max-width:100%}.teacher-page :is(.badge,.login-code-display){background:#345347;color:#fff4da;border:1px solid #a29562}.teacher-page .students :is(td,th){border-color:#4d6a5b}.teacher-page .students tr,.teacher-page .students tr:nth-child(even){background:#1c3630}.teacher-page .students tr:hover{background:#2d4b40}.teacher-page .students td>button{color:#fff1d0;background:none}.teacher-page .table-wrap{border:1px solid #6a7968;border-radius:12px;max-width:100%;overflow:auto}.teacher-page .students{min-width:680px}.teacher-page .students td{padding:14px 10px;vertical-align:top}.teacher-page .student-account-actions{display:flex;flex-direction:column;gap:10px}.teacher-page .student-account-actions .danger{order:9;margin-top:8px}.teacher-page .roster-bulk{margin:18px 0}.teacher-page .school-group-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}.teacher-page .school-key{overflow-wrap:anywhere}
.teacher-page :is(button,.button){min-height:42px;transition:background var(--mq-fast),box-shadow var(--mq-fast);border-radius:10px}.teacher-page :is(button.ghost,.linkbtn){background:#29473c;color:#fff2d6;border:1px solid #8c9675}.teacher-page button.danger{background:#552e2a;color:#ffe1d8;border:1px solid #c38b78}.teacher-page button.yellow,.teacher-page .button.yellow{background:#edca78;color:#173b31}.teacher-page button:disabled{opacity:.55;cursor:not-allowed}.teacher-page .action-row,.teacher-page .flex{gap:12px}.teacher-page label{display:block;margin-block:12px 6px}.teacher-page .school-check{display:flex;align-items:center}.teacher-page input[type=checkbox],.teacher-page input[type=radio]{width:20px;height:20px;flex-shrink:0}
.command-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.command-shortcuts button{display:grid;justify-items:start;text-align:left;gap:10px;padding:20px;background:#28483e;color:#fff2d5;border:1px solid #91a078}.command-shortcuts small{font-weight:400;line-height:1.5}.command-shortcuts .mq-emblem{width:64px;height:96px}.command-welcome{padding:20px 0 0;line-height:1.6}.command-world-nav{display:flex;gap:8px;overflow-x:auto;padding-bottom:16px;margin-bottom:20px}.command-world-nav button{flex-shrink:0;max-width:240px;background:#29473d;color:#f7efd9;border:1px solid #72866d;padding:10px 16px}.command-world-nav button[aria-current=page]{background:#f0d18a;color:#173c30}.command-page>button{margin:8px 10px 8px 0;padding:16px 20px}.roster-pages{display:flex;gap:16px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:20px}.roster-pages label{margin:0}.command-page .teacher-tools-anchor{display:none}
body[data-surface=student] .sidebar{background:#13372f url('interface/command-wall.webp') center/auto 100%;color:#f6edda;border-right:1px solid #998154}body[data-surface=student] .sidebar .brand,body[data-surface=student] .sidebar-note{color:#fff0d1}body[data-surface=student] .navbtn{color:#e3eadd}body[data-surface=student] .navbtn small{color:#bed5c5}body[data-surface=student] .navbtn.active{background:#345144;color:#ffe5a8;border-color:#e4c785}.student-tools{display:grid;gap:4px;border-top:1px solid #75856b;margin:18px 0;padding-top:12px}.student-tools button{display:flex;align-items:center;gap:8px;background:none;color:#f4eddd;border:1px solid transparent;text-align:left;padding:2px 9px;min-height:44px}.student-tools .mq-emblem{width:28px;height:42px;flex-basis:28px}.student-tools button:hover{background:#35503d;border-color:#c8ae74}.student-tools button:focus-visible{outline:3px solid #ffdf8d;outline-offset:1px}
body[data-surface=student] .workspace{background:#f3f0e5}body[data-surface=student] .workspace>.topbar{background:#e9ebdf;border-bottom:1px solid #acb6a2}body[data-surface=student] :is(.task-card,.chapter-card,.journey-choose,.journey-journal){border-color:#9ba78f;box-shadow:0 5px 18px #263c2610;border-radius:18px}body[data-surface=student] .focused-learning{background:#f7f4eb}body[data-surface=student] .focused-learning .task-card{box-shadow:none}body[data-surface=student] .mining-dock{border-top:2px solid #b29454;background:#15362ff7}body[data-surface=student] .footer-identity{min-width:0}
body[data-surface] :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #a66507;outline-offset:3px}body[data-surface=teacher] :is(button,a,summary):focus-visible{outline-color:#ffe29a}body[data-surface] dialog{border:1px solid #9f8655;border-radius:18px;box-shadow:0 25px 100px #031a24aa}body[data-surface] dialog:not(.royale-dialog):not(.mine-visit-dialog):not(.housing-dialog){background:#f7f2e6;color:#18392f}body[data-surface] dialog .modal-head{background:#e5e9dc;border-bottom:1px solid #adb69c}body[data-surface] dialog .modal-body{min-width:0;overflow-wrap:anywhere}body[data-surface] dialog :is(input,select,textarea){max-width:100%}body[data-surface] dialog .action-row{gap:12px;flex-wrap:wrap}body[data-surface] .error:empty{display:none}body[data-surface] .error:not(:empty){border-left:4px solid #a93927;padding:12px;background:#fff0e8;color:#7b271b}body[data-surface] .table-wrap:focus-visible{outline:3px solid #d6a842}.interface-state-art{width:64px;height:96px;object-fit:contain;float:right;margin:0 0 16px 16px}
.staff-shield{position:fixed;inset:0;z-index:1900;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:24px;text-align:center;background:#142e29;color:#f7eddb}.staff-shield img{object-fit:contain;animation:mq-lamp 2s ease-in-out infinite}.staff-shield h1{font-size:28px}body[data-session-locked] #app,body[data-session-locked] dialog{visibility:hidden}body[data-session-locked=hidden]{background:#142e29}body[data-session-locked=hidden] .staff-shield{visibility:hidden}@keyframes mq-lamp{50%{filter:drop-shadow(0 0 12px #efca76)}}
.interface-hidden :is(.mq-emblem,.staff-shield img){animation-play-state:paused!important}@media(prefers-reduced-motion:reduce){.staff-shield img{animation:none}.command-main-nav .mq-emblem,.teacher-page :is(button,.button){transition:none}}
@media(max-width:1000px){body[data-surface=teacher] .teacher-page{grid-template-columns:185px minmax(0,1fr);gap:14px;padding:12px}.command-page{padding:16px}.command-shortcuts{grid-template-columns:1fr}.command-shortcuts button{grid-template-columns:48px 1fr;gap:6px 16px}.command-shortcuts .mq-emblem{grid-row:1/3;width:42px;height:63px}.command-shortcuts small{grid-column:2}.command-header{flex-wrap:wrap}}
@media(max-width:700px){body[data-surface=teacher] .teacher-page{display:block;padding:8px}.teacher-page>.command-main-nav{position:static;display:flex;flex-direction:row;overflow-x:auto;border-radius:12px;margin:12px 0;padding:6px}.command-main-nav button{flex-direction:column;gap:0;text-align:center;font-size:12px;min-width:92px;padding:6px}.command-main-nav .mq-emblem{height:42px;width:28px;flex-basis:42px}.command-page{padding:12px}.command-page-heading{gap:10px}.teacher-page .command-header .flex{display:flex}.teacher-page .command-header .flex button{font-size:12px;padding:8px}.teacher-page .command-page :is(.teacher-roster,.school-control,.student-detail){padding:10px}.teacher-page .stat-grid{grid-template-columns:1fr}.teacher-page .command-header .brand{font-size:17px}.student-tools{display:flex!important;overflow-x:auto;margin:4px 0;padding-top:4px}.student-tools button{flex-shrink:0;font-size:12px}.student-tools .mq-emblem{display:none}.student-tools button{min-height:36px}body[data-surface=student] .sidebar-note{display:none}.roster-pages{align-items:stretch}.command-world-nav button{font-size:12px;max-width:160px}}
@media print{body[data-surface=teacher]{background:white!important;color:black!important}.command-main-nav,.command-header,.command-page-heading,.roster-pages,.student-tools{display:none!important}.teacher-page,.command-content,.command-page{display:block!important;background:white!important;color:black!important;border:0!important;box-shadow:none!important}.command-page[hidden]{display:none!important}}

.teacher-page>.command-main-nav{flex-wrap:nowrap}.teacher-page>.command-main-nav button{flex:0 0 auto;min-height:62px;height:auto;min-width:0}.teacher-page>.command-main-nav button[aria-current=page]{color:#fff3d3}.teacher-page .command-page>p{color:#d3ded2}@media(max-width:700px){.teacher-page>.command-main-nav button{min-width:92px;min-height:66px;flex:0 0 92px}}

.teacher-page .group-key-display{background:#122f29;color:#f6eedb;border:1px solid #7d886b}.teacher-page .group-key-display .eyebrow{color:#edce86}.teacher-page .group-key-display code{color:#ffe1a0}.teacher-page .command-page>article{margin-bottom:18px}
