:root {
  color-scheme: dark;
  --bg: #041416;
  --panel: #082126;
  --panel-dark: #04191d;
  --edge: #285752;
  --ink: #e5f8ee;
  --muted: #9abfb6;
  --accent: #78fbd2;
  --on-accent: #041e1a;
  --warning: #fbc28b;
  --glow: #77fbd21b;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --display: "Geist", Inter, system-ui, sans-serif;
  font: 16px/1.5 var(--display);
  background: var(--bg);
  color: var(--ink);
}
:root[data-theme="arcade"] {
  --bg: #090d36;
  --panel: #151850;
  --panel-dark: #111641;
  --edge: #4c54ab;
  --ink: #f0f6ff;
  --muted: #bec9ff;
  --accent: #ffda59;
  --on-accent: #231b36;
  --warning: #ffc1dc;
  --glow: #6a6dff35;
  --display: "Atkinson Hyperlegible Next", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 260px; }
body::before {
  position: fixed; inset: 0; z-index: -1; content: "";
  background: radial-gradient(ellipse at 78% 12%, var(--glow), transparent 58%),
    repeating-linear-gradient(0deg, transparent 0 39px, var(--glow) 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--glow) 40px);
  mask-image: linear-gradient(black, transparent 90%);
}
.shell { width: min(1100px, calc(100% - 56px)); margin: auto; }
header, footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header { min-height: 90px; border-bottom: 1px solid var(--edge); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; letter-spacing: .17em; font: 720 1.16rem var(--mono); }
.brand-icon { color: var(--accent); font-size: 1.55rem; }
.controls { display: flex; gap: 8px; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:enabled:hover { filter: brightness(1.15); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.control { background: var(--panel-dark); color: var(--ink); border: 1px solid var(--edge); min-height: 44px; padding: 8px 14px; font: 700 .78rem var(--mono); }
.control span:first-child { color: var(--accent); }
main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; padding: clamp(30px, 7vw, 90px) 0 32px; }
.game, .ocean { border: 1px solid var(--edge); background: var(--panel); min-width: 0; }
.instruments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--edge); }
.instruments > div { padding: 15px clamp(8px, 3vw, 25px); }
.instruments > div + div { border-left: 1px solid var(--edge); }
.instruments span, .context, .ocean-top span, .ocean-bottom, footer { font: 650 .68rem/1.4 var(--mono); letter-spacing: .09em; color: var(--muted); }
.instruments strong { display: block; color: var(--accent); font: 750 clamp(18px, 4vw, 32px)/1.35 var(--mono); }
.clock[data-urgent] strong { color: var(--warning); }
.console { min-height: 398px; padding: clamp(22px, 5vw, 54px); display: flex; flex-direction: column; justify-content: center; }
.context { margin: 0 0 10px; color: var(--accent); min-height: 1em; }
.context:empty { display: none; }
h1 { margin: 0; max-width: 18ch; font: 760 clamp(32px, 5.1vw, 64px)/1.04 var(--display); letter-spacing: -.035em; overflow-wrap: anywhere; text-wrap: balance; }
.description { color: var(--muted); margin: 16px 0 24px; max-width: 45ch; }
.description:empty { display: none; }
.primary { min-height: 52px; padding: 13px 20px; color: var(--on-accent); background: var(--accent); border: 1px solid var(--accent); font-weight: 800; text-align: center; }
.primary span { margin-left: 5px; }
#action { align-self: flex-start; }
#answer-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 24px; }
input { min-width: 0; width: 100%; min-height: 52px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: 0; color: var(--ink); background: var(--panel-dark); }
input::placeholder { color: var(--muted); opacity: 1; }
#console[data-phase="result"] #heading { color: var(--accent); }
.breakdown { order: 0; margin: 18px 0 0; padding: 0; list-style: none; }
.breakdown li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; border-top: 1px solid var(--edge); padding: 8px 0; font-size: .87rem; }
.breakdown strong { color: var(--accent); font-family: var(--mono); }
.breakdown span { overflow-wrap: anywhere; }
.ocean { position: relative; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; isolation: isolate; background: var(--panel-dark); min-height: 360px; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; z-index: -1; }
.ocean-top, .ocean-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 15px 16px; background: color-mix(in srgb, var(--panel-dark), transparent 18%); }
.ocean-top { border-bottom: 1px solid var(--edge); }
.ocean-top strong { font: 750 clamp(20px, 3vw, 32px) var(--mono); color: var(--accent); }
.ocean-bottom { border-top: 1px solid var(--edge); }




footer { border-top: 1px solid var(--edge); padding: 15px 0 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
[data-theme="arcade"] .brand { color: var(--accent); text-shadow: 2px 2px #5d32a4; }
[data-theme="arcade"] .game, [data-theme="arcade"] .ocean { border: 2px solid #6f74dc; box-shadow: 4px 4px #2c235d; }
[data-theme="arcade"] .instruments strong { text-shadow: 2px 2px #5d32a4; }
[data-theme="arcade"] .primary { box-shadow: inset 0 -5px #e9a636; border: 2px solid #fff2a7; }


@media (max-width: 700px) {
  .shell { width: calc(100% - 28px); }
  header { min-height: 64px; }
  main { grid-template-columns: minmax(0, 1fr); padding-top: 20px; gap: 12px; }
  .console { min-height: 265px; }
  .ocean { min-height: 236px; }
  .ocean-top, .ocean-bottom { padding-block: 8px; }
  .brand { font-size: .98rem; }
  .control { padding-inline: 9px; }
}
@media (max-width: 390px) {
  #answer-form { grid-template-columns: minmax(0, 1fr); }
  .console { padding: 19px; }
}
@media (prefers-reduced-motion: reduce) { }
/* Expedition interface */
:root { --bg:#07191e; --panel:#0d282d; --panel-dark:#092126; --edge:#ffffff20; --ink:#eff7ef; --muted:#9db5b4; --accent:#c5f2b6; --on-accent:#14281d; }
:root[data-theme="arcade"] { --bg:#10192e; --panel:#192c47; --panel-dark:#14233b; --edge:#ffffff25; --ink:#fff7e7; --muted:#adbdd0; --accent:#ffd478; --on-accent:#32251b; }
body::before { background:radial-gradient(ellipse at 50% 0,#31686b22,transparent 65%); mask-image:none; }
.shell { width:min(1320px,calc(100% - 80px)); }
header { min-height:96px; border:0; }
.brand { font-family:var(--display); font-weight:850; letter-spacing:.22em; font-size:1.1rem; }
.brand-icon { width:38px; height:38px; border:1px solid var(--accent); border-radius:50%; display:grid; place-items:center; font-size:1.5rem; }
.control { border-radius:30px; padding:10px 18px; background:transparent; font-weight:500; }
.edition { display:flex; justify-content:space-between; padding:16px 2px; border-top:1px solid var(--edge); font:10px var(--mono); letter-spacing:.17em; color:var(--muted); }
.signal { display:flex; align-items:center; gap:8px; }
.signal i { width:5px; height:5px; border-radius:100%; background:var(--accent); box-shadow:0 0 10px var(--accent); }
main { position:relative; isolation:isolate; display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); padding:50px 46px 112px; gap:70px; border:1px solid #ffffff25; border-radius:22px; overflow:hidden; min-height:650px; background:#12343b; }
.game, [data-theme="arcade"] .game {
  z-index:2; align-self:center; position:relative;
  background:transparent; border:0; box-shadow:none;
}
.game .description, .game .instruments span { color:#c9ded9; }
.game #heading { text-shadow:0 2px 16px #00141980; }
.game #answer-form input { background:#071c26; border-color:#8bb9b773; }
.game #answer-form input:focus { border-color:var(--accent); }
.game .instruments {
  position:relative; display:flex; justify-content:space-between; gap:8px;
  padding:0 0 12px; border:0;
  background:linear-gradient(#9ecac450,#9ecac450) bottom / 100% 2px no-repeat;
}
.game .instruments > div { padding:0; display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 8px; border:0; }
.game .instruments span { font-size:10px; letter-spacing:.08em; }
.game .instruments strong { display:inline; font:500 14px var(--mono); margin:0; white-space:nowrap; }
.game .instruments::after {
  content:""; position:absolute; bottom:0; left:0; width:100%;
  height:2px; background:var(--accent);
  transform:scaleX(var(--time,1)); transform-origin:left center;
  transition:transform .1s linear;
}
.game .console { padding:26px 0 0; min-height:0; }
.eyebrow { font:9px/1.7 var(--mono); letter-spacing:.14em; color:var(--accent); margin-bottom:22px; }
h1 { font-size:clamp(34px,4.3vw,61px); font-weight:600; line-height:1.04; letter-spacing:-.05em; max-width:12ch; overflow-wrap:normal; }
.console[data-phase="answer"] h1,.console[data-phase="pending"] h1 { font-size:clamp(28px,3.1vw,43px); max-width:22ch; }
.console:not([data-phase="start"]):not([data-phase="loading"]) .eyebrow { display:none; }
.description { font-size:14px; line-height:1.65; margin:22px 0 28px; max-width:35ch; }
.primary { border-radius:7px; padding:15px 23px; font-size:13px; font-weight:650; box-shadow:0 4px 18px #0002; }
#action { width:100%; text-align:left; }
#answer-form { grid-template-columns:minmax(0,1fr) auto; margin-top:20px; }
@media(max-width:420px), (min-width:601px) and (max-width:760px) { #answer-form { grid-template-columns:1fr; } }
#answer-form input { border-radius:7px; background:#ffffff08; min-height:56px; padding:16px; }
#answer-form .primary { text-align:left; }
.ocean { position:absolute; inset:0; z-index:-1; border:0; background:#0e323c; display:block; border-radius:0; }
#scene { width:100%; height:100%; object-fit:cover; }
.ocean-top { position:absolute; top:115px; right:65px; display:block; text-align:right; padding:0; background:none; border:0; }
.ocean-top span { font-size:10px; font-weight:400; letter-spacing:.2em; }
.ocean-top strong { display:block; color:#f1f8ea; font:300 clamp(40px,5.5vw,80px)/1.1 var(--display); letter-spacing:-.05em; margin-top:10px; }



.ocean-bottom { position:absolute; bottom:122px; left:57%; right:65px; padding:0; background:none; border:0; font-size:9px; }
.scene-caption { position:absolute; left:57%; right:65px; top:38px; display:flex; flex-direction:column; gap:7px; font:8px var(--mono); letter-spacing:.18em; color:#cae0de99; }
.scene-caption b { font-weight:400; }
.journey { position:absolute; bottom:28px; left:46px; right:46px; display:flex; gap:0; }
.step { flex:1; border-top:1px solid #d6e9df42; padding:12px 12px 0; display:flex; justify-content:space-between; font:10px var(--mono); color:#b9cfd299; }
.step:first-child { padding-left:0; }.step:last-child { padding-right:0; }
.step b { font-weight:400; }.step.active { border-color:var(--accent); color:var(--accent); border-top-width:2px; }.step.complete { color:var(--accent); border-color:var(--accent); }
.field-notes { display:grid; grid-template-columns:repeat(3,1fr); gap:30px; padding:30px 2px; }
.field-notes>div { display:flex; gap:17px; align-items:baseline; }.field-notes>div>span { font:10px var(--mono); color:var(--accent); }
.field-notes p { font-size:13px; margin:0; }.field-notes b { display:block; font-size:11px; font-weight:400; color:var(--muted); margin-top:5px; }
footer { font-size:9px; font-weight:400; letter-spacing:.04em; padding-top:20px; }
[data-theme="arcade"] .ocean { border:0; box-shadow:none; }
[data-theme="arcade"] .brand { text-shadow:none; color:var(--ink); }
[data-theme="arcade"] .primary { border:1px solid #ffe7af; box-shadow:inset 0 -3px #dca454; border-radius:3px; }
[data-theme="arcade"] .instruments strong { text-shadow:none; }
[data-theme="arcade"] main { border-radius:6px; }
@media(min-width:1500px) { main { min-height:700px; } }
@media(max-width:900px) { .shell { width:calc(100% - 40px); } main { padding:34px 26px 100px; gap:20px; grid-template-columns:minmax(0,1.4fr) 1fr; } .console { padding:28px 24px; } .journey { left:26px; right:26px; } .ocean-top { right:48px; }.scene-caption { left:64%; right:40px; }.ocean-bottom { left:64%; right:48px; } }
@media(max-width:600px) { .shell { width:calc(100% - 24px); } header { min-height:76px; }.brand { font-size:.9rem; gap:8px; }.brand-icon { width:30px; height:30px; }.control { padding:8px 12px; min-height:38px; } .edition { font-size:8px; padding:13px 2px; } main { display:block; min-height:750px; padding:190px 14px 82px; border-radius:14px; }.game { width:100%; }.ocean-top { top:47px; right:32px; }.ocean-top strong { font-size:52px; }.scene-caption { top:34px; left:25px; right:auto; font-size:7px; }.ocean-bottom { top:148px; bottom:auto; left:25px; right:33px; }.console { min-height:310px; padding:28px 24px; } h1 { font-size:45px; }.journey { left:24px; right:24px; bottom:26px; }.step { padding:10px 6px 0; font-size:9px; }.step b { display:none; }.field-notes { gap:15px; padding:24px 2px; }.field-notes>div { display:block; }.field-notes p { font-size:11px; margin-top:9px; }.field-notes b { font-size:10px; }.instruments>div { padding-block:13px; }.instruments strong { font-size:22px; } }

@media(max-width:600px) { #scene { height:250px; object-fit:cover; object-position:center 40%; } }

@media(max-width:600px) { }

.translation-link { color: var(--accent); }
.catalog .catalog-main {
  display: block;
  min-height: 0;
  padding: 24px 0 56px;
  border: 0;
  border-top: 1px solid var(--edge);
  border-radius: 0;
  background: transparent;
}
.catalog h1 { max-width: none; font-size: clamp(32px, 5vw, 58px); }
.catalog-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 28px; }
.catalog-filters label { display: grid; gap: 6px; color: var(--muted); }
.catalog select { min-height: 52px; padding: 8px; background: var(--panel-dark); color: var(--ink); border: 1px solid var(--edge); font: inherit; }
.catalog #status, .catalog .question-original, .catalog .original-note { color: var(--muted); }
.catalog details { margin-bottom: 10px; background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; }
.catalog summary { padding: 14px; cursor: pointer; }
.question-count { display: block; margin: 4px 0 0 18px; color: var(--muted); font-size: .82rem; }
.catalog .question-original, .catalog .original-note { margin: 0 14px 12px; }
.catalog table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; table-layout: fixed; }
.catalog td, .catalog th { padding: 8px 12px; border-top: 1px solid var(--edge); overflow-wrap: anywhere; vertical-align: top; }
.catalog td:last-child, .catalog th:last-child { width: 4rem; color: var(--accent); text-align: right; }
.catalog td small { display: block; color: var(--muted); }
@media (max-width: 460px) {
  .catalog-filters { grid-template-columns: 1fr; }
  footer { flex-wrap: wrap; }
}

/* The depth readout and world share one animation clock. */

.ocean-top strong { font-variant-numeric:tabular-nums; }
#dive-status { display:block; margin-top:14px; color:#cae0de99; font:9px var(--mono); letter-spacing:.12em; }
.ocean[data-diving="true"] #dive-status { color:var(--accent); }
.ocean[data-diving="true"] .ocean-top strong { color:var(--accent); }
@media(max-width:600px) { #dive-status { font-size:7px; margin-top:8px; } }

@media(max-width:600px) { .ocean-bottom { top:173px; } }

/* Reserve separate vertical space for telemetry and the moving depth tape. */
.ocean-top { top:28px; right:46px; }
.ocean-top strong { font-size:clamp(36px,4vw,54px); margin-top:5px; }
.ocean-top #dive-status { margin-top:8px; }
.scene-caption { top:32px; right:230px; }
@media(max-width:900px) and (min-width:601px) {
  .ocean-top { right:26px; }
  .scene-caption { display:none; }
}
@media(max-width:600px) {
  main { padding-top:280px; }
  .scene-caption { display:none; }
  .ocean-top {
    top:20px; left:24px; right:24px; text-align:left;
    display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 12px;
  }
  .ocean-top strong { font-size:36px; margin:0; text-align:right; }
  .ocean-top #dive-status { grid-column:1 / -1; margin:0; font-size:8px; }
  #scene { top:85px; height:180px; object-fit:cover; object-position:center; }
  .ocean-bottom { top:251px; left:24px; right:24px; }
}

.dive-shell { width:min(1060px, calc(100% - 40px)); margin-block:24px; }
.dive-stage {
  --stage-inset:24px;
  min-height:385px;
  grid-template-columns:minmax(0, 510px) minmax(0, 1fr);
  gap:32px;
  padding:110px var(--stage-inset) 72px;
  background:#081922;
}
.dive-stage header {
  position:absolute; z-index:3; inset:20px var(--stage-inset) auto;
  min-height:0; justify-content:flex-start; gap:20px;
}
.dive-stage .brand { font-size:13px; }
.dive-stage .brand-icon { width:auto; height:auto; border:0; font-size:18px; }
.dive-stage .control { min-height:36px; padding:6px 12px; }
.dive-stage .game { align-self:start; }
.dive-stage .game #heading {
  font-size:clamp(22px,4vw,32px);
  max-width:none;
  line-height:1.12;
  letter-spacing:-.025em;
}
.dive-stage .game .console { padding-top:16px; }
.dive-stage .game .instruments > div:last-child strong { order:-1; }
.dive-stage .game .instruments span,
.dive-stage .game .instruments strong { font:12px var(--mono); }

.dive-stage .game .instruments span { color:#c1d9d5; letter-spacing:normal; }
.dive-stage .game .instruments strong { color:inherit; }
.dive-stage .game .instruments .clock strong { color:var(--accent); }
.dive-stage .game .instruments .clock[data-urgent] strong { color:var(--warning); }
.dive-stage .game .instruments { color:#c1d9d5; }
.dive-stage #heading { font-family:system-ui,sans-serif; font-weight:640; text-wrap:balance; }
.dive-stage #answer-form input,
.dive-stage #answer-form button {
  font:15px/1.4 system-ui,sans-serif; border-radius:8px; box-shadow:none;
}
.dive-stage #answer-form input::placeholder { color:#b1cbc9; }
.dive-stage #answer-form button:disabled {
  border-color:#80a49c; background:#385650; color:#e0eee8; opacity:1;
}
.dive-stage .ocean::before {
  content:""; position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse 55% 68% at 14% 52%, #061923b3, transparent);
}
@media (max-width:600px) {
  .dive-stage .ocean::before {
    background:radial-gradient(ellipse 100% 46% at 33% 65%, #061923a8, transparent);
  }
}
@media (prefers-reduced-motion:reduce) {
  .game .instruments::after { transition:none; }
}
.dive-stage #answer-form { margin-top:15px; }
.dive-stage #answer-form input,
.dive-stage #answer-form button { min-height:44px; padding:10px 12px; }
.dive-stage .ocean { background:linear-gradient(155deg,#163a43,#081922 75%); }
.dive-stage .ocean-top { top:20px; right:var(--stage-inset); }
.dive-stage .ocean-top strong { font-size:30px; margin-top:2px; }
.dive-stage #dive-status { visibility:hidden; }
.dive-stage [data-diving="true"] #dive-status { visibility:visible; }
.dive-stage .ocean-bottom { right:var(--stage-inset); bottom:55px; }
.dive-stage .journey { inset:auto var(--stage-inset) 20px; }

@media (max-width:600px) {
  .dive-shell { width:calc(100% - 24px); margin-block:12px; }
  .dive-stage { --stage-inset:18px; display:block; padding-top:200px; min-height:475px; }
  .dive-stage header { inset:13px var(--stage-inset) auto; justify-content:space-between; gap:8px; }
  .dive-stage .control { min-height:34px; padding-inline:8px; }
  .dive-stage .ocean-top { top:57px; left:auto; display:block; text-align:right; }
  .dive-stage #scene {
    top:0; height:275px; object-position:center;
    mask-image:linear-gradient(#000 58%,transparent);
  }
  .dive-stage .ocean-bottom { top:auto; bottom:51px; left:var(--stage-inset); }
}

@media (min-width:901px) {
  .dive-stage { min-height:433px; }
  .dive-stage .game { margin-block-end:48px; }
}

/* Reserve the scene height, with spare room below the form. */
.dive-stage .game .console {
  display:grid;
  --question-copy-height:208px;
  --question-actions-height:108px;
  --question-gap:22px;
  block-size:calc(16px + var(--question-copy-height) + var(--question-gap) + var(--question-actions-height));
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto;
  align-content:start;
  justify-content:stretch;
  text-align:start;
  gap:var(--question-gap);
}
.question-copy {
  max-block-size:var(--question-copy-height);
  min-width:0;
  overflow:auto;
  overscroll-behavior:contain;
  overflow-wrap:anywhere;
  scroll-padding:4px;
}
.question-copy:focus-visible { outline-offset:-2px; }
.question-copy .description { margin-bottom:0; }
.question-actions {
  display:grid;
  align-items:start;
  min-width:0;
  min-height:var(--question-actions-height);
}
.dive-stage .question-actions #answer-form { margin-top:0; }

@media (max-width:420px), (min-width:601px) and (max-width:760px) {
  .dive-stage .game .console { --question-actions-height:168px; }
}

.dive-stage #answer-form #skip {
  grid-column:1 / -1;
  justify-self:start;
  padding-inline:0;
  border:0;
  background:transparent;
  color:#c1d9d5;
  text-align:start;
  text-decoration:underline;
  text-underline-offset:3px;
}
.dive-stage #answer-form #skip:disabled { opacity:.55; }

.question-actions .report-link {
  justify-self:start;
  padding:6px 0;
  min-height:34px;
  border:0;
  background:transparent;
  color:#c1d9d5;
  font:13px system-ui,sans-serif;
  text-align:start;
  text-decoration:underline;
  text-underline-offset:3px;
}
.dive-stage .game .console { --question-actions-height:144px; }
@media (max-width:420px), (min-width:601px) and (max-width:760px) {
  .dive-stage .game .console { --question-actions-height:204px; }
}
#report-dialog, #feedback-dialog {
  box-sizing:border-box;
  width:min(460px, calc(100% - 32px));
  border:1px solid var(--edge);
  border-radius:16px;
  padding:24px;
  background:var(--panel);
  color:var(--ink);
}
#report-dialog::backdrop, #feedback-dialog::backdrop { background:#041019b3; }
#report-form, #feedback-form { display:grid; gap:10px; }
#report-form h2, #report-form p, #feedback-form h2, #feedback-form p { margin:0; overflow-wrap:anywhere; }
#report-question { color:var(--muted); }
#report-form label, #feedback-form label { margin-top:6px; }
#report-form input, #report-form textarea, #feedback-form input, #feedback-form textarea {
  padding:10px;
  background:var(--bg);
  border:1px solid var(--edge);
  border-radius:6px;
  color:var(--ink);
  font:inherit;
}
#report-form textarea, #feedback-form textarea { resize:vertical; }
.report-buttons { display:flex; flex-wrap:wrap; gap:8px; }
#report-status:empty, #feedback-status:empty { display:none; }
.report-records { display:grid; gap:12px; margin-top:24px; }
.report-record { border:1px solid var(--edge); border-radius:10px; padding:16px; overflow-wrap:anywhere; }
.report-record small { color:var(--muted); }
.report-record h2 { font-size:18px; margin:6px 0; }
.report-record p { margin:8px 0 0; }
.report-details { white-space:pre-wrap; }

/* The completed round can grow to show every result in the page flow. */
.dive-stage .game .console[data-phase="done"] {
  block-size:auto;
  --question-actions-height:56px;
}
.console[data-phase="done"] .question-copy {
  max-block-size:none;
  overflow:visible;
}

.mode-picker {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-self:start;
  margin-bottom:10px;
}
.mode-picker button {
  min-height:44px;
  padding:8px 12px;
  border:1px solid #c1d9d55c;
  border-radius:6px;
  background:#07192366;
  color:#e0eee8;
  font:600 .875rem/1.25 system-ui,sans-serif;
  text-align:start;
}
.mode-picker button[aria-pressed="true"] {
  border-color:var(--accent);
  color:var(--accent);
  background:color-mix(in srgb, var(--panel-dark) 85%, var(--accent));
}
.air {
  display:flex;
  align-items:center;
  gap:10px;
  padding-block:12px 0;
  color:#c1d9d5;
  font:600 .875rem/1 var(--mono);
}
.air strong { color:var(--accent); }
.tanks { display:flex; gap:5px; }
.tanks i {
  position:relative;
  width:10px;
  height:15px;
  border:1px solid #c1d9d590;
  border-radius:4px 4px 2px 2px;
}
.tanks i::before {
  content:"";
  position:absolute;
  left:2px;
  right:2px;
  top:-4px;
  height:3px;
  border-radius:1px;
  background:#c1d9d590;
}
.tanks i.filled { background:var(--accent); border-color:var(--accent); }
.tanks i.filled::before { background:var(--accent); }

.dive-stage .language-picker {
  appearance:none;
  padding-inline-end:25px;
  background-image:linear-gradient(45deg, transparent 50%, currentColor 50%),linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:right 13px center,right 9px center;
  background-size:4px 4px;
  background-repeat:no-repeat;
}
.language-picker:disabled { opacity:.55; }

/* Published English guide: follows the playable stage in normal page flow. */
#heading { margin:0; overflow-wrap:anywhere; }
html { scroll-behavior:smooth; }
#game-start { scroll-margin-top:16px; }
.game-guide { max-width:960px; margin:48px auto 64px; font:1rem/1.75 var(--display); color:var(--ink); }
.game-guide section { padding:32px 0; border-top:1px solid var(--edge); }
.game-guide h1 { max-width:22ch; font-size:clamp(2rem,4vw,3rem); line-height:1.15; }
.game-guide h2 { margin:0 0 16px; font-size:clamp(1.45rem,3vw,2rem); line-height:1.25; letter-spacing:-.025em; }
.game-guide h3 { margin:0 0 8px; font-size:1.125rem; line-height:1.4; }
.game-guide p { margin:0 0 16px; color:var(--muted); }
.game-guide strong { color:var(--ink); }
.game-guide .guide-kicker { color:var(--accent); font-size:.875rem; margin-bottom:16px; }
.game-guide .guide-lead { margin-top:24px; max-width:70ch; font-size:1.125rem; }
.guide-cta { display:inline-flex; justify-content:center; align-items:center; min-height:48px; padding:10px 24px; border-radius:8px; background:var(--accent); color:var(--on-accent); text-decoration:none; font-weight:750; }
.guide-mode-cards, .guide-tips { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin-top:28px; }
.guide-mode-cards > div { padding:22px; border:1px solid var(--edge); border-radius:12px; background:var(--panel-dark); }
.guide-mode-cards h2 { font-size:1.25rem; }
.guide-mode-cards p, .guide-tips p { margin-bottom:0; }
.guide-steps { padding-left:24px; color:var(--muted); }
.guide-steps li { margin-bottom:16px; padding-left:6px; }
.guide-table-wrap { max-width:100%; overflow-x:auto; margin:24px 0; border:1px solid var(--edge); border-radius:10px; }
.game-guide table { width:100%; border-collapse:collapse; text-align:left; font-size:1rem; line-height:1.5; }
.game-guide th, .game-guide td { padding:14px 16px; vertical-align:top; border-bottom:1px solid var(--edge); min-width:100px; }
.game-guide thead { background:var(--panel-dark); color:var(--accent); }
.game-guide tbody th { font-weight:600; }
.game-guide td { color:var(--muted); }
.game-guide tr:last-child > * { border-bottom:0; }
.guide-faq details { border-bottom:1px solid var(--edge); padding:18px 0; }
.guide-faq summary { cursor:pointer; font-size:1.0625rem; font-weight:650; }
.guide-faq details p { padding-top:14px; margin-bottom:0; }
:is(html[lang="en"], html[lang="uk"], html[lang="es"], html[lang="fr"], html[lang="de"], html[lang="it"]) .brand { letter-spacing:.03em; text-transform:none; }
@media(max-width:600px) {
  .game-guide { margin-top:32px; }
  .game-guide section { padding:26px 0; }
  .guide-mode-cards, .guide-tips { grid-template-columns:1fr; gap:18px; }
  .game-guide th, .game-guide td { padding:12px; }
  :is(html[lang="en"], html[lang="uk"], html[lang="es"], html[lang="fr"], html[lang="de"], html[lang="it"]) .dive-stage .brand { font-size:14px; gap:5px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

.game-guide[lang="de"] { overflow-wrap:anywhere; }


/* Shared footer, localized in the initial HTML for every language. */
.site-footer {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:24px 56px;
  width:100%;
  max-width:960px;
  margin:0 auto 24px;
  padding:28px 0 16px;
  border-top:1px solid var(--edge);
  font:400 1rem/1.6 var(--display);
  letter-spacing:normal;
}
.footer-identity { display:grid; gap:10px; }
.footer-brand { display:inline-flex; justify-self:start; align-items:center; gap:10px; color:var(--ink); font-size:1.125rem; font-weight:750; letter-spacing:-.02em; text-decoration:none; }
.footer-mark { color:var(--accent); font-size:1.4rem; line-height:1; }
.site-footer p { margin:0; color:var(--muted); overflow-wrap:anywhere; }
#footer-tagline { max-width:34ch; }
.footer-contact { display:grid; gap:12px; justify-items:end; }
.footer-feedback { padding:0; min-height:44px; background:none; border:0; color:var(--ink); font:inherit; cursor:pointer; text-decoration:underline; text-underline-offset:5px; }
.footer-feedback:hover { color:var(--accent); }
.footer-feedback:focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
.site-footer .footer-copyright { font-size:.875rem; }
#feedback-intro, #feedback-status { color:var(--muted); }
#feedback-status { min-height:1.6em; }
#feedback-dialog { max-height:calc(100dvh - 32px); overflow-y:auto; }
#feedback-form :is(input, textarea) { box-sizing:border-box; width:100%; min-width:0; }
@media(max-width:600px) {
  .footer-contact { justify-items:start; }
  .site-footer { grid-template-columns:minmax(0,1fr); gap:20px; margin-bottom:16px; padding-top:24px; }
}

.footer-languages { display:flex; flex-wrap:wrap; gap:4px 18px; grid-column:1 / -1; order:3; }
.footer-languages a { display:inline-flex; align-items:center; min-height:44px; color:var(--muted); text-underline-offset:4px; }
.footer-languages a:hover, .footer-languages a[aria-current="page"] { color:var(--ink); }
.footer-languages a[aria-current="page"] { font-weight:700; }
.footer-languages a:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
