/* Shared student tokens; only the new dashboard opts into the night palette. */
:root{
 --student-bg:#eef7ff;--student-surface:#fff;--student-primary:#087cde;--student-primary-soft:#e2f2ff;
 --student-text:#163651;--student-text-muted:#5f7b93;--student-border:#cee4f5;
 --student-shadow:0 10px 30px #174f7610;--student-radius-lg:24px;--student-radius-md:16px;
 --student-accent:#b47912;--student-accent-soft:#fff3d6;--student-success:#167758;
 --student-nav-height:74px;--student-nav-clearance:calc(96px + env(safe-area-inset-bottom))
}
[data-student-theme="night"]{
 --student-bg:#101e32;--student-surface:#1a2b43;--student-primary:#81c5ff;--student-primary-soft:#213d59;
 --student-text:#ecf5ff;--student-text-muted:#acc1d7;--student-border:#344c68;
 --student-shadow:0 10px 30px #0003;--student-accent:#f5cf75;--student-accent-soft:#3d3429;--student-success:#79ddbc;
 color-scheme:dark
}
body.student-app-mode .student-tabbar{
 position:fixed!important;inset:auto auto max(8px,env(safe-area-inset-bottom)) 50%!important;
 transform:translateX(-50%);z-index:80;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));
 width:min(480px,calc(100% - 20px));height:var(--student-nav-height);padding:5px;
 border:1px solid var(--student-border);border-radius:23px;background:var(--student-surface);
 box-shadow:0 8px 30px #16395620;gap:2px;margin:0
}
body.student-app-mode .student-tabbar a{
 display:grid;align-content:center;justify-items:center;gap:4px;min-width:0;min-height:54px;
 padding:5px 2px;border:0;border-radius:17px;color:var(--student-text-muted);background:transparent;
 font-size:11px;font-weight:600;line-height:1.2;text-decoration:none
}
body.student-app-mode .student-tabbar a[aria-current="page"]{background:var(--student-primary-soft);color:var(--student-primary)}
.student-tabbar svg{width:22px;height:22px}
body.student-app-mode #notice{bottom:var(--student-nav-clearance)!important}
/* Keep the existing immersive runner's navigation visibility. */
html.student-focus-mode .student-tabbar{display:none!important}
html.student-focus-mode .student-game-shell>.student-tabbar{display:grid!important}
.student-dashboard.student-portal-home{
 width:min(100%,920px);margin:0 auto;padding:24px 20px var(--student-nav-clearance);
 min-height:100dvh;color:var(--student-text);background:var(--student-bg);display:block;
 --dashboard-hero:linear-gradient(135deg,var(--student-primary-soft),var(--student-surface))
}
.student-dashboard *{min-width:0}
.student-dashboard a{color:var(--student-primary)}
.student-dashboard h1,.student-dashboard h2,.student-dashboard h3{font-family:var(--wml-sans)!important;color:var(--student-text)}
.student-dashboard h1{font-size:clamp(25px,6vw,36px);line-height:1.2;margin:8px 0;font-weight:800;overflow-wrap:anywhere}
.student-dashboard h2{font-size:19px;margin:0;font-weight:750}
.student-dashboard p{margin:5px 0;color:var(--student-text-muted);font-size:13px;line-height:1.65}
.student-dashboard-topline{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:16px}
.student-dashboard-topline a{display:inline-flex;min-height:44px;align-items:center;gap:8px;color:var(--student-text)}
.student-dashboard-topline img{width:34px;height:34px;border-radius:10px;display:block}
.student-dashboard-topline b{font-size:16px;font-weight:750}
.student-dashboard-topline span{color:var(--student-text-muted);font-size:11px}
.student-welcome{display:grid;grid-template-columns:1fr auto;align-items:center;gap:14px;padding:22px;border:1px solid var(--student-border);border-radius:var(--student-radius-lg);background:var(--dashboard-hero)}
.student-welcome small{color:var(--student-primary);font-size:10px;letter-spacing:.14em;font-weight:700}
.student-avatar{display:grid;place-items:center;width:64px;height:64px;border-radius:22px;background:var(--student-primary);color:var(--student-surface);font-size:26px;font-weight:800;box-shadow:var(--student-shadow)}
.student-rank{display:inline-flex;gap:6px;align-items:center;margin-top:7px;padding:5px 9px;border-radius:999px;background:var(--student-accent-soft);color:var(--student-accent);font-size:11px;font-weight:600}
.student-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}
.student-summary article{padding:14px 10px;border:1px solid var(--student-border);border-radius:var(--student-radius-md);background:var(--student-surface);box-shadow:var(--student-shadow)}
.student-summary small{display:block;color:var(--student-text-muted);font-size:11px}
.student-summary b{display:block;margin:6px 0;font-size:clamp(18px,4.5vw,25px);font-variant-numeric:tabular-nums;line-height:1.25}
.student-summary em{font-size:11px;color:var(--student-text-muted);font-style:normal}
.student-growth,.student-profile-summary,.student-challenge-preview{padding:18px;margin:14px 0;border:1px solid var(--student-border);border-radius:var(--student-radius-lg);background:var(--student-surface);box-shadow:var(--student-shadow)}
.student-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.student-section-head a{font-size:12px;min-height:44px;display:inline-flex;align-items:center;flex-shrink:0}
.student-growth-meter{height:10px;overflow:hidden;border-radius:999px;background:var(--student-primary-soft);margin:12px 0}
.student-growth-meter i{display:block;height:100%;width:var(--student-progress);background:var(--student-primary);border-radius:inherit;transition:width .4s ease}
.student-growth-meta{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--student-text-muted)}
.student-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.student-badges span{padding:5px 8px;border-radius:999px;background:var(--student-accent-soft);color:var(--student-accent);font-size:11px}
.student-main-action{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;padding:22px;border-radius:var(--student-radius-lg);background:linear-gradient(125deg,#087bdd,#249fdb);color:#fff!important;box-shadow:0 12px 28px #087cde30}
.student-main-action small,.student-main-action strong,.student-main-action em{display:block}
.student-main-action small{font-size:10px;letter-spacing:.16em;opacity:.9}
.student-main-action strong{font-size:25px;margin:5px 0;font-weight:800}
.student-main-action em{font-style:normal;font-size:12px}.student-main-action>b{font-size:30px}
.student-main-action[aria-disabled="true"]{background:var(--student-primary-soft);color:var(--student-text-muted)!important;box-shadow:none}
.student-secondary-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.student-secondary-actions>a,.student-secondary-actions>div{display:grid;align-content:start;gap:6px;padding:17px;min-height:106px;border:1px solid var(--student-border);border-radius:var(--student-radius-md);background:var(--student-surface)}
.student-secondary-actions strong{font-size:17px;color:var(--student-text)}
.student-secondary-actions span{font-size:12px;color:var(--student-text-muted);line-height:1.5}
.student-secondary-actions .is-complete strong{color:var(--student-success)}
.student-challenge-preview{background:var(--dashboard-hero)}
.student-preview-stats{display:flex;gap:20px;margin-top:8px;color:var(--student-text-muted);font-size:12px}
.student-preview-stats b{color:var(--student-text);font-variant-numeric:tabular-nums}
.student-profile-summary dl{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0}
.student-profile-summary dl>div{padding:10px;border-radius:12px;background:var(--student-primary-soft);overflow-wrap:anywhere}
.student-profile-summary dt{font-size:11px;color:var(--student-text-muted)}
.student-profile-summary dd{margin:4px 0 0;font-size:13px;color:var(--student-text);font-weight:600}
.student-home-notice{padding:12px 16px;border:1px solid var(--student-border);border-radius:var(--student-radius-md);background:var(--student-surface);font-size:13px;color:var(--student-text-muted)}
.student-home-error{padding:28px 20px;background:var(--student-surface);border-radius:var(--student-radius-lg);color:var(--student-text)}
.student-home-error a{display:inline-flex;align-items:center;min-height:44px}
@media(min-width:760px){.student-dashboard.student-portal-home{padding:32px 36px var(--student-nav-clearance)}.student-profile-summary dl{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:380px){.student-dashboard.student-portal-home{padding:14px 12px var(--student-nav-clearance)}.student-welcome{padding:17px;gap:8px}.student-avatar{width:46px;height:46px;border-radius:15px;font-size:21px}.student-summary article{padding:12px 8px}.student-summary b{font-size:18px}.student-main-action{padding:19px}.student-secondary-actions>a,.student-secondary-actions>div{padding:13px}.student-preview-stats{gap:12px}}
@media(prefers-reduced-motion:reduce){.student-growth-meter i{transition:none}}

/* Practice and makeup use the same palette and navigation clearance. */
.student-learning-shell{width:min(100%,920px);min-height:100dvh;margin:0 auto;padding:24px 20px var(--student-nav-clearance);background:var(--student-bg);color:var(--student-text);--student-complete-soft:#e1f6ee}
.student-learning-shell[data-student-theme="night"]{--student-complete-soft:#193e38}
.student-learning-shell *{min-width:0}
.student-learning-shell h1,.student-learning-shell h2,.student-learning-shell h3{font-family:var(--wml-sans)!important;color:var(--student-text);line-height:1.3}
.student-learning-shell h1{font-size:27px;margin:5px 0 8px}
.student-learning-shell h2{font-size:19px;margin:0}
.student-learning-shell p{font-size:13px;line-height:1.65;color:var(--student-text-muted);margin:8px 0}
.learning-page-head{background:transparent;border:0;padding:0;display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:18px}
.learning-page-head small,.learning-kicker{color:var(--student-primary);font-size:10px;font-weight:700;letter-spacing:.1em}
.learning-page-head>[data-theme-label]{font-size:11px;color:var(--student-text-muted);white-space:nowrap;margin-top:8px}
.learning-card,.learning-overview,.learning-main-task{border:1px solid var(--student-border);border-radius:var(--student-radius-lg);padding:18px;background:var(--student-surface);margin:14px 0;box-shadow:var(--student-shadow)}
.learning-overview{display:flex;align-items:center;gap:15px;background:linear-gradient(125deg,var(--student-primary-soft),var(--student-surface))}
.learning-overview h2{font-size:17px}.learning-overview small{font-size:11px;color:var(--student-text-muted)}
.learning-progress{width:70px;height:70px;flex:0 0 70px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--student-primary) var(--learning-progress),var(--student-border) 0);position:relative;font-variant-numeric:tabular-nums}
.learning-progress::before{content:"";position:absolute;inset:7px;background:var(--student-surface);border-radius:50%}.learning-progress b{position:relative;font-size:20px}
.learning-main-task{border-color:var(--student-primary);background:linear-gradient(145deg,var(--student-primary-soft),var(--student-surface))}
.learning-main-task h2{font-size:29px;margin:12px 0 5px}.learning-task-meta{display:flex;flex-wrap:wrap;gap:12px;margin:10px 0 16px;font-size:12px;color:var(--student-text-muted)}
.learning-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.learning-section-head>span{font-size:11px;color:var(--student-text-muted)}
.learning-status{display:inline-flex;align-items:center;min-height:26px;padding:4px 8px;border-radius:999px;background:var(--student-accent-soft);color:var(--student-accent)!important;font-size:11px;white-space:nowrap}
.learning-status.is-done{background:var(--student-complete-soft);color:var(--student-success)!important}
.student-learning-shell .learning-primary{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 14px;background:var(--student-primary);color:var(--student-bg);border:0;border-radius:13px;font-size:14px;font-weight:650;line-height:1.4;text-decoration:none}
.student-learning-shell .learning-primary:disabled{opacity:.6}
.student-learning-shell button:not(.learning-primary):not(.student-challenge-runner button),.learning-section-head>a,.learning-growth-actions>a{min-height:44px;border:1px solid var(--student-border);border-radius:12px;background:var(--student-primary-soft);color:var(--student-primary);font-size:12px;padding:8px 10px;cursor:pointer;line-height:1.4}
.student-learning-shell button:disabled{cursor:default}
.student-learning-shell a:focus-visible,.student-learning-shell button:focus-visible{outline:3px solid var(--student-accent);outline-offset:3px}
.learning-path{list-style:none;padding:0;margin:0}.learning-path li{display:flex;gap:10px;align-items:start;padding:14px 0;border-bottom:1px solid var(--student-border)}.learning-path li:last-child{border:0;padding-bottom:0}
.learning-path li>b{display:grid;place-items:center;flex:0 0 27px;height:27px;border-radius:50%;background:var(--student-primary-soft);color:var(--student-primary);font-size:12px}
.learning-path li>div{flex:1}.learning-path strong{font-size:14px}.learning-path-state{font-size:11px;color:var(--student-text-muted);max-width:5em;line-height:1.6}.learning-path-state.is-done{color:var(--student-success)}
.learning-record-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.learning-record-stats span{border-radius:12px;padding:10px 8px;background:var(--student-primary-soft)}.learning-record-stats small{display:block;font-size:10px;color:var(--student-text-muted)}.learning-record-stats b{display:block;margin-top:5px;font-size:18px;font-variant-numeric:tabular-nums}
.learning-growth-actions,.learning-preview-head{display:flex;gap:8px;justify-content:space-between;align-items:center;margin:14px 0}
.learning-ledger{margin-top:14px;border-top:1px solid var(--student-border);padding-top:10px;font-size:12px}.learning-ledger summary{min-height:44px;cursor:pointer;align-content:center}.learning-ledger ul{padding:0;list-style:none}.learning-ledger li{display:flex;justify-content:space-between;gap:8px;padding:8px 0;color:var(--student-text-muted)}
.student-learning-shell .student-history-dialog{background:var(--student-surface);color:var(--student-text);border-color:var(--student-border);max-width:min(620px,calc(100vw - 24px));max-height:80dvh;overflow:auto}
.student-learning-shell .student-history-dialog .muted{color:var(--student-text-muted)!important}
.student-learning-shell .learning-question-list{padding-left:24px;color:var(--student-text);font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.learning-month-nav{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;align-items:center}.learning-month-nav h2{text-align:center}.learning-month-nav button{font-size:24px!important;padding:0!important}
.learning-calendar-legend{display:flex;flex-wrap:wrap;gap:8px 14px;margin:14px 0;font-size:11px;color:var(--student-text-muted)}.learning-calendar-legend span::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;background:var(--student-border)}.learning-calendar-legend .legend-normal::before{background:var(--student-success)}.learning-calendar-legend .legend-makeup::before{background:var(--student-primary)}.learning-calendar-legend .legend-missing::before{background:var(--student-accent)}
.learning-calendar-week,.learning-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.learning-calendar-week{margin:14px 0 8px;text-align:center;font-size:12px;color:var(--student-text-muted)}
.student-learning-shell .learning-calendar-day{min-height:66px;display:grid;align-content:center;justify-items:center;gap:6px;padding:7px 0;border-radius:12px;color:var(--student-text);background:var(--student-surface)}
.learning-calendar-day b{font-size:17px;font-variant-numeric:tabular-nums}.learning-calendar-day small{font-size:10px;line-height:1.2;color:var(--student-text-muted);white-space:nowrap}
.student-learning-shell .learning-calendar-day.is-normal{background:var(--student-complete-soft);color:var(--student-success)}
.student-learning-shell .learning-calendar-day.is-makeup{background:var(--student-primary-soft);color:var(--student-primary)}
.student-learning-shell .learning-calendar-day.is-missing{background:var(--student-accent-soft);color:var(--student-accent)}
.student-learning-shell .learning-calendar-day.is-today{border-color:var(--student-primary);border-width:2px}.student-learning-shell .learning-calendar-day[aria-pressed="true"]{box-shadow:inset 0 0 0 2px var(--student-primary)}
.student-learning-shell .learning-calendar-day.is-future{opacity:.45}.student-learning-shell .learning-calendar-day.is-empty{color:var(--student-text-muted);background:var(--student-bg)}
.learning-calendar-loading{grid-column:1/-1;min-height:180px;display:grid;place-items:center}.learning-calendar-note{font-size:11px!important;margin-bottom:0!important}
.learning-date-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}.learning-date-actions .learning-primary{width:100%}
@media(max-width:600px){.student-learning-shell{padding:18px 12px var(--student-nav-clearance)}.learning-card,.learning-overview,.learning-main-task{padding:15px}.learning-month-card{padding:14px 10px}.learning-page-head h1{font-size:25px}.learning-section-head>h2{font-size:17px}}
@media(max-width:380px){.learning-page-head{gap:6px}.learning-page-head h1{font-size:23px}.learning-progress{width:60px;height:60px;flex-basis:60px}.learning-overview{gap:10px}.learning-overview h2{font-size:15px}.learning-main-task h2{font-size:27px}.learning-calendar-grid{gap:3px}.student-learning-shell .learning-calendar-day{min-height:64px;border-radius:9px}.learning-record-stats b{font-size:16px}}

.student-learning-shell .learning-question-list li{padding:10px 12px;margin:8px 0;border:1px solid var(--student-border);border-radius:12px;background:var(--student-primary-soft);color:var(--student-text)}

.account-card{padding:18px;margin:14px 0;border:1px solid var(--student-border);border-radius:var(--student-radius-lg);background:var(--student-surface);box-shadow:var(--student-shadow)}
.account-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.account-card-head>span{font-size:11px;color:var(--student-primary);background:var(--student-primary-soft);padding:5px 8px;border-radius:999px}
.account-form,.account-request{display:grid;gap:14px}.account-form label,.account-request>label{display:grid;gap:7px;font-size:13px}.account-form label>span{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.account-form small,.account-request small{font-size:10px;color:var(--student-text-muted)}
.account-inline-edit{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.student-settings-page input,.student-settings-page select{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--student-border);border-radius:12px;background:var(--student-primary-soft);color:var(--student-text);font:inherit;font-size:14px}
.student-settings-page input[readonly],.student-settings-page select:disabled{background:var(--student-bg);color:var(--student-text-muted);opacity:1}.student-settings-page input:focus-visible,.student-settings-page select:focus-visible{outline:3px solid var(--student-accent);outline-offset:2px}
.account-form+.account-form{margin-top:18px;border-top:1px solid var(--student-border);padding-top:18px}
.account-readonly{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}.account-readonly>span{padding:10px;border-radius:12px;background:var(--student-primary-soft);overflow-wrap:anywhere}.account-readonly small{display:block;font-size:10px;color:var(--student-text-muted)}.account-readonly b{display:block;font-size:13px;margin-top:5px}
.account-permission-state{padding:14px;border:1px solid var(--student-border);border-radius:14px;background:var(--student-primary-soft);font-size:13px}.account-permission-state.approved{color:var(--student-success)}.account-permission-state small{font-size:11px;line-height:1.8;color:var(--student-text-muted)}
.account-checkboxes{display:flex;flex-wrap:wrap;gap:8px}.account-checkboxes label{min-height:44px;display:flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--student-border);border-radius:12px;font-size:12px}.account-checkboxes input{width:17px;min-height:17px;height:17px;padding:0}
.account-security summary,.account-request-history summary{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:44px;cursor:pointer;font-size:15px}.account-security summary small{display:block;font-size:11px;color:var(--student-text-muted);margin-top:3px}
.account-request-history ul{padding:0;list-style:none;font-size:12px}.account-request-history li{display:grid;gap:6px;padding:12px 0;border-bottom:1px solid var(--student-border)}.account-request-history small{color:var(--student-text-muted)}
.student-settings-page .account-logout{width:100%;margin-top:16px;color:var(--student-accent);background:var(--student-accent-soft)}
@media(max-width:380px){.account-card{padding:15px}.account-card-head{align-items:start}.account-card-head h2{font-size:18px}.account-checkboxes{gap:5px}.account-checkboxes label{padding:7px;font-size:11px}}

.challenge-center-actions{display:flex;gap:6px}.student-challenge-center .learning-page-head{align-items:center}.student-challenge-center .learning-page-head h1{font-size:26px}.student-challenge-center .learning-page-head p{font-size:11px}
.challenge-hall-overview{padding:20px;border:1px solid var(--student-border);border-radius:var(--student-radius-lg);background:linear-gradient(135deg,var(--student-primary-soft),var(--student-surface));margin:14px 0}.challenge-hall-overview>small{font-size:10px;color:var(--student-primary);letter-spacing:.12em}.challenge-hall-overview h2{margin-top:10px;font-size:21px}
.challenge-hall-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:18px}.challenge-hall-stats span{padding:10px 6px;border-radius:12px;background:var(--student-surface)}.challenge-hall-stats small{display:block;font-size:10px;color:var(--student-text-muted)}.challenge-hall-stats b{display:block;font-size:20px;margin-top:6px;font-variant-numeric:tabular-nums}
.challenge-mode-card{padding:22px;margin:14px 0;border:1px solid var(--student-primary);border-radius:var(--student-radius-lg);background:var(--student-surface);box-shadow:var(--student-shadow)}.challenge-mode-card h2{font-size:28px}.challenge-mode-symbol{display:grid;place-items:center;width:42px;height:42px;font-size:27px;border-radius:13px;background:var(--student-accent-soft)}.challenge-mode-card .learning-primary{width:100%;margin-top:10px}
.challenge-future-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.challenge-future-grid article{padding:14px;border:1px solid var(--student-border);border-radius:16px;background:var(--student-primary-soft)}.challenge-future-grid h3{font-size:16px;margin:8px 0}.challenge-future-grid p{font-size:11px}.challenge-coming-soon{display:inline-flex;border-radius:999px;padding:4px 7px;background:var(--student-surface);color:var(--student-text-muted);font-size:10px}
.challenge-hall-note{padding:4px 8px}.challenge-rule-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.challenge-rule-grid span{padding:14px;border-radius:14px;background:var(--student-primary-soft);font-size:13px}.challenge-rule-grid b{display:block;margin-bottom:5px}.challenge-ranking{padding:0;list-style:none;font-size:13px}.challenge-ranking li{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--student-border)}.challenge-ranking small{display:block;font-size:10px;color:var(--student-text-muted)}
@media(max-width:380px){.challenge-hall-overview{padding:16px}.challenge-hall-overview h2{font-size:18px}.challenge-hall-stats b{font-size:17px}.challenge-mode-card{padding:18px}.challenge-future-grid{gap:8px}.challenge-future-grid article{padding:11px}.challenge-future-grid h3{font-size:14px}.student-challenge-center .learning-page-head h1{font-size:24px}}
