.seminar-settings{margin:1rem 0;color:#edf2e7}
.world-choice{border:0;padding:0;margin:0 0 .8rem;display:flex;gap:.45rem;flex-wrap:wrap}
.world-choice legend{font-weight:700;margin-bottom:.4rem}
.world-choice label{position:relative;cursor:pointer}
.world-choice input{position:absolute;opacity:0;width:1px;height:1px}
.world-choice span{display:block;border:1px solid #688681;background:#22343b;border-radius:6px;padding:.4rem .8rem;font-size:.92rem}
.world-choice input:checked+span{background:#c3f1d9;color:#12392f;border-color:#c3f1d9;font-weight:750}
.world-choice input:focus-visible+span{outline:3px solid #ffc879;outline-offset:2px}
.subject-line{display:flex;align-items:center;flex-wrap:wrap;gap:.4rem 1rem}.subject-line select{margin-left:.3rem}
.subject-line>span{color:#c5d8cd;font-size:.9rem}
.member-info{margin:.5rem 0;font-size:.9rem}.member-info p{margin:.45rem 0}
#member-status:empty{display:none}
[data-world=classroom] .title-tome,[data-world=classroom] .hero-tome{display:none}
[data-world=classroom] :is(.launch,.title-screen){background:#172b2a;border-color:#816947}
[data-world=classroom] .archive-title,[data-world=classroom] .quest-title{color:#ffe9b2}
[data-world=classroom] .arcane-art img:first-child{object-position:68% center}
[data-world=classroom] .launch .archive-art .court-scene{object-position:73% center}
[data-world=classroom] :is(.arcane-art img:first-child,.launch .court-scene) {image-rendering:pixelated}
.seminar-world {
  position:relative; isolation:isolate; overflow:hidden; display:grid;
  grid-template-columns:minmax(0,44%) minmax(0,1fr); align-items:center;
  gap:.55rem .9rem; padding:.55rem .85rem .8rem; background:#192f30;
}
.seminar-world .world-hud {position:static;grid-column:1/-1;gap:.5rem}
.seminar-world .world-hud span {background:#203e37;color:#fbefc9;border:1px solid #829886}
.seminar-scene {position:relative;aspect-ratio:2;overflow:hidden;border:1px solid #af976d;background:#324c46}
.pixel-lecture {position:absolute;inset:0;background:url(assets/seminar-poses.png?v=2) no-repeat 0% center / 500% 100%;image-rendering:pixelated}
[data-pose=call] .pixel-lecture {background-position:25% center}
[data-pose=urgent] .pixel-lecture {background-position:50% center}
[data-pose=nod] .pixel-lecture {background-position:75% center}
[data-pose=next] .pixel-lecture {background-position:100% center}
.seat-call {position:absolute;left:3%;top:12%;display:none;max-width:42%;padding:.2em .55em;color:#243327;background:#fff0bd;border:1px solid #634c37;box-shadow:2px 2px #44383a;font-weight:800;font-size:clamp(.84rem,1.5vw,1.12rem);line-height:1.25}
[data-pose=call] .seat-call,[data-pose=next] .seat-call {display:block}
[data-pose=next] .seat-call {color:#381e22;background:#ffdb9e}
#call-count {position:absolute;right:.3rem;top:.3rem;min-width:1.6em;text-align:center;color:#fff1c6;background:#703c30;border:1px solid #f5bf86;padding:.1em .3em;font:800 clamp(1.1rem,2.15vw,1.8rem)/1.1 var(--mono);font-variant-numeric:tabular-nums}
.seat-call::after {content:'';position:absolute;left:100%;bottom:2px;border:5px solid transparent;border-left-color:#fff0bd}
[data-pose=next] .seat-call::after {border-left-color:#ffdb9e}
.professor-question {min-width:0;margin:0;padding:.4rem .55rem;color:#fff5d4}
.professor-question small {display:block;color:#b2d9c9;font-weight:650;font-size:.875rem}
.professor-question p {margin:.4rem 0 0;font:650 clamp(1rem,1.85vw,1.27rem)/1.55 "Hiragino Mincho ProN",serif;overflow-wrap:anywhere}
.call-track {position:relative;grid-column:1/-1;height:2px;margin:1.15rem 4.5rem .25rem .6rem;background:#c3d9bc}
.call-track #book-position {top:0}
.call-slip,.call-bell {position:absolute;bottom:-5px;display:block;white-space:nowrap;line-height:1.2;font-size:.82rem;font-weight:800}
.call-slip {transform:translateX(-20%);background:#ffedb0;color:#322d26;padding:3px 7px;border:1px solid #79613c;border-radius:3px}
.call-bell {left:100%;margin-left:.32rem;color:#f5f3d8;background:#324b40;padding:4px;border-radius:3px}
.chalk-progress {position:absolute;bottom:0;left:0;right:0;height:4px;background:#253f38}
.chalk-progress i {display:block;height:100%;background:#8cdbc4}
.seminar-world[data-urgent=true] .call-track,.seminar-world[data-urgent=true] .chalk-progress i {background:#f4af74}
.seminar-world[data-urgent=true] #file-deadline {background:#663e30;color:#ffefcd;border-color:#eab589}
.seminar-world .file-stamp {color:#fef1ad;background:#254d40;z-index:2}
[data-world=classroom] .arena .stage {border-color:#607c67}
@media(prefers-reduced-motion:no-preference){
  [data-pose=call][data-resting=false] .seat-call {animation:called-in .28s ease-out}
  [data-pose=next][data-resting=false] .seat-call {animation:called-in .18s ease-out}
  [data-pose=urgent] .pixel-lecture {transform:scale(1.055);transform-origin:58% 55%;transition:transform .22s ease-out}
  @keyframes called-in {from{translate:0 -4px}to{translate:0 0}}
}
.round-review {margin:1.35rem 0;padding:clamp(.8rem,2vw,1.4rem);border:1px solid #526964;border-radius:8px;background:#1b292d;color:#edf4e8}
.round-review h2 {margin:.1rem 0 .35rem}
.round-review .eyebrow {margin:0;color:#b7dace}
.slow-practice {display:grid;gap:.55rem;margin:0 0 1rem}
.slow-practice .btn {justify-self:start}
.slow-words {display:flex;flex-wrap:wrap;gap:.3rem 1.2rem;padding:0;margin:0;list-style:none}
.slow-words li {display:flex;gap:.48rem;align-items:baseline;overflow-wrap:anywhere}
.slow-words span,.review-time {font-variant-numeric:tabular-nums;color:#afeed7;white-space:nowrap}
.review-tools {display:flex;align-items:center;flex-wrap:wrap;gap:.35rem .8rem}
.review-tools h2 {margin-right:auto;font-size:1.16rem}
.review-tools label {font-size:.9rem;cursor:pointer}
.review-list {list-style:none;display:grid;margin:.45rem 0;padding:0}
.review-row {display:grid;grid-template-columns:2rem minmax(0,1fr) max-content max-content;align-items:center;gap:.18rem .7rem;border-bottom:1px solid #435854;padding:.36rem 0}
.review-word {min-width:0;display:flex;align-items:baseline;flex-wrap:wrap;gap:0 .7rem}
.review-word strong {overflow-wrap:anywhere}
.review-word small,.review-number {color:#bfd1ca}
.review-number {font:650 .9rem var(--mono)}
.review-retry .btn,.review-tools .btn {padding:.27rem .55rem;min-height:32px;font-size:.88rem}
.review-row :is(.miss-detail,.retry-comparison) {grid-column:2/-1;min-width:0}
.miss-detail summary {cursor:pointer;color:#ffcdab;font-weight:650}
.miss-detail ol {list-style:none;padding:0;margin:.35rem 0}
.miss-detail li {display:flex;align-items:baseline;gap:.18rem .65rem;flex-wrap:wrap;margin:.28rem 0}
.miss-detail kbd {font:700 .99rem var(--mono);background:#162a28;border:1px solid #6c8e81;border-radius:3px;padding:.08rem .28rem;overflow-wrap:anywhere}
.miss-detail .wrong-key {color:#ffccad;background:#3b2e2a;border-color:#9a7866}
.context-line {font-size:.86rem;color:#c1d4ce;overflow-wrap:anywhere}
.retry-comparison {margin:.4rem 0;color:#f2daab;font-size:.92rem}
.review-empty {color:#c1d4ce}.round-review [hidden] {display:none}
@media(max-width:650px){
  .seminar-world {grid-template-columns:minmax(0,38%) minmax(0,1fr);padding:.4rem .45rem .7rem;gap:.35rem}
  .professor-question {padding:.15rem .25rem}.professor-question p {font-size:.95rem;line-height:1.42}
  .professor-question small {font-size:.8rem}
  .seat-call {font-size:.69rem}
  .review-row {grid-template-columns:1.1rem minmax(0,1fr) max-content max-content;gap:.18rem .36rem}.review-word {display:grid}.review-time {font-size:.9rem}
}

@media(min-width:700px){
  .recap-lead {display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:stretch;gap:.65rem;margin:.6rem 0}
  .recap-lead :is(.challenge-verdict,.score-summary) {margin:0;padding:.85rem 1rem}
  .recap-lead .score-summary {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:.45rem}
}
@media(min-width:651px) and (max-height:820px){
  .seminar-world {grid-template-columns:minmax(0,35%) minmax(0,1fr);gap:.24rem .8rem}
  .seminar-scene {width:min(100%,39vh);justify-self:center}
  .arena .race-head {padding-block:2px}
  .arena .call-track {margin-top:.85rem}
}

/* Lecture halls use continuous architectural illustrations outside the pixel stage. */
body[data-campus] {
  --campus-art:url("assets/campus-easy.webp");
  --class-strip:url("assets/lecture-easy-poses.png");
  --hall:#193530; --hall-deep:#122725; --hall-trim:#7bac91; --hall-light:#c8ecd1;
  --chalk:#ffe2a6; --nightwash:rgba(9,21,23,.54);
  position:relative;isolation:isolate;min-height:100svh;background:var(--hall-deep);
}
body[data-campus=regular] {
  --campus-art:url("assets/campus-regular.webp");--class-strip:url("assets/lecture-regular-poses.png");
  --hall:#3d2b32;--hall-deep:#2b2029;--hall-trim:#ae8279;--hall-light:#f1cbb4;--chalk:#ffdfa3;--nightwash:rgba(28,16,28,.52);
}
body[data-campus=expert] {
  --campus-art:url("assets/campus-expert.webp");--class-strip:url("assets/lecture-expert-poses.png");
  --hall:#2c2940;--hall-deep:#1f1c30;--hall-trim:#94829e;--hall-light:#e7c9d8;--chalk:#ffda94;--nightwash:rgba(17,13,31,.44);
}
body[data-campus]::before {content:"";position:fixed;z-index:-1;inset:0;pointer-events:none;
  background:linear-gradient(var(--nightwash),var(--nightwash)),var(--campus-art) center center/100% 100% no-repeat;}
body[data-world=archive]::before{filter:saturate(.72);opacity:.8}
body[data-campus] .topbar {background:var(--hall-deep);border-color:var(--hall-trim)}
body[data-campus] .site-footer {color:#e0ded6;padding-inline:.7rem;background:var(--hall-deep)}
body[data-campus] .launch {background:var(--hall-deep);border-color:var(--hall-trim)}
body[data-campus] .launch::before {display:none}
.class-banner {display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);align-items:stretch;
  position:relative;isolation:isolate;overflow:hidden;background:var(--hall);border-bottom:1px solid var(--hall-trim)}
.class-banner::before {content:"";position:absolute;inset:0;z-index:-1;background:var(--campus-art) center 37% / cover;opacity:.36}
.banner-heading {align-self:center;padding:clamp(1.2rem,3.5vw,3.1rem);text-shadow:0 2px 8px #181d25}
.banner-heading .eyebrow {color:var(--hall-light);font-size:.88rem;letter-spacing:.15em}
.launch .banner-heading h1 {margin:.18em 0 .3em;color:#fff2d4;font:800 clamp(1.9rem,4.4vw,4.1rem)/1.22 "Hiragino Mincho ProN","Yu Mincho",serif;letter-spacing:.035em}
.banner-heading .banner-line {font:600 clamp(1.02rem,1.7vw,1.45rem)/1.6 "Hiragino Mincho ProN","Yu Mincho",serif;color:#ffedcf}
.banner-heading .banner-teacher{font-size:.9rem;color:var(--hall-light);margin-top:.2rem;letter-spacing:.12em}
.banner-portrait {display:block;width:100%;height:100%;min-height:0;aspect-ratio:320/144;object-fit:cover;image-rendering:pixelated;object-position:center 28%;
  mask-image:linear-gradient(105deg,transparent 0%,#000 10%)}
body[data-campus] .launch-copy {width:100%;max-width:none;padding:clamp(1rem,2.4vw,2.2rem)}
body[data-campus] .launch-options {display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:1.25rem 2.5rem;align-items:start}
body[data-campus] .launch-options .seminar-settings {margin:0}
body[data-campus] .launch-options .course-picker {margin-top:0}
body[data-world=classroom] .course-card:has(:checked) {background:var(--hall);border-color:var(--chalk)}
body[data-campus] .launch-copy>p.small {max-width:70em}
body[data-world=classroom] .title-screen {background:var(--hall-deep);border-color:var(--hall-trim)}
body[data-world=classroom] .arcane-art img:first-child {object-position:50% 35%}
body[data-campus] main:has(.arena){padding-top:clamp(8px,1.6vw,22px)}
body[data-campus] .arena {max-width:1060px;padding:clamp(8px,1.4vw,18px);border-radius:12px;background:var(--hall-deep);border:1px solid var(--hall-trim);box-shadow:0 12px 40px #080d1855}
body[data-campus] .arena .race-head{gap:.3rem .7rem}
.arena .lesson-music {margin-left:auto;flex-shrink:0;border:1px solid var(--hall-trim);border-radius:1rem;background:var(--hall);color:var(--hall-light);
  font:600 .85rem/1.25 var(--sans);padding:.35rem .68rem}
.arena .lesson-music:focus-visible {outline-color:var(--chalk)}
body[data-world=classroom] .arena .stage {border-color:var(--hall-trim)}
.seminar-world {grid-template-columns:minmax(0,63%) minmax(0,1fr);padding:0;gap:0;
  background:var(--hall);align-items:stretch;text-align:left}
.seminar-world .world-hud {position:static;padding:.32rem .65rem;align-items:center;background:var(--hall-deep);color:var(--hall-light)}
.seminar-world .world-hud span {color:var(--hall-light);border:0;border-radius:0;background:transparent;box-shadow:none;font-size:clamp(.8rem,1.3vw,.98rem)}
.seminar-world .world-hud #file-deadline {border-radius:3px;white-space:nowrap}
.seminar-world .seminar-scene {width:100%;height:auto;aspect-ratio:320/144;justify-self:stretch;align-self:center;border:0;background:var(--hall-deep)}
.pixel-lecture {background-image:var(--class-strip)}
.seminar-world[data-finale=true] .pixel-lecture {background-image:url("assets/lecture-expert-finale.png")}
.professor-question {display:grid;align-content:center;justify-items:start;gap:.48rem;padding:clamp(.8rem,2vw,1.65rem);color:#fff6e3}
.lecture-room {display:block;color:var(--chalk);font-weight:800;font-size:.9rem;letter-spacing:.055em}
.professor-question small {color:var(--hall-light);font-size:.85rem}
.professor-question p {margin:0;line-height:1.55;font-size:clamp(1rem,1.65vw,1.26rem);text-align:start}
.seminar-world .call-track {margin:.96rem 5.6rem .65rem 1rem}
.seminar-world .file-stamp {text-align:center}
body[data-world=classroom] .stage-top,body[data-world=classroom] .stage-bottom {background:var(--hall-deep)}
body[data-world=classroom] .incantation {background:var(--hall);border-top:1px solid var(--hall-trim)}
body[data-world=classroom] .recap .screen-header::after {background:var(--class-strip) 75% center / 500% 100% no-repeat;aspect-ratio:320/144;height:auto;width:clamp(100px,23%,210px);image-rendering:pixelated}
body[data-campus] .screen:not(.arena), body[data-campus] .overview,body[data-campus] .dashboard,body[data-campus] .audio-settings {background:var(--hall-deep);border-radius:8px;padding:clamp(.8rem,2vw,1.4rem)}
body[data-campus] .overview,body[data-campus] .dashboard {margin-top:.8rem}
@media(min-width:1100px) and (min-height:830px) {
  body[data-campus] main:has(.arena){padding-top:2rem}
}
@media(max-width:750px){
  body[data-campus] .launch-options {grid-template-columns:minmax(0,1fr);gap:.7rem}
  .class-banner {grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr)}
  .banner-heading {padding:1rem}
  .launch .banner-heading h1 {font-size:clamp(1.35rem,4.5vw,2.1rem);white-space:normal}
  .banner-heading .banner-line {font-size:.94rem}
  .banner-portrait {aspect-ratio:auto}
  body[data-campus]::before{background-size:auto,auto 100%;background-position:center,left 21% center}
}
@media(max-width:650px){
  body[data-campus] main:has(.arena) {width:calc(100% - 12px);padding-top:5px}
  body[data-campus] .arena {padding:5px}
  .seminar-world {grid-template-columns:1fr}
  .seminar-world .seminar-scene {grid-column:1/-1;max-width:460px;justify-self:center}
  .professor-question {padding:.6rem .75rem .25rem;display:flex;align-items:baseline;flex-wrap:wrap;gap:.18rem .65rem}
  .professor-question p {flex-basis:100%;font-size:1rem;line-height:1.4}
  .seminar-world .world-hud{padding:.25rem;gap:0}
  .seminar-world .world-hud span{font-size:.78rem}
  .seat-call{font-size:.85rem}
  .arena .lesson-music{font-size:.78rem}
}
@media(min-width:651px) and (max-height:820px) {
  .seminar-world {grid-template-columns:minmax(0,55%) minmax(0,1fr)}
  body[data-campus] .arena {padding:8px 12px}
}

.class-desk {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:clamp(.5rem,1.2vw,1rem);align-items:start}
.class-desk .seminar-world {grid-template-columns:minmax(0,1fr)}
.class-desk .seminar-scene {max-width:none}
.class-desk .professor-question {display:flex;flex-wrap:wrap;align-items:baseline;gap:.2rem .65rem;padding:.65rem .85rem .25rem}
.class-desk .professor-question p {width:100%;font-size:1.03rem}
.answer-console {min-width:0}
.answer-console .incantation {border:1px solid var(--hall-trim);border-radius:7px;overflow:hidden;text-align:center}
.answer-console .roman-guide {overflow-wrap:anywhere}
.answer-console .play-scoreboard {position:static;margin:.2rem 0;background:transparent}
.answer-console :is(.clock-panel,.points-panel) {display:grid;align-content:start;gap:.35rem;padding:.45rem .6rem}
.answer-console :is(.time-scale,.last-gain) {width:auto;display:flex;align-items:center;gap:.4rem;text-align:start}
.answer-console .time-scale progress {width:clamp(2rem,4vw,4rem)}
.answer-console .editor-label {display:block;margin:.35rem 0}
.answer-console .keys {max-width:100%;margin:.5rem auto}
.class-desk:has(.cover:not([hidden])) .incantation>* {visibility:hidden}
@media(max-width:760px) {
  .arena:has(.class-desk) {display:flex;flex-direction:column}
  .arena:has(.class-desk) .course-progress,.arena:has(.class-desk) .combo-hud {order:2}
  .arena:has(.class-desk)>.score-track,.arena:has(.class-desk)>.actions {order:3}
  .class-desk {display:block}
  .class-desk .seminar-scene {max-width:480px;justify-self:center}
  .class-desk .professor-question {padding:.35rem .6rem .12rem}
  .class-desk .professor-question p {font-size:.95rem;line-height:1.34}
  .arena:has(.class-desk) .race-head h1 {font-size:1.14rem;margin:0}
  .arena:has(.class-desk) .race-head .eyebrow {margin:0}
  .answer-console .keys {width:min(100%,420px)}
}
@media(max-width:480px) {
  .arena:has(.class-desk) .race-head .eyebrow,.answer-console .stage-bottom {display:none}
  .arena:has(.class-desk) .race-head {padding-block:2px;margin-bottom:3px}
  .class-desk .world-hud {line-height:1.25}
  .class-desk .world-hud span {padding:.12rem .2rem}
  .answer-console .play-scoreboard {padding:.1rem 0}
  .answer-console .clock-panel,.answer-console .points-panel {padding:.25rem .5rem;gap:.12rem}
  .answer-console .editor-label {font-size:.83rem;margin:.16rem 0}
}

/* Put the target on the same board as the action. The desk beside it holds the controls. */
.class-desk .stage {align-self:start}
.class-desk .incantation {text-align:center;border-top:1px solid var(--hall-trim)}
.play-source {padding:.45rem .8rem .55rem;text-align:start;background:var(--hall-deep);color:#f4efdf}
.play-source-heading {display:flex;align-items:baseline;gap:.5rem;line-height:1.4}
.play-source-heading span {flex:none;color:var(--hall-light);font-weight:700;font-size:.875rem}
.play-source-heading a {color:var(--chalk);font-weight:650;text-underline-offset:.15em;overflow-wrap:anywhere}
.play-source-body {position:relative;max-height:4.8em;overflow:auto;overscroll-behavior:contain;
  margin-top:.2rem;font:1rem/1.6 "Hiragino Mincho ProN","Yu Mincho",serif}
.play-source-body p {margin:0;white-space:pre-line;overflow-wrap:anywhere}
.play-source-body p+p {margin-top:.25em}
@media(max-width:760px) {
  .play-source {padding:.3rem .6rem .4rem}
  .play-source-body {max-height:3.2em}
}
.class-desk .professor-question {padding:.55rem .7rem;margin:0 0 .4rem;background:var(--hall);border:1px solid var(--hall-trim);border-radius:6px}
.arena .incantation:focus-visible {outline:2px solid var(--chalk);outline-offset:-3px}
.arena .roman-guide {font-size:clamp(1.15rem,2.4vw,1.65rem);line-height:1.45;font-variant-ligatures:none}
.roman-guide .matched {text-decoration:none;color:#93d6c1}
.next-key {color:#1c2422;background:#ffe19a;border-radius:3px;box-shadow:0 2px #c79858}
.next-key.missed {background:#ffc1a7;box-shadow:0 2px #ed835f}
.direct-feedback {margin:.18rem 0;min-height:1.35em;text-align:center;color:#ffcfad;font-weight:700}
.roman-keys {width:min(100%,520px);margin:.35rem auto;touch-action:manipulation}
.roman-keys button {min-width:0;flex:1 1 0;max-width:3rem;min-height:32px;padding:0;border:1px solid #71827f;border-radius:4px;background:#263638;color:#f5f2dd;font:600 1rem/1 var(--mono);cursor:pointer}
.roman-keys button:active,.roman-keys button:focus-visible {background:#ffdf9e;color:#20252c}
.arena:has(.class-desk) {display:flex;flex-direction:column}
.arena:has(.class-desk)>.course-progress,.arena:has(.class-desk)>.combo-hud {order:2}
.arena:has(.class-desk)>.score-track,.arena:has(.class-desk)>.actions {order:3}
.statute-reader {margin:1rem 0}
.statute-reader h2 {margin-bottom:.45rem}
.statute-reader>button {margin-bottom:.45rem}
.source-entry {border-bottom:1px solid var(--hall-trim);padding:.45rem 0}
.source-entry summary {cursor:pointer;color:#fff1cc;font-weight:700}
.source-entry summary small {font-weight:500;color:#c6d8d1;margin-inline-start:.7em}
.source-entry .statute-body {margin:.5rem 0;max-width:48em;font:500 1rem/1.85 "Hiragino Mincho ProN","Yu Mincho",serif;color:#f2f0e6}
.statute-body p {margin:.45em 0;white-space:pre-line;overflow-wrap:anywhere}
.source-jump {padding:0;background:none;border:0;font:inherit;text-decoration:underline;color:#ffdf9e;cursor:pointer}
@media(max-width:760px) {
  .class-desk .answer-console {display:flex;flex-direction:column}
  .class-desk .professor-question {order:1;margin:.35rem 0 0}
  .class-desk .play-scoreboard {margin:.1rem 0}
  .class-desk .stage-bottom {display:none}
  .direct-feedback {min-height:1.18em;margin:0;font-size:.85rem;line-height:1.18}
  .direct-play .race-head .eyebrow {display:none}
  .roman-keys .key-row {gap:2px}
  .roman-keys button {min-height:34px}
}
@media(max-height:520px) and (min-width:560px) {
  .class-desk {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .class-desk .seminar-scene {width:min(100%,75svh);justify-self:center}
  .arena:has(.class-desk) .race-head {margin:0;padding:0}
}
@media(max-width:480px) and (max-height:740px) {
  .direct-play .roman-keys {gap:2px;margin:.15rem auto}
  .direct-play .roman-keys button {min-height:31px}
  .direct-play .time-scale,.direct-play .last-gain {display:none}
}

/* Each emblem is a 24-pixel tile. Labels and controls remain native HTML. */
.course-card>span::before,.world-choice label>span::before,
.practice-item .practice-icon,body[data-world=archive] .screen-header::after {
  background-image:url("assets/menu-emblems.png");
  background-repeat:no-repeat;background-size:900% 100%;
  background-position:var(--emblem,0%) center;image-rendering:pixelated;
}
.course-card>span::before,.world-choice label>span::before {
  content:"";display:inline-block;width:1.35rem;height:1.35rem;vertical-align:middle;margin-inline-end:.28rem;
}
.course-card:has(#course-regular){--emblem:12.5%}
.course-card:has(#course-expert){--emblem:25%}
.world-choice label:has([value=classroom]){--emblem:37.5%}
.world-choice label:has([value=archive]){--emblem:50%}
.practice-item .practice-icon {width:2.35rem;height:2.35rem;flex:none;align-self:center}
.practice-item[data-action=review-history]{--emblem:62.5%}
.practice-item[data-action=prep]{--emblem:75%}
.practice-item[data-action=essays]{--emblem:87.5%}
.practice-item[data-action=measure]{--emblem:100%}
body[data-world=archive] {
  --archive-hall:url("assets/archive-hall-easy.png");--hall:#363044;--hall-deep:#211e30;
  --hall-trim:#887367;--hall-light:#e5d5bd;--chalk:#ffdea0;
}
body[data-world=archive][data-campus=regular]{--archive-hall:url("assets/archive-hall-regular.png")}
body[data-world=archive][data-campus=expert]{--archive-hall:url("assets/archive-hall-expert.png")}
body[data-world=archive]::before {background:linear-gradient(#171527b8,#171527b8),var(--archive-hall) center / cover no-repeat;image-rendering:pixelated;opacity:1;filter:none}
.archive-banner::before {background:var(--archive-hall) 20% 58% / cover;image-rendering:pixelated;opacity:.22}
.archive-banner .banner-portrait {object-position:50% 64%;mask-image:none}
body[data-world=archive] .title-art img:first-child {image-rendering:pixelated;object-position:center}
body[data-world=archive] .screen-header::after {width:clamp(42px,7vw,76px);height:auto;aspect-ratio:1;right:1rem;--emblem:50%}
body[data-world=archive] #app[data-screen=prep] .screen-header::after{--emblem:75%}
body[data-world=archive] #app[data-screen=essay] .screen-header::after{--emblem:87.5%}
body[data-world=archive] #app[data-screen=measure] .screen-header::after{--emblem:100%}
body[data-world=archive] #app[data-scene=result] .screen-header::after{--emblem:62.5%}
.library-world #spell-trails {image-rendering:pixelated}
.library-world .cast-sigil {left:71%;top:22%;width:15%;border-radius:0;border:0;box-shadow:none}
.library-world .folio-body {filter:drop-shadow(1px 2px 0 #181529)}
.library-world .folio-halo {display:none}
.beast-art {position:relative;display:block}
@media(prefers-reduced-motion:no-preference) {
  .beast-art::after {content:"";position:absolute;inset:0;background-image:url("assets/archive-creatures.png");
    background-size:400% 400%;background-position:0 var(--beast-row,0%);image-rendering:pixelated;
    animation:bestiary-frames var(--beat,1s) steps(1,end) infinite}
  .beast-art img {opacity:0}
  [data-beast=flying-grimoire]{--beast-row:33.333333%;--beat:.8s}
  [data-beast=golem]{--beast-row:66.666667%;--beat:1.25s}
  [data-beast=dragon]{--beast-row:100%;--beat:.95s}
  .library-world[data-resting=true] .beast-art::after {animation-play-state:paused}
}
@keyframes bestiary-frames {
  0%,100%{background-position-x:0%}25%{background-position-x:33.333333%}
  50%{background-position-x:66.666667%}75%{background-position-x:100%}
}
@media(max-width:480px) {
  .course-card>span::before {width:1rem;height:1rem;margin-inline-end:.15rem}
  .archive-banner {grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .archive-banner .banner-heading {padding:.7rem}
  .archive-banner .banner-line {font-size:.9rem}
  .archive-banner .banner-portrait {object-position:center}
}
