/* Personal appearance tokens and settings drawer. */
:root{
  --ui-accent:#708f7d;--ui-accent-deep:#496a57;--ui-accent-light:#adcab6;--ui-soft:#e7eee5;
  --ui-surface:#fffefa;--ui-elevated:#fafcf7;--ui-sidebar:#f7f8f1ee;--ui-inset:#edf2e8;
  --ui-overlay:#f5f5eff0;--ui-shadow:#334b3514;--ui-heading:#485f4d;--ui-on-accent:#fff;--ui-on-accent-light:#172a1c;
  --paper:#f5f5ef;--white:var(--ui-surface);--ink:#39483f;--muted:#707e71;--line:#dfe6d9;
  --brick:var(--ui-accent-deep);--brick-light:var(--ui-soft)
}
html[data-ui-palette="lavender"]{--ui-accent:#9480b2;--ui-accent-deep:#786196;--ui-accent-light:#cab8e4;--ui-soft:#eee8f6;--ui-heading:#655376}
html[data-ui-palette="ocean"]{--ui-accent:#638ead;--ui-accent-deep:#3d6b8d;--ui-accent-light:#a8cee4;--ui-soft:#e2edf4;--ui-heading:#405f75}
html[data-ui-palette="rose"]{--ui-accent:#b37e94;--ui-accent-deep:#8f546f;--ui-accent-light:#e1b2c5;--ui-soft:#f4e6ec;--ui-heading:#785465}
html[data-ui-palette="amber"]{--ui-accent:#aa8d57;--ui-accent-deep:#82672f;--ui-accent-light:#dfc58d;--ui-soft:#f5eddd;--ui-heading:#75613e}
html[data-ui-palette="slate"]{--ui-accent:#7a9298;--ui-accent-deep:#526e75;--ui-accent-light:#bad1d6;--ui-soft:#e7eef0;--ui-heading:#50676d}
html[data-ui-mode="dark"]{
  color-scheme:dark;--paper:#141e1b;--ui-surface:#202c27;--ui-elevated:#26352d;--ui-sidebar:#1b2822f5;--ui-inset:#19251f;
  --white:var(--ui-surface);--ink:#e2ece4;--muted:#aabdae;--line:#3e5143;--ui-heading:#deeadf;
  --ui-overlay:#141e1bf2;--ui-shadow:#0000002e;--brick:var(--ui-accent-light);--brick-light:#34443a;
  --green:#abd0ae;--green-light:#2b4331;--amber:#e4c58f;--amber-light:#443d2c;--red:#e4aaa1;--red-light:#48342f;
  --ui-soft:color-mix(in srgb,var(--ui-accent-light) 13%,#202c27)
}
html[data-ui-mode="light"]{color-scheme:light}
html[data-ui-contrast="high"]{--ink:#192c20;--muted:#344d3b;--line:#7f9579;--ui-heading:#162d1e;--ui-overlay:#f5f5effa}
html[data-ui-mode="dark"][data-ui-contrast="high"]{--ink:#f4fff5;--muted:#d2e8d8;--line:#819e88;--ui-heading:#f4fff5;--ui-overlay:#101b15fa}
/* Industrial: sampled Nut Brown, Thunder Cloud and Windsor Cream reference. */
html[data-ui-palette="industrial"]{
  --ui-accent:#725140;--ui-accent-deep:#725140;--ui-accent-light:#bba18d;--ui-soft:#ead6c4;
  --paper:#f2e1d1;--ui-surface:#fbf5ef;--ui-elevated:#fffaf5;--ui-sidebar:#f2e1d1f5;--ui-inset:#eddfd2;
  --ink:#35343a;--muted:#625650;--line:#ccbaaa;--ui-heading:#525157;--ui-overlay:#f2e1d1f0;--ui-shadow:#72514014;
  --ui-on-accent:#fffaf5;--ui-on-accent-light:#262429;--ui-hero-base:#525157;--ui-hero-start:#352c29e6;--ui-hero-end:#72514099
}
html[data-ui-palette="industrial"][data-ui-mode="dark"]{
  --paper:#262429;--ui-surface:#343137;--ui-elevated:#3b383e;--ui-sidebar:#2c292ef5;--ui-inset:#2b282d;
  --ink:#f2e1d1;--muted:#ccb9ab;--line:#665b55;--ui-heading:#f2e1d1;--ui-overlay:#262429f2;--ui-shadow:#0000002e;
  --ui-accent:#c49d80;--ui-accent-deep:#725140;--ui-accent-light:#f2e1d1;--ui-soft:#4d403a;--brick-light:#4d403a
}
/* Elegant: the reference's four blacks/charcoals with bronze and gold. */
html[data-ui-palette="elegant"]{
  --ui-accent:#a76b09;--ui-accent-deep:#272a31;--ui-accent-light:#dda74f;--ui-soft:#f4e4c5;
  --paper:#f6f2e9;--ui-surface:#fffdf8;--ui-elevated:#fffaf0;--ui-sidebar:#f4edddf5;--ui-inset:#f0e5cf;
  --ink:#181619;--muted:#61573f;--line:#d8c7a8;--ui-heading:#181b22;--ui-overlay:#f6f2e9f0;--ui-shadow:#0b0b0d14;
  --ui-on-accent:#dda74f;--ui-on-accent-light:#0b0b0d;--ui-hero-base:#181619;--ui-hero-start:#0b0b0de6;--ui-hero-end:#272a3199
}
html[data-ui-palette="elegant"][data-ui-mode="dark"]{
  --paper:#0b0b0d;--ui-surface:#181619;--ui-elevated:#181b22;--ui-sidebar:#0b0b0df5;--ui-inset:#272a31;
  --ink:#f6f0e2;--muted:#c6bbab;--line:#514b3f;--ui-heading:#dda74f;--ui-overlay:#0b0b0df2;--ui-shadow:#0000002e;
  --ui-accent:#a76b09;--ui-accent-deep:#dda74f;--ui-accent-light:#dda74f;--ui-soft:#302719;--brick-light:#302719;--ui-on-accent:#0b0b0d
}
html[data-ui-palette="industrial"][data-ui-contrast="high"]{--ink:#262429;--muted:#40342c;--line:#8a7668;--ui-heading:#262429;--ui-overlay:#f2e1d1fa}
html[data-ui-palette="industrial"][data-ui-mode="dark"][data-ui-contrast="high"]{--ink:#fff8f0;--muted:#f0dfcf;--line:#bb9982;--ui-heading:#fff8f0;--ui-overlay:#262429fa}
html[data-ui-palette="elegant"][data-ui-contrast="high"]{--ink:#0b0b0d;--muted:#403414;--line:#8e6a2e;--ui-heading:#0b0b0d;--ui-overlay:#f6f2e9fa}
html[data-ui-palette="elegant"][data-ui-mode="dark"][data-ui-contrast="high"]{--ink:#fff8e8;--muted:#f0dfb9;--line:#bd8e44;--ui-heading:#ffcf78;--ui-overlay:#0b0b0dfa}
html[data-ui-font="merriweather"]{--sans:Merriweather,Georgia,serif;--serif:Merriweather,Georgia,serif}
html[data-ui-font="system"]{--sans:system-ui,-apple-system,"Segoe UI",sans-serif;--serif:system-ui,-apple-system,"Segoe UI",sans-serif}
html[data-ui-font="arial"]{--sans:Arial,Helvetica,sans-serif;--serif:Arial,Helvetica,sans-serif}
html[data-ui-font="georgia"]{--sans:Georgia,"Times New Roman",serif;--serif:Georgia,"Times New Roman",serif}
body{--ui-wallpaper-tint:color-mix(in srgb,var(--paper) calc(100% - var(--ui-wallpaper-opacity,6%)),transparent);background-color:var(--paper);background-image:linear-gradient(var(--ui-wallpaper-tint),var(--ui-wallpaper-tint)),var(--daily-photo,none)}
.sidebar{background:var(--ui-sidebar);border-color:var(--line)}
.brandname{color:var(--ink)}.brandname span{color:var(--muted)}
.topbar{background:var(--ui-sidebar);border-color:var(--line)}
.classpick,.search,.field input,.field select,.field textarea,.datepick,.option-editor>input:not([type="radio"]),.question-toolbar select,.question-editor>textarea{background:var(--ui-elevated);color:var(--ink);border-color:var(--line)}
.classdetail,.subtitle,.classmeta,.smalltext,.field label,.field small,.subtle,.profile small,.eyebrow{color:var(--muted)}
.titleline h1,.panel-heading h2,.journeycard h2,.materialempty h3{color:var(--ui-heading)}
.section,.panel,.stat,.studygrid,.assessmentcard,.ws-card,.question-editor,.logincard,.modal{background:var(--ui-surface);border-color:var(--line);box-shadow:0 8px 30px var(--ui-shadow)}
.btn,.mobilemenu,.navclose,.mode{background:var(--ui-elevated);color:var(--ink);border-color:var(--line)}
.btn.primary,.btn.dark{background:var(--ui-accent-deep);border-color:var(--ui-accent-deep);color:var(--ui-on-accent)}
.nav button{color:var(--muted)}.nav button.active{background:var(--ui-soft);color:var(--brick);box-shadow:none}
.nav button.active .navnum,.navnum{background:var(--ui-inset);color:var(--muted)}
.sidecard,.classpulse,.lessonlist{background:var(--ui-inset);border-color:var(--line)}
.sidecard p,.sidecard small,.profile b{color:var(--ink)}
.lessonpick{border-color:var(--line)}.lessonpick.selected{background:var(--ui-soft);box-shadow:inset 4px 0 var(--ui-accent)}
.lessonintro{background:var(--ui-surface)}.lessonpick small,.lessonnumber,.lessonintro p,.materialdetails p{color:var(--muted)}
.learnerstrip{background:var(--ui-surface);border-color:var(--line)}.learneridentity select,.learneridentity b{color:var(--ink)}
.avatar,.stat .iconbox{background:var(--ui-inset);border-color:var(--line);color:var(--muted)}
.sheet th,.sheet .metrichead,.sheet td.metric,.course th{background:var(--ui-inset);color:var(--muted);border-color:var(--line)}
.sheet th .sessno{color:var(--ink)}.sheet td,.sheet td.student,.sheet td.current{background:var(--ui-surface);border-color:var(--line)}
.sheet th.sessionhead.current,.course tr.activitynext{background:var(--ui-soft)}
.course tr.activitydone{background:var(--green-light)}
.sheet th .sessdate,.sheet .studentname,.course .week,.stat .statlabel,.stat .statnum span{color:var(--muted)}
.course .focus,.nextlabel{color:var(--brick)}.mark{background-color:var(--ui-inset);color:var(--muted)}
.answer-option,.response-text{background:var(--ui-elevated);border-color:var(--line);color:var(--ink)}
.answer-option:has(input:checked){background:var(--ui-soft);border-color:var(--ui-accent)}
.modal .x{background:var(--ui-inset);color:var(--ink)}
.drive-note{background:var(--ui-inset);color:var(--muted)}
.scoreorb{background:radial-gradient(circle at center,var(--ui-surface) 59%,transparent 60%),conic-gradient(var(--ui-accent-light),#b5c6a6,#cbb091,var(--ui-accent-light))}
.scoreorb b,.overallpill{color:var(--brick)}.scoreorb>span,.weightlabels,.meterlabel,.questmeter small,.score-rule,.pendingnote,.mvp-person small,.mvp-points small,.questmeter .meterlabel strong{color:var(--muted)}
.weightedtrack,.metertrack,.bar{background:var(--ui-inset)}
.questmeter .metertrack i,.bar i{background:var(--ui-accent)}
.streaknote b,.streaknote small,.badge b,.badge small{color:var(--muted)}
.streakpill,.streakpill.restart{background:var(--ui-inset);border-color:var(--line);color:var(--ink)}
.forumtabs .btn.dark{background:var(--ui-accent-deep);color:var(--ui-on-accent)}
.guildbanner,.threadlist,.threadpane,.threadpick,.forumpost,.raidcard,.badgepanel,.joinpanel{background:var(--ui-surface);border-color:var(--line);color:var(--ink)}
.guildbanner h2,.guildbanner p,.guildempty h3,.guildempty p,.threadpick h3,.threadpick p,.threadpick small,.postauthor b,.postauthor small,.forumpost p,.threadheader .smalltext,.raidcard p,.closednote{color:var(--muted)}
.threadpick.selected,.threadpick:hover,.closednote{background:var(--ui-inset)}
.replyform textarea{background:var(--ui-elevated);color:var(--ink);border-color:var(--line)}
.threadheader{background:var(--ui-inset)}
.threadheader h2,.guildbanner h2,.threadpick h3,.raidcard h3{color:var(--ink)}
.replyform label,.guildinvite p,.guildinvite h2,.guildbanner .eyebrow,.journeycard>.subtle{color:var(--muted)}
.pill,.notice{background:var(--ui-inset);color:var(--muted);border-color:var(--line)}
.footer,.footer a{color:var(--muted)}
html[data-ui-mode="dark"] .adventurehero{background-color:#324d3a;background-image:linear-gradient(90deg,#12291ae6,#1e3b2a80),var(--daily-photo,none)}
html[data-ui-mode="dark"] .adventurehero .btn.primary{background:var(--ui-accent-light);color:var(--ui-on-accent-light);border-color:var(--ui-accent-light)}
html[data-ui-mode="dark"] .badge>span,html[data-ui-mode="dark"] .materialicon{background:var(--ui-inset);border-color:var(--line);color:var(--ui-accent-light)}
html[data-ui-wallpaper="off"] body{background-image:none}
html[data-ui-wallpaper="off"] .adventurehero{background-image:linear-gradient(115deg,var(--ui-accent-deep),var(--ui-accent));background-color:var(--ui-accent-deep)}
html:is([data-ui-palette="industrial"],[data-ui-palette="elegant"]) .adventurehero{background-color:var(--ui-hero-base);background-image:linear-gradient(90deg,var(--ui-hero-start),var(--ui-hero-end)),var(--daily-photo,none);box-shadow:0 12px 30px var(--ui-shadow)}
html:is([data-ui-palette="industrial"],[data-ui-palette="elegant"])[data-ui-wallpaper="off"] .adventurehero{background-image:linear-gradient(115deg,var(--ui-hero-base),var(--ui-accent))}
html:is([data-ui-palette="industrial"],[data-ui-palette="elegant"]) .brandmark,
html:is([data-ui-palette="industrial"],[data-ui-palette="elegant"]) .toast{background:var(--ui-accent-deep);color:var(--ui-on-accent);box-shadow:0 8px 25px var(--ui-shadow)}
html[data-ui-contrast="high"] .btn,html[data-ui-contrast="high"] .section,html[data-ui-contrast="high"] .panel,html[data-ui-contrast="high"] .stat{border-width:2px;box-shadow:none}
html[data-ui-contrast="high"] .badge{opacity:.75}html[data-ui-contrast="high"] .badge.earned{opacity:1}
html[data-ui-density="compact"] .page{padding-top:20px;padding-bottom:15px}
html[data-ui-density="compact"] .sidebar .brand{margin-bottom:20px}
html[data-ui-density="compact"] .sidebar .classdetail{margin-bottom:14px}
html[data-ui-density="compact"] .nav{gap:4px}
html[data-ui-density="compact"] .nav button{padding:9px 12px;min-height:42px}
html[data-ui-density="compact"] .sectionbar{padding:14px 18px}
html[data-ui-density="compact"] .panel,html[data-ui-density="compact"] .assessmentcard{padding:19px}
html[data-ui-density="compact"] .course td{padding-block:9px}
html[data-ui-density="compact"] .learnerstrip{margin-block:17px;padding:11px 15px}
html[data-ui-density="compact"] .adventurehero{padding:27px 30px;min-height:205px}
html[data-ui-density="compact"] .lessonpick{padding:12px 15px}
.appearance-trigger{width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border:1px solid var(--line);border-radius:11px;background:var(--ui-elevated);color:var(--brick);padding:8px}
.appearance-trigger svg{width:19px;height:19px}
.preferences-floating{position:fixed;right:22px;bottom:22px;z-index:80;box-shadow:0 5px 24px var(--ui-shadow);width:44px;height:44px}
.preferences-backdrop{position:fixed;inset:0;z-index:100;width:100%;height:100%;border:0;background:#17271d6b;backdrop-filter:blur(3px)}
.preferences-drawer{position:fixed;inset:0 0 0 auto;z-index:101;width:352px;max-width:calc(100vw - 14px);height:100vh;height:100dvh;overflow-y:auto;overscroll-behavior:contain;background:var(--ui-surface);border-left:1px solid var(--line);box-shadow:-15px 0 55px #152d2420;transform:translateX(105%);visibility:hidden;transition:transform .22s ease,visibility .22s;color:var(--ink);scrollbar-width:thin;scrollbar-color:var(--ui-accent) transparent}
.is-open .preferences-drawer{transform:translateX(0);visibility:visible}
.preferences-heading{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:23px 22px 19px;border-bottom:1px solid var(--line);background:var(--ui-surface)}
.preferences-heading .eyebrow{font-size:8px;letter-spacing:1.1px;line-height:1.8}
.preferences-heading h2{font:18px/1.5 var(--serif);margin:5px 0 0}
.preferences-close{border:1px solid var(--line);background:var(--ui-elevated);color:var(--ink);width:33px;height:33px;border-radius:10px;flex-shrink:0;font:23px/1 var(--sans)}
.preferences-content{padding:20px 21px 28px;font-size:12px}
.preference-language{margin-bottom:22px}
.preference-language label{display:block;font-weight:700;font-size:12px;margin-bottom:10px}
.preferences-content select{width:100%;min-height:41px;border:1px solid var(--line);border-radius:11px;padding:9px 11px;background:var(--ui-elevated);color:var(--ink);font-size:12px}
.preference-language p,.preference-footnote{font-size:10px;line-height:1.8;color:var(--muted);margin:10px 0}
.preference-section{border:1px solid var(--line);border-radius:17px;margin:17px 0;padding:0 14px 15px;background:var(--ui-elevated)}
.preference-section:not([open]){padding-bottom:0}
.preference-section summary{font-size:11px;font-weight:700;cursor:pointer;list-style:none;padding:15px 1px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.preference-section summary::-webkit-details-marker{display:none}
.preference-section summary::after{content:'⌄';color:var(--muted);font-size:15px;transform:rotate(-90deg)}
.preference-section[open] summary::after{transform:none}
.preference-segment{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.preference-segment button{border:1px solid var(--line);border-radius:12px;padding:11px 5px;background:var(--ui-surface);color:var(--muted);font-size:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-height:70px;line-height:1.5}
.preference-segment button[aria-pressed="true"],.preference-palettes button[aria-pressed="true"]{background:var(--ui-soft);border-color:var(--ui-accent);color:var(--brick);box-shadow:inset 0 0 0 1px var(--ui-accent)}
.preference-glyph{font-size:21px;line-height:1}
.preference-toggles{display:grid;gap:8px;margin-top:15px}
.preference-toggle{position:relative;display:flex;justify-content:space-between;align-items:center;gap:15px;padding:8px 0;cursor:pointer;font-size:11px;min-height:35px}
.preference-toggle input{position:absolute;right:0;opacity:0;width:34px;height:22px;cursor:pointer}
.preference-toggle i{width:34px;height:20px;flex-shrink:0;border-radius:20px;background:var(--line);padding:3px;transition:background .15s}
.preference-toggle i::before{content:'';display:block;width:14px;height:14px;border-radius:50%;background:var(--ui-surface);box-shadow:0 1px 3px #0002;transition:transform .15s}
.preference-toggle input:checked+i{background:var(--ui-accent)}
.preference-toggle input:checked+i::before{transform:translateX(14px)}
.preference-toggle input:focus-visible+i{outline:3px solid var(--ui-accent);outline-offset:3px}
.preference-opacity{margin-top:12px;font-size:11px}.preference-opacity>div{display:flex;justify-content:space-between;align-items:center;gap:12px}.preference-opacity label{min-width:0;overflow-wrap:anywhere}.preference-opacity output{flex:none;min-width:4ch;text-align:right;font-variant-numeric:tabular-nums;color:var(--muted)}.preference-opacity input{display:block;width:100%;min-width:0;height:36px;margin:4px 0 0;accent-color:var(--ui-accent);cursor:pointer}.preference-opacity:has(input:disabled){color:var(--muted)}.preference-opacity input:disabled{cursor:not-allowed;opacity:.5}
.navigation-choice{grid-template-columns:1fr 1fr}
.layout-preview{display:block;position:relative;width:58px;height:34px;border:1px solid var(--line);border-radius:6px;background:var(--ui-inset);overflow:hidden}
.layout-preview i,.layout-preview b{position:absolute;display:block;background:var(--ui-accent);border-radius:2px;opacity:.55}
.sidebar-preview i{left:4px;top:4px;bottom:4px;width:10px}.sidebar-preview b{left:18px;top:4px;right:4px;bottom:4px;opacity:.2}
.top-preview i{left:4px;top:4px;right:4px;height:7px}.top-preview b{left:4px;top:15px;right:4px;bottom:4px;opacity:.2}
.preference-palettes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.preference-palettes button{padding:11px 4px 9px;display:flex;flex-direction:column;align-items:center;gap:8px;border:1px solid transparent;border-radius:12px;background:var(--ui-surface);color:var(--muted)}
.preference-palettes button>span{width:25px;height:25px;border-radius:9px;background:var(--swatch);position:relative}
.preference-palettes button[aria-pressed="true"]>span::after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:14px}
.preference-palettes button:is([data-pref-value="industrial"],[data-pref-value="elegant"])[aria-pressed="true"]>span::after{background:#0b0b0d80;border-radius:inherit}
.preference-palettes small{font-size:9px;line-height:1.5}
.preference-reset{width:100%;margin:5px 0 2px;min-height:41px}
.preference-footnote{text-align:center;margin-bottom:0}
body.preferences-open{overflow:hidden}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
[data-user-content]{font:inherit;color:inherit}
@media(min-width:961px){
  html[data-ui-layout="top"] .shell{display:block}
  html[data-ui-layout="top"] .sidebar{position:relative;inset:auto;width:100%;height:auto;max-height:none;overflow:visible;display:grid;grid-template-columns:168px minmax(170px,1fr) auto auto;align-items:center;gap:12px 20px;padding:18px 30px 12px;border-right:0;border-bottom:1px solid var(--line)}
  html[data-ui-layout="top"] .sidebar .brand{grid-column:1;grid-row:1;margin:0}
  html[data-ui-layout="top"] .workspace-switch{grid-column:2;grid-row:1;min-width:0;max-width:340px}
  html[data-ui-layout="top"] .workspace-switch>.eyebrow,html[data-ui-layout="top"] .classdetail{display:none}
  html[data-ui-layout="top"] .classpick{margin:0}
  html[data-ui-layout="top"] .sidebar .nav{grid-column:1/-1;grid-row:2;flex-direction:row;flex-wrap:wrap;gap:5px}
  html[data-ui-layout="top"] .nav button{flex:1;justify-content:center;padding:10px;min-height:43px}
  html[data-ui-layout="top"] .navnum{margin-left:4px}
  html[data-ui-layout="top"] #newclass{grid-column:3;grid-row:1}
  html[data-ui-layout="top"] .sidecard,html[data-ui-layout="top"] .profile{display:none}
  html[data-ui-layout="top"] .sidebottom{grid-column:4;grid-row:1;margin:0;padding:0;display:flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:320px}
  html[data-ui-layout="top"] .sidebottom .subtle{margin:0;font-size:10px;max-width:145px;text-align:left;line-height:1.6}
  html[data-ui-layout="top"] .main{grid-column:auto;width:100%}
  html[data-ui-layout="top"] .topbar{height:63px}
  html[data-ui-layout="top"] .toast{left:50%}
}
@media(max-width:600px){.topright{gap:7px}.appearance-trigger{width:33px;height:33px;padding:7px}.topbar .mode{font-size:9px;padding:7px}.topbar .mode svg{display:none}.breadcrumb>span:not(.desktop){max-width:21vw}.preferences-heading{padding:19px}.preferences-content{padding:17px}.preferences-drawer{width:340px}}
@media(prefers-reduced-motion:reduce){.preferences-drawer,.preference-toggle i,.preference-toggle i::before{transition:none}}

/* Map Class Management's shared tokens to the other two existing app layouts. */
:root{--sans:Inter,system-ui,sans-serif;--serif:Merriweather,Georgia,serif}
html{background:var(--paper);color:var(--ink)}
body{font-family:var(--sans);background-size:cover;background-attachment:fixed;background-position:center}
html[data-ui-wallpaper="off"] body{background-image:none!important}
.preferences-drawer,.preferences-drawer *{box-sizing:border-box}.preferences-drawer{font-family:var(--sans);color:var(--ink);z-index:1102}.preferences-backdrop{z-index:1101}.preferences-floating{z-index:1090}
.preferences-drawer h2{font-family:var(--serif)}.preferences-drawer select{background:var(--ui-surface);color:var(--ink)}.preferences-drawer .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.app-shell{--ink-soft:var(--muted);--ink:var(--ui-heading);--text:var(--ink);--gold:var(--ui-accent);--line-strong:var(--line);--accent:var(--ui-accent-deep);--shadow:0 8px 28px var(--ui-shadow);background:transparent!important;color:var(--ink)}
.app-shell .sidebar,.app-shell .topbar{background:var(--ui-sidebar)!important;color:var(--ink)!important}
.app-shell .nav-item,.app-shell .brand-copy strong,.app-shell .brand-copy span{color:var(--ink)!important}.app-shell .nav-item.active{background:var(--ui-soft)!important;color:var(--ui-accent-deep)!important}
.app-shell :is(.panel,.kpi-card,.kpi-card.dark,.modal,.report-highlight,.hero-frame){background:var(--ui-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
.app-shell :is(.panel-title,.kpi-value,.row-name,.row-money,.total-row strong,.data-table td b,.settings-item b,.report-stat b,.hero-title,.page-intro h1){color:var(--ui-heading)!important}
.app-shell :is(.row-sub,.panel-note,.kpi-label,.kpi-foot,.page-subtitle,.report-stat span,.sidebar-meta,.footer){color:var(--muted)!important}
.app-shell :is(input,select,textarea,.button-quiet,.type-tab,.icon-button){background:var(--ui-elevated)!important;color:var(--ink)!important;border-color:var(--line)!important}
.app-shell .data-table :is(th,td){color:var(--ink)!important;border-color:var(--line)!important}.app-shell .data-table thead{background:var(--ui-inset)!important}
.hub{--bg:var(--paper);--text:var(--ink);--accent:var(--ui-accent);--panel:var(--ui-surface);--border:var(--line);background:transparent!important;color:var(--ink)}
.hub :is(.rail,.channels,.members,.chat-head,.composer-wrap,.channel-head,.hub-sidebar,.sidebar-header,.sidebar-footer){background:var(--ui-sidebar)!important;color:var(--ink)!important;border-color:var(--line)!important}
.hub :is(.chat,.chat-main,.messages,.message-scroll,.task-workspace){background:transparent!important;color:var(--ink)}
.hub :is(.channel-item,.member-row,.channel-name,.chat-heading strong,.member-data strong,.sidebar-title,.message-body,.message-author){color:var(--ink)!important}
.hub :is(.channel-item.active,.channel-item:hover,.member-row:hover){background:var(--ui-soft)!important}
.hub :is(input,textarea,select,.rich-editor,.composer-box,.task-card){background:var(--ui-surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
html[data-ui-font] .app-shell,html[data-ui-font] .hub,html[data-ui-font] .app-shell button,html[data-ui-font] .hub button{font-family:var(--sans)!important}
html[data-ui-density="compact"] .app-shell .content{padding:18px}html[data-ui-density="compact"] .hub .message{padding-top:5px;padding-bottom:5px}
html[data-ui-layout="top"] .app-shell{display:block}html[data-ui-layout="top"] .app-shell .sidebar{position:relative;width:auto;height:auto;transform:none;padding:18px;display:flex;flex-direction:row;gap:16px;align-items:center;flex-wrap:wrap}html[data-ui-layout="top"] .app-shell .sidebar nav{display:flex;flex-wrap:wrap;gap:5px}html[data-ui-layout="top"] .app-shell .main{margin-left:0;width:100%}html[data-ui-layout="top"] .app-shell :is(.sidebar-bottom,.sidebar-meta,.nav-divider){display:none}
@media(min-width:961px){html[data-ui-layout="top"] .hub{grid-template-columns:minmax(210px,270px) minmax(0,1fr) 240px;grid-template-rows:auto minmax(0,1fr)}html[data-ui-layout="top"] .hub .rail{grid-column:1/-1;grid-row:1;flex-direction:row;height:62px;padding:8px 20px;gap:16px}html[data-ui-layout="top"] .hub .rail-group,html[data-ui-layout="top"] .hub .rail-bottom{display:flex;flex-direction:row;gap:10px}html[data-ui-layout="top"] .hub .rail-spacer{flex:1}html[data-ui-layout="top"] .hub .rail-divider{display:none}}
button:disabled{cursor:not-allowed;opacity:.55}[hidden]{display:none!important}

.preferences-floating{left:22px;right:auto;bottom:22px}.hub .sidebar{background:var(--ui-sidebar)!important;color:var(--ink)!important}.hub :is(.msg-author,.msg-text,.side-title,.side-user strong){color:var(--ink)!important}.hub :is(.msg-time,.side-subtitle,.side-user small){color:var(--muted)!important}

body.preferences-open #tea-workspace-shell{visibility:hidden}.preferences-drawer input[type=checkbox]{accent-color:var(--ui-accent)}
