:root {
  color-scheme: light;
  --ink: #202b2a;
  --muted: #697774;
  --line: #d9e1dc;
  --paper: #f2f5f2;
  --surface: #ffffff;
  --forest: #245d53;
  --teal: #268d82;
  --coral: #d26955;
  --gold: #b48839;
  --soft-green: #e6f0eb;
  --soft-red: #fbebe7;
  --soft-gold: #f5f0df;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button, textarea, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.app-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 36px 36px;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--forest);
  border-radius: 9px;
  color: var(--forest);
  font-family: "IBM Plex Mono", monospace;
  font-size: 23px;
  font-weight: 600;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; font-weight: 700; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.run-estimate {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.live-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #46946f;
  box-shadow: 0 0 0 3px rgba(70, 148, 111, .12);
}

.run-hud {
  display: flex;
  gap: 23px;
  align-items: center;
  margin-left: auto;
}

.hud-item { min-width: 54px; }
.hud-item span, .hud-item strong { display: block; }
.hud-item span { color: var(--muted); font-size: 11px; }
.hud-item strong { margin-top: 2px; font-size: 15px; font-variant-numeric: tabular-nums; }
.health-hud strong { color: var(--coral); white-space: nowrap; letter-spacing: 1px; }

.floor-track { padding: 19px 0 22px; }
.floor-track ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.floor-track li {
  position: relative;
  min-width: 0;
  padding-top: 12px;
  border-top: 3px solid #d7dfda;
  color: #89938f;
  font-size: 12px;
  white-space: nowrap;
}

.floor-track li::before {
  position: absolute;
  top: -6px;
  left: 0;
  width: 9px;
  height: 9px;
  content: "";
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #c2ccc6;
}

.floor-track li.active { border-color: var(--coral); color: var(--ink); font-weight: 700; }
.floor-track li.active::before { background: var(--coral); }
.floor-track li.cleared { border-color: var(--forest); color: var(--forest); }
.floor-track li.cleared::before { background: var(--forest); }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  gap: 42px;
}

.expedition-column { min-width: 0; }
.floor-heading {
  min-height: 84px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 1px 0 19px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--forest);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.floor-heading h1, .lab-heading h2, .reward-view h2, .finish-view h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}

.floor-meta { display: flex; align-items: center; gap: 10px; padding-top: 19px; color: var(--muted); font-size: 12px; }
.room-badge { padding: 4px 8px; border-radius: 4px; background: var(--soft-gold); color: #775d26; font-weight: 700; }

.arena {
  min-height: 463px;
  padding: 23px 27px 18px;
  border: 1px solid #d8e1dc;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(40, 67, 56, .045);
}

.arena-topline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.enemy-mark { display: flex; gap: 3px; align-items: end; height: 15px; }
.enemy-mark span { width: 4px; background: var(--coral); border-radius: 2px 2px 0 0; }
.enemy-mark span:nth-child(1) { height: 8px; }
.enemy-mark span:nth-child(2) { height: 14px; }
.enemy-mark span:nth-child(3) { height: 10px; }
.arena-seed { margin-left: auto; color: #89938f; font-family: "IBM Plex Mono", monospace; font-size: 11px; }

.question-block { padding: 36px 0 25px; }
.question-label { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.context-line { display: flex; align-items: center; gap: 11px; margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.context-token { padding: 4px 11px; border-radius: 4px; background: var(--soft-green); color: var(--forest); font-size: 15px; font-weight: 700; }
.sentence-prompt { max-width: 760px; margin: 0; font-size: clamp(20px, 2.2vw, 27px); font-weight: 650; line-height: 1.65; }
.blank-word { display: inline-block; min-width: 76px; color: var(--coral); text-align: center; }
.question-hint { margin: 11px 0 0; color: var(--muted); font-size: 12px; }

.answer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.answer-option {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.answer-option:hover:not(:disabled), .answer-option:focus-visible:not(:disabled) { border-color: var(--teal); background: #f4faf8; outline: none; transform: translateY(-1px); }
.answer-option:disabled { cursor: default; }
.option-key { color: #99a39f; font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.answer-option.correct { border-color: #4b9a75; background: #eaf5ef; color: #215f43; }
.answer-option.incorrect { border-color: #d8735f; background: #fff0ec; color: #914b3e; }

.word-board { overflow-x: auto; margin: 4px 0 14px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9f7; }
.word-columns { min-width: 520px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.word-column { display: grid; gap: 5px; }
.wheel-cell { min-width: 0; position: relative; }
.wheel-word { width: 100%; min-height: 41px; overflow: hidden; padding: 0 21px 0 6px; border: 1px solid #d9e1dc; border-radius: 4px; background: white; cursor: grab; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.wheel-word:hover, .wheel-word:focus-visible { border-color: var(--teal); outline: 2px solid rgba(38, 141, 130, .13); }
.wheel-word.gold-word, .picker-word.gold-word { border-color: #c5ab69; background: #fbf7e9; color: #775d26; }
.wheel-word.copper-word, .picker-word.copper-word { border-color: #dba194; background: #fff2ee; color: #9b4f40; }
.wheel-controls { position: absolute; top: 2px; right: 2px; display: grid; }
.wheel-controls button { width: 16px; height: 18px; padding: 0; border: 0; background: transparent; color: #77827e; cursor: pointer; font-size: 11px; line-height: 16px; }
.sample-ledger { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.sample-ledger strong { color: var(--forest); font-family: "IBM Plex Mono", monospace; font-size: 16px; }
.sample-last { flex: 1 1 100%; min-height: 18px; padding-top: 2px; }
.board-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.board-actions > span { color: var(--muted); font-size: 11px; }
.equation-builder { margin: 2px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.equation-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.equation-title .eyebrow { margin: 0 0 2px; }
.equation-title h2 { margin: 0; font-size: 16px; }
.equation-score { color: var(--forest); font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.equation-copy { margin: 9px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.equation-slots { display: flex; align-items: center; gap: 7px; }
.equation-side { min-width: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); align-items: center; gap: 4px; }
.equation-slot { min-width: 0; min-height: 57px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 5px 7px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; text-align: left; }
.equation-slot.selected { outline: 2px solid rgba(38, 141, 130, .28); border-color: var(--teal); }
.equation-slot.empty { border-style: dashed; }
.equation-slot > span { color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.equation-slot strong { max-width: 100%; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.equation-slot small { color: var(--muted); font-size: 9px; }
.equation-operator, .equation-equals { color: #64736e; font-size: 15px; font-weight: 700; text-align: center; }
.word-picker { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.picker-word { min-height: 29px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 4px; background: white; cursor: pointer; font-size: 10px; }
.picker-word.in-equation { box-shadow: inset 0 0 0 1px currentColor; }
.picker-word small { margin-left: 4px; color: var(--muted); font-size: 8px; }
.equation-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.secondary-button, .text-button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: white; cursor: pointer; font-size: 11px; }
.secondary-button:hover { border-color: var(--teal); }
.text-button { border-color: transparent; color: var(--muted); }
.failure-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.failure-actions[hidden] { display: none; }
.map-frame { position: relative; }
.map-expand { position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--forest); cursor: pointer; font-size: 18px; }
.map-expand:hover { border-color: var(--teal); }
.vector-inspector { margin-top: 11px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.vector-inspector strong { color: var(--ink); font-size: 12px; }
.vector-inspector p { margin: 4px 0 0; overflow-wrap: anywhere; font-family: "IBM Plex Mono", "Microsoft YaHei", monospace; line-height: 1.55; }
.gold-chip { margin: 4px 4px 0 0; padding: 4px 7px; border: 1px solid #c5ab69; border-radius: 4px; background: #fbf7e9; color: #775d26; cursor: pointer; font-size: 10px; }
.gold-chip small { display: block; max-width: 255px; overflow: hidden; color: #7c7563; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.map-modal { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(25, 38, 34, .56); }
.map-modal-content { width: min(900px, 100%); padding: 18px; border-radius: 7px; background: white; box-shadow: 0 18px 55px rgba(0, 0, 0, .2); }
.map-modal-heading { display: flex; align-items: center; justify-content: space-between; }
.map-modal-heading h2 { margin: 0; font-size: 18px; }
.map-modal-heading button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 4px; background: white; cursor: pointer; font-size: 20px; }
#expanded-map { width: 100%; height: min(65vh, 560px); display: block; margin-top: 12px; }
.map-modal-content > p { color: var(--muted); font-size: 11px; }
.finish-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 7px; margin: 14px 0; }
.finish-map button { padding: 8px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; text-align: left; }
.finish-map button strong, .finish-map button span { display: block; }
.finish-map button span { margin-top: 3px; color: var(--muted); font-size: 9px; }
#finish-map-canvas { width: 100%; height: 350px; display: block; grid-column: 1 / -1; }
.finish-map .finish-vector { overflow: hidden; }

/* Focused scientific interface: a sentence composer first, then model inspection. */
:root {
  --ink: #16252f;
  --muted: #647987;
  --line: #ccd8df;
  --paper: #edf3f6;
  --surface: #ffffff;
  --forest: #176782;
  --teal: #1485a1;
  --coral: #bd654f;
  --gold: #b28a36;
  --soft-green: #e5f1f5;
  --soft-red: #f8eae5;
  --soft-gold: #f4efdF;
}
body { font-family: "Aptos", "Segoe UI", "Microsoft YaHei", sans-serif; background: #edf3f6; }
.app-shell { max-width: 1280px; padding-right: 28px; padding-left: 28px; }
.topbar { min-height: 70px; border-color: #cad7de; }
.brand-mark { border-radius: 5px; border-color: #176782; color: #176782; }
.brand strong { letter-spacing: .02em; }
.run-hud { gap: 17px; }
.floor-track { padding: 13px 0 17px; }
.floor-track li { border-top-width: 2px; font-size: 10px; }
.game-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
.floor-heading { min-height: 62px; padding-bottom: 12px; }
.floor-heading h1 { color: #132f40; font-size: 21px; }
.arena { min-height: 410px; padding: 18px 22px; border-color: #cbd8df; border-radius: 5px; box-shadow: 0 3px 12px rgba(28, 58, 73, .05); }
.arena-topline { font-family: "Aptos", "Segoe UI", sans-serif; font-size: 10px; letter-spacing: .04em; }
.question-block { padding: 22px 0 17px; }
.question-label { margin-bottom: 10px; color: #176782; font-weight: 650; }
.sentence-prompt { font-size: clamp(18px, 2vw, 23px); color: #253c49; }
.question-hint { margin-top: 6px; font-size: 11px; }
.word-board { margin: 4px 0 9px; padding: 12px 8px; border-color: #c5d3dc; border-radius: 5px; background: #f4f8fa; }
.word-columns { min-width: 600px; grid-template-columns: repeat(5, minmax(76px, 1fr)); gap: 0; }
.word-column { min-width: 0; display: grid; grid-template-rows: 25px 1fr 25px; align-items: center; padding: 3px 9px; border-right: 3px solid #a8bbc6; }
.word-column:first-child { border-left: 3px solid #a8bbc6; }
.word-column.fixed-column { border-color: #176782; background: #e5f1f5; }
.wheel-label, .wheel-sub-label { color: #69808c; font-family: "Aptos", "Segoe UI", sans-serif; font-size: 9px; letter-spacing: .06em; text-align: center; text-transform: uppercase; }
.fixed-column .wheel-label, .fixed-column .wheel-sub-label { color: #176782; }
.wheel-step { width: 100%; height: 25px; padding: 0; border: 0; background: transparent; color: #607d8a; cursor: pointer; font-size: 11px; }
.wheel-step:hover { color: #087b9c; }
.wheel-viewport { height: 205px; overflow: hidden; overscroll-behavior: contain; touch-action: pan-y; }
.wheel-track { height: 100%; display: grid; grid-template-rows: repeat(5, 1fr); gap: 3px; }
.wheel-cell { display: grid; place-items: center; min-width: 0; }
.wheel-cell:nth-child(3) { position: relative; }
.wheel-cell:nth-child(3)::before { position: absolute; z-index: 0; inset: 1px -7px; border-top: 1px solid #8eabb8; border-bottom: 1px solid #8eabb8; background: rgba(219, 235, 241, .44); content: ""; pointer-events: none; }
.wheel-cell:nth-child(3) .wheel-word { position: relative; z-index: 1; border-color: #b2c9d3; background: #f9fcfd; }
.wheel-word { width: 100%; min-height: 34px; display: grid; place-items: center; padding: 3px 2px; border-color: transparent; background: rgba(255,255,255,.84); color: #294453; font-size: 11px; }
.wheel-word.gold-word { border-color: #d2c18f; background: #fbf8ed; color: #796022; }
.wheel-word.copper-word { border-color: #deb4a9; background: #fff6f3; color: #9b5245; }
.fixed-word { min-height: 64px; display: grid; place-items: center; padding: 5px; border: 2px solid #176782; border-radius: 4px; background: white; color: #104e66; font-size: 16px; font-weight: 750; text-align: center; box-shadow: 0 3px 10px rgba(23, 103, 130, .12); }
.sentence-rail { min-height: 37px; display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0 0 8px; padding: 4px; color: #263f4c; }
.sentence-part { font-size: 14px; }
.sentence-focus { padding: 2px 8px; border: 1px solid #176782; border-radius: 3px; background: #e5f1f5; color: #104e66; font-weight: 750; }
.sample-ledger { margin-bottom: 4px; font-size: 10px; }
.sample-ledger strong { font-size: 13px; }
.sample-last { min-height: 15px; font-size: 10px; }
.board-actions { margin-bottom: 10px; padding-bottom: 4px; border: 0; }
.board-actions > span { font-size: 10px; }
.board-buttons { display: flex; align-items: center; gap: 7px; }
.verify-level-button[hidden] { display: none !important; }
.verify-level-button:not([hidden]) { margin-left: auto; }
.board-actions .primary-button { min-height: 38px; }
.primary-button { border-radius: 4px; background: #176782; }
.primary-button:hover, .primary-button:focus-visible { background: #10536a; }
.secondary-button { border-radius: 4px; }
.learning-strip, .experiment-details { display: none !important; }
.model-column { padding-top: 0; }
.lab-heading h2 { font-size: 16px; }
.lab-explainer { display: none; }
.viz-tabs { grid-template-columns: 1fr; background: transparent; border: 0; padding: 0; }
.viz-tabs button:not([data-panel="map-panel"]) { display: none; }
.viz-tabs button[data-panel="map-panel"] { display: none; }
.viz-stage { min-height: 0; padding: 0; }
.map-legend { display: flex; gap: 12px; margin-top: 7px; }
#embedding-map { height: 300px; }
.neighbor-section { display: none; }
.vector-reading { grid-template-columns: 1.1fr .8fr .8fr; padding: 8px 0; }
.relic-status { padding-top: 8px; }
.relic-status h3 { font-size: 10px; }
.gold-chip { margin-top: 3px; padding: 3px 5px; font-size: 9px; }
.gold-chip small { max-width: 165px; }
.vector-inspector { margin-top: 6px; padding: 7px 0; }
.vector-inspector p { font-size: 9px; }
.equation-builder { margin: 0; padding: 14px; border-radius: 5px; background: #f7fafb; }
.equation-copy { margin: 7px 0 10px; }
.skip-level { display: block; margin: 9px auto 0; color: #647987; }
.feedback-panel { margin-top: 10px; padding: 10px; border-radius: 3px; }
.feedback-panel p { margin: 4px 0 7px; }
.arena-footer { min-height: 43px; align-items: center; }
.training-note { font-size: 10px; }
.reward-view { min-height: 0; padding: 24px 0 10px; }
.reward-view h2 { margin-bottom: 9px; font-size: 21px; color: #17394b; }
.lesson-modal-copy { max-width: 670px; color: #3e5663; font-size: 14px; line-height: 1.8; }
.lesson-modal-copy p { margin: 12px 0; }
.lesson-modal-copy .lesson-result { padding: 10px 12px; border-left: 3px solid #176782; background: #edf5f7; color: #176782; font-size: 12px; }
.reward-view #lesson-continue { margin-top: 6px; }
.training-modal { position: fixed; z-index: 35; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(15, 33, 43, .45); }
.training-modal-card { width: min(390px, 100%); padding: 24px; border: 1px solid #bfd1da; border-radius: 6px; background: #fff; box-shadow: 0 18px 55px rgba(10, 35, 48, .22); }
.training-modal-card h2 { margin: 3px 0 18px; color: #17394b; font-size: 20px; }
.delta-reading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid #d7e2e7; border-bottom: 1px solid #d7e2e7; color: #647987; font-size: 12px; }
.delta-reading strong { color: #176782; font-family: "IBM Plex Mono", monospace; font-size: 28px; font-variant-numeric: tabular-nums; }
.training-modal-card p { color: #526975; font-size: 12px; line-height: 1.7; }
.training-modal-card .primary-button { width: 100%; justify-content: center; margin-top: 6px; }
.start-overlay { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(13, 31, 42, .67); backdrop-filter: blur(5px); }
.start-card { width: min(550px, 100%); padding: 30px 34px 28px; border: 1px solid #c6d7df; border-radius: 8px; background: #f9fcfd; box-shadow: 0 24px 76px rgba(6, 24, 34, .27); }
.start-mark { width: 40px; height: 40px; display: grid; place-items: center; margin-bottom: 16px; border: 1px solid #9cbac7; border-radius: 6px; color: #176782; font-size: 23px; }
.start-card .eyebrow { letter-spacing: .1em; }
.start-card h1 { margin: 4px 0 10px; color: #17394b; font-size: clamp(22px, 4vw, 29px); line-height: 1.25; }
.start-lead { margin: 0 0 18px; color: #506571; font-size: 13px; line-height: 1.8; }
.start-rule { display: flex; align-items: center; gap: 11px; padding: 8px 0; color: #334c58; font-size: 12px; }
.rule-token { width: 17px; height: 17px; display: grid; place-items: center; font-size: 16px; }
.gold-token { color: #b28a36; }
.target-token { color: #bd654f; }
.rule-icon { width: 17px; color: #176782; font-size: 19px; text-align: center; }
.start-rule b { color: #1b465b; }
.start-footnote { margin: 13px 0 17px; padding-top: 12px; border-top: 1px solid #d7e2e7; color: #71838c; font-size: 10px; line-height: 1.7; }
#start-game { width: 100%; justify-content: center; min-height: 46px; font-size: 13px; }
.equation-builder { margin-bottom: 9px; }
.angle-viz-wrap { margin-top: 12px; padding: 8px 8px 5px; border: 1px solid #d5e0e5; border-radius: 4px; background: #fff; }
#equation-geometry { width: 100%; height: 185px; display: block; }
#angle-viz-caption { display: block; color: #788991; font-size: 9px; text-align: right; }
.failure-actions { align-items: center; }
.failure-actions .primary-button { min-height: 36px; padding: 0 11px; font-size: 11px; }
.verify-level-button { border-color: #176782; color: #176782; }
.verify-level-button:hover { background: #e8f3f6; }
.failure-actions { justify-content: flex-start; align-items: center; }
.failure-actions .primary-button, .failure-actions .secondary-button, .failure-actions .text-button { min-height: 36px; }
.feedback-panel.missed { border-color: #a8544f; background: #fbefed; }
.feedback-panel.missed .feedback-mark { background: #a8544f; }
.map-modal-content { border-radius: 5px; }
.map-modal-heading h2 { color: #17394b; }
.map-expand { border-radius: 3px; color: #176782; }
.finish-view { min-height: 0; }
.finish-view h2 { color: #17394b; }
.finish-stats div strong { color: #176782; }
.finish-map button { border-radius: 4px; }
.finish-vector strong { color: #176782; }
body.semantic-compose .model-column { display: block; }
body.semantic-compose .game-layout { grid-template-columns: minmax(0, 1fr) 300px; max-width: none; margin: 0; gap: 18px; }
body.semantic-validate .expedition-column { min-width: 0; }
body.semantic-validate .game-layout { grid-template-columns: minmax(0, 1fr) 360px; }
body.semantic-validate .viz-tabs { display: none; }
body.semantic-validate #map-panel { display: block !important; }
body.semantic-validate .model-column { position: sticky; top: 12px; }
body.semantic-validate .map-caption { font-size: 10px; }
body.semantic-compose .model-column, body.semantic-validate .model-column { width: 300px; min-width: 0; }
body.semantic-compose #embedding-map, body.semantic-validate #embedding-map { height: 320px; }
body.semantic-compose .viz-stage, body.semantic-validate .viz-stage { min-height: 0; padding: 0; }
body.semantic-compose .viz-tabs, body.semantic-validate .viz-tabs { display: none; }
body.semantic-compose .neighbor-section, body.semantic-validate .neighbor-section,
body.semantic-compose .relic-status, body.semantic-validate .relic-status,
body.semantic-compose .vector-inspector, body.semantic-validate .vector-inspector,
body.semantic-compose .vector-reading, body.semantic-validate .vector-reading { display: none !important; }
body.semantic-compose .model-column .map-caption, body.semantic-validate .model-column .map-caption { display: none; }
body.semantic-compose .model-column .map-legend { justify-content: center; font-size: 9px; }
body.semantic-validate .model-column { position: sticky; top: 12px; }
body.semantic-compose .board-actions { justify-content: flex-end; }
body.semantic-compose .board-actions > span { display: none; }
body.semantic-compose .board-buttons { justify-content: flex-end; width: 100%; }
body.semantic-compose .sample-last { color: #73858e; }
body.semantic-compose .sample-ledger { font-size: 10px; }
body.semantic-compose .sample-ledger strong { color: #176782; }
body.semantic-compose .context-line { color: #647987; }
body.semantic-compose .context-token { background: transparent; color: #bd654f; font-size: 18px; }
body.semantic-validate .model-column { display: block !important; }
body.semantic-validate .model-column #embedding-map { height: 245px; }
body.semantic-validate .game-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
body.semantic-validate #equation-geometry { height: 170px; }
body.semantic-interlude .start-overlay, body.semantic-finish .start-overlay { display: none; }
body.semantic-compose .floor-heading { max-width: 980px; margin: 0 auto; }
body.semantic-compose .question-hint { max-width: 720px; }
body.semantic-compose .arena { max-width: 980px; margin: 0 auto; }
body.semantic-compose .floor-track { max-width: 980px; margin: 0 auto; }
body.semantic-compose .sentence-prompt { display: none; }
body.semantic-compose .question-block { padding: 15px 0 7px; }
body.semantic-compose .context-line { margin-bottom: 6px; }
body.semantic-compose .arena-footer { display: none; }
body.semantic-compose .sample-ledger > span:first-child { display: none; }
body.semantic-compose .sample-last { flex-basis: auto; }
body.semantic-compose .run-estimate { font-size: 11px; }
body.semantic-interlude .game-layout, body.semantic-finish .game-layout { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin: 0 auto; }
body.semantic-interlude .model-column, body.semantic-finish .model-column { display: none; }
body.semantic-interlude .floor-heading, body.semantic-finish .floor-heading, body.semantic-interlude .floor-track, body.semantic-finish .floor-track { max-width: 980px; margin-right: auto; margin-left: auto; }
@media (max-width: 760px) {
  .app-shell { padding-right: 12px; padding-left: 12px; }
  .game-layout, body.semantic-compose .game-layout, body.semantic-validate .game-layout { display: flex; flex-direction: column; gap: 14px; }
  body.semantic-compose .model-column, body.semantic-validate .model-column { position: static; display: block; order: 0; width: 100%; }
  body.semantic-compose .expedition-column, body.semantic-validate .expedition-column { order: 1; width: 100%; }
  body.semantic-compose #embedding-map, body.semantic-validate #embedding-map { height: 215px; }
  .word-columns { min-width: 560px; }
  .word-column { padding-right: 5px; padding-left: 5px; border-right-width: 2px; }
  .word-column:first-child { border-left-width: 2px; }
  .wheel-viewport { height: 185px; }
  .fixed-word { min-height: 59px; font-size: 14px; }
  .sentence-rail { justify-content: flex-start; overflow-x: auto; }
  .sentence-part { flex: 0 0 auto; font-size: 12px; }
  .equation-builder { padding: 10px; }
  .start-card { padding: 23px 20px 20px; }
  #equation-geometry { height: 155px; }
}

.feedback-panel { margin-top: 17px; padding: 13px 15px; border-left: 3px solid var(--forest); background: #f2f7f4; }
.feedback-panel.missed { border-color: var(--coral); background: #fff5f2; }
.feedback-heading { display: flex; align-items: center; gap: 8px; }
.feedback-heading strong { font-size: 14px; }
.feedback-mark { width: 9px; height: 9px; border-radius: 50%; background: #499873; }
.feedback-panel.missed .feedback-mark { background: var(--coral); }
.feedback-panel p { margin: 6px 0 9px; color: var(--muted); font-size: 12px; }
.model-guess { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px; font-size: 11px; }
.model-guess span { color: var(--muted); }
.model-guess strong { color: var(--forest); font-size: 13px; }

.arena-footer { min-height: 53px; display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.training-note { color: #77827e; font-size: 11px; }
.primary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 0;
  border-radius: 5px;
  background: var(--forest);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}

.primary-button:hover, .primary-button:focus-visible { background: #174a41; outline: 2px solid rgba(38, 141, 130, .28); outline-offset: 2px; }
.primary-button span { font-size: 18px; line-height: 1; }

.reward-view, .finish-view { padding: 28px 0 18px; }
.reward-view h2, .finish-view h2 { margin-bottom: 9px; }
.reward-copy, .finish-view > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.relic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.relic-option {
  min-height: 171px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 15px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.relic-option:hover, .relic-option:focus-visible { border-color: var(--gold); background: #fcfaf2; outline: none; transform: translateY(-2px); }
.relic-glyph { width: 27px; height: 27px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid #d6c593; border-radius: 50%; color: #856827; font-family: "IBM Plex Mono", monospace; }
.relic-option strong { margin-bottom: 6px; font-size: 13px; }
.relic-option span:last-child { color: var(--muted); font-size: 11px; line-height: 1.55; }
.finish-view { min-height: 386px; }
.finish-view > p:not(.eyebrow) { max-width: 620px; line-height: 1.8; }
.finish-stats { display: flex; gap: 28px; margin: 29px 0; }
.finish-stats div span, .finish-stats div strong { display: block; }
.finish-stats div span { color: var(--muted); font-size: 11px; }
.finish-stats div strong { margin-top: 3px; font-size: 20px; }

.learning-strip { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 13px; margin-top: 20px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.learning-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #a9c4b7; border-radius: 50%; color: var(--forest); font-family: "IBM Plex Mono", monospace; font-weight: 700; }
.learning-strip strong { font-size: 12px; }
.learning-strip p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.model-score { min-width: 70px; padding-left: 14px; border-left: 1px solid var(--line); text-align: right; }
.model-score span, .model-score strong { display: block; }
.model-score span { color: var(--muted); font-size: 10px; }
.model-score strong { margin-top: 2px; color: var(--forest); font-family: "IBM Plex Mono", monospace; font-size: 15px; }

.model-column { min-width: 0; padding-top: 1px; }
.lab-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.lab-heading .eyebrow { margin-bottom: 3px; }
.lab-heading h2 { font-size: 18px; }
.model-live { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.lab-explainer { max-width: 350px; margin: 12px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.viz-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #e7ece8; }
.viz-tabs button { min-width: 0; min-height: 34px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.viz-tabs button[aria-selected="true"] { background: white; color: var(--forest); box-shadow: 0 1px 3px rgba(36, 66, 53, .11); font-weight: 700; }
.viz-tabs button:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.viz-stage { min-height: 280px; padding-top: 11px; }
.viz-panel { min-width: 0; }
#embedding-map { width: 100%; height: 268px; display: block; }
.map-legend { display: flex; gap: 15px; align-items: center; margin-top: 1px; color: var(--muted); font-size: 10px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.legend-dot.coral { background: var(--coral); }
.legend-dot.teal { background: var(--teal); }
.legend-dot.gold { background: var(--gold); }
.legend-dot.blue { background: #497e9b; }
.legend-dot.green { background: #63876a; }
.map-caption { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
#weights-panel .svg-container, #network-panel .svg-container { min-height: 260px; }
#weights-panel .svg-content-responsive, #network-panel .svg-content-responsive { width: 100%; height: auto; }
#weights-panel .heatmap-vis text, #network-panel .neural-net text { font-size: 14px !important; }
#network-panel .neural-net .neuron-label { font-size: 16px !important; }
#network-panel .neural-net .edge line { stroke-opacity: .42; }

.neighbor-section { margin-top: 14px; padding: 12px 0 13px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.neighbor-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.neighbor-heading h3, .relic-status h3 { margin: 0; font-size: 12px; }
.neighbor-heading span { color: var(--muted); font-size: 10px; }
.neighbor-list { min-height: 33px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.neighbor-chip { padding: 3px 7px; border: 1px solid #d3e2db; border-radius: 4px; background: #f8fbf9; color: var(--forest); font-size: 11px; }
.neighbor-chip small { margin-left: 4px; color: #89938f; font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.neighbor-empty { color: #8c9692; font-size: 11px; }

.vector-reading { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; padding: 13px 0 12px; border-bottom: 1px solid var(--line); }
.vector-reading div span, .vector-reading div strong { display: block; }
.vector-reading div span { color: var(--muted); font-size: 10px; }
.vector-reading div strong { margin-top: 3px; font-family: "IBM Plex Mono", monospace; font-size: 12px; font-variant-numeric: tabular-nums; }
.relic-status { padding-top: 13px; }
.relic-status p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }

.experiment-details { margin-top: 23px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.experiment-details summary { width: fit-content; padding: 10px 0; cursor: pointer; }
.experiment-controls { display: grid; gap: 7px; padding: 1px 0 12px; }
.experiment-controls label { color: var(--ink); font-weight: 600; }
.experiment-controls textarea, .experiment-controls select { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.experiment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.experiment-actions button { min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: white; cursor: pointer; font-size: 10px; }
.experiment-actions button:hover { border-color: var(--teal); }
.experiment-actions label { margin-left: 4px; }
.experiment-actions select { width: auto; }

@media (max-width: 1050px) {
  .app-shell { padding-right: 24px; padding-left: 24px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; }
  .run-estimate { display: none; }
  .arena { padding-right: 21px; padding-left: 21px; }
  .relic-grid { grid-template-columns: 1fr; }
  .relic-option { min-height: 84px; display: grid; grid-template-columns: 29px 1fr; column-gap: 10px; align-content: center; }
  .relic-glyph { grid-row: span 2; margin: 0; }
  .relic-option strong { margin-bottom: 1px; }
}

@media (max-width: 760px) {
  .app-shell { padding: 0 16px 25px; }
  .topbar { min-height: 70px; flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .brand { min-width: 0; }
  .brand-mark { width: 37px; height: 37px; }
  .brand small { font-size: 10px; }
  .run-hud { width: 100%; justify-content: space-between; gap: 8px; padding: 3px 0 1px; }
  .hud-item { min-width: 43px; }
  .hud-item span { font-size: 10px; }
  .hud-item strong { font-size: 13px; }
  .health-hud strong { font-size: 12px; letter-spacing: 0; }
  .floor-track { padding: 14px 0 18px; }
  .floor-track ol { gap: 5px; }
  .floor-track li { overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .floor-heading { min-height: 72px; padding-bottom: 15px; }
  .floor-heading h1 { font-size: 21px; }
  .floor-meta { flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 5px; font-size: 10px; }
  .arena { min-height: 430px; padding: 17px 15px 15px; }
  .question-block { padding: 29px 0 21px; }
  .sentence-prompt { font-size: 21px; }
  .answer-grid { grid-template-columns: 1fr; gap: 7px; }
  .answer-option { min-height: 46px; }
  .arena-footer { min-height: 60px; align-items: flex-end; }
  .training-note { max-width: 52%; line-height: 1.5; }
  .primary-button { min-height: 40px; padding: 0 12px; font-size: 12px; }
  .learning-strip { grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .model-score { grid-column: 2; display: flex; align-items: baseline; gap: 8px; padding: 5px 0 0; border: 0; text-align: left; }
  .model-score span, .model-score strong { display: inline; }
  .model-column { padding-top: 0; }
  .lab-heading h2 { font-size: 17px; }
  .viz-stage { min-height: 290px; }
  #embedding-map { height: 268px; }
  #weights-panel .svg-container, #network-panel .svg-container { min-height: 230px; }
  .relic-grid { margin-top: 17px; }
  .relic-option { min-height: 77px; }
  .finish-view { min-height: 360px; }
  .equation-builder { padding: 11px; }
  .equation-slots { gap: 3px; }
  .equation-side { grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr); gap: 2px; }
  .equation-slot { min-height: 54px; padding: 4px; }
  .equation-slot strong { font-size: 10px; }
  .board-actions { align-items: flex-end; }
  .board-actions > span { max-width: 52%; line-height: 1.5; }
  .map-modal { padding: 10px; }
  .map-modal-content { padding: 12px; }
}

@media (max-width: 380px) {
  .app-shell { padding-right: 11px; padding-left: 11px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 9px; }
  .hud-item strong { font-size: 12px; }
  .floor-track li { font-size: 9px; }
  .arena { padding-right: 12px; padding-left: 12px; }
  .sentence-prompt { font-size: 19px; }
  .model-guess { gap: 4px 6px; }
}

/* Persistent compact embedding plot and visual start/settlement screens. */
.model-meta { margin: 4px 0; color: #9aa8ae; font-family: "IBM Plex Mono", monospace; font-size: 8px; text-align: right; }
.model-meta span { color: #7f919a; }
.model-meta i { padding: 0 4px; color: #b9c4c9; font-style: normal; }
.gold-token { color: #b28a36; }
.target-token { color: #1485a1; }
.wheel-word.copper-word, .fixed-word.copper-word { border-color: #8ec8d5; background: #e8f6f8; color: #126c83; }
.sentence-focus { border-color: #1383a0; background: #e4f3f6; color: #126c83; }
.verify-level-button:disabled { border-color: #cbd6dc; background: #dfe7eb; color: #8a9ba3; cursor: not-allowed; }
.model-column { width: 280px; min-width: 280px; padding: 0; }
.model-column .viz-stage { min-height: 0; padding: 0; }
.model-column .map-caption { display: none; }
.model-column .map-legend { justify-content: flex-end; gap: 12px; margin-top: 4px; font-size: 9px; }
.model-column #embedding-map { height: 315px; }
.model-column .neighbor-section, .model-column .relic-status, .model-column .vector-inspector, .model-column .vector-reading,
.model-column .lab-heading, .model-column .lab-explainer, .model-column .viz-tabs { display: none !important; }
.semantic-compose .model-column, .semantic-validate .model-column { display: block !important; }
.semantic-interlude .model-column, .semantic-finish .model-column { display: block !important; }
.semantic-compose .game-layout, .semantic-validate .game-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; max-width: none; margin: 0; }
.semantic-interlude .game-layout, .semantic-finish .game-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; max-width: none; margin: 0; }
.semantic-compose .floor-heading, .semantic-compose .floor-track, .semantic-compose .arena { max-width: none; }
.semantic-compose .model-column #embedding-map { height: 315px; }
.semantic-validate .model-column { position: sticky; top: 12px; }
.semantic-validate .model-column #embedding-map { height: 235px; }
.semantic-compose .board-actions { justify-content: flex-end; }
.semantic-compose .board-actions > span { display: none; }
.semantic-compose .board-buttons { width: 100%; justify-content: flex-end; }
.semantic-compose .context-token { background: #e4f3f6; color: #126c83; }
.angle-viz-wrap { margin-top: 10px; }
.failure-actions { justify-content: flex-start; align-items: center; }
.start-overlay { background: rgba(13, 31, 42, .7); }
.start-card { width: min(530px, 100%); padding: 27px 31px; }

@media (max-width: 760px) {
  .semantic-compose .game-layout, .semantic-validate .game-layout, .semantic-interlude .game-layout, .semantic-finish .game-layout { display: flex; flex-direction: column; gap: 13px; }
  .semantic-compose .model-column, .semantic-validate .model-column, .semantic-interlude .model-column, .semantic-finish .model-column { width: 100%; min-width: 0; position: static; order: 0; }
  .semantic-compose .expedition-column, .semantic-validate .expedition-column, .semantic-interlude .expedition-column, .semantic-finish .expedition-column { width: 100%; order: 1; }
  .model-column #embedding-map, .semantic-compose .model-column #embedding-map, .semantic-validate .model-column #embedding-map, .semantic-interlude .model-column #embedding-map, .semantic-finish .model-column #embedding-map { height: 210px; }
  .model-meta { font-size: 7px; }
}
