.staff-inbox{min-width:0;margin-block:14px;border:1px solid var(--line,#655139);border-radius:12px;background:var(--surface,#121016);color:var(--cream,#f1e1c5);overflow:hidden}
.staff-inbox-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;width:100%;min-height:56px;padding:14px 18px;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}
.staff-inbox-heading strong{flex:1;min-width:130px}.staff-inbox-heading span{font-size:14px}.staff-inbox-heading>b{font-size:24px}
.staff-inbox-body{padding:0 18px 18px;display:grid;gap:12px;min-width:0}.staff-inbox-note{font-size:14px;color:var(--muted,#c3b59e);margin:0}
.staff-inbox-filters,.staff-inbox-pages{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.staff-inbox .button{min-height:44px;white-space:normal;max-width:100%}.staff-inbox .button:hover:not(:disabled){transform:none}.staff-inbox [aria-pressed=true]{border-color:var(--gold,#dcb267)}
.staff-inbox-scroll{max-height:min(52dvh,520px);overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-wrap:anywhere}.staff-inbox-scroll article{padding:16px 0;border-bottom:1px solid var(--line,#655139)}.staff-inbox-scroll header{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}.staff-inbox-scroll time,.staff-inbox-scroll small{font-size:13px;color:var(--muted,#c3b59e)}.staff-inbox-scroll p{white-space:pre-wrap;line-height:1.55}.staff-inbox-answer{border-left:3px solid #a98c53;padding:10px 14px;background:#a98c5310}
.staff-inbox form,.staff-inbox label{display:grid;gap:10px;min-width:0}.staff-inbox textarea{box-sizing:border-box;width:100%;min-width:0;max-height:220px;resize:vertical;padding:12px;border:1px solid var(--line,#655139);border-radius:8px;background:var(--surface,#121016);color:inherit;font:inherit;font-size:16px}.staff-inbox [role=alert]{color:#ffb9ac;overflow-wrap:anywhere}
.community-content>.staff-inbox{overflow:auto;min-height:0}.community-content>.staff-inbox .staff-inbox-scroll{max-height:38dvh}
@media(max-width:600px){.staff-inbox-heading{padding:12px}.staff-inbox-body{padding:0 12px 12px}.staff-inbox-filters>.button{flex:1 1 120px}.staff-inbox-scroll{max-height:42dvh}.staff-inbox-heading strong{font-size:17px}}
.home-empty-success{display:flex;flex-direction:row;align-items:center;gap:.65em;line-height:1.4}
.home-empty-success>svg{display:block;flex:0 0 auto;width:1.35em;height:1.35em;margin:0}
.home-empty-success>span{min-width:0}
.lesson-reminder { display:grid; gap:7px; margin-top:9px; font-size:12px; line-height:1.4; color:#e9d3ae; }
.lesson-reminder > span { display:flex; align-items:center; gap:6px; overflow-wrap:anywhere; }
.lesson-reminder svg { flex-shrink:0; color:#e7bb70; }
.lesson-charge-reminder { color:#ecd393; }
.lesson-location-editor { display:flex; flex-wrap:wrap; align-items:end; gap:12px; padding:18px; border:1px solid #b08b4c60; border-radius:12px; background:#14151ded; }
.lesson-location-editor label { display:grid; gap:7px; flex:1 1 200px; min-width:0; }
.lesson-location-editor input { width:100%; min-height:44px; padding:10px; border:1px solid #b08b4c70; border-radius:7px; background:#11131b; color:#f0dfc2; font:inherit; }
.lesson-location-editor p { width:100%; margin:0; font-size:13px; }
.cabinet-reflection-card {display:flex;align-items:center;gap:1rem;min-width:0;padding:1.25rem;border:1px solid var(--line);border-radius:.75rem;background:var(--surface)}
.cabinet-reflection-card>svg {width:1.75rem;flex:none;color:var(--lime)}
.cabinet-reflection-card>div {min-width:0;flex:1}.cabinet-reflection-card h2{margin:0 0 .4rem}.cabinet-reflection-card p{margin:0;color:var(--muted);line-height:1.5}
.cabinet-reflection-card .button {flex:none;min-height:44px}
.policy-steps {padding-left:1.4rem;line-height:1.7}.policy-help{color:var(--muted);line-height:1.6}.policy-progress{color:var(--lime);font-weight:600}
.policy-document .policy-confirm{background:var(--surface);padding-bottom:.5rem}.policy-document .policy-confirm .button{min-height:44px;white-space:normal}
.game-overlay~.homework-transport-error{bottom:calc(104px + env(safe-area-inset-bottom));pointer-events:none}
@media(max-width:600px){.cabinet-reflection-card{align-items:start;flex-wrap:wrap;gap:.75rem}.cabinet-reflection-card>div{flex-basis:calc(100% - 3rem)}.cabinet-reflection-card .button{margin-left:2.5rem;max-width:calc(100% - 2.5rem)}}
/* The private journal has its own visible entry, not a small identity-card link. */
.classroom-modal .cabinet-reflection-card { margin: 20px 0; text-align: left; }
.academy-theme .cabinet-reflection-card,
.classroom-shell .cabinet-reflection-card {
  display: flex; align-items: center; gap: 20px; min-width: 0; grid-column: 1 / -1;
  margin: 16px 0; padding: 22px 24px; border: 1px solid var(--cabinet-gold, #c49c58); border-radius: 12px;
  background: radial-gradient(ellipse at 0 0, #b8782829, transparent 75%), linear-gradient(120deg, #24202bef, #10131cf5);
  box-shadow: inset 0 0 0 3px #130f1280, 0 8px 24px #0003;
}
.academy-theme .cabinet-reflection-card > svg,
.classroom-shell .cabinet-reflection-card > svg { width: 44px; height: 44px; flex: none; color: var(--cabinet-gold, #e2b96c); }
.academy-theme .cabinet-reflection-card > div,
.classroom-shell .cabinet-reflection-card > div { flex: 1; min-width: 0; }
.academy-theme .cabinet-reflection-card .kicker,
.classroom-shell .cabinet-reflection-card .kicker { color: var(--cabinet-gold, #e2b96c); font: 700 10px/1.5 var(--font-ui); letter-spacing: .08em; }
.academy-theme .cabinet-reflection-card h2,
.classroom-shell .cabinet-reflection-card h2 { margin: 6px 0 8px; color: #f2d7a5; font: 500 clamp(22px, 2.4vw, 28px)/1.2 var(--font-display); overflow-wrap: anywhere; }
.academy-theme .cabinet-reflection-card p,
.classroom-shell .cabinet-reflection-card p { margin: 0; color: #d0c2ae; font: 13px/1.6 var(--font-ui); }
.cabinet-reflection-card p small { display: block; margin-top: 4px; color: var(--cabinet-muted, #b5a892); font-size: 11px; }
.academy-theme .cabinet-reflection-card .button,
.classroom-shell .cabinet-reflection-card .button { flex: none; min-height: 48px; white-space: normal; margin: 0; }
.cabinet-reflection-card .button:focus-visible { outline: 2px solid #fff0b3; outline-offset: 4px; }
@media(max-width: 680px) {
  .academy-theme .cabinet-reflection-card,.classroom-shell .cabinet-reflection-card { flex-wrap: wrap; gap: 12px; padding: 18px; }
  .academy-theme .cabinet-reflection-card > svg,.classroom-shell .cabinet-reflection-card > svg { width: 32px; height: 32px; align-self: start; margin-top: 6px; }
  .academy-theme .cabinet-reflection-card > div,.classroom-shell .cabinet-reflection-card > div { flex-basis: calc(100% - 48px); }
  .academy-theme .cabinet-reflection-card .button,.classroom-shell .cabinet-reflection-card .button { width: 100%; max-width: none; margin: 2px 0 0; }
}
.lesson-next-notice,.lesson-history{margin-block:20px;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:12px;min-width:0}
.lesson-next-notice h2,.lesson-history h2{margin:8px 0;font:500 clamp(24px,3vw,32px)/1.25 var(--font-display);overflow-wrap:anywhere}
.lesson-past-item{padding-block:20px;border-top:1px solid var(--line);min-width:0}
.lesson-past-item h3{margin:0;font:500 24px/1.3 var(--font-display);overflow-wrap:anywhere}
.lesson-material-reader{margin-top:20px;min-width:0}
.lesson-past-slide{display:block;width:100%;max-height:65dvh;object-fit:contain;background:var(--surface);aspect-ratio:16/9}
.lesson-material-reader nav{margin-top:16px;align-items:center;justify-content:space-between}
@media(max-width:720px){.lesson-next-notice,.lesson-history{padding:16px}.lesson-material-reader nav{justify-content:center}.lesson-material-reader .button{flex:1 1 120px}}
.lesson-history-recordings { margin-top:20px; }
.lesson-history-recordings > summary { min-height:48px; padding:12px 0; cursor:pointer; font:600 16px/1.5 var(--font-ui,sans-serif); color:var(--cream,#f5ead6); }
.lesson-published-catalog > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:16px; }
.lesson-published-catalog button { display:grid; gap:10px; min-width:0; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--panel,var(--surface)); color:var(--cream); text-align:left; font:inherit; cursor:pointer; }
.lesson-published-catalog img { width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; border-radius:8px; }
.lesson-published-catalog strong { font:500 22px/1.3 var(--font-display); }
.lesson-published-catalog span { font-size:15px; line-height:1.5; }
.lesson-published-catalog small { color:var(--muted); font-size:13px; line-height:1.5; }
.homework-directory{display:grid;gap:18px;min-width:0;grid-column:1/-1}
/* Sandbox banners use a transformed scrolling root. Outside a game, keep the
   mobile navigation fixed to the viewport instead of scrolling across cards. */
@media(max-width:840px){#root:is(.review-sandbox-root,.partner-space-root):has(.homework-directory):not(:has(.game-overlay)){transform:none!important;scroll-padding-block:64px 96px}}
.student-cabinet:has(>.homework-directory)>.complete-tabs,.student-cabinet:has(>.homework-directory)>.cabinet-policy-owner{display:none}
.student-cabinet:has(>.homework-directory)>.cabinet-context-nav{gap:8px;margin-bottom:10px}
.student-cabinet:has(>.homework-directory)>.cabinet-context-nav button{min-height:44px;padding:8px 10px;font-size:13px;white-space:nowrap}
.student-cabinet:has(>.homework-directory)>.cabinet-context-nav button svg{width:18px;height:18px}
.homework-directory>header{display:flex;align-items:start;justify-content:space-between;gap:16px}
.homework-directory h2,.homework-directory h3{font-family:var(--font-display);margin:6px 0 10px;overflow-wrap:anywhere}
.homework-directory h2[tabindex="-1"]:focus{outline:none}
.homework-directory>header p{margin:0;color:var(--muted);line-height:1.6}
.homework-directory-count{flex:none;color:var(--muted);padding-block:6px}
.homework-directory-list{display:grid;gap:12px}
.homework-directory-card{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:18px;align-items:center;color:var(--cream);text-decoration:none;min-width:0}
.homework-directory-card>div{min-width:0}.homework-directory-card p{margin:0 0 10px;line-height:1.5;overflow-wrap:anywhere}.homework-directory-card small{color:var(--muted)}
.homework-directory-number{font-family:var(--font-display);font-size:28px;color:var(--cabinet-gold,var(--gold))}
.homework-directory-open{color:var(--cabinet-gold,var(--gold));font-weight:600;white-space:nowrap}
.homework-directory-card:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
.homework-detail .homework-detail-header{align-items:center;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:16px}
.homework-detail-header>div{flex:1;min-width:180px}.homework-detail-header h2{font-size:clamp(21px,2.5vw,30px)}
.homework-detail-header .button{min-height:44px;white-space:normal;flex:none}
.homework-detail-content{min-width:0}.homework-detail-content>.homework-editor{min-height:0}
.homework-detail .first-homework-pack>header{padding:16px}.homework-detail .first-homework-pack>header h2{font-size:21px;line-height:1.3}
.homework-detail .first-homework-pack>header p{font-size:14px;line-height:1.5;margin-bottom:0}
.homework-detail-materials{min-width:0}.homework-detail-materials>summary{cursor:pointer;min-height:44px;align-content:center;font-weight:600}
.homework-detail-materials:not([open])>.lecture-library-section{display:none}
.homework-detail .cabinet-reflection-card{margin:0;grid-column:1/-1}
@media(max-width:680px){.homework-directory>header{flex-wrap:wrap}.homework-directory-card{grid-template-columns:32px minmax(0,1fr);gap:12px;padding:16px}.homework-directory-card h3{font-size:20px;margin:4px 0 6px}.homework-directory-card p{font-size:14px;margin-bottom:8px}.homework-directory-open{grid-column:2}.homework-directory-number{align-self:start;font-size:23px}.homework-detail>.homework-detail-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.homework-detail-header>.button{grid-column:1/-1;width:auto;justify-self:start;font-size:14px}.homework-directory-count{padding:0}.homework-detail-header>div{min-width:0}.homework-detail-header h2{font-size:21px}.homework-directory>header p{font-size:14px;line-height:1.5}}
.faculty-avatar { --portrait-size:100%; --faculty-banner-velvet:#6c2730; position: relative; display: inline-block; flex: 0 0 var(--avatar-size,52px); width: var(--avatar-size,52px); height: var(--avatar-size,52px); overflow: visible; isolation:isolate; }
.faculty-avatar.has-faculty-flag { --portrait-size:82%; }
.faculty-avatar[data-faculty='syromysli'] { --faculty-banner-velvet:#264f75; }
.faculty-avatar[data-faculty='nordelin'] { --faculty-banner-velvet:#285b47; }
.faculty-avatar[data-faculty='khvostopuf'] { --faculty-banner-velvet:#806026; }
.faculty-avatar .faculty-avatar-portrait { position:absolute; z-index:1; left:0; bottom:0; display:block; width:var(--portrait-size); height:var(--portrait-size); object-fit:cover; border-radius:50%; }
.faculty-avatar-banner { position:absolute; z-index:0; right:-14%; top:-18%; width:76%; height:132%; pointer-events:none; filter:drop-shadow(0 3px 4px #0007); }
.faculty-avatar-banner-cloth { position:absolute; inset:4% 0 0; display:block; background:linear-gradient(125deg,#f0d495,#9c743a 45%,#e2c68c 80%,#79572c); clip-path:polygon(0 0,100% 0,100% 84%,50% 100%,0 84%); }
.faculty-avatar-banner-cloth::before { content:''; position:absolute; inset:0 1px 1px; background:linear-gradient(90deg,#0004,#fff2 24%,#0002 52%,#fff1 75%,#0005),linear-gradient(155deg,color-mix(in srgb,var(--faculty-banner-velvet) 80%,#d7b88c),var(--faculty-banner-velvet) 45%,color-mix(in srgb,var(--faculty-banner-velvet) 55%,#090b13)); clip-path:inherit; }
.faculty-avatar-banner-cloth::after { content:''; position:absolute; inset:7% 8% 20%; border:1px solid #e3c58760; border-top:0; border-bottom:0; }
.faculty-avatar .faculty-avatar-crest { position:absolute; z-index:1; top:7%; right:8%; width:60%; height:34%; padding:0; border:0; border-radius:0; background:transparent; object-fit:contain; filter:drop-shadow(0 1px 1px #0008); }
.faculty-avatar-banner-pole { position:absolute; z-index:2; top:2%; left:-5%; width:110%; height:4%; min-height:2px; border-radius:3px; background:linear-gradient(#f9e7b7,#ac7e3c 55%,#d7b475); box-shadow:0 1px 2px #0008; }
.faculty-avatar-banner-pole::before,.faculty-avatar-banner-pole::after { content:''; position:absolute; top:-35%; width:5%; height:170%; border-radius:50%; background:radial-gradient(circle at 30% 25%,#fff0bf,#b88842 65%,#735023); }
.faculty-avatar-banner-pole::before { left:0; }
.faculty-avatar-banner-pole::after { right:0; }
.cabinet-personal-avatar .faculty-avatar { --avatar-size: 100%; }
.academy-settings-avatar-preview .faculty-avatar { --avatar-size: 120px; }
.faculty-avatar .faculty-avatar-portrait { border:2px solid var(--faculty-ring,#d4b374); box-shadow:0 0 0 1px color-mix(in srgb,var(--faculty-ring,#d4b374) 35%,transparent),0 2px 5px #0006; }
.app-shell .topbar .topbar-actions .academy-profile-button > .faculty-avatar { display: block; width: 48px; height: 48px; flex: 0 0 48px; }
.app-shell .topbar .topbar-actions .academy-profile-button .faculty-avatar-portrait { display:block; width:var(--portrait-size); height:var(--portrait-size); object-fit:cover; }
.app-shell .topbar .topbar-actions .academy-profile-button .faculty-avatar-crest { width:60%; height:34%; object-fit:contain; }
.app-shell .topbar .topbar-actions .academy-profile-button .profile-insignia-preview { display: flex; gap: 5px; margin-top: 2px; height: 20px; }
.app-shell .topbar .topbar-actions .academy-profile-button .profile-insignia-preview > span { display: grid; width: 20px; height: 20px; }
.app-shell .topbar .topbar-actions .academy-profile-button .profile-insignia-preview img { width: 18px; height: 18px; }
@media(max-width:600px) { .app-shell .topbar .topbar-actions .academy-profile-button > .faculty-avatar { width:36px; height:36px; flex-basis:36px; } }

.faculty-avatar .faculty-avatar-placeholder { display:grid; place-items:center; background:radial-gradient(circle at 30% 20%,#725331,#211921); color:#f2d39a; }
.faculty-avatar .faculty-avatar-placeholder svg { width:60%; height:60%; }
.faculty-avatar .faculty-avatar-crest-placeholder { display:grid; place-items:center; color:#f2d39a; font:600 14px/1 var(--font-display); }
.faculty-flag-line {
  --banner-gold: #dfbd79;
  --banner-width: clamp(54px, 17cqi, 180px);
  --banner-scale: 1;
  container-type: inline-size;
  padding: 24px 0 8px;
}

.faculty-flag-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  isolation: isolate;
}

/* One uninterrupted rod. The banners share its top, never their bottom. */
.faculty-flag-rail::before {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 6px 0 auto;
  height: 10px;
  border-radius: 20px;
  background: linear-gradient(#f4dfa4, #c69a50 45%, #8e642e 55%, #d0a965);
  box-shadow: 0 1px 0 #f4dfa455, 0 5px 12px #0009;
}

.faculty-flag-crossbar { position: absolute; inset: 0; pointer-events: none; }
.faculty-flag-crossbar::before, .faculty-flag-crossbar::after {
  content: '';
  position: absolute;
  z-index: 3;
  top: 1px;
  width: 20px;
  height: 20px;
  border: 1px solid #e7c88a;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff0bf, #be9147 45%, #66431f);
  box-shadow: 0 2px 8px #0008;
}
.faculty-flag-crossbar::before { left: 0; }
.faculty-flag-crossbar::after { right: 0; }

.faculty-flag-rail > article, .faculty-flag-rail > button {
  --banner-velvet: #6c2730;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0 4px 18px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cream, #f3e6cf);
  text-align: center;
}
.faculty-flag-rail > [data-faculty='syromysli'] { --banner-velvet: #264f75; }
.faculty-flag-rail > [data-faculty='nordelin'] { --banner-velvet: #285b47; }
.faculty-flag-rail > [data-faculty='khvostopuf'] { --banner-velvet: #806026; }
.faculty-flag-rail > article::before, .faculty-flag-rail > button::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 16px 0 46px;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--banner-velvet) 38%, transparent), transparent 70%);
  pointer-events: none;
}

.faculty-flag-line .growing-flag-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: none;
  width: calc(var(--banner-width) + 16px);
  height: calc(max(32px, var(--banner-max-height) * var(--banner-scale)) + 18px);
  padding-top: 14px;
  filter: drop-shadow(0 14px 14px #0008);
}
.faculty-flag-line .growing-flag-pole { display: none; }
.faculty-flag-line .growing-flag-cloth {
  position: relative;
  display: grid;
  place-items: start center;
  width: var(--banner-width);
  height: calc(var(--banner-height) * var(--banner-scale));
  max-height: none;
  padding: 28px 8px 30px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(120deg, #fff0bc, #a47636 30%, #ebd398 52%, #a47636 76%, #f5d68d);
  clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
  transition: height .7s ease;
}
.faculty-flag-line .growing-flag-cloth::before {
  content: '';
  position: absolute;
  inset: 0 3px 5px;
  background:
    repeating-linear-gradient(0deg, #fff0 0 2px, #efd69c06 2px 3px),
    repeating-linear-gradient(90deg, #0000 0 2px, #08080c12 2px 3px),
    linear-gradient(90deg, #0009, #fff2 13%, #0004 27%, #fff1 42%, #0003 55%, #fff2 73%, #0009),
    linear-gradient(165deg, color-mix(in srgb, var(--banner-velvet) 72%, #d7b88c), var(--banner-velvet) 40%, color-mix(in srgb, var(--banner-velvet) 68%, #090a12));
  clip-path: inherit;
}
.faculty-flag-line .growing-flag-cloth::after {
  content: '';
  position: absolute;
  inset: 14px 10px 13%;
  border: 3px double #e3c58799;
  border-top: 5px double #e3c587cc;
  box-shadow: inset 0 0 0 3px #08080b36, 0 0 0 3px #08080b25;
  pointer-events: none;
}
.faculty-flag-line .growing-flag-cloth img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(0px, calc(var(--banner-height) * var(--banner-scale) * .6 - 24px), 152px);
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px #0009);
}
.growing-flag-embroidery { display: none; }
.faculty-flag-line .growing-flag-embroidery {
  position: absolute;
  z-index: 1;
  bottom: 18%;
  display: block;
  width: 62%;
  height: clamp(0px, calc(var(--banner-height) * var(--banner-scale) - 130px), 48px);
  stroke: var(--banner-gold);
  stroke-width: 1.5;
  opacity: .8;
  filter: drop-shadow(0 1px 1px #000);
}
.faculty-flag-line .growing-flag-caption { display: none; }
.faculty-flag-rail > article > strong, .faculty-flag-rail > button > strong {
  margin: 0;
  font: 500 clamp(15px, 2.7cqi, 26px)/1.2 var(--font-display);
  color: var(--cream, #f3e6cf);
}
.faculty-flag-contribution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: 500 clamp(12px, 2cqi, 20px)/1.4 var(--font-ui);
  font-variant-numeric: tabular-nums;
  color: var(--banner-gold);
}
.faculty-flag-contribution svg { width: 15px; height: 15px; flex: none; }
.faculty-flag-rail > button { cursor: pointer; }
.faculty-flag-rail > button:focus-visible { outline: 2px solid var(--banner-gold); outline-offset: -2px; }
.faculty-flag-rail > button:hover > strong { color: var(--banner-gold); }

@container (max-width: 600px) {
  .faculty-flag-rail { --banner-scale: .85; }
  .faculty-flag-line .growing-flag-cloth { padding: 24px 5px 22px; }
  .faculty-flag-line .growing-flag-cloth img { height: clamp(0px, calc(var(--banner-height) * var(--banner-scale) * .6 - 24px), 112px); }
  .faculty-flag-line .growing-flag-cloth::after { inset: 12px 7px 13%; }
  .faculty-flag-line .growing-flag-embroidery { height: clamp(0px, calc(var(--banner-height) * var(--banner-scale) - 100px), 30px); }
  .faculty-flag-contribution svg { display: none; }
}
@container (max-width: 400px) {
  .faculty-flag-rail { --banner-scale: .45; }
  .faculty-flag-line .growing-flag-slot { width: calc(var(--banner-width) + 8px); }
  .faculty-flag-line .growing-flag-cloth { padding: 18px 2px 18px; }
  .faculty-flag-line .growing-flag-cloth::after { inset: 8px 5px 13%; border-width: 1px; }
  .faculty-flag-line .growing-flag-cloth img { width: 94%; height: clamp(0px, calc(var(--banner-height) * var(--banner-scale) * .6 - 20px), 72px); }
  .faculty-flag-line .growing-flag-embroidery { height: clamp(0px, calc(var(--banner-height) * var(--banner-scale) - 80px), 24px); }
  .faculty-flag-rail > article, .faculty-flag-rail > button { gap: 6px; padding: 0 0 12px; }
  .faculty-flag-rail > article > strong, .faculty-flag-rail > button > strong { font-size: clamp(12px, 4cqi, 15px); }
  .faculty-flag-contribution { font-size: 11px; }
  .faculty-flag-crossbar::before, .faculty-flag-crossbar::after { width: 12px; height: 12px; top: 4px; }
}
@container (max-width: 300px) {
  .faculty-flag-rail { --banner-width: clamp(42px, 18cqi, 54px); }
  .faculty-flag-rail > article > strong, .faculty-flag-rail > button > strong { font-size: clamp(10px, 4.2cqi, 12px); }
  .faculty-flag-contribution { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .faculty-flag-line .growing-flag-cloth { transition: none; }
}
.lesson-entry-dialog { position:fixed; inset:0; width:min(460px,calc(100vw - 32px)); margin:auto; padding:32px; border:1px solid #c59a55; border-radius:16px; background:#17191f; color:#f4e4c9; box-shadow:0 24px 80px #000b; }
.lesson-entry-dialog::backdrop { background:#05070cc9; backdrop-filter:blur(5px); }
.lesson-entry-dialog h2 { margin:12px 0; font:500 28px/1.2 var(--font-display); }
.lesson-entry-dialog p,.lesson-entry-waiting p { color:#c3b7a5; line-height:1.5; }
.lesson-entry-dialog > div { display:grid; gap:12px; margin-top:24px; }
.lesson-entry-dialog .button { min-height:56px; justify-content:center; }
.lesson-entry-close { position:absolute; top:8px; right:8px; display:grid; place-items:center; width:40px; height:40px; background:transparent; border:0; color:inherit; }
.lesson-entry-waiting { display:grid; justify-items:center; gap:12px; padding:32px; text-align:center; }
.lesson-entry-waiting > svg { width:40px; height:40px; color:#efc77f; }
.lesson-entry-waiting h2,.lesson-entry-waiting p { margin:0; }
.lesson-entry-waiting > p { max-width:48ch; }

.student-waiting-room { width:min(700px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow-y:auto; }
.student-waiting-room .lesson-entry-waiting h1 { font-size:clamp(25px,5vw,36px); line-height:1.2; overflow-wrap:anywhere; }
@media(max-width:600px) {
 .lesson-entry-dialog { padding:28px 18px 20px; max-height:calc(100dvh - 24px); overflow-y:auto; }
 .lesson-entry-close { width:44px; height:44px; }
 .student-waiting-room .lesson-entry-waiting { padding:28px 8px 16px; }
 .lesson-entry-waiting p { font-size:16px; }
}
.app-shell.academy-theme .page.student-home { display:block; height:auto; min-height:0; max-height:none; padding:18px; overflow:visible; }
.student-home { --home-border:#b08b4c60; --home-gold:#edc67f; --home-muted:#b9ad99; --home-panel:linear-gradient(135deg,#19191feF,#0e1016f5); }
.student-home-grid { display:grid; grid-template-columns:minmax(0,1fr) 230px; grid-template-rows:min-content 1fr; gap:14px; align-items:start; }
.home-motivation { display:grid; grid-template-columns:220px minmax(0,1fr); gap:14px; min-width:0; }
.home-student-card,.home-faculties,.home-studies,.home-side-menu > :is(button,section) { border:1px solid var(--home-border); border-radius:12px; background:var(--home-panel); }
.student-home :is(h2,h3,p) { margin:0; }
.student-home h2 { font:500 20px/1.2 var(--font-display); color:#f1dec0; }
.student-home button { cursor:pointer; }
.student-home button:focus-visible { outline:2px solid var(--home-gold); outline-offset:3px; }
.home-student-card { padding:14px; display:grid; gap:8px; align-content:start; min-width:0; }
.home-student-identity { display:flex; align-items:center; gap:12px; width:100%; padding:0; background:none; border:0; color:inherit; text-align:left; }
.home-student-identity > span:last-child { min-width:0; }
.home-student-identity h2 { overflow-wrap:anywhere; font-size:18px; }
.home-student-identity small { display:block; color:var(--home-muted); font-size:11px; line-height:1.4; margin-top:5px; }
.home-personal-award { display:flex; align-items:center; gap:10px; border:0; border-top:1px solid #b08b4c30; padding:8px 0 0; background:transparent; color:var(--home-gold); text-align:left; }
.home-personal-award > img { width:48px; height:56px; object-fit:contain; }
.home-personal-award > svg:first-child { width:38px; height:48px; }
.home-personal-award > svg:last-child { margin-left:auto; }
.home-personal-award strong { font:600 21px/1.2 var(--font-display); }
.home-personal-award small { display:block; font-size:11px; color:var(--home-muted); margin-top:3px; }
.home-earned-grains { display:flex; align-items:center; gap:8px; font-size:12px; line-height:1.4; color:var(--home-muted); }
.home-earned-grains b { color:var(--home-gold); font-size:17px; }
.home-earned-grains svg { color:var(--home-gold); flex-shrink:0; }
.home-achievement-badges { display:flex; flex-wrap:wrap; gap:6px; min-height:30px; align-items:center; }
.home-achievement-badges button { display:grid; place-items:center; width:32px; height:32px; border:1px solid var(--home-border); border-radius:50%; background:#dba85212; color:var(--home-gold); }
.home-achievement-badges small { color:var(--home-muted); font-size:11px; }
.home-faculties { padding:12px 14px 4px; min-width:0; }
.home-faculties > header { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.home-faculties > header > span { color:var(--home-muted); font-size:10px; text-align:right; max-width:100px; }
.faculty-flag-line.faculty-flag-line--compact { padding:10px 0 0; --banner-width:clamp(46px,17cqi,90px); }
.faculty-flag-line--compact .faculty-flag-rail > button { gap:3px; padding:0 2px 8px; }
.faculty-flag-line--compact .growing-flag-cloth { padding:12px 4px 16px; }
.faculty-flag-line--compact .growing-flag-cloth img { height:calc(var(--banner-height) * var(--banner-scale) * .65); max-height:76px; }
.faculty-flag-line--compact .growing-flag-cloth::after { inset:7px 5px 13%; border-width:1px; }
.faculty-flag-line--compact .growing-flag-embroidery { display:none; }
.faculty-flag-line--compact .faculty-flag-rail > button > strong { font:500 clamp(11px,2.7cqi,15px)/1.25 var(--font-display); }
.faculty-flag-line--compact .faculty-flag-contribution { font-size:11px; gap:3px; }
.faculty-flag-line--compact .faculty-flag-standing { display:grid; gap:2px; min-height:30px; color:var(--home-muted); font-size:10px; }
.faculty-flag-standing b { color:var(--home-gold); font-size:9px; }
.faculty-flag-line--compact .faculty-flag-rail > .is-own-faculty { background:linear-gradient(#e4b25c18,#e4b25c09); box-shadow:inset 0 0 0 1px #e4b25c80,0 0 22px #c88b3420; }
.home-studies { grid-column:1; min-width:0; overflow:hidden; }
.home-studies > header { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 14px; border-bottom:1px solid var(--home-border); }
.home-studies [role="tablist"] { display:flex; gap:6px; }
.home-studies [role="tab"] { min-height:44px; display:flex; align-items:center; gap:7px; padding:8px 10px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--home-muted); font-size:14px; }
.home-studies [role="tab"][aria-selected="true"] { border-color:#d7ac6155; background:#dba85214; color:var(--home-gold); }
.student-home .home-studies [role="tab"]:focus { outline:none; }
.student-home .home-studies [role="tab"]:focus-visible { text-decoration:underline; text-underline-offset:4px; }
.home-studies [role="tab"] span { font-size:11px; }
.home-schedule-link { display:flex; align-items:center; min-height:44px; padding:0; border:0; background:none; color:var(--home-gold); font-size:12px; }
.home-study-list { max-height:240px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.home-study-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid #b08b4c25; }
.home-study-topic { display:flex; align-items:center; gap:10px; min-width:0; }
.home-study-topic > span { font:500 18px var(--font-display); color:#bca47c; }
.home-study-topic h3 { font:500 17px/1.3 var(--font-display); color:#eddfc7; }
.home-study-topic small { display:block; color:var(--home-muted); font-size:10px; margin-top:4px; }
.home-study-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.home-study-actions button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; padding:7px 10px; border-radius:7px; font:600 12px/1.3 var(--font-ui); }
.home-lecture-button { border:1px solid #80bb9f75; background:#365c442e; color:#c1e4ca; }
.home-lecture-pending { width:94px; font-size:10px; color:#a79c8d; text-align:center; }
.home-homework-button { min-width:155px; border:1px solid #e6b36b; background:#ae64292e; color:#ffe0a2; }
.home-homework-button.is-pending { box-shadow:inset 3px 0 #edb459; }
.home-homework-button.is-done { border-color:#7eab8270; background:#2a4c3520; color:#b4d5b6; }
.home-homework-button span { text-align:left; }
.home-homework-button small { display:block; margin-top:3px; font-size:9px; font-weight:400; }
.home-homework-button small::first-letter { text-transform:uppercase; }
.home-empty { padding:20px; color:var(--home-muted); font-size:14px; line-height:1.5; }
.home-next-lesson { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px; background:linear-gradient(105deg,#b1823b1c,transparent); }
.home-next-lesson h3 { font:500 18px/1.3 var(--font-display); margin:4px 0; color:#f0dfc2; }
.home-next-lesson small { display:flex; align-items:center; gap:5px; color:var(--home-muted); font-size:11px; }
.home-next-lesson .button { flex-shrink:0; min-height:44px; font-size:13px; padding:10px 14px; }
.home-next-lesson .lesson-entry-waiting { padding:12px; width:100%; }
.home-next-lesson .lesson-entry-waiting > svg { width:28px; height:28px; }
.home-next-lesson .lesson-entry-waiting p { font-size:13px; }
.home-side-menu { grid-column:2; grid-row:1/3; display:grid; gap:12px; min-width:0; }
.home-side-menu > button { display:flex; align-items:center; gap:10px; padding:16px 12px; min-height:72px; text-align:left; color:#ecd9b8; }
.home-side-menu > button > svg:first-child { color:var(--home-gold); flex-shrink:0; }
.home-side-menu > button > svg:last-child { margin-left:auto; flex-shrink:0; }
.home-side-menu button span { min-width:0; }
.home-side-menu button strong { font:500 18px/1.2 var(--font-display); }
.home-side-menu button small { display:block; color:var(--home-muted); font-size:11px; line-height:1.5; margin-top:4px; }
.home-side-menu .home-diary-link { min-height:115px; background:linear-gradient(135deg,#3b2b25ef,#18191ff5); }
.home-chat-links { padding:14px 12px; }
.home-chat-links h2 { display:flex; align-items:center; gap:8px; padding-bottom:10px; }
.home-chat-links button { display:flex; align-items:center; gap:10px; width:100%; padding:11px 0; border:0; border-top:1px solid #b08b4c25; background:transparent; color:#e6d7be; text-align:left; font-size:13px; min-height:52px; }
.home-chat-links button > svg:first-child { flex-shrink:0; color:#cdb17b; }
.home-chat-links button > svg:last-child { margin-left:auto; flex-shrink:0; }
.home-chat-links .faculty-avatar { --avatar-size:32px; margin-right:4px; }
.home-side-menu .home-balance-link { font-size:12px; min-height:62px; }
.home-data-note { margin-top:8px!important; color:var(--home-muted); font-size:11px; }
@media(max-width:1150px) {
  .student-home-grid { grid-template-columns:minmax(0,1fr) 200px; gap:10px; }
  .home-motivation { grid-template-columns:185px minmax(0,1fr); gap:10px; }
  .home-faculties > header > span { display:none; }
  .home-study-row { flex-wrap:wrap; }
  .home-study-actions { margin-left:auto; }
}
@media(max-width:840px), (max-width:1024px) and (hover:none) and (pointer:coarse) {
  .app-shell.academy-theme .page.student-home { padding:12px 12px 24px; }
  .student-home-grid { grid-template-columns:minmax(0,1fr); }
  .home-side-menu { grid-column:1; grid-row:auto; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .home-side-menu .home-chat-links { grid-row:span 2; }
  .home-study-list { max-height:none; }
  .home-study-row { flex-wrap:nowrap; }
}
@media(max-width:600px) {
  .home-motivation { grid-template-columns:minmax(0,1fr); }
  .home-student-card { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:8px 12px; padding:12px; }
  .home-student-identity { grid-row:1; }
  .home-student-identity .faculty-avatar { --avatar-size:44px; }
  .home-student-identity h2 { font-size:17px; }
  .home-personal-award { border:0; padding:0; gap:4px; min-width:0; }
  .home-personal-award > span { min-width:0; }
  .home-personal-award strong { overflow-wrap:anywhere; }
  .home-personal-award > img { width:36px; height:44px; }
  .home-personal-award strong { font-size:17px; }
  .home-personal-award small,.home-personal-award > svg:last-child { display:none; }
  .home-earned-grains { grid-column:1; font-size:11px; }
  .home-achievement-badges { justify-content:end; }
  .home-achievement-badges small { display:none; }
  .home-achievement-badges button { width:28px; height:28px; }
  .home-studies > header { padding:6px 10px; flex-wrap:wrap; }
  .home-studies [role="tab"] { font-size:13px; padding:8px; }
  .home-study-row { display:grid; gap:10px; padding:12px; }
  .home-study-actions { width:100%; justify-content:space-between; margin:0; }
  .home-study-actions > * { flex:1; min-width:0; }
  .home-homework-button span { min-width:0; white-space:normal; }
  .home-next-lesson { flex-wrap:wrap; padding:14px 12px; }
  .home-next-lesson > .button { width:100%; }
  .home-side-menu { grid-template-columns:minmax(0,1fr); }
  .home-side-menu .home-diary-link { min-height:80px; }
  .home-study-actions button { min-height:48px; }
  .home-study-topic h3 { font-size:18px; }
}
@media(max-width:360px) {
  .home-student-card { column-gap:6px; }
  .home-student-identity { gap:8px; }
  .home-student-identity h2 { font-size:15px; }
  .home-personal-award > img { width:28px; }
  .home-earned-grains b { font-size:15px; }
}
.student-policy-cards { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0; }
.student-policy-cards>button { display:flex;align-items:center;gap:12px;min-height:74px;padding:14px 18px;text-align:left;color:var(--cream);background:linear-gradient(125deg,var(--surface),#c7994510);border:1px solid var(--line);border-radius:12px;font-family:var(--font-ui); }
.student-policy-cards>button>svg { width:23px;flex:none;color:var(--lime); }
.student-policy-cards>button>span { display:grid;gap:5px;flex:1; }
.student-policy-cards b {font-weight:600}.student-policy-cards small {color:var(--muted);font-size:12px;line-height:1.4}
.policy-entrance {max-width:920px;margin:auto;padding-top:28px}.policy-identity h1 {margin:8px 0 18px;font-family:var(--font-display)}.policy-entrance>p {line-height:1.6;color:var(--cream)}.policy-entrance>p svg {vertical-align:middle;width:20px;color:var(--lime)}
.policy-backdrop {position:fixed;inset:0;z-index:1000;background:#000b;display:grid;place-items:center;padding:20px;}
.policy-document {position:relative;inset:auto;margin:0;width:min(720px,100%);max-height:calc(100dvh - 40px);overflow:auto;padding:32px;background:var(--surface);color:var(--cream);border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 80px #0008;}
.policy-document h2 {font:500 32px/1.2 var(--font-display);padding-right:32px;margin:12px 0 24px}.policy-document h3 {font:500 22px/1.3 var(--font-display);margin:20px 0 10px}.policy-document p,.policy-document li {font:400 15px/1.65 var(--font-ui)}.policy-document li {margin-bottom:12px}.policy-document dl {margin:0}.policy-document dl>div {display:flex;gap:16px;justify-content:space-between;padding:10px 0;border-bottom:1px solid var(--line);font:14px/1.5 var(--font-ui)}.policy-document dd {margin:0;white-space:nowrap;color:var(--lime);font-weight:600}.policy-close {position:absolute;right:18px;top:18px;background:none;border:0;color:var(--cream);width:44px;height:44px;}.policy-confirm {border-top:1px solid var(--line);padding-top:20px;margin-top:24px;display:grid;gap:16px}.policy-confirm label {display:flex;align-items:start;gap:12px;line-height:1.6}.policy-confirm input {width:20px;height:20px;accent-color:var(--lime);flex:none}.policy-accepted {display:flex;gap:8px;align-items:center;color:var(--lime)}
.cabinet-diary-link {display:flex;align-items:center;gap:10px;background:none;color:var(--cream);border:0;padding:8px 0;min-height:44px;text-align:left;font:14px/1.4 var(--font-ui)}.cabinet-diary-link svg {color:var(--lime);width:20px}.cabinet-diary-link small {display:block;color:var(--muted);font-size:12px}
@media(max-width:600px){.student-policy-cards{grid-template-columns:1fr}.policy-document{padding:24px 18px}.policy-document h2{font-size:28px}.policy-backdrop{padding:10px}.policy-document{max-height:calc(100dvh - 20px)}}
.cabinet-shortcuts { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.cabinet-shortcuts .student-policy-compact { display:flex; flex-wrap:wrap; gap:8px; margin:0; }
.cabinet-shortcuts .student-policy-compact > button,.cabinet-shortcuts .cabinet-mentor-button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:#1a1720; color:var(--cream); font:500 13px/1.4 var(--font-ui); }
.cabinet-shortcuts .student-policy-compact > button > svg,.cabinet-mentor-button svg { width:18px; height:18px; color:var(--lime); }
.mentor-dialog { width:min(400px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); box-sizing:border-box; overflow:auto; border:1px solid var(--line); border-radius:14px; padding:24px; background:#17151e; color:var(--cream); text-align:center; }
.mentor-dialog::backdrop { background:#000b; }
.mentor-dialog img { display:block; width:190px; max-width:100%; height:auto; margin:20px auto 16px; border-radius:12px; }
.mentor-dialog p { font:13px/1.5 var(--font-ui); color:var(--muted); }
.mentor-dialog h2 { font:28px/1.2 var(--font-display); margin:8px 0 20px; }
.mentor-dialog-close { position:absolute; top:8px; right:8px; display:grid; place-items:center; width:44px; height:44px; border:0; background:none; color:var(--cream); }
.mentor-dialog button:focus-visible { outline:2px solid var(--lime); outline-offset:3px; }
.student-motivation { --motivation-gold:#edc67f; color:#f1dec0; background:linear-gradient(110deg,#30271bef,#12151ef5); border:1px solid #b08b4c70; border-radius:12px; padding:14px 16px; min-width:0; text-align:left; }
.motivation-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.motivation-metrics > div { display:flex; align-items:center; gap:10px; min-width:0; }
.motivation-metrics > div + div { border-left:1px solid #b08b4c45; padding-left:14px; }
.motivation-metrics svg { width:24px; height:24px; flex-shrink:0; color:var(--motivation-gold); }
.motivation-metrics small { display:block; font:400 12px/1.4 var(--font-ui); color:#c5b798; }
.motivation-metrics strong { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; margin-top:3px; font:600 22px/1.2 var(--font-display); color:var(--motivation-gold); overflow-wrap:anywhere; }
.motivation-metrics strong span { font:500 13px/1.3 var(--font-ui); color:#eddfc7; }
.student-motivation .motivation-next-step { margin:10px 0 0; padding-top:9px; border-top:1px solid #b08b4c35; font:400 12px/1.5 var(--font-ui); color:#d5c5a8; }
.student-motivation .motivation-stale { display:block; margin-top:8px; font:400 11px/1.4 var(--font-ui); color:#d5c5a8; }
.student-motivation-slot { padding:16px 20px 0; }
.student-motivation--compact { padding:8px 12px; }
.student-motivation--compact .motivation-metrics strong { font-size:17px; }
.student-motivation--compact .motivation-metrics small { font-size:10px; }
.student-motivation--compact .motivation-metrics svg { width:18px; height:18px; }
.game-header > .student-motivation { grid-column:1/-1; flex:1 0 100%; width:100%; }
.homework-case-entry main > .student-motivation { margin:12px; }
.student-waiting-room .student-motivation { margin:24px 12px 0; }
@media(max-width:600px) {
 .student-motivation-slot { padding:12px 12px 0; }
 .student-motivation { padding:12px; }
 .motivation-metrics { gap:8px; }
 .motivation-metrics > div { display:block; }
 .motivation-metrics > div + div { padding-left:8px; }
 .motivation-metrics svg { display:none; }
 .motivation-metrics small { font-size:10px; min-height:28px; }
 .motivation-metrics strong { font-size:18px; gap:3px; }
 .motivation-metrics strong span { display:block; width:100%; font-size:11px; }
 .student-motivation--compact { padding:7px 10px; }
 .student-motivation--compact .motivation-metrics strong { font-size:15px; }
}

.motivation-faculty > img { object-fit:contain; flex-shrink:0; }
@media(max-width:600px) { .motivation-faculty > img { display:none; } }

.classroom-student > .classroom-topbar { flex-wrap:wrap; }
.classroom-student > .classroom-topbar > .student-motivation { grid-column:1/-1; flex:1 0 100%; order:4; width:100%; }
/* Scoped to the owl card: legacy cabinet mail grids must not crop the art. */
.academy-theme .academy-tab-overview .academy-mail-card.academy-owl-post {
  --owl-gold: var(--cabinet-gold, #e2b96c);
  --owl-line: var(--cabinet-line, #b68a4344);
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 16px;
  background: radial-gradient(ellipse at 22% 44%, #a36d2524, transparent 58%), #101116;
}
.academy-owl-post .academy-owl-post-heading { display: block; padding: 0; border: 0; }
.academy-theme .academy-owl-post .academy-owl-post-heading h2 {
  margin: 0 0 4px;
  color: #f2d29a;
  font: 400 clamp(23px, 1.7vw, 27px)/1.15 var(--font-display);
}
.academy-owl-post-heading small { color: #b5a892; font: 12px/1.4 var(--font-ui); }
.academy-owl-post .academy-owl-delivery {
  display: grid;
  grid-template-columns: minmax(90px, .85fr) minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 176px;
  margin: 8px 0;
  padding: 4px 0;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-family: var(--font-ui);
  cursor: pointer;
}
.academy-owl-portrait { display: grid; place-items: center; min-width: 0; height: 176px; }
.academy-owl-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px #0008);
}
.academy-owl-letter {
  position: relative;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 24px 12px 14px;
  border: 1px solid #b08b4c;
  border-radius: 3px 10px 3px 10px;
  background: linear-gradient(135deg, #efddb7, #d9b77c);
  box-shadow: inset 0 0 0 3px #e7ce9e, inset 0 0 0 4px #b18a4555, 0 7px 16px #0005;
  color: #342316;
  transition: box-shadow .18s ease;
}
.academy-owl-letter::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 45%;
  width: 10px;
  height: 10px;
  border-left: 1px solid #b08b4c;
  border-bottom: 1px solid #b08b4c;
  background: #e6cea0;
  transform: rotate(45deg);
}
.academy-owl-letter > small { color: #614425; font: 600 10px/1.3 var(--font-ui); letter-spacing: .05em; text-transform: uppercase; }
.academy-owl-letter > b { font: 600 14px/1.4 var(--font-ui); overflow-wrap: anywhere; }
.academy-owl-seal {
  position: absolute;
  top: -17px;
  right: 12px;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 5px;
  border: 1px solid #d9b572;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #efd39a, #b88a43 72%);
  box-shadow: inset 0 0 0 3px #b78c47, inset 0 0 0 4px #e3c184, 0 3px 6px #44200e55;
  color: #20170d;
  font: 700 14px/1 var(--font-ui);
}
.academy-owl-seal svg { width: 17px; height: 17px; }
.is-quiet .academy-owl-seal { border-color: #d9b572; background: radial-gradient(circle at 35% 25%, #d1ab66, #947039 72%); box-shadow: inset 0 0 0 3px #ac8245, inset 0 0 0 4px #d5b47c, 0 3px 6px #44200e55; color: #20170d; }
.academy-owl-letter-action { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding-top: 8px; border-top: 1px solid #8a632d44; color: #573a1c; font: 600 11px/1.4 var(--font-ui); }
.academy-owl-letter-action svg { width: 16px; height: 16px; flex: none; }
.academy-owl-delivery:hover .academy-owl-letter { box-shadow: inset 0 0 0 3px #e7ce9e, inset 0 0 0 4px #b18a4555, 0 7px 18px #b98d3933; }
.academy-owl-chats { display: grid; border-top: 1px solid var(--owl-line); }
.academy-owl-post .academy-owl-chats button {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--owl-line);
  background: none;
  color: var(--owl-gold);
  text-align: left;
  font: 400 13px/1.4 var(--font-ui);
  cursor: pointer;
}
.academy-owl-chats button:last-child { border-bottom: 0; }
.academy-owl-chats svg { width: 17px; height: 17px; }
.academy-owl-chats button:hover { color: #fff0c9; }
.academy-owl-post button:focus-visible { outline: 2px solid #f1ce88; outline-offset: 3px; }
@media (max-width: 380px) {
  .academy-theme .academy-tab-overview .academy-mail-card.academy-owl-post { padding: 12px; }
  .academy-owl-post .academy-owl-delivery { grid-template-columns: minmax(80px, .75fr) minmax(0, 1fr); }
  .academy-owl-portrait { height: 156px; }
  .academy-owl-letter { padding: 22px 10px 12px; }
  .academy-owl-letter > b { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .academy-owl-letter { transition: none; } }
.compact-cabinet { display:grid; gap:14px; color:var(--cream); }
.app-shell.academy-theme .student-cabinet.academy-tab-overview { display:block; height:auto; min-height:0; overflow:visible; }
.compact-cabinet :is(button,summary) { font-family:var(--font-ui); cursor:pointer; }
.compact-cabinet :is(button,summary):focus-visible,.cabinet-compact-settings summary:focus-visible { outline:2px solid #edc67f; outline-offset:3px; }
.compact-cabinet h2,.cabinet-compact-settings h2 { display:flex; align-items:center; gap:9px; font:500 23px/1.25 var(--font-display); margin:0 0 12px; }
.compact-cabinet svg,.cabinet-compact-settings summary svg { width:20px; height:20px; flex-shrink:0; color:#dfb86d; }
.cabinet-completed,.cabinet-personal-block,.cabinet-learning-block,.cabinet-compact-settings { border:1px solid #b18c4c66; border-radius:13px; background:linear-gradient(125deg,#211b20f5,#101219f7); overflow:hidden; }
.cabinet-completed { display:grid; grid-template-columns:minmax(0,1fr) 200px; gap:20px; padding:18px; }
.cabinet-completed h2>span { font:600 15px var(--font-ui); border:1px solid #b18c4c66; border-radius:50%; padding:6px 10px; }
.cabinet-completed p { font:14px/1.5 var(--font-ui); color:var(--muted); }
.cabinet-completed figure { margin:0; display:grid; align-content:center; gap:8px; text-align:center; }
.cabinet-completed figure img { display:block; width:100%; height:120px; object-fit:cover; object-position:center 35%; border-radius:9px; }
.cabinet-completed figcaption { color:#f0d198; font:500 21px/1.2 var(--font-display); }
.cabinet-homework-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.compact-cabinet .button { min-height:44px; font-size:13px; padding:9px 12px; }
.compact-cabinet summary,.cabinet-compact-settings summary { list-style:none; display:flex; align-items:center; gap:10px; min-height:44px; padding:10px 0; font:500 13px/1.5 var(--font-ui); }
.compact-cabinet summary::-webkit-details-marker,.cabinet-compact-settings summary::-webkit-details-marker { display:none; }
.disclosure-plus { margin-left:auto; transition:transform .15s; }
:where(.compact-cabinet,.cabinet-compact-settings) details[open]>summary>.disclosure-plus { transform:rotate(45deg); }
.cabinet-completed ul { margin:0; padding:0; list-style:none; }
.cabinet-completed li>button { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:44px; padding:10px; border:0; border-bottom:1px solid #b18c4c33; background:transparent; color:var(--cream); text-align:left; }
.cabinet-personal-row { display:grid; grid-template-columns:minmax(180px,1.4fr) minmax(140px,1fr) minmax(190px,1.3fr) minmax(145px,1fr); gap:10px; align-items:stretch; padding:16px; }
.cabinet-personal-row>button,.cabinet-personal-row .student-policy-cards>button { min-width:0; display:flex; align-items:center; gap:9px; border:1px solid #b18c4c44; border-radius:9px; background:#29232966; color:var(--cream); text-align:left; padding:10px; min-height:64px; font:500 13px/1.4 var(--font-ui); }
.cabinet-personal-row .student-policy-cards { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:0; }
.cabinet-personal-row .student-policy-cards>button { flex-direction:column; justify-content:center; gap:6px; text-align:center; }
.cabinet-personal-row .student-policy-cards>button>span { flex:none; }
.cabinet-personal-row small,.cabinet-learning-row small { display:block; font-size:11px; color:#c9baa2; margin-top:3px; }
.cabinet-self b { display:block; overflow-wrap:anywhere; }
.cabinet-self .faculty-avatar { width:52px; height:58px; flex-shrink:0; }
.cabinet-faculty-toggle>img { width:44px; height:52px; object-fit:contain; }
.cabinet-faculty-toggle>svg { margin-left:auto; }
.cabinet-personal-footer { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:12px; padding:12px 16px; border-top:1px solid #b18c4c33; }
.cabinet-personal-footer>span,.cabinet-personal-footer>button { display:flex; align-items:center; gap:8px; font:500 13px/1.4 var(--font-ui); }
.cabinet-personal-footer>button { min-height:44px; color:#e9c786; background:none; border:0; }
.cabinet-badges { padding:0 16px; border-top:1px solid #b18c4c33; }
.cabinet-reveal { border-top:1px solid #b18c4c55; padding:18px; }
.cabinet-reveal p { font:14px/1.5 var(--font-ui); }
.cabinet-reveal>.button { margin:12px 8px 0 0; }
.cabinet-learning-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:0; }
.cabinet-learning-row>button { display:flex; align-items:center; justify-content:center; gap:10px; min-width:0; min-height:88px; padding:12px; border:0; border-right:1px solid #b18c4c44; background:transparent; color:var(--cream); font:500 14px/1.4 var(--font-ui); text-align:left; }
.cabinet-learning-row>button:last-child { border:0; }
.cabinet-learning-row>button>svg:last-child { width:16px; }
.cabinet-owl img { width:48px; height:54px; object-fit:contain; }
.cabinet-session-list { list-style:none; padding:0; margin:12px 0; }
.cabinet-session-list li { display:flex; gap:18px; padding:12px 0; border-bottom:1px solid #b18c4c33; font:14px/1.5 var(--font-ui); }
.cabinet-session-list time { flex:0 0 125px; color:#e9c786; }
.cabinet-session-list small { display:block; font-size:12px; }
.cabinet-compact-settings { padding:16px; }
.cabinet-compact-settings details { border-top:1px solid #b18c4c33; }
.cabinet-compact-settings details>div { padding:4px 0 12px; }
.cabinet-compact-settings details>button { margin:4px 0 12px; }
.cabinet-compact-settings .toggle-row { min-height:48px; font:13px/1.5 var(--font-ui); }
.cabinet-compact-settings p { font:13px/1.5 var(--font-ui); color:var(--muted); }
@media(max-width:1100px) {
 .cabinet-personal-row { grid-template-columns:1fr 1fr; }
 .cabinet-learning-row { grid-template-columns:1fr 1fr; }
 .cabinet-learning-row>button:nth-child(-n+2) { border-bottom:1px solid #b18c4c44; }
 .cabinet-learning-row>button:nth-child(2) { border-right:0; }
}
@media(max-width:600px) {
 .compact-cabinet { gap:12px; }
 .cabinet-completed { grid-template-columns:minmax(0,1fr) 100px; padding:12px; gap:12px; }
 .cabinet-completed h2 { font-size:20px; flex-wrap:wrap; }
 .cabinet-completed figure img { height:110px; }
 .cabinet-completed figcaption { font-size:18px; }
 .cabinet-completed .cabinet-homework-actions { display:grid; }
 .cabinet-completed .button { font-size:12px; padding:8px; }
 .cabinet-personal-row { padding:10px; gap:8px; }
 .cabinet-personal-row>button { padding:8px; flex-wrap:wrap; }
 .cabinet-personal-row .student-policy-cards { grid-column:1/-1; grid-row:2; }
 .cabinet-personal-row .cabinet-mentor-button { grid-column:1/-1; justify-content:center; min-height:48px; }
 .cabinet-personal-footer { padding:8px 12px; gap:2px; }
 .cabinet-learning-row>button { flex-wrap:wrap; min-height:92px; padding:10px; font-size:13px; gap:7px; }
 .cabinet-owl img { width:36px; height:42px; }
 .cabinet-reveal { padding:12px; }
 .cabinet-session-list li { gap:10px; font-size:13px; }
 .cabinet-session-list time { flex-basis:94px; }
 .cabinet-compact-settings { padding:12px; }
}

.cabinet-rank-cup { width:40px; height:40px; object-fit:contain; }
.cabinet-notification-link { display:flex; align-items:center; gap:10px; width:100%; min-height:44px; padding:12px; border:0; border-top:1px solid #b18c4c44; background:transparent; color:var(--cream); text-align:left; }
.cabinet-notification-link svg:last-child { margin-left:auto; }
.enrollment-staff-queue { --enrollment-gap: 12px; --enrollment-padding: 16px; }
.enrollment-staff-queue > header { flex-wrap: wrap; gap: var(--enrollment-gap); }
.enrollment-totals { display: flex; flex-wrap: wrap; gap: var(--enrollment-gap); margin: 0; }
.enrollment-totals > div { display: flex; align-items: center; gap: var(--enrollment-gap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.enrollment-totals dt { font-size: 12px; color: var(--muted); }
.enrollment-totals dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.enrollment-faculty-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--enrollment-gap); margin: 20px 0; }
.enrollment-faculty-metrics > div { display: grid; gap: 8px; min-width: 0; padding: var(--enrollment-padding); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.enrollment-faculty-metrics dt { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.enrollment-faculty-metrics dd { margin: 0; font: 36px/1.2 var(--font-display); color: var(--lime); font-variant-numeric: tabular-nums; }
.enrollment-faculty-metrics > div > span { font-size: 12px; color: var(--muted); }
.enrollment-staff-queue .enrollment-demo-note { padding-left: var(--enrollment-padding); border-left: 2px solid var(--lime); font-size: 12px; }
.enrollment-filters button { display: inline-flex; align-items: center; gap: var(--enrollment-gap); }
.enrollment-filters button > span { font-variant-numeric: tabular-nums; font-weight: 600; }
.enrollment-staff-queue .staff-row.enrollment-row > span.enrollment-number:not(.staff-chip) { flex: 0 0 44px; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; }
.enrollment-row .enrollment-status { flex-shrink: 0; }
.enrollment-row.is-sorting { border-color: var(--lime); background: var(--surface-2); }
@media (max-width: 900px) { .enrollment-faculty-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 500px) {
  .enrollment-staff-queue { --enrollment-padding: 12px; }
  .enrollment-row { flex-wrap: wrap; }
  .enrollment-row .enrollment-status { margin-left: 52px; }
}
.homework-reward-group{min-width:0;margin-block:16px;padding-block:12px;border-block:1px solid var(--line)}
.homework-reward-group .button{max-width:100%;min-height:44px;height:auto;white-space:normal;margin:6px 6px 6px 0}
.homework-reward-group select{min-width:0;max-width:100%}
.homework-reward-group p,.homework-reward-group li{overflow-wrap:anywhere}
.homework-reward-group summary{cursor:pointer;min-height:44px;padding-block:10px}
.staff-panel button,.staff-panel select{user-select:none;-webkit-user-select:none}
.teacher-attendance{min-width:0;padding:16px 0}
.teacher-attendance>header{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px}
.teacher-attendance h2{margin:0;font-size:clamp(21px,2vw,28px)}
.teacher-attendance p{line-height:1.5;margin:8px 0;color:var(--muted)}
.attendance-period{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}
.attendance-period label{display:grid;gap:5px;min-width:0;flex:0 1 180px}
.attendance-period input{max-width:100%;min-width:0;width:100%;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--cream)}
.teacher-attendance table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.teacher-attendance caption{text-align:left;margin:12px 0;font-weight:700}
.teacher-attendance th,.teacher-attendance td{text-align:right;padding:12px 8px;border-bottom:1px solid var(--line)}
.teacher-attendance th:first-child{text-align:left}
.teacher-attendance tfoot{font-weight:700}
.teacher-attendance .attendance-note{font-size:13px}
@media(max-width:480px){.teacher-attendance th,.teacher-attendance td{padding:10px 4px;font-size:13px}.attendance-period label{flex:1 1 120px}}
.staff-theme {
  --lime: #e6b85f; --lime-2: #c79543; --cream: #f7e4bc; --muted: #c0b198;
  --ink: #211708; --line: #675032; --surface: #121116; --surface-2: #211c19;
  --sky: #a1c6dc; --radius: 12px; --radius-lg: 16px;
  background: linear-gradient(90deg,rgba(5,6,10,.6),rgba(5,6,10,.38)),url('/assets/academy/academy-shell-v3.webp') center / cover fixed;
}
.staff-theme .sidebar { background: linear-gradient(160deg,#161319,#080a10); border-color: var(--line); padding: 14px 10px; }
.staff-theme .brand { background: none; border: 0; padding: 4px; gap: 8px; }
.staff-theme .brand b { white-space: normal; font: 19px/1.12 var(--font-display); letter-spacing: 0; }
.staff-theme .brand-icon { background-image: url('/academy-icon-optimized.webp'); box-shadow: none; }
.staff-theme .sidebar nav { border: 0; background: none; padding: 0; gap: 3px; }
.staff-theme .sidebar .nav-item { min-height: 44px; padding: 9px 10px; border-radius: 6px; color: var(--muted); font-size: 13px; }
.staff-theme .sidebar .nav-item.active { color: var(--cream); border-color: #98713c; background: linear-gradient(90deg,#49301e,#251c1b); box-shadow: inset 3px 0 var(--lime); }
.staff-theme .sidebar-note { background: none; border-color: var(--line); }
.staff-theme .topbar { min-height: 70px; height: 70px; padding: 8px 24px; background: rgba(10,10,16,.93); border-color: var(--line); }
.staff-theme .topbar-actions { min-width: 0; }
.staff-theme .academy-profile-button { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 0; background: none; border: 0; text-align: left; }
.staff-theme .academy-profile-button img { flex: 0 0 44px; width: 44px; height: 44px; object-fit: contain; border-radius: 50%; }
.staff-theme .academy-profile-button b { display: block; font: 18px/1.2 var(--font-display); }
.staff-theme .academy-profile-button small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.staff-theme .account-chip, .staff-theme .academy-role-switcher { display: flex; align-items: center; gap: 16px; padding: 0; background: none; border: 0; }
.staff-theme .account-chip > button:not(.academy-profile-button) { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.staff-theme .account-chip .academy-profile-button { width: auto; max-width: 330px; }
.staff-theme .academy-profile-button > span { min-width: 0; }
.staff-theme .academy-profile-button b, .staff-theme .academy-profile-button small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.staff-theme .sidebar .nav-item.active svg { color: var(--lime); }
.staff-theme .academy-role-control { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 14px; min-height: 48px; border: 1px solid #a58046; border-radius: 6px; background: #342719; }
.staff-theme .academy-role-control small { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.staff-theme .academy-role-control b { font-size: 12px; }
.staff-theme .academy-role-control select { position: absolute; inset: 0; width: 100%; opacity: 0; }
.staff-theme .classroom-launch { min-height: 44px; border-color: var(--line); background: #302318; color: var(--cream); }
.staff-theme #main-content { min-width: 0; }
.staff-theme .classroom-shell { background: linear-gradient(#080911c9,#080911e6),url('/assets/academy/academy-shell-v3.webp') center / cover fixed; }
.staff-theme .classroom-topbar { background: #0e0e16ed; }
.staff-archive-board { display: block; width: 100%; border: 1px solid var(--line); border-radius: 7px; background: #171a16; }
.observer-media-note { padding: 20px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.observer-case-preview { padding: 20px; margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.observer-case-preview > header span { color: var(--lime); font-size: 12px; }
.observer-case-preview p { overflow-wrap: anywhere; line-height: 1.5; font-size: 14px; }
.observer-chat-log { max-height: 220px; overflow-y: auto; }
.observer-room-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.observer-room-tabs > span { flex: 1; }
.observer-room-tabs button { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--cream); font-size: 12px; }
.observer-room-tabs button[aria-pressed=true] { background: var(--lime); color: var(--ink); }
.staff-theme .classroom-main > .shared-board.readonly canvas { max-height: calc(100dvh - 320px); object-fit: contain; }
.staff-theme .observer-media-note { min-height: 170px; }
.staff-theme .classroom-shell h1, .staff-theme .classroom-shell h2, .staff-theme .classroom-shell h3 { font-family: var(--font-display); font-weight: 500; }
.staff-theme .classroom-shell .team-map, .staff-theme .classroom-shell .speaker-control, .staff-theme .classroom-shell .plenary-view, .staff-theme .classroom-shell .class-timer { border-radius: 10px; background: #121116ef; }
.staff-theme .classroom-modal { background: linear-gradient(#090911bc,#090911d9),url('/assets/academy/academy-shell-v3.webp') center / cover; }
.staff-theme .create-classroom { padding: 24px; gap: 12px; border-radius: 12px; background: linear-gradient(145deg,#211a19,#0c0c14); }
.staff-theme .create-classroom h1 { font: 36px/1.1 var(--font-display); letter-spacing: -.02em; }
.staff-theme .create-classroom > p { font-size: 13px; }
.staff-theme .create-classroom input, .staff-theme .create-classroom select { min-height: 44px; border-radius: 6px; padding: 10px; }
.staff-theme .create-classroom .phase-preview { border-color: var(--line); background: #231b16; }
.staff-homework-completion { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,1fr); gap: 16px; align-items: start; }
.staff-homework-totals { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; margin: 16px 0; }
.staff-homework-totals strong { font-size: 22px; color: var(--lime); }
.staff-homework-roster { max-height: 520px; overflow: auto; margin-top: 14px; }
.staff-confirm-reminder { display: flex; align-items: center; gap: 12px; margin: 16px 0; line-height: 1.5; }
.staff-theme .staff-confirm-reminder input { width: 22px; height: 22px; flex: 0 0 22px; }
.staff-homework-roster .staff-chip { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.staff-homework-roster .staff-chip svg { width: 16px; }
.staff-homework-roster .staff-row { grid-template-columns: minmax(0,1fr) auto; }
@media(max-width:900px) { .staff-homework-completion { grid-template-columns: minmax(0,1fr); } }
.staff-theme .button { border-radius: 6px; font-weight: 700; min-height: 44px; }
.staff-theme .button.primary { background: linear-gradient(#edca80,#c79543); box-shadow: 0 5px 22px #b27d2820; }
.staff-theme .button.secondary { border-color: var(--line); background: #201a17; }
.staff-theme .text-button { color: var(--lime); font-size: 12px; gap: 7px; }
.staff-theme .field { display: grid; gap: 7px; margin-bottom: 14px; }
.staff-theme .field > span { color: var(--cream); font-size: 12px; }
.staff-theme input, .staff-theme textarea, .staff-theme select { min-width: 0; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #100f13; color: var(--cream); font-size: 13px; }
.staff-theme textarea { resize: vertical; min-height: 94px; max-height: 200px; }
.staff-theme .mfa-panel { border-radius: 10px; border-color: var(--line); background: rgba(12,12,17,.94); }
.staff-cabinet { width: 100%; max-width: none; padding: 18px 24px 24px; margin: 0 auto; }
.staff-cabinet h1, .staff-cabinet h2, .staff-cabinet h3 { font-family: var(--font-display); color: var(--cream); font-weight: 500; letter-spacing: -.015em; }
.staff-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.staff-eyebrow { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); font-weight: 700; }
.staff-page-heading h1 { font-size: clamp(28px,3vw,42px); margin: 6px 0; }
.staff-page-heading p { font-size: 12px; margin: 0; }
.staff-heading-tools { display: flex; align-items: center; gap: 8px; max-width: 320px; }
.staff-heading-tools select { max-width: 230px; }
.staff-icon-button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--lime); }
.staff-mobile-sections { display: none; }
.staff-notice { padding: 10px 14px; margin-bottom: 12px; background: #241c11; border: 1px solid #a07b3b; border-radius: 6px; font-size: 13px; color: var(--cream); }
.staff-notice.error { border-color: #cb7770; background: #351c1b; }
.staff-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 14px; }
.staff-metrics button { display: flex; align-items: center; gap: 12px; padding: 16px; min-width: 0; background: linear-gradient(130deg,#241b14ed,#0d0f16ed); border: 1px solid var(--line); border-radius: 9px; text-align: left; }
.staff-metrics button > svg:first-child { width: 28px; height: 28px; color: var(--lime); flex-shrink: 0; }
.staff-metrics button > svg:last-child { width: 16px; margin-left: auto; color: var(--lime); }
.staff-metrics strong { font: 28px/1 var(--font-display); }
.staff-metrics small { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; }
.staff-overview-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); gap: 14px; }
.staff-panel, .staff-welcome { min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg,rgba(23,18,19,.97),rgba(8,10,16,.96)); box-shadow: inset 0 0 0 3px #d2aa5d05,0 8px 22px #0003; }
.staff-panel { padding: 18px; }
.staff-panel > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #9c79453b; }
.staff-panel h2 { margin: 0; font-size: clamp(20px,1.9vw,27px); }
.staff-panel h3 { margin: 0 0 10px; font-size: 21px; }
.staff-panel p { font-size: 13px; margin-bottom: 14px; }
.staff-welcome { display: grid; grid-template-columns: minmax(0,1fr) 36%; overflow: hidden; }
.staff-welcome > div { padding: 24px 0 24px 24px; align-self: center; z-index: 1; }
.staff-welcome h2 { margin: 10px 0 12px; font-size: clamp(24px,2.6vw,36px); line-height: 1.1; }
.staff-welcome p { font-size: 13px; line-height: 1.5; }
.staff-welcome img { width: 100%; height: 100%; min-height: 240px; object-fit: contain; object-position: center; mask-image: linear-gradient(90deg,transparent,#000 15%); }
.staff-observer .staff-welcome { grid-template-columns: minmax(0,1fr) 46%; background: radial-gradient(ellipse at right,#203d35,#10121a 75%); border-color: #74846a; }
.staff-observer .staff-welcome img { mask-image: none; padding: 12px; border-radius: 20px; }
.staff-account-cover { display: block; width: 100%; height: clamp(180px,26vh,300px); object-fit: contain; margin-bottom: 18px; border: 1px solid #74846a; border-radius: 10px; background: #0c1518; }
.staff-workspace { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 14px; align-items: start; }
.staff-list { display: grid; gap: 6px; }
.staff-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px; border: 1px solid #9c794532; border-radius: 6px; background: #151215; color: var(--cream); text-align: left; text-decoration: none; }
button.staff-row:hover, button.staff-row[aria-pressed=true] { border-color: var(--lime); background: #2b2118; }
.staff-row > span:not(.staff-chip):not(.staff-student-monogram):not(.staff-row-icon) { flex: 1; min-width: 0; }
.staff-row > svg, .staff-row-icon { flex-shrink: 0; color: var(--lime); width: 22px; }
.staff-row > svg:last-child { width: 16px; }
.staff-row b { display: block; font-size: 14px; line-height: 1.3; }
.staff-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.staff-row-icon.is-live { color: #92c9a4; }
.staff-student-monogram { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid #9a773f; border-radius: 50%; background: #352820; font: 22px var(--font-display); }
.staff-chip { display: inline-flex; padding: 7px 10px; background: #261e17; border: 1px solid #876736; border-radius: 20px; color: var(--cream); font-size: 10px; }
.staff-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 10px; font-size: 11px; color: var(--muted); }
.staff-pagination button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: #201a17; }
.staff-pagination button:disabled { opacity: .35; cursor: default; }
.staff-pagination svg { width: 18px; }
.staff-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; padding: 20px 12px; text-align: center; }
.staff-empty > svg { color: var(--lime); width: 34px; height: 34px; margin-bottom: 14px; }
.staff-empty h3 { font-size: 22px; margin-bottom: 9px; }
.staff-empty p { max-width: 390px; margin: 0; font-size: 12px; }
.staff-search { display: flex; align-items: center; gap: 8px; max-width: 300px; margin-bottom: 10px; color: var(--lime); }
.staff-panel > header .staff-search { margin: 0; }
.staff-search svg { flex: 0 0 18px; width: 18px; }
.staff-calendar-note, .staff-group-summary { display: flex; align-items: center; gap: 12px; }
.staff-calendar-note { padding-top: 14px; margin-top: 14px; border-top: 1px solid #9c79453b; }
.staff-calendar-note > svg, .staff-group-summary > svg { color: var(--lime); flex-shrink: 0; width: 28px; height: 28px; }
.staff-calendar-note b, .staff-calendar-note small { display: block; font-size: 12px; }
.staff-calendar-note small { margin-top: 5px; font-size: 11px; color: var(--muted); }
.staff-group-summary p { font-size: 12px; }
.staff-large-number { font: 48px var(--font-display); color: var(--lime); }
.staff-task-count { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.staff-task-count svg { color: var(--lime); width: 30px; height: 30px; }
.staff-task-count strong { font: 36px var(--font-display); }
.staff-task-count span { font-size: 12px; color: var(--muted); }
.staff-months, .staff-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.staff-months button, .staff-filters button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; background: #171317; font-size: 12px; text-transform: capitalize; }
.staff-months button[aria-pressed=true], .staff-filters button[aria-pressed=true] { background: #d7aa57; color: var(--ink); border-color: var(--lime); }
.staff-calendar { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.course-planner .staff-calendar { grid-auto-flow:row; }
.course-planner .staff-calendar article { min-width:0; }
.course-planner .course-lesson-copy { flex:1; min-width:0; }
.course-planner .course-lesson-game { display:block; margin-top:12px; }
.course-lesson-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.course-planner .course-lesson-actions .button { min-height:48px; margin:0; font-size:14px; white-space:normal; }
.course-lesson-actions .button svg { width:18px; height:18px; flex-shrink:0; }
.course-plan-detail { margin-top:24px; padding:20px; border:1px solid var(--line); border-radius:8px; }
.course-plan-actions { display:flex; flex-wrap:wrap; gap:12px; }
.course-plan-detail { scroll-margin-top:24px; }
.course-presentation { display:grid; grid-template-columns:minmax(180px,1fr) minmax(0,2fr); gap:24px; padding:20px; margin:20px 0 24px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); }
.course-presentation-preview { display:grid; place-items:center; align-self:start; aspect-ratio:16/9; min-width:0; border:1px solid var(--line); border-radius:6px; background:var(--surface-2); overflow:hidden; }
.course-presentation-preview img { width:100%; height:100%; object-fit:contain; }
.course-presentation-preview > svg { width:48px; height:48px; color:var(--lime); }
.course-presentation-content { min-width:0; }
.course-presentation h4,.course-plan-detail > h4 { margin:0 0 12px; font-size:18px; }
.course-presentation-name { overflow-wrap:anywhere; color:var(--cream); }
.course-presentation-content p { font-size:14px; }
.course-presentation-upload { margin:16px 0 8px; }
.course-presentation-upload input { min-height:48px; width:100%; padding:8px; overflow:hidden; }
.course-presentation-upload input::file-selector-button { min-height:40px; margin-right:12px; padding:8px 12px; color:var(--ink); background:var(--lime); border:0; border-radius:6px; cursor:pointer; font:inherit; }
.course-presentation-upload input:disabled::file-selector-button { cursor:wait; opacity:.55; }
.course-presentation-content #course-presentation-help { font-size:12px; }
.course-presentation-content .button { min-height:48px; white-space:normal; }
.course-presentation-error { color:var(--danger); }
@media(max-width:768px) { .course-presentation { grid-template-columns:1fr; padding:16px; gap:16px; }.course-presentation-preview { max-width:400px; width:100%; }.course-lesson-actions .button { width:100%; }.course-planner .staff-calendar article { gap:12px; padding:16px; } }
.staff-persistent-clock { position:sticky; top:8px; z-index:5; display:flex; align-items:center; flex-wrap:wrap; gap:14px; padding:14px; background:var(--surface); border:1px solid var(--lime); border-radius:8px; font-variant-numeric:tabular-nums; margin-bottom:16px; }
.staff-persistent-clock strong { color:var(--lime); font-size:20px; }
.course-planner > header { flex-wrap:wrap; gap:12px; }
.teaching-material-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.teaching-material-grid article { min-width:0; border:1px solid var(--line); border-radius:8px; padding:16px; }
.teaching-material-grid img { width:100%; aspect-ratio:16/9; object-fit:contain; }
.teaching-material-grid .button { margin-top:10px; width:100%; white-space:normal; }
.teaching-lecture-text { margin-top:24px; padding:24px; border:1px solid var(--line); border-radius:8px; }
.staff-cabinet .field textarea,.staff-cabinet .staff-panel textarea { font:400 18px/1.65 var(--font-ui); letter-spacing:normal; }
.teaching-lecture-text p { font:400 18px/1.7 var(--font-ui); white-space:pre-wrap; }
.teaching-document-tabs { display:flex; flex-wrap:wrap; gap:8px; }
.teaching-document-tabs .button { white-space:normal; max-width:100%; min-height:44px; text-align:left; }
@media(max-width:768px) { .teaching-material-grid { grid-template-columns:1fr; }.course-plan-detail,.teaching-lecture-text { padding:14px; }.course-planner .form-columns { grid-template-columns:1fr; } }
.staff-calendar article { display: flex; align-items: flex-start; gap: 18px; min-height: 118px; padding: 20px; border: 1px solid #97713a80; border-radius: 7px; background: linear-gradient(120deg,#39291d,#141219); }
.staff-calendar time { display: block; min-width: 44px; color: var(--lime); text-align: center; }
.staff-calendar time strong { display: block; font: 34px/1 var(--font-display); }
.staff-calendar time small { font-size: 12px; }
.staff-calendar h3 { font-size: 23px; margin-bottom: 7px; }
.staff-calendar p, .staff-calendar div > small { font-size: 11px; margin: 0; color: var(--muted); }
.staff-calendar .staff-calendar-break { background: #111016; border-style: dashed; }
.staff-assignment { border: 1px solid #9c79453b; border-radius: 7px; }
.staff-assignment summary { display: flex; align-items: center; gap: 10px; padding: 12px; cursor: pointer; }
.staff-assignment summary > svg { width: 20px; flex-shrink: 0; color: var(--lime); }
.staff-assignment summary > span:first-of-type { flex: 1; }
.staff-assignment b, .staff-assignment small { display: block; }
.staff-assignment b { font-size: 14px; }
.staff-assignment small, .staff-assignment summary > span:last-child { color: var(--muted); font-size: 10px; margin-top: 5px; }
.staff-assignment p { white-space: pre-wrap; padding: 0 14px 14px; margin: 0; overflow-wrap: anywhere; }
.staff-work-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px; margin-bottom: 16px; font-size: 14px; line-height: 1.6; max-height: 230px; overflow-y: auto; background: #211b15; border: 1px solid #806237; border-radius: 6px; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-result-row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #9c794530; }
.staff-result-row img { flex: 0 0 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 5px; }
.staff-result-row > div { flex: 1; min-width: 0; }
.staff-result-row b, .staff-result-row small { display: block; font-size: 13px; }
.staff-result-row small { margin: 5px 0; font-size: 10px; color: var(--muted); }
.staff-result-row progress { display: block; width: 100%; height: 6px; accent-color: var(--lime); }
.staff-result-total { display: flex; align-items: center; gap: 16px; padding: 20px 0; }
.staff-result-total > svg { width: 40px; height: 40px; color: var(--lime); }
.staff-result-total strong { font: 48px var(--font-display); }
.staff-result-total span { font-size: 13px; color: var(--muted); }
.staff-summary-line { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #9c79453b; font-size: 13px; }
.staff-privacy-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; }
.staff-privacy-note svg { width: 20px; flex: 0 0 20px; color: var(--lime); }
.staff-award-preview { display: flex; align-items: center; gap: 10px; padding: 16px; border: 1px solid #92703c; background: linear-gradient(100deg,#4b3318,#201917); border-radius: 7px; margin-bottom: 16px; }
.staff-award-preview svg { color: var(--lime); width: 30px; height: 30px; }
.staff-award-preview strong { font: 34px var(--font-display); }
.staff-award-preview span { font-size: 12px; color: var(--muted); }
.staff-emblem { display: block; width: 52px; height: 52px; color: var(--lime); margin: 14px 0 20px; }
.staff-resource-detail { max-width: 760px; padding: 20px 0; }
.staff-resource-detail p { font-size: 16px; white-space: pre-wrap; }
.staff-spinning { animation: staff-spin 1.5s linear infinite; }
@keyframes staff-spin { to { transform: rotate(360deg); } }
@media (min-width: 1100px) and (max-height: 780px) {
  .staff-cabinet { padding: 10px 18px; }
  .staff-page-heading { margin-bottom: 10px; }
  .staff-page-heading h1 { font-size: 30px; }
  .staff-metrics button { padding: 10px 12px; }
  .staff-panel { padding: 12px; }
  .staff-row { min-height: 60px; }
  .staff-result-row { padding: 6px 0; }
  .staff-result-row b, .staff-result-row small { line-height: 1.2; }
  .staff-welcome > div { padding: 18px 0 18px 18px; }
  .staff-welcome img { min-height: 215px; }
  .staff-overview-grid { gap: 7px; }
  .staff-overview-grid .staff-empty { min-height: 105px; padding: 10px; }
  .staff-overview-grid .staff-empty > svg { width: 26px; height: 26px; margin-bottom: 8px; }
  .staff-overview-grid .staff-panel > header { padding-bottom: 8px; margin-bottom: 8px; }
  .staff-overview-grid .staff-panel h2 { font-size: 22px; }
  .staff-overview-grid .staff-panel p { font-size: 12px; line-height: 1.4; margin-bottom: 8px; }
  .staff-overview-grid .staff-calendar-note { padding-top: 8px; margin-top: 8px; }
  .staff-overview-grid .staff-task-count { margin-bottom: 8px; }
  .staff-overview-grid .staff-task-count strong { font-size: 30px; }
}
@media (max-width: 1099px) {
  .staff-theme .sidebar { display: none; }
  .staff-theme .app-main { margin-left: 0; }
  .staff-mobile-sections { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; font-size: 12px; }
  .staff-mobile-sections select { width: auto; flex: 1; }
  .staff-theme .mobile-brand { display: flex; }
  .staff-theme .mobile-brand b { white-space: normal; max-width: 150px; font: 17px var(--font-display); }
  .staff-theme .mobile-brand small { display: none; }
  .staff-theme .topbar { justify-content: space-between; }
}
@media (max-width: 700px) {
  .staff-cabinet { padding: 16px 12px 28px; }
  .staff-theme .topbar { padding: 8px 12px; }
  .staff-theme .mobile-brand { display: none; }
  .staff-theme .topbar-actions { width: 100%; justify-content: space-between; gap: 8px; }
  .staff-theme .academy-profile-button b { font-size: 14px; }
  .staff-theme .academy-profile-button small { max-width: 160px; font-size: 8px; }
  .staff-theme .academy-role-copy { display: none; }
  .staff-theme .account-chip { flex: 1; justify-content: space-between; }
  .staff-theme .academy-role-control { padding: 7px 8px; }
  .staff-page-heading { align-items: flex-start; gap: 10px; }
  .staff-heading-tools { max-width: 120px; flex-wrap: wrap; justify-content: flex-end; }
  .staff-heading-tools select { max-width: 120px; font-size: 10px; }
  .staff-page-heading h1 { font-size: 29px; }
  .staff-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .staff-metrics button { padding: 12px; gap: 8px; }
  .staff-metrics button > svg:last-child { display: none; }
  .staff-metrics small { font-size: 10px; }
  .staff-overview-grid, .staff-workspace, .staff-calendar { grid-template-columns: 1fr; }
  .staff-welcome h2 { font-size: 25px; }
  .staff-welcome > div { padding: 20px 0 20px 18px; }
  .staff-welcome img { min-height: 210px; }
  .staff-welcome .button { padding: 10px; font-size: 12px; }
  .staff-panel { padding: 14px; }
  .staff-panel > header { flex-wrap: wrap; }
  .staff-panel > header .staff-search { max-width: none; width: 100%; }
  .staff-row { gap: 8px; }
  .staff-calendar h3 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .staff-spinning { animation: none; } }

/* Teacher workspaces share compact controls and predictable mobile stacking. */
.staff-dialog{box-sizing:border-box;width:min(900px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--line,#716044);border-radius:18px;background:#17151b;color:var(--cream,#f3e8ce);padding:24px}
.staff-dialog::backdrop{background:#000b;backdrop-filter:blur(4px)}
.staff-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.staff-dialog h2{margin:0;font-size:26px}.staff-dialog header button{flex:none}
.teacher-inline-actions{display:flex;flex-wrap:wrap;align-items:end;gap:10px}.teacher-inline-actions .field{margin:0}.teacher-inline-actions svg{width:20px;height:20px;flex:none}
.staff-home-block{padding:18px;border:1px solid var(--line,#655139);border-radius:12px;background:#121016ed;margin-block:14px;min-width:0}.staff-home-block>summary,.teacher-materials summary{cursor:pointer;min-height:44px;align-content:center;font-size:18px;font-weight:600}.staff-home-block[open]>summary{margin-bottom:16px}
.teacher-next-lesson{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;padding:18px;border:1px solid #9c7847;background:#9d723617;border-radius:12px;margin-block:16px}.teacher-next-lesson h3{margin:8px 0}.teacher-next-lesson p{margin:0}
.teacher-lesson-list,.teacher-library-cards{display:grid;gap:12px;margin-top:18px;min-width:0}.teacher-lesson-list>article{padding:18px;border:1px solid var(--line,#655139);border-radius:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;min-width:0}.teacher-lesson-list>article.is-current{border-color:#dbb770;background:#98703b16}.teacher-lesson-title{min-width:0;overflow-wrap:anywhere}.teacher-lesson-title h3{font-size:20px;margin:6px 0}.teacher-lesson-title>span,.teacher-lesson-title>small{color:#c4b99f;font-size:14px}.teacher-lesson-checks{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:12px;border-top:1px solid #65513970;padding-top:12px}.teacher-lesson-checks label{display:flex;align-items:center;gap:8px;min-height:44px}.teacher-lesson-checks input{width:18px;height:18px;accent-color:#d6b170}
.teacher-library-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr))}.teacher-library-cards>article{min-width:0;border:1px solid var(--line,#655139);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:12px}.teacher-library-cards>article>img{width:100%;aspect-ratio:16/9;object-fit:contain;max-height:150px;background:#0b0c10;border-radius:8px}.teacher-library-cards .teacher-inline-actions{margin-top:auto}
.teacher-materials{display:grid;gap:20px;min-width:0}.teacher-materials>section,.teacher-materials>details{min-width:0}.teacher-material-preview{display:block;width:min(100%,440px);max-height:240px;object-fit:contain;margin-block:12px;border-radius:8px;background:#08090d}.teacher-file-name{overflow-wrap:anywhere}.teacher-file-button{position:relative;overflow:hidden;cursor:pointer}.teacher-file-button input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.teacher-file-button:has(input:disabled){opacity:.5;cursor:not-allowed}.teacher-file-button:focus-within{outline:2px solid #8cd6ff;outline-offset:3px}.teacher-speech-preview{max-height:340px;overflow:auto;line-height:1.65}.teacher-course-form{display:grid;gap:18px}.teacher-course-form fieldset{min-width:0;border:1px solid #655139;border-radius:10px;padding:16px}.teacher-course-form fieldset>label:not(.field){display:flex;gap:8px;align-items:center;min-height:44px}.teacher-course-form .field{margin-bottom:12px}.teacher-homework-award{padding:16px;border:1px solid #947446;border-radius:10px;margin-block:16px}.teacher-homework-award input[type=number]{width:110px}.teacher-materials textarea{width:100%;box-sizing:border-box;resize:vertical}
.staff-dialog .button,.teacher-course-workspace .button,.staff-home-block .button{min-height:44px;white-space:normal;max-width:100%}.staff-homework-roster{max-height:420px;overflow:auto}.staff-homework-completion{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
@media(max-width:760px){.teacher-lesson-list>article{grid-template-columns:minmax(0,1fr);padding:14px}.teacher-lesson-checks{grid-column:auto}.staff-dialog{padding:16px}.staff-dialog h2{font-size:22px}.teacher-inline-actions{align-items:stretch}.teacher-inline-actions>.button,.teacher-inline-actions>.test-student-launch{flex:1 1 180px}.teacher-inline-actions>.test-student-launch>.button{width:100%}.staff-home-block{padding:12px}.teacher-next-lesson{padding:14px}.staff-homework-roster .staff-row{flex-wrap:wrap}.staff-homework-roster .staff-row>span:first-child{flex:1 1 180px}}

/* Keep collapsed reminder controls from reserving an empty desktop column. */
.staff-cabinet .staff-homework-completion { grid-template-columns:minmax(0,1fr); }
.teacher-test-lesson{min-height:0!important;align-self:start;padding:20px!important}
.teacher-test-lesson h3{margin:0 0 20px}
.teacher-test-lesson .private-test-entry{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px 20px;min-height:0}
.teacher-test-lesson .field-label{display:grid;gap:8px;margin:0;min-width:0;font:500 15px/1.4 var(--font-ui)}
.staff-panel .teacher-test-lesson .private-test-entry select{appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;min-width:0;height:48px;min-height:48px;padding:12px 38px 12px 14px;border:1px solid var(--line,#655139);border-radius:10px;background-color:var(--surface,#121016);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23dfbc76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-position:right 14px center;background-repeat:no-repeat;color:inherit;font:400 16px/1.4 var(--font-ui)}
.teacher-test-lesson .private-test-launch{min-height:48px;padding:12px 22px;margin:0;white-space:normal}
.teacher-test-lesson .private-test-feedback{grid-column:1/-1;font:400 14px/1.5 var(--font-ui);color:var(--muted);min-height:0}
.teacher-test-lesson .private-test-feedback p{margin:0}
@media(max-width:650px){.teacher-test-lesson{padding:16px!important}.teacher-test-lesson .private-test-entry{grid-template-columns:minmax(0,1fr)}.teacher-test-lesson .private-test-launch{width:100%}}
.shop-pools { margin-top:24px; padding:24px; scroll-margin-top:100px; }
.shop-pools>header,.shop-pools-list article>header { display:flex; flex-wrap:wrap; justify-content:space-between; gap:16px; align-items:center; }
.shop-pools h2 { margin:8px 0; font:500 28px/1.2 var(--font-display); }
.shop-pools h3 { margin:8px 0; font:500 22px/1.3 var(--font-display); }
.shop-pools p { font-size:16px; line-height:1.6; max-width:85ch; }
.shop-pools .shop-pools-note { color:#c6baaa; }
.shop-pools form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; padding:20px 0; }
.shop-pools label { display:grid; gap:8px; font-size:16px; }
.shop-pools :is(input:not([type=checkbox]),select) { min-width:0; width:100%; min-height:48px; padding:12px; border:1px solid #8d6a3e; border-radius:8px; color:#efd9b3; background:#111116; font-size:16px; }
.shop-pools .shop-pools-consent { grid-column:1/-1; display:flex; align-items:center; gap:12px; }
.shop-pools input[type=checkbox] { width:24px; height:24px; accent-color:#dfa94f; flex-shrink:0; }
.shop-pools .button { min-height:48px; font-size:16px; white-space:normal; justify-content:center; }
.shop-pools .text-button { min-height:44px; margin:12px 16px 0 0; }
.shop-pools-status { padding:16px; border:1px solid #8d6a3e; border-radius:8px; }
.shop-pools-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin:24px 0; }
.shop-pools-list article { padding:20px; background:#111116; border:1px solid #8d6a3e; border-radius:12px; min-width:0; overflow-wrap:anywhere; }
.shop-pools-list small,.shop-pools-list header>span { color:#edc47e; font-size:14px; }
.shop-pools-list progress { width:100%; height:12px; accent-color:#dfa94f; }
.shop-pools-list ul { padding-left:20px; font-size:16px; line-height:1.6; }
.shop-pools-cancel { border-top:1px solid #8d6a3e; margin-top:16px; }
.shop-pools :is(button,input,select):focus-visible { outline:2px solid #f2ce8d; outline-offset:3px; }
@media(max-width:720px) { .shop-pools { padding:16px; margin-bottom:96px; }.shop-pools-list,.shop-pools form { grid-template-columns:minmax(0,1fr); }.shop-pools-list article { padding:16px; } }
/* Keep the shared main scroller in charge when an inline pool form expands. */
@media screen and (min-width:1181px){
  .app-shell.academy-theme .page.standalone-store{height:auto;min-height:0;overflow:visible}
}
/* A small showcase on the page; a roomy, independently scrollable collection. */
.treasury-showcase-page,.treasury-collection-backdrop {
  --treasury-gold: var(--cabinet-gold, #d8a75f);
  --treasury-text: var(--cabinet-gold-soft, #f1d39c);
  --treasury-line: var(--cabinet-line, rgba(211,158,79,.42));
  --treasury-muted: #c4b8a6;
  --treasury-panel: #101014;
  color: var(--treasury-text);
}
.treasury-showcase-page { display: grid; gap: 12px; min-width: 0; }
.treasury-showcase-page .eyebrow { color: var(--treasury-gold); font: 700 11px/1.3 var(--font-ui); letter-spacing: .08em; }
.treasury-showcase-page h2,.treasury-collection-dialog h2 { color: var(--treasury-text); font: 500 24px/1.15 var(--font-display); }
.treasury-showcase-page p,.treasury-collection-dialog p { color: var(--treasury-muted); font: 13px/1.5 var(--font-ui); }
.treasury-showcase-page .button,.treasury-collection-dialog .button { min-height: 36px; padding: 8px 12px; font: 600 12px/1.2 var(--font-ui); border-radius: 6px; }
.treasury-showcase-page .button svg,.treasury-collection-dialog .button svg { width: 17px; height: 17px; }
.treasury-showcase-page .button.primary { background: linear-gradient(180deg,#edc989,var(--treasury-gold)); color: #25180e; }
.treasury-showcase-page .button.secondary,.treasury-collection-dialog .button.secondary { border: 1px solid var(--treasury-line); background: #1e1917; color: var(--treasury-text); }
.treasury-showcase-overview { display: grid; grid-template-columns: minmax(0,1fr) 320px; grid-template-rows: minmax(0,1fr); gap: 12px; min-height: 0; }
.treasury-showcase-story { position: relative; display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,32%); min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 82% 65%,#47311f 0,transparent 52%),linear-gradient(120deg,#161216,#0c0c10); }
.treasury-showcase-story > div { align-self: center; padding: 16px 20px; }
.treasury-showcase-story .eyebrow { padding: 0; border: 0; background: none; }
.treasury-showcase-story h2 { margin: 6px 0 8px; font-size: 28px; }
.treasury-showcase-story p { max-width: 540px; margin: 0; }
.treasury-showcase-story > img { position: absolute; inset: 0 0 0 auto; width: 32%; height: 100%; min-height: 0; object-fit: contain; padding: 0 12px; filter: drop-shadow(0 10px 18px #0008); }
.treasury-showcase-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 14px; }
.treasury-showcase-stats > header { grid-column: 1 / -1; padding-bottom: 8px; }
.treasury-showcase-stats > header h2 { font-size: 21px; }
.treasury-showcase-stats > div { display: grid; align-content: center; justify-items: center; gap: 4px; padding: 8px 4px 0; text-align: center; }
.treasury-showcase-stats > div + div { border-left: 1px solid var(--treasury-line); }
.treasury-showcase-stats b { font: 500 24px/1 var(--font-display); }
.treasury-showcase-stats small { color: var(--treasury-muted); font: 11px/1.3 var(--font-ui); }
.treasury-showcase-stats .resource-medallion { width: 32px; height: 32px; }
.treasury-showcase-stats .resource-medallion svg { width: 17px; }
.treasury-showcase-workspace { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 12px; min-height: 0; }
.treasury-showcase-collection { display: flex; flex-direction: column; min-height: 0; padding: 16px; }
.treasury-showcase-collection > header { gap: 12px; padding-bottom: 12px; }
.treasury-showcase-collection > header .eyebrow { padding: 0; border: 0; background: none; }
.treasury-showcase-collection > header h2 { margin-top: 4px; }
.treasury-showcase-collection > header > button { flex: 0 0 auto; background: linear-gradient(180deg,#edc989,var(--treasury-gold)); color: #25180e; border: 1px solid var(--treasury-gold); }
.treasury-showcase-collection > header button > span { padding: 2px 5px; border-radius: 4px; background: #38261420; }
.treasury-showcase-hint { margin: 8px 0 12px; }
.treasury-showcase-grid { display: grid; min-height: 0; flex: 1; }
.treasury-showcase-grid .treasury-reward { display: grid; grid-template-columns: minmax(0,46%) minmax(0,1fr); gap: 16px; padding: 16px; }
.treasury-showcase-grid .treasury-reward-art { position: relative; border: 1px solid color-mix(in srgb,var(--reward-tone),transparent 76%); background: radial-gradient(ellipse at center,color-mix(in srgb,var(--reward-tone),transparent 82%),#0b0c10 80%); }
.treasury-showcase-grid .treasury-reward-art img { position: absolute; inset: 0; padding: 12px; }
.treasury-showcase-grid .treasury-reward h3 { margin: 12px 0; font-size: clamp(24px,2.2vw,32px); }
.treasury-showcase-grid .treasury-reward p { font-size: 15px; line-height: 1.6; }
.treasury-showcase-grid .treasury-reward-kind { font-size: 12px; gap: 8px; }
.treasury-showcase-grid .treasury-reward-kind svg { width: 20px; height: 20px; flex: 0 0 auto; }
.treasury-showcase-selector { display: flex; align-items: stretch; gap: 12px; margin-top: 16px; }
.treasury-showcase-selector > div { display: flex; flex: 1; min-width: 0; gap: 8px; }
.treasury-showcase-selector button { min-height: 44px; padding: 10px 12px; border: 1px solid var(--treasury-line); border-radius: 8px; color: var(--treasury-muted); background: #151318; font: 600 12px/1.35 var(--font-ui); }
.treasury-showcase-selector > div > button { display: flex; align-items: center; gap: 8px; flex: 1; text-align: left; }
.treasury-showcase-selector button[aria-pressed="true"] { color: var(--treasury-text); border-color: var(--treasury-gold); background: linear-gradient(140deg,#3d2b1d,#211b19); }
.treasury-showcase-selector button > span { color: var(--treasury-gold); font: 500 18px/1 var(--font-display); }
.treasury-showcase-selector .treasury-showcase-arrow { display: grid; place-items: center; flex: 0 0 44px; padding: 0; }
.treasury-showcase-arrow svg { width: 20px; height: 20px; }
.treasury-showcase-arrow:disabled { opacity: .35; cursor: default; }
.treasury-reward { --reward-tone: var(--treasury-gold); display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid color-mix(in srgb,var(--reward-tone),transparent 45%); border-radius: 12px; padding: 6px; background: linear-gradient(155deg,color-mix(in srgb,var(--reward-tone),#101014 92%),#0b0c10); box-shadow: inset 0 0 0 2px #090a0d,inset 0 0 0 3px color-mix(in srgb,var(--reward-tone),transparent 85%); }
.treasury-reward.accent-violet { --reward-tone: #b393dc; }
.treasury-reward.accent-lime { --reward-tone: #84b694; }
.treasury-reward.accent-coral { --reward-tone: #d7917c; }
.treasury-reward.accent-sky { --reward-tone: #91bbd4; }
.treasury-reward-art { display: grid; place-items: center; flex: 1; min-height: 0; overflow: hidden; border-radius: 8px; background: radial-gradient(ellipse,color-mix(in srgb,var(--reward-tone),transparent 88%),transparent 72%); }
.treasury-reward-art img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; }
.treasury-reward-copy { flex: 0 0 auto; padding: 10px 8px 4px; }
.treasury-showcase-grid .treasury-reward-copy { display: flex; flex-direction: column; justify-content: center; min-height: 0; padding: 16px 8px; }
.treasury-showcase-grid .treasury-reward-state { margin-top: auto; }
.treasury-reward-kind { display: flex; align-items: center; gap: 6px; color: var(--reward-tone); font: 600 11px/1.3 var(--font-ui); }
.treasury-reward-kind svg { width: 15px; height: 15px; }
.treasury-reward h3 { margin: 5px 0 6px; color: var(--treasury-text); font: 500 19px/1.2 var(--font-display); }
.treasury-reward p { margin: 0 0 8px; font-size: 12px; }
.treasury-reward-copy > small { display: block; margin-bottom: 12px; color: var(--treasury-muted); font: 12px/1.3 var(--font-ui); }
.treasury-reward-state { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid var(--treasury-line); color: var(--treasury-muted); font: 500 11px/1.3 var(--font-ui); }
.treasury-reward-state.is-owned { color: #a9d5b4; }
.treasury-reward-state > svg { width: 15px; height: 15px; }
.treasury-reward-state .button { margin-left: auto; min-height: 30px; padding: 5px 8px; font-size: 11px; }
.treasury-showcase-side { display: grid; grid-template-rows: minmax(0,1.15fr) minmax(0,1fr); gap: 12px; min-height: 0; }
.treasury-showcase-side > article { padding: 16px; min-height: 0; display: flex; flex-direction: column; }
.treasury-showcase-side > article > header { padding-bottom: 10px; }
.treasury-showcase-side h2 { font-size: 22px; }
.treasury-showcase-side p { margin: 8px 0 12px; }
.treasury-showcase-side .button { width: 100%; margin-top: auto; }
.treasury-showcase-current { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.treasury-showcase-current img { width: 72px; height: 72px; flex: 0 0 auto; object-fit: contain; border: 2px solid var(--treasury-gold); border-radius: 50%; }
.treasury-showcase-current small { display: block; color: var(--treasury-muted); font: 11px/1.4 var(--font-ui); }
.treasury-showcase-current strong { display: block; margin-top: 4px; font: 500 20px/1.2 var(--font-display); }
.treasury-showcase-history p > svg { width: 18px; height: 18px; vertical-align: middle; }
.treasury-collection-backdrop { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; padding: 24px; background: #030408d9; backdrop-filter: blur(8px); }
.treasury-collection-dialog { display: flex; flex-direction: column; width: min(1120px,100%); max-height: calc(100dvh - 48px); min-height: 0; padding: 24px; border: 1px solid var(--treasury-gold); border-radius: 16px; background: radial-gradient(ellipse at 95% 0,#36261c,transparent 40%),var(--treasury-panel); box-shadow: 0 30px 100px #000b,inset 0 0 0 4px #181416; }
.treasury-collection-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.treasury-collection-dialog .eyebrow { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--treasury-gold); font: 600 11px/1.3 var(--font-ui); letter-spacing: .08em; }
.treasury-collection-dialog .eyebrow svg { width: 16px; height: 16px; }
.treasury-collection-dialog h2 { margin: 8px 0; font-size: 32px; }
.treasury-collection-dialog header p { margin: 0; }
.treasury-collection-close { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--treasury-line); border-radius: 50%; background: #161316; color: var(--treasury-text); }
.treasury-collection-filters { display: flex; gap: 8px; margin: 20px 0 16px; }
.treasury-collection-filters button { min-height: 40px; padding: 8px 16px; border: 1px solid var(--treasury-line); border-radius: 6px; color: var(--treasury-muted); background: #19171b; font: 600 13px/1.3 var(--font-ui); }
.treasury-collection-filters button[aria-pressed="true"] { color: #24170d; border-color: var(--treasury-gold); background: var(--treasury-gold); }
.treasury-collection-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; scrollbar-color: var(--treasury-gold) var(--treasury-panel); padding: 4px 12px 8px 4px; }
.treasury-collection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.treasury-collection-grid .treasury-reward-art { flex: none; height: 250px; padding: 4px; }
.treasury-collection-grid .treasury-reward-copy { display: flex; flex-direction: column; flex: 1; padding: 12px; }
.treasury-collection-grid .treasury-reward h3 { font-size: 22px; }
.treasury-collection-grid .treasury-reward p { font-size: 14px; }
.treasury-collection-grid .treasury-reward-state { margin-top: auto; padding-top: 12px; font-size: 13px; }
.treasury-collection-dialog > footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--treasury-line); color: var(--treasury-muted); font: 12px/1.3 var(--font-ui); }
.treasury-collection-empty { padding: 40px 16px; text-align: center; }
.treasury-collection-empty > svg { width: 48px; height: 48px; color: var(--treasury-gold); }
.treasury-collection-empty h3 { font: 500 24px/1.2 var(--font-display); }
.treasury-showcase-page button:focus-visible,.treasury-collection-dialog :focus-visible { outline-color: var(--treasury-gold); }
@media (min-width: 1181px) {
  .standalone-treasury > .treasury-showcase-page { height: 100%; min-height: 0; grid-template-rows: 130px 180px minmax(0,1fr); padding-bottom: 12px; }
  .treasury-showcase-page > .academy-page-banner { min-height: 0; margin: 0 -18px; padding: 40px 28px 8px; }
  .treasury-showcase-banner .eyebrow { padding: 0; border: 0; background: transparent; min-height: 0; }
  .treasury-showcase-page > .academy-page-banner h1 { margin: 4px 0 6px; font-size: 36px; }
  .treasury-showcase-page > .academy-page-banner p { font-size: 13px; }
}
@media (min-width: 1181px) and (max-height: 780px) {
  .standalone-treasury > .treasury-showcase-page { grid-template-rows: 120px 116px minmax(0,1fr); gap: 8px; }
  .treasury-showcase-story > div { padding: 8px 16px; }
  .treasury-showcase-story h2 { margin: 4px 0 6px; font-size: 24px; }
  .treasury-showcase-collection,.treasury-showcase-side > article { padding: 12px; }
  .treasury-showcase-collection > header { padding-bottom: 8px; }
  .treasury-showcase-collection h2 { font-size: 21px; }
  .treasury-showcase-hint { font-size: 12px; margin: 6px 0 8px; }
  .treasury-showcase-current img { width: 56px; height: 56px; }
  .treasury-showcase-stats { min-height: 0; padding: 12px; grid-template-rows: auto minmax(0,1fr); }
  .treasury-showcase-stats > header { padding-bottom: 6px; }
  .treasury-showcase-stats > header h2 { font-size: 19px; }
  .treasury-showcase-stats > div { grid-template-columns: 28px minmax(0,1fr); grid-template-rows: auto auto; justify-items: start; gap: 2px 6px; padding: 4px 2px 0; text-align: left; }
  .treasury-showcase-stats .resource-medallion { grid-row: 1 / 3; align-self: center; width: 28px; height: 28px; }
  .treasury-showcase-stats b { font-size: 22px; }
  .treasury-showcase-stats small { font-size: 10px; }
  .treasury-showcase-current strong { font-size: 18px; }
  .treasury-showcase-side p { font-size: 12px; margin: 6px 0 8px; }
  .treasury-showcase-side h2 { font-size: 20px; }
}
@media (min-width: 1181px) and (max-height: 680px) {
  .standalone-treasury > .treasury-showcase-page { grid-template-rows: 96px 104px minmax(0,1fr); }
  .treasury-showcase-page > .academy-page-banner { padding-top: 16px; }
  .treasury-showcase-page > .academy-page-banner h1 { font-size: 30px; }
  .treasury-showcase-story > div { padding: 4px 12px; }
  .treasury-showcase-story h2 { font-size: 22px; }
  .treasury-showcase-story p { font-size: 12px; }
  .treasury-showcase-grid .treasury-reward { gap: 12px; padding: 12px; }
  .treasury-showcase-grid .treasury-reward-copy { padding: 8px 4px; }
  .treasury-showcase-grid .treasury-reward h3 { margin: 8px 0; font-size: 24px; }
  .treasury-showcase-grid .treasury-reward p { font-size: 13px; }
  .treasury-showcase-selector { margin-top: 12px; }
  .treasury-showcase-side { grid-template-rows: minmax(0,1.3fr) minmax(0,1fr); }
  .treasury-showcase-side > article > header { padding-bottom: 6px; }
  .treasury-showcase-current { margin-top: 8px; }
  .treasury-showcase-current img { width: 48px; height: 48px; }
  .treasury-showcase-side p { margin: 4px 0 6px; }
}
@media (max-width: 1180px) {
  .treasury-showcase-page { padding-bottom: 40px; }
  .treasury-showcase-overview,.treasury-showcase-workspace { grid-template-columns: minmax(0,1fr); }
  .treasury-showcase-story { height: 220px; }
  .treasury-showcase-stats { min-height: 160px; }
  .treasury-showcase-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .treasury-showcase-grid .treasury-reward-art { flex: none; height: 240px; }
  .treasury-showcase-page .academy-banner-note { display: none; }
}
@media (max-width: 760px) {
  .treasury-showcase-page > .academy-page-banner { padding-inline: 20px; }
  .treasury-showcase-page > .academy-page-banner h1 { font-size: 32px; }
  .treasury-showcase-page > .academy-page-banner p { font-size: 14px; }
  .treasury-showcase-story { grid-template-columns: minmax(0,1fr) 110px; height: auto; min-height: 200px; }
  .treasury-showcase-story > div { padding: 16px 12px; }
  .treasury-showcase-story h2 { font-size: 23px; }
  .treasury-showcase-story > img { width: 110px; padding: 0; }
  .treasury-showcase-collection > header { flex-wrap: wrap; }
  .treasury-showcase-side { grid-template-columns: 1fr; }
  .treasury-showcase-grid .treasury-reward { grid-template-columns: 1fr; gap: 4px; padding: 12px; }
  .treasury-showcase-grid .treasury-reward-art { height: 280px; }
  .treasury-showcase-grid .treasury-reward-copy { padding: 16px 4px 4px; }
  .treasury-showcase-grid .treasury-reward-state { margin-top: 16px; }
  .treasury-showcase-selector { gap: 8px; }
  .treasury-showcase-selector > div { flex-direction: column; }
  .treasury-showcase-grid .treasury-reward h3 { font-size: 23px; }
  .treasury-showcase-grid .treasury-reward p { font-size: 14px; }
  .treasury-collection-backdrop { padding: 8px; }
  .treasury-collection-dialog { max-height: calc(100dvh - 16px); padding: 16px; }
  .treasury-collection-dialog h2 { font-size: 28px; }
  .treasury-collection-filters { gap: 6px; }
  .treasury-collection-filters button { min-height: 44px; flex: 1; padding: 8px 6px; font-size: 12px; }
  .treasury-collection-grid { grid-template-columns: 1fr; }
  .treasury-collection-grid .treasury-reward-art { height: 280px; }
}
/* Store previews stay compact; the detail view owns the complete reward copy. */
.academy-store-grid .academy-store-card { gap: 8px 12px; padding: 10px; }
.academy-store-copy small { font-size: 10px; line-height: 1.4; letter-spacing: .04em; }
.academy-store-copy h2 { margin: 5px 0 7px; font-size: clamp(18px,1.4vw,23px); line-height: 1.15; overflow-wrap: anywhere; }
.academy-store-copy h2 button { padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.academy-store-copy p { color: #c2b7a6; font-size: 12px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.academy-store-copy .academy-store-details { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 3px 0; border: 0; background: none; color: #e9bb72; font-size: 12px; font-weight: 600; cursor: pointer; }
.academy-store-price b { font-size: 23px; }
.academy-store-price span { font-size: 11px; }
.academy-store-card > .button,.academy-store-confirm .button { min-height: 44px; font-size: 12px; }
.academy-store-confirm > span,.academy-store-owned { font-size: 12px; line-height: 1.4; }
.academy-store-art { display: block; padding: 0; border: 0; color: inherit; cursor: pointer; text-align: left; }
.academy-store-art i { font-size: 9px; }
.academy-store-art:hover img { filter: brightness(1.08); }
.academy-store-card :is(.academy-store-art, .academy-store-details, h2 button):focus-visible { outline: 2px solid #efc477; outline-offset: -3px; }
.store-product-dialog { --shop-accent: var(--accent,#d6a454); width: min(1040px,calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 1px solid #b68b4f; border-radius: 18px; color: #efd9b3; background: radial-gradient(ellipse at top right,#75512b24,transparent 60%),#101116; box-shadow: 0 28px 100px #000b,inset 0 0 0 4px #d7ad5010; overflow-y: auto; overscroll-behavior: contain; }
.store-product-dialog::backdrop { background: #030409cc; backdrop-filter: blur(5px); }
.store-product-shell > header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid #ad834344; background: #111217; }
.store-product-shell > header > span { color: #c29c65; font-size: 11px; letter-spacing: .12em; }
.store-product-shell > header button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; border: 1px solid #8d6a3e; border-radius: 9px; background: #26201a; color: #ebc48b; font-size: 14px; cursor: pointer; }
.store-product-shell .store-product-close { width: 48px; padding: 8px; }
.store-product-content { display: grid; grid-template-columns: minmax(0,.92fr) minmax(0,1fr); align-items: start; gap: 28px; padding: 28px; }
.store-product-content > figure { position: relative; margin: 0; padding: 16px; border: 1px solid #c29c6544; border-radius: 14px; background: radial-gradient(ellipse,#76512c25,#090a0f 70%); }
.store-product-content > figure img { display: block; width: 100%; height: 430px; object-fit: contain; border-radius: 8px; }
.store-product-content > figure figcaption { width: max-content; max-width: 100%; margin: 16px auto 0; padding: 6px 12px; border: 1px solid #b68b4f88; border-radius: 20px; color: #f0cd92; font-size: 12px; text-transform: uppercase; }
.store-product-copy { min-width: 0; }
.store-product-availability { color: #e3b66b; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.store-product-copy h2 { margin: 10px 0 16px; color: #f3d39a; font: 500 34px/1.12 var(--font-display); overflow-wrap: anywhere; }
.store-product-copy p { margin: 0 0 16px; font-size: 16px; line-height: 1.55; }
.store-product-copy h3 { margin: 22px 0 12px; color: #e9c88f; font: 500 22px/1.2 var(--font-display); }
.store-product-copy ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.store-product-copy li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; }
.store-product-copy li svg { flex: 0 0 20px; margin-top: 2px; color: #e1b15c; }
.store-product-how p { color: #c1b49f; font-size: 14px; }
.store-product-exchange { display: grid; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #ad834355; }
.store-product-price { display: flex; align-items: center; gap: 8px; color: #edbe67; }
.store-product-price b { font: 500 34px/1 var(--font-display); }
.store-product-price span { color: #cab89d; font-size: 14px; }
.store-product-exchange > small { color: #b2a490; font-size: 12px; line-height: 1.4; }
.store-product-dialog .button { min-height: 48px; padding: 12px 18px; font-size: 15px; justify-content: center; white-space: normal; }
.store-product-dialog .button.primary { color: #21170b; border: 1px solid #e6bd76; background: linear-gradient(180deg,#eccf92,#b8873c); }
.store-product-dialog .button.secondary { color: #efd9b3; border: 1px solid #8d6a3e; background: #26201a; }
.store-product-dialog .button:disabled { opacity: .65; cursor: not-allowed; }
.store-product-owned { display: flex; gap: 8px; align-items: center; }
.store-product-exchange .store-product-hint { margin: 0; color: #b8aa93; font-size: 13px; }
.store-product-confirm { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.store-product-confirm > p { grid-column: 1/-1; margin: 0; font-size: 15px; }
.store-product-status { padding: 12px; border: 1px solid #b68b4f88; border-radius: 8px; background: #30241a; }
.store-product-dialog button:focus-visible { outline: 2px solid #f0c579; outline-offset: 3px; }
@media screen and (min-width: 1181px) {
  .academy-store-grid { grid-template-rows: repeat(2,minmax(300px,1fr)); overflow-y: auto; padding-right: 4px; }
}
@media screen and (max-width: 1180px) { .academy-store-grid .academy-store-card { min-height: 260px; } }
@media screen and (max-width: 680px) {
  .store-product-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .store-product-shell > header { padding: 10px 12px; }
  .store-product-shell > header > span { display: none; }
  .store-product-content { grid-template-columns: minmax(0,1fr); gap: 20px; padding: 16px; }
  .store-product-content > figure { padding: 12px; }
  .store-product-content > figure img { height: 240px; }
  .store-product-copy h2 { font-size: 28px; }
  .store-product-confirm { grid-template-columns: minmax(0,1fr); }
  .academy-store-copy h2 button,.academy-store-copy .academy-store-details { min-height: 44px; }
}
.unified-shop { min-width:0; color:#f0dec0; }
.unified-shop-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.unified-shop-tabs { display:flex; gap:6px; padding:5px; border:1px solid #b08b4c60; border-radius:12px; background:#11141cf0; }
.unified-shop-tabs button,.unified-shop-filters button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:10px 15px; border:1px solid transparent; border-radius:8px; background:transparent; color:#c5b79e; font:500 14px var(--font-ui); cursor:pointer; }
.unified-shop-tabs button[aria-pressed="true"],.unified-shop-filters button[aria-pressed="true"] { background:#d7a75525; color:#f5d49b; border-color:#b08b4c60; }
.unified-shop-tabs svg { width:19px; height:19px; }
.unified-shop-tabs span { font-size:12px; }
.unified-shop-balance { display:flex; align-items:center; gap:7px; color:#efc679; white-space:nowrap; }
.unified-shop-balance svg { width:18px; }
.unified-shop-filters { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.unified-shop-filters button { background:#11141cdb; padding:8px 14px; }
.unified-shop-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.unified-shop-tile { position:relative; display:block; padding:0; min-width:0; aspect-ratio:1; overflow:hidden; border:1px solid #b08b4c75; border-radius:12px; background:#171923; color:#f4e1bd; cursor:pointer; text-align:left; }
.unified-shop-tile > img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .18s; }
.unified-shop-tile:hover > img { transform:scale(1.025); }
.unified-shop-tile-copy { position:absolute; inset:auto 0 0; padding:32px 12px 12px; background:linear-gradient(transparent,#0a0b12ef 40%); }
.unified-shop-tile-copy strong { display:block; font:500 18px/1.2 var(--font-display); overflow-wrap:anywhere; }
.unified-shop-tile-copy small { display:flex; align-items:center; gap:5px; margin-top:6px; font:500 12px/1.3 var(--font-ui); color:#f2ca82; }
.unified-shop-equipped { position:absolute; top:8px; right:8px; padding:5px; width:30px; height:30px; border-radius:50%; background:#31513c; color:#e9ffdf; }
.unified-shop-empty { display:grid; justify-items:center; gap:12px; padding:30px 12px; border:1px dashed #b08b4c75; border-radius:12px; background:#11141ceb; }
.unified-shop-empty p { margin:0; }
.unified-shop-extra { border:1px solid #b08b4c45; border-radius:10px; background:#11141ce8; margin-top:16px; padding:0 14px; }
.unified-shop-extra > summary { display:flex; align-items:center; gap:8px; min-height:52px; cursor:pointer; font-size:14px; }
.unified-shop-extra > summary::after { content:'＋'; margin-left:auto; }
.unified-shop-extra[open] > summary::after { content:'−'; }
.unified-shop-extra > summary svg { width:18px; }
.unified-shop-extra:not([open]) > :not(summary) { display:none; }
.unified-shop button:focus-visible,.unified-shop summary:focus-visible { outline:2px solid #f2ca82; outline-offset:3px; }
.simple-product .store-product-shell > header { justify-content:space-between; }
.simple-product .store-product-copy h2 { margin-top:0; }
.simple-product .store-product-exchange { margin-top:14px; padding-top:14px; }
.store-product-details { border-top:1px solid #b08b4c45; margin-top:18px; padding-top:8px; }
.store-product-details > summary { cursor:pointer; min-height:44px; align-content:center; }
.store-product-details:not([open]) > :not(summary) { display:none; }
@media(max-width:1050px) { .unified-shop-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) {
 .unified-shop-toolbar { flex-wrap:wrap; }
 .unified-shop-tabs { width:100%; }
 .unified-shop-tabs button { flex:1; padding:8px 5px; font-size:13px; }
 .unified-shop-balance { margin-left:auto; font-size:13px; }
 .unified-shop-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .unified-shop-tile-copy { padding:26px 9px 9px; }
 .unified-shop-tile-copy strong { font-size:16px; }
 .unified-shop-filters { gap:4px; }
 .unified-shop-filters button { padding:8px 12px; font-size:13px; }
 .simple-product .store-product-content { gap:14px; }
 .simple-product .store-product-content > figure { padding:0; }
 .simple-product .store-product-content > figure img { height:180px; object-fit:contain; }
}
.controller-camera-window{min-width:0;padding:14px;border:1px solid var(--line,#5f523a);border-radius:12px;background:var(--panel,#11151a)}
.controller-camera-window>header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.controller-camera-window>header h2{display:flex;align-items:center;gap:7px;margin:0;font-size:17px}
.controller-camera-window>header>span{font-size:12px;color:var(--gold,#d7ae61)}
.controller-camera-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.controller-camera-tile{position:relative;min-width:0;overflow:hidden;aspect-ratio:4/3;border:1px solid var(--line,#5f523a);border-radius:9px;background:#080c10}
.controller-camera-tile:only-child{grid-column:1/-1;aspect-ratio:16/9}
.controller-camera-tile.is-speaking{border-color:#a5c9b0;box-shadow:0 0 0 1px #a5c9b0}
.controller-camera-tile video{display:block;width:100%;height:100%;object-fit:contain}
.controller-camera-tile footer{position:absolute;inset:auto 0 0;display:flex;align-items:center;gap:5px;min-width:0;padding:7px 9px;background:#080c10d9;color:#f4e4bf;font-size:13px}
.controller-camera-tile footer span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.controller-camera-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;height:100%;padding:12px 6px 34px;text-align:center;color:#b9b3a5;font-size:12px}
.controller-camera-placeholder svg{width:26px;height:26px}
.controller-camera-empty{margin:0;padding:20px 6px;color:#b9b3a5;font-size:14px;line-height:1.5}
.lecture-cameras{min-width:0;container-type:inline-size}.lecture-cameras>header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.lecture-camera-heading{display:grid;gap:6px;min-width:0}
.lecture-camera-heading>h2{margin:0}
.lecture-camera-heading>span{font-size:14px;line-height:1.4;color:var(--muted,#b9b3a5)}
.lecture-cameras .lecture-camera-actions{display:flex;justify-content:flex-end;align-items:stretch;flex-wrap:wrap;gap:10px;margin-left:auto;max-width:100%;min-width:0}
.lecture-cameras .lecture-camera-actions>button{min-height:44px;max-width:100%;min-width:0;padding:10px 14px;white-space:normal;font:400 16px/1.35 var(--font-ui,Arial,sans-serif)}
.lecture-camera-actions [aria-pressed=true]{border-color:#89c79b;background:#193d29}.lecture-cameras>audio{display:none}.lecture-cameras>p{overflow-wrap:anywhere}
.lecture-cameras .lecture-camera-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),220px));justify-content:start;align-items:start;gap:12px;margin-block:16px;min-width:0}
.lecture-cameras .lecture-camera-tile{position:relative;min-width:0;aspect-ratio:16/10;overflow:hidden;border:1px solid var(--line,#5f523a);border-radius:10px;background:#080c10}
.lecture-cameras .lecture-camera-tile>video{display:block;width:100%;height:100%;object-fit:cover}
.lecture-cameras .lecture-camera-tile>video[hidden]{display:none}
.lecture-cameras .lecture-camera-placeholder{display:grid;place-items:center;box-sizing:border-box;width:100%;height:100%;padding:12px 10px 34px;text-align:center;color:var(--muted,#b9b3a5);font-size:14px;line-height:1.4}
.lecture-cameras .lecture-camera-tile>span{position:absolute;box-sizing:border-box;width:auto;right:0;bottom:0;left:0;padding:6px 10px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:#000b;color:#f4e4bf;font:400 14px/1.4 var(--font-ui,Arial,sans-serif)}
@container(max-width:620px){.lecture-cameras .lecture-camera-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.lecture-camera-actions>button{width:100%}.lecture-camera-actions>button:last-child:nth-child(odd){grid-column:1/-1}}
@container(max-width:300px){.lecture-cameras .lecture-camera-actions{grid-template-columns:minmax(0,1fr)}}
@container(max-width:500px){.lecture-cameras .lecture-camera-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.classroom-moderation{container-type:inline-size;min-width:0;padding:12px 14px;border:1px solid var(--line,#5f523a);border-radius:12px;background:var(--panel,var(--surface,#11151a));font:400 16px/1.5 var(--font-ui,Arial,sans-serif)}
.classroom-chat-moderation{margin-top:16px}
.classroom-moderation>summary{display:flex;align-items:center;gap:12px;min-height:36px;margin:0;padding:0;list-style:none;cursor:pointer;font-weight:600}
.classroom-moderation>summary::-webkit-details-marker{display:none}
.classroom-moderation>summary::after{content:'+';margin-left:auto;font-size:24px;line-height:1}
.classroom-moderation[open]>summary::after{content:'−'}
.classroom-moderation>summary:focus-visible{outline:3px solid var(--gold,#d7ae61);outline-offset:4px;border-radius:4px}
.classroom-moderation>p{max-width:76ch;margin:10px 0 14px;color:var(--muted,#b9b3a5);font-size:14px;line-height:1.5}
.classroom-moderation .classroom-moderation-controls{display:grid;grid-template-columns:minmax(220px,360px) auto;align-items:end;gap:12px;width:fit-content;max-width:100%;min-width:0}
.classroom-moderation .classroom-moderation-controls>label{display:grid;gap:6px;min-width:0;margin:0;font-size:14px;line-height:1.4}
.classroom-moderation .classroom-moderation-controls>label>select,.classroom-moderation .classroom-moderation-controls>button{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:48px;margin:0;padding:12px 14px;border:1px solid var(--line,#5f523a);border-radius:10px;font:400 16px/1.35 var(--font-ui,Arial,sans-serif);color:inherit;background:var(--surface,#0c1010)}
.classroom-moderation .classroom-moderation-controls>label>select{height:48px}
.classroom-moderation .classroom-moderation-controls>button{align-self:end;cursor:pointer;white-space:normal;overflow-wrap:anywhere;font-weight:600}
.classroom-moderation .classroom-moderation-controls>button:disabled{opacity:.45;cursor:default}
@container(max-width:620px){.classroom-moderation .classroom-moderation-controls{width:100%;grid-template-columns:minmax(0,1fr)}}
.classroom-communication{min-width:0;margin:8px 0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--cream);font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.classroom-communication-bar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px}
.classroom-communication button{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:8px;color:inherit;background:var(--surface);font:inherit;cursor:pointer}
.classroom-communication button:disabled{opacity:.55;cursor:default}
.classroom-communication button[aria-pressed=true]{outline:2px solid var(--gold);outline-offset:1px;background:color-mix(in srgb,var(--gold) 18%,var(--surface))}
.classroom-communication :focus-visible{outline:3px solid var(--gold,#e6b85f);outline-offset:3px}
.classroom-audio-buttons{display:flex;gap:8px;flex-wrap:wrap}
.classroom-communication .classroom-chat-toggle{margin-left:auto}
.classroom-communication p{margin:6px 0}
.classroom-communication .classroom-communication-status{font-size:13px;color:var(--muted,#bbb3a0)}
.classroom-communication .classroom-audio-problem{border-color:#dba39a;color:#ffdbd4;background:#492724}
.classroom-audio-overview ul{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:3px;margin:4px 0;max-height:92px;overflow:auto;overscroll-behavior:contain}
.classroom-audio-overview li{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:6px 9px;border:1px solid var(--line);border-radius:8px}
.classroom-communication-chat{border-top:1px solid var(--line);margin-top:8px;padding-top:8px}
.classroom-communication-chat[hidden]{display:none}
.classroom-communication-messages{list-style:none;max-height:180px;overflow:auto;overscroll-behavior:contain;margin:0;padding:4px}
.classroom-communication-messages li{padding:6px 0;border-bottom:1px solid var(--line)}
.classroom-communication-messages time{margin-left:10px;font-size:12px;color:var(--muted,#bbb3a0)}
.classroom-communication-messages p{white-space:pre-wrap}
.classroom-message-meta,.classroom-message-deleted{color:var(--muted,#bbb3a0)}
.classroom-message-deleted{font-style:italic}
.classroom-message-actions,.classroom-message-actions>div{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.classroom-message-actions form{width:100%;flex-wrap:wrap}
.classroom-message-actions form label{flex-basis:100%}
.classroom-communication form{display:flex;gap:8px;align-items:flex-end}
.classroom-communication label{flex:1;min-width:0;display:grid;gap:4px}
.classroom-communication textarea{width:100%;box-sizing:border-box;min-height:48px;max-height:140px;resize:vertical;padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:inherit;font:inherit;font-size:16px}
.classroom-communication-error{color:#ffdbd4}
.classroom-communication .classroom-heard-status[aria-pressed=true],.classroom-communication .classroom-heard-status.confirmed{color:#b6ecc0;background:#193822;border-color:#77bf87}
.classroom-communication .classroom-seen-status[aria-pressed=true],.classroom-communication .classroom-seen-status.confirmed{color:#c0e6ff;background:#17364b;border-color:#79bfe8}
.classroom-audio-overview .confirmed{padding:3px 6px;border-radius:5px;font-weight:700}
.teaching-feedback-target{display:flex;justify-content:flex-end;margin:0 0 12px;min-width:0}.classroom-media-feedback{display:flex;justify-content:flex-end;gap:8px 14px;flex-wrap:wrap;min-width:0}.classroom-media-feedback button{min-height:44px;padding:8px 12px;border:1px solid var(--line,#66543a);border-radius:8px;background:var(--surface,#171717);color:var(--cream,#f3e9d0);font:inherit;cursor:pointer}.classroom-media-feedback button:disabled{opacity:.55;cursor:default}.classroom-media-feedback button:focus-visible{outline:3px solid var(--gold,#e6b85f);outline-offset:2px}.classroom-media-feedback .classroom-audio-problem[aria-pressed=false]{background:var(--surface,#171717);color:var(--cream,#f3e9d0);border-color:var(--line,#66543a)}.classroom-media-feedback .classroom-heard-status[aria-pressed=true]{background:#193822;color:#b6ecc0;border-color:#77bf87}.classroom-media-feedback .classroom-seen-status[aria-pressed=true]{background:#17364b;color:#c0e6ff;border-color:#79bfe8}.classroom-media-feedback .classroom-audio-problem[aria-pressed=true]{background:#492724;color:#ffdbd4;border-color:#dba39a}@media(max-width:480px){.classroom-media-feedback{gap:8px}.classroom-media-feedback .classroom-audio-buttons{flex-basis:auto;flex:0 1 auto}.classroom-media-feedback button{font-size:14px;padding-inline:9px}}
@media(max-width:600px){.classroom-communication{padding:8px;margin:6px 0}.classroom-communication-bar{gap:8px}.classroom-communication-bar>strong{display:none}.classroom-communication .classroom-chat-toggle{margin-left:0;flex:1;padding-inline:8px}.classroom-audio-buttons{flex:1;flex-wrap:nowrap}.classroom-audio-buttons button{flex:1;padding-inline:10px;white-space:nowrap}.classroom-communication .classroom-communication-status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.classroom-audio-overview ul{max-height:64px}.classroom-communication-chat{max-height:36dvh}.classroom-communication form{flex-wrap:wrap}.classroom-communication form label{flex-basis:100%}.classroom-communication form button{width:100%}}
.classroom-communication-messages header{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px}
.classroom-communication .classroom-message-reply{margin-left:auto;min-height:36px;padding:5px 10px;font-size:14px}
.classroom-communication-messages header time{margin-left:0}
.classroom-communication .classroom-message-editor{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:12px 0;padding:12px;border:1px solid var(--gold);border-radius:10px}
.classroom-message-edit-controls{display:flex;flex-wrap:wrap;gap:8px}
.classroom-communication .classroom-message-edit-controls button{width:auto;min-height:40px}
.classroom-communication .classroom-message-editor textarea{min-height:72px;max-height:120px}
.classroom-communication .classroom-communication-chat{max-height:none;overflow:visible}
.classroom-communication .classroom-reply-quote{display:flex;flex-direction:column;align-items:flex-start;gap:3px;width:100%;min-width:0;margin:6px 0;padding:8px 10px;border-left:3px solid var(--gold);text-align:left;font-size:13px;background:color-mix(in srgb,var(--gold) 8%,var(--surface));overflow-wrap:anywhere}
.classroom-reply-quote span{white-space:pre-wrap;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.classroom-communication-messages .classroom-message-highlight{background:color-mix(in srgb,var(--gold) 15%,var(--surface));box-shadow:inset 3px 0 var(--gold);border-radius:6px;padding-inline:10px}
.controller-reply-target small{display:block;line-height:1.4;max-height:3em;overflow:hidden;overflow-wrap:anywhere}
.classroom-communication form>label{margin:0}
.controller-chat form[aria-label="Написать в чат занятия"]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:stretch}
.controller-chat form[aria-label="Написать в чат занятия"]>label{display:block;min-width:0}
.controller-chat form[aria-label="Написать в чат занятия"] textarea{display:block;margin:0;min-height:72px;max-height:160px}
.controller-chat form[aria-label="Написать в чат занятия"]>button{align-self:stretch;min-width:120px;margin:0;font-size:16px}
@media(max-width:600px){.controller-chat form[aria-label="Написать в чат занятия"]{grid-template-columns:minmax(0,1fr)}.controller-chat form[aria-label="Написать в чат занятия"]>button{min-height:48px}}
.teacher-controller-portal { min-height: 100dvh; background: var(--surface, #0c1010); color: var(--cream, #f4e4bf); padding: clamp(12px, 3vw, 32px); display: grid; gap: 16px; align-content: start; }
.teacher-controller-portal > section, .controller-login, .teacher-controller-setup { border: 1px solid var(--line, #5f523a); border-radius: 16px; padding: 16px; background: var(--panel, #11151a); }
.teacher-controller-portal h1 { font-size: clamp(24px, 4vw, 36px); margin: 0; }
.teacher-controller-portal h2 { font-size: 22px; margin: 0 0 12px; }
.teacher-controller-portal label, .teacher-controller-setup label { display: grid; gap: 6px; margin: 10px 0; }
.teacher-controller-portal input, .teacher-controller-portal textarea, .teacher-controller-portal select, .teacher-controller-setup input { width: 100%; padding: 12px; min-height: 44px; border: 1px solid var(--line, #5f523a); border-radius: 10px; color: inherit; background: var(--surface, #0c1010); }
.controller-actions, .controller-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.controller-heading { justify-content: space-between; }
.controller-actions .button, .teacher-controller-setup .button { min-height: 44px; padding: 10px 14px; }
.teacher-controller-setup summary { cursor: pointer; padding: 6px 0; }
.controller-login { width: min(100%, 460px); justify-self: center; margin-top: 8dvh; display: grid; gap: 10px; }
.controller-slide img { display: block; width: 100%; max-height: min(42dvh, 360px); object-fit: contain; margin-bottom: 12px; }
.teacher-controller-portal [hidden] { display: none; }
.controller-defense-current p { white-space: pre-wrap; overflow-wrap: anywhere; }
.controller-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; margin-top: 12px; }
.controller-teams article { border: 1px solid var(--line, #5f523a); border-radius: 10px; padding: 12px; }
.lecture-audio-receiver { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; padding: 4px 10px; }
.lecture-audio-receiver .button { min-height: 44px; }
.teacher-controller-portal .button:focus-visible, .teacher-controller-setup .button:focus-visible { outline: 3px solid var(--gold, #d7ae61); outline-offset: 2px; }
@media (max-width: 600px) { .controller-actions > .button { flex: 1 1 140px; } .controller-heading { align-items: flex-start; } .teacher-controller-portal > section { padding: 12px; } }

/* The controller keeps the same six blocks on every device. */
.teacher-controller-portal { max-width:none; margin:0; width:100%; box-sizing:border-box; }
.teacher-controller-portal>* { min-width:0; }
.teacher-controller-portal .controller-heading h1 { font-size:32px; }
.teacher-controller-portal .controller-heading span { display:block; font-size:15px; margin-top:6px; }
.teacher-controller-portal .button { min-height:48px; border-radius:10px; font-size:16px; padding:12px 18px; }
.controller-visually-hidden { position:absolute; width:1px; height:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
.controller-presentation { display:grid; grid-template-columns:minmax(0,1fr); gap:20px; margin-bottom:14px; }
.controller-presentation>div { min-width:0; }
.controller-slide img { width:100%; height:auto; max-height:460px; object-fit:contain; margin:0; }
.controller-slide-screen>img{display:block;aspect-ratio:16/9}
.controller-slide-empty { min-height:180px; display:grid; place-items:center; background:#080c10; border-radius:10px; color:#b9b3a5; }
.controller-speech { display:none; min-width:0; max-height:460px; overflow:auto; overscroll-behavior:contain; padding:16px; border:1px solid var(--line); border-radius:10px; font:16px/1.65 var(--font-ui); }
.controller-speech p { white-space:pre-wrap; margin:0 0 16px; }
.controller-speech h3 { margin:0 0 12px; }
.controller-timer-controls { display:flex; gap:14px; flex-wrap:wrap; align-items:end; }
.controller-timer-controls output { font:600 40px/1.2 var(--font-ui); font-variant-numeric:tabular-nums; align-self:center; min-width:125px; }
.controller-timer-controls label { width:150px; margin:0; font-size:14px; }
.controller-chat .controller-chat-heading { display:flex; align-items:center; gap:12px; width:100%; border:0; background:none; text-align:left; padding:0; }
.controller-chat-heading>span:first-child { font:500 22px/1.3 var(--font-display); }
.controller-chat-heading>span:nth-child(2) { margin-left:auto; font-size:14px; color:#e9c47a; }
.controller-chat-heading>b { font-size:28px; width:32px; text-align:center; }
.controller-chat-body { margin-top:16px; }
.controller-chat-filters { display:flex; gap:10px; margin-bottom:12px; }
.controller-chat .classroom-communication-messages { height:340px; max-height:50dvh; padding:0 8px 0 0; font:16px/1.6 var(--font-ui); }
.controller-chat .classroom-communication-messages li { padding:14px 4px; }
.controller-chat audio,.classroom-communication-messages audio { max-width:100%; width:320px; }
.controller-chat .classroom-communication-messages header { display:flex; flex-wrap:wrap; align-items:center; }
.controller-chat-empty { color:var(--muted); }
.controller-reply-target { display:flex; align-items:center; justify-content:space-between; gap:12px; color:#e9c47a; }
.chat-voice-recorder { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:12px; }
.controller-finish-dialog { width:min(480px,calc(100% - 32px)); padding:24px; border:1px solid #a88850; border-radius:16px; background:#11151a; color:#f4e4bf; }
.controller-finish-dialog::backdrop { background:#000b; }
.controller-bottom-actions>.button { width:100%; }
@media(min-width:850px) { .controller-presentation.has-notes { grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr); } .controller-speech { display:block; } }
@media(max-width:600px) {
  .teacher-controller-portal { gap:12px; padding:12px; }
  .controller-slide .controller-actions { display:grid; grid-template-columns:1fr 1fr; }
  .controller-slide .controller-actions .button { padding:10px 8px; font-size:14px; }
  .controller-chat-heading { flex-wrap:wrap; }
  .controller-chat-heading>span:nth-child(2) { font-size:12px; }
  .controller-chat .classroom-communication-messages { height:320px; }
  .controller-timer-controls { display:grid; grid-template-columns:1fr 1fr; }
  .controller-timer-controls label { width:auto; }
  .controller-timer-controls .button { min-width:0; padding:10px; }
  .chat-voice-recorder audio { width:100%; }
}
.teacher-controller-portal .button,.controller-finish-dialog .button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; padding:12px 18px; border:1px solid #7c6642; border-radius:10px; background:#1b1c1e; color:#f4e4bf; font:600 16px/1.35 var(--font-ui, sans-serif); text-decoration:none; cursor:pointer; }
.teacher-controller-portal .button.primary,.controller-finish-dialog .button.primary { color:#23180b; border-color:#dbb76d; background:linear-gradient(180deg,#e8c780,#c28c42); }
.teacher-controller-portal .button:disabled,.controller-finish-dialog .button:disabled { opacity:.45; cursor:default; }
.teacher-controller-portal .button:not(:disabled):hover { filter:brightness(1.12); }
.teacher-controller-portal .controller-finish { color:#f2c7b6; border-color:#866355; }
.teacher-controller-portal { --line:#5f523a; --gold:#d7ae61; --surface:#0c1010; --panel:#11151a; --cream:#f4e4bf; --muted:#b9b3a5; --font-ui:Arial,sans-serif; --font-display:Georgia,serif; }

.controller-native-extras { border:1px solid var(--line); border-radius:12px; padding:14px 16px; }
.controller-native-extras>summary { cursor:pointer; min-height:48px; padding:12px 0; box-sizing:border-box; line-height:1.5; }
.controller-native-extras .teacher-controller-portal { min-height:0; padding:16px 0 0; }
.controller-extra-panels { display:grid; gap:16px; padding-top:16px; }
.controller-extra-panels>section { min-width:0; border:1px solid var(--line); border-radius:12px; padding:14px; }
.controller-extra-panels p { overflow-wrap:anywhere; }
.controller-native-extras .controller-teams article { display:grid; align-content:start; gap:10px; }
.controller-native-extras .controller-teams article :is(h3,p) { margin:0; }
.teacher-controller-portal :is(input,select,textarea) { box-sizing:border-box; font-size:16px; }
.teacher-controller-portal>.teacher-camera-publisher>p:not([role]) { display:none; }

.controller-attendance{display:flex;flex-wrap:wrap;gap:8px 20px;align-items:center}
.controller-attendance span{display:inline-flex;gap:8px;align-items:center;color:var(--cream,#f4ead6)}
.controller-attendance b{font-size:20px;color:var(--gold,#e2bf79)}
.controller-slide-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.teacher-controller-portal .controller-slide-heading h2{margin:0;min-width:0}
.controller-media-indicators{display:flex;gap:12px;flex-shrink:0;padding:4px}
.controller-media-indicator{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;border:1px solid currentColor}
.controller-media-indicator.is-ok{color:#a7dfb0;background:#256b4233}
.controller-media-indicator.has-issue{color:#ffc1b5;background:#b23b3b55}
.controller-media-indicator svg{width:22px;height:22px}
.controller-media-indicator sup{position:absolute;right:-5px;top:-5px;min-width:19px;height:19px;display:grid;place-items:center;padding:0 4px;border-radius:12px;background:#b83131;color:#fff;font:700 12px/1 var(--font-ui,Arial,sans-serif)}

/* Камеры остаются рядом со слайдом; речь занимает свободное место. */
.controller-slide{container-type:inline-size}
.controller-presentation.with-student-cameras{grid-template-columns:minmax(0,1fr);grid-template-areas:"slide" "speech" "cameras";align-items:start}
.controller-presentation.with-student-cameras .controller-slide-screen{grid-area:slide}
.controller-presentation.with-student-cameras .controller-camera-monitor{grid-area:cameras;min-width:0}
.controller-presentation.with-student-cameras .controller-speech{grid-area:speech;display:flex;flex-direction:column;width:100%;box-sizing:border-box;min-height:0;max-height:min(60dvh,560px);overflow:hidden}
.controller-speech-text{min-height:0;overflow:auto;overscroll-behavior:contain}
.controller-speech-text .controller-speech-current{color:var(--cream,#f3e5c6);background:#87631f66;box-shadow:0 0 0 3px #d9b55b66;border-radius:3px;font-weight:700;scroll-margin-top:8px}
.controller-speech>h3{flex:none;font-family:var(--font-display);font-weight:500}
.controller-presentation.with-student-cameras:not(.has-notes){grid-template-areas:"slide" "cameras"}
@container(min-width:850px){
 .controller-presentation.with-student-cameras{grid-template-columns:minmax(0,1.8fr) minmax(260px,1fr);grid-template-areas:"slide cameras" "speech speech"}
 .controller-presentation.with-student-cameras:not(.has-notes){grid-template-areas:"slide cameras"}
}
@container(min-width:1400px){
 .controller-presentation.with-student-cameras.has-notes{grid-template-columns:minmax(0,1.8fr) minmax(280px,.85fr) minmax(260px,.8fr);grid-template-areas:"slide cameras speech"}
}

.controller-slide-screen>.controller-actions{margin-top:14px}
.teacher-controller-portal .staff-inbox{margin:0;padding:16px;font:400 16px/1.6 var(--font-ui)}
.teacher-controller-portal .staff-inbox-heading{padding:0;min-height:40px;gap:12px}
.teacher-controller-portal .staff-inbox-heading strong{font:500 22px/1.3 var(--font-display)}
.teacher-controller-portal .staff-inbox-heading span{font:400 14px/1.4 var(--font-ui);color:#e9c47a}
.teacher-controller-portal .staff-inbox-heading>b{font:700 28px/1 var(--font-ui);width:32px;text-align:center}
.teacher-controller-portal .staff-inbox-body{padding:16px 0 0}

/* Retained native controls have separate rows and a standalone finish action. */
.controller-native-extras .teacher-controller-portal>section:not([hidden]){display:grid;gap:12px}
.controller-native-extras .teacher-controller-portal>section>h2{margin:0}
.controller-native-extras .teacher-controller-portal>section>.button{justify-self:start;max-width:100%}
.controller-native-extras .controller-actions{gap:12px;align-items:stretch;min-width:0}
.controller-native-extras .controller-actions>.button{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.controller-native-extras .controller-slide>.controller-actions{display:flex;flex-wrap:wrap;max-width:840px}
.controller-native-extras .controller-slide>.controller-actions:first-of-type{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:stretch}
.controller-native-extras .controller-slide>.controller-actions:first-of-type>span{align-self:center;text-align:center;font-variant-numeric:tabular-nums;white-space:nowrap}
.controller-native-extras .controller-slide>.controller-actions:not(:first-of-type){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
@media(max-width:600px){
 .controller-native-extras .teacher-controller-portal>section>.button{justify-self:stretch}
}
@container(max-width:600px){
 .controller-native-extras .controller-slide>.controller-actions:first-of-type{grid-template-columns:repeat(2,minmax(0,1fr))}
 .controller-native-extras .controller-slide>.controller-actions:first-of-type>span{grid-column:1/-1;grid-row:1}
 .controller-native-extras .controller-slide>.controller-actions:first-of-type>.button{grid-row:2}
}
.password-control { position: relative; isolation: isolate; display: block; width: 100%; min-width: 0; }
.password-control > input,
.academy-portal .portal-form .password-control > input,
.teacher-controller-portal .password-control > input,
.teacher-controller-setup .password-control > input { width: 100%; min-width: 0; padding-right: 56px; }
.password-control > .password-visibility-toggle { position: absolute; z-index: 2; inset: 50% 4px auto auto; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; margin: 0; padding: 0; border: 1px solid currentColor; border-radius: 7px; background: var(--portal-field, #0d1017); color: var(--portal-gold, var(--cabinet-gold, var(--cream, #e2b96c))); -webkit-text-fill-color: currentColor; -webkit-appearance: none; appearance: none; opacity: 1; box-shadow: none; cursor: pointer; }
.password-control > .password-visibility-toggle:hover { background: var(--portal-panel, #11131b); }
.password-control > .password-visibility-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.password-control > .password-visibility-toggle:disabled { opacity: .45; cursor: default; }
.password-control > .password-visibility-toggle > svg { width: 20px; height: 20px; pointer-events: none; }
.profile-insignia { --seal-gold: #dfb563; padding-top: 12px; min-width: 0; border-top: 1px solid #b68a4344; }
.profile-insignia > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.profile-insignia > header > span { color: #efd39c; font: 600 17px/1.3 var(--font-display); }
.profile-insignia > header small { margin-left: 8px; color: #b5a892; font: 12px/1.4 var(--font-ui); }
.profile-insignia button { cursor: pointer; }
.profile-insignia > header button,.insignia-collection-link { min-height: 36px; padding: 4px 8px; background: transparent; border: 0; color: #e5bf77; font: 600 12px/1.4 var(--font-ui); }
.profile-insignia-row { display: flex; gap: 12px; overflow-x: auto; padding: 6px 4px 12px; scrollbar-width: thin; scrollbar-color: #b68a43 #17151c; }
.profile-insignia-row .insignia-token { flex: 0 0 88px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 4px; min-height: 116px; border: 0; background: none; color: #edd6ac; }
.insignia-token.accent-blue,.insignia-token.accent-sky { --seal-gold: #8dbddd; }
.insignia-token.accent-green,.insignia-token.accent-lime { --seal-gold: #91b99a; }
.insignia-token.accent-violet { --seal-gold: #bc99dd; }
.insignia-token.accent-rose,.insignia-token.accent-coral { --seal-gold: #d99385; }
.insignia-token .insignia-seal { position: relative; flex: none; display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid var(--seal-gold); border-radius: 50%; background: radial-gradient(circle at 30% 25%,#c2995438,#171219 75%); box-shadow: 0 0 0 4px #241c13,0 0 0 5px #92733c66,0 7px 15px #0008,inset 0 0 0 4px #0005; }
.insignia-seal > svg { width: 30px; height: 30px; color: var(--seal-gold); }
.insignia-seal > img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.insignia-seal > svg.insignia-equipped { position: absolute; width: 19px; height: 19px; right: -4px; bottom: -2px; padding: 2px; background: #ebcb87; color: #171219; border-radius: 50%; }
.insignia-token > b { max-width: 88px; font: 500 12px/1.25 var(--font-display); text-align: center; }
.insignia-token > small { font: 10px/1.3 var(--font-ui); color: #b5a892; }
.insignia-token:hover .insignia-seal { box-shadow: 0 0 0 5px #92733c88,0 0 22px #c2995438; }
.profile-insignia button:focus-visible { outline: 2px solid #f1ce88; outline-offset: 2px; border-radius: 6px; }
.profile-insignia-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 1px dashed #b68a4355; border-radius: 8px; color: #e6d3b4; font: 13px/1.5 var(--font-ui); }
.profile-insignia-empty > svg { width: 28px; height: 28px; color: #dfb563; }
.profile-insignia-empty > span { flex: 1; min-width: 150px; }
.profile-insignia-empty small { display: block; color: #b5a892; font-size: 11px; }
.profile-insignia-empty button { min-height: 44px; border: 1px solid #b68a4366; border-radius: 6px; padding: 8px 12px; background: #af803328; color: #e5bf77; }
.profile-insignia-preview { display: flex; gap: 5px; align-items: center; margin-top: 4px; }
.profile-insignia-preview > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #bd9856; border-radius: 50%; background: #241c13; }
.profile-insignia-preview svg { width: 14px; height: 14px; color: #eac782; }
.academy-theme .academy-profile-button .profile-insignia-preview img { width: 22px; height: 22px; min-width: 0; object-fit: contain; border: 0; border-radius: 50%; padding: 0; }
.profile-insignia-preview em { font: 11px/1 var(--font-ui); color: #eac782; }
@media(max-width:600px) { .profile-insignia > header small { display: block; margin-left: 0; margin-top: 4px; } .profile-insignia > header button { min-height: 44px; } .profile-insignia-row { gap: 8px; } }
.student-profile-menu { position:relative; min-width:0; }
.app-shell .topbar .student-profile-trigger { width:auto; max-width:100%; }
.app-shell .topbar .student-profile-trigger > .faculty-avatar { min-width:0; }
.student-profile-chevron { flex-shrink:0; color:#dcb671; transition:transform .15s; }
.student-profile-trigger[aria-expanded="true"] .student-profile-chevron { transform:rotate(180deg); }
.app-shell .student-profile-panel {
  position:absolute; top:calc(100% + 10px); right:0; z-index:60;
  width:300px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 110px);
  overflow-y:auto; overscroll-behavior:contain; padding:12px;
  border:1px solid #9c7945; border-radius:12px; background:#18191e;
  color:#ede0c9; box-shadow:0 16px 48px #0009; text-align:left;
}
.student-profile-heading { margin:0; padding:6px 10px 10px; color:#c7a66e; font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
.app-shell .student-profile-panel :is(a,button,summary) {
  display:flex; align-items:center; justify-content:flex-start; gap:10px;
  width:100%; min-height:44px; padding:10px; border:0; border-radius:6px;
  background:transparent; color:inherit; font:500 14px/1.4 var(--font-ui);
  text-decoration:none; text-align:left; cursor:pointer;
}
.app-shell .student-profile-panel :is(a,button,summary):hover,
.app-shell .student-profile-panel a[aria-current="page"] { background:#dba85219; color:#f4cf8b; }
.app-shell .student-profile-panel :is(a,button,summary):focus-visible,
.app-shell .student-profile-trigger:focus-visible { outline:2px solid #f4cf8b; outline-offset:2px; }
.student-profile-panel svg { flex-shrink:0; color:#dcb671; }
.student-profile-academy { margin-top:8px; padding:8px 0; border-top:1px solid #dba85230; border-bottom:1px solid #dba85230; }
.student-profile-academy summary { list-style:none; }
.student-profile-academy summary::-webkit-details-marker { display:none; }
.student-profile-academy summary svg { margin-left:auto; }
.student-profile-academy[open] summary svg { transform:rotate(180deg); }
.student-profile-communication { padding-top:8px; }
.app-shell .student-profile-panel .student-profile-logout { border-top:1px solid #dba85230; border-radius:0; margin-top:8px; }
@media(max-width:700px) {
  .app-shell .student-profile-panel { position:fixed; top:72px; right:12px; max-height:calc(100dvh - 160px); }
}
.required-lesson-entry-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.required-lesson-entry-heading .eyebrow { min-width:0; overflow-wrap:anywhere; }
.required-lesson-entry .required-lesson-entry-close { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:0; border:1px solid var(--entry-line,#d6a35357); border-radius:50%; background:linear-gradient(145deg,#d4a85f1a,#0d0c12); color:var(--entry-cream,#f3e6cf); cursor:pointer; transition:background .15s,border-color .15s,color .15s; }
.required-lesson-entry .required-lesson-entry-close:hover:not(:disabled) { background:#d4a85f26; border-color:var(--entry-gold,#d4a85f); color:#f9dca4; }
.required-lesson-entry .required-lesson-entry-close:focus-visible { outline:2px solid var(--entry-gold,#d4a85f); outline-offset:4px; }
.required-lesson-entry .required-lesson-entry-hint { font-size:.875rem; }
.enrollment-page{--enroll-gold:#e2b96c;--enroll-ink:#f5e3c2;--enroll-muted:#c6b9a8;min-height:100dvh;color:var(--enroll-ink);background:radial-gradient(ellipse at 30% 50%,#72451930,transparent 55%),linear-gradient(#0a0d16c9,#0a0c14ec),url('/assets/academy/academy-gates-v1.webp') center/cover;font:15px/1.55 var(--font-ui);padding:clamp(20px,3vw,48px);display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,480px);gap:clamp(32px,6vw,100px);align-items:center}
.registration-page .enrollment-panel{padding:24px}.registration-page .enrollment-panel h2{font-size:32px;margin:12px 0}.registration-page .enrollment-panel .enrollment-back{margin-bottom:8px}.registration-page .registration-faculties{margin-top:14px;border-top:0;padding-top:0}.registration-page .enrollment-panel form{gap:12px}
.enrollment-page h1,.enrollment-page h2{font-family:var(--font-display);font-weight:400;line-height:1.12;text-wrap:balance;margin:16px 0}.enrollment-page h1{font-size:clamp(38px,4.8vw,66px)}.enrollment-page h2{font-size:clamp(28px,3vw,38px)}.enrollment-page h1 em{color:var(--enroll-gold);font-style:normal}.enrollment-page p{color:var(--enroll-muted);margin:12px 0 20px;max-width:520px}.enrollment-eyebrow{display:flex;gap:9px;align-items:center;color:var(--enroll-gold);font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:700}
.enrollment-story{max-width:650px;margin:auto;width:100%}.enrollment-panel{padding:28px;border:1px solid #a38147;border-radius:18px;background:linear-gradient(140deg,#18151beF,#0e1019f5);box-shadow:0 25px 80px #0005,inset 0 0 0 5px #dfb86f08}.enrollment-back{border:0;background:none;color:var(--enroll-muted);display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:6px 0;cursor:pointer}.enrollment-panel .enrollment-back{margin-bottom:14px}.enrollment-panel p{font-size:13px}.enrollment-panel form{display:grid;gap:16px}.enrollment-panel label{display:grid;gap:6px;font-weight:600;font-size:13px}.enrollment-panel input{width:100%;min-width:0;min-height:46px;border:1px solid #8d7650;border-radius:8px;background:#090c14;color:var(--enroll-ink);padding:10px 12px;font:14px/1.4 var(--font-ui)}.enrollment-panel input::placeholder{color:#a69a86;font-size:12px}.enrollment-panel label small{font-size:11px;color:var(--enroll-muted);font-weight:400}.enrollment-password{position:relative;display:block}.enrollment-password input{padding-right:48px}.enrollment-password button{position:absolute;right:2px;top:2px;min-height:42px;width:42px;border:0;background:none;color:var(--enroll-gold);display:grid;place-items:center}
.enrollment-primary{display:flex;justify-content:center;align-items:center;gap:14px;width:100%;min-height:50px;padding:12px 18px;border:1px solid #f1d397;border-radius:8px;background:linear-gradient(#edcd8d,#c59147);color:#25180b;font-weight:700;font-size:14px;cursor:pointer;box-shadow:0 6px 24px #d9ac4c16}.enrollment-page .enrollment-error{padding:12px;border:1px solid #df977e;border-radius:8px;color:#ffe1d3;background:#6d251b33;font-size:13px;margin:4px 0}.enrollment-page .enrollment-privacy{display:flex;align-items:flex-start;gap:9px;font-size:11px;margin:18px 0}.enrollment-privacy svg{flex-shrink:0;color:var(--enroll-gold)}.registration-faculties{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;border-top:1px solid #d2a75535;padding-top:14px}.registration-faculties span{text-align:center;display:grid;justify-items:center;gap:4px}.registration-faculties img{object-fit:contain}.registration-faculties small{font-size:10px;color:var(--enroll-muted)}
.registration-hat{position:relative;height:clamp(190px,30vh,300px);width:100%;margin-top:24px;text-align:center;border:1px solid #bd965443;border-radius:16px;overflow:hidden;background:radial-gradient(ellipse,#6a3d1829,#0b0e19);box-shadow:inset 0 0 30px #0006}.registration-hat img{height:calc(100% - 32px);width:100%;object-fit:contain;display:block;filter:drop-shadow(0 6px 20px #0009)}.registration-hat span{display:block;color:#d6b576;font:italic 13px var(--font-display)}
.sorting-page{grid-template-columns:minmax(0,1.1fr) minmax(340px,.9fr);gap:24px 70px;padding-top:22px;align-content:center}.sorting-header{grid-column:1/-1;display:flex;align-items:center;gap:18px;border-bottom:1px solid #d2a75535;padding-bottom:12px}.sorting-header .enrollment-back{margin-left:auto;font-size:12px}.sorting-ticket{font-size:11px;color:var(--enroll-muted);padding:5px 10px;border:1px solid #d2a75535;border-radius:30px}.sorting-stage{position:relative;display:grid;justify-items:center;min-width:0}.sorting-hat-frame{position:relative;width:min(100%,450px);height:min(64vh,550px);display:grid;place-items:center}.sorting-hat{display:block;width:100%;height:100%;object-fit:contain;border-radius:24px;filter:drop-shadow(0 15px 35px #000b);transform-origin:50% 82%;position:relative;z-index:1}.sorting-orbit{position:absolute;width:80%;aspect-ratio:1;border:1px solid #e2b96c35;border-radius:50%;top:7%;box-shadow:0 0 0 22px #d6a74e06,0 0 0 60px #d6a74e04;pointer-events:none}.sorting-copy{max-width:600px}.sorting-copy h1{font-size:clamp(36px,4vw,57px)}.sorting-whisper{font:italic 16px/1.5 var(--font-display);text-align:center;position:relative;z-index:2;margin-top:14px!important}.sorting-queue{display:flex;gap:14px;align-items:center;border:1px solid #a38147;border-radius:12px;background:#15141de6;padding:18px;margin:24px 0}.sorting-queue>svg{color:var(--enroll-gold)}.sorting-queue b{display:block;font-size:17px}.sorting-queue small{display:block;color:var(--enroll-muted);font-size:12px;margin-top:4px}.sorting-faculties{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.sorting-faculties>div{text-align:center;border:1px solid #ac8a4d55;border-radius:12px;padding:12px 4px;background:#11131ce0}.sorting-faculties img{width:68px;height:80px;object-fit:contain}.sorting-faculties span{display:block;font:12px var(--font-display);margin-top:5px}.sorting-result{display:flex;gap:22px;align-items:center;margin:24px 0 32px;border:1px solid var(--faculty-color);padding:20px;border-radius:16px;background:linear-gradient(135deg,#d6ac5413,#13141ddd);box-shadow:0 0 50px #e2b96c0e}.sorting-result img{object-fit:contain;width:130px;height:155px;flex-shrink:0}.sorting-result b{color:var(--faculty-color);font-size:14px}.sorting-result p{font-family:var(--font-display);font-size:19px;color:var(--enroll-ink);margin:8px 0 12px}.sorting-result small{display:flex;gap:5px;align-items:center;color:#b9d7c4;font-size:11px}
@media(max-width:850px){.enrollment-page{grid-template-columns:1fr;gap:24px;padding:24px}.enrollment-story h1{font-size:38px}.registration-hat{height:210px}.enrollment-panel{width:100%;max-width:520px;margin:auto}.enrollment-story{max-width:520px}.sorting-header{flex-wrap:wrap;gap:8px}.sorting-header .enrollment-back{margin-left:0}.sorting-stage{grid-row:2}.sorting-hat-frame{height:300px}.sorting-copy{max-width:580px;margin:auto;width:100%}.sorting-copy h1{font-size:36px}.sorting-whisper{font-size:14px}.sorting-queue{margin:16px 0}.sorting-copy>p{font-size:14px}.sorting-result{padding:16px;gap:16px}.sorting-result img{width:95px;height:115px}}
@media(prefers-reduced-motion:reduce){.enrollment-page *{animation:none!important;transition:none!important}}
.sorting-explanation { margin-top:20px; border-top:1px solid #a38147; padding-top:10px; }.sorting-explanation h2 { font-size:24px; }.sorting-explanation p { font-size:16px; }.sorting-explanation ul { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0; list-style:none; font-size:14px; }
/* Faculty sorting video: optional playback, never a navigation gate. */
.sorting-page .sorting-video-panel{width:100%;min-width:0;max-width:520px;display:grid;gap:12px;justify-items:center}
.sorting-page .sorting-faculty-video{display:block;width:100%;height:auto;max-height:62vh;max-height:62svh;object-fit:contain;border-radius:16px;background:#090c14}
.sorting-page .sorting-video-actions{display:flex;flex-wrap:wrap;gap:8px 16px;justify-content:center;align-items:center;width:100%}
.sorting-page .sorting-video-actions .enrollment-back{min-height:48px;text-align:center;justify-content:center}
.sorting-page .sorting-video-note{font-size:12px;text-align:center;margin:0;max-width:100%}
@media(max-width:850px){.sorting-page .sorting-faculty-video{max-height:48vh;max-height:48svh}.sorting-page .sorting-video-panel{max-width:440px}}
/* Video-first ceremony occupies the viewport, not one column of the result.
   Portrait films remain uncropped. Controls can scroll on very short windows. */
.enrollment-page.sorting-cinematic-page {
  position: fixed;
  inset: 0;
  display: block;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  background: #090c14;
}
.sorting-cinematic-page .sorting-cinematic-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.sorting-cinematic-page .sorting-video-cinematic {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 360px;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}
.sorting-cinematic-page .sorting-faculty-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: #090c14;
}
.sorting-cinematic-page .sorting-video-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 16px;
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
}
.sorting-cinematic-page .sorting-video-actions button { width: auto; min-height: 48px; margin: 0; }
.sorting-cinematic-page .sorting-video-note,
.sorting-cinematic-page .enrollment-error {
  width: 100%;
  max-width: 860px;
  padding: 8px 16px;
  margin: 0 auto;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}
/* Keep the quiz wider than its introduction, regardless of lazy CSS load order.
   Natural height is retained for zoom/very short windows; never clip answers. */
.enrollment-page.sorting-quiz-page {
  grid-template-columns: minmax(260px, 440px) minmax(0, 720px);
  justify-content: center; gap: clamp(24px, 4vw, 64px); padding: 24px;
  min-height: 100vh; min-height: 100svh;
}
.sorting-quiz-page aside { min-width: 0; max-width: 440px; margin: auto; }
.sorting-quiz-page aside h1 { font-size: clamp(36px, 3.5vw, 48px); margin-block: 12px; }
.sorting-quiz-page aside img { display: block; width: 180px; height: clamp(120px, 24svh, 220px); object-fit: contain; margin: 12px auto; }
.sorting-quiz-page aside p { font-size: 14px; line-height: 1.5; margin: 12px 0; }
.sorting-quiz-page .sorting-quiz-card {
  min-width: 0; padding: 24px; border: 1px solid #a38147;
  border-radius: 18px; background: #10131bf5;
}
.sorting-quiz-card > .enrollment-back { margin-bottom: 4px; }
.sorting-quiz-card progress { display: block; width: 100%; height: 4px; accent-color: var(--enroll-gold); margin: 12px 0 16px; }
.sorting-quiz-card fieldset { min-width: 0; border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.sorting-quiz-card legend { font: 28px/1.2 var(--font-display); margin-bottom: 16px; color: var(--enroll-ink); }
.sorting-quiz-card label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 56px; border: 1px solid #8d7650; border-radius: 12px; font-size: 16px; line-height: 1.45; cursor: pointer; background: #0c1019; }
.sorting-quiz-card label.is-selected { background: #493520; border-color: var(--enroll-gold); }
.sorting-quiz-card input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--enroll-gold); }
.sorting-quiz-card footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; }
.sorting-quiz-card .enrollment-primary { width: auto; min-height: 48px; }
.sorting-quiz-page .sorting-quiz-card > p { max-width: none; font-size: 12px; line-height: 1.5; margin: 12px 0 0; }
.sorting-quiz-card :focus-visible { outline: 2px solid var(--enroll-gold); outline-offset: 4px; }
.sorting-quiz-card button:disabled { opacity: .5; cursor: not-allowed; }
@media (min-width: 851px) and (max-height: 740px) {
  .enrollment-page.sorting-quiz-page { padding-block: 16px; }
  .sorting-quiz-page aside h1 { font-size: 36px; }
  .sorting-quiz-page aside img { height: 140px; }
  .sorting-quiz-page aside p { font-size: 13px; }
  .sorting-quiz-page .sorting-quiz-card { padding: 20px; }
  .sorting-quiz-card legend { font-size: 26px; margin-bottom: 12px; }
}
@media (max-width: 850px) {
  .enrollment-page.sorting-quiz-page { grid-template-columns: minmax(0, 640px); gap: 12px; padding: 16px; }
  .sorting-quiz-page aside { width: 100%; max-width: 640px; }
  /* Keep the one-answer/no-wrong-answer guidance. Only the decorative hat and
     extended faculty explanation leave the compact view. */
  .sorting-quiz-page aside img, .sorting-quiz-page aside p:last-child { display: none; }
  .sorting-quiz-page aside h1 { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sorting-quiz-page aside p { font-size: 12px; line-height: 1.4; margin: 8px 0 0; }
  .sorting-quiz-page .sorting-quiz-card { padding: 18px; }
  .sorting-quiz-card legend { font-size: 24px; margin-bottom: 12px; }
  .sorting-quiz-card label { padding: 10px 12px; min-height: 52px; font-size: 16px; line-height: 1.4; }
  .sorting-quiz-card footer { gap: 8px; margin-top: 12px; }
  .sorting-quiz-card .enrollment-primary { padding: 10px 12px; gap: 8px; }
}
@media (max-width: 420px) {
  .enrollment-page.sorting-quiz-page { padding: 12px; }
  .sorting-quiz-page .sorting-quiz-card { padding: 16px; }
  .sorting-quiz-card legend { font-size: 22px; }
  .sorting-quiz-card label { gap: 10px; }
}
/* Only the pre-registration quiz and form own this viewport. Leaving the flow
   removes the document lock; the cabinet and ceremony keep their own layout. */
html:has(.enrollment-viewport),
body:has(.enrollment-viewport),
#root:has(.enrollment-viewport) {
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body:has(.enrollment-viewport) { margin: 0; }

/* Extra specificity is intentional: Admission and Enrollment are separate
   lazy stylesheets and may arrive in either order. */
.enrollment-page.enrollment-viewport.registration-page.admission-registration,
.enrollment-page.enrollment-viewport.sorting-quiz-page {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  min-width: 0;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}

/* Real overflow (keyboard, zoom, long errors) belongs to the card, not the
   document. Never hide the scrollbar or clip fields to simulate fitting. */
.enrollment-page.enrollment-viewport .admission-form-panel,
.enrollment-page.enrollment-viewport .sorting-quiz-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.enrollment-page.enrollment-viewport.registration-page .admission-story {
  display: grid;
  min-height: 0;
  max-height: 100%;
  gap: 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.enrollment-page.enrollment-viewport.sorting-quiz-page aside {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* On tablets/phones, the form is the page: don't stack a second welcome
   screen and four large crests above or below it. */
@media (max-width: 1050px) {
  .enrollment-page.enrollment-viewport.registration-page.admission-registration {
    grid-template-columns: minmax(0, 640px);
    gap: 0;
  }
  .enrollment-page.enrollment-viewport.registration-page .admission-story {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .enrollment-page.enrollment-viewport.registration-page .admission-form-panel { grid-row: 1; }
}
@media (max-width: 850px) {
  .enrollment-page.enrollment-viewport.sorting-quiz-page { grid-template-rows: auto minmax(0, 1fr); }
  .enrollment-page.enrollment-viewport.sorting-quiz-page aside { max-height: 30vh; max-height: 30dvh; }
}
@media (max-width: 760px) {
  .enrollment-page.enrollment-viewport.registration-page .admission-form-panel { padding: 16px; }
  .enrollment-page.enrollment-viewport.registration-page .identity-name-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .enrollment-page.enrollment-viewport.registration-page .admission-form-panel > .enrollment-eyebrow,
  .enrollment-page.enrollment-viewport.registration-page .admission-form-panel > p:not(.enrollment-privacy) { display: none; }
  .enrollment-page.enrollment-viewport.registration-page .admission-form-panel h2 { font-size: 26px; }
}
@media (max-width: 360px) {
  .enrollment-page.enrollment-viewport.registration-page .identity-name-row { grid-template-columns: minmax(0, 1fr); }
}
.personal-achievement-summary { display:grid; gap:16px; }
.personal-achievement-top { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:20px; }
.personal-achievement-own { display:grid; grid-template-columns:140px minmax(0,1fr); gap:20px; align-items:center; }
.personal-achievement-summary .panel { padding:24px; min-width:0; }
.personal-achievement-own figure { margin:0; text-align:center; }
.personal-achievement-own figure img { width:140px; height:160px; object-fit:contain; }
.personal-achievement-own figcaption { color:#edc47e; font-size:14px; line-height:1.4; }
.personal-achievement-summary h2 { font:500 28px/1.2 var(--font-display); margin:8px 0 12px; }
.personal-achievement-summary p { font-size:16px; line-height:1.5; }
.personal-achievement-place { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; color:#efd9b3; }
.personal-achievement-place b { font-size:24px; color:#edc47e; }
.personal-achievement-earned { display:flex; align-items:center; gap:8px; }
.personal-achievement-summary .personal-achievement-note,.personal-achievement-faculties>p,.personal-achievement-demo { color:#c6baaa; font-size:14px; }
.personal-achievement-own .button { min-height:44px; }
.academy-achievement-unified { display:grid; gap:24px; min-width:0; padding-bottom:24px; }
.academy-achievement-unified .achievement-workspace { margin-top:0; }
@media(max-width:1100px) { .personal-achievement-top { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) { .personal-achievement-summary .panel { padding:16px; }.personal-achievement-own { grid-template-columns:100px minmax(0,1fr);gap:12px; }.personal-achievement-own figure img { width:100px; height:120px; }.personal-achievement-summary h2 { font-size:24px; }.personal-achievement-place b { font-size:22px; }.academy-achievement-unified { padding-bottom:96px; } }
.question-answer{display:grid;gap:8px;min-width:0}.question-answer>label{margin:0!important}.question-answer>select{width:100%;min-width:0;min-height:44px}.question-answer>textarea{width:100%;min-width:0;resize:vertical;overflow:hidden}
.question-help{margin:4px 0 16px;color:var(--muted);font-size:14px}
.personal-wish-map>.cheese-heading{display:grid;gap:6px;padding-bottom:12px}.personal-wish-map>.cheese-heading :is(h2,p){margin:0}.personal-wish-map>.cheese-heading p{max-width:85ch;font-size:14px;line-height:1.5}
.personal-wish-map .wish-map-refined .wish-card-visual{min-width:0}.personal-wish-map .wish-map-refined .wish-sphere{width:100%;min-width:0}.personal-wish-map .wish-map-refined .wish-sphere img{width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#ead9b7}
.personal-wish-map .wish-map-refined .wish-photo-settings{margin-top:8px;color:var(--wish-ink)}.wish-photo-settings>summary{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;cursor:pointer;border:1px solid var(--wish-edge);border-radius:6px;font-weight:600}.wish-photo-settings[open]>summary{margin-bottom:8px}.personal-wish-map .wish-photo-settings small{display:block;font-size:12px}.personal-wish-map .wish-photo-settings .wish-upload-button{display:grid;position:relative;padding:8px;border:1px solid var(--wish-edge);border-radius:6px;text-align:center;cursor:pointer;min-height:44px}.wish-upload-button input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.personal-wish-map .wish-map-refined .wish-description-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap;margin:8px 0;line-height:1.55;color:var(--wish-ink)}.personal-wish-map .wish-map-refined .wish-edit-description{display:flex;gap:6px;align-items:center;min-height:44px;color:var(--wish-heading);background:transparent;border:0;padding:6px 0;font-size:14px;text-align:left}
.personal-wish-map .wish-image-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr));gap:10px}.personal-wish-map .wish-image-gallery button{padding:4px;border-radius:8px;background:#f7eedb;min-width:0;min-height:44px}.personal-wish-map .wish-image-gallery img{display:block;width:100%;height:auto!important;aspect-ratio:1;object-fit:contain!important;border-radius:4px}.personal-wish-map .wish-photo-settings .wish-image-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
.wish-period-trigger{display:inline-flex;justify-content:center;align-items:center;gap:6px;min-height:44px;max-width:100%;margin-top:8px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;overflow-wrap:anywhere}.wish-period-trigger svg{flex-shrink:0}.wish-period-dialog{box-sizing:border-box;max-width:min(460px,calc(100vw - 24px));width:100%;max-height:calc(100dvh - 32px);padding:24px;border:1px solid #b99858;border-radius:18px;background:#151518;color:#f5ead2;box-shadow:0 20px 80px #0008;text-align:left;overflow:auto}.wish-period-dialog::backdrop{background:#0009;backdrop-filter:blur(4px)}.wish-period-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.wish-period-dialog h3{margin:0;font:600 26px/1.2 var(--font-display)}.wish-period-dialog button{min-height:44px;cursor:pointer}.wish-period-dialog header button{display:grid;place-items:center;flex-shrink:0;width:44px;border:1px solid #b9985870;border-radius:50%;background:transparent;color:inherit}.wish-period-dialog p{font-size:15px;line-height:1.5;color:#c9bfae}.wish-period-presets{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.wish-period-presets button{padding:8px 12px;border:1px solid #b9985870;border-radius:20px;background:transparent;color:inherit}.wish-period-presets button[aria-pressed=true]{background:#b9985830;border-color:#d9b267}.wish-period-dialog form{display:grid;gap:14px}.wish-period-dialog label{display:grid;gap:6px}.wish-period-dialog input{box-sizing:border-box;width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #b9985870;border-radius:8px;background:#090c10;color:inherit;font-size:16px}.wish-full-editor{display:grid;gap:16px}.wish-full-editor textarea{width:100%;resize:vertical;min-height:160px;white-space:pre-wrap}.wish-full-editor :is(input,textarea){scroll-margin-block:90px}.wish-map-detail{scroll-margin-top:16px}
@media(max-width:560px){.wish-period-dialog{padding:18px}.personal-wish-map .wish-map-refined .wish-map-card{grid-template-columns:minmax(96px,.8fr) minmax(0,1.2fr)}.personal-wish-map .wish-map-refined .wish-map-medallion{width:100%;max-width:220px;min-height:120px;border-radius:24px}.wish-photo-settings .wish-image-gallery{grid-template-columns:minmax(0,1fr)!important}.wish-period-trigger{font-size:14px}.wish-map-card-copy input{font-size:16px!important}.personal-wish-map .wish-map-refined .wish-edit-description{font-size:13px}}
@media(prefers-reduced-motion:no-preference){.wish-map-refined .wish-map-card.is-selected{animation:wish-card-appear .3s ease-out}@keyframes wish-card-appear{from{opacity:.65;transform:translateY(6px)}to{opacity:1;transform:none}}}
.personal-wish-map>.cheese-heading{grid-template-columns:minmax(0,1fr) auto;align-items:start}.personal-wish-map>.cheese-heading>p{grid-column:1}.wish-step-navigation{grid-column:2;grid-row:1/span 4;align-self:start}.wish-steps-trigger{display:flex;align-items:center;gap:8px;min-height:44px;padding:9px 12px;border:1px solid #b9985870;border-radius:10px;background:#b9985812;color:var(--cream);cursor:pointer}.wish-steps-trigger span{text-align:left}.wish-steps-trigger small{display:block;color:var(--muted);font-size:11px}.wish-steps-dialog{position:fixed;inset:auto;margin:0;box-sizing:border-box;width:min(350px,calc(100vw - 24px));padding:14px;border:1px solid #b99858;border-radius:14px;background:#151518;color:#f5ead2;box-shadow:0 16px 60px #0007;overflow:auto}.wish-steps-dialog::backdrop{background:#0003}.wish-steps-dialog header{display:flex;align-items:center;justify-content:space-between;gap:8px}.wish-steps-dialog h3{font:600 22px/1.2 var(--font-display);margin:0}.wish-steps-dialog header>button{display:grid;place-items:center;min-width:44px;min-height:44px;border:0;background:transparent;color:inherit}.wish-steps-dialog ol{list-style:none;padding:0;margin:8px 0 0;display:grid;gap:5px}.wish-steps-dialog li>button{display:flex;align-items:center;gap:10px;width:100%;min-height:56px;padding:9px;border:1px solid transparent;border-radius:9px;background:transparent;color:inherit;text-align:left;cursor:pointer}.wish-steps-dialog li>button[aria-current=step],.wish-steps-dialog li>button:hover{border-color:#b9985850;background:#b998581a}.wish-steps-dialog li b{display:grid;place-items:center;flex-shrink:0;width:28px;height:28px;border:1px solid #b9985880;border-radius:50%;color:#e0bc78}.wish-steps-dialog li span{font-weight:600}.wish-steps-dialog li small{display:block;font-size:12px;font-weight:400;line-height:1.4;color:#c4baaa;margin-top:3px}
@media(max-width:560px){.personal-wish-map>.cheese-heading>p{grid-column:1/-1}.wish-step-navigation{grid-row:1}.wish-steps-trigger{padding:7px;gap:5px}.wish-steps-trigger>svg:first-child{display:none}.wish-steps-trigger span{font-size:12px}.personal-wish-map>.cheese-heading h2{font-size:25px}}
.cheese-wish-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;white-space:pre-wrap}
.personal-wish-map .wish-map-refined{--wish-paper:#f4e6c6;--wish-paper-light:#fff8e8;--wish-ink:#493b29;--wish-heading:#694b29;--wish-edge:#af9059;position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) 140px minmax(0,1fr);grid-template-rows:repeat(var(--wish-map-rows),auto);align-items:center;gap:20px;padding:24px;color:var(--wish-ink);background:linear-gradient(110deg,#dbc392,#f4e6c6 12%,#f4e6c6 88%,#dec798);border:1px solid var(--wish-edge);border-radius:12px}.wish-map-refined .wish-map-connections{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1}.wish-map-connections path{fill:none;stroke:#af9059;stroke-width:.15}.personal-wish-map .wish-map-refined .wish-map-medallion{grid-column:2;grid-row:1/span var(--wish-map-rows);display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:170px;padding:16px 8px;border:4px double #d7ae61;border-radius:50%;background:radial-gradient(ellipse at 35% 25%,#6c2730,#341319);color:#f5ead2;text-align:center}.personal-wish-map .wish-map-refined .wish-map-card{grid-column:var(--wish-map-column);grid-row:var(--wish-map-row);display:grid;grid-template-columns:minmax(100px,.8fr) minmax(0,1.2fr);gap:12px;align-items:start;align-self:stretch;min-width:0;padding:12px;border:3px double var(--wish-edge);border-radius:10px;background:var(--wish-paper-light)}.wish-map-refined .wish-map-card-copy{min-width:0}.wish-map-refined .wish-map-card-copy input{box-sizing:border-box;max-width:100%}.wish-map-refined .wish-sphere{padding:0;overflow:hidden;border:0;border-radius:7px;background:#5c482b;color:#fff8e8}.wish-map-refined .wish-sphere>span{display:block;padding:8px;font-size:13px}.wish-map-refined .wish-map-medallion b{font:500 30px/1.05 var(--font-display)}
@media(max-width:1100px){.personal-wish-map .wish-map-refined{grid-template-columns:minmax(0,1fr) 120px minmax(0,1fr);gap:14px;padding:16px}.personal-wish-map .wish-map-refined .wish-map-card{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){.personal-wish-map .wish-map-refined{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none}.personal-wish-map .wish-map-refined .wish-map-medallion{grid-column:1/-1;grid-row:auto;justify-self:center;width:180px;min-height:130px;border-radius:24px}.personal-wish-map .wish-map-refined .wish-map-card{grid-column:auto;grid-row:auto}}
@media(max-width:560px){.personal-wish-map .wish-map-refined{grid-template-columns:minmax(0,1fr);padding:12px}.personal-wish-map .wish-map-refined .wish-map-card{grid-template-columns:minmax(96px,.8fr) minmax(0,1.2fr)}.personal-wish-map .wish-map-refined .wish-map-medallion{grid-column:1;max-width:100%}}

.wish-full-editor textarea{max-height:min(22rem,45dvh);overflow-y:auto}

.wish-steps-dialog>header>button,.wish-period-dialog>header>button{border-radius:50%;width:40px;height:40px;padding:0;display:grid;place-items:center}
/* Полосы скрыты во всей Академии; сами области прокрутки остаются доступны. */
* {
  scrollbar-width: none !important;
  scrollbar-gutter: auto !important;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar,
*::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
.lobby-roster-panel{min-width:0;margin:20px 0;padding:24px;border:1px solid var(--border,#665237);border-radius:12px;background:var(--panel,#0e1118);color:var(--text,#eee4cc)}
.lobby-roster-panel>header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.lobby-roster-panel h2{display:flex;align-items:center;gap:10px;margin:0;font-size:clamp(22px,3vw,30px)}
.lobby-roster-panel h3{margin:0 0 12px;font-size:20px}
.lobby-roster-panel p{line-height:1.5;margin:12px 0}
.lobby-roster-count{font-weight:700;font-variant-numeric:tabular-nums}
.lobby-roster-note{color:var(--muted,#bbb3a0);font-size:14px}
.lobby-roster-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:24px}
.lobby-roster-list{list-style:none;margin:0;padding:0}
.lobby-roster-list li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--border,#665237)}
.lobby-roster-list li>div{min-width:0;overflow-wrap:anywhere}.lobby-roster-list small{display:block;margin-top:6px;line-height:1.4}
.lobby-roster-status{display:flex;align-items:center;gap:5px;flex-shrink:0;font-size:13px}.lobby-roster-status.is-ready{color:var(--gold,#e6b85f)}
.lobby-roster-self{display:inline-block;margin-left:8px;font-size:12px;color:var(--muted,#bbb3a0)}
.lobby-roster-mode{display:block;width:fit-content;margin-top:6px;padding:3px 7px;border:1px solid var(--line);border-radius:6px;color:var(--cream);font-size:13px;line-height:1.4}
.teacher-presence-roster{margin:12px 0}.teacher-presence-roster>summary{cursor:pointer;min-height:44px;padding:12px;border:1px solid var(--line);border-radius:8px}.teacher-presence-roster .lobby-roster-panel{margin:8px 0}
.lobby-roster-action{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:16px 0}.lobby-roster-action p{flex:1;min-width:180px}
.lobby-roster-panel .button{min-height:44px;white-space:normal}
@media(max-width:900px){.lobby-roster-groups{grid-template-columns:1fr}}
@media(max-width:480px){.lobby-roster-panel{padding:16px}.lobby-roster-list li{align-items:flex-start;flex-wrap:wrap}.lobby-roster-panel>header .button{width:100%}}
.lobby-roster-panel--student{margin:12px 0;padding:clamp(14px,2vw,22px)}
.lobby-roster-panel--student h2{font-size:clamp(19px,2.3vw,24px)}
.lobby-roster-panel--student p{margin:8px 0}
.lobby-roster-panel--student .lobby-roster-action{margin:10px 0;gap:12px}
.lobby-roster-panel--student .lobby-roster-action p{font-size:14px}
.lobby-roster-panel--student .lobby-roster-list li{padding:10px 0}
.lobby-other-members{margin-top:8px}
.lobby-other-members>summary{display:flex;align-items:center;gap:8px;min-height:44px;width:fit-content;max-width:100%;padding:8px 10px;cursor:pointer;border:1px solid var(--line);border-radius:8px;list-style:none;overflow-wrap:anywhere}
.lobby-other-members>summary::-webkit-details-marker{display:none}
.lobby-other-members>summary svg{flex:none;transition:transform .15s}
.lobby-other-members[open]>summary svg{transform:rotate(45deg)}
.classroom-lobby-student{width:min(960px,100%);min-width:0}
.classroom-lobby-student .lobby-hero{display:block;min-height:0;padding:clamp(18px,2.5vw,28px);border-radius:18px}
.classroom-lobby-student .lobby-hero>div{padding-right:44px}
.classroom-lobby-student .lobby-hero h1{font-size:clamp(25px,3vw,38px);line-height:1.16;margin:12px 0;overflow-wrap:anywhere}
.classroom-lobby-student .lobby-hero p{margin:10px 0;line-height:1.5}
.classroom-lobby-student .waiting-pill{margin-top:8px;max-width:100%;white-space:normal}
.classroom-lobby-student .lesson-entry-waiting{padding:20px 16px 12px}
.classroom-lobby-student .lesson-entry-waiting>svg{width:28px;height:28px}
.classroom-lobby-student .student-motivation{margin:12px 12px 0}
@media(max-width:480px){.lobby-roster-panel--student>header{gap:8px}.lobby-roster-panel--student>header .button{width:auto}.classroom-lobby-student .lobby-hero>div{padding-right:28px}.classroom-lobby-student .lobby-hero{padding:18px 14px}}
.team-role-picker { --role-accent: var(--field-accent,var(--lime)); min-width: 0; padding: 16px 0; color: var(--cream); }
.team-role-picker > header h3 { margin: 8px 0; font: 400 28px/1.2 var(--font-display); color: var(--role-accent); }
.team-role-picker > header p { max-width: 80ch; margin: 0; font: 400 15px/1.6 var(--font-ui); color: var(--muted); }
.team-role-picker .team-role-status { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--role-accent); background: var(--surface-2); font: 400 15px/1.5 var(--font-ui); }
.team-role-status small { display: block; margin-top: 8px; color: var(--muted); }
.team-role-picker .team-role-cards { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; align-items: stretch; }
.team-role-picker .team-role-card { display: flex; flex-direction: column; padding: 0; min-width: 0; text-align: left; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--cream); cursor: pointer; }
.team-role-picker .team-role-card > img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.team-role-picker .team-role-copy { display: flex; flex-direction: column; gap: 8px; padding: 16px; flex: 1; }
.team-role-picker .team-role-copy > b { font: 400 22px/1.2 var(--font-display); color: var(--role-accent); overflow-wrap: anywhere; }
.team-role-picker .team-role-copy > span { font: 400 14px/1.5 var(--font-ui); }
.team-role-picker .team-role-copy > strong { margin-top: auto; padding-top: 8px; font: 600 13px/1.5 var(--font-ui); color: var(--role-accent); }
.team-role-picker .team-role-copy > small { font: 400 12px/1.5 var(--font-ui); color: var(--muted); overflow-wrap: anywhere; }
.team-role-picker .team-role-card:hover:not(:disabled), .team-role-picker .team-role-card.is-selected { border-color: var(--role-accent); box-shadow: inset 0 0 0 1px var(--role-accent); }
.team-role-picker .team-role-card:focus-visible { outline: 3px solid var(--role-accent); outline-offset: 3px; }
.team-role-picker .team-role-card:disabled { opacity: 1; cursor: default; }
.team-role-picker .team-role-card:disabled:not(.is-selected) .team-role-copy > strong { color: var(--muted); }
.team-role-picker .team-role-draws, .team-role-picker .team-role-footnote { margin: 16px 0 0; font: 400 14px/1.6 var(--font-ui); color: var(--muted); }
.team-role-draws summary { cursor: pointer; min-height: 32px; }
.case-team-panel .team-role-picker .team-role-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (max-width: 1000px) { .team-role-picker .team-role-cards { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 600px) { .team-role-picker .team-role-cards { grid-template-columns: repeat(2,minmax(0,1fr)); } .team-role-picker .team-role-copy { padding: 12px; } .team-role-picker .team-role-copy > b { font-size: 20px; } }
@media (max-width: 360px) { .team-role-picker .team-role-cards, .case-team-panel .team-role-picker .team-role-cards { grid-template-columns: 1fr; } }
.team-preparation.team-entry-choices{--entry-accent:var(--gold,var(--lime));display:grid;align-content:start;gap:16px;width:min(1120px,100%);margin:0 auto;padding:clamp(16px,2vw,24px);background:var(--surface);border-color:var(--line);box-sizing:border-box}
.team-entry-choices>header h2{margin:6px 0 8px;font-size:clamp(26px,2.4vw,34px)}
.team-entry-choices>header p{margin:0;font-size:15px}
.team-entry-choices .team-entry-option{display:grid;grid-template-columns:minmax(0,1fr) 260px;align-items:center;gap:16px 24px;padding:16px 20px;border:1px solid var(--line);border-radius:var(--radius,12px);background:color-mix(in srgb,var(--surface-2) 65%,transparent);min-width:0}
.team-entry-choices .team-entry-option h3{margin:6px 0;font:500 clamp(21px,2vw,25px)/1.25 var(--font-display)}
.team-entry-choices .team-entry-option p{margin:0;max-width:68ch;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.team-entry-choices .team-entry-option--solo{border-color:color-mix(in srgb,var(--entry-accent) 60%,var(--line));background:linear-gradient(110deg,color-mix(in srgb,var(--entry-accent) 8%,transparent),transparent)}
.team-entry-choices .team-entry-option>.button{width:100%;min-height:48px;white-space:normal;justify-content:center;text-align:center;padding:12px 16px}
.team-entry-choices .team-entry-help{border-top:1px solid var(--line);padding-top:4px}
.team-entry-choices .team-entry-help>summary{display:list-item;min-height:44px;padding:12px 0;color:var(--entry-accent);cursor:pointer;font-size:14px}
.team-entry-choices .team-entry-help p{font-size:14px;line-height:1.5;margin:8px 0}
.team-entry-choices .team-preparation-steps{margin:8px 0 12px;gap:12px 20px;font-size:14px}
.team-entry-choices .team-entry-help>summary:focus-visible{outline:2px solid var(--entry-accent);outline-offset:2px}
.team-entry-choices>.board-error{margin:0}
@media(max-width:600px){
 .team-preparation.team-entry-choices{gap:10px;padding:12px}
 .team-entry-choices>header h2{font-size:26px}
 .team-entry-choices>header p{font-size:14px;line-height:1.45}
 .team-entry-choices .team-entry-option{grid-template-columns:minmax(0,1fr);gap:10px;padding:10px 12px}
 /* Both mode actions stay above the fold; all explanations remain in the disclosure. */
 .team-entry-choices .team-entry-option>div{display:none}
 .team-entry-choices .team-entry-option h3{font-size:21px}
 .team-entry-choices .team-entry-option p{font-size:13px;line-height:1.45}
 .team-entry-choices .team-entry-option>.button{min-height:48px;padding:10px 12px;font-size:14px}
}
/* The two mode actions have priority over game chrome on small screens. */
@media(max-width:759px),(max-height:500px){
 .app-shell .detailed-game.is-stage-brief:has(.team-entry-choices){display:flex;flex-direction:column}
 .detailed-game.is-stage-brief:has(.team-entry-choices)>:is(.detailed-header,.mode-track,.detailed-footer){flex:0 0 auto}
 .app-shell .detailed-game.is-stage-brief:has(.team-entry-choices)>.detailed-stage{display:block;flex:1 1 0;min-height:0;overflow-y:auto;padding:10px}
 .detailed-game.is-stage-brief:has(.team-entry-choices)>.mouse-reactions,.detailed-game.is-stage-brief:has(.team-entry-choices) .case-condition-bar{display:none}
}
@media(max-height:500px) and (min-width:601px){
 .team-preparation.team-entry-choices{grid-template-columns:1fr 1fr;gap:10px;padding:10px}
 .team-entry-choices>header,.team-entry-choices>.team-entry-help{grid-column:1/-1}
 .team-entry-choices>header :is(.kicker,p){display:none}
 .team-entry-choices>header h2{font-size:22px;margin:0}
 .team-entry-choices .team-entry-option{grid-template-columns:minmax(0,1fr);padding:8px}
 .team-entry-choices .team-entry-option>div{display:none}
 .team-entry-choices .team-entry-option>.button{font-size:14px;padding:8px;min-height:44px}
}
/* The private route is a continuous workspace, not a page-sized slideshow. */
.detailed-game.is-stage-personal .detailed-stage:has(.personal-question-route) { display: block; overflow-y: auto; overscroll-behavior: contain; }
.detailed-game.is-stage-personal .personal-shell:has(.personal-question-route) { display: flex; flex-direction: column; height: auto; gap: 12px; }
.detailed-game .private-banner { position: static; width: 100%; background: var(--surface); color: var(--cream); border: 1px solid var(--line); box-shadow: none; }
.detailed-game .private-banner b { color: var(--lime); }
.detailed-game .private-banner span { color: var(--cream); }
.detailed-game .personal-question-route { width: 100%; max-width: none; height: auto; padding: 20px; overflow: visible; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.detailed-game .personal-question-route .board-title { margin-bottom: 16px; }
.detailed-game .personal-question-route .board-title h2 { margin: 8px 0; font-size: clamp(26px,2.2vw,38px); }
.detailed-game .personal-question-route .personal-route-lead { max-width: none; margin: 0 0 16px; color: var(--cream); font-size: 17px; line-height: 1.5; }
.personal-question-route .personal-question-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.personal-question-route .personal-question-list > section,.personal-question-route .personal-route-fields > section { min-width: 0; display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.personal-question-route .personal-question-list > section.is-main { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.personal-question-route label { display: grid; min-width: 0; gap: 8px; padding: 0; background: none; border: 0; border-radius: 0; }
.personal-question-route label > span,.personal-question-route .personal-example-picker > label { color: var(--lime); font-size: 16px; font-weight: 700; }
.personal-question-route :is(textarea,input,select) { min-width: 0; width: 100%; padding: 12px; color: var(--cream); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 17px; line-height: 1.5; }
.personal-question-route :is(textarea,input,select):focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.personal-question-route textarea { min-height: 110px; resize: vertical; }
.personal-question-route select { min-height: 48px; text-overflow: ellipsis; }
.personal-example-picker { min-width: 0; display: grid; gap: 8px; }
.personal-question-route .personal-question-list button { min-height: 48px; width: 100%; border-color: var(--line); color: var(--cream); background: var(--surface); font-size: 15px; }
.personal-question-route .personal-question-list button[aria-pressed="true"] { color: var(--lime); border-color: var(--lime); }
.personal-question-route .personal-main-context { margin: 20px 0 16px; padding: 16px; border: 1px solid var(--lime); border-radius: 12px; background: var(--surface); overflow-wrap: anywhere; }
.personal-question-route .personal-main-context > span { font-size: 15px; color: var(--lime); font-weight: 700; }
.personal-question-route .personal-main-context h3 { margin: 10px 0; color: var(--cream); font-size: 24px; line-height: 1.4; }
.personal-question-route :is(.personal-main-context,.personal-route-fields) p { margin: 0; color: var(--cream); font-size: 16px; line-height: 1.5; }
.personal-question-route .personal-route-fields { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 0; }
.personal-question-route .personal-route-fields h3 { margin: 0; color: var(--lime); font-size: 22px; line-height: 1.4; }
.personal-question-route .personal-route-fields blockquote { margin: 0; padding: 12px; border-left: 3px solid var(--lime); font-size: 18px; line-height: 1.5; color: var(--cream); overflow-wrap: anywhere; }
.personal-question-route .personal-route-save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.personal-question-route .personal-route-save > span { flex: 1; min-width: 200px; color: var(--cream); font-size: 15px; line-height: 1.5; }
.personal-question-route .board-error { margin: 16px 0 0; font-size: 17px; }
@media (max-width: 759px) {
  .detailed-game .personal-question-route { padding: 14px; }
  .personal-question-route .personal-question-list,.personal-question-route .personal-route-fields { grid-template-columns: minmax(0,1fr); }
  .personal-question-route .future-anchor-panel { margin: 0 0 16px; }
  .personal-question-route .future-anchor-editor { grid-template-columns: minmax(0,1fr); }
  .personal-question-route .personal-route-save { display: grid; }
  .personal-question-route .personal-route-save .button { width: 100%; min-height: 48px; }
}
@media print {
  .detailed-game.is-stage-personal .detailed-stage,.detailed-game .personal-question-route { height: auto !important; overflow: visible !important; }
  .personal-question-route .personal-example-picker,.personal-question-route button { display: none !important; }
  .personal-question-route :is(section,textarea) { break-inside: avoid; }
}
.detailed-game .academy-defense .defense-canvas-scroll { grid-area: route; overflow: auto; min-height: 0; padding: 16px; overscroll-behavior: contain; }
.detailed-game .academy-defense.is-showing-notes .defense-canvas-scroll { visibility: hidden; }
.burrow-defense-canvas { display: grid; gap: 18px; min-width: 0; color: var(--cream); }
.burrow-defense-canvas > header { display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.burrow-defense-canvas > header span { color: var(--lime); font-size: 14px; }
.burrow-defense-canvas > header h2 { font-size: clamp(24px,2vw,32px); margin: 4px 0; }
.burrow-defense-canvas > header p { font-size: 17px; line-height: 1.5; margin: 0; max-width: 440px; }
.defense-decision-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; align-items: start; }
.burrow-defense-canvas section { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface); overflow-wrap: anywhere; }
.burrow-defense-canvas h3 { font-size: 22px; line-height: 1.35; color: var(--lime); margin: 0 0 14px; }
.burrow-defense-canvas p { display: block; font-size: 17px; line-height: 1.5; margin: 6px 0; white-space: pre-line; }
.burrow-defense-canvas .defense-answer + .defense-answer { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.burrow-defense-canvas .defense-answer strong { font-size: 15px; color: var(--lime); }
.burrow-defense-canvas .defense-answer-detail { color: var(--cream); }
.defense-question-choices { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }
.defense-question-choices summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px; list-style: none; cursor: pointer; font-size: 16px; line-height: 1.4; color: var(--cream); }
.defense-question-choices summary::-webkit-details-marker { display: none; }
.defense-question-choices summary:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 8px; }
.defense-question-plus { flex: 0 0 24px; text-align: center; font-size: 24px; line-height: 1; color: var(--lime); }
.defense-question-plus::before { content: '+'; }
.defense-question-choices[open] > summary .defense-question-plus::before { content: '−'; }
.defense-question-selection { padding: 0 12px 12px; }
.defense-question-selection ul { margin: 8px 0 14px; padding-left: 20px; }
.defense-question-selection li { font-size: 17px; line-height: 1.5; margin: 8px 0; white-space: pre-line; }
.defense-oral-prompts { padding-left: 22px; margin: 12px 0 0; }
.defense-oral-prompts li { margin: 10px 0; font-size: 17px; line-height: 1.5; }
.defense-rationale label { display: grid; gap: 12px; }
.defense-rationale label span { font-size: 17px; line-height: 1.5; }
.defense-rationale textarea { width: 100%; min-width: 0; min-height: 140px; padding: 12px; font: inherit; font-size: 17px; line-height: 1.5; color: var(--cream); border: 1px solid var(--lime); border-radius: 8px; background: var(--surface); resize: vertical; }
.defense-rationale small { font-size: 15px; line-height: 1.5; }
.defense-alternative-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.defense-alternative-groups details { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.defense-alternative-groups summary { cursor: pointer; min-height: 28px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.defense-alternative-groups ul { padding-left: 20px; margin: 12px 0 0; }
.defense-alternative-groups li { margin: 8px 0; font-size: 17px; line-height: 1.5; }
.detailed-game .academy-defense .defense-timer { display: grid; grid-template-columns: auto auto; gap: 6px 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--lime); border-radius: 10px; background: var(--surface); }
.detailed-game .academy-defense .defense-timer > span { font-size: 12px; letter-spacing: .03em; }
.detailed-game .academy-defense .defense-timer > b { grid-row: 1 / 3; grid-column: 2; font-size: clamp(36px,3vw,48px); font-variant-numeric: tabular-nums; line-height: 1.1; }
.detailed-game .academy-defense .defense-timer > small { grid-row: 2; margin: 0; font-size: 12px; }
.detailed-game .academy-defense .defense-timer button { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--cream); font-size: 13px; padding: 6px 10px; }
.detailed-game .academy-defense .defense-timer.is-ending { border-color: #ff8a81; animation: defense-last-seconds 1s ease-in-out infinite alternate; }
.detailed-game .academy-defense .defense-timer.is-ending > b,.detailed-game .academy-defense .defense-timer.is-ending > small { color: #ff8a81; }
@keyframes defense-last-seconds { to { background: #452021; box-shadow: 0 0 0 3px #ff8a8144; } }
.detailed-game .academy-defense .defense-tools { flex-wrap: wrap; justify-content: flex-end; }
.detailed-game .academy-defense .defense-tools button { min-height: 40px; font-size: 13px; }
.detailed-game .academy-defense.is-defense-fullscreen { position: fixed !important; inset: 0 !important; z-index: 10000; width: 100vw !important; height: 100dvh !important; max-height: none !important; margin: 0 !important; background: var(--surface); overflow: hidden; }
.detailed-game .academy-defense:fullscreen { width: 100vw !important; height: 100dvh !important; }
.defense-print-sheet { display: none; }
@media (max-width: 1300px) {
  .defense-decision-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 759px) {
  .detailed-game .academy-defense > header { display: grid; grid-template-columns: minmax(0,1fr); padding: 10px; gap: 10px; }
  .detailed-game .academy-defense .defense-heading img { display: none; }
  .detailed-game .academy-defense .defense-heading span { font-size: 14px; }
  .detailed-game .academy-defense .defense-timer { grid-template-columns: minmax(0,1fr) auto; padding: 8px 10px; }
  .detailed-game .academy-defense .defense-timer > b { font-size: 36px; }
  .detailed-game .academy-defense .defense-timer button { min-height: 44px; }
  .detailed-game .academy-defense .defense-tools { grid-column: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .detailed-game .academy-defense .defense-tools button { min-height: 44px; font-size: 13px; }
  .detailed-game .academy-defense .defense-canvas-scroll { padding: 10px; }
  .burrow-defense-canvas > header { display: block; }
  .burrow-defense-canvas > header p { margin-top: 10px; }
  .defense-decision-grid,.defense-alternative-groups { grid-template-columns: minmax(0,1fr); }
  .burrow-defense-canvas section { padding: 14px; }
  .detailed-game .academy-defense > footer { padding: 8px; }
  .detailed-game .academy-defense > footer > p { display: none; }
  .detailed-game .academy-defense .defense-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); width: 100%; }
  .detailed-game .academy-defense .defense-actions button { min-height: 48px; white-space: normal; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { .detailed-game .academy-defense .defense-timer.is-ending { animation: none; } }
@media print {
  body:has(> .defense-print-sheet) > *:not(.defense-print-sheet) { display: none !important; }
  .defense-print-sheet { display: block !important; position: static !important; width: auto; height: auto; background: white; color: black; padding: 8mm; }
  .defense-print-sheet .burrow-defense-canvas { color: black; display: block; }
  .defense-print-sheet .defense-decision-grid,.defense-print-sheet .defense-alternative-groups { display: block; }
  .defense-print-sheet section,.defense-print-sheet details { break-inside: avoid; background: white; color: black; border-color: #777; margin: 4mm 0; padding: 4mm; box-shadow: none; }
  .defense-print-sheet :is(h1,h2,h3,p,strong,span,summary,li) { color: black !important; }
  .defense-print-sheet :is(p,li,summary) { font-size: 11pt; }
  .defense-print-sheet h3 { font-size: 15pt; }
}
.university-team-workshop .game-pages-viewport { overflow: auto; }
.university-case-facts,.university-route-workshop { display: grid; gap: 16px; padding: 18px; color: var(--cream); }
.university-case-facts h3,.university-route-workshop h3 { margin: 0; font: 600 24px/1.25 var(--font-display); }
.university-case-facts p,.university-route-workshop p { margin: 8px 0 0; font-size: 16px; line-height: 1.55; }
.university-history-scroll { overflow-x: auto; }
.university-history-scroll table { border-collapse: collapse; width: 100%; min-width: 760px; }
.university-history-scroll caption { text-align: left; margin-bottom: 10px; font-size: 14px; }
.university-history-scroll th,.university-history-scroll td { padding: 14px; text-align: left; vertical-align: top; border: 1px solid var(--line); font-size: 16px; }
.university-history-scroll thead { color: var(--field-accent); }
.university-history-year { display: none; }
.university-history-scroll tbody th { width: 30%; font-weight: 400; }
.university-history-scroll tbody th :is(b,span,small,a) { display: block; margin-top: 5px; }
.university-history-scroll td small { display: block; font-size: 13px; line-height: 1.45; margin: 8px 0; }
.university-team-workshop a { color: var(--sky); font-size: 14px; text-decoration: underline; }
.university-case-instruction { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 15px; line-height: 1.5; }
.university-criteria-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.university-criteria-grid button { display: grid; gap: 8px; min-height: 90px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; color: var(--cream); }
.university-criteria-grid button[aria-pressed="true"] { border-color: var(--field-accent); background: var(--surface-raised,var(--surface)); }
.university-criteria-grid small { font-size: 14px; line-height: 1.5; }
.university-route-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.university-route-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.university-route-grid header { display: grid; gap: 8px; }
.university-route-grid header span,.university-route-history { color: var(--field-accent); }
.university-route-grid .result-field { display: grid; gap: 7px; margin-top: 14px; }
.detailed-game .university-route-grid .result-field > span { font-size: 15px; line-height: 1.4; }
.university-route-grid .result-field :is(input,select,textarea) { width: 100%; min-width: 0; padding: 10px; min-height: 48px; font-size: 15px; }
.university-team-workshop .university-route-grid h3 { font-size: 22px; }
.university-comparison { padding: 12px; border-left: 3px solid var(--field-accent); }
@media(max-width:1100px) { .university-route-grid { grid-template-columns: minmax(0,1fr); } }
@media(max-width:680px) { .university-criteria-grid { grid-template-columns: minmax(0,1fr); } .university-case-facts,.university-route-workshop { padding: 10px; } }
@media(max-width:680px) {
  .university-history-scroll table { min-width: 0; }
  .university-history-scroll :is(table,tbody,caption) { display: block; }
  .university-history-scroll thead { display: none; }
  .university-history-scroll tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 16px; }
  .university-history-scroll tbody th,.university-history-scroll td:last-child { grid-column: 1 / -1; width: auto; }
  .university-history-scroll td { padding: 10px; }
  .university-history-year { display: block; font-size: 13px; color: var(--field-accent); margin-bottom: 5px; }
}
.detailed-game .academy-defense.is-admission-defense .defense-route { overflow: auto; grid-template-rows: max-content; align-content: start; }
.detailed-game .academy-defense.is-admission-defense .defense-route article.is-current { justify-content: flex-start; }
.detailed-game .academy-defense.is-admission-defense .defense-station-copy p { white-space: pre-line; font-size: 17px; line-height: 1.6; }
.wheel-select{display:block;min-width:0;position:relative;max-width:100%}
.wheel-select-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;margin:-1px!important;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
.wheel-select-trigger{width:100%;display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;white-space:normal;overflow-wrap:anywhere;min-height:48px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--cream);font:inherit;line-height:1.5;cursor:pointer}
.wheel-select-list{display:block;max-height:300px;overflow:auto;margin-top:6px;padding:6px;border:1px solid var(--field-accent,var(--gold));border-radius:10px;background:var(--surface);color:var(--cream);scrollbar-gutter:stable}
.wheel-select-list>span{display:block}.wheel-select-list [role=option]{display:block;width:100%;min-height:44px;padding:10px;text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.5;background:transparent;color:inherit;border:1px solid transparent;border-radius:7px;font:inherit;cursor:pointer}
.wheel-select-list [role=option]:is(.is-active,[aria-selected=true],:focus-visible){background:var(--surface-raised,var(--surface));border-color:var(--field-accent,var(--gold))}
.wheel-select-group{display:block;padding:10px;color:var(--field-accent,var(--gold));font-weight:700}
.wheel-select :disabled{opacity:.55;cursor:default}.wheel-select :focus-visible{outline:2px solid var(--field-accent,var(--gold));outline-offset:2px}
.wheel-team-simulation,.wheel-simulation-defense { --wheel-after: #e69c70; display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; height:100%; min-height:0; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--cream); gap:12px; }
.wheel-sim-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.wheel-sim-heading h2 { font:500 clamp(22px,1.8vw,30px)/1.2 var(--font-display); margin:4px 0; color:var(--field-accent); }
.wheel-sim-task { padding:10px 14px; border:1px solid var(--field-accent); border-radius:10px; background:var(--surface-raised,var(--surface)); }
.wheel-sim-task p { margin:3px 0; font-size:15px; line-height:1.4; }
.wheel-sim-task small { display:block; font-size:12px; line-height:1.4; color:var(--muted); }
.wheel-sim-given-mobile,.wheel-sim-short-warning { display:none; }
.wheel-sim-workspace { display:grid; grid-template-columns:minmax(340px, .95fr) minmax(0,1.35fr); gap:18px; min-height:0; }
.wheel-sim-wheel-panel,.wheel-sim-decisions { overflow:auto; min-height:0; min-width:0; overscroll-behavior:contain; padding:4px; }
.wheel-sim-decisions,.personal-wheel-decisions { overflow-x:hidden; }
.wheel-sim-visual { position:sticky; top:0; z-index:2; background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:8px; }
.wheel-sim-visual svg { display:block; width:min(100%,440px); margin:auto; max-height:40dvh; }
.wheel-sim-legend { display:flex; flex-wrap:wrap; gap:8px 16px; font-size:14px; font-weight:600; line-height:1.4; }
.wheel-sim-legend span::before { content:''; display:inline-block; width:18px; border-top:3px solid; vertical-align:middle; margin-right:5px; }
.wheel-sim-legend i { font-style:normal; }.wheel-sim-legend .wheel-sim-long-label::before { display:none; }
.wheel-sim-legend .is-before { color:var(--sky); }.wheel-sim-legend .is-goal { color:var(--field-accent); }.wheel-sim-legend .is-goal::before { border-top-style:dashed; }.wheel-sim-legend .is-after { color:var(--wheel-after); }
.wheel-sim-ring,.wheel-sim-axis { fill:none; stroke:var(--line); stroke-width:1; }
.wheel-sim-visual svg text { fill:var(--cream); font-size:14px; }.wheel-sim-visual svg text.is-focused { fill:var(--field-accent); font-weight:700; }
.wheel-sim-before { fill:color-mix(in srgb,var(--sky) 12%,transparent); stroke:var(--sky); stroke-width:2; }
.wheel-sim-goal { fill:none; stroke:var(--field-accent); stroke-width:2; stroke-dasharray:6 4; }
.wheel-sim-after { fill:color-mix(in srgb,var(--wheel-after) 12%,transparent); stroke:var(--wheel-after); stroke-width:3; }.wheel-sim-point { fill:var(--wheel-after); }
.wheel-sim-point.is-before { fill:var(--sky); }
.wheel-sim-focus-buttons { display:flex; flex-wrap:wrap; gap:5px; }
.wheel-sim-focus-buttons button { min-height:32px; padding:5px 8px; color:var(--cream); background:var(--surface); border:1px solid var(--line); border-radius:6px; }
.wheel-sim-focus-buttons button[aria-pressed=true] { border-color:var(--field-accent); color:var(--field-accent); }
.wheel-sim-overloads,.wheel-sim-sphere-settings,.wheel-sim-reasoning,.wheel-sim-action-list { border:0; padding:0; margin:14px 0; min-width:0; }
.wheel-sim-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.wheel-sim-choice-grid label { display:flex; align-items:center; gap:8px; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:8px; }
.wheel-sim-choice-grid input { accent-color:var(--field-accent); }
.board-shell .wheel-sim-choice-grid input[type="checkbox"] { width:20px; height:20px; min-height:20px; flex:0 0 20px; padding:0; margin:2px 0; }
.wheel-sim-protected { font-size:14px; color:var(--field-accent); text-align:center; }
.wheel-sim-list-intro { grid-column:1/-1; }
.wheel-sim-plan-options button { display:block; width:100%; min-height:44px; margin:8px 0; padding:10px; color:var(--cream); background:var(--surface); border:1px solid var(--line); border-radius:8px; text-align:left; }
.wheel-team-simulation legend { margin-bottom:10px; color:var(--field-accent); font-size:18px; font-weight:600; }
.wheel-sim-solution-picker { border:0; padding:0; margin:14px 0; min-width:0; }
.wheel-sim-solution-picker label { display:grid; gap:7px; }
.wheel-sim-solution-picker select { width:100%; min-width:0; min-height:48px; padding:10px; font-size:16px; }
.wheel-sim-solution-picker summary { min-height:44px; cursor:pointer; color:var(--field-accent); }
.wheel-team-simulation :is(p,label) { font-size:15px; line-height:1.5; }
.wheel-sim-extra { display:flex; flex-wrap:wrap; gap:12px; margin:10px 0; }.wheel-sim-extra label { display:flex; align-items:center; gap:6px; }
.wheel-sim-goal-input { display:grid; gap:7px; }.wheel-sim-goal-input input { width:100%; accent-color:var(--field-accent); }
.wheel-sim-focus-select { display:grid; gap:7px; margin-bottom:12px; }.wheel-sim-focus-select select { min-height:44px; padding:8px; color:var(--cream); background:var(--surface); }
.wheel-sim-values table { width:100%; border-collapse:collapse; font-size:14px; }.wheel-sim-values caption { text-align:left; margin:12px 0; color:var(--muted); }
.wheel-sim-values :is(th,td) { padding:8px 5px; border-bottom:1px solid var(--line); text-align:center; }.wheel-sim-values :is(th,td):first-child { text-align:left; }
.wheel-sim-current,.wheel-sim-alternative { padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }.wheel-sim-current h3 { margin:0; font:500 23px/1.25 var(--font-display); }.wheel-sim-current p,.wheel-sim-alternative p { margin:7px 0; }.wheel-sim-warning { color:var(--wheel-after); font-weight:600; }
.wheel-sim-action-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.wheel-sim-action-group { margin:18px 0; }
.wheel-sim-action-group h3 { margin:0 0 8px; color:var(--field-accent); font-size:17px; line-height:1.4; }
.wheel-sim-solution-picker optgroup { font-style:normal; }
.wheel-sim-action-list button { display:grid; gap:6px; padding:12px; color:var(--cream); background:var(--surface); border:1px solid var(--line); border-radius:9px; text-align:left; }
.wheel-sim-action-list button[aria-pressed=true] { border-color:var(--field-accent); background:var(--surface-raised,var(--surface)); }.wheel-sim-action-list button b { font-size:16px; line-height:1.35; }.wheel-sim-action-list button small { font-size:13px; line-height:1.45; }.wheel-sim-action-list button span { color:var(--field-accent); font-size:13px; }
.wheel-sim-reasoning { display:grid; gap:14px; }.wheel-sim-reasoning label { display:grid; gap:7px; }
.wheel-sim-reasoning :is(select,textarea) { min-height:48px; width:100%; padding:10px; font-size:16px; }.wheel-sim-reasoning textarea { min-height:90px; resize:vertical; }
.wheel-sim-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; border-top:1px solid var(--line); padding-top:10px; }.wheel-sim-footer span { font-size:13px; line-height:1.4; }.wheel-sim-footer button { flex-shrink:0; }
.wheel-legacy-shell { display:grid; grid-template-rows:auto minmax(0,1fr); gap:8px; min-height:0; }.wheel-legacy-notice { padding:10px; font-size:14px; color:var(--cream); background:var(--surface); }.wheel-legacy-notice button { margin-left:12px; }
.wheel-setup-workspace { display:grid; gap:14px; }.detailed-game .wheel-board .game-pages-viewport { overflow:auto; }
.wheel-board { --lime:var(--field-accent); }
.wheel-support-workspace { min-width:0; overflow:auto; }
.wheel-sim-defense-summary { min-height:0; overflow:auto; padding:16px; border:1px solid var(--line); border-radius:10px; }.wheel-sim-defense-summary h3 { margin-top:0; font:500 26px/1.25 var(--font-display); }.wheel-sim-defense-summary p { font-size:17px; line-height:1.5; }.wheel-sim-defense-tools { display:flex; flex-wrap:wrap; gap:8px; }.wheel-sim-defense-tools button { padding:8px 12px; min-height:40px; color:var(--cream); background:var(--surface); border:1px solid var(--line); border-radius:6px; }
.wheel-defense-comparisons { display:grid; gap:12px; }.wheel-defense-comparisons article { padding:12px; border:1px solid var(--line); border-radius:8px; }.wheel-defense-comparisons article.is-chosen { border-color:var(--field-accent); }.wheel-defense-comparisons h4 { margin:0; color:var(--field-accent); font-size:18px; }
.wheel-defense-comparisons p { margin:6px 0 0; }
.personal-wheel-route { --lime:var(--field-accent); display:grid; grid-template-rows:auto minmax(0,1fr); min-height:0; gap:14px; overflow:hidden; }
.personal-shell:has(.personal-wheel-route) { height:100%; display:grid; grid-template-rows:minmax(0,1fr); min-height:0; overflow:hidden; }
.personal-shell:has(.personal-wheel-route) > :is(.private-banner,.game-helper) { display:none; }
.personal-wheel-print table { width:100%; border-collapse:collapse; }.personal-wheel-print :is(th,td) { border:1px solid #777; padding:4px; color:black; background:white; text-align:left; }.personal-wheel-print p { white-space:pre-wrap; }
.personal-wheel-route > header h2 { margin:6px 0; font:500 28px/1.25 var(--font-display); }.personal-wheel-route > header p { margin:6px 0; font-size:14px; line-height:1.5; }
.personal-wheel-workspace { display:grid; grid-template-columns:minmax(380px,1fr) minmax(0,1.15fr); min-height:0; gap:20px; }
.personal-wheel-visual,.personal-wheel-decisions { min-height:0; min-width:0; overflow:auto; padding:12px; scrollbar-gutter:stable; }
.personal-wheel-visual .radar-wheel { width:min(58%,220px); margin:35px auto 40px; }.personal-wheel-visual .wheel-spoke-label { width:80px; font-size:11px; }
.personal-wheel-visual .radar-wheel.is-expanded .wheel-spoke-label { width:74px; font-size:10px; }.personal-wheel-visual .radar-wheel.is-expanded .wheel-marker { width:26px; height:26px; font-size:9px; border-width:2px; }
.personal-wheel-controls,.personal-wheel-decisions,.wheel-homework { display:grid; align-content:start; gap:14px; }
.personal-wheel-controls { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; overflow-x:hidden; }.personal-wheel-controls > label:first-child { grid-column:1/-1; }.personal-wheel-controls small { white-space:normal; overflow-wrap:anywhere; }
.personal-wheel-route label { display:grid; gap:8px; font-size:15px; line-height:1.5; }.personal-wheel-route :is(input:not([type=checkbox]),select,textarea) { min-width:0; width:100%; padding:10px; font-size:16px; }.personal-wheel-route textarea { min-height:80px; resize:vertical; }.personal-wheel-route select { min-height:44px; }
.personal-wheel-route fieldset { min-width:0; padding:14px; border:1px solid var(--line); border-radius:10px; display:grid; gap:14px; }.personal-wheel-route legend { color:var(--field-accent); font-size:18px; }.personal-wheel-route p { line-height:1.5; }
.personal-wheel-route .wheel-sim-choice-grid label { display:flex; align-items:start; }
.wheel-homework { border:1px solid var(--field-accent); border-radius:10px; padding:14px; }.wheel-homework h3 { margin:0; font-size:23px; }.wheel-homework details { border-top:1px solid var(--line); padding-top:10px; }.wheel-homework summary { cursor:pointer; min-height:44px; }.wheel-energy-note { display:grid; gap:14px; }
@media(min-width:1200px) {
  .personal-wheel-visual { display:grid; grid-template-columns:minmax(300px,1.2fr) minmax(150px,.8fr); grid-template-rows:minmax(0,1fr) auto; gap:16px; overflow:hidden; }
  .personal-wheel-visual .radar-wheel { grid-column:1; grid-row:1; width:min(65%,240px); align-self:center; }
  .personal-wheel-visual .legend-row { grid-column:1; grid-row:2; font-size:12px; }
  .personal-wheel-controls { grid-column:2; grid-row:1/3; grid-template-columns:minmax(0,1fr); min-height:0; overflow-y:auto; overflow-x:hidden; }
}
@media(max-width:1000px) { .personal-wheel-route { overflow:auto; display:block; }.personal-wheel-workspace { grid-template-columns:minmax(0,1fr); }.personal-wheel-visual,.personal-wheel-decisions { overflow:visible; }.personal-wheel-visual .radar-wheel { width:min(65%,300px); }.personal-wheel-visual .wheel-spoke-label { width:64px; font-size:10px; }.personal-wheel-visual .wheel-marker { width:30px; height:30px; font-size:10px; }.personal-wheel-visual .wheel-focus-summary { bottom:5%; min-width:90px; padding:4px; }.personal-wheel-visual .wheel-focus-summary b { font-size:10px; } }
.wheel-simulation-defense .wheel-sim-visual { position:static; overflow:auto; }.wheel-simulation-defense.is-defense-fullscreen { position:fixed; inset:0; z-index:9999; border-radius:0; }
.wheel-simulation-defense { overflow:auto; }
.wheel-simulation-defense .wheel-sim-heading > h2 { min-width:0; }
.wheel-simulation-defense .defense-timer { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 12px; padding:10px 14px; border:1px solid var(--field-accent); border-radius:10px; background:var(--surface); flex-shrink:0; }
.wheel-simulation-defense .defense-timer > span,.wheel-simulation-defense .defense-timer > small { font-size:12px; }
.wheel-simulation-defense .defense-timer > b { grid-column:2; grid-row:1/3; font-size:clamp(40px,4vw,56px); line-height:1.1; font-variant-numeric:tabular-nums; }
.wheel-simulation-defense .defense-timer button { min-height:44px; padding:6px 10px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--cream); font-size:13px; }
.wheel-simulation-defense .defense-timer.is-ending { border-color:var(--danger); animation:wheel-last-seconds 1s ease-in-out infinite alternate; }
.wheel-simulation-defense .defense-timer.is-ending > b,.wheel-simulation-defense .defense-timer.is-ending > small { color:var(--danger); }
@keyframes wheel-last-seconds { to { background:color-mix(in srgb,var(--danger) 18%,var(--surface)); box-shadow:0 0 0 3px color-mix(in srgb,var(--danger) 25%,transparent); } }
@media(max-width:759px) {
  .wheel-team-simulation,.wheel-simulation-defense { padding:10px; gap:8px; }.wheel-sim-heading h2 { font-size:21px; }
  .wheel-team-simulation .wheel-sim-heading .kicker { display:none; }
  .wheel-team-simulation .wheel-sim-task p { font-size:13px; line-height:1.4; }.wheel-sim-task small { font-size:11px; }
  .wheel-team-simulation .wheel-sim-given-full,.wheel-sim-long-warning { display:none; }.wheel-sim-given-mobile,.wheel-sim-short-warning { display:block; }.wheel-sim-given-mobile summary { font-size:13px; line-height:1.4; cursor:pointer; }
  .wheel-sim-workspace { grid-template-columns:minmax(0,1fr); grid-template-rows:200px minmax(160px,1fr); overflow:hidden; gap:8px; }
  .wheel-sim-wheel-panel,.wheel-sim-decisions { overflow:auto; padding:0; }
  .wheel-sim-wheel-panel .wheel-sim-visual { position:static; height:100%; display:grid; grid-template-rows:auto minmax(0,1fr); padding:4px; }
  .wheel-sim-wheel-panel .wheel-sim-visual svg { height:100%; width:100%; max-height:none; }
  .wheel-sim-wheel-panel .wheel-sim-focus-buttons { display:none; }
  .wheel-sim-wheel-panel .wheel-sim-protected { display:none; }
  .wheel-sim-visual svg text { font-size:20px; }
  .wheel-sim-legend { font-size:12px; gap:5px 8px; }.wheel-sim-focus-buttons button { min-height:40px; }
  .wheel-sim-legend i,.wheel-sim-long-label { display:none; }
  .wheel-sim-action-list { grid-template-columns:minmax(0,1fr); }
  .wheel-sim-footer { align-items:stretch; flex-direction:column; gap:6px; }.wheel-sim-footer span { font-size:11px; }.wheel-sim-footer button { width:100%; }
  .wheel-simulation-defense .wheel-sim-heading { display:grid; grid-template-columns:minmax(0,1fr); }
  .wheel-simulation-defense { grid-template-rows:auto auto minmax(380px,1fr) auto; }
  .wheel-simulation-defense .wheel-sim-defense-summary h3 { font-size:22px; }.wheel-simulation-defense .wheel-sim-defense-summary p { font-size:15px; }
  .wheel-simulation-defense .wheel-sim-workspace { min-height:360px; }
  .wheel-simulation-defense .wheel-sim-visual { min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr); }
  .wheel-simulation-defense .wheel-sim-visual svg { height:100%; width:100%; max-height:none; }
  .wheel-simulation-defense .wheel-sim-defense-tools button { min-height:44px; }
}
@media(max-width:759px) and (max-height:700px) { .wheel-team-simulation { overflow:auto; }.wheel-team-simulation .wheel-sim-workspace { min-height:230px; grid-template-rows:130px minmax(0,1fr); } }
@media(prefers-reduced-motion:reduce) { .wheel-simulation-defense .defense-timer.is-ending { animation:none; } }
@media print {
  .wheel-defense-print { --field-accent:#8b650f; --sky:#166985; --wheel-after:#9a4512; --surface:white; --line:#aaa; --cream:black; --muted:#333; }
  .wheel-defense-print .wheel-sim-visual { position:static; background:white; break-inside:avoid; }
  .wheel-defense-print .wheel-sim-visual svg { max-height:none; width:90mm; }
  .wheel-defense-print .wheel-sim-defense-summary { height:auto; overflow:visible; color:black; background:white; }
}
/* One touch-scroll surface: the fixed chart must not push decisions into a
   clipped grid row on short phone screens. Desktop keeps its split panes. */
@media(max-width:759px) {
  .wheel-team-simulation { display:block; overflow:auto; }
  .wheel-team-simulation > * + * { margin-top:12px; }
  .wheel-team-simulation .wheel-sim-workspace { display:flex; flex-direction:column; overflow:visible; min-height:0; }
  .wheel-team-simulation .wheel-sim-wheel-panel { flex:none; height:180px; overflow:visible; }
  .wheel-team-simulation .wheel-sim-decisions { flex:none; overflow:visible; }
  .wheel-team-simulation .wheel-sim-choice-grid { grid-template-columns:minmax(0,1fr); }
}

/* Wheel defense single-scroll: the stage owns scrolling; chart and explanation
   grow together. The selectors also override the later mobile/game-page shell. */
@media screen {
  .app-shell .detailed-game.is-stage-defense > .detailed-stage:has(> .wheel-simulation-defense) {
    display:block !important;
    overflow-y:auto !important;
    overflow-x:hidden;
    overscroll-behavior-y:contain;
  }
  .wheel-simulation-defense,
  .app-shell .detailed-game .detailed-stage > .wheel-simulation-defense {
    display:block !important;
    height:auto !important;
    max-height:none !important;
    min-height:0;
    overflow:visible !important;
  }
  .wheel-simulation-defense > * + * { margin-top:12px; }
  .wheel-simulation-defense > .wheel-sim-workspace {
    height:auto;
    min-height:0;
    grid-template-rows:none;
    align-items:start;
    overflow:visible;
  }
  .wheel-simulation-defense :is(.wheel-sim-visual,.wheel-sim-defense-summary) {
    display:block;
    position:static;
    min-width:0;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
  }
  .wheel-simulation-defense .wheel-sim-visual svg { width:min(100%,440px); height:auto; max-height:none; }
  /* Fullscreen uses the viewport as the one outer scroll surface, including
     the CSS fallback when the browser does not support native fullscreen. */
  .wheel-simulation-defense:is(.is-defense-fullscreen,:fullscreen),
  .app-shell .detailed-game .detailed-stage > .wheel-simulation-defense:is(.is-defense-fullscreen,:fullscreen) {
    position:fixed;
    inset:0;
    width:100%;
    height:100dvh !important;
    max-height:100dvh !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }
  .app-shell .detailed-game.is-stage-defense > .detailed-stage:has(> .wheel-simulation-defense:is(.is-defense-fullscreen,:fullscreen)) { overflow:hidden !important; }
}
@media screen and (max-width:840px) {
  .wheel-simulation-defense > .wheel-sim-workspace { display:block; }
  .wheel-simulation-defense > .wheel-sim-workspace > * + * { margin-top:12px; }
}
@media print {
  .wheel-defense-print,
  .wheel-defense-print :is(.wheel-sim-visual,.wheel-sim-defense-summary) {
    display:block;
    height:auto !important;
    min-height:0;
    max-height:none !important;
    overflow:visible !important;
  }
  .wheel-defense-print .wheel-sim-visual svg { width:90mm; height:auto; max-height:none; }
}
/* End wheel defense single-scroll. */

/* Wheel personal single-scroll: both the attention introduction and personal
   wheel grow naturally inside one stage scroller, without changing other games. */
@media screen {
  .app-shell .detailed-game.is-stage-personal > .detailed-stage:has(> .personal-shell > :is(.personal-attention-start,.personal-wheel-route)) {
    display:block !important;
    overflow-y:auto !important;
    overflow-x:hidden;
    overscroll-behavior-y:contain;
  }
  .app-shell .detailed-game .detailed-stage > .personal-shell:has(> :is(.personal-attention-start,.personal-wheel-route)),
  .app-shell .detailed-game .personal-shell > :is(.personal-attention-start,.personal-wheel-route) {
    display:block !important;
    height:auto !important;
    min-height:0;
    max-height:none !important;
    overflow:visible !important;
  }
  .personal-shell > :is(.personal-attention-start,.personal-wheel-route) > * + * { margin-top:14px; }
  .app-shell .detailed-game .personal-wheel-route .personal-wheel-workspace {
    height:auto;
    min-height:0;
    max-height:none;
    align-items:start;
    overflow:visible;
  }
  .app-shell .detailed-game .personal-wheel-route :is(.personal-wheel-visual,.personal-wheel-decisions,.personal-wheel-controls) {
    height:auto !important;
    min-height:0;
    max-height:none !important;
    overflow:visible !important;
  }
}
/* End wheel personal single-scroll. */
.wheel-mountain-event { border:1px solid var(--field-accent); border-radius:10px; padding:14px; margin:14px 0; background:var(--surface-raised,var(--surface)); }
.wheel-mountain-event h3,.wheel-mountain-event h4 { margin:6px 0; color:var(--field-accent); }
.wheel-mountain-flow .wheel-sim-visual { position:static; }
.wheel-mountain-chart .is-mountain { color:var(--danger,var(--field-accent)); }
.wheel-mountain-chart .is-backup { color:var(--sky); }
.wheel-mountain-contour { fill:none; stroke:var(--danger,var(--field-accent)); stroke-width:3; stroke-dasharray:6 3; }
.wheel-backup-contour { fill:none; stroke:var(--sky); stroke-width:3; stroke-dasharray:2 3; }
.wheel-mountain-chart small { display:block; color:var(--muted); padding:6px; }
.wheel-mountain-flow .wheel-sim-reasoning li,.wheel-sim-defense-summary li { margin:10px 0; line-height:1.5; overflow-wrap:anywhere; }
.wheel-mountain-explanation { white-space:pre-wrap; overflow-wrap:anywhere; }
.wheel-comparison-help { min-width:0; margin:16px 0; padding:12px; border:1px solid var(--field-accent); border-radius:10px; }
.wheel-comparison-actions { display:grid; gap:8px; }
.wheel-comparison-actions .button { white-space:normal; text-align:left; min-height:44px; }
.wheel-comparison-help table { width:100%; table-layout:fixed; border-collapse:collapse; font-size:14px; }
.wheel-comparison-help th,.wheel-comparison-help td { padding:6px 3px; border-bottom:1px solid var(--field-accent); overflow-wrap:anywhere; text-align:center; }
.wheel-comparison-help th:first-child { text-align:left; }
.wheel-comparison-help caption { text-align:left; margin:10px 0; }
@media(max-width:759px) {
  .wheel-mountain-flow .wheel-sim-wheel-panel { height:auto; }
  .wheel-mountain-flow .wheel-mountain-chart { height:230px; }
  .wheel-mountain-flow .wheel-sim-values { overflow:auto; }
  .wheel-mountain-flow .wheel-sim-task p { font-size:14px; }
  .wheel-mountain-flow .wheel-sim-reasoning select { text-overflow:ellipsis; }
}
.personal-wheel-contours { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:0; overflow:visible; }
.personal-contour-current { fill:color-mix(in srgb,var(--sky) 12%,transparent); stroke:var(--sky); stroke-width:.6; }
.personal-contour-desired { fill:none; stroke:var(--field-accent); stroke-width:.6; stroke-dasharray:2 1; }
.personal-overload-hint { color:var(--muted); font-size:13px; }
/* Readable personal-wheel introduction: keep text in the normal flow. */
.board-shell.personal-wheel-route > header { display:flex; flex-wrap:wrap; align-items:center; column-gap:16px; }
.board-shell.personal-wheel-route > header p { order:1; flex-basis:100%; max-width:none; font-size:18px; line-height:1.6; margin:6px 0; }
.board-shell.personal-wheel-route > header h2 { flex:1 1 400px; font-size:clamp(26px,2.5vw,34px); line-height:1.25; }
.board-shell.personal-wheel-route > header .kicker { flex-basis:100%; font-size:13px; line-height:1.5; }
.board-shell.personal-wheel-route > header .personal-attention-back { flex:0 1 auto; max-width:100%; margin:6px 0; font-size:16px; min-height:48px; white-space:normal; }
.personal-resource-options label[data-suggested=true] { border-color:var(--field-accent); background:var(--surface-raised,var(--surface)); }
.personal-resource-options small { display:block; font-size:11px; color:var(--field-accent); margin-top:4px; }
.personal-plan-editor { display:grid; gap:14px; min-width:0; }
.personal-plan-choice { display:grid; gap:8px; min-width:0; }
.personal-plan-preview { padding:10px; border-left:2px solid var(--field-accent); background:var(--surface-raised,var(--surface)); overflow-wrap:anywhere; }
.personal-wheel-route .personal-wheel-visual .radar-wheel { width:min(68%,330px); margin:46px auto 54px; }
@media(min-width:1200px) {
  .personal-wheel-route .personal-wheel-visual { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(320px,1fr) auto auto; overflow:auto; }
  .personal-wheel-route .personal-wheel-visual .radar-wheel { grid-column:1; grid-row:1; width:min(68%,360px); }
  .personal-wheel-route .personal-wheel-visual .legend-row { grid-column:1; grid-row:2; }
  .personal-wheel-route .personal-wheel-controls { grid-column:1; grid-row:3; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
}
@media(max-width:759px) {
  .personal-wheel-route .personal-wheel-visual { padding:8px; }
  .personal-wheel-route .personal-wheel-visual .radar-wheel { width:70%; max-width:300px; margin:48px auto 56px; }
}
.personal-attention-start{display:flex;flex-direction:column;gap:14px;min-height:0;overflow:auto;padding:clamp(18px,3vw,30px);scrollbar-gutter:stable}.personal-attention-start>header p,.personal-attention-start>p{line-height:1.65}.personal-attention-fields{display:grid;gap:18px;max-width:900px}.personal-attention-fields label{display:grid;gap:9px;line-height:1.6;color:var(--gold);font-weight:600}.personal-attention-fields textarea{box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:76px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#10121b);color:var(--cream);font:16px/1.6 var(--font-ui,Arial,sans-serif);resize:vertical}.personal-attention-motto{padding:12px 16px;border:1px solid var(--line);border-radius:8px;background:#d6ae5720;color:var(--gold);font-weight:600}.personal-attention-start .button-row{display:flex;flex-wrap:wrap;gap:12px}.personal-attention-start .button{min-height:44px;max-width:100%;white-space:normal}.personal-attention-start :focus-visible{outline:2px solid var(--gold);outline-offset:3px}.personal-attention-back{align-self:flex-start;margin:8px 0 12px}
@media(max-width:600px){.personal-attention-start .button-row{display:grid}.personal-attention-start .button-row .button{width:100%}.personal-attention-fields{gap:16px}}
.personal-attention-start{touch-action:pan-y pinch-zoom}.personal-shell:has(.personal-attention-start){height:100%;display:grid;grid-template-rows:minmax(0,1fr);min-height:0;overflow:hidden}.personal-shell:has(.personal-attention-start)>:is(.private-banner,.game-helper){display:none}
.personal-attention-fields input[type=range]{width:100%;min-height:44px;accent-color:var(--field-accent,var(--gold))}
/* A content-sized row reserves room for the rotated outer labels. A short
   viewport must scroll, never center a large circle above its scroll origin. */
.personal-wheel-route .personal-wheel-visual{display:block;overflow-y:auto;overflow-x:hidden;align-content:start;padding-top:16px}
.personal-wheel-route .personal-wheel-visual .radar-wheel{display:block;flex-shrink:0;align-self:start;width:min(65%,330px);margin:46px auto 54px;aspect-ratio:1}
.personal-wheel-route .personal-wheel-visual .legend-row{margin:0 0 18px}
.personal-wheel-route .personal-wheel-controls{overflow:visible}
@media(max-width:1000px){.personal-wheel-route .personal-wheel-visual{overflow:visible}.personal-wheel-route .personal-wheel-visual .radar-wheel{width:62%;max-width:330px;margin:82px auto 88px}}
@media(min-width:1001px) and (max-height:800px){
 .personal-wheel-route{display:block;overflow:auto}
 .personal-wheel-workspace{min-height:auto}
 .personal-wheel-route .personal-wheel-visual,.personal-wheel-route .personal-wheel-decisions{overflow:visible}
 .personal-wheel-route .personal-wheel-visual .radar-wheel{width:min(60%,300px);margin:46px auto 54px}
}
.cheese-map-board,.personal-wish-map,.cheese-map-defense { --lime:var(--field-accent); display:grid; grid-template-rows:auto minmax(0,1fr); height:100%; min-height:0; min-width:0; gap:14px; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--cream); }
.cheese-heading h2 { margin:5px 0; font:500 clamp(24px,2vw,34px)/1.2 var(--font-display); color:var(--field-accent); }
.cheese-heading p { font-size:14px; line-height:1.5; margin:5px 0; }.cheese-heading [role=status] { color:var(--field-accent); }
.cheese-workspace { min-height:0; min-width:0; overflow:auto; scrollbar-gutter:stable; padding:0 8px 12px 0; overscroll-behavior:contain; }
.cheese-case-task { border:1px solid var(--field-accent); border-radius:10px; padding:12px 16px; background:var(--surface-raised,var(--surface)); margin-bottom:18px; }
.cheese-case-task b { color:var(--field-accent); }.cheese-case-task p { margin:5px 0; font-size:15px; line-height:1.5; }
.cheese-editor { border:0; padding:0; margin:0; min-width:0; }.cheese-editor:disabled { opacity:.85; }
.cheese-field,.cheese-minutes,.wish-map-grid label,.wish-map-settings label,.wish-after-trial label { display:grid; gap:7px; min-width:0; margin:12px 0; }
.cheese-field>label,.wish-map-grid label,.wish-map-settings label,.cheese-minutes,.wish-after-trial label { font-size:15px; font-weight:600; line-height:1.4; }
.cheese-field textarea,.wish-map-grid textarea,.wish-after-trial textarea { resize:vertical; min-height:74px; }
:is(.cheese-map-board,.personal-wish-map) :is(input:not([type=radio]):not([type=checkbox]),textarea,select) { width:100%; min-width:0; max-width:100%; box-sizing:border-box; color:var(--cream); background:var(--surface); border:1px solid var(--line); border-radius:7px; padding:10px; min-height:44px; font-size:16px; font-weight:400; line-height:1.4; }
.cheese-field details { margin:0 0 4px; }.cheese-field summary,.wish-map-grid summary { font-size:13px; min-height:32px; display:list-item; padding:4px 0; color:var(--field-accent); cursor:pointer; }.cheese-field select { margin:5px 0; }
.cheese-goal-fields,.cheese-next-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }.cheese-next-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
.cheese-instruction { font-size:15px; line-height:1.5; margin:14px 0; }
.cheese-root { max-width:750px; margin:12px auto 0; border:2px solid var(--field-accent); border-radius:12px; padding:14px 18px; text-align:center; background:var(--surface-raised,var(--surface)); position:relative; }.cheese-root span { color:var(--field-accent); font-size:13px; }.cheese-root h3 { font:500 25px/1.3 var(--font-display); margin:6px 0; }.cheese-root p { margin:5px 0; line-height:1.5; overflow-wrap:anywhere; }
.cheese-root:after { content:''; width:2px; height:24px; background:var(--field-accent); position:absolute; left:50%; top:100%; }
.cheese-branches { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; padding-top:46px; position:relative; }
.cheese-branches:before { content:''; position:absolute; top:24px; left:calc(16.666% - 6px); right:calc(16.666% - 6px); height:2px; background:var(--field-accent); }
.cheese-branch { position:relative; padding:14px; border:1px solid var(--line); border-radius:12px; min-width:0; background:var(--surface); }.cheese-branch:before { content:'↓'; position:absolute; top:-25px; left:50%; color:var(--field-accent); line-height:22px; }.cheese-branch.is-chosen { border:2px solid var(--field-accent); padding:13px; }
.cheese-branch header { border-bottom:1px solid var(--line); padding-bottom:8px; }.cheese-branch header>span { color:var(--field-accent); font-size:12px; }.cheese-branch h3 { font:500 22px/1.35 var(--font-display); margin:5px 0; }.cheese-route-pick { display:flex; align-items:center; gap:8px; min-height:44px; font-size:14px; }.cheese-route-pick input,.cheese-checks input { accent-color:var(--field-accent); width:20px; height:20px; flex:0 0 20px; }
.cheese-minutes input { max-width:120px!important; }.cheese-minutes small { font-size:12px; font-weight:400; color:var(--muted); }
.cheese-forks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; position:relative; padding-top:20px; margin-top:10px; }.cheese-forks:before { content:'↙  обходы  ↘'; position:absolute; top:0; left:0; right:0; text-align:center; font-size:13px; color:var(--field-accent); }.cheese-forks>div { border:1px dashed var(--line); border-radius:8px; padding:8px; }.cheese-forks textarea { min-height:100px; }.cheese-forks .cheese-field>label { font-size:13px; }.cheese-forks details summary { font-size:12px; }
.cheese-checks { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; min-width:0; border:1px solid var(--line); padding:14px; border-radius:10px; margin:18px 0; }.cheese-checks legend { color:var(--field-accent); padding:0 6px; }.cheese-checks label { display:flex; gap:8px; align-items:center; line-height:1.5; font-size:14px; min-height:44px; }
.cheese-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; border-top:1px solid var(--line); padding-top:14px; margin-top:16px; }.cheese-actions>span { font-size:13px; line-height:1.5; max-width:65%; }.cheese-errors { border:1px solid var(--coral,#edaa83); border-radius:8px; padding:12px 16px; margin:14px 0; line-height:1.6; }.cheese-errors ul { margin:8px 0; padding-left:22px; }.cheese-legacy { border:1px solid var(--line); padding:12px; margin-bottom:18px; }
.cheese-map-defense { grid-template-rows:auto auto minmax(0,1fr) auto; }.cheese-defense-heading { display:flex; gap:16px; justify-content:space-between; align-items:center; }.cheese-defense-tools { display:flex; flex-wrap:wrap; gap:8px; }.cheese-defense-tools button,.wish-map-settings button,.wish-map-grid button { min-height:44px; padding:8px 12px; color:var(--cream); background:var(--surface); border:1px solid var(--line); border-radius:7px; cursor:pointer; }.cheese-map-defense.is-defense-fullscreen { position:fixed; inset:0; z-index:1000; border-radius:0; padding:20px; background:var(--surface); }
.cheese-node { margin:12px 0; }.cheese-node b { font-size:13px; color:var(--field-accent); }.cheese-node p { font-size:15px; line-height:1.5; margin:4px 0; white-space:pre-wrap; overflow-wrap:anywhere; }.cheese-duration { color:var(--muted); font-size:13px; }.cheese-defense-next { border:1px solid var(--line); padding:14px; border-radius:10px; margin-top:16px; }.cheese-defense-next p { line-height:1.5; white-space:pre-wrap; }.cheese-defense-next h3 { margin-top:0; font:500 24px/1.3 var(--font-display); }
.cheese-map-defense .cheese-root { padding:10px 14px; }.cheese-map-defense .cheese-root h3 { font-size:23px; margin:4px 0; }.cheese-map-defense .cheese-root p { font-size:14px; margin:3px 0; }.cheese-map-defense .cheese-node { margin:8px 0; }.cheese-map-defense .cheese-node p { font-size:14px; line-height:1.4; }.cheese-map-defense .cheese-branch h3 { font-size:20px; }.cheese-map-defense .cheese-forks { gap:8px; }.cheese-map-defense .cheese-case-task { padding:8px 12px; }.cheese-map-defense .cheese-case-task p { font-size:14px; }.cheese-map-defense .cheese-duration { margin:5px 0; }
.cheese-map-defense .defense-timer { display:grid; grid-template-columns:auto auto; gap:6px 12px; padding:10px 14px; border:1px solid var(--field-accent); border-radius:10px; background:var(--surface); flex-shrink:0; }.cheese-map-defense .defense-timer>b { grid-column:2; grid-row:1/3; font-size:clamp(40px,3vw,54px); line-height:1.1; font-variant-numeric:tabular-nums; }.cheese-map-defense .defense-timer>span,.cheese-map-defense .defense-timer>small { font-size:12px; }.cheese-map-defense .defense-timer button { min-height:44px; padding:6px 10px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--cream); }.cheese-map-defense .defense-timer.is-ending { border-color:#ff8a81; animation:cheese-last-seconds 1s ease-in-out infinite alternate; }.cheese-map-defense .defense-timer.is-ending :is(b,small) { color:#ff8a81; }
@keyframes cheese-last-seconds { to { box-shadow:0 0 0 3px #ff8a8155; } }
@media(prefers-reduced-motion:reduce) { .cheese-map-defense .defense-timer.is-ending { animation:none; } }
.personal-shell:has(.personal-wish-map) { height:100%; display:grid; grid-template-rows:minmax(0,1fr); min-height:0; overflow:hidden; }.personal-shell:has(.personal-wish-map)>:is(.private-banner,.game-helper) { display:none; }
.detailed-game .personal-shell:has(.personal-wish-map),.detailed-game .personal-wish-map.board-shell { width:100%; max-width:none; margin:0; }
.detailed-game:has(.personal-wish-map)>.mouse-reactions { display:none; }
.wish-vision>h3,.wish-action-level>h3,.wish-after-trial>h3 { font:500 28px/1.3 var(--font-display); color:var(--field-accent); margin:12px 0; }.wish-vision>p,.wish-action-level>p,.wish-after-trial>p { font-size:15px; line-height:1.55; }.wish-map-settings { display:flex; align-items:end; flex-wrap:wrap; gap:16px; margin-bottom:16px; }.wish-map-settings label { flex:1; min-width:180px; }.wish-map-settings button { margin-bottom:12px; }
.wish-map-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }.wish-map-grid>article { border:1px solid var(--line); border-radius:10px; padding:12px; min-width:0; }.wish-map-grid>article.is-selected { border-color:var(--field-accent); }.wish-card-picture { height:150px; border-radius:6px; background:var(--surface-raised,var(--surface)); display:grid; place-items:center; overflow:hidden; }.wish-card-picture>span { font-size:64px; color:var(--field-accent); }.wish-card-picture img { width:100%; height:100%; object-fit:cover; }
.wish-image-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:10px 0; }.wish-image-gallery button { padding:0; overflow:hidden; }.wish-image-gallery button[aria-pressed=true] { outline:2px solid var(--field-accent); }.wish-image-gallery img { width:100%; height:70px; object-fit:cover; display:block; }.wish-map-grid small { display:block; color:var(--muted); line-height:1.4; font-size:12px; margin:8px 0; }.wish-map-grid .wish-route-button { width:100%; margin-top:12px; border-color:var(--field-accent); font-size:14px; }.wish-map-grid .wish-remove { margin-top:8px; font-size:12px; }
.wish-action-level,.wish-after-trial { margin-top:26px; border-top:1px solid var(--line); padding-top:16px; }.wish-after-trial { display:grid; gap:10px; }
@media(max-width:1100px) { .wish-map-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.cheese-forks { grid-template-columns:minmax(0,1fr); }.cheese-branches { gap:10px; }.cheese-branch { padding:10px; }.cheese-branch.is-chosen { padding:9px; } }
@media(max-width:760px) { .cheese-map-board,.personal-wish-map,.cheese-map-defense { padding:10px; gap:10px; }.cheese-branches { grid-template-columns:minmax(0,1fr); padding-top:26px; gap:28px; }.cheese-branches:before { display:none; }.cheese-root:after { height:20px; }.cheese-branch:before { top:-25px; }.cheese-goal-fields,.cheese-next-fields,.cheese-checks { grid-template-columns:minmax(0,1fr); gap:8px; }.cheese-defense-heading { align-items:start; flex-wrap:wrap; }.cheese-heading h2 { font-size:24px; }.cheese-forks { grid-template-columns:repeat(2,minmax(0,1fr)); }.cheese-actions>span { max-width:100%; }.cheese-workspace { padding-right:4px; }.cheese-branch h3 { font-size:23px; }.cheese-map-defense .defense-timer { width:100%; }.personal-wish-map .cheese-heading p { font-size:12px; } }
@media(max-width:480px) { .wish-map-grid,.cheese-forks { grid-template-columns:minmax(0,1fr); }.wish-map-settings { gap:4px; }.wish-map-settings label { min-width:100%; }.cheese-actions .button { width:100%; }.wish-card-picture { height:180px; } }
@media(max-width:760px) { .detailed-game:has(.personal-wish-map,.cheese-map-board,.cheese-map-defense) .mode-track { grid-template-columns:repeat(4,minmax(0,1fr)); overflow:visible; }.detailed-game:has(.personal-wish-map,.cheese-map-board,.cheese-map-defense) .mode-track button { min-width:0; padding:5px 2px; font-size:10px; } }
@media(max-width:760px) { .detailed-game:has(.cheese-map-board,.cheese-map-defense)>.mouse-reactions { display:none; }.wish-vision>h3,.wish-action-level>h3,.wish-after-trial>h3 { font-size:23px; }.wish-action-level>p { font-size:14px; } }
@media print { .cheese-print { --surface:white; --surface-raised:white; --cream:black; --muted:#333; --line:#aaa; --field-accent:#795710; }.cheese-print .cheese-root { max-width:100%; }.cheese-print .cheese-branches { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }.cheese-print .cheese-branch { padding:8px; break-inside:avoid; }.cheese-print .cheese-branch h3 { font-size:16px; }.cheese-print .cheese-node p { font-size:11px; }.cheese-print .cheese-forks { grid-template-columns:minmax(0,1fr); gap:2px; }.cheese-print .cheese-forks>div { padding:4px; }.cheese-print .wish-map-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.cheese-print .wish-map-grid>article { break-inside:avoid; }.cheese-print .wish-map-grid img { width:100%; height:110px; object-fit:contain; }.cheese-print p { white-space:pre-wrap; overflow-wrap:anywhere; } }
/* All joints share the branch grid's coordinates, not font-glyph metrics.
   The mobile rail connects alternatives to one root, never card 1 to card 2. */
@media screen {
  .cheese-tree .cheese-root::after { display:none; }
  .cheese-tree .cheese-branches { --cheese-link-gap:18px; gap:var(--cheese-link-gap); padding-top:32px; }
  .cheese-tree .cheese-branches::before,
  .cheese-tree .cheese-branches::after,
  .cheese-tree .cheese-branch::before,
  .cheese-tree .cheese-branch::after { content:''; position:absolute; box-sizing:border-box; pointer-events:none; }
  .cheese-tree .cheese-branches::before { display:block; top:16px; left:calc((100% - 2 * var(--cheese-link-gap)) / 6); right:calc((100% - 2 * var(--cheese-link-gap)) / 6); height:2px; background:var(--field-accent); }
  .cheese-tree .cheese-branches::after { top:0; left:50%; width:2px; height:18px; transform:translateX(-50%); background:var(--field-accent); }
  .cheese-tree .cheese-branch { --cheese-card-border:1px; }
  .cheese-tree .cheese-branch.is-chosen { --cheese-card-border:2px; }
  .cheese-tree .cheese-branch::before { top:calc(-16px - var(--cheese-card-border)); left:50%; width:2px; height:16px; transform:translateX(-50%); background:var(--field-accent); }
  .cheese-tree .cheese-branch::after { top:calc(-6px - var(--cheese-card-border)); left:50%; width:0; height:0; transform:translateX(-50%); border-left:4px solid transparent; border-right:4px solid transparent; border-top:6px solid var(--field-accent); }
}
@media screen and (max-width:1100px) {
  .cheese-tree .cheese-branches { --cheese-link-gap:10px; }
}
@media screen and (max-width:760px) {
  .cheese-tree .cheese-branches { --cheese-link-gap:24px; padding-top:28px; padding-left:20px; }
  .cheese-tree .cheese-branches::before { top:16px; left:0; right:auto; width:calc(50% + 1px); height:36px; border-top:2px solid var(--field-accent); border-left:2px solid var(--field-accent); background:none; }
  .cheese-tree .cheese-branches::after { height:18px; }
  .cheese-tree .cheese-branch::before { top:calc(24px - var(--cheese-card-border)); left:calc(-20px - var(--cheese-card-border)); width:20px; height:calc(100% + var(--cheese-link-gap) + 2 * var(--cheese-card-border)); transform:none; border-top:2px solid var(--field-accent); border-left:2px solid var(--field-accent); background:none; }
  .cheese-tree .cheese-branch:last-child::before { height:2px; border-left:0; }
  .cheese-tree .cheese-branch::after { top:calc(20px - var(--cheese-card-border)); left:calc(-6px - var(--cheese-card-border)); transform:none; border:0; border-top:4px solid transparent; border-bottom:4px solid transparent; border-left:6px solid var(--field-accent); }
}
.fog-goal-board,.fog-goal-defense { display:grid; grid-template-rows:auto auto minmax(0,1fr); min-width:0; min-height:0; height:100%; gap:12px; padding:18px; border:1px solid var(--line); border-radius:12px; color:var(--cream); background:var(--surface); }
.detailed-game .fog-goal-board.board-shell { max-width:none; width:100%; margin:0; }
.fog-brief { grid-template-rows:auto minmax(0,1fr); }.fog-brief-grid { display:grid; grid-template-columns:minmax(200px,30%) minmax(0,1fr); align-items:start; gap:24px; }.fog-brief-grid>img { width:100%; max-height:560px; object-fit:contain; border-radius:10px; }.fog-brief-grid h3 { font:500 32px/1.2 var(--font-display); margin:0 0 14px; color:var(--field-accent); }.fog-brief-grid p { font-size:18px; line-height:1.6; }
.fog-heading h2 { font:500 clamp(24px,2vw,34px)/1.25 var(--font-display); color:var(--field-accent); margin:5px 0; }.fog-heading p { font-size:14px; line-height:1.45; margin:5px 0; }
.fog-task-strip { padding:10px 14px; border:1px solid var(--field-accent); border-radius:9px; background:var(--surface-raised,var(--surface)); font-size:15px; line-height:1.5; }.fog-task-strip>b { color:var(--field-accent); }.fog-task-strip small { display:block; font-size:13px; margin:4px 0; }.fog-task-strip p { margin:5px 0; }.fog-task-strip summary { cursor:pointer; color:var(--field-accent); }
.fog-workspace { overflow:auto; min-height:0; min-width:0; padding:0 8px 14px 0; scrollbar-gutter:stable; overscroll-behavior:contain; }
.fog-editor { border:0; padding:0; margin:0; min-width:0; }.fog-editor>h3,.fog-alternatives h3,.fog-notes h3,.fog-alternative-proof h3 { font:500 25px/1.3 var(--font-display); color:var(--field-accent); margin:20px 0 6px; }.fog-editor p { font-size:15px; line-height:1.5; }
.fog-fields,.fog-models { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.fog-answer { display:grid; gap:7px; margin:10px 0; min-width:0; }.fog-answer>label,.fog-dates label,.fog-alternatives label { font-size:15px; font-weight:600; line-height:1.4; }.fog-answer textarea { resize:vertical; min-height:78px; }
.fog-goal-board :is(textarea,select,input:not([type=checkbox])) { box-sizing:border-box; width:100%; min-width:0; max-width:100%; min-height:44px; padding:10px; border:1px solid var(--line); border-radius:7px; color:var(--cream); background:var(--surface); font-family:inherit; font-weight:400; font-size:16px; line-height:1.4; }
.fog-answer summary,.fog-proof-grid summary { color:var(--field-accent); font-size:13px; min-height:32px; padding:4px 0; cursor:pointer; }.fog-answer select { margin-top:5px; }.fog-dates { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:16px 0; }.fog-dates label,.fog-alternatives article>label { display:grid; gap:7px; }
.fog-date-presets { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:10px 0; }.fog-date-presets>span,.fog-date-presets>small { font-size:13px; line-height:1.5; }.fog-date-presets>small { flex-basis:100%; color:var(--muted); }.fog-date-presets button { min-height:44px; padding:8px 12px; color:var(--cream); border:1px solid var(--line); background:var(--surface); border-radius:7px; }.fog-date-presets button[aria-pressed=true] { border-color:var(--field-accent); color:var(--field-accent); }
.fog-alternatives article,.fog-alternative-proof article { border:1px solid var(--line); border-radius:10px; padding:14px; min-width:0; }.fog-alternatives,.fog-notes { margin:16px 0; }.fog-model { border:1px solid var(--field-accent); border-radius:10px; padding:12px; min-width:0; }.fog-model legend { color:var(--field-accent); font-size:20px; padding:0 7px; }.fog-check { border-bottom:1px solid var(--line); padding:12px 0; }.fog-check:last-child { border:0; }.fog-check>b { color:var(--field-accent); font-size:15px; }.fog-check p { font-size:15px; margin:5px 0; }.fog-check blockquote { margin:8px 0; padding:8px 10px; border-left:2px solid var(--field-accent); font-size:14px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }.fog-check small { display:block; color:var(--muted); line-height:1.5; font-size:12px; }.fog-check label { display:flex; align-items:center; gap:8px; min-height:44px; font-size:14px; }.fog-check input { width:20px; height:20px; flex:0 0 20px; accent-color:var(--field-accent); }
.fog-errors { border:1px solid var(--coral,#d99474); border-radius:8px; padding:12px 16px; margin:14px 0; font-size:15px; line-height:1.5; }.fog-errors ul { padding-left:22px; }.fog-actions { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; border-top:1px solid var(--line); padding-top:12px; }.fog-actions>span { font-size:13px; line-height:1.5; max-width:65%; }.fog-legacy { border:1px solid var(--line); padding:12px; margin:10px 0; }
.fog-goal-board .fog-error-link{border:0;background:transparent;color:inherit;font:inherit;text-align:left;text-decoration:underline;text-underline-offset:3px;min-height:40px;padding:4px 0;cursor:pointer;white-space:normal}
.fog-goal-board textarea[aria-invalid=true]{border-color:var(--coral,#d99474);outline:1px solid var(--coral,#d99474)}
.fog-goal-defense { grid-template-rows:auto auto minmax(0,1fr) auto; }.fog-goal-defense.is-defense-fullscreen { position:fixed; inset:0; z-index:1000; border-radius:0; background:var(--surface); }.fog-defense-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }.fog-defense-tools { display:flex; flex-wrap:wrap; gap:8px; }.fog-defense-tools button,.fog-goal-defense .defense-timer button { min-height:44px; border:1px solid var(--line); border-radius:6px; padding:8px 12px; background:var(--surface); color:var(--cream); }
.fog-proof-flow { margin:14px 0; padding:10px; border:1px solid var(--field-accent); border-radius:8px; color:var(--field-accent); line-height:1.5; }.fog-proof-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.fog-proof-grid article { padding:12px; border:1px solid var(--line); border-radius:9px; min-width:0; }.fog-proof-grid .is-goal { border-color:var(--field-accent); }.fog-proof-grid h3 { color:var(--field-accent); font:500 20px/1.3 var(--font-display); margin:0 0 6px; }.fog-proof-grid p,.fog-alternative-proof p { margin:5px 0; font-size:15px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }.fog-proof-grid ul { padding-left:20px; font-size:14px; line-height:1.5; }.fog-alternative-proof { margin:18px 0; }.fog-alternative-proof article { margin:8px 0; }
.fog-goal-defense .defense-timer { display:grid; grid-template-columns:auto auto; gap:6px 12px; padding:10px 14px; border:1px solid var(--field-accent); border-radius:10px; flex-shrink:0; background:var(--surface); }.fog-goal-defense .defense-timer>b { grid-column:2; grid-row:1/3; font-size:clamp(40px,3vw,54px); line-height:1.1; font-variant-numeric:tabular-nums; }.fog-goal-defense .defense-timer>span,.fog-goal-defense .defense-timer>small { font-size:12px; }.fog-goal-defense .defense-timer.is-ending { border-color:#ff8a81; animation:fog-last-seconds 1s ease-in-out infinite alternate; }.fog-goal-defense .defense-timer.is-ending :is(b,small) { color:#ff8a81; }
@keyframes fog-last-seconds { to { box-shadow:0 0 0 3px #ff8a8155; } }
@media(prefers-reduced-motion:reduce) { .fog-goal-defense .defense-timer.is-ending { animation:none; } }
.personal-shell:has(.fog-goal-board) { height:100%; display:grid; grid-template-rows:minmax(0,1fr); min-height:0; overflow:hidden; }.personal-shell:has(.fog-goal-board)>:is(.private-banner,.game-helper) { display:none; }.detailed-game .personal-shell:has(.fog-goal-board) { max-width:none; width:100%; margin:0; }.detailed-game:has(.fog-goal-board.is-personal)>.mouse-reactions { display:none; }
@media(max-width:760px) { .fog-goal-board,.fog-goal-defense { padding:10px; gap:8px; }.fog-fields,.fog-models,.fog-dates,.fog-proof-grid { grid-template-columns:minmax(0,1fr); gap:8px; }.fog-defense-heading { align-items:start; flex-wrap:wrap; }.fog-goal-defense .defense-timer { width:100%; }.fog-heading h2 { font-size:23px; }.fog-task-strip { font-size:13px; padding:7px 10px; }.fog-task-strip small { font-size:11px; }.fog-heading p { font-size:12px; }.fog-actions>span { max-width:100%; }.fog-actions .button { width:100%; }.detailed-game:has(.fog-goal-board,.fog-goal-defense)>.mouse-reactions { display:none; }.detailed-game:has(.fog-goal-board,.fog-goal-defense) .mode-track { grid-template-columns:repeat(4,minmax(0,1fr)); overflow:visible; }.detailed-game:has(.fog-goal-board,.fog-goal-defense) .mode-track button { min-width:0; padding:5px 2px; font-size:10px; } }
@media print { .fog-print { --surface:white; --cream:black; --muted:#333; --line:#aaa; --field-accent:#795710; }.fog-print .fog-proof-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.fog-print .fog-models { grid-template-columns:repeat(2,minmax(0,1fr)); }.fog-print :is(article,.fog-check) { break-inside:avoid; }.fog-print :is(p,blockquote) { font-size:11px; }.fog-print details { display:none; }.fog-print .fog-model legend { font-size:16px; } }
@media(max-width:760px) { .fog-brief-grid { grid-template-columns:minmax(0,1fr); gap:14px; }.fog-brief-grid>img { height:220px; }.fog-brief-grid p { font-size:15px; } }
.admission-workspace { display: grid; gap: 24px; min-width: 0; color: var(--cream, #eadcc3); font-family: var(--font-ui); }
.admission-workspace :is(h2,h3,h4), .exam-settings h2 { font-family: var(--font-display); color: var(--gold, #d7ac66); }
.admission-workspace h2 { font-size: clamp(26px,3vw,36px); line-height: 1.2; }
.admission-workspace p, .exam-settings p { line-height: 1.55; }
.admission-workspace summary { padding: 12px 0; cursor: pointer; color: var(--gold, #d7ac66); font-weight: 600; }
.admission-workspace :is(input,select,textarea), .exam-settings :is(input,select) { width: 100%; min-width: 0; min-height: 44px; padding: 9px; border: 1px solid var(--border, #695538); border-radius: 6px; background: #121318; color: var(--cream, #eadcc3); font: 15px/1.4 var(--font-ui); }
.admission-workspace :is(input,select,textarea,button):focus-visible, .exam-settings :is(input,select,button):focus-visible { outline: 2px solid var(--gold, #d7ac66); outline-offset: 3px; }
.admission-workspace label, .exam-settings label { display: grid; gap: 7px; min-width: 0; font-size: 14px; line-height: 1.4; }
.admission-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.admission-criteria { display: grid; gap: 10px; }
.admission-criteria > div { display: grid; grid-template-columns: minmax(0,1fr) 90px 150px; gap: 12px; align-items: end; }
.admission-workspace .admission-check, .exam-settings .admission-check { display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.admission-check input[type='checkbox'] { width: 20px; min-height: 20px; flex: 0 0 20px; accent-color: var(--gold, #d7ac66); }
.admission-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 24px; }
.admission-layout > nav { align-self: start; max-height: 70vh; overflow-y: auto; padding-right: 8px; }
.admission-layout nav h3 { font-size: 19px; }
.admission-layout nav button { display: block; width: 100%; min-height: 44px; padding: 10px; margin-bottom: 6px; border: 1px solid var(--border, #695538); border-radius: 6px; background: #121318; color: var(--cream, #eadcc3); text-align: left; font: 14px/1.4 var(--font-ui); overflow-wrap: anywhere; }
.admission-layout nav [aria-current='page'] { background: #423020; border-color: var(--gold, #d7ac66); }
.admission-editor { min-width: 0; display: grid; gap: 18px; }
.admission-requirements { display: grid; gap: 10px; }
.admission-requirements > div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; }
.admission-subjects { display: grid; gap: 12px; }
.admission-subjects > div { display: grid; grid-template-columns: minmax(150px,1.4fr) 1fr 1fr 1.2fr 1fr; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border, #695538); }
.admission-comparison { min-width: 0; }
.admission-comparison > header { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.admission-print-sheet { overflow-x: auto; margin: 16px 0; }
.admission-print-sheet h1 { font: 600 25px/1.3 var(--font-display); }
.admission-print-sheet table { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 13px; }
.admission-print-sheet :is(th,td) { padding: 10px; border: 1px solid var(--border, #695538); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.admission-print-sheet th { color: var(--gold, #d7ac66); }
.admission-notice { padding: 12px; border-left: 2px solid var(--gold, #d7ac66); }
.msu-picker, .msu-facts { display: grid; gap: 14px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel, #111217); min-width: 0; }
.msu-picker :is(h4,p), .msu-facts :is(h4,p) { margin: 0; }
.msu-picker h4, .msu-facts h4 { font-size: 22px; line-height: 1.3; }
.msu-history { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.msu-history > div { display: grid; gap: 5px; padding: 14px 10px; border-block: 1px solid var(--border); text-align: center; }
.msu-history strong { color: var(--gold); font: 600 32px/1.2 var(--font-display); }
.msu-history span { font-size: 14px; }
.msu-minimums { list-style: none; margin: 0; padding: 0; display: grid; }
.msu-minimums li { display: flex; gap: 12px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); line-height: 1.5; }
.msu-minimums strong { font-size: 14px; text-align: right; }
.msu-source-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.msu-source-links a { color: var(--gold); text-underline-offset: 4px; line-height: 1.5; overflow-wrap: anywhere; }
.admission-workspace [readonly] { border-style: dashed; }
.exam-countdown { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 14px 18px; margin-block: 12px; border: 1px solid var(--border, #695538); border-radius: 8px; background: #171619; }
.exam-countdown b { color: var(--gold, #d7ac66); font: 600 21px/1.3 var(--font-display); }
.exam-countdown span { font-size: 14px; color: var(--cream, #eadcc3); }
.exam-countdown a { margin-left: auto; color: var(--gold, #d7ac66); }
.detailed-game .admission-workspace { padding: 22px; overflow-y: auto; min-height: 0; }
.detailed-game.detailed-game .personal-shell:has(.admission-workspace) { display: flex; flex-direction: column; overflow: hidden; }
.personal-shell:has(.admission-workspace) > .admission-workspace { flex: 1 1 auto; }
.project-admission-table > summary { min-height: 44px; cursor: pointer; color: var(--gold); font: 600 22px/1.4 var(--font-display); }
.project-admission-table .exam-countdown { display: none; }
.mouse-academy-dashboard > .exam-countdown { grid-column: 1 / -1; }
.admission-print-portal { display: none; }
.admission-workspace { gap: 16px; }
.admission-workspace > *, .admission-stage > * { min-width: 0; }
.admission-stage .admission-print-sheet table { min-width: var(--admission-table-min,800px); }
.admission-stage .admission-print-sheet tbody th { position: sticky; left: 0; z-index: 1; }
.admission-stage .admission-print-sheet tr > :first-child { width: 160px; }
.admission-workspace-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.admission-workspace-heading h2 { margin: 6px 0 0; font-size: clamp(25px,2.4vw,32px); }
.admission-private-note, .admission-help, .admission-save-status { color: var(--muted, #b9af9e); font-size: 13px; }
.admission-private-note { text-align: right; max-width: 220px; }
.admission-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; }
.admission-steps button, .admission-option-tabs button, .admission-plan-tabs button { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px; color: var(--cream); background: var(--panel,#111217); border: 1px solid var(--border); border-radius: 8px; text-align: left; font: 500 14px/1.3 var(--font-ui); cursor: pointer; }
.admission-steps button span, .admission-option-tabs button b, .admission-plan-tabs button b { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; color: var(--gold); font-weight: 600; }
.admission-steps button[aria-current], .admission-option-tabs button[aria-current], .admission-plan-tabs button[aria-current] { background: linear-gradient(120deg,#3a2b1e,#201c18); border-color: var(--gold); }
.admission-steps [aria-current] span, .admission-plan-tabs [aria-current] b { background: var(--gold); border-color: var(--gold); color: #171411; }
.admission-stage { display: grid; gap: 18px; min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 10px; background: rgba(14,15,18,.94); }
.admission-stage :is(h3,h4,p) { margin: 0; }
.admission-stage h3 { font-size: 26px; }
.admission-stage h4 { font-size: 22px; }
.admission-section-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.admission-workspace .admission-criteria > div { grid-template-columns: 44px minmax(0,1fr) 90px 150px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.admission-criteria > .is-selected { background: rgba(215,172,102,.06); }
.admission-option-tabs { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; }
.admission-option-tabs button { min-width: 0; align-items: start; }
.admission-option-tabs button span { min-width: 0; overflow-wrap: anywhere; }
.admission-option-tabs small { display: block; margin-top: 6px; font-weight: 400; color: var(--muted); font-size: 12px; }
.admission-editor > section { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--border); }
.admission-identity { grid-template-columns: repeat(3,minmax(0,1fr)); }
.admission-workspace .msu-picker { padding: 14px; gap: 10px; background: #19191c; }
.msu-picker p { font-size: 13px; color: var(--muted); }
.msu-picker h4 { font-size: 21px; }
.admission-requirements { grid-template-columns: repeat(2,minmax(0,1fr)); }
.admission-requirements > div { padding: 12px; grid-template-columns: minmax(100px,.85fr) minmax(0,1.15fr); border: 1px solid var(--border); border-radius: 8px; align-items: start; }
.admission-requirements > div > div { display: grid; gap: 6px; }
.admission-minimum-note { font-size: 12px !important; }
.admission-minimum-note input { min-height: 38px; font-size: 12px; }
.admission-requirements small { color: var(--muted); line-height: 1.4; }
.admission-history-block { display: grid; gap: 12px; }
.admission-history-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: linear-gradient(180deg,#202023,#141519); }
.admission-history-grid > div { display: grid; gap: 10px; padding: 16px; text-align: center; border-right: 1px solid var(--border); }
.admission-history-grid > div:last-child { border: 0; }
.admission-history-grid strong { font: 600 38px/1.15 var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }
.admission-year { font-size: 15px; color: var(--cream); }
.admission-trend { font-size: 13px; }
.admission-trend.rise, .admission-warning { color: #f0a29a; }
.admission-trend.fall { color: #a5d9b7; }
.admission-year-note { padding: 10px 14px; border-left: 2px solid var(--gold); font-size: 13px; line-height: 1.5; }
.admission-ratings { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.admission-score-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.admission-workspace fieldset { margin: 0; padding: 16px; min-width: 0; border: 1px solid var(--border); border-radius: 8px; }
.admission-workspace legend { padding: 0 8px; color: var(--gold); font: 600 18px var(--font-display); }
.admission-score-result { display: grid; gap: 8px; padding: 14px; border-left: 2px solid var(--gold); background: #19191c; }
.admission-stage .admission-print-sheet { max-height: 75vh; overflow: auto; margin: 0; border: 1px solid var(--border); border-radius: 8px; }
.admission-print-sheet :is(th,td) { white-space: pre-line; padding: 8px; }
.admission-stage .admission-print-sheet h1 { display: none; }
.admission-stage .admission-print-sheet thead { position: sticky; top: 0; z-index: 2; background: #292219; }
.admission-stage .admission-print-sheet tbody th { background: #19191c; }
.admission-priority-cell { background: rgba(215,172,102,.08); }
.admission-preserved { white-space: pre-wrap; }
.admission-plan { display: grid; gap: 18px; min-width: 0; }
.admission-plan-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.admission-plan-program, .admission-plan > section { display: grid; gap: 16px; padding-top: 16px; border-top: 1px solid var(--border); min-width: 0; }
.admission-targets { display: grid; gap: 10px; }
.admission-targets > div { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(110px,.7fr) minmax(0,1fr); gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.admission-targets p { font-size: 13px; color: var(--muted); }
.admission-plan-total { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; background: #211d18; border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
.admission-plan-total > div { display: grid; gap: 8px; }
.admission-plan-total span { font-size: 13px; }
.admission-plan-total strong { font: 600 24px/1.3 var(--font-display); color: var(--gold); }
.admission-resources { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.admission-budget { padding: 18px; background: #211d18; border: 1px solid var(--gold); border-radius: 8px; display: grid; gap: 8px; }
.admission-budget strong { font: 600 30px var(--font-display); color: var(--gold); }
.admission-budget p { font-size: 13px; color: var(--muted); }
.admission-stage-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.admission-stage-footer span { font-size: 13px; color: var(--muted); text-align: center; }
.admission-save-status { margin: 0; min-height: 22px; }
@media(max-width:1050px) {
  .admission-steps button { flex-direction: column; align-items: start; font-size: 12px; }
  .admission-identity, .admission-ratings { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admission-requirements { grid-template-columns: 1fr; }
  .admission-score-grid, .admission-resources { grid-template-columns: 1fr; }
}
@media(max-width:700px) {
  .admission-workspace-heading { align-items: start; flex-direction: column; gap: 8px; }
  .admission-private-note { text-align: left; max-width: none; }
  .admission-steps { grid-template-columns: repeat(5,130px); overflow-x: auto; padding-bottom: 5px; }
  .admission-stage { padding: 14px; }
  .admission-workspace .admission-criteria > div { grid-template-columns: 32px minmax(0,1fr) 65px; gap: 8px; padding: 8px; }
  .admission-workspace .admission-criteria .admission-check:last-child { grid-column: 2 / -1; }
  .admission-workspace .admission-criteria .admission-check:first-child { grid-column: auto; }
  .admission-identity, .admission-ratings { grid-template-columns: 1fr; }
  .admission-history-grid > div { padding: 10px 6px; }
  .admission-history-grid strong { font-size: 30px; }
  .admission-trend { font-size: 11px; }
  .admission-plan-tabs { grid-template-columns: 1fr; }
  .admission-targets > div { grid-template-columns: 1fr; gap: 10px; }
  .admission-plan-total { gap: 8px; padding: 10px; }
  .admission-plan-total strong { font-size: 18px; }
  .admission-stage-footer .button { padding: 10px; font-size: 13px; }
}
@media(max-width:1000px) { .admission-subjects > div { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) {
  .msu-picker, .msu-facts { padding: 14px; }
  .msu-minimums li { flex-direction: column; gap: 4px; }
  .msu-minimums strong { text-align: left; }
  .admission-layout, .admission-fields, .admission-requirements > div { grid-template-columns: minmax(0,1fr); }
  .admission-layout > nav { max-height: 220px; }
  .admission-criteria > div { grid-template-columns: minmax(0,1fr) 70px; }
  .admission-criteria .admission-check { grid-column: 1 / -1; }
  .admission-print-sheet table { min-width: 600px; }
  .detailed-game .admission-workspace { padding: 14px; }
}
@media print {
  body:has(> .admission-print-portal) > :not(.admission-print-portal) { display: none !important; }
  .admission-print-portal { display: block; color: black; font: 9pt var(--font-ui); page: admission-comparison; }
  .admission-print-portal .admission-print-sheet { overflow: visible; margin: 0; }
  .admission-print-portal table { width: 100%; }
  .admission-print-portal table { min-width: 0; font-size: 9pt; }
  .admission-print-portal :is(h1,th,td) { color: black; border-color: #999; }
  .admission-print-portal :is(th,td) { padding: 5px; }
  .admission-print-portal tr { break-inside: avoid; }
  .admission-print-portal p { margin: 4px 0; }
  @page admission-comparison { size: A3 landscape; margin: 9mm; }
}
.simple-admission-route{max-width:1100px;margin:auto;background:#15131b;color:#eadfc8;border:1px solid #7d653d;border-radius:16px;padding:clamp(16px,3vw,28px);line-height:1.6;min-width:0}.simple-admission-route h2,.simple-admission-route h3,.simple-admission-route h4{color:#e2bf79}.simple-admission-route h2{font-size:clamp(25px,4vw,34px)}.simple-admission-route h3{font-size:23px}.simple-admission-route nav{display:flex;overflow-x:auto;gap:8px;padding:16px 0;scrollbar-width:thin}.simple-admission-route nav button{flex-shrink:0;background:#201c24;color:#f1e2c5;border:1px solid #80673e;border-radius:8px;padding:10px 14px;font:inherit;min-height:44px}.simple-admission-route nav [aria-current],.simple-admission-route [aria-pressed=true]{background:#d4ad65;color:#19141a}.route-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:16px 0}.simple-admission-route label,.simple-admission-route .choice-with-custom{display:grid;gap:8px;align-content:start}.simple-admission-route input,.simple-admission-route select,.simple-admission-route textarea{box-sizing:border-box;width:100%;max-width:100%;min-height:44px;padding:12px;border:1px solid #78603a;border-radius:8px;background:#0f1016;color:#f5e7cb;font:inherit}.simple-admission-route textarea{resize:vertical}.simple-admission-route fieldset{min-width:0;border:1px solid #594b33;border-radius:12px;margin:18px 0;padding:16px}.simple-admission-route legend{color:#e2bf79;padding:0 8px}.route-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.route-values label{grid-template-columns:1fr 95px;align-items:center;border-bottom:1px solid #423728;padding:8px}.route-program-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.route-program-tabs button{min-height:44px;padding:10px;border:1px solid #79613e;border-radius:8px;background:#26212b;color:#eadfc8}.route-resource{display:grid;grid-template-columns:2fr 1fr;gap:16px;padding:16px 0;border-bottom:1px solid #463b2a}.route-calculation{padding:18px;background:#26231c;border-left:3px solid #d4ad65;display:grid;gap:8px}.route-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.route-summary-grid article{padding:16px;border:1px solid #74603f;border-radius:10px;overflow-wrap:anywhere}.simple-admission-route footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 16px}.simple-admission-route button{min-height:44px;cursor:pointer}.simple-admission-route [role=alert]{color:#f3b5a6}.simple-admission-route details{border-top:1px solid #74603f;padding-top:16px}@media(max-width:600px){.simple-admission-route{font-size:16px}.route-fields,.route-values,.route-resource{grid-template-columns:1fr}.simple-admission-route h3{font-size:21px}.route-values label{grid-template-columns:1fr 85px}.route-summary-grid{grid-template-columns:1fr}.simple-admission-route fieldset{padding:12px}.simple-admission-route footer button{padding:10px}}
.detailed-stage .simple-admission-route{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow-wrap:anywhere}.simple-admission-route>*{min-width:0}.simple-admission-route h2,.simple-admission-route h3{white-space:normal}.simple-admission-route nav{max-width:100%;box-sizing:border-box}

@media(max-width:600px){
 .simple-admission-route nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;}
 .simple-admission-route nav button{min-width:0;padding:10px 8px;text-align:left;overflow-wrap:anywhere;font-size:14px;}
 .simple-admission-route nav button:last-child{grid-column:1/-1;}
}
/* Keep named stops and answers readable instead of cropping a tall illustration
   into a 150px panorama. Scoped to the case map, including the game portal. */
.detailed-game.detailed-game.detailed-game .game-page-block .burrow-live-map .burrow-map-scene {
  position: relative; isolation: isolate; height: auto; min-height: 0;
  aspect-ratio: auto; overflow: hidden; padding: 18px; border-radius: 12px;
  background: var(--panel, #101114);
}
.detailed-game .burrow-live-map .burrow-map-scene > img {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%;
  object-fit: cover; opacity: .22;
}
.detailed-game .burrow-live-map .burrow-map-canvas {
  position: relative; inset: auto; display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  grid-template-areas: 's1 s2 s3' 's6 s5 s4';
}
.detailed-game .burrow-map-canvas > button:nth-child(1) { grid-area: s1; }
.detailed-game .burrow-map-canvas > button:nth-child(2) { grid-area: s2; }
.detailed-game .burrow-map-canvas > button:nth-child(3) { grid-area: s3; }
.detailed-game .burrow-map-canvas > button:nth-child(4) { grid-area: s4; }
.detailed-game .burrow-map-canvas > button:nth-child(5) { grid-area: s5; }
.detailed-game .burrow-map-canvas > button:nth-child(6) { grid-area: s6; }
.detailed-game .burrow-live-map .burrow-map-canvas > button {
  position: relative; inset: auto; transform: none; width: auto; height: auto;
  min-height: 128px; display: flex; gap: 10px; align-items: flex-start;
  padding: 14px; border: 1px solid var(--border, #695538); border-radius: 10px;
  background: rgba(12, 13, 17, .94); color: var(--cream, #efdec0); text-align: left;
  box-shadow: none;
}
.detailed-game .burrow-live-map .burrow-map-canvas > button:not(:last-child)::after {
  content: '→'; position: absolute; right: -17px; top: 44%;
  width: 18px; height: 18px; line-height: 18px; z-index: 2;
  color: var(--gold, #d7ac66); font-size: 20px;
}
.detailed-game .burrow-live-map .burrow-map-canvas > button.is-current {
  border-color: var(--gold, #d7ac66); background: rgba(67, 44, 26, .96); animation: none;
}
.detailed-game.detailed-game .burrow-live-map .burrow-map-canvas > button { inset: auto; transform: none; }
.detailed-game.detailed-game .burrow-live-map .burrow-map-canvas > button:hover { transform: none; }
.detailed-game .burrow-live-map .burrow-map-canvas > button:nth-child(3)::after { content: '↓'; top: auto; bottom: -19px; right: 50%; }
.detailed-game .burrow-live-map .burrow-map-canvas > button:nth-child(4)::after,
.detailed-game .burrow-live-map .burrow-map-canvas > button:nth-child(5)::after { content: '←'; left: -17px; right: auto; }
.detailed-game.detailed-game.is-stage-defense { grid-template-rows: auto auto minmax(0,1fr); }
.detailed-game .burrow-live-map .burrow-map-canvas > button.is-locked { opacity: 1; cursor: default; }
.detailed-game .burrow-live-map .burrow-map-number {
  flex: 0 0 30px; width: 30px; height: 30px; font-size: 16px; border-width: 1px;
}
.detailed-game .burrow-map-stop { min-width: 0; display: grid; gap: 6px; }
.detailed-game .burrow-map-stop small { color: var(--gold, #d7ac66); font: 12px/1.3 var(--font-ui); }
.detailed-game .burrow-map-stop b { font: 600 18px/1.2 var(--font-display); }
.detailed-game .burrow-map-stop > span { color: var(--cream, #efdec0); font: 14px/1.4 var(--font-ui); overflow-wrap: anywhere; }
.detailed-game .burrow-map-lock { flex: 0 0 14px; width: 14px; height: 14px; color: var(--gold, #d7ac66); }
.detailed-game .burrow-map-canvas > button:focus-visible { outline: 2px solid var(--gold, #d7ac66); outline-offset: 3px; }
.detailed-game .burrow-live-map .burrow-map-header p { display: block; }
.detailed-game .game-pages-index { overflow-y: auto; }
@media (max-width: 1000px) {
  .detailed-game .burrow-live-map .burrow-map-canvas { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: 's1 s2' 's4 s3' 's5 s6'; }
  .detailed-game .burrow-live-map .burrow-map-canvas > button:nth-child(3)::after { content: '←'; top: 44%; bottom: auto; left: -17px; right: auto; }
  .detailed-game .burrow-live-map .burrow-map-canvas > button:nth-child(5)::after { content: '→'; left: auto; right: -17px; }
  .detailed-game .burrow-live-map .burrow-map-canvas > button:nth-child(2n):not(:last-child)::after { content: '↓'; top: auto; bottom: -19px; left: auto; right: 50%; }
}
@media (max-width: 600px) {
  .detailed-game .burrow-live-map .burrow-map-scene { padding: 10px; }
  .detailed-game .burrow-live-map .burrow-map-canvas { grid-template-columns: minmax(0, 1fr); grid-template-areas: 's1' 's2' 's3' 's4' 's5' 's6'; gap: 14px; }
  .detailed-game .burrow-live-map .burrow-map-canvas > button { min-height: 100px; }
  .detailed-game.detailed-game .burrow-live-map .burrow-map-canvas > button:not(:last-child)::after { content: '↓'; top: auto; bottom: -16px; left: auto; right: 50%; }
}
/* The case owns the available height; secondary tools stay in its toolbar. */
.detailed-game.is-burrow-session .detailed-header { min-height: 48px; padding: 6px 12px; gap: 8px; }
.detailed-game.is-burrow-session .detailed-header > div > span,
.detailed-game.is-burrow-session .detailed-header em,
.detailed-game.is-burrow-session .game-xp,
.detailed-game.is-burrow-session .game-test-label { display: none; }
.detailed-game.is-burrow-session .mode-track { grid-template-columns: repeat(3,minmax(0,1fr)); }
.detailed-game.is-burrow-session .mode-track button { min-height: 44px; padding: 6px 8px; font-size: 13px; }
.detailed-game.is-burrow-session .mode-track button > span { display: none; }
.detailed-game.is-burrow-session .detailed-stage { padding: 6px; }
.detailed-game.is-burrow-session .detailed-footer { min-height: 44px; padding: 2px 8px; }
.detailed-game.is-burrow-session .detailed-footer > p { display: none; }
.detailed-game.is-burrow-session .burrow-reaction-tools { position: absolute; right: 10px; bottom: 6px; z-index: 131; }
.detailed-game.is-burrow-session .burrow-reaction-tools > summary { min-height: 44px; display: flex; align-items: center; padding: 6px 12px; color: var(--cream); border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; list-style: none; }
.detailed-game.is-burrow-session .burrow-reaction-tools > summary::-webkit-details-marker { display: none; }
.detailed-game.is-burrow-session .burrow-reaction-tools .mouse-reactions { top: auto; right: 0; bottom: 52px; transform: none; }
.detailed-game.is-burrow-session .burrow-reaction-tools .mouse-reaction-dock { flex-direction: row; }
.detailed-game.is-burrow-session .detailed-stage .game-pages.burrow-workshop { position: relative; padding: 10px; gap: 8px; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto auto; }
/* Outrank the legacy two-column GamePages rule regardless of stylesheet load order. */
.detailed-game.is-burrow-session .game-pages.burrow-workshop > :is(.game-pages-heading,.game-pages-viewport,.game-pages-notices,.game-pages-controls) { grid-column: 1 / -1; min-width: 0; }
.detailed-game .burrow-workshop .game-pages-index { display: none; }
.detailed-game .burrow-workshop .game-pages-viewport { grid-column: 1; grid-row: 2; }
.detailed-game .burrow-workshop .game-pages-heading .board-title { padding: 0 0 6px; align-items: center; gap: 8px; }
.detailed-game .burrow-workshop .board-title .kicker { display: none; }
.detailed-game .burrow-workshop .game-pages-heading h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.detailed-game .burrow-workshop .game-pages-notices { grid-column: 1; grid-row: 3; }
.detailed-game .burrow-workshop .game-pages-controls { grid-column: 1; grid-row: 4; padding-top: 6px; min-height: 44px; }
.detailed-game .burrow-workshop .game-pages-controls button { min-height: 44px; padding: 6px 12px; }
.detailed-game .burrow-workshop .game-pages-controls > span { font-size: 12px; }
.detailed-game .burrow-workshop .burrow-case-facts { display: grid; gap: 14px; }
.detailed-game .burrow-workshop .burrow-case-facts .case-reveal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.detailed-game .burrow-workshop .burrow-case-facts .case-goal { grid-column: 1/-1; }
.detailed-game .burrow-workshop .burrow-route-tools { flex: 0 0 auto; }
.detailed-game .burrow-workshop .burrow-route-tools > summary { display: grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--field-accent); border-radius: 8px; color: var(--cream); cursor: pointer; list-style: none; }
.detailed-game .burrow-workshop .burrow-route-tools > summary::-webkit-details-marker { display: none; }
.detailed-game .burrow-workshop .burrow-route-tools > .burrow-live-map { position: absolute; z-index: 10; inset: 60px 8px auto; max-height: calc(100% - 120px); overflow-y: auto; padding: 12px; border: 1px solid var(--field-accent); border-radius: 12px; background: var(--panel,#101114); }
.detailed-game .burrow-workshop .burrow-route-tools summary:focus-visible { outline: 2px solid var(--field-accent); outline-offset: 3px; }
.detailed-game .burrow-workshop .linked-question { overflow: visible; }
/* FieldHeader is also a header element: only the question itself may stick. */
.detailed-game .game-pages.burrow-workshop .linked-question > header:not(.field-section-heading) { position: sticky; top: 0; z-index: 2; margin: -1px -1px 4px; padding: 10px 0; background: var(--panel,#101714); border-bottom: 1px solid var(--line); }
.detailed-game .game-pages.burrow-workshop .linked-question > header:not(.field-section-heading) h3 { margin: 4px 0; font-size: clamp(18px,1.6vw,25px); }
.detailed-game .game-pages.burrow-workshop .linked-question > header:not(.field-section-heading) p { display: none; }
.detailed-game .game-pages.burrow-workshop .linked-question > .field-section-heading { position: static; inset: auto; z-index: auto; }
.detailed-game .burrow-workshop .field-section-heading > span { display: none; }
.detailed-game .burrow-workshop .field-section-heading h3 { font-size: 20px; }
.detailed-game .burrow-workshop .burrow-step-actions { padding-top: 10px; }
.detailed-game .burrow-workshop .linked-path-legend { margin: 8px 0; }
.detailed-game .burrow-workshop .field-section-heading p:empty { display: none; }
.detailed-game .burrow-question-workshop fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.detailed-game .burrow-question-workshop .question-workshop-page { display: grid; gap: 12px; }
.detailed-game .burrow-question-workshop blockquote { margin: 0; padding: 12px; border-left: 3px solid var(--gold); font: 600 22px/1.3 var(--font-display); overflow-wrap: anywhere; }
.detailed-game .burrow-question-workshop .question-workshop-own { display: grid; gap: 6px; }
.detailed-game .burrow-question-workshop textarea { width: 100%; box-sizing: border-box; }
@media(max-width:759px) {
  .detailed-game.is-burrow-session .detailed-header .button { min-height: 44px; padding: 6px 8px; }
  .detailed-game.is-burrow-session .detailed-header b { font-size: 17px; }
  .detailed-game .detailed-stage .game-pages.burrow-workshop { padding: 8px; gap: 6px; }
  .detailed-game .burrow-workshop .game-pages-heading h2 { font-size: 18px; }
  .detailed-game .burrow-workshop .burrow-case-facts .case-reveal-grid { grid-template-columns: minmax(0,1fr); }
  .detailed-game .burrow-workshop .game-pages-controls.has-next-label button:last-child { max-width: 58%; }
  .detailed-game .game-pages.burrow-workshop .linked-question > header:not(.field-section-heading) { padding: 8px 0; }
}
@media(max-width:840px) {
  .app-shell .detailed-game.is-burrow-session.game-overlay:not(.is-stage-defense) { grid-template-rows: auto auto minmax(0,1fr) auto; }
  .app-shell .detailed-game.is-burrow-session:not(.is-stage-defense) > .detailed-stage { grid-row: 3; padding: 6px; }
  .app-shell .detailed-game.is-burrow-session:not(.is-stage-defense) > .detailed-footer { grid-row: 4; min-height: 44px; padding: 2px 8px; }
  .app-shell .detailed-game.is-burrow-session .detailed-header { min-height: 48px; padding: 6px 8px; }
  .app-shell .detailed-game.is-burrow-session .mode-track button { min-height: 44px; font-size: 12px; }
  .app-shell .detailed-game.is-burrow-session .game-pages-heading h2 { font-size: 18px; }
  .app-shell .detailed-game.is-burrow-session .burrow-reaction-tools .mouse-reactions.is-side { position: absolute; inset: auto 0 52px auto; transform: none; }
}
.burrow-trail-context{padding:12px 14px;margin:12px 0;border:1px solid var(--line);border-radius:8px;background:var(--surface-raised,var(--surface))}.burrow-trail-context p{margin:7px 0;font-size:15px;line-height:1.65;overflow-wrap:anywhere}.burrow-trail-choices .toggle-card{line-height:1.65;overflow-wrap:anywhere;white-space:normal}.burrow-trail-choices .toggle-card small{font-size:14px;line-height:1.6}.burrow-trail-empty,.burrow-trail-example,.burrow-trail-retained p{font-size:15px;line-height:1.7;color:var(--cream)}.burrow-trail-retained{margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:8px}.burrow-trail-retained>button{margin:6px 0;width:100%;text-align:left;white-space:normal;overflow-wrap:anywhere}
.burrow-trail-choices .field-card{white-space:normal;overflow-wrap:anywhere}.burrow-trail-choices .field-card b{font-size:16px;line-height:1.65}.burrow-trail-choices .field-card small{font-size:14px;line-height:1.6}
.burrow-link-progress{display:flex;flex-wrap:wrap;gap:8px 14px;padding:10px 0;border-bottom:1px solid var(--line);font-size:15px;line-height:1.5}.burrow-link-progress b{flex-basis:100%;font-weight:600}.burrow-field-error{padding:10px;border:1px solid var(--gold);border-radius:8px;color:var(--cream);font-size:16px;line-height:1.55}.burrow-workshop .linked-choice:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
/* Scope to game 1: notices scroll with the answers, never shrink the form. */
.detailed-game.is-burrow-session .detailed-stage .burrow-workshop.game-pages.has-inline-notices { grid-template-rows: auto minmax(0,1fr) auto; }
.detailed-game .burrow-workshop.has-inline-notices > .game-pages-index { grid-row: 2 / 4; }
.detailed-game .burrow-workshop.has-inline-notices > .game-pages-controls { grid-row: 3; }
.detailed-game .burrow-workshop .game-pages-inline-notices { flex: none; min-width: 0; }
.detailed-game .burrow-workshop .game-pages-inline-notices:empty { display: none; }
.detailed-game .burrow-workshop .game-pages-inline-notices .board-error { position: static; width: 100%; max-width: none; margin: 0; padding: 10px 12px; align-items: flex-start; box-shadow: none; font-size: 16px; line-height: 1.45; font-weight: 600; }
.detailed-game .burrow-workshop .linked-choice { display: grid; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.detailed-game .burrow-workshop .linked-choice.has-error { border-color: var(--danger); }
.detailed-game .burrow-workshop .linked-choice .field-section-heading { align-items: start; }
.detailed-game .game-pages.burrow-workshop.has-inline-notices .linked-choice .field-section-heading h3 { font: 600 20px/1.35 var(--font-ui); }
.detailed-game .game-pages.burrow-workshop.has-inline-notices .linked-choice .field-section-heading p { display: block; margin-top: 6px; color: var(--cream); font-size: 16px; line-height: 1.5; }
.detailed-game .burrow-workshop .linked-choice .field-card b { font-size: 16px; line-height: 1.5; }
.app-shell .detailed-game.is-burrow-session .game-pages.burrow-workshop.has-inline-notices .linked-choice textarea { min-height: 120px; max-height: none; font-size: 16px; line-height: 1.5; resize: vertical; }
@media (max-width: 759px) {
 .detailed-game.is-burrow-session .game-pages.burrow-workshop.has-inline-notices .linked-question > header:not(.field-section-heading) { position: static; inset: auto; z-index: auto; margin: 0 0 4px; padding: 0 0 10px; }
 .detailed-game.is-burrow-session .game-pages.burrow-workshop.has-inline-notices .linked-question > header:not(.field-section-heading) h3 { font-size: 20px; line-height: 1.4; }
 .detailed-game.is-burrow-session .game-pages.burrow-workshop.has-inline-notices .linked-question > header:not(.field-section-heading) p { display: block; font-size: 16px; line-height: 1.5; }
 .detailed-game:has(.burrow-workshop) .detailed-stage { padding: 6px; }
 .app-shell .detailed-game.is-burrow-session:has(.burrow-workshop) .mode-track button { font-size: 14px; }
 .detailed-game .detailed-stage .burrow-workshop.game-pages.has-inline-notices { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; gap: 8px; padding: 10px; }
 .detailed-game .burrow-workshop.has-inline-notices > .game-pages-index { display: none; }
 .detailed-game .burrow-workshop.has-inline-notices > .game-pages-viewport { grid-column: 1; grid-row: 2; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; touch-action: pan-y pinch-zoom; padding-bottom: 12px; }
 .detailed-game .burrow-workshop.has-inline-notices > .game-pages-controls { grid-column: 1; grid-row: 3; }
 .detailed-game .burrow-workshop .game-pages-heading .board-title h2 { font-size: 20px; line-height: 1.3; }
 .detailed-game .burrow-workshop .linked-question { padding: 10px; }
 .detailed-game .burrow-workshop .linked-question > header h3 { font-size: 20px; line-height: 1.4; }
 .detailed-game .burrow-workshop .linked-question > header p { display: block; font-size: 16px; line-height: 1.5; }
 .detailed-game .burrow-workshop .linked-question > header > span { font-size: 13px; line-height: 1.4; }
 .detailed-game .burrow-workshop .linked-choice { padding: 10px; }
 .detailed-game .burrow-workshop .game-pages-controls button { min-height: 48px; }
 .detailed-game .burrow-workshop .game-pages-controls.has-next-label button:last-child span { font-size: 14px; line-height: 1.35; }
 .detailed-game .burrow-workshop .game-pages-controls > span { font-size: 13px; line-height: 1.4; }
}
.game-reflection-link{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px 16px;padding:22px;border:1px solid var(--line,#675032);border-radius:var(--radius,12px);background:var(--surface,#17131b);color:var(--cream,#f7e4bc);min-width:0;margin-block:20px}
.game-reflection-link>svg{width:32px;height:32px;color:var(--gold,#d6aa58)}
.game-reflection-link h2{margin:4px 0 10px;font-size:clamp(22px,2vw,28px)}
.game-reflection-link p{display:block;margin:0;line-height:1.6;max-width:70ch;overflow:visible;white-space:normal}
.game-reflection-link small{display:flex;gap:6px;align-items:flex-start;margin-top:12px;line-height:1.5;color:var(--muted,#cfbea1)}
.game-reflection-link small svg{width:16px;height:20px;flex-shrink:0}
.game-reflection-link>.button,.game-reflection-link>.game-reflection-tab-note{grid-column:2;justify-self:start}
.game-reflection-link>.game-reflection-tab-note{font-size:13px;color:var(--muted,#cfbea1)}
.game-reflection-completion main{width:min(100%,960px);margin-inline:auto;padding:24px;overflow:auto}
.game-reflection-completion .practice-introduction{max-width:none}
.game-reflection-completion h1{font-size:clamp(28px,4vw,40px);margin:8px 0 16px;overflow-wrap:anywhere}
.game-reflection-actions{display:flex;flex-wrap:wrap;gap:12px;margin-block:20px}
@media(max-width:600px){.game-reflection-completion main{padding:16px}.game-reflection-link{padding:16px;grid-template-columns:28px minmax(0,1fr);gap:12px}.game-reflection-link>svg{width:26px;height:26px}.game-reflection-link>.button,.game-reflection-link>.game-reflection-tab-note{grid-column:1/-1}.game-reflection-link>.button{width:100%;white-space:normal;text-align:center}}
.detailed-game .case-condition-bar { grid-column:1/-1; display:grid; grid-template-columns:minmax(140px,.65fr) minmax(0,2fr) auto; align-items:center; gap:8px 14px; min-width:0; width:100%; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--panel,#151612); color:var(--cream); box-sizing:border-box; flex:1 0 100%; }
.detailed-game .case-condition-heading { min-width:0; }
.detailed-game .case-condition-heading small { display:block; color:var(--gold,var(--lime)); font:600 12px/1.35 var(--font-ui); text-transform:none; letter-spacing:normal; }
.detailed-game .case-condition-heading strong { display:block; color:var(--cream); font:600 16px/1.35 var(--font-ui); overflow-wrap:anywhere; }
.detailed-game .case-condition-bar .case-condition-preview { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin:0; color:var(--cream); font:400 16px/1.4 var(--font-ui); text-transform:none; letter-spacing:normal; overflow-wrap:anywhere; }
.detailed-game .case-condition-bar .button { min-height:44px; max-width:100%; white-space:normal; font:600 14px/1.3 var(--font-ui); }
.detailed-game .is-defense-fullscreen > header:has(> .case-condition-bar) { flex-wrap:wrap; }
.case-condition-dialog { position:fixed; inset:0; width:min(720px,calc(100vw - 24px)); max-width:calc(100vw - 24px); height:auto; max-height:calc(100dvh - 24px); padding:0; margin:auto; border:1px solid var(--gold,var(--line)); border-radius:12px; background:var(--panel,#141511); color:var(--cream,#f5e7c6); overflow:hidden; box-sizing:border-box; }
.case-condition-dialog::backdrop { background:#000b; }
.case-condition-dialog[open] { display:flex; flex-direction:column; }
.case-condition-dialog > header { display:flex; flex:none; justify-content:space-between; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--line); }
.case-condition-dialog > header h2 { margin:0; font:600 22px/1.3 var(--font-display); }
.case-condition-dialog > header button { min-width:44px; min-height:44px; }
.case-condition-dialog .case-condition-body { min-height:0; overflow:auto; overscroll-behavior:contain; touch-action:pan-y pinch-zoom; padding:8px 18px 18px; font:400 16px/1.55 var(--font-ui); overflow-wrap:anywhere; }
.case-condition-dialog .case-condition-body h3 { font-size:18px; margin:16px 0 6px; }
.case-condition-dialog .case-condition-body p { margin:8px 0; white-space:pre-wrap; }
.case-condition-dialog .case-condition-body ul { padding-left:22px; margin:6px 0; }
@media(max-width:759px),(max-height:500px) {
 .detailed-game .case-condition-bar { grid-template-columns:minmax(0,1fr) auto; gap:4px 8px; padding:6px 8px; }
 .detailed-game .case-condition-bar .case-condition-preview { grid-column:1/-1; grid-row:2; font-size:16px; line-height:1.35; }
 .detailed-game .case-condition-bar .button { grid-column:2; grid-row:1; max-width:132px; padding:6px 10px; }
 .detailed-game .case-condition-heading small { font-size:11px; }
}
@media print { .case-condition-bar,.case-condition-dialog { display:none!important; } }
.wheel-case-intro{display:grid;align-content:start;gap:16px;width:min(960px,100%);margin:0 auto;padding:clamp(16px,3vw,28px);border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--cream);box-sizing:border-box;min-width:0}
.wheel-case-intro h2{margin:8px 0 0;font:500 clamp(24px,3vw,34px)/1.2 var(--font-display)}
.wheel-case-intro h3{margin:0 0 10px;font:600 22px/1.3 var(--font-display)}
.wheel-case-intro :is(p,ul){margin:0;font-size:17px;line-height:1.55;overflow-wrap:anywhere}
.wheel-case-intro li+li{margin-top:8px}
.wheel-case-instruction{color:var(--muted)}
.wheel-case-story{display:grid;grid-template-columns:minmax(120px,200px) minmax(0,1fr);gap:20px;align-items:start}
.wheel-case-story img{display:block;width:100%;height:auto;object-fit:contain;border-radius:8px}
.wheel-case-intro .button{min-height:48px;white-space:normal;text-align:center;justify-content:center}
.wheel-case-intro>button{justify-self:start}
.wheel-case-actions{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}
.wheel-case-intro summary{min-height:44px;cursor:pointer;padding:10px 0;color:var(--gold)}
.wheel-case-intro :is(button,summary):focus-visible{outline:2px solid var(--gold);outline-offset:3px}
/* A fixed-height book inside a fixed-height game left only 4 px for reading.
   Keep one scrolling reading area; chrome and reactions must not squeeze it. */
.detailed-game.is-stage-brief:has(.wheel-case-intro) .detailed-stage{display:block;overflow-y:auto;overscroll-behavior-y:contain;padding:16px;min-height:0}
@media(max-width:759px),(max-height:500px){
 .app-shell .detailed-game.is-stage-brief:has(.wheel-case-intro){display:flex;flex-direction:column}
 .detailed-game.is-stage-brief:has(.wheel-case-intro)>:is(.detailed-header,.mode-track,.detailed-footer){flex:0 0 auto}
 .app-shell .detailed-game.is-stage-brief:has(.wheel-case-intro)>.detailed-stage{flex:1 1 0;min-height:0;padding:10px}
 .detailed-game.is-stage-brief:has(.wheel-case-intro)>.mouse-reactions{display:none}
 .detailed-game.is-stage-brief:has(.wheel-case-intro) .case-condition-bar{display:none}
 .wheel-case-intro{gap:14px;padding:16px}
 .wheel-case-story{grid-template-columns:100px minmax(0,1fr);gap:14px}
 .wheel-case-story h3{font-size:20px}
 .wheel-case-intro>button,.wheel-case-actions .button{width:100%}
 .wheel-case-actions{display:grid}
}
@media(max-width:359px){.wheel-case-story{grid-template-columns:80px minmax(0,1fr)}.wheel-case-intro{padding:12px}}
/* In phone landscape, retain usable team controls instead of a zero-height row.
   The whole authored workspace scrolls; no decision or chart is removed. */
@media(max-height:500px){
 .app-shell .detailed-game:has(.wheel-mountain-flow){display:flex;flex-direction:column}
 .detailed-game:has(.wheel-mountain-flow)>:is(.detailed-header,.mode-track,.detailed-footer){flex:0 0 auto}
 .detailed-game:has(.wheel-mountain-flow)>:is(.mouse-reactions){display:none}
 .detailed-game:has(.wheel-mountain-flow) .case-condition-bar{display:none}
 .app-shell .detailed-game:has(.wheel-mountain-flow)>.detailed-stage{display:block;flex:1 1 0;min-height:0;overflow-y:auto;padding:8px}
 .detailed-game .wheel-mountain-flow{height:auto;grid-template-rows:auto auto auto auto}
 .wheel-mountain-flow .wheel-sim-workspace{height:auto;align-items:start}
 .wheel-mountain-flow :is(.wheel-sim-wheel-panel,.wheel-sim-decisions){height:auto;overflow:visible}
}
/* One composed story panel; no fixed inner viewport or stretched body copy. */
.wheel-case-intro.wheel-case-intro--story{--story-accent:var(--gold,var(--lime));--story-space:clamp(24px,2.4vw,32px);display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr);width:min(1200px,100%);gap:0;padding:0;border-color:color-mix(in srgb,var(--story-accent) 35%,var(--line));border-radius:var(--radius,16px);background:var(--surface);box-shadow:0 16px 48px color-mix(in srgb,var(--surface) 70%,transparent)}
.wheel-case-intro--story .wheel-case-art{position:relative;display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:480px;overflow:hidden;border-radius:var(--radius,16px) 0 0 var(--radius,16px);background:var(--surface)}
/* The supplied landscape slide includes its own title: never crop it or cover
   its pixels with the separate story caption. Preserve its natural ratio. */
.wheel-case-intro--story .wheel-case-art img{position:static;display:block;width:100%;height:auto;object-fit:contain;object-position:center;flex:none}
.wheel-case-intro--story .wheel-case-art-caption{position:static;display:block;padding:20px 24px;color:var(--cream);font:500 clamp(24px,2.5vw,32px)/1.2 var(--font-display)}
.wheel-case-intro--story .wheel-case-art-caption>span{display:block;margin-top:8px;color:var(--story-accent);font:500 12px/1.5 var(--font-ui);letter-spacing:.12em;text-transform:uppercase}
.wheel-case-intro--story .wheel-case-content{display:flex;flex-direction:column;gap:20px;min-width:0;padding:var(--story-space)}
.wheel-case-intro--story .wheel-case-content>header h2{max-width:none;margin:8px 0 0;font-size:clamp(28px,2.5vw,36px);line-height:1.15}
.wheel-case-intro--story .wheel-case-progress{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px;line-height:1.5}
.wheel-case-intro--story .wheel-case-progress>span{display:flex;align-items:center;gap:8px}
.wheel-case-intro--story .wheel-case-progress b{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--line);border-radius:50%;font-weight:500;font-variant-numeric:tabular-nums}
.wheel-case-intro--story .wheel-case-progress>[aria-current="step"]{color:var(--story-accent);font-weight:600}
.wheel-case-intro--story .wheel-case-progress>[aria-current="step"] b{border-color:var(--story-accent);background:color-mix(in srgb,var(--story-accent) 12%,transparent)}
.wheel-case-intro--story .wheel-case-progress>i{height:1px;width:32px;background:var(--line)}
.wheel-case-intro--story .wheel-case-person h3{margin:0 0 12px;color:var(--story-accent);font:600 16px/1.5 var(--font-ui)}
.wheel-case-intro--story .wheel-case-person p{max-width:52ch;font-size:clamp(18px,1.5vw,20px);line-height:1.6}
.wheel-case-intro--story .wheel-case-invitation{display:grid;gap:8px;padding:16px 20px;border-left:2px solid var(--story-accent);background:linear-gradient(90deg,color-mix(in srgb,var(--story-accent) 8%,transparent),transparent)}
.wheel-case-intro--story .wheel-case-invitation>p{font:500 23px/1.35 var(--font-display)}
.wheel-case-intro--story .wheel-case-invitation>span:last-child{max-width:48ch;font-size:14px;line-height:1.6;color:var(--muted)}
.wheel-case-intro--story .wheel-case-next{display:grid;justify-items:start;gap:16px;margin-top:auto}
.wheel-case-intro--story .wheel-case-next .wheel-case-instruction{font-size:14px;line-height:1.6;max-width:48ch}
.wheel-case-intro--story .wheel-case-next .button{padding-inline:24px}
.wheel-case-intro--story .wheel-case-facts ul{display:grid;gap:12px;margin:0;padding-left:20px}
.wheel-case-intro--story .wheel-case-facts li+li{margin-top:0}
.wheel-case-intro--story .wheel-case-facts li::marker{color:var(--story-accent)}
.wheel-case-intro--story .wheel-case-mission{display:grid;gap:12px;padding-top:20px;border-top:1px solid var(--line)}
.wheel-case-intro--story .wheel-case-mission p:last-child{font-size:14px;color:var(--muted)}
.wheel-case-intro--story .wheel-case-actions{margin-top:auto;align-items:center}
.wheel-case-intro--story .wheel-case-content>details{border-bottom:1px solid var(--line);padding-bottom:8px}
.wheel-case-intro--story .wheel-case-content>details p{padding:8px 0 12px;font-size:15px}
@media(min-width:1100px){.detailed-game.is-stage-brief:has(.wheel-case-intro--story) .detailed-stage{padding:24px 64px 24px 24px}}
@media(max-width:900px){
 .wheel-case-intro.wheel-case-intro--story{grid-template-columns:minmax(180px,.65fr) minmax(0,1.35fr)}
 .wheel-case-intro--story .wheel-case-content{gap:20px;padding:24px}
}
@media(max-width:600px),(max-height:500px){
 .wheel-case-intro.wheel-case-intro--story{display:grid;grid-template-columns:minmax(0,1fr);padding:0;gap:0}
 .wheel-case-intro--story .wheel-case-art{min-height:0;aspect-ratio:auto;border-radius:var(--radius,16px) var(--radius,16px) 0 0}
 .wheel-case-intro--story .wheel-case-art-caption{padding:24px 20px 16px;font-size:24px}
 .wheel-case-intro--story[data-step="1"] .wheel-case-art{display:none}
 .wheel-case-intro--story .wheel-case-content{padding:20px;gap:20px}
 .wheel-case-intro--story .wheel-case-content>header h2{font-size:28px}
 .wheel-case-intro--story .wheel-case-person p{font-size:17px;line-height:1.6}
 .wheel-case-intro--story .wheel-case-invitation{padding:12px 16px}
 .wheel-case-intro--story .wheel-case-invitation>p{font-size:22px}
 .wheel-case-intro--story .wheel-case-next{justify-items:stretch}
 .wheel-case-intro--story .wheel-case-actions .button{width:100%}
}
.wheel-demo-session{width:min(720px,calc(100% - 32px));max-height:calc(100svh - 32px);overflow:auto;margin:auto;padding:clamp(20px,4vw,32px);box-sizing:border-box;border:1px solid var(--line);border-radius:var(--radius,16px);background:var(--surface);color:var(--cream);font:16px/1.6 var(--font-ui)}
.wheel-demo-session::backdrop{background:color-mix(in srgb,var(--bg) 90%,transparent)}
.wheel-demo-session h2{font:500 clamp(26px,3vw,34px)/1.2 var(--font-display);margin:12px 0 20px}
.wheel-demo-session h3{font:500 24px/1.25 var(--font-display);margin:0 0 12px}
.wheel-demo-session p{margin:12px 0;overflow-wrap:anywhere}
.wheel-demo-session .wheel-demo-actions{display:grid;gap:12px;margin:24px 0}
.wheel-demo-session .button{min-height:48px;white-space:normal;justify-content:center}
.wheel-demo-session .wheel-demo-confirm{padding:16px;border:1px solid var(--line);border-radius:var(--radius,12px);margin:20px 0}
.wheel-demo-session .wheel-demo-close{margin-top:12px}
.game-xp .wheel-demo-menu-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:6px 10px;margin-left:8px;border:1px solid var(--line);border-radius:var(--radius,8px);color:var(--cream);background:var(--surface);font:600 14px/1.4 var(--font-ui);white-space:normal;cursor:pointer}
.wheel-demo-session :is(button):focus-visible,.wheel-demo-menu-button:focus-visible{outline:2px solid var(--field-accent,var(--lime));outline-offset:3px}
@media(max-width:759px){.detailed-header .game-xp:has(.wheel-demo-menu-button){display:flex;align-items:center;font-size:0}.detailed-header .game-xp:has(.wheel-demo-menu-button)>svg{display:none}.game-xp .wheel-demo-menu-button{margin:0;font-size:13px}.wheel-demo-session .button-row{display:grid}}
/* Mobile work space: task content takes precedence over duplicated chrome.
   Desktop reactions, full-condition dialog and saving controls remain intact. */
@media (max-width: 759px), (max-height: 500px) {
  .app-shell .detailed-game.game-overlay { grid-template-rows: auto auto minmax(0,1fr) auto !important; }
  .app-shell .detailed-game > .mouse-reactions,
  .app-shell .detailed-game > .burrow-reaction-tools { display: none !important; }
  .app-shell .detailed-game > .detailed-stage { grid-row: 3 !important; padding: 6px !important; min-height: 0; }
  .app-shell .detailed-game > .detailed-footer { grid-row: 4 !important; min-height: 44px; padding: 2px 6px; }
  .app-shell .detailed-game.is-stage-brief > .detailed-footer { display: none; }
  .app-shell .detailed-game .detailed-header { min-height: 44px; padding: 4px 6px; gap: 4px 8px; }
  .app-shell .detailed-game .detailed-header > div > span,
  .app-shell .detailed-game .detailed-header em,
  .app-shell .detailed-game .detailed-header .game-xp,
  .app-shell .detailed-game .game-test-label { display: none; }
  .app-shell .detailed-game .detailed-header b { font-size: 17px; line-height: 1.25; }
  .app-shell .detailed-game .detailed-header > .icon-button { min-width: 44px; min-height: 44px; }
  .app-shell .detailed-game .case-condition-bar { padding: 0 6px; gap: 4px 8px; grid-template-columns: minmax(0,1fr) auto; }
  .app-shell .detailed-game .case-condition-bar .case-condition-preview,
  .app-shell .detailed-game .case-condition-heading small { display: none; }
  .app-shell .detailed-game .case-condition-heading strong { font-size: 14px; }
  .app-shell .detailed-game .case-condition-bar .button { min-height: 44px; padding: 4px 8px; font-size: 13px; }
  .app-shell .detailed-game .mode-track button { min-height: 44px; padding: 4px 2px; gap: 4px; font-size: 12px; justify-content: center; text-align: center; }
  .app-shell .detailed-game .mode-track button > span { display: none; }
  .app-shell .detailed-game .detailed-stage .case-brief-book.game-pages { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; padding: 8px; gap: 6px; }
  .app-shell .detailed-game .case-brief-book > .game-pages-heading { grid-column: 1; grid-row: 1; }
  .app-shell .detailed-game .case-brief-book > .game-pages-viewport { grid-column: 1; grid-row: 2; }
  .app-shell .detailed-game .case-brief-book > .game-pages-controls { grid-column: 1; grid-row: 3; }
  .app-shell .detailed-game .case-brief-book > .game-pages-index { display: none; }
  .app-shell .detailed-game .case-brief-book .game-pages-heading .board-title { padding-bottom: 6px; }
  .app-shell .detailed-game .case-brief-book .game-pages-heading h2 { font-size: 22px; line-height: 1.2; }
  .app-shell .detailed-game .case-brief-book .game-pages-heading .kicker { display: none; }
  .app-shell .detailed-game .case-brief-book .game-pages-heading .board-title > svg { display: none; }
  .app-shell .detailed-game .case-brief-book .game-pages-viewport { overflow-y: auto; overscroll-behavior-y: contain; touch-action: pan-y pinch-zoom; }
  .app-shell .detailed-game .case-brief-book .case-reveal-grid section { padding: 12px; }
  .app-shell .detailed-game .case-brief-book .case-reveal-grid h3 { font-size: 24px; margin: 4px 0 10px; }
  .app-shell .detailed-game .case-brief-book .case-reveal-grid :is(p,ul) { font-size: 17px; line-height: 1.5; }
  .app-shell .detailed-game .case-brief-book .game-pages-controls { min-height: 44px; padding-top: 4px; }
  .app-shell .detailed-game .case-brief-book .game-pages-controls button { min-height: 44px; }
}
@media (max-height: 500px) {
  .app-shell .detailed-game .detailed-header { grid-template-columns: 44px minmax(0,1fr) auto auto; }
  .app-shell .detailed-game .detailed-header .case-condition-bar { grid-column: 4; grid-row: 1; display: block; width: auto; padding: 0; border: 0; flex: none; }
  .app-shell .detailed-game .detailed-header .case-condition-heading { display: none; }
}
/* A phone has one vertical task scroller, not a fixed heading above a tiny
   independently scrolling form. Desktop split panes are intentionally intact. */
@media screen and (max-width: 840px) {
  .app-shell .detailed-game.game-overlay {
    display: flex !important;
    flex-direction: column;
  }
  .app-shell .detailed-game > :is(.detailed-header,.mode-track,.detailed-footer) { flex: none; }
  .app-shell .detailed-game > :is(.mouse-reactions,.burrow-reaction-tools) { display: none !important; }
  .app-shell .detailed-game > .detailed-stage {
    display: block !important;
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    touch-action: pan-y pinch-zoom;
    scroll-padding-block: 16px;
  }
  .app-shell .detailed-game .detailed-header { grid-template-columns: 44px minmax(0,1fr) auto; }
  .app-shell .detailed-game .detailed-header > div:nth-child(2) { min-width: 0; }
  .app-shell .detailed-game .detailed-header > div > span,
  .app-shell .detailed-game .detailed-header em,
  .app-shell .detailed-game .detailed-header .game-test-label,
  .app-shell .detailed-game .detailed-header .case-condition-preview,
  .app-shell .detailed-game .detailed-header .case-condition-heading,
  .app-shell .detailed-game .detailed-header .game-xp { display: none; }
  .app-shell .detailed-game .detailed-header .case-condition-bar { grid-column: 3; grid-row: 1; display: block; width: auto; padding: 0; border: 0; }
  .app-shell .detailed-game .detailed-header b { font-size: 16px; line-height: 1.25; }
  .app-shell .detailed-game .detailed-header .practice-trigger { max-width: 100%; white-space: normal; }
  .app-shell .detailed-game .mode-track button { min-height: 44px; }
  .app-shell .detailed-game .detailed-footer { padding-right: 8px; }
  .app-shell .detailed-game .detailed-stage :is(.wheel-team-simulation,.wheel-simulation-defense,.personal-shell,.personal-attention-start,.personal-wheel-route,.admission-workspace) {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .app-shell .detailed-game .detailed-stage :is(.wheel-sim-workspace,.personal-wheel-workspace) { display: block; }
  .app-shell .detailed-game .detailed-stage :is(.wheel-sim-wheel-panel,.wheel-sim-decisions,.personal-wheel-visual,.personal-wheel-decisions,.wheel-sim-defense-summary) {
    height: auto !important;
    max-height: none;
    overflow: visible !important;
  }
  .app-shell .detailed-game .wheel-sim-visual { position: static; }
  .app-shell .detailed-game .wheel-sim-visual svg { max-height: none; }
  .app-shell .detailed-game .wheel-sim-footer { margin-top: 16px; flex-wrap: wrap; }
  .app-shell .detailed-game .personal-shell > .private-banner { margin-bottom: 12px; }
  /* Semantic pages use the task scroller too. A content-sized viewport must
     never be used as the available height for automatic page grouping. */
  .app-shell .detailed-game .detailed-stage .game-pages.game-pages {
    height: auto;
    grid-template-rows: auto auto auto auto auto;
  }
  .app-shell .detailed-game .game-pages > .game-pages-viewport { overflow: visible; }
  .app-shell .detailed-game .game-page-block[data-visible='false'] { display: none; }
}
/* Working screens keep the case one click away, rather than reserving a second
   toolbar row for a duplicate introduction. Defense/print layout is unchanged. */
@media screen {
  /* Translating a task button on hover can repeatedly move its hit area away
     from the pointer at an edge (also observed in WebKit touch emulation). */
  .app-shell .detailed-game .button:hover:not(:disabled) { transform:none; }
}
@media screen and (min-width:841px) {
  .app-shell .detailed-game:not(.is-stage-defense) > .detailed-header {
    grid-template-columns:44px minmax(0,1fr) auto auto auto;
    min-height:52px; padding:4px 8px; gap:8px;
  }
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header > div > span,
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header em,
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header .game-test-label { display:none; }
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header b { font-size:1.125rem; line-height:1.25; }
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header .case-condition-bar {
    grid-column:5; grid-row:1; display:block; width:auto; padding:0; border:0;
  }
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header .case-condition-heading,
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header .case-condition-preview { display:none; }
  .app-shell .detailed-game:not(.is-stage-defense) .detailed-header .case-condition-bar .button { white-space:nowrap; }

  /* The task, not a small inner decision pane, owns vertical scrolling.
     The existing phone layout already follows this contract. */
  .app-shell .detailed-game:has(.wheel-mountain-flow) > .detailed-stage { display:block; overflow-y:auto; overscroll-behavior-y:contain; }
  .app-shell .detailed-game .wheel-mountain-flow { display:block; height:auto; overflow:visible; }
  .app-shell .detailed-game .wheel-mountain-flow > * + * { margin-top:12px; }
  .wheel-mountain-flow .wheel-sim-workspace { height:auto; align-items:start; }
  .wheel-mountain-flow .wheel-sim-decisions { height:auto; overflow:visible; }
  .wheel-mountain-flow .wheel-sim-wheel-panel { position:sticky; top:8px; height:auto; max-height:calc(100dvh - 184px); overflow:auto; }
  .wheel-mountain-flow .wheel-sim-heading .kicker { display:none; }
  .wheel-mountain-flow .wheel-sim-heading h2 { margin:0; font-size:1.5rem; }
  .wheel-mountain-flow .wheel-sim-task { padding:8px 12px; }
}
/* The defense owns its save controls. Reactions use the next grid row,
   including while expanded, rather than floating over the last button. */
@media screen and (min-width: 841px) {
  .detailed-game.is-burrow-session.is-stage-defense > .burrow-reaction-tools {
    position: relative;
    inset: auto;
    z-index: auto;
    justify-self: end;
    max-width: calc(100% - 20px);
    margin: 4px 10px;
  }
  .detailed-game.is-burrow-session.is-stage-defense > .burrow-reaction-tools .mouse-reactions.is-side {
    position: static;
    inset: auto;
    transform: none;
    margin-top: 6px;
  }
  .detailed-game.is-burrow-session.is-stage-defense .academy-defense > footer {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .detailed-game.is-burrow-session.is-stage-defense .defense-actions {
    flex-wrap: wrap;
    min-width: 0;
  }
  .detailed-game.is-burrow-session.is-stage-defense .defense-actions .button {
    max-width: 100%;
    white-space: normal;
  }
}
/* On short desktop windows the header and wrapped actions can exceed the
   remaining stage height. Scroll the complete defense instead of clipping it. */
@media screen and (min-width: 841px) and (max-height: 740px) {
  .detailed-game.is-burrow-session.is-stage-defense > .detailed-stage {
    display: block;
    overflow-y: auto;
  }
  .detailed-game.is-burrow-session.is-stage-defense .detailed-stage .academy-defense.defense-screen {
    height: auto;
    min-height: 100%;
  }
}
.lesson-task-panel { border: 1px solid var(--gold, #d7ae61); border-radius: 16px; padding: clamp(12px, 2.5vw, 24px); background: var(--panel, #11151a); color: var(--cream, #f4e4bf); min-width: 0; overflow-wrap: anywhere; }
.lesson-task-panel h2 { margin: 6px 0 16px; font-size: clamp(24px, 4vw, 34px); }
.lesson-task-panel h3 { font-size: clamp(20px, 3vw, 27px); margin: 16px 0 10px; }
.lesson-task-panel p { line-height: 1.55; }
.lesson-task-panel fieldset { border: 0; padding: 0; margin: 18px 0; min-width: 0; }
.lesson-task-panel legend { font-weight: 700; margin-bottom: 10px; }
.lesson-task-panel label { display: grid; gap: 6px; margin: 12px 0; }
.lesson-task-panel input:not([type="checkbox"]), .lesson-task-panel textarea { width: 100%; min-height: 44px; border: 1px solid var(--line, #5f523a); border-radius: 10px; padding: 12px; background: var(--surface, #0c1010); color: inherit; font: inherit; }
.lesson-task-start label { display: flex; align-items: center; gap: 10px; }
.lesson-task-start input[type="checkbox"] { width: 22px; height: 22px; flex: 0 0 auto; }
.lesson-task-panel .button { min-height: 44px; white-space: normal; text-align: left; }
.lesson-task-panel button:focus-visible, .lesson-task-panel input:focus-visible, .lesson-task-panel textarea:focus-visible, .lesson-task-panel summary:focus-visible { outline: 3px solid var(--gold, #d7ae61); outline-offset: 3px; }
.lesson-task-options { display: grid; gap: 8px; margin-bottom: 12px; }
.lesson-task-options [aria-pressed="true"] { border-color: var(--gold, #d7ae61); box-shadow: inset 0 0 0 2px var(--gold, #d7ae61); }
.lesson-task-panel blockquote { border-left: 3px solid var(--gold, #d7ae61); margin: 12px 0; padding: 12px 16px; font-size: 1.15em; }
.lesson-task-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
.lesson-task-role { padding: 0; border: 1px solid var(--line, #5f523a); border-radius: 14px; overflow: hidden; text-align: left; background: var(--surface, #0c1010); color: inherit; }
.lesson-task-role img { display: block; width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; }
.lesson-task-role > span { display: grid; gap: 8px; padding: 12px; }
.lesson-task-role.is-selected { border-color: var(--gold, #d7ae61); }
.lesson-task-private, .lesson-task-note { font-size: .9em; }
.lesson-task-progress { border-bottom: 1px solid var(--line, #5f523a); padding-bottom: 12px; }
.lesson-task-manager { margin-top: 18px; border-top: 1px solid var(--line, #5f523a); padding-top: 12px; }
.lesson-task-manager summary { cursor: pointer; min-height: 44px; }
.lesson-task-manager li { margin: 12px 0; }
.lesson-task-manager li > .button { margin: 6px; }
.lesson-task-defense article { border: 1px solid var(--line, #5f523a); padding: 14px; border-radius: 12px; margin: 12px 0; }
.lesson-task-defense h4 { margin: 0; font-size: 1.1em; }
.lesson-task-defense p, .lesson-task-answer-summary dd { white-space: pre-wrap; }
.lesson-task-answer-summary dt { font-weight: 700; margin-top: 14px; }
.lesson-task-answer-summary dd { margin: 4px 0 12px; }
@media (min-width: 650px) { .lesson-task-words fieldset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
.teaching-stage { --stage-surface: var(--surface,#121116); border: 1px solid var(--line,#675032); border-radius: 12px; background: var(--stage-surface); color: var(--cream,#f7e4bc); padding: 20px; margin: 16px 0; }
.teaching-stage > header { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:16px; }
.teaching-stage h2,.teaching-stage h3 { font-family:var(--font-display); font-weight:500; margin:8px 0; }
.teaching-stage > header span,.teaching-stage small { color:var(--muted,#c0b198); }
.lesson-clock { display:flex; gap:18px; flex-wrap:wrap; align-items:center; font-family:var(--font-ui); }
.lesson-clock span { display:grid; gap:4px; }
.lesson-clock b { font-size:28px; color:var(--lime,#e6b85f); font-variant-numeric:tabular-nums; }
.teaching-public-scene { background:#08090c; border:1px solid var(--line,#675032); border-radius:8px; overflow:hidden; }
.teaching-slide { display:block; width:100%; aspect-ratio:16/9; object-fit:contain; max-height:75dvh; }
.teaching-controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; }
.teaching-controls p { flex-basis:100%; color:var(--muted,#c0b198); font-size:14px; line-height:1.6; }
.teaching-no-material { padding:40px; text-align:center; }
.teaching-defense-title { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:20px; border-bottom:1px solid var(--line,#675032); }
.defense-large-clock { text-align:center; padding:12px 24px; border:1px solid var(--lime,#e6b85f); border-radius:8px; }
.defense-large-clock span { display:block; font-size:14px; }
.defense-large-clock strong { font-size:52px; color:var(--lime,#e6b85f); font-variant-numeric:tabular-nums; }
.teaching-defense-station { padding:24px; min-height:220px; }
.teaching-defense-station h3 { font-size:32px; }
.teaching-defense-station p { white-space:pre-wrap; font-size:20px; line-height:1.7; overflow-wrap:anywhere; }
.teaching-station-nav { display:flex; flex-wrap:wrap; gap:8px; padding:16px; }
.teaching-station-nav button { min-height:44px; padding:10px; border:1px solid var(--line,#675032); border-radius:6px; background:var(--stage-surface); color:inherit; }
.teaching-station-nav button[aria-pressed=true] { background:var(--lime,#e6b85f); color:var(--ink,#211708); }
.teaching-defense-queue { display:flex; gap:16px; flex-wrap:wrap; list-style:none; padding:16px; }
.teaching-defense-queue .is-active { color:var(--lime,#e6b85f); font-weight:700; }
.teaching-team-progress > div { display:flex; flex-wrap:wrap; gap:10px; }
.teaching-team-progress article { display:grid; gap:8px; border:1px solid var(--line,#675032); padding:14px; border-radius:8px; min-width:150px; }
.projected-lesson { min-height:100dvh; padding:12px; background:#08090c; }
.teaching-projected { margin:0; }
.classroom-lesson-clock { display:flex; gap:16px; font-variant-numeric:tabular-nums; font-family:var(--font-ui); }
.classroom-lesson-clock span { display:grid; gap:4px; color:var(--muted); font-size:12px; }
.classroom-lesson-clock b { color:var(--lime); font-size:22px; }
.room-attendance { color:var(--muted); font-size:13px; }
.room-defense-budget { margin:12px 0; color:var(--muted); font-size:15px; line-height:1.6; }
@media(max-width:768px) { .classroom-topbar { flex-wrap:wrap; }.classroom-lesson-clock { order:3; flex-basis:100%; justify-content:center; }.classroom-lesson-clock span { display:flex; align-items:center; gap:8px; } }
.teaching-projected .teaching-slide { max-height:calc(100dvh - 150px); }
.chat-rules { border:1px solid var(--line,#675032); border-radius:8px; padding:14px; margin:12px 0; font:14px/1.6 var(--font-ui); }
.chat-rules summary { cursor:pointer; min-height:32px; color:var(--lime,#e6b85f); }
.chat-rules ol { padding-left:24px; }
.chat-rules label { display:flex; align-items:flex-start; gap:10px; margin:12px 0; }
.chat-rules input { flex:0 0 18px; width:18px; height:18px; }
@media(max-width:768px) { .teaching-stage { padding:12px; }.teaching-stage > header,.teaching-defense-title { align-items:flex-start; flex-direction:column; }.lesson-clock { gap:12px; }.lesson-clock b { font-size:24px; }.teaching-defense-station p { font-size:17px; }.teaching-slide { min-height:180px; }.defense-large-clock strong { font-size:44px; } }

/* The student's room already supplies the lesson title and running clock.
   Keep teacher/projector layouts intact and retain a clock before room sync. */
@media screen and (max-width: 768px) {
  .classroom-shell.classroom-student { display: flex; flex-direction: column; }
  .classroom-shell.classroom-student > .classroom-topbar {
    display: grid; grid-template-columns: minmax(0, 1fr) 48px;
    grid-template-areas: "title exit" "clock clock";
    flex: 0 0 auto; gap: 8px; padding: 8px;
  }
  .classroom-shell.classroom-student > .classroom-topbar > div:first-child { grid-area: title; min-width: 0; }
  .classroom-shell.classroom-student > .classroom-topbar > div:last-child { grid-area: exit; }
  .classroom-shell.classroom-student > .classroom-topbar .room-code { display: none; }
  .classroom-shell.classroom-student > .classroom-topbar > div:first-child b { white-space: normal; overflow-wrap: anywhere; }
  .classroom-shell.classroom-student > .classroom-topbar > div:first-child small { overflow-wrap: anywhere; }
  .classroom-shell.classroom-student > .classroom-topbar > div:last-child button {
    width: 48px; min-width: 48px; min-height: 48px; padding: 0; justify-content: center; font-size: 0;
  }
  .classroom-shell.classroom-student .classroom-lesson-clock {
    grid-area: clock; flex-wrap: wrap; justify-content: center; gap: 8px 16px;
  }
  .classroom-shell.classroom-student > .classroom-main { flex: 0 0 auto; min-width: 0; padding: 8px; }
  .classroom-shell.classroom-student .class-timer {
    position: static; grid-template-columns: minmax(0, 1fr) 48px;
    gap: 8px; margin-bottom: 8px; padding: 8px;
  }
  .classroom-shell.classroom-student .class-timer > div:first-child {
    min-width: 0; grid-template-columns: minmax(0, 1fr) auto;
    align-items: center; gap: 0 8px;
  }
  .classroom-shell.classroom-student .class-timer > div:first-child > span,
  .classroom-shell.classroom-student .class-timer > div:first-child > small {
    grid-column: 1; overflow-wrap: anywhere;
  }
  .classroom-shell.classroom-student .class-timer > div:first-child > strong {
    grid-column: 2; grid-row: 1 / span 2;
  }
  .classroom-shell.classroom-student .class-timer > button {
    width: 48px; min-width: 48px; min-height: 48px; padding: 0; justify-content: center; font-size: 0;
  }
  .classroom-shell.classroom-student .teaching-stage { margin: 0 0 8px; padding: 8px; }
  .classroom-shell.classroom-student .teaching-stage > header { gap: 0; margin: 0; }
  .classroom-shell.classroom-student .teaching-stage > header h2 { display: none; }
  .classroom-shell.classroom-student .teaching-stage:not(.teaching-paused) > header > div:first-child {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .classroom-shell.classroom-student .teaching-paused > header { margin-bottom: 8px; }
  .classroom-shell.classroom-student:has(> .classroom-topbar > .classroom-lesson-clock) .teaching-stage > header > .lesson-clock { display: none; }
  .classroom-shell.classroom-student .teaching-slide {
    min-height: 0; max-height: max(120px, calc(var(--classroom-viewport-height, 100dvh) - 220px - env(safe-area-inset-bottom)));
    object-fit: contain;
  }
  .classroom-shell.classroom-student > .classroom-main > .plenary-connection { margin-bottom: 0; }
  .classroom-shell.classroom-student > .mouse-reactions {
    position: relative; inset: auto; flex: 0 0 auto; justify-items: center;
    margin: 0; padding: 0 8px calc(8px + env(safe-area-inset-bottom));
    transform: none;
  }
}
/* Student desktop lecture viewport fit.
   Only a plain presentation uses the fitted grid. Polls, errors, hints, defense
   and short windows retain natural scrolling; no content is clipped to fit. */
@media screen and (min-width: 769px) {
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) { display: flex; flex-direction: column; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) > .classroom-topbar { flex: 0 0 auto; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) > .classroom-topbar > div:first-child { min-width: 0; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) > .classroom-topbar > div:first-child b,
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) > .classroom-topbar > div:first-child small { overflow-wrap: anywhere; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) > .classroom-main { flex: 0 0 auto; min-width: 0; padding: 12px; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .class-timer {
    position: static; grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px; margin-bottom: 8px; padding: 8px 12px;
  }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .class-timer > div:first-child {
    display: flex; flex-wrap: wrap; min-width: 0; align-items: center; gap: 4px 14px;
  }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .class-timer > button { min-height: 44px; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .teaching-stage { margin: 0 0 8px; padding: 12px; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .teaching-stage > header { gap: 0; margin: 0; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .teaching-stage > header h2 { display: none; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .teaching-stage:not(.teaching-paused) > header > div:first-child {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) .teaching-paused > header { margin-bottom: 8px; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide):has(> .classroom-topbar > .classroom-lesson-clock) .teaching-stage > header > .lesson-clock { display: none; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) > .classroom-main > .plenary-connection { margin-bottom: 0; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide) > .mouse-reactions {
    position: relative; inset: auto; flex: 0 0 auto; justify-items: center;
    margin: 0; padding: 0 12px calc(8px + env(safe-area-inset-bottom)); transform: none;
  }
}
@media screen and (min-width: 769px) and (min-height: 600px) {
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide):not(:has(> .classroom-main > :not(.class-timer, .teaching-stage, .plenary-connection))):not(:has(> .classroom-main > .teaching-stage > [role="alert"], > .classroom-main > .class-timer > .timer-notice, > .classroom-main > .class-timer > .speaker-clock)) {
    height: var(--classroom-viewport-height, 100dvh); display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide):not(:has(> .classroom-main > :not(.class-timer, .teaching-stage, .plenary-connection))):not(:has(> .classroom-main > .teaching-stage > [role="alert"], > .classroom-main > .class-timer > .timer-notice, > .classroom-main > .class-timer > .speaker-clock)) > .classroom-main {
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0;
  }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide):not(:has(> .classroom-main > :not(.class-timer, .teaching-stage, .plenary-connection))):not(:has(> .classroom-main > .teaching-stage > [role="alert"], > .classroom-main > .class-timer > .timer-notice, > .classroom-main > .class-timer > .speaker-clock)) > .classroom-main > .teaching-stage {
    display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0;
  }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide):not(:has(> .classroom-main > :not(.class-timer, .teaching-stage, .plenary-connection))):not(:has(> .classroom-main > .teaching-stage > [role="alert"], > .classroom-main > .class-timer > .timer-notice, > .classroom-main > .class-timer > .speaker-clock)) .teaching-public-scene { min-height: 0; min-width: 0; }
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide):not(:has(> .classroom-main > :not(.class-timer, .teaching-stage, .plenary-connection))):not(:has(> .classroom-main > .teaching-stage > [role="alert"], > .classroom-main > .class-timer > .timer-notice, > .classroom-main > .class-timer > .speaker-clock)) .teaching-slide {
    width: 100%; height: 100%; min-height: 0; max-height: 100%;
    aspect-ratio: auto; object-fit: contain;
  }
}
/* Classroom scroll isolation. */
.classroom-shell, .classroom-modal { overscroll-behavior-y: contain; }
@media screen and (any-pointer: coarse) {
  @supports (height: 100svh) {
    .classroom-shell.classroom-student {
      --classroom-viewport-height: 100svh;
      top: 0; bottom: auto; height: var(--classroom-viewport-height, 100dvh);
    }
  }
}
/* End classroom scroll isolation. */

/* Idle preparation strip: retain slide fit when the unused phase row is absent. */
@media screen and (min-width: 769px) and (min-height: 600px) {
  .classroom-shell.classroom-student:has(> .classroom-main > .teaching-stage > .teaching-public-scene > .teaching-slide):not(:has(> .classroom-main > :not(.class-timer, .teaching-stage, .plenary-connection))):not(:has(> .classroom-main > .teaching-stage > [role="alert"], > .classroom-main > .class-timer > .timer-notice, > .classroom-main > .class-timer > .speaker-clock)) > .classroom-main:not(:has(> .class-timer)) {
    grid-template-rows: minmax(0, 1fr) auto;
  }
}
/* End idle preparation strip. */

/* A phone in landscape has less height: keep the slide before the chat and
   compact its existing heading instead of spending two rows on the clock. */
@media screen and (orientation: landscape) and (max-height: 550px) and (max-width: 1100px) {
  .classroom-shell.classroom-student:has(.teaching-slide) > .classroom-topbar {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 48px;
    grid-template-areas: "title clock exit"; gap: 8px; padding: 4px 8px;
  }
  .classroom-shell.classroom-student:has(.teaching-slide) > .classroom-topbar > div:first-child { grid-area: title; min-width: 0; }
  .classroom-shell.classroom-student:has(.teaching-slide) > .classroom-topbar > div:last-child { grid-area: exit; }
  .classroom-shell.classroom-student:has(.teaching-slide) .classroom-lesson-clock { grid-area: clock; gap: 8px; font-size: 12px; }
  .classroom-shell.classroom-student:has(.teaching-slide) .classroom-lesson-clock b { font-size: 20px; }
  .classroom-shell.classroom-student:has(.teaching-slide) .room-code { display: none; }
  .classroom-shell.classroom-student:has(.teaching-slide) > .classroom-topbar > div:last-child button { width: 48px; min-width: 48px; min-height: 48px; padding: 0; justify-content: center; font-size: 0; }
  .classroom-shell.classroom-student:has(.teaching-slide) > .classroom-main { padding: 6px; }
  .classroom-shell.classroom-student:has(.teaching-slide) .teaching-stage { padding: 4px; margin-bottom: 6px; }
  .classroom-shell.classroom-student:has(.teaching-slide) .teaching-stage > header h2 { display: none; }
  .classroom-shell.classroom-student:has(.teaching-slide) .teaching-stage:not(.teaching-paused) > header > div:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .classroom-shell.classroom-student:has(.teaching-slide):has(> .classroom-topbar > .classroom-lesson-clock) .teaching-stage > header > .lesson-clock { display: none; }
  .classroom-shell.classroom-student:has(.teaching-slide) .teaching-slide { min-height: 0; max-height: max(100px, calc(var(--classroom-viewport-height, 100dvh) - 88px)); object-fit: contain; }
}
.defense-listening{margin:16px 0;padding:clamp(16px,3vw,28px);border:1px solid #796039;border-radius:16px;background:linear-gradient(135deg,#221d19,#111117);color:#eee0c3;min-width:0}.defense-listening header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.defense-listening h2,.defense-listening h3{color:#e7c884}.defense-listening p{line-height:1.6}.listening-queue,.listening-saved{display:grid;gap:8px;padding:16px;border:1px solid #796039;border-radius:10px}.listening-roster{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;list-style:none;padding:0}.listening-roster li{display:grid;gap:6px;background:#16151a;padding:12px;border-radius:8px}.listening-answer{padding:16px 0;display:grid;gap:12px;border-bottom:1px solid #665334}.defense-listening label,.choice-with-custom{display:grid;gap:8px}.defense-listening select,.defense-listening textarea{width:100%;box-sizing:border-box;min-height:44px;background:#131219;color:#f2e5c7;border:1px solid #806a43;border-radius:8px;padding:12px;font:inherit}.defense-listening button{min-height:44px}.listening-summaries{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.listening-answer small{white-space:pre-wrap;overflow-wrap:anywhere}.defense-listening blockquote{padding:14px;border-left:3px solid #d1ad66;background:#30281e}@media(max-width:600px){.defense-listening{font-size:16px}.defense-listening h2{font-size:23px}.defense-listening h3{font-size:19px}.listening-roster{grid-template-columns:1fr}.defense-listening header button{width:100%}}
/* A single horizontal camera strip; no growing grid competing with the task. */
.classroom-shell .video-room .video-grid,
.case-team-panel .video-room .video-grid {
  display: flex; gap: 6px; min-height: 0; padding: 4px 8px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.classroom-shell .video-room .video-grid::-webkit-scrollbar,
.case-team-panel .video-room .video-grid::-webkit-scrollbar { height: 0; }
.classroom-shell .video-room .video-tile,
.case-team-panel .video-room .video-tile {
  flex: 0 0 144px; width: 144px; height: 81px; min-height: 0; border-radius: 8px;
}
.classroom-shell .video-room .video-tile video,
.case-team-panel .video-room .video-tile video { display: block; }
.classroom-shell .video-room .video-tile b,
.case-team-panel .video-room .video-tile b {
  left: 3px; bottom: 3px; max-width: calc(100% - 6px); padding: 2px 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px;
}
.classroom-shell .video-room .video-placeholder,
.case-team-panel .video-room .video-placeholder { gap: 2px; font-size: 10px; }
.classroom-shell .video-room .video-placeholder svg,
.case-team-panel .video-room .video-placeholder svg { width: 18px; height: 18px; }
.classroom-shell .video-room .video-room-title,
.case-team-panel .video-room .video-room-title { padding: 2px 8px; gap: 8px; font-size: 12px; line-height: 14px; }
.classroom-shell .video-room .video-room-title span,
.case-team-panel .video-room .video-room-title span { line-height: 14px; }
.classroom-shell .video-room .video-room-title > div { min-width: 0; }
.classroom-shell .video-room .video-room-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.classroom-shell .video-room .video-room-title svg { width: 14px; height: 14px; flex-shrink: 0; }
.classroom-shell .video-room .video-controls,
.case-team-panel .video-room .video-controls { gap: 6px; padding: 4px 8px; }
.classroom-shell .video-room .video-controls button { min-height: 44px; font-size: 12px; }
.classroom-call-dock { margin-bottom: 12px; }

/* The same mounted call moves into reserved space; it does not cover the game. */
.classroom-shell:has(.classroom-call-dock[data-case-open="true"]) { --classroom-call-height: calc(174px + env(safe-area-inset-bottom)); }
.classroom-call-dock[data-case-open="true"] {
  position: fixed; inset: auto 0 0; z-index: 220; height: var(--classroom-call-height);
  padding: 2px 8px calc(2px + env(safe-area-inset-bottom)); margin: 0;
  background: var(--surface, #10120f); border-top: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain;
}
.classroom-call-dock[data-case-open="true"] > .video-room { border-radius: 10px; }
.classroom-shell:has(.classroom-call-dock[data-case-open="true"]) .game-overlay {
  bottom: var(--classroom-call-height); height: calc(var(--classroom-viewport-height, 100dvh) - var(--classroom-call-height));
  min-height: 0; max-height: calc(var(--classroom-viewport-height, 100dvh) - var(--classroom-call-height));
}
.classroom-shell:has(.classroom-call-dock[data-case-open="true"]) .case-team-panel { bottom: var(--classroom-call-height); max-height: calc(100dvh - var(--classroom-call-height) - 72px); }
/* Oversized task content scrolls inside its row, above the fixed game controls. */
.classroom-shell:has(.classroom-call-dock[data-case-open="true"]) .detailed-game .game-pages-viewport {
  overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain;
  scroll-padding-block: 12px; padding: 2px;
}
@media (max-width: 768px) {
  .classroom-shell .video-room .video-tile,
  .case-team-panel .video-room .video-tile { flex-basis: 112px; width: 112px; height: 63px; }
  .classroom-shell .video-room .video-controls { justify-content: flex-start; overflow-x: auto; }
  .classroom-shell .video-room .video-controls button { flex-shrink: 0; min-width: 44px; min-height: 48px; padding-inline: 8px; }
  .classroom-shell .video-room .video-controls .connection { flex: 0 0 20px; overflow: hidden; white-space: nowrap; font-size: 0; }
  .classroom-shell .video-room .video-controls .connection svg { width: 16px; height: 16px; }
  .classroom-shell:has(.classroom-call-dock[data-case-open="true"]) { --classroom-call-height: calc(156px + env(safe-area-inset-bottom)); }
}
.fog-homework{min-width:0;display:grid;gap:14px}
.fog-homework-intro{margin:0;line-height:1.6;color:var(--muted)}
.fog-homework .fog-goal-board{height:auto;min-height:0;grid-template-rows:auto auto auto}
.fog-homework .fog-workspace{overflow:visible;max-height:none}
.fog-homework-previous p{white-space:pre-wrap;overflow-wrap:anywhere}
.personal-woop{min-width:0}
.personal-woop-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.personal-woop-fields label{display:grid;gap:6px;min-width:0;line-height:1.4}
.personal-woop-fields textarea{width:100%;min-width:0;box-sizing:border-box;min-height:90px;resize:vertical;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--cream);font:inherit;font-size:16px}
.personal-woop-first-step{grid-column:1/-1}
.personal-woop-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:14px}
.lesson-activity-gate[hidden]{display:none!important}
@media(max-width:600px){.personal-woop-fields{grid-template-columns:minmax(0,1fr)}.personal-woop-first-step{grid-column:auto}}
/*$vite$:1*/
/* Keep the shared header visible both above desktop main scrolling and mobile document scrolling. */
.app-shell.app-shell.academy-theme .topbar { position:sticky; top:0; z-index:60; background:#101117f5; backdrop-filter:blur(14px); }
.app-shell.app-shell.academy-theme .topbar .topbar-actions .icon-button { display:inline-flex; width:44px; height:44px; align-items:center; justify-content:center; }
.student-return { padding:8px 20px 0; }
.student-return>button { display:flex; align-items:center; gap:8px; min-height:44px; padding:8px 12px; border:1px solid #b18c4c66; border-radius:8px; background:#17151eeb; color:#edc67f; font:500 13px var(--font-ui); }
.student-return svg { width:18px; height:18px; }
.student-return button:focus-visible { outline:2px solid #edc67f; outline-offset:3px; }
.app-shell.academy-theme .sidebar .nav-item:focus { outline:none; }
.app-shell.academy-theme .sidebar .nav-item:focus-visible { text-decoration:underline; text-underline-offset:4px; }
/* A transformed review frame makes fixed navigation move with its content. */
#root.review-sandbox-root:has(.app-shell):not(:has(.game-overlay)) { transform:none !important; }
#root.review-sandbox-root .app-shell .policy-backdrop { top:48px; }
#root.review-sandbox-root .app-shell .policy-document { max-height:calc(100dvh - 68px); }
#root.review-sandbox-root .app-shell .classroom-modal { top:48px; height:calc(100dvh - 48px) !important; max-height:calc(100dvh - 48px) !important; }
@media screen and (min-width:841px) and (hover:hover), screen and (min-width:1025px) {
 .app-shell.app-shell:is(.academy-theme,.staff-theme) { height:100dvh; min-height:0; overflow:hidden; }
 .app-shell.app-shell:is(.academy-theme,.staff-theme) .app-main { display:flex; flex-direction:column; height:100dvh; min-height:0; max-height:100dvh; overflow:hidden; }
 .app-shell.app-shell:is(.academy-theme,.staff-theme) .app-main > .topbar { flex:0 0 auto; position:relative; inset:auto; }
 .app-shell.app-shell:is(.academy-theme,.staff-theme) .app-main > main { flex:1 1 auto; height:auto; min-height:0; overflow-y:auto; overflow-x:clip; }
 #root.review-sandbox-root .app-shell.app-shell:is(.academy-theme,.staff-theme),#root.review-sandbox-root .app-shell.app-shell:is(.academy-theme,.staff-theme) .app-main { height:100%; min-height:0; max-height:100%; }
 .app-shell.app-shell:is(.academy-theme,.staff-theme) .sidebar { position:fixed; inset:0 auto 0 0; box-sizing:border-box; display:flex; flex-direction:column; height:100vh; height:100dvh; min-height:0; max-height:100dvh; overflow:hidden; }
 .app-shell:is(.academy-theme,.staff-theme) .sidebar > .brand { flex-shrink:0; }
 .app-shell:is(.academy-theme,.staff-theme) .sidebar > nav { flex:1 1 auto; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; }
 :is(.review-sandbox-root,.partner-space-root) .app-shell.app-shell:is(.academy-theme,.staff-theme) .sidebar { height:100%; max-height:100%; }
 #root.review-sandbox-root .app-shell.app-shell:is(.academy-theme,.staff-theme) .sidebar { top:48px; height:calc(100dvh - 48px); max-height:calc(100dvh - 48px); }
}
@media(max-width:600px) {
 .app-shell.app-shell.academy-theme .topbar { padding:6px 10px; gap:6px; flex-wrap:nowrap; min-height:64px; }
 .app-shell.academy-theme .topbar .account-chip { margin:0; }
 .app-shell.academy-theme .topbar .academy-profile-button>span { display:none; }
 .app-shell.academy-theme .topbar .header-reward { display:none; }
 .app-shell.academy-theme .topbar-actions { gap:2px; }
 .app-shell.academy-theme .topbar .compact-page-heading h1 { font-size:18px; }
 .student-return { padding:8px 12px 0; }
}

.academy-tab-schedule .cabinet-policy-owner>.kicker { display:none; }
.academy-tab-schedule .student-policy-compact { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 16px; }
.academy-tab-schedule .student-policy-compact>button { min-height:44px; padding:8px 12px; gap:8px; border-radius:8px; font-size:13px; }
.academy-tab-schedule .student-policy-compact>button>svg { width:18px; height:18px; }
/* Explicit placement keeps the action row out of the calendar's side column. */
.app-shell.academy-theme .academy-schedule-screen {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,300px);
  grid-template-areas:"actions actions" "calendar sidebar";
  align-items:start;
  align-content:start;
  gap:16px;
  height:auto;
  min-height:0;
}
.academy-schedule-screen>.schedule-actions {
  grid-area:actions;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin:0;
}
.academy-schedule-screen>.schedule-actions>.button {
  flex:0 1 auto;
  align-self:start;
  height:auto;
  min-height:44px;
  padding:10px 16px;
  font:600 14px/1.4 var(--font-ui);
}
.academy-schedule-screen>.academy-week-panel { grid-area:calendar; min-width:0; padding:18px; }
.academy-schedule-screen>.academy-schedule-rail { grid-area:sidebar; display:grid; grid-template-columns:minmax(0,1fr); gap:14px; min-width:0; }
.academy-schedule-screen .academy-week-panel>header { align-items:start; flex-wrap:wrap; gap:10px 16px; padding-bottom:14px; }
.academy-schedule-screen .academy-week-panel h2 { display:flex; align-items:center; gap:9px; font:500 27px/1.2 var(--font-display); margin:6px 0 0; }
.academy-schedule-screen .academy-week-panel>header>span { font:12px/1.5 var(--font-ui); max-width:230px; }
.academy-schedule-screen .academy-schedule-meta { gap:8px; margin-top:12px; }
.academy-schedule-screen .academy-schedule-meta>span { min-height:30px; padding:6px 10px; font:12px/1.3 var(--font-ui); }
.academy-schedule-screen .academy-course-months { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:14px; margin-top:16px; align-items:start; }
.academy-schedule-screen .academy-course-month { height:auto; min-height:0; }
.academy-schedule-screen .academy-course-month>header { min-height:44px; padding:10px 12px; gap:12px; }
.academy-schedule-screen .academy-course-month h3 { font:500 20px/1.25 var(--font-display); }
.academy-schedule-screen .academy-course-month>header>span { font:12px/1.4 var(--font-ui); color:#b5a78f; }
.academy-schedule-screen .course-calendar-row { grid-template-columns:34px minmax(0,1fr); align-items:start; gap:10px; min-height:64px; padding:12px 10px; }
.academy-schedule-screen .course-calendar-row time { width:32px; height:32px; font:600 12px/1 var(--font-ui); }
.academy-schedule-screen .course-calendar-row b { display:block; overflow:visible; -webkit-line-clamp:unset; white-space:normal; overflow-wrap:break-word; font:500 15px/1.4 var(--font-display); }
.academy-schedule-screen .course-calendar-row small { display:block; overflow:visible; -webkit-line-clamp:unset; font:11px/1.5 var(--font-ui); color:#b8aa94; margin-top:5px; }
.academy-schedule-screen .course-calendar-row.break :is(time,b,small) { color:#a69a87; }
.academy-schedule-screen .academy-schedule-rail>article { padding:16px; }
.academy-schedule-screen .academy-schedule-rail h2 { font:500 22px/1.3 var(--font-display); margin:6px 0 12px; }
.academy-schedule-screen .schedule-rail-row { grid-template-columns:52px minmax(0,1fr); gap:12px; padding:12px 0; }
.academy-schedule-screen .schedule-rail-row b { font:500 14px/1.4 var(--font-ui); }
.academy-schedule-screen .schedule-rail-row small { font:12px/1.5 var(--font-ui); margin-top:4px; }
.academy-schedule-screen .academy-exams>div { grid-template-columns:60px minmax(0,1fr); padding:12px 0; }
.academy-schedule-screen .academy-exams span { font:13px/1.5 var(--font-ui); }
.academy-schedule-screen .academy-schedule-quote { min-height:210px; }
.academy-schedule-screen .academy-schedule-quote p { font:italic 16px/1.4 var(--font-display); }
@media(max-width:1100px) {
  .app-shell.academy-theme .academy-schedule-screen { grid-template-columns:minmax(0,1fr); grid-template-areas:"actions" "calendar" "sidebar"; }
  .academy-schedule-screen>.academy-schedule-rail { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); }
  .academy-schedule-screen .academy-schedule-quote { grid-column:auto; }
}
@media(max-width:600px) {
  .app-shell.academy-theme .academy-schedule-screen { gap:12px; }
  .academy-schedule-screen>.schedule-actions { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
  .academy-schedule-screen>.schedule-actions>.button { width:100%; justify-content:center; }
  .academy-schedule-screen>.academy-week-panel { padding:12px; }
  .academy-schedule-screen .academy-week-panel h2 { font-size:25px; }
  .academy-schedule-screen .academy-course-months { grid-template-columns:minmax(0,1fr); gap:12px; }
  .academy-schedule-screen .course-calendar-row b { font-size:16px; }
  .academy-schedule-screen .course-calendar-row small { font-size:12px; }
}

/* Mobile contract: natural page flow, complete navigation, reachable actions.
   Interactive games keep their viewport and horizontal page navigation. */
.academy-mobile-menu { color: #f2dfbd; border: 1px solid #9e773d; background: #101116; }
.academy-mobile-menu::backdrop { background: #030409c9; backdrop-filter: blur(5px); }
/* Mobile document scroll: one page surface, with room below the fixed navigation. */
@media screen and (max-width: 840px), screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .app-shell.app-shell:is(.academy-theme,.staff-theme),
  .app-shell.app-shell:is(.academy-theme,.staff-theme) .app-main {
    display: block;
    height: auto;
    min-height: 100svh;
    max-height: none;
    overflow: visible;
  }
  .app-shell.app-shell:is(.academy-theme,.staff-theme) #main-content {
    display: block;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding-bottom: calc(var(--mobile-nav-height, 72px) + 24px);
  }
  /* Every route receives the safe-area allowance from main, including short pages. */
  .app-shell.app-shell:is(.academy-theme,.staff-theme) #main-content > :is(.page,.student-cabinet,.staff-cabinet) {
    padding-bottom: 16px !important;
  }
  .academy-mobile-menu > nav > button {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 12px;
    border: 1px solid #b1894e33;
    border-radius: 10px;
    background: transparent;
    color: #e4d0af;
    text-align: left;
    font: inherit;
  }
}
/* End mobile document scroll. */
/* Course chapter destination: keep its heading below the sticky mobile top bar. */
@media screen and (max-width: 840px), screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .app-shell .academy-current-tasks > header h2 { scroll-margin-top: 88px; }
}
/* End course chapter destination. */
/* Game preview mobile sizing: keep the introduction ahead of decorative artwork. */
@media screen and (max-width: 840px), screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .app-shell .preview-modal { display: block; width: min(600px, 100%); max-height: calc(100dvh - 16px); overscroll-behavior: contain; }
  .app-shell .preview-modal .preview-art { height: clamp(120px, 22dvh, 180px); min-height: 0; max-height: 180px; aspect-ratio: auto; }
  .app-shell .preview-modal .preview-cover { object-fit: cover; object-position: center 42%; }
  .app-shell .preview-modal .preview-art > span { position: absolute; padding: 16px; font-size: 34px; line-height: 1; }
  .app-shell .preview-modal .modal-close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .app-shell .preview-modal .preview-copy { min-width: 0; padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .app-shell .preview-modal .preview-copy h2 { margin: 8px 0; font-size: clamp(26px, 7vw, 32px); line-height: 1.15; overflow-wrap: anywhere; }
  .app-shell .preview-modal .preview-copy blockquote { margin: 0 0 12px; font-size: 16px; line-height: 1.4; }
  .app-shell .preview-modal .preview-copy > p { margin: 12px 0; font-size: 15px; line-height: 1.5; }
  .app-shell .preview-modal .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
  .app-shell .preview-modal .detail-list span { min-width: 0; font-size: 13px; line-height: 1.4; }
  .app-shell .preview-modal .detail-list span:last-child { grid-column: 1 / -1; }
  .app-shell .preview-modal .detail-list svg { flex-shrink: 0; width: 18px; height: 18px; }
  .app-shell .preview-modal .tag-row { flex-wrap: wrap; gap: 6px; }
  .app-shell .preview-modal .prototype-note { margin: 12px 0; padding: 10px; }
  .app-shell .preview-modal .prototype-note p { font-size: 13px; line-height: 1.5; }
  .app-shell .preview-modal .button-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 14px; }
  .app-shell .preview-modal .button-row .button { width: 100%; min-height: 48px; padding: 10px 12px; font-size: 15px; line-height: 1.35; white-space: normal; }
  .app-shell .preview-modal .preview-copy .game-test-description { font-size: 13px; line-height: 1.5; }
}
/* End game preview mobile sizing. */
@media screen and (max-width: 840px), screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  :root { --mobile-nav-height: calc(72px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-bottom: calc(var(--mobile-nav-height) + 16px); }
  .app-shell :is(input, textarea, select) { font-size: 16px; }
  .app-shell :is(button, a, input, textarea, select) { touch-action: manipulation; }
  .app-shell :is(button, a):focus-visible { outline: 2px solid #f0c579; outline-offset: 3px; }
  .app-shell :is(input, textarea, select, button) { scroll-margin-block: 90px; }
  .app-shell :is(.page, .student-cabinet, .staff-cabinet, .standalone-treasury, .standalone-store) { padding-bottom: calc(var(--mobile-nav-height) + 24px); }
  .app-shell.academy-theme .app-main, .app-shell.staff-theme .app-main { width: 100%; min-width: 0; margin-left: 0; }
  .app-shell .sidebar { display:none; }
  .app-shell .mobile-brand { display:flex; }
  .app-shell.app-shell:is(.academy-theme,.staff-theme) :is(.page,.student-cabinet,.staff-cabinet) button { min-width:44px; min-height:48px; }
  .app-shell.app-shell:is(.academy-theme,.staff-theme) :is(.page,.student-cabinet,.staff-cabinet) small { font-size:12px; line-height:1.45; }
  .app-shell:is(.academy-theme,.staff-theme) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select) { font-size:16px !important; }
  .app-shell .topbar { position: sticky; top: 0; width: 100%; min-height: 64px; padding: 8px 12px; gap: 8px; z-index: 40; }
  .app-shell .topbar-actions { min-width: 0; max-width: 100%; gap: 8px; }
  .app-shell .topbar .academy-profile-button { min-width: 0; min-height: 48px; padding: 4px; gap: 8px; }
  .app-shell .topbar .academy-profile-button img { flex: 0 0 40px; width: 40px; height: 40px; object-fit: contain; }
  .app-shell .topbar .academy-profile-button span { min-width: 0; }
  .app-shell .topbar .academy-profile-button b { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .app-shell .topbar .academy-profile-button small { max-width: 160px; font-size: 10px; }
  .app-shell .topbar .account-chip { min-width: 0; gap: 4px; }
  .app-shell .topbar :is(.account-chip > button, .icon-button) { display: inline-flex; align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 48px; }
  .app-shell .topbar .classroom-launch { min-width: 48px; min-height: 48px; }
  .app-shell .topbar .academy-role-control { min-width: 0; min-height: 48px; padding: 6px; }
  .app-shell .topbar .academy-role-control > span { display: grid; min-width: 64px; }
  .app-shell .topbar .academy-role-control > span small { display: none; }
  .app-shell .topbar .academy-role-control > span b { font-size: 12px; line-height: 1.2; }
  .app-shell.academy-theme .topbar .academy-role-switcher .academy-profile-button { display: flex; }
  .app-shell .topbar .academy-role-control select { max-width: 110px; }
  .app-shell .topbar .academy-role-switcher { display: flex; align-items: center; grid-template-columns: none; min-width: 0; width: auto; gap: 6px; margin-left: 0; }
  .app-shell .topbar .academy-role-switcher .academy-role-control { flex: 1; }
  .app-shell .mobile-brand { flex-shrink: 0; }
  .app-shell .mobile-brand .brand-copy { display: none; }
  .app-shell .mobile-nav.academy-mobile-navigation { position:fixed; inset:auto 0 0; z-index:50; display:grid; width:100%; max-width:100%; grid-template-columns:repeat(5,minmax(0,1fr)); min-height:var(--mobile-nav-height); padding:0 4px env(safe-area-inset-bottom); border-top:1px solid #b1894e55; background:#0c0d12f5; backdrop-filter:blur(14px); }
  .app-shell .academy-mobile-navigation :is(a, button) { display: grid; place-items: center; align-content: center; gap: 5px; min-width: 0; min-height: 68px; padding: 6px 2px; border: 0; background: transparent; color: #b7aa95; text-decoration: none; }
  .app-shell .academy-mobile-navigation :is(a.active, button[aria-expanded="true"]) { color: #f0c579; background: #dba85212; border-radius: 8px; }
  .app-shell .academy-mobile-navigation span { max-width:100%; font-size:12px; line-height:1.25; font-weight:600; overflow-wrap:anywhere; text-align:center; }
  .academy-mobile-menu { inset: auto 0 0; margin: auto auto 0; width: min(100%, 560px); max-width: 100%; max-height: calc(100dvh - 24px); padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; overflow-y: auto; overscroll-behavior: contain; }
  .academy-mobile-menu > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid #b1894e55; }
  .academy-mobile-menu small { color: #c79e5d; font-size: 10px; letter-spacing: .06em; }
  .academy-mobile-menu h2 { margin: 4px 0 0; font: 28px/1.2 var(--font-display); }
  .academy-mobile-menu > header button { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #9e773d; border-radius: 12px; background: #252020; color: #f0c579; }
  .academy-mobile-menu > nav { display: grid; gap: 8px; padding-top: 16px; }
  .academy-mobile-menu > nav a { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px; color: #e4d0af; border: 1px solid #b1894e33; border-radius: 10px; text-decoration: none; }
  .academy-mobile-menu > nav a.active { border-color: #c79e5d; background: #3c2d1e; color: #ffe0a6; }
  .app-shell :is(.academy-page-banner, .complete-page-header, .staff-page-heading) h1 { font-size: clamp(28px, 7vw, 40px); line-height: 1.15; overflow-wrap: anywhere; }
  .app-shell :is(.academy-page-banner, .complete-page-header) p { font-size: 15px; line-height: 1.5; }
  .app-shell .complete-tabs { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; gap: 8px; padding: 8px 0; margin: 0 0 16px; }
  .app-shell .complete-tabs button { width: 100%; max-width: none; min-height: 48px; padding: 10px 8px; white-space: normal; font-size: 14px; }
  .app-shell :is(.academy-library-categories, .academy-friends-tabs, .staff-months, .shop-filters) button { min-height: 48px; }
  .app-shell :is(.academy-library-search, .academy-friends-search) input { min-height: 48px; font-size: 16px; }
  .app-shell .staff-cabinet :is(.button, input, select) { min-height: 48px; }
  .app-shell .staff-result-row { flex-wrap: wrap; gap: 8px; }
  .app-shell .staff-welcome { grid-template-columns: minmax(0,1fr); }
  .app-shell .staff-welcome > div { padding: 20px; }
  .app-shell .staff-welcome img { width: 100%; height: 230px; min-height: 0; object-fit: contain; }
  .app-shell .staff-mobile-sections select { min-width: 0; }
  .app-shell .staff-page-heading { flex-wrap: wrap; }
  .app-shell .staff-heading-tools { max-width: 100%; }
  .app-shell .staff-panel :is(.staff-row, .staff-result-row) { min-width: 0; overflow-wrap: anywhere; }
  .app-shell .staff-panel :is(table, .table-scroll) { max-width: 100%; }
  /* QR is a core teacher action, including on a phone. */
  .app-shell .classroom-lobby .qr-panel { display: grid; width: 100%; padding: 20px; }
  .app-shell .classroom-lobby .qr-panel img { width: min(240px,100%); height: auto; margin: auto; }
  .app-shell .classroom-modal { height: 100dvh; padding: 0; overflow-y: auto; }
  .app-shell :is(.create-classroom, .join-classroom) { width: 100%; max-width: 100%; min-width: 0; padding: 72px 16px 24px; }
  .app-shell :is(.create-classroom, .join-classroom) h1 { font-size: 30px; }
  .app-shell :is(.classroom-modal, .classroom-shell) :is(button, input, select) { min-height: 48px; }
  .app-shell .classroom-modal .modal-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; }
  .app-shell .classroom-topbar { flex-wrap: wrap; }
  .app-shell .classroom-topbar .room-code { display: inline; font-size: 14px; }
  .app-shell .classroom-main { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .app-shell .class-timer { position: static; }
  .app-shell .classroom-shell .timer-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; width: 100%; }
  .app-shell .classroom-shell .timer-actions button { min-width: 0; min-height: 48px; justify-content: center; white-space: normal; font-size: 13px; padding: 8px; }
  .app-shell .video-controls { flex-wrap: wrap; }
  .app-shell .video-controls button { flex: 1 1 140px; }
  .app-shell .shared-board canvas { width: 100%; min-height: 0; aspect-ratio: 1200/650; touch-action: none; }
  .app-shell .board-tools { flex-wrap: wrap; }
  .app-shell :is(.treasury-collection-dialog, .modal-card, .academy-book-reader) { max-width: 100%; max-height: calc(100dvh - 16px); overflow-y: auto; }
  .app-shell :is(.treasury-showcase-grid, .shop-grid) { grid-template-columns: minmax(0,1fr); }
  /* Keep the chest in its own grid row; desktop artwork is absolutely positioned. */
  .app-shell .treasury-showcase-story { grid-template-columns: minmax(0,1fr); height: auto; min-height: 0; }
  .app-shell .treasury-showcase-story > img { position: static; inset: auto; justify-self: center; width: min(220px,100%); height: 180px; padding: 0 12px 12px; object-fit: contain; }
  .app-shell .treasury-showcase-story h2 { font-size: 28px; }
  .app-shell .academy-bookshelf article { min-width: 0; }
  .app-shell .academy-bookshelf article :is(h3, p, small) { overflow-wrap: anywhere; }
  .app-shell .academy-bookshelf article > button { min-height: 44px; }
  .app-shell .academy-settings-profile { grid-template-columns: minmax(0,1fr); }
  .app-shell .academy-settings-profile label { font-size: 14px; }
  .app-shell .academy-settings-profile :is(input, select, .button) { min-height: 48px; }
  .app-shell :is(.academy-progress-panel, .academy-records-panel) { min-width: 0; }
  .app-shell .academy-friends-card :is(h3, p) { overflow-wrap: anywhere; }
  .app-shell .academy-friends-card button { min-width: 44px; min-height: 44px; }
  .app-shell .academy-friend-grid article button { min-width: 44px; min-height: 44px; }
  .app-shell .academy-friend-grid :is(b, h3) { font-size: 16px; }
  .app-shell .academy-friend-grid small { font-size: 12px; line-height: 1.4; }
  .app-shell .academy-friends-directory > header { flex-wrap: wrap; }
  .app-shell .academy-friends-directory > header label { width: 100%; min-height: 48px; }
  .app-shell .academy-friends-directory input { font-size: 16px; }
  .app-shell .academy-friend-tabs { display: flex; overflow-x: auto; }
  .app-shell .academy-friend-tabs button { flex: 0 0 auto; min-height: 48px; padding: 10px 14px; font-size: 13px; }
  .app-shell .academy-store-toolbar > div { flex-wrap: wrap; overflow: visible; }
  .app-shell .academy-store-toolbar button { min-height: 44px; padding: 8px 12px; font-size: 13px; }
  .app-shell .academy-store-pager button { min-width: 44px; min-height: 44px; }
  .app-shell .academy-badge-collection :is(h3, b) { font-size: 16px; }
  .app-shell .academy-badge-collection article button { min-height: 44px; font-size: 13px; }
  .app-shell .academy-record-grid > div { grid-template-columns: minmax(0,1fr); justify-items: center; }
  .app-shell .academy-record-grid svg { grid-row: auto; }
  .app-shell .academy-record-grid small { font-size: 11px; white-space: normal; text-align: center; }
  .app-shell .academy-messages-compose { grid-template-columns: minmax(0,1fr) auto; }
  .app-shell .academy-messages-compose textarea { font-size: 16px; }
  .app-shell .academy-messages-compose button { min-width: 48px; min-height: 48px; }
  .app-shell .academy-message-composer textarea { font-size: 16px; }
  .app-shell .academy-message-composer > button { min-width: 48px; min-height: 48px; }
  .app-shell .academy-messages-close { width: 48px; height: 48px; }
  .app-shell .academy-book-reader :is(button, input) { min-height: 44px; }
  .app-shell .academy-book-reader .academy-book-close { min-width: 48px; }
}
@media screen and (max-width: 840px) and (max-height: 500px) {
  .app-shell .detailed-game .detailed-stage .game-pages.game-pages { grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto auto; padding: 6px; gap: 4px; }
  .app-shell .detailed-game .game-pages-heading { grid-column: 1; grid-row: 1; display: none; }
  .app-shell .detailed-game .game-pages-heading :is(.kicker, .advanced-board-head p, .board-title > svg) { display: none; }
  .app-shell .detailed-game .game-pages-heading :is(.board-title, .advanced-board-head) { padding-bottom: 4px; }
  .app-shell .detailed-game .game-pages-heading h2 { font-size: 16px; line-height: 1.15; margin: 0; }
  .app-shell .detailed-game .game-pages-index { display: none; }
  .app-shell .detailed-game .game-pages-viewport { grid-column: 1; grid-row: 2; }
  .app-shell .detailed-game .game-pages-notices { grid-column: 1; grid-row: 3; }
  .app-shell .detailed-game .game-pages-controls { grid-column: 1; grid-row: 4; padding-top: 4px; }
}
@media screen and (max-width: 480px) {
  .app-shell .topbar .mobile-brand { display: none; }
  .app-shell .topbar .topbar-actions { width: 100%; justify-content: space-between; }
  .app-shell .topbar .xp-pill { display: none; }
  .app-shell .topbar .icon-button { display: none; }
  .app-shell.academy-theme .topbar .topbar-actions .icon-button { display: none; }
  .app-shell.academy-theme .topbar .topbar-actions .icon-button.academy-demo-exit { display: inline-flex; }
  .app-shell .topbar .academy-demo-exit { display: inline-flex; }
  .app-shell .topbar .academy-role-copy small { display: none; }
  .app-shell .topbar .academy-profile-button b { max-width: 116px; }
  .app-shell .topbar .academy-role-control select { max-width: 86px; }
  .app-shell .topbar .academy-role-control > svg { width: 16px; }
  .app-shell .academy-friend-grid { grid-template-columns: minmax(0,1fr); }
  .app-shell .academy-course-months { grid-template-columns: minmax(0,1fr); }
  .app-shell .academy-course-months :is(b, h3) { font-size: 16px; }
  .app-shell .academy-course-months small { font-size: 12px; }
  .app-shell .academy-tab-library .academy-bookshelf > div { grid-template-columns: minmax(0,1fr); }
  .app-shell .academy-tab-library .academy-bookshelf article { min-height: 0; }
  .app-shell .academy-tab-library .academy-bookshelf article img { height: 250px; object-fit: contain; }
  .app-shell .academy-tab-library .academy-bookshelf article h3 { font-size: 20px; }
  .app-shell .academy-tab-library .academy-bookshelf article small { font-size: 12px; }
}
/* A short landscape phone still gets a usable game, not a clipped canvas. */
@media screen and (max-width: 840px), screen and (max-height: 500px) and (pointer: coarse) {
  .app-shell .detailed-game.game-overlay { height: 100dvh; min-height: 0; grid-template-rows: auto auto minmax(0,1fr) auto auto; }
  .app-shell .detailed-game .detailed-stage { min-height: 0; padding: 8px; }
  .app-shell .detailed-game .detailed-header { min-height: 56px; padding: 6px 8px; }
  .app-shell .detailed-game .detailed-header :is(b, h1) { font-size: 16px; line-height: 1.2; }
  .app-shell .detailed-game .mode-track button { min-height: 48px; font-size: 11px; }
  .app-shell .detailed-game .game-pages-viewport { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 2px; scroll-padding-block: 12px; }
  .app-shell .detailed-game .game-page-block[data-visible="false"] { transform: translateY(calc(-100% - 12px)); }
  .app-shell .detailed-game .game-page-block :is(input, textarea, select) { font-size: 16px; }
  .app-shell .detailed-game .game-page-block :is(button, input, select) { min-height: 44px; }
  .app-shell .detailed-game .game-page-block .burrow-live-map .burrow-map-scene { width: 100%; height: clamp(180px,52vw,220px); min-height: 0; aspect-ratio: auto; }
  .app-shell .detailed-game .game-pages-controls button { min-width: 48px; min-height: 48px; }
  .app-shell .detailed-game .game-pages-index { min-height: 0; overflow-y: auto; }
  .app-shell .detailed-game .mouse-reactions.is-side { position: static; grid-row: 4; justify-self: center; margin: 0; transform: none; }
  .app-shell .detailed-game .mouse-reactions.is-side .mouse-reaction-dock { flex-direction: row; }
  .app-shell .detailed-game .mouse-reactions.is-side .mouse-reaction-dock button { width: 44px; height: 44px; min-height: 44px; min-width: 44px; }
  .app-shell .detailed-game .detailed-footer { grid-row: 5; min-height: 48px; padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); }
  .app-shell .detailed-game .detailed-footer p { display: none; }
  .app-shell .detailed-game .case-team-trigger { min-height: 44px; }
  .app-shell .case-team-panel { top: 12px; right: 8px; bottom: 12px; width: calc(100% - 16px); max-height: none; padding: 16px; overflow-y: auto; z-index: 1200; }
  .app-shell .case-team-panel :is(button, input, textarea) { min-height: 48px; }
  .app-shell .case-team-panel :is(input, textarea) { font-size: 16px; }
  .app-shell .case-team-panel .icon-button { min-width: 48px; }
  .app-shell .detailed-game .academy-defense .defense-route { overflow-y: auto; }
  .app-shell .detailed-game .academy-defense > header { flex-wrap: wrap; }
  .app-shell .detailed-game .academy-defense .defense-tools { flex-wrap: wrap; }
  .app-shell .detailed-game .academy-defense .defense-tools button { min-height: 44px; font-size: 12px; }
  .app-shell .detailed-game .academy-defense .defense-route article.is-current { padding: 14px; margin-block: 0; }
}
@media screen and (max-width: 840px) and (max-height: 500px) {
  .app-shell .detailed-game.game-overlay { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr) auto; }
  .app-shell .detailed-game .mouse-reactions.is-side { grid-column: 1; grid-row: 4; justify-self: end; align-self: center; margin-right: 8px; }
  .app-shell .detailed-game .detailed-footer { grid-column: 1; grid-row: 4; padding-right: 216px; }
}

/* Game field mobile readability: keep complete tasks and reactions within reach. */
.future-association-entry { display: grid; gap: 12px; }
@media screen and (max-width: 840px), screen and (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .app-shell .detailed-game.game-overlay:not(.is-stage-defense) { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto minmax(0,1fr) auto; }
  .app-shell .detailed-game:not(.is-stage-defense) > .detailed-header { grid-column: 1; grid-row: 1; }
  .app-shell .detailed-game:not(.is-stage-defense) > .mode-track { grid-column: 1; grid-row: 2; }
  .app-shell .detailed-game:not(.is-stage-defense) > .detailed-stage { grid-column: 1; grid-row: 4; }
  .app-shell .detailed-game:not(.is-stage-defense) > .detailed-footer { grid-column: 1; grid-row: 5; padding-right: 8px; }
  .app-shell .detailed-game:not(.is-stage-defense) > .mouse-reactions.is-side { position: relative; inset: auto; grid-column: 1; grid-row: 3; justify-self: stretch; align-self: stretch; justify-items: center; margin: 0; padding: 4px 8px 0; width: 100%; transform: none; z-index: 130; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-dock { flex-direction: row; justify-content: center; width: min(100%,360px); padding: 3px; gap: 4px; border-radius: 12px; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-dock button { display: flex; align-items: center; justify-content: center; flex: 1 1 0; gap: 2px; width: auto; height: 44px; min-width: 44px; min-height: 44px; padding: 2px; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-dock button img { width: 28px; height: 36px; object-fit: contain; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-dock button span { position: static; width: auto; height: auto; clip: auto; clip-path: none; overflow: visible; white-space: normal; font-size: 11px; line-height: 1.2; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-live { width: min(100%,360px); }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-pop { top: 54px; right: 0; bottom: auto; grid-template-columns: 48px minmax(0,1fr); gap: 8px; min-width: 0; width: min(240px,100%); min-height: 64px; padding: 6px 12px; border-radius: 14px; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-pop img { width: 48px; height: 52px; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-pop b { font-size: 18px; line-height: 1.3; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reaction-pop small { font-size: 12px; overflow-wrap: anywhere; }
  .app-shell .detailed-game .mode-track button { font-size: 12px; line-height: 1.3; }
  .app-shell .detailed-game .game-pages-heading h2 { font-size: 22px; line-height: 1.25; }
  .app-shell .detailed-game .game-page-block { font-size: 16px; line-height: 1.5; }
  .app-shell .detailed-game .game-page-block p { font-size: 16px; line-height: 1.5; }
  .app-shell .detailed-game .future-association-intro .future-association-instructions { font-size: 16px; line-height: 1.5; margin: 0; }
  .app-shell .detailed-game .future-association-intro .future-word-inputs { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .app-shell .detailed-game .future-association-intro .future-word-inputs label { min-height: 50px; }
  .app-shell .detailed-game .future-association-intro .future-word-inputs input { font-size: 16px; min-height: 48px; min-width: 0; }
  .app-shell .detailed-game .future-association-intro .future-association-privacy { font-size: 13px; line-height: 1.45; }
  .app-shell .detailed-game .future-association-intro .future-association-actions { gap: 8px; }
  .app-shell .detailed-game .future-association-intro .future-association-actions > span { font-size: 13px; }
  .app-shell .detailed-game .future-association-intro .future-association-actions .button { font-size: 14px; min-height: 48px; padding: 8px 12px; }
  .app-shell .detailed-game .future-association-intro .future-example-cloud { max-height: none; overflow: visible; }
  .app-shell .detailed-game .future-association-intro .future-example-options button { font-size: 14px; min-height: 44px; }
  .app-shell .detailed-game .detailed-stage .game-pages.future-association-intro { display: block; overflow-y: auto; overscroll-behavior: contain; padding: 12px; scroll-padding-block: 12px; }
  .app-shell .detailed-game .future-association-intro .game-pages-heading { display: block; margin-bottom: 12px; }
  .app-shell .detailed-game .future-association-intro .game-pages-index { display: flex; flex-direction: row; justify-content: center; padding: 0; margin-bottom: 12px; border: 0; overflow: visible; }
  .app-shell .detailed-game .future-association-intro .game-pages-index > span { display: none; }
  .app-shell .detailed-game .future-association-intro .game-pages-index button { min-width: 44px; min-height: 44px; }
  .app-shell .detailed-game .future-association-intro .game-pages-viewport { display: block; height: auto; overflow: visible; container-type: normal; }
  .app-shell .detailed-game .future-association-intro .game-pages-notices { margin-top: 16px; }
  .app-shell .detailed-game .future-association-intro .game-pages-controls { margin-top: 12px; }
}
@media screen and (max-width: 360px) {
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reactions.is-side .mouse-reaction-dock button { flex-direction: column; height: 60px; gap: 0; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reactions.is-side .mouse-reaction-dock button img { height: 28px; }
  .app-shell .detailed-game:not(.is-stage-defense) .mouse-reactions.is-side .mouse-reaction-dock button span { min-height: 26px; display: flex; align-items: center; justify-content: center; }
}
/* End game field mobile readability. */

/* One viewport, semantic pages. No scaling, clipping or document scrolling. */
.detailed-game .game-pages .training-own-variant { min-width: 0; padding: 12px; border: 1px dashed var(--field-accent); border-radius: 12px; background: rgba(214,163,83,.06); }
.detailed-game .game-pages .training-own-variant.is-active { border-style: solid; }
.detailed-game .game-pages .training-own-trigger { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--field-accent); border-radius: 8px; background: transparent; color: var(--cream); font-size: 17px; font-weight: 600; cursor: pointer; }
.detailed-game .game-pages .training-own-trigger[aria-pressed="true"] { background: rgba(214,163,83,.16); }
.detailed-game .game-pages .training-own-editor { display: grid; gap: 8px; margin-top: 12px; }
.detailed-game .game-pages .training-own-editor label { color: var(--cream); font-size: 17px; font-weight: 600; line-height: 1.4; }
.detailed-game .game-pages .training-own-editor textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 100px; padding: 12px; border: 1px solid var(--field-accent); border-radius: 8px; background: #0e0f13; color: var(--cream); font-family: inherit; font-weight: 400; font-size: 17px; line-height: 1.5; resize: vertical; }
.detailed-game .game-pages .training-own-editor textarea::placeholder { color: #b9ac94; }
.detailed-game .game-pages .training-own-editor small { color: #d4c6ad; font-size: 13px; }
.detailed-game .game-pages .training-own-trigger:focus-visible,.detailed-game .game-pages .training-own-editor textarea:focus-visible { outline: 2px solid var(--field-accent); outline-offset: 3px; }
/* The task stays prominent after pagination removes its training-panel wrapper. */
.detailed-game .game-pages .burrow-task-prompt {
  margin: 8px 0 16px;
  padding: clamp(12px,1.4vw,20px);
  border: 1px solid var(--field-accent);
  border-inline-start-width: 4px;
  border-radius: 8px;
  background: rgba(214,163,83,.08);
  color: var(--cream);
  font: 600 clamp(24px,2.2vw,36px)/1.3 var(--font-display);
  text-align: start;
  overflow-wrap: break-word;
  max-inline-size: 100%;
}
.team-preparation { min-width: 0; min-height: 0; overflow-y: auto; padding: clamp(16px,3vw,32px); border: 1px solid #aa8143; border-radius: 14px; background: radial-gradient(ellipse at top right,#49301966,transparent 65%),#0e0f13; color: #f3e6cf; }
.team-preparation h2,.practice-introduction h2 { margin: 8px 0 12px; font: 500 clamp(26px,3vw,38px)/1.2 var(--font-display); color: #f1d39c; }
.team-preparation p,.practice-introduction p { max-width: 80ch; font-size: 16px; line-height: 1.5; color: #d4c6ad; }
.team-preparation-steps { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0; list-style: none; margin: 20px 0; }
.team-preparation-steps li { display: flex; align-items: center; gap: 10px; }
.team-preparation-steps li > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #f1d39c; border: 1px solid #aa8143; }
.team-identity-card { padding: 20px; border: 1px solid #aa8143; border-radius: 12px; background: #211a14; }
.team-identity-heading { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.team-identity-heading > svg { width: 40px; height: 40px; color: #d4a85f; }
.team-identity-heading h3 { margin: 4px 0; font: 500 28px/1.2 var(--font-display); }
.team-identity-heading > b { margin-left: auto; color: #d4a85f; }
.team-identity-card ul { padding: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; list-style: none; }
.team-identity-card li { display: flex; gap: 12px; align-items: center; padding: 12px; background: #0e0f13; border: 1px solid #aa814366; border-radius: 8px; }
.team-identity-card li > span { color: #d4a85f; }
.team-identity-card li div { min-width: 0; flex: 1; }
.team-identity-card li b { display: block; overflow-wrap: anywhere; }
.team-identity-card li small,.team-identity-heading small { color: #ccb99a; }
.team-identity-card li svg { color: #d4a85f; width: 18px; }
.team-preparation-wait { padding: 20px; border: 1px dashed #aa8143; border-radius: 12px; }
.team-preparation-wait h3 { font: 500 24px/1.2 var(--font-display); margin: 10px 0; }
.team-preparation-status,.team-preparation-note { display: flex; align-items: center; gap: 12px; margin: 16px 0; font-size: 14px; color: #d4c6ad; }
.team-preparation-status svg,.team-preparation-note svg { flex: 0 0 24px; color: #d4a85f; }
.team-preparation-note p { margin: 0; font-size: 14px; }
.team-preparation footer { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 12px; }
.team-preparation footer .button { white-space: normal; }
.team-preparation-test { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.team-preparation-test p { margin: 8px 0 12px; font-size: 14px; }
.game-test-label { display: block; margin-top: 4px; color: var(--gold, #d4a85f); font-size: 12px; line-height: 1.3; }
.case-practice.game-overlay { height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr); color: #f3e6cf; background: #0e0f13; }
.case-practice .game-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px; border-bottom: 1px solid #aa8143; }
.case-practice .game-header > div { flex: 1; }
.case-practice .game-header span { display: block; color: #d4a85f; }
.case-practice main { min-height: 0; overflow-y: auto; padding: clamp(16px,3vw,32px); }
.practice-introduction { margin-bottom: 24px; }
.practice-introduction small { display: flex; align-items: center; gap: 8px; color: #d4a85f; }
.practice-introduction .button { margin: 12px 12px 0 0; }
.practice-catalog { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); gap: 16px; }
.practice-case { display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid #aa8143; border-radius: 12px; background: linear-gradient(145deg,#302118,#101116 75%); color: #f3e6cf; text-align: left; }
.practice-case:hover,.practice-case:focus-visible { border-color: #f1d39c; background: #302118; }
.practice-case h3 { margin: 10px 0; font: 500 24px/1.2 var(--font-display); }
.practice-case p { margin: 0 0 12px; line-height: 1.5; font-size: 16px; }
.practice-case small { color: #ccb99a; margin-bottom: 20px; }
.practice-case > b { margin-top: auto; color: #f1d39c; }
.practice-case .kicker { display: flex; gap: 8px; align-items: center; }
.practice-case .kicker svg { width: 16px; }
@media(max-width:600px) {
  .team-preparation footer { flex-direction: column; }
  .team-preparation footer .button { width: 100%; min-height: 48px; }
  .team-identity-heading > b { margin-left: 0; }
  .detailed-game .practice-trigger { min-height: 40px; font-size: 12px; padding: 6px 10px; }
}
.detailed-game.game-overlay { height: 100dvh; grid-template-rows: auto auto minmax(0,1fr) auto; --field-accent: #d4a85f; }
.detailed-game { --lime: #d4a85f; }
.detailed-game .mode-track { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: 100%; min-width: 0; overflow: visible; }
.detailed-game .mode-track button { min-width: 0; }
.detailed-game .detailed-stage { display: grid; grid-template-rows: minmax(0,1fr); overflow: hidden; padding: 12px 76px 12px 12px; }
.detailed-game .detailed-stage > .board-shell,
.detailed-game .personal-shell > .board-shell { margin: 0; width: 100%; max-width: none; }
.detailed-game .detailed-header { min-height: 64px; padding: 10px 18px; }
.detailed-game .mode-track button { min-height: 44px; }
.detailed-game .detailed-footer { min-height: 48px; padding: 5px 18px; }
.detailed-game .detailed-footer p { font-size: 12px; line-height: 1.3; }
.detailed-game .game-helper-bar { display: none; }
.detailed-game .personal-shell { display: grid; grid-template-rows: auto minmax(0,1fr) auto; min-height: 0; height: 100%; padding: 0; gap: 8px; }
.detailed-game .private-banner { margin: 0; padding: 8px 12px; }
.detailed-game .personal-finish { margin: 0; padding: 0; }
.detailed-game .personal-finish .button { min-height: 42px; }
.detailed-game .detailed-stage .game-pages.game-pages { display: grid; align-items: stretch; align-content: stretch; grid-template-columns: 154px minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto auto; gap: 10px 16px; height: 100%; min-height: 0; padding: 16px; overflow: hidden; color: #f3e6cf; border: 1px solid rgba(214,163,83,.36); border-radius: 12px; background: radial-gradient(ellipse at top right,rgba(116,66,26,.13),transparent 55%),#0e0f13; }
.game-pages-heading { grid-column: 1/-1; min-width: 0; }
.case-book-intro { display: grid; grid-template-columns: clamp(200px,22vw,300px) minmax(0,1fr); align-items: center; gap: 24px; padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.detailed-game .case-brief-book .game-pages-viewport { overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; }
.case-book-story { min-width: 0; padding: 0; }
.case-book-story h3,.case-book-start h3 { margin: 8px 0 12px; font: 500 28px/1.15 var(--font-display); }
.case-book-story p,.case-book-start p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.case-book-art { display: grid; gap: 10px; min-width: 0; margin: 0; }
.case-book-art img { display: block; width: 100%; height: auto; max-height: min(420px,48dvh); aspect-ratio: 2/3; object-fit: contain; object-position: center; border-radius: 8px; }
.case-book-art figcaption { color: var(--muted); font-size: 13px; line-height: 1.45; }
.case-book-intro .case-book-story h3 { font-size: clamp(26px,2vw,36px); }
.case-book-intro .case-book-story p { margin: 0; max-width: 900px; font-size: clamp(17px,1.2vw,22px); line-height: 1.55; }
.case-book-task { display: grid; gap: 16px; }
.case-book-launch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.case-book-launch p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.case-book-launch .button { flex-shrink: 0; }
@media (max-width:759px) { .case-book-launch { flex-direction: column; align-items: stretch; gap: 10px; } .case-book-launch .button { width: 100%; } }
.detailed-game .game-page-block .armor-sectors { grid-template-columns: repeat(2,minmax(0,1fr)); min-height: 0; }
.detailed-game .detailed-stage .game-pages.game-pages { width: 100%; max-width: none; margin: 0; --field-accent: #d4a85f; }
.detailed-game .game-helper { display: none; }
.detailed-game .game-pages-heading :is(.board-title,.advanced-board-head) { margin: 0; padding: 0 0 10px; border-bottom: 1px solid rgba(214,163,83,.24); }
.game-pages-heading h2 { margin: 4px 0; font: 500 clamp(22px,2.2vw,34px)/1.15 var(--font-display); color: #f1d39c; }
.game-pages-heading .advanced-board-head p { margin: 0; font-size: 13px; }
.game-pages-index { grid-column: 1; grid-row: 2/5; display: flex; flex-direction: column; gap: 7px; padding-right: 12px; min-width: 0; border-right: 1px solid rgba(214,163,83,.24); }
.game-pages-index > small { color: #bca47d; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.game-pages-index button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px; border: 1px solid rgba(214,163,83,.25); border-radius: 7px; background: #16151a; color: #c3b49e; text-align: left; }
.game-pages-index button[aria-current] { color: #f4d59e; border-color: #c49b59; background: #33251c; }
.game-pages-index i { font-style: normal; color: #d4a85f; font-size: 12px; }
.game-pages-index button span { font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.game-page-gap { display: block; text-align: center; color: #927b59; }
.detailed-game .university-board .game-pages-viewport { overflow-y: auto; overflow-x: hidden; scroll-padding-block: 12px; }
.university-score-panel .score-controls { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.university-score-panel .source-legend { margin: 0; flex-wrap: wrap; }
.university-score-panel .score-table { gap: 12px; padding: 14px; }
.university-score-panel .score-control { min-width: 0; }
.university-score-running { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--cream); font-size: 15px; line-height: 1.4; }
.university-score-running strong { color: var(--field-accent); font-size: 20px; font-variant-numeric: tabular-nums; }
.university-score-running.is-match { border-color: var(--field-accent); }
@media(max-width:760px) { .university-score-panel .score-controls { grid-template-columns: minmax(0,1fr); } .university-score-running { padding: 8px 10px; font-size: 13px; } .university-score-running strong { font-size: 18px; } }
.game-pages-viewport { position: relative; grid-column: 2; grid-row: 2; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.game-page-block { display: flow-root; flex: 0 0 auto; width: 100%; min-width: 0; }
.game-page-block[data-visible="false"] { position: absolute; top: 0; left: 0; visibility: hidden; pointer-events: none; }
.game-page-block > * { max-width: 100%; margin-top: 0; margin-bottom: 0; }
.detailed-game .game-pages-heading .advanced-board-head h2 { font: 500 30px/1.15 var(--font-display); color: #f1d39c; }
.detailed-game .game-page-block .advanced-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
.detailed-game .game-page-block .advanced-options button { min-height: 44px; padding: 8px; font-size: 13px; }
.detailed-game .game-page-block :is(h2,h3) { font-family: var(--font-display); color: #efd29d; }
.detailed-game .game-page-block :is(.mini-card-grid,.value-card-grid,.burrow-question-grid,.future-line,.advanced-route,.task-belt,.placement-deck,.cheese-route,.armor-bottom,.personal-question-list,.personal-route-fields,.three-road-inputs,.case-reveal-grid,.split-zones,.university-routes) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
/* Reading pages have room for the case itself. Do not inherit the old
   compressed workshop's 10px body copy or 14px titles at short heights. */
.detailed-game .game-pages .case-reveal-grid section { min-width: 0; padding: clamp(16px,1.25vw,24px); border-radius: 14px; text-align: start; }
.detailed-game .game-pages .case-reveal-grid section > span { display: block; color: var(--field-accent); font-size: 12px; line-height: 1.5; letter-spacing: .08em; }
.detailed-game .game-pages .case-reveal-grid h3 { margin: 8px 0 12px; color: var(--cream); font-size: clamp(24px,1.6vw,30px); line-height: 1.3; font-weight: 600; overflow-wrap: break-word; }
.detailed-game .game-pages .case-reveal-grid :is(p,ul) { margin: 0; color: var(--cream); font-size: clamp(18px,1.2vw,22px); line-height: 1.55; font-weight: 400; max-width: 70ch; max-height: none; overflow: visible; }
.detailed-game .game-pages .case-reveal-grid ul { padding-inline-start: 1.2em; }
.detailed-game .game-pages .case-reveal-grid li + li { margin-top: 8px; }
.detailed-game .game-pages .case-reveal-grid small { display: block; margin-top: 12px; color: var(--cream); font-size: 17px; line-height: 1.5; }
.detailed-game .game-page-block .advanced-station { grid-column: auto; min-height: 0; }
.detailed-game .game-page-block .advanced-station { padding: 12px; }
.detailed-game .game-page-block :is(.toggle-card,.advanced-options button) { min-height: 48px; font-size: 14px; line-height: 1.35; }
.detailed-game .game-page-block .field-header { margin: 0 0 10px; }
.detailed-game .game-page-block .field-header h3 { font-size: 21px; }
.detailed-game .game-page-block .field-header p { font-size: 13px; }
.detailed-game .game-page-block textarea { min-height: 76px; max-height: 130px; resize: none; font-size: 15px; }
.detailed-game .game-page-block label > span { display: block; margin-bottom: 6px; color: #ceb891; font-size: 13px; }
.detailed-game .game-page-block :is(.board-exit,.burrow-step-actions) { margin: 0; }
.detailed-game .game-page-block .future-line article { min-height: 0; }
.detailed-game .game-page-block .fog-scene { height: 220px; min-height: 0; }
.detailed-game .game-page-block .board-mouse { min-height: 220px; max-height: 220px; }
.detailed-game .game-page-block .burrow-live-map { margin: 0; }
.detailed-game .game-page-block .burrow-live-map .burrow-map-scene { height: 150px; min-height: 0; }
.detailed-game .game-page-block .burrow-live-map { padding: 10px; }
.detailed-game .game-page-block .burrow-map-current p { max-height: none; overflow: visible; font-size: 12px; }
.detailed-game .game-page-block .field-card b { font-size: 14px; line-height: 1.35; }
.detailed-game .game-page-block .field-card > small { font-size: 12px; line-height: 1.35; }
.detailed-game .game-pages .burrow-question-selection { min-height: 0; padding: 16px; gap: 12px; }
.detailed-game .game-pages .question-selection-count { margin: 0; color: var(--field-accent); font-size: 16px; font-weight: 700; }
.detailed-game .game-pages .question-priority { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0; padding-top: 12px; }
.detailed-game .game-pages .question-priority > b { grid-column: 1 / -1; font-size: 15px; line-height: 1.4; }
.detailed-game .game-pages .question-priority > button { min-height: 48px; padding: 12px; font-size: 16px; line-height: 1.45; }
.detailed-game .game-pages .question-priority small { display: block; margin-bottom: 4px; color: var(--field-accent); font-size: 13px; font-weight: 700; }
.detailed-game .game-pages .burrow-question-selection .burrow-step-actions .button { min-height: 48px; padding: 10px 14px; font-size: 16px; white-space: nowrap; }
.detailed-game .game-pages.burrow-workshop .linked-question { min-height: 0; padding: 16px; gap: 12px; overflow: visible; }
.detailed-game .game-pages.burrow-workshop .game-pages-viewport { overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scroll-padding-block: 12px; }
.detailed-game .game-pages.burrow-workshop .linked-check-review { display: grid; gap: 16px; margin-top: 8px; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice { display: grid; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .field-section-heading { margin: 0; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .field-section-heading h3 { font-size: clamp(22px,1.7vw,28px); line-height: 1.3; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .field-section-heading p { display: block; font-size: 16px; line-height: 1.5; }
.detailed-game .game-pages.burrow-workshop .obstacle-selector { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--lime); border-radius: 12px; background: #272217; min-width: 0; }
.detailed-game .game-pages.burrow-workshop .obstacle-selector label { font-size: 20px; font-weight: 700; color: var(--cream); }
.detailed-game .game-pages.burrow-workshop .obstacle-selector p { margin: 0; display: block; font-size: 17px; line-height: 1.5; }
.detailed-game .game-pages.burrow-workshop .obstacle-selector select { width: 100%; min-width: 0; min-height: 52px; padding: 12px; border: 1px solid var(--lime); border-radius: 8px; color: var(--cream); background: #101216; font: inherit; font-size: 18px; }
.detailed-game .game-pages.burrow-workshop .obstacle-selector select:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.detailed-game .game-pages.burrow-workshop .obstacle-selected { display: flex; align-items: center; gap: 12px; }
.detailed-game .game-pages.burrow-workshop .obstacle-selected > svg { width: 32px; height: 32px; flex-shrink: 0; color: var(--lime); }
.detailed-game .game-pages.burrow-workshop .obstacle-selected > div { display: grid; gap: 6px; }
.detailed-game .game-pages.burrow-workshop .obstacle-selected span { font-size: 14px; }
.detailed-game .game-pages.burrow-workshop .obstacle-selected b { font-size: 20px; line-height: 1.4; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .mini-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .field-card { min-height: 48px; padding: 12px; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .field-card b { font-size: 17px; line-height: 1.5; }
.detailed-game .game-pages.burrow-workshop .obstacle-own-variant { display: grid; gap: 10px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.detailed-game .game-pages.burrow-workshop .obstacle-own-variant > span { font-size: 18px; line-height: 1.4; font-weight: 700; color: var(--cream); }
.detailed-game .game-pages.burrow-workshop .obstacle-own-variant textarea { display: block; width: 100%; min-width: 0; min-height: 96px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--cream); font: inherit; font-size: 17px; line-height: 1.5; resize: vertical; }
.detailed-game .game-pages.burrow-workshop .obstacle-own-variant textarea:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.detailed-game .game-pages.burrow-workshop .obstacle-own-variant small { display: block; font-size: 15px; line-height: 1.5; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .burrow-step-actions { position: static; inset: auto; z-index: auto; }
.detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .burrow-step-actions .button { min-height: 48px; padding: 12px 16px; font-size: 16px; overflow-wrap: normal; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide { display: grid; gap: 12px; padding: clamp(16px,1.5vw,24px); border: 1px solid #477282; border-radius: 14px; background: #14242a; color: #d8f3ff; white-space: normal; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide > header { display: flex; align-items: center; gap: 12px; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide > header svg { width: 26px; height: 26px; flex-shrink: 0; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide h3 { margin: 0; color: #ecf8ff; font-size: clamp(22px,1.7vw,28px); line-height: 1.3; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide > p { display: block; margin: 0; font-size: 17px; line-height: 1.5; overflow: visible; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 0; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide dl > div { padding: 14px; border: 1px solid #477282; border-radius: 10px; background: #101c22; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide dt { font-size: 18px; line-height: 1.4; font-weight: 700; }
.detailed-game .game-pages.burrow-workshop .source-reading-guide dd { margin: 6px 0 0; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.detailed-game .game-pages.burrow-workshop .linked-check-review .capacity-warning { padding: 14px; font-size: 16px; line-height: 1.5; white-space: normal; }
.detailed-game .game-pages.burrow-workshop .linked-check-review .burrow-step-actions { gap: 12px; }
.detailed-game .game-pages.burrow-workshop .linked-check-review .burrow-step-actions .button { min-height: 48px; padding: 10px 16px; font-size: 16px; overflow-wrap: normal; word-break: normal; }
@media (max-width: 759px) {
  .detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice { padding: 12px; }
  .detailed-game .game-pages.burrow-workshop .obstacle-selector { padding: 12px; }
  .detailed-game .game-pages.burrow-workshop .obstacle-selector select { font-size: 16px; }
  .detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .mini-card-grid,
  .detailed-game .game-pages.burrow-workshop .burrow-obstacle-choice .burrow-step-actions { display: grid; grid-template-columns: minmax(0,1fr); }
  .detailed-game .game-pages.burrow-workshop .source-reading-guide dl { grid-template-columns: minmax(0,1fr); }
  .detailed-game .game-pages.burrow-workshop .linked-check-review .burrow-step-actions { display: grid; grid-template-columns: minmax(0,1fr); }
}
.detailed-game .game-pages.burrow-workshop .linked-question > header h3 { margin: 8px 0; font-size: clamp(22px,1.6vw,28px); line-height: 1.35; }
.detailed-game .game-pages.burrow-workshop .linked-question > header p { display: block; font-size: 16px; line-height: 1.45; }
.detailed-game .game-pages.burrow-workshop .linked-question .field-section-heading { margin: 0; }
.detailed-game .game-pages.burrow-workshop .linked-question .field-section-heading h3 { font-size: 21px; line-height: 1.3; }
.detailed-game .game-pages.burrow-workshop .linked-question .field-section-heading p { display: block; font-size: 13px; line-height: 1.4; }
.detailed-game .game-pages.burrow-workshop .linked-question .field-section-heading > span { width: 32px; height: 32px; color: var(--ink); font-size: 11px; letter-spacing: 0; }
.detailed-game .game-pages.burrow-workshop .linked-question .mini-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.detailed-game .game-pages.burrow-workshop .linked-question .field-card { min-height: 48px; padding: 10px 12px; }
.detailed-game .game-pages.burrow-workshop .linked-question .field-card b { font-size: 16px; line-height: 1.4; }
.detailed-game .game-pages .team-linked-variant { padding: 10px 12px; }
.detailed-game .game-pages .team-linked-saved { margin: 10px 0 0; font-size: 16px; line-height: 1.45; color: var(--cream); }
.detailed-game .game-pages .team-linked-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detailed-game .game-pages .team-linked-actions .button { min-height: 48px; padding: 10px 14px; font-size: 16px; }
@media (max-width: 759px) {
  .detailed-game .game-pages .burrow-question-selection { padding: 12px; }
  .detailed-game .game-pages .question-priority { grid-template-columns: minmax(0,1fr); }
  .detailed-game .game-pages .burrow-question-selection .burrow-step-actions { grid-template-columns: minmax(0,1fr); }
  .detailed-game .game-pages.burrow-workshop .linked-question { padding: 12px; }
  .detailed-game .game-pages.burrow-workshop .linked-question .mini-card-grid { grid-template-columns: minmax(0,1fr); }
}
.detailed-game .game-page-block .field-section-heading h3 { font-size: 20px; line-height: 1.2; }
.detailed-game .game-page-block .field-section-heading p { font-size: 13px; line-height: 1.35; }
.detailed-game .game-page-block .wheel-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.detailed-game .game-page-block .radar-wheel { --wheel-size: 330px !important; max-width: 100%; }
.detailed-game .game-page-block .wheel-saved-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
.game-pages-notices { grid-column: 2; grid-row: 3; }
.game-pages-notices:empty { display: none; }
.game-pages-notices .board-error { margin: 0; padding: 8px; }
.game-pages-controls { grid-column: 2; grid-row: 4; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; border-top: 1px solid rgba(214,163,83,.24); }
.game-pages-controls button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-width: 104px; min-height: 44px; padding: 8px 14px; border: 1px solid #a67f43; border-radius: 7px; background: #211d19; color: #f3d39a; font-weight: 700; }
.game-pages-controls button:last-child { background: linear-gradient(#e8bd77,#bd853f); color: #25180e; }
.game-pages-controls button:disabled { opacity: .35; cursor: default; }
.game-pages-controls svg { width: 18px; }
.game-pages-controls > span { color: #b4a58e; font-size: 12px; }
.game-pages button:focus-visible { outline: 2px solid #f2cb87; outline-offset: 3px; }
.detailed-game.is-stage-defense .detailed-stage .academy-defense.defense-screen { display: grid; height: 100%; min-height: 0; grid-template-rows: auto auto minmax(0,1fr) auto auto; grid-template-areas: 'heading' 'complete' 'route' 'notes' 'controls'; padding: 0; }
.detailed-game.is-stage-defense .academy-defense > header { grid-area: heading; }
.detailed-game.is-stage-defense .academy-defense > .defense-complete-banner { grid-area: complete; }
.detailed-game.is-stage-defense .academy-defense > .defense-route { grid-area: route; }
.detailed-game.is-stage-defense .academy-defense > .speaker-notes { grid-area: notes; }
.detailed-game.is-stage-defense .academy-defense > footer { grid-area: controls; }
.detailed-game.is-stage-defense .academy-defense.is-showing-notes > .defense-route { visibility: hidden; }
.detailed-game.is-stage-defense .academy-defense.is-showing-notes > .speaker-notes.game-pages { grid-area: route; margin: 0; height: 100%; }
.detailed-game .academy-defense .defense-route { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); padding: 16px; min-height: 0; }
.detailed-game .academy-defense .defense-route article:not(.is-current) { display: none; }
.detailed-game .academy-defense .defense-route article.is-current { display: flex; flex-direction: column; justify-content: center; gap: 16px; max-width: 1100px; width: 100%; margin: auto; min-height: 0; padding: 24px; transform: none; }
.detailed-game .academy-defense .defense-station-copy { display: block; }
.detailed-game .game-page-block,.detailed-game .defense-station-copy { overflow-wrap: anywhere; }
.detailed-game .academy-defense .defense-route article h2 { display: block; margin: 12px 0; font-size: clamp(25px,3vw,44px); line-height: 1.2; overflow: visible; -webkit-line-clamp: unset; }
.detailed-game .academy-defense .defense-route article p { font-size: 17px; display: block; overflow: visible; -webkit-line-clamp: unset; }
.detailed-game .academy-defense .defense-reaction-mouse { display: none; }
.detailed-game .academy-defense .speaker-notes { margin: 0 16px; padding: 10px 14px; }
.detailed-game .academy-defense > footer { padding: 10px 16px; }
.detailed-game .academy-defense .defense-mobile-nav { display: none; }
@media(max-width:759px) {
  .detailed-game .private-banner { min-height: 0; padding: 6px 8px; gap: 6px; }
  .detailed-game .private-banner > svg { width: 18px; height: 18px; }
  .detailed-game .private-banner b { font-size: 12px; }
  .detailed-game .private-banner span { font-size: 10px; line-height: 1.25; }
  .detailed-game .personal-finish { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .detailed-game .personal-finish .button { min-height: 44px; font-size: 10px; padding: 6px; }
  .detailed-game .personal-finish .button svg { width: 16px; }
  .detailed-game .detailed-stage { padding: 6px 44px 6px 6px; }
  .detailed-game .detailed-header { padding: 6px; min-height: 54px; }
  .detailed-game .detailed-header em,.detailed-game .game-xp,.detailed-game .detailed-footer p { display: none; }
  .detailed-game .mode-track button { padding: 5px 2px; gap: 4px; min-height: 40px; font-size: 10px; }
  .detailed-game .mode-track button > span { width: 20px; height: 20px; }
  .detailed-game .detailed-footer { min-height: 44px; padding: 3px 6px; }
  .detailed-game .mouse-reactions.is-side { right: 2px; }
  .detailed-game .mouse-reactions.is-side.is-compact .mouse-reaction-dock button { width: 30px; min-width: 30px; height: 34px; min-height: 34px; }
  .detailed-game .mouse-reactions.is-side .mouse-reaction-dock img { width: 28px; height: 28px; }
  .detailed-game .detailed-stage .game-pages.game-pages { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr) auto auto; padding: 10px; gap: 8px; }
  .game-pages-heading { grid-column: 1; grid-row: 1; }
  .game-pages-heading h2 { font-size: 20px; }
  .detailed-game .game-pages-heading .advanced-board-head h2 { font-size: 20px; }
  .game-pages-heading .kicker,.game-pages-heading .advanced-board-head p { display: none; }
  .game-pages-index { grid-column: 1; grid-row: 2; flex-direction: row; justify-content: flex-start; padding: 0; border: 0; gap: 4px; }
  .game-pages-index > div { flex: 0 0 auto; }
  .game-pages-index > small,.game-pages-index button span,.game-page-gap { display: none; }
  .game-pages-index button { min-width: 44px; min-height: 44px; padding: 5px; justify-content: center; }
  .game-pages-viewport { grid-column: 1; grid-row: 3; }
  .game-pages-notices { grid-column: 1; grid-row: 4; }
  .game-pages-controls { grid-column: 1; grid-row: 5; padding-top: 6px; }
  .game-pages-controls button { min-width: 44px; padding: 8px; }
  .game-pages-controls button span { display: none; }
  .game-pages-controls.has-next-label button:last-child span { display: block; max-width: 130px; font-size: 12px; line-height: 1.3; }
  .detailed-game .game-page-block :is(.mini-card-grid,.value-card-grid,.burrow-question-grid,.future-line,.advanced-route,.task-belt,.placement-deck,.cheese-route,.armor-bottom,.personal-question-list,.personal-route-fields,.three-road-inputs,.case-reveal-grid,.split-zones,.university-routes) { grid-template-columns: minmax(0,1fr); }
  .detailed-game .game-page-block .wheel-layout { grid-template-columns: minmax(0,1fr); }
  .detailed-game .game-page-block .radar-wheel { --wheel-size: 250px !important; }
  .detailed-game .game-page-block .field-header h3 { font-size: 18px; }
  .detailed-game .game-page-block .armor-sectors { grid-template-columns: minmax(0,1fr); }
  .case-book-intro { grid-template-columns: 90px minmax(0,1fr); align-items: start; gap: 12px; padding: 12px; }
  .case-book-art { display: contents; }
  .case-book-art img { grid-column: 1; grid-row: 1; width: 90px; max-height: none; }
  .case-book-art figcaption { grid-column: 1/-1; grid-row: 2; font-size: 12px; }
  .case-book-intro .case-book-story { grid-column: 2; grid-row: 1; padding: 0; }
  .case-book-intro .case-book-story h3 { font-size: 22px; }
  .case-book-intro .case-book-story p { font-size: 16px; }
  .case-book-story h3,.case-book-start h3 { font-size: 22px; }
  .case-book-story p,.case-book-start p { font-size: 14px; }
  .detailed-game .game-page-block .advanced-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detailed-game .academy-defense > header { padding: 8px; gap: 6px; }
  .detailed-game .academy-defense .defense-tools button { font-size: 10px; }
  .detailed-game .academy-defense .defense-route { padding: 8px; }
  .detailed-game .academy-defense .defense-route article.is-current { padding: 14px; gap: 8px; }
  .detailed-game .academy-defense .defense-route article h2 { font-size: 24px; }
  .detailed-game .academy-defense .defense-route article p { font-size: 14px; }
  .detailed-game .academy-defense .speaker-notes { margin: 0 8px; padding: 8px; }
  .detailed-game .academy-defense .speaker-notes p { font-size: 12px; }
  .detailed-game .academy-defense > footer > p { display: none; }
}
/* The first lesson keeps a persistent question and one example panel.
   Never flatten the panel into anonymous, unstyled native buttons. */
.detailed-game .future-association-intro .game-pages-viewport { container-type: size; }
.detailed-game .future-association-intro .future-association-heading { display: block; }
.detailed-game .future-association-intro .future-association-heading h2 {
  max-width: 980px;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
}
.detailed-game .future-association-intro .future-association-instructions {
  max-width: 980px;
  color: #d3c5af;
  font-size: 15px;
  line-height: 1.45;
}
.detailed-game .future-association-intro .future-word-inputs {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.detailed-game .future-association-intro .future-word-inputs label { min-height: 48px; }
.detailed-game .future-association-intro .future-word-inputs label > span { display: grid; margin: 0; }
.detailed-game .future-association-intro .future-word-inputs input { min-height: 46px; padding-inline: 12px; font-size: 17px; }
.detailed-game .future-association-intro .future-example-cloud { max-height: 100cqh; padding: 16px; overflow-y: auto; overscroll-behavior-y: contain; }
.detailed-game .future-association-intro .future-example-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.detailed-game .future-association-intro .future-example-options button { min-height: 44px; font-size: 15px; }
.detailed-game .future-association-intro .future-example-cloud p { margin-top: 12px; color: #c3b49e; font-size: 13px; line-height: 1.4; }
.detailed-game .future-association-intro .future-association-actions { margin: 0; }
.detailed-game .future-association-intro .future-association-actions .button { min-width: 0; white-space: normal; }
.detailed-game .future-association-intro .future-association-privacy { font-size: 12px; line-height: 1.35; }
@media (max-width: 759px) {
  .detailed-game .future-association-intro .future-association-heading h2 { font-size: 18px; line-height: 1.2; }
  .detailed-game .future-association-intro .future-word-inputs { grid-template-columns: minmax(0,1fr); }
  .detailed-game .future-association-intro .future-association-instructions { font-size: 13px; }
  .detailed-game .future-association-intro .future-example-cloud { padding: 12px; }
  .detailed-game .future-association-intro .future-example-cloud > span { font-size: 16px; }
  .detailed-game .future-association-intro .future-example-options button { font-size: 13px; padding: 8px; }
  .detailed-game .future-association-intro .future-association-actions { flex-direction: row; align-items: center; gap: 8px; }
  .detailed-game .future-association-intro .future-association-actions > span { flex-shrink: 0; font-size: 11px; }
  .detailed-game .future-association-intro .future-association-actions .button { width: auto; min-height: 44px; padding: 8px; font-size: 12px; }
}
@media print {
  .detailed-game .game-pages,.detailed-game .personal-shell { display: block; height: auto; overflow: visible; }
  .game-pages-index,.game-pages-controls { display: none; }
  .game-pages-viewport { display: block; }
  .game-page-block[data-visible="false"] { position: static; visibility: visible; }
  .game-page-block { break-inside: avoid; margin-bottom: 16px; }
  .detailed-game .academy-defense .defense-route article:not(.is-current) { display: block; }
}

.private-test-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:12px;margin:12px 0;min-width:0}
.private-test-entry>.field-label{display:grid;gap:8px;min-width:0;margin:0}
.private-test-entry select,.private-test-entry .private-test-launch{width:100%;min-width:0;max-width:100%;min-height:48px;margin:0}
.private-test-entry .private-test-launch{white-space:normal;overflow-wrap:anywhere}
.private-test-entry .button:hover:not(:disabled){transform:none}
.private-test-feedback{grid-column:1/-1;min-block-size:4.5em;font-size:14px;line-height:1.5;overflow-wrap:anywhere;align-content:start}
.private-test-feedback p{margin:0;font-size:inherit;line-height:inherit}
.private-test-entry .private-test-resume{grid-column:1/-1;white-space:normal}
.classroom-shell.classroom-with-live-rail{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,300px);align-content:start;gap:16px}.classroom-with-live-rail>.classroom-topbar{grid-column:1/-1}.classroom-with-live-rail>.classroom-main{min-width:0}.classroom-with-live-rail>.teacher-live-rail{grid-column:2;grid-row:2;min-width:0;align-self:start}.classroom-with-live-rail>.mouse-reactions{grid-column:1/-1}
.teacher-live-rail{display:grid;gap:16px}.teacher-live-rail section{border:1px solid var(--border,#695333);border-radius:16px;padding:16px;background:var(--surface,#11131a)}.teacher-live-rail h2{font-size:20px;margin:0 0 12px}.teacher-live-rail h2 span{float:right;font-size:18px}.teacher-live-rail p{font-size:14px}.teacher-live-rail small{display:block;font-size:12px;opacity:.75;margin-top:10px}.teacher-live-rail ul{list-style:none;padding:0;margin:0;max-height:50vh;overflow:auto}.teacher-live-rail li{display:flex;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid var(--border,#695333);overflow-wrap:anywhere}.live-presence-dot{width:8px;height:8px;flex:none;border-radius:50%;background:#9abd86}.teacher-live-rail .button{white-space:normal;width:100%;font-size:14px;text-align:center}.teacher-live-rail video,.teacher-camera-publisher video,.lecture-audio-receiver video{display:block;width:100%;max-height:320px;aspect-ratio:16/9;object-fit:contain;background:#000;border-radius:10px}.teacher-live-rail video[hidden],.teacher-camera-publisher video[hidden]{display:none}.teacher-camera-publisher{scroll-margin-top:20px}.teacher-camera-publisher video{max-width:560px;margin:12px 0}
@media(max-width:1000px){.classroom-shell.classroom-with-live-rail{grid-template-columns:minmax(0,1fr)}.classroom-with-live-rail>.teacher-live-rail{grid-column:1;grid-row:auto;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.classroom-with-live-rail>.teacher-live-rail{grid-template-columns:minmax(0,1fr)}.private-test-entry{grid-template-columns:minmax(0,1fr);align-items:stretch}}
.lecture-audio-receiver video[hidden]{display:none}
.teacher-camera-publisher>.controller-actions{justify-content:flex-end;gap:12px;margin-top:12px}
.teacher-camera-publisher>video,.teacher-controller-portal>.teacher-camera-publisher>video{max-width:420px;max-height:240px;object-fit:contain}
