/* Flight theme. Game positioning and transitions are defined in style.css. */
:root {
  --ink: #091320;
  --foam: #eef4f9;
  --muted: #adc0d1;
  --cyan: #a8d6ea;
  --pink: #b3d7e8;
  --gold: #f5c48a;
  --surface: #101f30;
  --raised: #182d41;
  --line: #4c657b;
  --radius: 5px;
  --instrument: ui-monospace, "SF Mono", Consolas, monospace;
  --tier-ink: color-mix(in srgb, var(--tier) 72%, #fff);
  background: var(--ink);
  color: var(--foam);
  font: 16px/1.5 system-ui, sans-serif;
}

body.colorblind { --muted: #c6d4df; --cyan: #bceaff; --pink: #c7e5f5; --gold: #ffcf90; }
#game { background: var(--ink); }
#ocean { image-rendering: auto; }
#game .crt { display: none; }
#game .vignette {
  opacity: .10;
  background: radial-gradient(ellipse at 46% 42%, transparent 44%, #070e1b 115%);
}
.danger-glow { box-shadow: inset 0 0 72px #eb995b55; }
.flash { background: var(--gold); }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.hero { top: clamp(105px, 22vh, 230px); }
.hero h1 { margin-inline: auto; font-weight: 800; line-height: .98; }
.hero-word, body.colorblind .hero-word {
  color: #fff;
  font-size: clamp(50px, 7vw, 106px);
  letter-spacing: -.043em;
  text-shadow: 0 1px 2px #14334e, 0 4px 20px #0c2d5859;
  text-transform: uppercase;
  text-wrap: balance;
  animation: none;
}
#game .open-label {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
  padding: 3px 9px;
  color: #ffe2b8;
  background: #10263b;
  border-radius: 2px;
  font: 650 11px/1.4 var(--instrument);
  letter-spacing: .24em;
  text-shadow: 0 1px 2px #101d2b;
}
.open-label::before, .open-label::after {
  content: '';
  width: 19px;
  height: 1px;
  background: currentColor;
  opacity: .65;
}
#game .subline {
  margin: 19px auto 0;
  color: #061627;
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 600;
  letter-spacing: .015em;
  text-shadow: none;
}

.intro {
  max-width: 584px;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #9bc0d477;
}
.how-to, .intro-links, .intro-links .text-button, #game .intro-meta {
  color: #d4e0ea;
  text-shadow: 0 1px 4px #091320;
}
.how-to summary, .intro-meta, .intro-meta button {
  font: 650 11px/1.5 var(--instrument);
  letter-spacing: .12em;
}
.how-to summary { width: fit-content; }
.how-to ul { border-left: 2px solid var(--cyan); padding: 8px 12px 8px 24px; font-size: 14px; }
.how-to ul:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.intro-links, .intro-links .text-button { font-size: 12px; }
.intro-links a { margin-right: 0; }
.intro-meta > span { color: var(--gold); white-space: nowrap; }
.intro-meta nav > button { min-width: 64px; min-height: 32px; padding: 4px 9px; }

.begin-btn, .next-btn, #submit-btn {
  border: 1px solid #f8d4a8;
  border-radius: var(--radius);
  background: var(--gold);
  color: #192637;
  font-weight: 750;
  box-shadow: none;
  transition: background-color .16s, border-color .16s;
}
.begin-btn:hover, .next-btn:hover, #submit-btn:not(:disabled):hover { background: #ffdbad; box-shadow: none; }
.begin-btn:active, .next-btn:active { translate: 0 1px; }
.mode-choices { gap: 12px; }
.mode-choices .begin-btn {
  position: relative;
  min-height: 69px;
  padding: 11px 26px 11px 14px;
  text-align: left;
  letter-spacing: .04em;
}
.mode-choices .begin-btn::after {
  content: '';
  position: absolute;
  right: 14px;
  top: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}
.mode-choices strong { font-size: clamp(16px, 2.6vw, 22px); font-weight: 800; }
.mode-choices small { color: inherit; font-size: 12px; font-weight: 550; letter-spacing: .01em; }
.mode-choices button:focus-visible { outline-color: var(--cyan); outline-offset: 3px; }
#unlimited-btn { background: #152739; color: #eff6fc; border-color: #7894ab; }
#unlimited-btn:hover { background: #203950; border-color: #a1bfd3; }

.square, .utility .square, .intro-meta button, .quiet, .rating button, .buddy-list button, .close {
  background: var(--surface);
  color: var(--foam);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  opacity: 1;
}
.square:hover, .intro-meta button:hover, .quiet:hover, .rating button:hover,
.buddy-list button:hover, .close:hover { background: var(--raised); color: var(--cyan); border-color: var(--cyan); }
.square { font-size: 18px; }
.utility .square { height: 32px; }
.leaderboard-entry {
  position: absolute;
  top: 12px;
  left: calc(max(12px, env(safe-area-inset-left)) + 46px);
  z-index: 35;
  padding: 0 11px;
  min-height: 36px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  border-color: #7894ab;
}
body:not([data-phase="intro"]) .leaderboard-entry { display: none; }
.mascot span { background: var(--surface); color: var(--foam); border-color: var(--line); font-size: 13px; }
.mascot.gold { filter: none; }
.mascot.gold::before { content: none; }

.pixel-frame { clip-path: none; border-radius: var(--radius); }
.hud-pod, .prompt-card, .preview-label, .answer-status.correction {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px #07121f36;
}
.hud-pod { border-top-color: var(--cyan); }
.hud-pod > span, .round-progress, .eyebrow, .altitude-ruler {
  font-family: var(--instrument);
  letter-spacing: .12em;
}
.hud-pod strong, .hud-pod:last-child strong { font: 700 25px/1.15 var(--instrument); color: var(--foam); text-shadow: none; }
#game .round-progress { color: #f3f8fc; text-shadow: 0 1px 3px #0c1926; }
#round-dots i { height: 6px; border: 1px solid #7c9aad; border-radius: 1px; background: var(--surface); box-shadow: none; }
#round-dots i.active { background: var(--gold); border-color: var(--gold); box-shadow: none; animation: none; }
#round-dots i.done { background: var(--dot-color, var(--cyan)); border-color: var(--dot-color, var(--cyan)); }

.prompt-card { border-left: 3px solid #93cce2; }
.prompt-card::after { content: none; }
.prompt-card .eyebrow { color: var(--cyan); font-size: 12px; letter-spacing: .16em; }
.prompt-card h2 {
  color: var(--foam);
  font-size: clamp(23px, 3.1vw, 32px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.025em;
  text-shadow: none;
  text-wrap: pretty;
}
.hint { color: var(--muted); font-size: 12px; letter-spacing: .02em; }
.answer-dock::before { background: none; }
.timer {
  color: var(--foam);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: none;
  font: 700 22px/1 var(--instrument);
}
.timer::before, .timer::after { content: none; }
.timer svg { opacity: 1; }
.timer circle { stroke: #3a536a; }
.timer .timer-ring { stroke: var(--cyan); stroke-width: 3; }
.timer span { text-shadow: none; }
.input-wrap input {
  color: var(--foam);
  background: var(--surface);
  border: 1px solid #7894ab;
  border-radius: var(--radius);
  caret-color: var(--cyan);
  font-size: 17px;
  letter-spacing: 0;
}
.input-wrap input::placeholder { color: var(--muted); }
.input-wrap input:focus { border-color: var(--cyan); }
.time-bar { height: 3px; background: var(--cyan); box-shadow: none; border-radius: 2px; }
#submit-btn { font-size: 16px; }
.preview-label { color: var(--foam); font-size: 13px; white-space: normal; }
.answer-status { color: var(--foam); font-size: 14px; letter-spacing: 0; text-shadow: 0 1px 4px #091320; }
.answer-status.correction { color: var(--gold); font-size: 16px; text-shadow: none; }
.error { color: #ffd0b0; }
body.timer-hot .timer, body.timer-hot .timer span { color: var(--gold); text-shadow: none; }
body.timer-hot .timer .timer-ring { stroke: var(--gold); }
body.timer-hot .input-wrap input { border-color: var(--gold); }
body.timer-hot .time-bar { background: var(--gold); }

.altitude-marker { background: var(--gold); color: #172534; border-color: #fff3dc; }
.altitude-tick { background: var(--surface); color: var(--foam); border-color: #7c9eaf; }
.altitude-scale::before { opacity: .7; }
#game .landing .eyebrow { color: var(--tier-ink); font-weight: 750; }
#game .landing h2 { color: var(--foam); font-weight: 700; }
#game .landing #land-quip { color: #e2ebf3; font-size: 14px; letter-spacing: .02em; }
#land-points b { color: var(--tier-ink); }
.land-icon { filter: drop-shadow(0 4px 6px #08132180); image-rendering: auto; }
.falling-answer { border: 1px solid #7998b0; border-radius: var(--radius); box-shadow: none; text-shadow: none; }
.tier-line { border-width: 1px; }

.results { background: #0d1927; }
.result-brand { color: var(--foam); font-weight: 750; letter-spacing: -.025em; text-shadow: none; }
.result-score strong { color: var(--foam); font-weight: 750; font-variant-numeric: tabular-nums; text-shadow: none; }
.result-score span { font-size: 16px; }
.board-form { background: var(--surface); border-color: var(--line); border-radius: var(--radius); }
.board-form-heading { grid-column: 1/-1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; }
.board-form h3 { color: var(--gold); font-size: 18px; font-weight: 700; }
.board-form-heading .text-button { min-height: 32px; color: var(--cyan); }
.board-form .board-help { color: var(--muted); font-size: 13px; }
.board-form input { background: var(--ink); border-color: var(--line); border-radius: var(--radius); font-size: 16px; }
.board-form input::placeholder { color: var(--muted); }
.board-form button[type="submit"] { background: var(--gold); border-color: #f8d4a8; color: #192637; font-weight: 700; }
.board-form button[type="submit"]:not(:disabled):hover { background: #ffdbad; }
.board-form button[type="submit"]:disabled { opacity: .65; }
.distribution svg { font-family: var(--instrument); }
.distribution svg text { fill: var(--muted); font-size: 14px; }
.distribution svg path:first-child { fill: #a8d6ea24; }
.distribution svg path:nth-child(2) { stroke: var(--cyan); }
.distribution svg path[stroke="#ff5d8f"] { stroke: var(--gold); }
.distribution svg circle, .distribution svg text:last-child { fill: var(--gold); }
.distribution p { color: var(--muted); font-size: 12px; letter-spacing: .07em; }
.chart-grid > span { color: var(--muted); }
.dive-dot { filter: none; }
.dive-dot img, .buddy-list img { image-rendering: auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 16px; }
.panel::backdrop { background: #060c16b3; }
.panel h2 { font-size: 29px; font-weight: 750; letter-spacing: -.03em; }
#copy-preview { color: var(--foam); background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.result-actions [data-action="share-result"], .result-actions [data-action="copy-result"] { border-color: var(--line); }
.result-actions [data-copied] { color: var(--gold); }
.menu-nav > *, .setting strong { font-size: 17px; font-weight: 650; }
.setting small, .muted { font-size: 14px; }
.guide-toggle { color: var(--muted); }
.reader-brand { font: 750 24px/1.15 system-ui, sans-serif; letter-spacing: -.035em; }
.info-page article h1 { color: var(--foam); line-height: 1.06; letter-spacing: -.04em; }
.tutorial-score-table { width: 100%; margin: 12px 0 24px; border-collapse: collapse; }
.tutorial-score-table th, .tutorial-score-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.tutorial-score-table thead { background: var(--surface); }
.tutorial-score-table tbody th { font-weight: 550; }
.tutorial-score-table td { font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 899px) {
  .hero-word { font-size: clamp(42px, 8.2vw, 76px); }
}
@media (max-width: 699px) {
  .hero { top: clamp(92px, 21vh, 155px); }
  .hero-word { max-width: 10ch; font-size: clamp(43px, 11.8vw, 64px); }
  #game .subline { max-width: 28ch; }
  .intro-meta > span { max-width: none; font-size: 11px; }
  .intro-meta nav > button { min-height: 40px; white-space: nowrap; }
  .hud-pod strong, .hud-pod:last-child strong { font-size: 20px; }
  .prompt-card h2 { font-size: clamp(21px, 6.7vw, 28px); }
}
@media (max-width: 360px) {
  .mode-choices .begin-btn { padding-inline: 10px; }
  .mode-choices .begin-btn::after { content: none; }
  .mode-choices strong { font-size: 15px; }
}
@media (max-height: 740px) {
  body[data-phase="intro"] #game:has(.how-to[open]) .hero { top: 64px; }
  #game:has(.how-to[open]) .hero-word { max-width: none; font-size: clamp(25px, 7.5vw, 62px); }
  #game:has(.how-to[open]) .subline { display: none; }
  .how-to[open] ul { max-height: clamp(48px, calc(var(--vh) - 390px), 160px); overflow: auto; }
}
@media (max-height: 570px) {
  .hero { top: 61px; }
  .hero-word { max-width: none; font-size: clamp(25px, 7.5vw, 58px); }
  #game .open-label { margin-bottom: 10px; }
  #game .subline { margin-top: 10px; }
  .intro { gap: 6px; padding-top: 6px; }
  .mode-choices .begin-btn { min-height: 57px; }
}
