:root {
  --ink: #f2fbf8;
  --muted: #9cc9c2;
  --panel: rgba(3, 38, 44, 0.84);
  --panel-solid: #06353b;
  --edge: rgba(140, 240, 220, 0.24);
  --foam: #3fe0c5;
  --coral: #ff7a5c;
  --sand: #ffe2a8;
  --gem: #6ea8ff;
  --deep: #c58cff;
  --rare: #ffd166;
  --school: #b9d7e6;
  --clever: #ff8a3d;
  --plankton: #8fe8c4;
  --none: #ff5d5d;
  --round: "Nunito", "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #021015; }
body { margin: 0; color: var(--ink); font: 16px/1.6 var(--round); background: #021015; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--foam); }
* { scrollbar-width: thin; scrollbar-color: rgba(63, 224, 197, 0.45) transparent; }

/* ---------- stage: sky, lagoon and the deep ---------- */
.stage { position: relative; height: 100svh; min-height: 600px; overflow: hidden; background: #1694a3; }
body.playing { overflow: hidden; }
body.playing .stage { position: fixed; inset: 0; height: auto; min-height: 0; z-index: 5; }
body.playing .content, body.playing .seabed { display: none; }

.scene { position: absolute; left: 0; right: 0; top: 0; height: 4300px; will-change: transform; transition: transform 1.6s cubic-bezier(0.5, 0, 0.25, 1); }
.scene .water { position: absolute; inset: 0;
  background: linear-gradient(180deg, #ffcf9e 0, #ffe6c4 180px, #c8f1ee 400px, #9fe7e0 419px, #3fc9c2 420px, #20a9b0 520px, #12889c 640px, #0b6a83 830px, #08506b 965px, #063a55 1400px, #052841 2100px, #04182b 2800px, #030c18 3155px, #020810 3900px, #010409 4300px); }
.scene .sun { position: absolute; top: 120px; right: 16%; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, #fff6d8 0 40%, #ffd88a 41% 60%, rgba(255, 200, 120, 0) 70%); }
.scene .rays { position: absolute; left: 0; right: 0; top: 420px; height: 520px; background: repeating-linear-gradient(78deg, rgba(255, 255, 230, 0.09) 0 26px, transparent 26px 110px); mask-image: linear-gradient(180deg, #000, transparent); -webkit-mask-image: linear-gradient(180deg, #000, transparent); animation: shimmer 9s ease-in-out infinite alternate; }
.scene .island { position: absolute; left: calc(7% + 40px); width: 120px; height: 70px; }
@media (min-width: 721px) { .scene .island { left: 42%; } }
.scene .gull { position: absolute; animation: glide 7s ease-in-out infinite; }
.scene .grass { position: absolute; opacity: 0.85; transform-origin: bottom center; animation: sway 5s ease-in-out infinite; }
.scene .coral { position: absolute; }
.scene .fish { position: absolute; left: 0; animation: swim linear infinite; }
.scene .jelly { position: absolute; animation: pulse 6s ease-in-out infinite; }
.scene .squid { position: absolute; left: 0; animation: drift 60s linear infinite; opacity: 0.9; }
.scene .mark { position: absolute; max-width: 44vw; padding: 3px 10px; border-radius: 99px; background: rgba(2, 20, 26, 0.35); font: 600 12px/1.35 var(--round); color: rgba(220, 250, 245, 0.7); transition: opacity 0.6s; }
.scene .mark.l { left: 72px; }
.scene .mark.r { right: 14px; text-align: right; }
.scene .mark.zone { color: var(--sand); font-weight: 800; background: rgba(2, 20, 26, 0.55); letter-spacing: 0.04em; }
body:not(.playing) .scene .mark { opacity: 0; }
.scene .record { position: absolute; left: 60px; right: 0; border-top: 2px dashed rgba(255, 122, 92, 0.75); }

@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes swim { from { transform: translateX(calc(100vw + 60px)) scaleX(1); } to { transform: translateX(-80px); } }
@keyframes drift { from { transform: translateX(calc(100vw + 40px)); } to { transform: translateX(-180px); } }
@keyframes glide { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(24px, -8px); } }
@keyframes pulse { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-14px) scaleY(0.92); } }
@keyframes shimmer { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

.bubbles { position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: radial-gradient(circle at 50% 50%, transparent 2px, rgba(255, 255, 255, 0.7) 2.5px, transparent 3.5px), radial-gradient(circle at 50% 50%, transparent 3px, rgba(255, 255, 255, 0.55) 3.5px, transparent 4.5px), radial-gradient(circle at 50% 50%, transparent 1px, rgba(255, 255, 255, 0.6) 1.5px, transparent 2.5px);
  background-size: 180px 320px, 290px 460px, 120px 260px; background-position: 30px 0, 140px 90px, 70px 40px; animation: rise 16s linear infinite; }
@keyframes rise { to { background-position: 30px -320px, 140px -370px, 70px -480px; } }

/* depth gauge on the left */
.gauge { position: absolute; top: 0; bottom: 0; left: 0; width: 60px; pointer-events: none; background: linear-gradient(90deg, rgba(2, 20, 26, 0.35), transparent); }
.gauge-track { position: absolute; left: 10px; top: 0; height: 4300px; width: 50px; border-left: 3px solid rgba(255, 226, 168, 0.45); transition: transform 1.6s cubic-bezier(0.5, 0, 0.25, 1); will-change: transform; }
.gauge-track i { position: absolute; left: 0; width: 6px; border-top: 1px solid rgba(255, 240, 210, 0.45); }
.gauge-track i.big { width: 13px; border-top-width: 2px; }
.gauge-track span { position: absolute; left: 17px; font: 700 11px var(--round); color: rgba(255, 240, 210, 0.75); transform: translateY(-50%); white-space: nowrap; }
.gauge .you { position: absolute; left: 4px; top: 46%; transform: translateY(-50%); padding: 1px 6px; border-radius: 99px; background: var(--coral); color: #2b0d05; font: 900 10px var(--round); letter-spacing: 0.08em; }

/* the turtle */
.turtle { position: absolute; left: 64%; top: 46%; width: 64px; height: 40px; transform: translate(-50%, -50%) scale(1.35); filter: drop-shadow(0 0 12px var(--glow, rgba(150, 240, 225, 0.45))); animation: paddle 3.4s ease-in-out infinite; }
.turtle svg { display: block; }
@keyframes paddle { 0%, 100% { margin-top: -5px; rotate: -3deg; } 50% { margin-top: 5px; rotate: 3deg; } }
.turtle.sinking { animation: plunge 0.9s ease-in-out infinite; }
@keyframes plunge { 0%, 100% { rotate: 18deg; margin-top: -3px; } 50% { rotate: 26deg; margin-top: 3px; } }

/* ---------- hud ---------- */
.hud { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 6; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-brand { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--edge); }
.hud-pill { display: flex; align-items: center; gap: 14px; padding: 6px 16px; border-radius: 99px; background: var(--panel); border: 1px solid var(--edge); backdrop-filter: blur(6px); pointer-events: none; }
.hud-cell small, .hud-mid small { display: block; font: 800 9px var(--round); letter-spacing: 0.18em; color: var(--muted); }
.hud-cell b { display: block; font: 900 19px/1.1 var(--round); color: var(--sand); white-space: nowrap; }
.hud-cell.right { text-align: right; }
.hud-cell.right b { color: var(--foam); }
.hud-mid { text-align: center; }
.hud-mid small { margin-top: 3px; min-height: 1em; }
.dots { display: flex; gap: 5px; justify-content: center; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); border: 1.5px solid rgba(220, 250, 245, 0.35); }
.dots i.now { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
.dots i[class^="t-"] { border-color: transparent; }

.menu-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--edge); display: grid; place-content: center; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); }
.menu-btn[aria-expanded="true"] { border-color: var(--foam); }
.menu { position: absolute; top: 62px; right: 10px; z-index: 7; display: grid; gap: 1px; background: var(--panel-solid); border: 1px solid var(--edge); border-radius: 18px; padding: 8px; min-width: 220px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.menu[hidden] { display: none; }
.menu button, .menu a { text-align: left; background: none; border: 0; padding: 9px 14px; border-radius: 12px; color: var(--ink); text-decoration: none; font: 700 15px var(--round); }
.menu button:hover, .menu a:hover { background: rgba(63, 224, 197, 0.12); }
.menu hr { border: 0; border-top: 1px solid var(--edge); margin: 6px 8px; }
.menu a:not([data-go]) { font-weight: 600; font-size: 14px; color: var(--muted); }

/* ---------- screens ---------- */
.app { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; pointer-events: none; }
.app > * { pointer-events: auto; }

.home { margin: auto auto auto max(84px, 8vw); padding: 90px 0 40px; max-width: 500px; }
.kicker { margin: 0 0 8px; display: inline-block; padding: 3px 12px; border-radius: 99px; background: rgba(3, 38, 44, 0.55); font: 800 12px var(--round); letter-spacing: 0.08em; color: var(--sand); }
.title { margin: 0; font: 900 clamp(44px, 9vw, 76px)/0.95 var(--round); color: #fff; letter-spacing: -0.02em; text-shadow: 0 4px 0 rgba(3, 60, 70, 0.6); }
.title span { color: var(--coral); }
.tag { margin: 14px 0 22px; font: 600 17px/1.5 var(--round); color: #e9fbf7; text-shadow: 0 1px 2px rgba(0, 40, 50, 0.6); max-width: 30em; }
.go { display: inline-block; font: 900 18px var(--round); padding: 15px 30px; border-radius: 99px; border: 0; color: #032a2e; background: linear-gradient(180deg, #7ff5df, var(--foam)); box-shadow: 0 6px 0 #138a7a, 0 10px 24px rgba(0, 40, 40, 0.35); text-decoration: none; }
.go:active { transform: translateY(3px); box-shadow: 0 3px 0 #138a7a, 0 6px 16px rgba(0, 40, 40, 0.35); }
.go.ghosty { background: var(--panel); color: var(--ink); border: 1px solid var(--edge); box-shadow: none; font-size: 15px; font-weight: 800; padding: 11px 18px; }
.go.ghosty:hover { border-color: var(--foam); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.reset { margin: 14px 0 0; font: 700 13px var(--round); color: #dff6f2; }
.small { font: 600 13px var(--round); color: #cfeee8; margin-top: 14px; }
.center { text-align: center; }
button.stats { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; background: none; border: 0; padding: 0; }
.stats div { background: var(--panel); border: 1px solid var(--edge); border-radius: 14px; padding: 6px 14px; min-width: 78px; text-align: left; }
.stats b { display: block; font: 900 18px var(--round); color: var(--sand); }
.stats span { font: 800 9px var(--round); letter-spacing: 0.16em; color: var(--muted); }
button.stats:hover div { border-color: var(--foam); }

/* prompt card: question, clock and answer box together at the top */
.prompt-card { margin: 70px 12px 0 72px; max-width: 680px; background: var(--panel); border: 1px solid var(--edge); border-radius: 22px; padding: 14px 16px 12px; backdrop-filter: blur(6px); box-shadow: 0 12px 30px rgba(0, 20, 30, 0.35); }
.prompt-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.prompt-top small { font: 900 11px var(--round); letter-spacing: 0.14em; color: var(--coral); }
.prompt-top .cat { font: 800 11px var(--round); padding: 2px 10px; border-radius: 99px; background: rgba(63, 224, 197, 0.14); color: var(--foam); text-transform: capitalize; }
.prompt-card h2 { margin: 6px 0 12px; font: 900 clamp(21px, 4.6vw, 30px)/1.22 var(--round); }
.bar { display: flex; align-items: center; gap: 10px; }
.clock { position: relative; width: 54px; height: 54px; flex: none; }
.clock svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.clock circle { fill: rgba(255, 255, 255, 0.08); stroke: rgba(220, 250, 245, 0.18); stroke-width: 5; }
.clock circle.left { fill: none; stroke: var(--foam); stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }
.clock b { position: absolute; inset: 0; display: grid; place-items: center; font: 900 18px var(--round); color: var(--foam); }
.clock.hurry circle.left { stroke: var(--coral); }
.clock.hurry b { color: var(--coral); }
.clock.paused circle.left { stroke: var(--muted); }
.clock.paused b { color: var(--muted); }
.bar form { flex: 1; display: flex; gap: 8px; min-width: 0; }
.bar input { flex: 1; min-width: 0; font: 700 18px var(--round); padding: 13px 16px; border-radius: 99px; background: #fffaf0; color: #08343a; border: 2px solid transparent; outline: none; }
.bar input:focus { border-color: var(--foam); }
.bar input::placeholder { color: #7a9a98; }
.bar input.miss { border-color: var(--none); animation: miss 0.32s ease-in-out; }
@keyframes miss { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.bar .dive { font: 900 16px var(--round); padding: 0 20px; border-radius: 99px; border: 0; background: var(--coral); color: #2b0d05; box-shadow: 0 4px 0 #b84a30; }
.bar .dive:disabled { opacity: 0.6; }
.err { margin: 8px 0 0; font: 700 14px var(--round); color: #ffb0a0; min-height: 0; }
.err:empty { display: none; }
.hint { margin: 8px 0 0; font: 700 11px var(--round); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

/* verdict: a sheet rising from the bottom */
.verdict { margin: auto auto 0; width: min(560px, calc(100% - 84px)); margin-left: max(72px, calc(50% - 280px)); text-align: center; padding: 18px 22px calc(22px + env(safe-area-inset-bottom)); background: var(--panel); border: 1px solid var(--edge); border-bottom: 0; border-radius: 26px 26px 0 0; backdrop-filter: blur(8px); box-shadow: 0 -10px 30px rgba(0, 20, 30, 0.35); }
.verdict .label { font: 900 clamp(30px, 8vw, 46px)/1.05 var(--round); }
.verdict .said { font: 800 18px var(--round); margin-top: 8px; overflow-wrap: anywhere; }
.verdict .pts { display: flex; gap: 10px; justify-content: center; align-items: baseline; margin-top: 8px; font: 800 15px var(--round); color: var(--muted); }
.verdict .pts em { font: 900 22px var(--round); font-style: normal; color: var(--sand); }
.verdict .note { font: 600 14px var(--round); color: #cfeee8; margin-top: 6px; }
.verdict .fact { margin: 12px auto 0; max-width: 460px; background: rgba(110, 168, 255, 0.12); border: 1px solid rgba(110, 168, 255, 0.5); border-radius: 16px; padding: 10px 14px; font: 600 14px var(--round); color: #dce9ff; }
.verdict .go { margin-top: 18px; }

.critter { display: inline-grid; place-items: center; width: 36px; height: 24px; flex: none; }
.critter svg { width: 100%; height: 100%; display: block; }
.critter.big { width: 108px; height: 72px; margin: -46px auto 2px; filter: drop-shadow(0 6px 10px rgba(0, 20, 30, 0.45)); }
.critter.tiny { width: 34px; height: 23px; }

.c-gem { color: var(--gem); } .c-deep { color: var(--deep); } .c-rare { color: var(--rare); } .c-school { color: var(--school); }
.c-clever { color: var(--clever); } .c-plankton { color: var(--plankton); } .c-none { color: var(--none); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 99px; font: 800 12px var(--round); color: #06262b; white-space: nowrap; }
.t-gem { background: var(--gem); } .t-deep { background: var(--deep); } .t-rare { background: var(--rare); } .t-school { background: var(--school); }
.t-clever { background: var(--clever); } .t-plankton { background: var(--plankton); } .t-none { background: var(--none); color: #fff; }

/* surfacing: the log sheet */
.sheet { position: absolute; inset: 0; overflow-y: auto; z-index: 4; padding: 70px 12px 40px 72px; background: linear-gradient(180deg, rgba(2, 16, 21, 0.15), rgba(2, 16, 21, 0.9) 34%); }
.sheet .inner { max-width: 640px; margin: 0 auto; }
.summary { margin-top: 18px; padding: 20px 20px 18px; border-radius: 26px; background: var(--panel); border: 1px solid var(--edge); text-align: center; }
.summary small { font: 900 12px var(--round); letter-spacing: 0.14em; color: var(--coral); text-transform: uppercase; }
.summary .depth { font: 900 clamp(48px, 13vw, 76px)/1 var(--round); color: var(--sand); margin: 8px 0 2px; }
.summary .zone { font: 900 16px var(--round); color: var(--foam); }
.summary .score { font: 700 15px var(--round); margin-top: 4px; color: #cfeee8; }
.summary .squares { display: flex; justify-content: center; gap: 2px; margin: 12px 0 0; flex-wrap: wrap; }
.summary .beat { font: 700 13px var(--round); color: var(--muted); margin-top: 6px; min-height: 1em; }
.summary .row { justify-content: center; }
.box { background: var(--panel); border: 1px solid var(--edge); border-radius: 18px; margin-top: 10px; }
.box > button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 14px; display: flex; gap: 10px; align-items: center; }
.box .qa { flex: 1; min-width: 0; display: grid; }
.box .q { font: 600 13px var(--round); color: var(--muted); }
.box .a { font: 800 16px var(--round); overflow-wrap: anywhere; }
.box .more { padding: 0 14px 14px; font-size: 14px; }
.box .more h4 { margin: 12px 0 4px; font: 900 12px var(--round); letter-spacing: 0.08em; text-transform: uppercase; }
.box .more p { margin: 0; color: #d6f0eb; }
.box .gemfact { color: #dce9ff; }
.check { display: flex; gap: 6px; margin-top: 12px; }
.check input { flex: 1; min-width: 0; font: 600 15px var(--round); padding: 9px 14px; border-radius: 99px; background: #fffaf0; color: #08343a; border: 0; }
.check button { border: 0; border-radius: 99px; padding: 0 16px; background: var(--foam); color: #032a2e; font: 900 14px var(--round); }
.check-out { font: 700 13px var(--round); margin-top: 6px; min-height: 1.2em; }

.list { display: grid; gap: 6px; margin-top: 12px; }
.list button { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--edge); border-radius: 16px; padding: 11px 16px; font: 700 15px var(--round); text-align: left; }
.list button:hover { border-color: var(--foam); }
.list .date { display: block; color: var(--muted); font-weight: 600; font-size: 13px; }
.list .state { font-weight: 900; color: var(--sand); white-space: nowrap; }
.modal-text { max-width: 560px; margin: 0 auto; font-size: 15px; }
.modal-text h2 { font: 900 26px var(--round); text-align: center; margin: 18px 0 4px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--sand); color: #2b1d05; padding: 10px 20px; border-radius: 99px; font: 800 14px var(--round); z-index: 40; max-width: calc(100vw - 24px); text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }

/* ---------- modal: how to play, settings, dive log ---------- */
.modal-back { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 12px; background: rgba(1, 14, 18, 0.6); backdrop-filter: blur(4px); overflow-y: auto; }
.modal-back.in-dive { align-items: start; }
.modal { position: relative; width: min(480px, 100%); max-height: calc(100svh - 24px); overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--edge); border-top: 4px solid var(--foam); border-radius: 24px; padding: 14px 18px 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); outline: none; }
.modal h2 { margin: 4px 0 8px; font: 900 22px/1.2 var(--round); color: #fff; }
.modal h3 { margin: 18px 0 8px; font: 900 12px var(--round); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sand); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head small { font: 900 11px var(--round); letter-spacing: 0.14em; color: var(--coral); }
.modal .x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.05); font: 700 20px/1 var(--round); color: var(--ink); }
.modal .x:hover { border-color: var(--foam); }
.modal :focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }
.modal .fine { font: 600 12px/1.5 var(--round); color: var(--muted); margin: 14px 0 0; }

.tut-art { margin: 10px 0 6px; border-radius: 18px; padding: 14px; background: linear-gradient(180deg, #2bb8b4, #0b6a83 60%, #063a55); position: relative; overflow: hidden; }
.tut-art.mock small { font: 900 10px var(--round); letter-spacing: 0.14em; color: var(--sand); }
.tut-art.mock > b { display: block; margin: 4px 0 12px; font: 900 19px/1.25 var(--round); }
.mock-bar { display: flex; gap: 8px; align-items: center; }
.mock-clock { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 4px solid var(--foam); font: 900 14px var(--round); color: #fff; }
.mock-input { flex: 1; min-width: 0; padding: 8px 14px; border-radius: 99px; background: #fffaf0; color: #08343a; font: 700 15px var(--round); white-space: nowrap; overflow: hidden; }
.mock-input i { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--coral); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mock-dive { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--coral); color: #2b0d05; font: 900 13px var(--round); }
.ladder { display: grid; gap: 6px; }
.rung { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 36px; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 12px; background: rgba(2, 30, 36, 0.55); font: 700 14px var(--round); }
.rung .said { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rung b { text-align: right; color: var(--sand); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pair .card { background: rgba(2, 30, 36, 0.7); border: 1px solid var(--edge); border-radius: 14px; padding: 10px; display: grid; gap: 6px; align-content: start; }
.pair .card.gem { border-color: rgba(110, 168, 255, 0.7); }
.pair .card.clever { border-color: rgba(255, 138, 61, 0.7); }
.pair .card .chip { justify-self: start; white-space: normal; }
.pair .card b { font: 900 15px var(--round); }
.pair .card small { font: 600 12.5px/1.45 var(--round); color: #d6f0eb; }
.tut-text { margin: 0; font: 600 15px/1.55 var(--round); color: #e3f7f3; }
.tut-dots { display: flex; justify-content: center; gap: 6px; margin: 14px 0 12px; }
.tut-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(220, 250, 245, 0.25); }
.tut-dots i.on { background: var(--sand); width: 22px; border-radius: 5px; }
.tut-nav { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.tut-nav .go { width: 100%; padding: 13px 10px; font-size: 16px; }
.tut-nav .go.ghosty { font-size: 14px; }

.opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--edge); cursor: pointer; }
.opt b { display: block; font: 800 15px var(--round); }
.opt small { display: block; font: 600 13px/1.4 var(--round); color: var(--muted); margin-top: 2px; }
.opt input { appearance: none; -webkit-appearance: none; flex: none; width: 48px; height: 28px; border-radius: 14px; background: rgba(220, 250, 245, 0.16); border: 1px solid var(--edge); position: relative; cursor: pointer; margin: 0; transition: background 0.2s; }
.opt input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #e3f7f3; transition: transform 0.2s; }
.opt input:checked { background: var(--foam); border-color: var(--foam); }
.opt input:checked::after { transform: translateX(20px); background: #032a2e; }
.chips-preview { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 0 4px; }
.skins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skin { display: grid; justify-items: center; gap: 3px; padding: 10px 6px; border-radius: 16px; background: rgba(2, 30, 36, 0.7); border: 1px solid var(--edge); text-align: center; }
.skin .skin-art { display: grid; place-items: center; height: 44px; }
.skin b { font: 800 12.5px/1.25 var(--round); }
.skin small { font: 700 10.5px/1.35 var(--round); color: var(--muted); }
.skin.on { border-color: var(--foam); background: rgba(63, 224, 197, 0.12); }
.skin.on small { color: var(--foam); }
.skin.locked .skin-art { filter: grayscale(1) brightness(1.5) opacity(0.35); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(2, 30, 36, 0.8); border: 1px solid var(--edge); }
.tabs button { border: 0; border-radius: 99px; padding: 8px 6px; background: none; font: 800 14px var(--round); color: var(--muted); }
.tabs button.on { background: var(--foam); color: #032a2e; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.tiles div { background: rgba(2, 30, 36, 0.7); border: 1px solid var(--edge); border-radius: 14px; padding: 8px 6px; text-align: center; }
.tiles b { display: block; font: 900 17px var(--round); color: var(--sand); }
.tiles span { font: 800 9px var(--round); letter-spacing: 0.12em; color: var(--muted); }
.dist { display: grid; gap: 5px; }
.dist-row { display: grid; grid-template-columns: 34px 100px minmax(30px, 1fr) 30px 38px; gap: 8px; align-items: center; font: 700 13px var(--round); }
.dist-row b { text-align: right; }
.dist-row small { color: var(--muted); text-align: right; }
.meter { display: block; height: 10px; border-radius: 5px; background: rgba(220, 250, 245, 0.1); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 5px; }
.history ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.history li { display: grid; grid-template-columns: minmax(0, 1fr) auto 68px; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 12px; background: rgba(2, 30, 36, 0.7); font: 700 13px var(--round); }
.history .h-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #d6f0eb; }
.history .h-sq { font-size: 11px; letter-spacing: 1px; }
.history b { text-align: right; color: var(--sand); }
.empty { margin: 16px 0 4px; padding: 16px; border-radius: 16px; border: 1px dashed var(--edge); font: 600 14px var(--round); color: #d6f0eb; text-align: center; }
.row.export { margin-top: 16px; }

/* ---------- colour-blind friendly tiers (Okabe-Ito) ---------- */
.cb { --gem: #0072b2; --deep: #cc79a7; --rare: #f0e442; --school: #56b4e9; --clever: #e69f00; --plankton: #009e73; --none: #d55e00; }
.cb .t-gem, .cb .t-plankton { color: #fff; }
.cb .dots i { display: grid; place-items: center; font: 900 8px/1 var(--round); color: #06262b; }
.cb .dots i.t-gem::after { content: "C"; color: #fff; } .cb .dots i.t-deep::after { content: "A"; } .cb .dots i.t-rare::after { content: "S"; }
.cb .dots i.t-school::after { content: "D"; } .cb .dots i.t-clever::after { content: "F"; } .cb .dots i.t-plankton::after { content: "J"; color: #fff; } .cb .dots i.t-none::after { content: "×"; color: #fff; }

/* ---------- reduced motion (setting or device) ---------- */
.reduce-motion .scene, .reduce-motion .gauge-track, .reduce-motion .opt input, .reduce-motion .opt input::after { transition: none; }
.reduce-motion .bubbles, .reduce-motion .turtle, .reduce-motion .scene .grass, .reduce-motion .scene .fish, .reduce-motion .scene .jelly, .reduce-motion .scene .squid, .reduce-motion .scene .gull, .reduce-motion .scene .rays, .reduce-motion .mock-input i, .reduce-motion .bar input.miss { animation: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.full-motion) .scene, html:not(.full-motion) .gauge-track { transition: none; }
  html:not(.full-motion) .bubbles, html:not(.full-motion) .turtle, html:not(.full-motion) .scene .grass, html:not(.full-motion) .scene .fish, html:not(.full-motion) .scene .jelly, html:not(.full-motion) .scene .squid, html:not(.full-motion) .scene .gull, html:not(.full-motion) .scene .rays { animation: none; }
}

/* ---------- content below the game ---------- */
.content { max-width: 820px; margin: 0 auto; padding: 36px 20px 20px; color: #cfe7e2; }
.content .intro { padding: 22px 24px; border-radius: 26px; background: linear-gradient(160deg, rgba(63, 224, 197, 0.1), rgba(255, 122, 92, 0.06)); border: 1px solid var(--edge); }
.content .intro h2 { margin-top: 0; }
.content h2 { color: #fff; font: 900 26px/1.25 var(--round); margin: 38px 0 10px; }
.content a { color: var(--foam); }
.tier-cards { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tier-cards li { padding: 14px 16px; border-radius: 18px; background: rgba(6, 53, 59, 0.6); border: 1px solid var(--edge); border-top: 5px solid var(--c, var(--foam)); }
.tier-cards b { font: 900 18px var(--round); color: var(--c); }
.tier-cards span { float: right; font: 800 13px var(--round); color: var(--sand); }
.tier-cards p { margin: 6px 0 0; font-size: 14.5px; }
.tc-gem { --c: var(--gem); } .tc-deep { --c: var(--deep); } .tc-rare { --c: var(--rare); } .tc-school { --c: var(--school); } .tc-clever { --c: var(--clever); } .tc-plankton { --c: var(--plankton); }
.tips { padding-left: 22px; }
.tips li { margin: 8px 0; }
.tips b { color: #fff; }
details { background: rgba(6, 53, 59, 0.5); border: 1px solid var(--edge); border-radius: 16px; padding: 12px 18px; margin: 8px 0; }
summary { cursor: pointer; font-weight: 800; color: #fff; }
details p { margin: 10px 0 0; }

.seabed { margin-top: 40px; padding: 34px 20px 40px; background: linear-gradient(180deg, transparent, #0a2a26 30%, #1b2c22); border-top: 1px solid var(--edge); color: var(--muted); font-size: 14px; }
.seabed-cols { max-width: 820px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.seabed b { display: block; color: var(--sand); margin-bottom: 6px; font-weight: 900; }
.seabed p { margin: 0; }
.seabed nav a { display: block; color: #cfe7e2; text-decoration: none; padding: 2px 0; }
.seabed nav a:hover { color: var(--foam); }
.seabed-note { max-width: 820px; margin: 22px auto 0 !important; font-size: 13px; opacity: 0.8; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  .home { margin: auto 12px 0 70px; padding: 0 0 28px; }
  .tag { font-size: 15px; margin: 10px 0 16px; }
  .turtle { left: 60%; }
  .hud-pill { gap: 8px; padding: 5px 12px; }
  .hud-cell b { font-size: 16px; }
  .dots i { width: 11px; height: 11px; }
  .dots { gap: 3px; }
  .seabed-cols { grid-template-columns: 1fr 1fr; }
  .seabed-cols > div { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .hud { top: 8px; left: 8px; right: 8px; gap: 6px; }
  .hud-brand, .menu-btn { width: 40px; height: 40px; }
  .hud-brand img { width: 26px; height: 26px; }
  .hud-cell small, .hud-mid small { font-size: 8px; letter-spacing: 0.1em; }
  .prompt-card { margin: 60px 8px 0 64px; padding: 12px 12px 10px; border-radius: 18px; }
  .clock, .clock svg { width: 46px; height: 46px; }
  .bar input { font-size: 16px; padding: 11px 12px; }
  .bar .dive { padding: 0 14px; font-size: 15px; }
  .verdict { width: auto; margin: auto 0 0 62px; padding: 16px 14px calc(18px + env(safe-area-inset-bottom)); }
  .sheet { padding: 60px 8px 40px 62px; }
  .scene .mark { max-width: 52vw; font-size: 11px; }
  .scene .mark.l { left: 64px; }
  .go { padding: 14px 24px; font-size: 17px; }
}
@media (max-width: 400px) {
  .modal { padding: 12px 12px 14px; }
  .pair .card { padding: 8px; }
  .tut-text { font-size: 14px; }
  .skins { grid-template-columns: repeat(2, 1fr); }
  .dist-row { grid-template-columns: 30px 86px minmax(20px, 1fr) 26px 34px; gap: 5px; font-size: 12px; }
  .hud-mid small { display: none; }
}
