/* Fathom. The water is the theme: it darkens as --d goes from 0 (surface) to 1 (trench). */
:root {
  --ease: cubic-bezier(.16, 1, .3, 1);
  --d: 0;
  --surface: #12668a;
  --abyss: #01050a;
  --ink: #e8f6fa;
  --ink-2: #a9c8d3;
  --ink-3: #93b6c3;
  --panel: rgba(3, 18, 30, 0.55);
  --panel-line: rgba(160, 225, 240, 0.18);
  --accent: #5ee6d0;
  --accent-ink: #032a2a;
  --warn: #ff8a6b;
  --t0: #5d6f78;
  --t1: #8fb8c9;
  --t2: #4fd1a5;
  --t3: #f2d06b;
  --t4: #f39a4c;
  --t5: #ff5d8f;
  --display: "Chakra Petch", "Avenir Next Condensed", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gauge-w: 150px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: color-mix(in oklab, var(--surface), var(--abyss) calc(var(--d) * 100%));
  transition: background-color 1.6s ease;
  min-height: 100vh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- water ---------- */
#water { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.caustics {
  position: absolute; inset: -20% -20% 40% -20%;
  background:
    radial-gradient(60% 40% at 30% 0%, rgba(200, 245, 255, 0.35), transparent 70%),
    radial-gradient(40% 30% at 75% 5%, rgba(200, 245, 255, 0.22), transparent 70%);
  opacity: calc(1 - var(--d) * 4);
  transition: opacity 1.6s ease;
  animation: sway 9s ease-in-out infinite alternate;
}
@keyframes sway { from { transform: translateX(-3%) skewX(-4deg); } to { transform: translateX(3%) skewX(4deg); } }
#bubbles span {
  position: absolute; bottom: -20px; border-radius: 50%;
  border: 1px solid rgba(200, 245, 255, 0.35);
  background: rgba(200, 245, 255, 0.06);
  animation-name: rise; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes rise { to { transform: translateY(-110vh) translateX(20px); opacity: 0; } }

/* ---------- HUD ---------- */
#hud {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px calc(var(--gauge-w) + 16px) 14px 20px;
  background: linear-gradient(to bottom, rgba(1, 8, 14, 0.45), transparent);
}
.brand {
  background: none; border: 0; padding: 0;
  font-family: var(--display); font-weight: 700; letter-spacing: 0.32em; font-size: 15px;
}
.hud-stats { display: flex; gap: 22px; }
.hud-stats div { display: flex; flex-direction: column; align-items: flex-end; }
.lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.val { font-family: var(--display); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- gauge ---------- */
#gauge {
  position: fixed; z-index: 2; right: 16px; top: 70px; bottom: 24px; width: var(--gauge-w);
  pointer-events: none;
}
.gauge-track {
  position: absolute; right: 0; top: 0; bottom: 0; width: 4px; border-radius: 2px;
  background: rgba(160, 225, 240, 0.14);
}
#gauge-fill {
  position: absolute; top: 0; left: 0; right: 0; height: 0; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--t5));
  transition: height 1.6s cubic-bezier(.3, .7, .2, 1);
}
#gauge-diver {
  position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px rgba(94, 230, 208, 0.18), 0 0 18px var(--accent);
  transition: top 1.6s cubic-bezier(.3, .7, .2, 1);
}
#gauge-zones { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0 14px 0 0; }
#gauge-zones li {
  position: absolute; right: 0; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; text-align: right;
  font-family: var(--mono); font-size: 9.5px; line-height: 1.25; color: var(--ink-3);
}
#gauge-zones li .m { color: var(--ink-2); }
#gauge-zones li.zone .n { color: var(--accent); letter-spacing: 0.08em; }
#gauge-zones li:not(.zone) .n { max-width: 130px; }

/* ---------- layout ---------- */
#app {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
  padding: 24px calc(var(--gauge-w) + 16px) 64px 16px;
  box-sizing: content-box;
}
@media (min-width: 1000px) { #app { padding-left: calc(var(--gauge-w) + 16px); } }
.screen { animation: rise .8s var(--ease) both; transform-origin: 50% 30%; will-change: transform, opacity; }
@keyframes rise { from { opacity: 0; transform: translateY(34px) scale(.96); } }
/* The previous screen zooms past the camera as you go deeper. */
.ghost-out { z-index: 1; pointer-events: none; animation: past .5s cubic-bezier(.4,0,.2,1) forwards; will-change: transform, opacity; }
@keyframes past { to { opacity: 0; transform: scale(1.12) translateY(-40px); } }

h1.title {
  font-family: var(--display); font-weight: 700; margin: 6vh 0 0;
  font-size: clamp(52px, 13vw, 104px); letter-spacing: 0.14em; line-height: 1;
}
.kicker { font-family: var(--mono); letter-spacing: 0.4em; text-transform: uppercase; color: var(--accent); margin: 10px 0 0; font-size: 13px; }
.tagline { color: var(--ink-2); margin: 18px 0 0; font-size: 15px; }
.rules { margin: 14px 0 0; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 12px; color: var(--ink-2); line-height: 1.6; font-size: 14.5px; }
.rules summary { cursor: pointer; padding: 12px 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); list-style: none; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary::after { content: "+"; float: right; color: var(--accent); }
.rules[open] summary::after { content: "−"; }
.rules ol { margin: 0; padding: 0 18px 4px 38px; }
.rules li::marker { color: var(--accent); font-family: var(--mono); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 18px 16px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sq { width: 10px; height: 10px; border-radius: 2px; background: currentColor; display: inline-block; }
.dive-no, .count { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em; }
.count { margin-top: 26px; }
.warn { color: var(--warn); }

.primary {
  display: block; width: 100%; padding: 18px 20px;
  font-family: var(--display); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: 17px;
  color: var(--ink); background: rgba(94, 230, 208, 0.08);
  border: 1.5px solid var(--accent); border-radius: 10px;
  box-shadow: 0 0 24px rgba(94, 230, 208, 0.15) inset;
  transition: background .2s, transform .1s;
}
.primary:hover { background: rgba(94, 230, 208, 0.18); }
.primary:active { transform: translateY(1px); }
.primary.small { display: inline-block; width: auto; padding: 12px 18px; font-size: 14px; }
.modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.modes button { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 12px 12px; text-align: left; }
.modes b { font-weight: 500; color: var(--ink); }
.modes span { color: var(--ink-3); text-transform: none; letter-spacing: 0.02em; font-size: 11px; }
.modes button, .actions button:not(.primary), .ghost, .card, .row {
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: 8px;
  padding: 11px 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  transition: border-color .2s;
}
.modes button:hover, .ghost:hover, .card:hover, .row:hover, .actions button:hover { border-color: var(--accent); }
.ghost { margin-top: 22px; }

/* ---------- round ---------- */
.round-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8vh; }
.pill {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; border: 1px solid var(--panel-line); background: var(--panel);
}
.pill.muted { color: var(--ink-3); }
.prompt {
  font-family: var(--display); font-weight: 600; font-size: clamp(28px, 6vw, 44px); line-height: 1.12;
  margin: 22px 0 26px; text-wrap: balance;
}
.prompt.small { font-size: clamp(20px, 4.4vw, 28px); margin: 16px 0 20px; color: var(--ink-2); }
.answer { display: flex; gap: 8px; }
.answer input {
  flex: 1; min-width: 0; padding: 16px 16px; font: 500 20px var(--sans); color: var(--ink);
  background: rgba(1, 8, 14, 0.55); border: 1.5px solid var(--panel-line); border-radius: 10px; outline: none;
}
.answer input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(94, 230, 208, 0.12); }
.answer input::placeholder { color: var(--ink-3); }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.feedback { min-height: 1.4em; color: var(--warn); font-size: 14px; margin: 12px 0 0; }
.feedback .ok { color: var(--accent); }
.clock { position: relative; height: 34px; margin-top: 14px; border-radius: 8px; overflow: hidden; background: var(--panel); border: 1px solid var(--panel-line); }
.clock-fill { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, rgba(94, 230, 208, 0.35), rgba(94, 230, 208, 0.12)); }
.clock.low .clock-fill { background: linear-gradient(90deg, rgba(255, 138, 107, 0.5), rgba(255, 138, 107, 0.15)); }
.clock.low { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { border-color: var(--warn); } }
.clock span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; }

/* ---------- reveal ---------- */
.reveal { margin-top: 6vh; }
.verdict {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 20px; border-radius: 12px; background: var(--panel); border: 1.5px solid currentColor;
}
.verdict .ans { display: block; font-family: var(--display); font-size: 30px; font-weight: 600; color: var(--ink); }
.verdict .typed { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.verdict .right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.verdict .gain { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.verdict .tier { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.t0 { color: var(--t0); } .t1 { color: var(--t1); } .t2 { color: var(--t2); }
.t3 { color: var(--t3); } .t4 { color: var(--t4); } .t5 { color: var(--t5); }
.passed { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--accent); margin: 14px 0 0; }
.lists { margin: 22px 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14.5px; }
.lists dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.lists dd { margin: 0; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; }
.hint { text-align: center; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }

/* ---------- results ---------- */
.results { margin-top: 5vh; }
.big { font-family: var(--display); font-size: clamp(56px, 14vw, 96px); margin: 14px 0 0; line-height: 1; font-variant-numeric: tabular-nums; }
.zone { color: var(--accent); font-family: var(--mono); letter-spacing: 0.08em; margin: 10px 0 0; }
.score-line { color: var(--ink-2); margin: 6px 0 22px; }
.recap { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--panel-line); }
.recap li { display: grid; grid-template-columns: 14px 1fr auto 34px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--panel-line); font-size: 14px; }
.recap .sq { width: 12px; height: 12px; border-radius: 3px; background: currentColor; }
.recap .q { color: var(--ink-2); }
.recap .a { font-weight: 600; text-align: right; }
.recap .pts { font-family: var(--mono); text-align: right; color: var(--ink-3); }
.share { font-family: var(--mono); font-size: 13px; background: rgba(1, 8, 14, 0.5); border: 1px dashed var(--panel-line); border-radius: 8px; padding: 12px; white-space: pre-wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- lists ---------- */
.list h2 { font-family: var(--display); font-size: 34px; margin: 6vh 0 4px; letter-spacing: 0.04em; }
.list h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin: 26px 0 10px; }
.sub, .empty { color: var(--ink-2); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 18px; }
.card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 18px 16px; text-align: left; }
.card-t { font-family: var(--display); font-size: 18px; text-transform: none; letter-spacing: 0.02em; }
.card-s { color: var(--ink-3); }
.rows { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; max-height: 60vh; overflow: auto; }
.row { display: grid; grid-template-columns: 1fr 1fr auto; text-align: left; gap: 10px; }
.muted { color: var(--ink-3); }
.row .r { color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.tile { background: var(--panel); border: 1px solid var(--panel-line); border-radius: 10px; padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.tile .v { font-family: var(--display); font-size: 24px; font-weight: 600; }
.tile .l { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 80px 1fr 34px; gap: 10px; align-items: center; font-size: 13px; }
.bl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.bt { height: 10px; border-radius: 5px; background: var(--panel); overflow: hidden; }
.bf { display: block; height: 100%; background: currentColor; border-radius: 5px; transition: width .8s ease; }
.bn { font-family: var(--mono); text-align: right; color: var(--ink-2); }

/* ---------- phone ---------- */
@media (max-width: 720px) {
  :root { --gauge-w: 10px; }
  #gauge { right: 8px; }
  #gauge-zones { display: none; }
  #hud { padding: 12px 26px 12px 16px; }
  #app { padding: 12px 30px 48px 16px; }
  .modes { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .round-top { margin-top: 3vh; }
  .answer { flex-direction: column; }
  .answer .primary.small { width: 100%; }
  .row { grid-template-columns: 1fr auto; }
  .row .muted { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- home: today card ---------- */
.today { margin-top: 30px; padding: 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-line); }
.today-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.today-n { color: var(--ink); font-weight: 500; }
.today-d { color: var(--ink-3); }
.streak { margin-left: auto; color: var(--t3); }
.today-done { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.today-m { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }
.today-z { color: var(--accent); font-family: var(--mono); font-size: 12px; }
.next { font-family: var(--mono); font-size: 12px; color: var(--ink-3); text-align: center; margin: 12px 0 0; }
.next b { color: var(--ink); font-weight: 500; }
.squares { display: inline-flex; gap: 4px; }
.squares .sq, .pips i { width: 12px; height: 12px; border-radius: 3px; background: currentColor; display: inline-block; }

/* ---------- round extras ---------- */
.pips { display: inline-flex; gap: 5px; margin: 0 4px; }
.pips i:not(.sq) { color: rgba(160, 225, 240, 0.18); }
.pips i.now { color: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tried { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 4px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; background: rgba(1, 8, 14, 0.4); border: 1px solid var(--panel-line); color: var(--ink-2); }
.tried .chip { text-decoration: line-through; text-decoration-color: rgba(255, 138, 107, 0.7); }
.chip.t1 { border-color: rgba(143, 184, 201, 0.4); color: var(--ink); }
.chip.t5 { border-color: rgba(255, 93, 143, 0.45); color: var(--ink); }
.round-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.round-foot .ghost { margin: 0; }
.hint { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.hint.center { text-align: center; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* ---------- reveal extras ---------- */
.meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; }
.meter span { padding: 6px 0 5px; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; border-top: 3px solid currentColor; opacity: 0.35; }
.meter span.me { opacity: 1; background: rgba(1, 8, 14, 0.35); }
.est { font-size: 12.5px; color: var(--ink-3); margin: 8px 0 0; }
.all { margin: 4px 0 22px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 10px; }
.all summary { cursor: pointer; padding: 12px 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; }
.all-tier { padding: 0 16px 10px; }
.all-tier h4 { margin: 6px 0 4px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.all-tier p { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.recap .pts { font-weight: 600; }

/* ---------- packs, archive, stats extras ---------- */
.card-b { color: var(--ink-2); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 13px; }
.card-s { display: flex; align-items: center; gap: 8px; color: var(--ink-3); width: 100%; }
.prog { flex: 1; height: 4px; border-radius: 2px; background: rgba(160, 225, 240, 0.12); overflow: hidden; }
.prog span { display: block; height: 100%; background: var(--accent); }
.row .r { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.row:not(.played) .r { color: var(--ink-3); }
.spark-chart { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding: 10px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 10px; }
.spark-chart span { position: relative; flex: 1; max-width: 36px; background: linear-gradient(var(--t5), var(--accent)); border-radius: 3px 3px 0 0; }
.spark-chart em { position: absolute; top: -16px; left: 0; right: 0; text-align: center; font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.flags { list-style: none; padding: 0; margin: 10px 0; font-size: 13.5px; }
.flags li { padding: 6px 0; border-bottom: 1px solid var(--panel-line); color: var(--ink-2); }

/* ---------- light, snow and sea life ---------- */
.rays {
  position: absolute; inset: 0 0 30% 0;
  background: repeating-linear-gradient(100deg, transparent 0 60px, rgba(210, 248, 255, 0.05) 60px 90px, transparent 90px 170px);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
  opacity: calc(1 - var(--d) * 2.5);
  transition: opacity 1.6s ease;
  animation: sway 14s ease-in-out infinite alternate-reverse;
}
#snow { position: absolute; inset: 0; opacity: calc(var(--d) * 1.4 - 0.2); transition: opacity 1.6s ease; }
#snow span { position: absolute; top: -10px; width: 2px; height: 2px; border-radius: 50%; background: rgba(220, 240, 245, 0.55); animation: fall linear infinite; }
@keyframes fall { to { transform: translate(30px, 105vh); } }
#life .creature { position: absolute; opacity: 0; transition: opacity 2s ease; color: rgba(190, 235, 245, 0.16); }
#life .creature.on { opacity: 1; }
.school { width: 220px; left: 6%; top: 58%; animation: swim 26s linear infinite; }
@keyframes swim { from { transform: translateX(-30vw); } to { transform: translateX(110vw); } }
.jelly { width: 70px; left: 12%; top: 34%; color: rgba(255, 140, 200, 0.22) !important; animation: bob 7s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(255, 140, 200, 0.35)); }
@keyframes bob { 50% { transform: translateY(-40px); } }
.angler { width: 180px; left: 4%; top: 62%; color: rgba(110, 140, 150, 0.22) !important; animation: lurk 18s ease-in-out infinite alternate; }
.angler .lure { fill: #bfffe9; filter: drop-shadow(0 0 8px #5ee6d0); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: 0.35; } }
@keyframes lurk { to { transform: translateX(14vw); } }
.wreck { width: 300px; left: 3%; bottom: 4%; color: rgba(140, 160, 165, 0.14) !important; }
.snail { width: 150px; left: 10%; top: 72%; color: rgba(230, 210, 220, 0.12) !important; animation: lurk 30s ease-in-out infinite alternate; }
@media (max-width: 720px) {
  .school, .angler { width: 140px; } .wreck { width: 200px; } .jelly { width: 50px; }
  .today-m { font-size: 32px; }
  .meter span { font-size: 8.5px; letter-spacing: 0.02em; }
  .modes button { padding: 10px; }
  .hint { display: none; }
}
.actions { align-items: stretch; margin-top: 14px; }
.actions button { padding: 12px 16px; margin: 0; }

/* ---------- motion ---------- */
#water { transform: translate(calc(var(--mx, 0) * -12px), calc(var(--my, 0) * -8px)) scale(calc(1.04 + var(--depth, 0) * .22)); transition: transform 1.6s cubic-bezier(.3,.7,.2,1); }
#life { position: absolute; inset: 0; transform: translate(calc(var(--mx, 0) * -34px), calc(var(--my, 0) * -20px)); transition: transform .6s ease-out; }

/* Each letter rises in on its own, then drifts like it's floating. Transform and opacity only, so it stays smooth. */
h1.title .l {
  display: inline-block; will-change: transform;
  animation: letterIn 1.1s var(--ease) both, float 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * .07s), calc(1.1s + var(--i) * .35s);
}
@keyframes letterIn { from { opacity: 0; transform: translateY(46px) scale(.7); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.home .kicker { animation: rise 1s .45s var(--ease) both; }
.home .tagline { animation: rise 1s .55s var(--ease) both; }

#go-daily { position: relative; overflow: hidden; animation: beacon 3s ease-in-out infinite; }
@keyframes beacon { 50% { box-shadow: 0 0 34px rgba(94, 230, 208, 0.28) inset, 0 0 26px rgba(94, 230, 208, 0.25); } }
.primary::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(200, 255, 245, 0.22), transparent);
}
.primary { position: relative; overflow: hidden; }
.primary:hover::after { transform: translateX(120%) skewX(-20deg); transition: transform .7s ease; }
.primary:hover { transform: scale(1.015); }

.modes button, .card { transition: transform .25s cubic-bezier(.2,.8,.2,1), border-color .2s, background .2s; }
.modes button:hover, .card:hover { transform: translateY(-3px) scale(1.03); background: rgba(3, 30, 45, 0.7); }
.modes button { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.modes button:nth-child(2) { animation-delay: .06s; } .modes button:nth-child(3) { animation-delay: .12s; } .modes button:nth-child(4) { animation-delay: .18s; }
.card { animation: rise .55s cubic-bezier(.2,.8,.2,1) both; }

/* prompt words drop in, one by one */
.prompt .w { display: inline-block; will-change: transform, opacity; animation: drop .75s var(--ease) both; animation-delay: calc(.1s + var(--i) * .05s); }
@keyframes drop { from { opacity: 0; transform: translateY(-16px) scale(1.25); } }
.prompt.tense { animation: heartbeat 1s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.025); } 24% { transform: scale(1); } 36% { transform: scale(1.015); } }
.answer input { transition: border-color .2s, box-shadow .2s, transform .2s; }
.answer input:focus { transform: scale(1.01); }

/* the verdict slams in */
.verdict { animation: slam .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes slam { 0% { opacity: 0; transform: scale(1.35); } 60% { opacity: 1; transform: scale(.98); } }
.verdict.t4, .verdict.t5 { box-shadow: 0 0 0 1px currentColor, 0 0 40px -6px currentColor; }
.verdict.t5 .gain { text-shadow: 0 0 18px currentColor; }
.meter span { transition: opacity .3s; }
.meter span.me { animation: meterPop .5s .35s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes meterPop { from { transform: scaleY(.4); opacity: .3; } }
.lists, .all, .reveal .primary { animation: rise .5s .25s cubic-bezier(.2,.8,.2,1) both; }

.flyer { position: fixed; z-index: 20; pointer-events: none; font-family: var(--display); font-weight: 700; font-size: 34px; text-shadow: 0 0 16px currentColor; }
.spark { position: fixed; z-index: 19; pointer-events: none; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
#hud-score.bump { animation: bump .5s cubic-bezier(.2,1.6,.4,1); color: var(--accent); }
@keyframes bump { 40% { transform: scale(1.5); } }
.val { display: inline-block; transition: color 1s; }
.flash { position: fixed; inset: 0; z-index: 18; pointer-events: none; background: radial-gradient(circle at 50% 40%, rgba(255, 93, 143, 0.35), transparent 60%); animation: flash .9s ease-out forwards; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
body.quake #app { animation: quake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes quake { 20%, 80% { transform: translate(-3px, 1px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-4px, 2px); } }

.zone-banner {
  position: fixed; inset: 0; z-index: 17; pointer-events: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  animation: zoneZoom 2.6s cubic-bezier(.2,.8,.2,1) forwards;
}
.zone-banner b { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 9vw, 92px); letter-spacing: .2em; color: var(--ink); text-shadow: 0 0 30px rgba(94, 230, 208, 0.6); }
.zone-banner small { font-family: var(--mono); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
@keyframes zoneZoom {
  0% { opacity: 0; transform: scale(.7); }
  22% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* results: number zooms in, rows and squares cascade */
.results .big { animation: bigIn 1s var(--ease) both; will-change: transform; }
@keyframes bigIn { from { opacity: 0; transform: scale(1.8); } }
.recap li { animation: slideIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(.35s + var(--i, 0) * .08s); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-24px); } }
.recap .sq { animation: pop .4s cubic-bezier(.2,1.8,.4,1) both; animation-delay: calc(.45s + var(--i, 0) * .08s); }
li .sq { display: inline-block; }
@keyframes pop { from { transform: scale(0); } }
.share, .actions { animation: rise .5s .9s cubic-bezier(.2,.8,.2,1) both; }
.today { animation: rise .6s .1s cubic-bezier(.2,.8,.2,1) both; }
.today .squares .sq { animation: pop .4s cubic-bezier(.2,1.8,.4,1) both; }
#gauge-diver { animation: sonar 2.4s ease-out infinite; }
@keyframes sonar { 0% { box-shadow: 0 0 0 0 rgba(94, 230, 208, 0.5), 0 0 18px var(--accent); } 100% { box-shadow: 0 0 0 14px rgba(94, 230, 208, 0), 0 0 18px var(--accent); } }

/* ---------- friends lobby ---------- */
.modes .wide { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 12px; border-color: rgba(94, 230, 208, 0.35); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 18px 0 14px; }
.field span, .room-code .lbl { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.field input, .code-in {
  padding: 13px 14px; font: 500 17px var(--sans); color: var(--ink); background: rgba(1, 8, 14, 0.55);
  border: 1.5px solid var(--panel-line); border-radius: 10px; outline: none;
}
.field input:focus, .code-in:focus { border-color: var(--accent); }
.lobby-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lobby-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 12px; animation: rise .7s var(--ease) both; }
.lobby-card + .lobby-card { animation-delay: .08s; }
.lobby-card h3 { margin: 0 !important; color: var(--ink) !important; }
.lobby-card .sub { margin: 0; }
.code-in { text-transform: uppercase; letter-spacing: .4em; font-family: var(--mono); text-align: center; }
.room-code { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 6px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; }
.room-code b { font-family: var(--display); font-size: 44px; letter-spacing: .3em; line-height: 1; }
.room-code button { margin-left: auto; padding: 10px 14px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 8px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.players { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 6px; }
.players li { display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 10px; padding: 11px 14px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 10px; animation: slideIn .45s var(--ease) both; }
.players li.me { border-color: rgba(94, 230, 208, 0.5); }
.players li.off { opacity: .45; }
.players .rk { font-family: var(--mono); color: var(--ink-3); }
.players .nm { font-weight: 600; }
.players .nm em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-left: 6px; }
.players .sc { font-family: var(--display); font-size: 20px; font-weight: 700; min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.players .st { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.players .st.ok { color: var(--accent); }
.players.compact { margin-top: 22px; }
.players.compact li { padding: 8px 12px; }
.players .sq-row { display: inline-flex; gap: 3px; }
.players .sq-row .sq { width: 9px; height: 9px; border-radius: 2px; background: currentColor; display: inline-block; }
.players.final li.gold { border-color: var(--t3); box-shadow: 0 0 24px -6px var(--t3); }
.players.final li.gold .rk::before { content: "★ "; color: var(--t3); }
.players.final li.silver { border-color: rgba(220, 230, 240, 0.6); }
.players.final li.bronze { border-color: rgba(205, 140, 90, 0.7); }
.players li:nth-child(2) { animation-delay: .05s; } .players li:nth-child(3) { animation-delay: .1s; } .players li:nth-child(4) { animation-delay: .15s; }
.players li:nth-child(5) { animation-delay: .2s; } .players li:nth-child(n+6) { animation-delay: .25s; }
.answers-round { list-style: none; padding: 0; margin: 10px 0 18px; display: flex; flex-direction: column; gap: 6px; }
.answers-round li { display: grid; grid-template-columns: minmax(70px, auto) 1fr auto 46px; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--panel); border: 1.5px solid currentColor; animation: slam .6s var(--ease) both; }
.answers-round li:nth-child(2) { animation-delay: .08s; } .answers-round li:nth-child(3) { animation-delay: .16s; } .answers-round li:nth-child(4) { animation-delay: .24s; } .answers-round li:nth-child(n+5) { animation-delay: .32s; }
.answers-round .nm { color: var(--ink-2); font-size: 13px; }
.answers-round .an { color: var(--ink); font-family: var(--display); font-size: 19px; font-weight: 600; }
.answers-round .tr { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.answers-round .pt { font-family: var(--display); font-weight: 700; font-size: 20px; text-align: right; }
.sub.center { text-align: center; }
@media (max-width: 720px) {
  .lobby-choice { grid-template-columns: 1fr; }
  .room-code b { font-size: 34px; }
  .answers-round li { grid-template-columns: 1fr auto; }
  .answers-round .tr { display: none; }
}
.lobby-reveal h3 { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 6px; }

/* ---------- the plunge: you dive and the ocean rushes past ---------- */
.plunge { position: fixed; inset: 0; z-index: 30; cursor: pointer; overflow: hidden; background: #12668a; }
.plunge::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 35%, rgba(0, 0, 0, 0.55)); }
.pl-column { position: absolute; left: 0; right: 0; top: 0; height: 0; will-change: transform; }
.pl-column .tick { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid rgba(190, 235, 245, 0.08); }
.pl-column .tick.big { border-top-color: rgba(190, 235, 245, 0.2); }
.pl-column .tick span { position: absolute; left: 18px; top: -8px; font-family: var(--mono); font-size: 12px; color: rgba(190, 235, 245, 0.45); }
.pl-column .mark { position: absolute; right: 6%; transform: translateY(-50%); text-align: right; font-family: var(--mono); font-size: 13px; color: rgba(190, 235, 245, 0.75); max-width: 44%; }
.pl-column .mark b { display: block; font-weight: 500; color: var(--ink); }
.pl-column .mark.zone { font-family: var(--display); font-size: clamp(18px, 3vw, 30px); letter-spacing: .14em; color: var(--accent); text-shadow: 0 0 18px rgba(94, 230, 208, 0.6); }
.pl-column .mark.zone b { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-shadow: none; }
.pl-streaks i { position: absolute; pointer-events: none; }
.pl-streaks .streak { width: 2px; height: 46px; border-radius: 2px; background: linear-gradient(transparent, rgba(210, 245, 255, 0.55)); }
.pl-streaks .bub { border-radius: 50%; border: 1px solid rgba(210, 245, 255, 0.7); background: rgba(210, 245, 255, 0.1); }
.pl-reticle { position: absolute; left: 0; right: 0; top: 50%; height: 0; border-top: 1px dashed rgba(94, 230, 208, 0.35); }
.pl-meter { position: absolute; left: 18px; top: 10px; font-family: var(--display); font-weight: 700; font-size: clamp(26px, 5vw, 44px); color: var(--accent); text-shadow: 0 0 20px rgba(94, 230, 208, 0.5); font-variant-numeric: tabular-nums; }
.pl-word {
  position: absolute; left: 50%; top: 50%; translate: -50% -115%; z-index: 2; will-change: transform, opacity;
  font-family: var(--display); font-weight: 700; font-size: clamp(32px, 7.5vw, 68px); letter-spacing: .02em;
  color: var(--ink); text-shadow: 0 0 24px currentColor; white-space: nowrap;
}
.plunge.t1 .pl-word, .plunge.t1 .pl-stamp { color: var(--t1); } .plunge.t2 .pl-word, .plunge.t2 .pl-stamp { color: var(--t2); }
.plunge.t3 .pl-word, .plunge.t3 .pl-stamp { color: var(--t3); } .plunge.t4 .pl-word, .plunge.t4 .pl-stamp { color: var(--t4); }
.plunge.t5 .pl-word, .plunge.t5 .pl-stamp { color: var(--t5); }
.pl-ring { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; z-index: 1; }
.plunge.t4 .pl-ring { color: var(--t4); } .plunge.t5 .pl-ring { color: var(--t5); box-shadow: 0 0 40px var(--t5), inset 0 0 40px var(--t5); }
.pl-stamp {
  position: absolute; left: 50%; top: 50%; opacity: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--display); font-weight: 700; font-size: clamp(28px, 6.5vw, 56px); letter-spacing: .18em; text-transform: uppercase;
  text-shadow: 0 0 30px currentColor;
}
.pl-stamp small { font-size: .5em; letter-spacing: .06em; }
.answer.launched input { color: transparent; transition: color .15s; }

/* dive extras: parallax sea life, marine snow, light rays, glowing wake */
.pl-layer { position: absolute; left: 0; right: 0; top: 0; height: 0; will-change: transform; }
.pl-far { opacity: .55; filter: saturate(.6); }
.critter { position: absolute; width: 0; height: 0; }
.critter svg { position: absolute; width: calc(160px * var(--s)); opacity: 1 !important; transform: scaleX(var(--f)) translate(-50%, -50%); animation: critSwim 2.6s ease-in-out infinite alternate; }
.critter.far svg { color: rgba(190, 235, 245, 0.22); }
.critter.near svg { color: rgba(190, 235, 245, 0.35); filter: drop-shadow(0 0 10px rgba(94, 230, 208, 0.25)); }
.critter svg.jelly { color: rgba(255, 140, 200, 0.35) !important; width: calc(60px * var(--s)); }
.critter svg.angler .lure { fill: #bfffe9; }
@keyframes critSwim { to { translate: var(--sw) 0; } }
.pl-snow i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(220, 240, 245, 0.6); }
.pl-rays { position: absolute; inset: 0 0 35% 0; pointer-events: none; background: repeating-linear-gradient(100deg, transparent 0 60px, rgba(210, 248, 255, 0.09) 60px 95px, transparent 95px 170px); -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.wake { position: fixed; z-index: 2; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; pointer-events: none; }
.plunge.t1 .wake { color: var(--t1); } .plunge.t2 .wake { color: var(--t2); } .plunge.t3 .wake { color: var(--t3); }
.plunge.t4 .wake { color: var(--t4); } .plunge.t5 .wake { color: var(--t5); }

/* flamboyant extras */
.plunge .drop { position: absolute; z-index: 4; width: 7px; height: 10px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; pointer-events: none; }
.plunge .confetti { position: absolute; z-index: 5; width: 9px; height: 15px; border-radius: 2px; pointer-events: none; box-shadow: 0 0 8px rgba(255, 255, 255, 0.25); }
.plunge.t3 .pl-word, .plunge.t4 .pl-word {
  background: linear-gradient(90deg, currentColor, #fff6, currentColor, #fff6, currentColor); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer 1.2s linear infinite;
}
.plunge.t5 .pl-word {
  background: linear-gradient(90deg, #ff5d8f, #f39a4c, #f2d06b, #4fd1a5, #5ee6d0, #8fb8c9, #c58cff, #ff5d8f); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shimmer .9s linear infinite; filter: drop-shadow(0 0 18px rgba(255, 93, 143, 0.7));
}
@keyframes shimmer { to { background-position: -300% 0; } }
.pl-meter { animation: meterGlow .6s ease-in-out infinite alternate; }
@keyframes meterGlow { to { text-shadow: 0 0 34px rgba(94, 230, 208, 0.9); } }
.pl-stamp { transform: translate(-50%, 30%); opacity: 1; }
.pl-letters { display: flex; }
.pl-letters span { display: inline-block; opacity: 0; }
.pl-stamp small { opacity: 0; }
.pl-stamp.go .pl-letters span { animation: letterSlam .5s cubic-bezier(.2,1.6,.4,1) both; animation-delay: calc(var(--i) * .045s); }
.pl-stamp.go small { animation: rise .5s .3s var(--ease) both; }
@keyframes letterSlam { 0% { opacity: 0; transform: translateY(-60px) scale(2.4) rotate(-14deg); } 100% { opacity: 1; transform: none; } }
.plunge.t5 .pl-stamp.go .pl-letters span { animation-name: letterSlam, rainbowGlow; animation-duration: .5s, 1s; animation-iteration-count: 1, infinite; animation-delay: calc(var(--i) * .045s), calc(.5s + var(--i) * .08s); }
@keyframes rainbowGlow { 0% { color: #ff5d8f; } 25% { color: #f2d06b; } 50% { color: #4fd1a5; } 75% { color: #c58cff; } 100% { color: #ff5d8f; } }
