/* Scene and native typing remain visible together; extra context is optional. */
.header-actions { flex-wrap: wrap; }
.game-language-control { display: grid; gap: 3px; font-size: 11px; font-weight: 700; }
.game-language-control select { min-height: 36px; max-width: 150px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 7px; background: var(--cream); color: var(--ink); }
.game { display: grid; grid-template-rows: minmax(210px, 1fr) auto; height: min(780px, calc(100svh - 24px)); min-height: 560px; scroll-margin-top: 12px; }
.game .stage { height: auto; min-height: 0; }
.game .word-dock { min-height: 0; padding: 10px 16px; border-top-width: 2px; }
.game .dock-top { margin: 0 0 7px; gap: 8px; flex-wrap: wrap; }
.game .mode-switch button, .game .level-label select { min-height: 34px; padding-block: 5px; }
.game .world-heading { top: 16px; left: 18px; max-width: 50%; }
.game .world-heading h2 { font-size: 25px; }
.game .world-heading p { font-size: 12px; }
.game .prompt-meta { margin-bottom: 4px; font-size: 11px; }
.game .prompt-row { margin-bottom: 6px; }
.game .target { max-height: clamp(54px, 10svh, 100px); overflow-y: auto; font-size: clamp(17px, 1.8vw, 23px); line-height: 1.45; scrollbar-width: thin; overflow-anchor: none; }
.game .manifest-row { min-height: 34px; padding-block: 4px; gap: 9px; }
.game .cargo-preview { width: 32px; height: 32px; }
.game .next-character { width: 38px; height: 38px; font-size: 22px; }
.game #word-input { min-height: 44px; height: 48px; padding: 8px 12px; font-size: 18px; }
.game .input-hint { margin: 4px 0 0; font-size: 11px; }
.game:not([data-phase='ready']) :is(.mission-mode-label,.mission-rules,.curriculum-track,.mode-note,.content-count) { display: none; }
.game:not([data-phase='ready']) .world-heading p { display: none; }
.game .ready { padding-block: 6px; min-height: 0; }
.game-instruments { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: var(--cream); color: var(--ink); }
.game-instruments > summary { cursor: pointer; font-weight: 700; }
.game-instruments .mission-panel { position: static; margin-top: 10px; }
.game-instruments .passage-panel { margin-top: 10px; }
@media (max-width: 700px) {
 .game { min-height: 520px; height: min(700px, calc(100svh - 16px)); grid-template-rows: minmax(180px,1fr) auto; }
 .game .world-heading { left: 10px; top: 10px; }
 .game .world-heading h2 { font-size: 19px; }
 .game .hud { top: 10px; right: 10px; gap: 10px; }
 .game .hud strong { font-size: 22px; }
 .game .word-dock { padding: 8px 10px; }
 .game .manifest-copy, .game .prompt-label { display: none; }
 .game .target { font-size: 17px; max-height: 78px; }
 .game .level-label { margin-left: auto; }
}

/* Equal scene and practice columns for every Journey world. */
html:root body .topbar .header-actions { align-items: flex-end; }
html:root body .topbar .header-actions :is(.settings-button, .game-language-control select) { box-sizing: border-box; height: 44px; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; line-height: 1.2; }
html:root body .topbar .game-language-control { gap: 5px; }
.game { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: clamp(420px, calc(100svh - 300px), 620px); min-height: 0; }
.game[hidden] { display: none; }
.game > .stage { min-width: 0; min-height: 0; height: 100%; }
html:root body .game > .word-dock { min-width: 0; min-height: 0; padding: 18px; border-top: 0; border-left: 1px solid var(--line); overflow-y: auto; overscroll-behavior: contain; }
.game .world-heading { max-width: calc(100% - 32px); top: 14px; left: 14px; }
.game .world-heading h2 { font-size: 22px; }
.game .world-heading p { display: none; }
.game .hud { top: auto; bottom: 54px; left: 14px; right: auto; gap: 14px; padding: 10px 14px; }
.game .hud strong { font-size: 22px; }
.game .world-status { display: none; }
.game .journey { left: 14px; bottom: 14px; }
.game .target { max-height: clamp(110px, 22svh, 220px); font-size: clamp(20px, 1.7vw, 26px); }
.game .dock-top { align-items: center; }
.game .level-label { margin-left: 0; }
.game .ready { align-items: flex-start; flex-direction: column; gap: 14px; }
.game .ready h3 { font-size: 23px; }
.game .ready p { font-size: 14px; }
.game .start-actions { flex-wrap: wrap; }
@media (max-width: 700px) {
  .game { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(180px, 30svh) auto; height: auto; }
  html:root body .game > .word-dock { border-left: 0; border-top: 1px solid var(--line); padding: 14px; overflow: visible; }
  .game .world-heading h2 { font-size: 18px; }
  .game .hud { bottom: 42px; padding: 6px 10px; }
  .game .hud strong { font-size: 18px; }
  .game .target { max-height: 110px; font-size: 20px; }
  html:root body .topbar .header-actions { justify-content: flex-start; }
}

/* The typing field fills its half of the workspace. */
.game #play-area:not([hidden]) { display: block; }
.game #play-area .manifest-row { margin: 10px 0; min-height: 40px; }
.game #play-area #word-form { width: 100%; }

html:root body .topbar .header-actions [hidden] { display: none; }

/* ---- Annotation fixes 2026-10-27 ---- */
/* The practice column grows with its content, so Start journey is never hidden
   inside an inner scroll area (desktop widths). */
@media (min-width: 701px) {
  .game { height: auto; min-height: clamp(420px, calc(100svh - 300px), 620px); grid-template-rows: auto; }
  html:root body .game > .word-dock { overflow: visible; }
}
/* Readable notice: dark text on the yellow panel (about 11:1 instead of 2.4:1). */
html:root body .mode-note { --ink: #1e293b; color: #1e293b; font-size: 13px; line-height: 1.45; }
/* Untimed / countdown is a status, shown as a quiet tag rather than a control. */
html:root body .word-dock .timer { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; }
/* Narrow desktop: header stays on one row with its labels visible. */
@media (min-width: 701px) and (max-width: 1279px) {
  html:root body .topbar .lab-label { display: none; }
  html:root body .topbar .brand { white-space: nowrap; }
  html:root body .topbar .header-actions { flex-wrap: nowrap; }
  html:root body .topbar .game-language-control select { max-width: 124px; }
}

/* Tablet widths: the header controls wrap instead of overflowing the page. */
@media (min-width: 701px) and (max-width: 999px) {
  html:root body .topbar { height: auto; flex-wrap: wrap; row-gap: 10px; }
  html:root body .topbar .header-actions { flex-wrap: wrap; }
}
html:root body footer #footer-home { display: inline-flex; align-items: center; min-height: 28px; }
