@font-face{font-family:OceanPixel; src:url('../resources/krillion/assets/_next/static/media/0c8c4ded07fff55c-s.p.2tcyrya9o07vu.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap}

:root{color-scheme:dark; --ink:#071b2d; --deep:#061727; --foam:#edf5ec; --muted:#afc9d4; --line:#365366; --gold:#ffda85; --coral:#ff8d9f; --mint:#a6e9cb; --pixel:OceanPixel,monospace; --body:'Trebuchet MS',sans-serif}

*{box-sizing:border-box}
body{margin:0; min-width:0; min-height:100svh; background:var(--deep); color:var(--foam); font-family:var(--body); font-size:15px; line-height:1.5}
button,input,summary{font:inherit}
button{cursor:pointer; color:inherit}
button:disabled{cursor:default}
button,a,summary,input{-webkit-tap-highlight-color:transparent}
button:focus-visible,summary:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--gold); outline-offset:4px}
button{touch-action:manipulation}
button,summary{user-select:none}
button[hidden],[hidden]{display:none!important}
a{color:var(--gold)}
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0}
.skip-link{position:fixed; top:-60px; left:16px; z-index:100; background:var(--ink); padding:10px}
.skip-link:focus{top:12px}
.ocean-world{position:fixed; inset:0; z-index:-1; overflow:hidden; pointer-events:none}
.ocean-world canvas{position:absolute; inset:0; width:100%; height:100%}
.ocean-shade{position:absolute; inset:0; background:linear-gradient(90deg,#03132118,#03132108 35%,#03132120),linear-gradient(0deg,#031321a6,transparent 35%)}
.mascot{position:absolute; left:12%; top:61%; width:clamp(80px,12vw,164px); height:auto; image-rendering:pixelated; filter:drop-shadow(0 8px 0 #03132124); transition:filter .3s}
.mascot[data-effect=solve]{filter:drop-shadow(0 0 18px #ffda8555)}

.topbar{display:flex; justify-content:space-between; align-items:center; max-width:1440px; padding:22px 44px; margin:auto; gap:20px}
.brand{background:none; border:0; text-align:left; font-family:var(--pixel); font-size:30px; letter-spacing:.04em; line-height:1; color:var(--ink); text-shadow:0 1px #e9f6ff66; padding:0}
.brand strong{font-weight:400}
.brand .brand-one{color:#FF5D8F}
body[data-view=home] .brand,body[data-view=loading] .brand{display:none}
.topbar .controls{margin-left:auto}
.controls{display:flex; align-items:center; gap:9px}
.control{display:flex; align-items:center; justify-content:center; width:36px; height:36px; background:#071b2de8; border:1px solid #48697c; color:var(--foam); padding:5px}
.control:hover{background:#1b3548; border-color:var(--muted)}
.control:active{transform:translateY(1px)}
.control-icon{display:block; flex-shrink:0; width:24px; height:24px}
#sound[aria-pressed=true] .sound-on,#sound[aria-pressed=false] .sound-off{display:none}
.settings-options label{display:flex; gap:10px; align-items:center; padding:8px 0}
.settings-options input{accent-color:var(--gold); width:17px; height:17px}
body[data-view=loading]{background:var(--deep) url('../resources/krillion/assets/gen/optimized/v1/bg-top.webp') center/100% 100% fixed no-repeat}
body[data-view=loading] .ocean-world{visibility:hidden}
.loading{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:calc(100svh - 110px);text-align:center;padding:32px 20px 12vh;text-shadow:0 2px 4px var(--deep)}
.loading img{width:clamp(120px,16vw,180px);height:auto;image-rendering:pixelated}
.loading h1{font:clamp(32px,5vw,64px)/1.15 var(--pixel);font-weight:400;margin:24px 0 12px;text-wrap:balance}
.loading h1 span{color:#FF5D8F}
.loading p{margin:0;font-size:16px;color:var(--foam)}
.loading-bubbles{display:flex;gap:10px;margin-top:28px;height:16px;align-items:center}
.loading-bubbles i{width:6px;height:6px;background:var(--muted);animation:loading-bubble 1.8s ease-in-out infinite}
.loading-bubbles i:nth-child(2){animation-delay:.2s}
.loading-bubbles i:nth-child(3){animation-delay:.4s}
@keyframes loading-bubble{0%,100%{transform:translateY(0);opacity:.45}50%{transform:translateY(-8px);opacity:1}}
.error-banner{position:relative; z-index:20; background:#461e2b; border:1px solid var(--coral); color:#ffeced; max-width:900px; margin:12px auto; padding:14px 20px; font-size:14px}
.error-banner button{margin-left:12px}
.eyebrow,.section-label{font-size:11px; letter-spacing:.13em; text-transform:uppercase}
.section-label{display:flex; justify-content:space-between; gap:14px; color:var(--muted); font-family:var(--pixel); font-size:16px; letter-spacing:.07em}

.home-shell{max-width:900px; margin:0 auto; padding:0 24px 20px}
.hero-copy{text-align:center; color:var(--ink); padding:4px 0 26px}
.hero-copy .eyebrow{margin:0 0 8px; color:#24465b; font-weight:bold}
.hero-copy h1{display:flex;align-items:baseline;justify-content:center;gap:clamp(8px,1.5vw,16px);font-family:var(--pixel);font-weight:400;line-height:1;margin:14px 0 18px}
.hero-one{font-size:clamp(42px,8vw,96px);color:#FF5D8F;letter-spacing:-.02em}
.hero-rest{font-size:clamp(30px,5.8vw,70px);letter-spacing:-.02em;white-space:nowrap}
.hero-connector{font-size:.65em;letter-spacing:0}
.title-dot{color:#FF5D8F}
.launch-panel{max-width:650px; margin:auto; background:#071b2df5; border:1px solid #668291; box-shadow:0 0 0 4px #071b2d80,8px 8px 0 #03132144; padding:24px 28px 18px}
.tiers{display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-top:18px}
.tier{border:1px solid transparent; background:transparent; padding:12px 3px 4px; display:flex; flex-direction:column; align-items:center; transition:background .15s,border-color .15s}
.tier:hover{background:#204155}
.tier.selected{border-color:var(--tier); background:#1b3548}
.tier img{width:64px; height:64px; object-fit:contain; image-rendering:pixelated; transition:transform .15s}
.tier:hover img{transform:translateY(-4px)}
.tier span{font-family:var(--pixel); font-size:22px; color:var(--tier); white-space:nowrap}
.tier i{font-style:normal; font-size:12px; color:var(--tier); line-height:1.2}
.dive-rules{display:flex; justify-content:center; gap:32px; border-top:1px solid var(--line); padding:18px 0 22px}
.dive-rules p{display:flex; align-items:baseline; justify-content:center; gap:8px; white-space:nowrap; font:20px/1.2 var(--pixel); letter-spacing:.04em; margin:0}
.down{color:var(--mint)}
.up{color:var(--coral)}
.primary{background:var(--gold); color:#193044; border:1px solid #ffedbd; box-shadow:0 4px 0 #9c7842; min-height:46px; padding:8px 20px; font-family:var(--pixel); font-size:24px; letter-spacing:.04em; display:inline-flex; align-items:center; justify-content:center; gap:16px}
.primary:hover:not(:disabled){background:#ffe7a6; transform:translateY(-1px)}
.primary:active:not(:disabled){transform:translateY(3px); box-shadow:0 1px 0 #9c7842}
.primary:disabled{opacity:.55}
.launch-panel .primary{background:var(--tier); border-color:var(--tier); box-shadow:0 4px 0 color-mix(in srgb,var(--tier),#193044 45%)}
.launch-panel .primary:hover:not(:disabled){background:color-mix(in srgb,var(--tier),white 15%)}
.launch-panel .primary:active:not(:disabled){box-shadow:0 1px 0 color-mix(in srgb,var(--tier),#193044 45%)}
.launch{width:100%; justify-content:center}
.secondary{background:#17344a; border:1px solid #698796; color:var(--foam); padding:10px 16px; min-height:44px; font-family:var(--pixel); font-size:22px}
.secondary:hover{background:#24465d}
.text-button{background:none; border:0; color:var(--muted); padding:8px 0; text-decoration:underline; text-decoration-color:#7997a680; text-underline-offset:5px; font-size:13px}
.text-button:hover:not(:disabled){color:var(--foam)}
.text-button:disabled{opacity:.5}
.resume{background:none; border:0; border-top:1px solid var(--line); width:100%; color:var(--mint); text-align:left; display:flex; justify-content:space-between; gap:10px; padding:16px 0 0; margin-top:18px; font-size:13px}

body[data-view=game] .brand,body[data-view=result] .brand{color:var(--foam); text-shadow:1px 1px #071b2d}
.game-shell{max-width:1060px; margin:0 auto; padding:14px 30px 20px}
.game-hud{display:flex; align-items:center; justify-content:space-between; gap:24px; margin:0 auto 22px; max-width:800px}
.depth{min-width:190px; text-shadow:1px 2px #071b2d}
.depth .eyebrow{display:block; font-family:var(--pixel); font-size:16px; letter-spacing:.1em}
.depth strong{display:block; font-family:var(--pixel); font-size:54px; font-weight:400; line-height:1.1}
.depth small{font-size:26px; color:var(--muted)}
.depth-note{font-size:12px; display:block}
.expedition{text-align:center; font-family:var(--pixel); font-size:17px; letter-spacing:.06em; text-shadow:1px 1px var(--ink)}
.pips{display:flex; gap:7px; margin-top:10px}
.pips i{font:normal 18px var(--pixel); width:25px; height:25px; display:grid; place-items:center; border:1px solid #8eafbd; color:#d2e7f0; background:#071b2d99}
.pips .current{border-color:var(--gold); color:var(--gold); box-shadow:0 2px 0 var(--gold)}
.pips .solved{background:#284e4d; color:var(--mint)}
.pips .skipped,.pips .failed{color:var(--coral)}
.tier-badge{display:flex; align-items:center; gap:8px; color:var(--tier); font-family:var(--pixel); font-size:24px; min-width:125px; justify-content:flex-end; text-shadow:1px 1px var(--ink)}
.tier-badge img{width:46px; height:46px; image-rendering:pixelated}
.puzzle-panel{width:min(100%,650px); margin:auto; padding:25px 30px 16px; background:#061a2df7; border:1px solid #54788b; box-shadow:0 0 0 4px #071b2d77,8px 8px 0 #03132144}
.puzzle-panel h1{font-family:var(--pixel); font-size:clamp(28px,3.7vw,39px); font-weight:400; line-height:1.05; margin:24px 0 26px; max-width:560px; outline:none}
.word{display:flex; justify-content:center; gap:5px; flex-wrap:wrap}
.letter{display:inline-grid; place-items:center; min-width:28px; max-width:48px; flex:1 1 26px; height:53px; font-family:var(--pixel); font-size:37px; background:#122b3c; border-bottom:3px solid #7394a5; line-height:1}
.letter.known{color:var(--gold); border-color:var(--gold); background:#1c3543}
.word-meta{display:flex; justify-content:space-between; gap:12px; font-family:var(--pixel); font-size:14px; color:#acc5d1; margin:10px 0 0; letter-spacing:.03em}
.keyboard{padding:5px 0 0}
.key-row{display:flex; justify-content:center; gap:6px; margin-bottom:8px}
.key{position:relative; display:grid; place-items:center; width:49px; height:48px; background:#c3d9db; color:#123147; font-family:var(--pixel); font-size:27px; line-height:1; border:1px solid #eff4e2; box-shadow:0 3px 0 #688b98}
.key:hover:not(:disabled){background:var(--gold); border-color:var(--gold)}
.key:active:not(:disabled){transform:translateY(2px); box-shadow:0 1px 0 #688b98}
.key.incorrect{background:#1a2f40; color:#88a3b1; box-shadow:none; border-color:#3d5260}
.key.correct{background:#254a46; color:var(--mint); box-shadow:none; border-color:#77b7a1}
.key-mark{font:12px var(--body); position:absolute; bottom:1px; right:3px}
.puzzle-foot{display:flex; justify-content:space-between; align-items:center; gap:10px; border-top:1px solid var(--line); padding-top:12px; margin-top:16px; color:#a3becb; font-size:11px}
.puzzle-foot .text-button{font-size:11px; padding:0}
.attempts{margin-top:10px; font-size:12px; color:var(--muted); overflow-wrap:anywhere}
.attempts summary{cursor:pointer}
.reveal{padding:0 0 12px}
.result-kicker{font-family:var(--pixel); font-size:25px; margin:0 0 10px}
.explanation{font-size:16px; line-height:1.6; color:var(--foam); margin:8px 0}
.round-account{font-size:12px; color:var(--muted); margin-bottom:6px}
.source-tag{font-size:11px; color:#9ebcc9; line-height:1.6}
.reveal .primary{display:flex; width:100%; margin-top:24px; justify-content:space-between}

.results{max-width:760px; margin:20px auto 0; padding:30px 38px; background:#071b2df5; border:1px solid #54788b; text-align:center; box-shadow:0 0 0 4px #071b2d66}
.results h1{font-family:var(--pixel); font-weight:400; font-size:64px; margin:10px 0 0; line-height:1}
.final-depth{font-family:var(--pixel); font-size:100px; line-height:1.15; color:var(--gold)}
.final-depth span{font-size:50px; color:var(--muted)}
.journey-panel{margin:24px 0}
.journey{width:100%; height:auto; max-height:110px; color:var(--mint)}
.journey-panel>p{font-size:12px; color:var(--muted)}
.result-actions{display:flex; flex-wrap:wrap; gap:14px; justify-content:center}
.result-actions .primary{font-size:20px}
.result-actions .secondary{font-size:18px}
.dive-log{text-align:left; margin-top:26px; border-top:1px solid var(--line); padding-top:16px}
.dive-log>summary{cursor:pointer; color:var(--gold); font-family:var(--pixel); font-size:24px}
.dive-log article{display:flex; gap:20px; padding:24px 0; border-bottom:1px solid var(--line)}
.log-number{font-family:var(--pixel); font-size:28px; color:var(--muted)}
.dive-log p{font-size:13px; margin:0 0 8px; color:var(--muted)}
.dive-log h2{font-family:var(--pixel); font-weight:400; font-size:28px; line-height:1.2; margin:4px 0 10px; color:var(--foam)}
.dive-log h2 small{font-size:16px; color:var(--mint); white-space:nowrap}

@media(min-width:1100px) and (min-height:850px){.home-shell{padding-top:25px}
.hero-copy{padding-bottom:40px}
.game-shell{padding-top:35px}
.game-hud{margin-bottom:30px}
.puzzle-panel{padding:32px 36px 20px}
.puzzle-panel h1{margin-top:28px; margin-bottom:32px}
.key{height:52px}
}

@media(max-width:760px){.topbar{padding:18px 22px}
.brand{font-size:24px}
.mascot{left:auto; right:4%; top:77%; width:88px; opacity:.8}
.home-shell{padding:0 20px 10px}
.hero-copy{padding-top:8px; padding-bottom:25px}
.hero-copy .eyebrow{font-size:9px; letter-spacing:.12em}
.launch-panel{padding:20px}
.game-shell{padding:10px 20px}
.game-hud{gap:12px; margin-bottom:22px}
.depth{min-width:120px}
.depth strong{font-size:45px}
.depth .eyebrow{font-size:14px}
.depth-note{font-size:10px}
.expedition{font-size:14px}
.pips{gap:4px}
.pips i{width:22px; height:22px; font-size:16px}
.tier-badge{min-width:60px; flex-direction:column; gap:0; font-size:18px}
.tier-badge img{width:32px; height:32px}
.puzzle-panel{padding:22px 22px 15px}
.results{margin:16px 20px; padding:26px 22px}
.results h1{font-size:54px}
.final-depth{font-size:86px}
}

@media(max-width:480px){.topbar{padding:15px 16px; gap:10px}
.controls{gap:6px}
.brand{font-size:20px}
.home-shell{padding:0 16px 10px}
.hero-copy{padding-bottom:24px}
.hero-copy .eyebrow{font-size:8px}
.launch-panel{padding:17px 13px}
.section-label{font-size:13px; letter-spacing:.035em}
.tiers{gap:3px; margin-top:15px}
.tier{padding:9px 1px 4px}
.tier img{width:49px; height:49px}
.tier span{font-size:18px}
.dive-rules{gap:30px}
.primary{font-size:23px}
.game-shell{padding:8px 16px}
.game-hud{align-items:flex-start; gap:8px; margin-bottom:17px}
.depth{min-width:103px}
.depth strong{font-size:41px}
.depth .eyebrow{font-size:12px}
.depth small{font-size:20px}
.expedition{font-size:12px; padding-top:2px}
.pips{gap:3px; margin-top:9px}
.pips i{width:19px; height:21px; font-size:15px}
.tier-badge{min-width:42px; font-size:16px}
.tier-badge img{width:28px; height:28px}
.puzzle-panel{padding:19px 14px 14px}
.puzzle-panel h1{font-size:30px; margin:23px 0}
.letter{min-width:17px; flex-basis:17px; height:44px; font-size:30px}
.word{gap:4px}
.word-meta{font-size:11px; gap:6px}
.key-row{gap:4px; margin-bottom:7px}
.key{width:calc((100% - 36px)/10); min-width:0; height:45px; font-size:24px}
.text-button{font-size:11px}
.puzzle-foot{font-size:10px; gap:6px; margin-top:15px}
.puzzle-foot .text-button{font-size:10px}
.reveal .explanation{font-size:14px}
.result-kicker{font-size:22px}
.results{margin:10px 16px; padding:24px 18px}
.results .eyebrow{font-size:9px}
.result-actions{flex-direction:column}
.dive-log article{gap:12px}
.error-banner{margin:10px 16px}
.pips .current{box-shadow:0 2px 0 var(--gold)}
}

@media(max-width:360px){.brand{font-size:18px}
.game-hud{flex-wrap:wrap}
.expedition{margin-left:auto}
.tier-badge{display:flex; flex-direction:row; margin-left:auto; gap:6px}
.letter{font-size:25px; min-width:15px; flex-basis:15px}
.tier span{font-size:16px}
.tier img{width:42px; height:42px}
.key{height:43px}
}

@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important; transition:none!important; scroll-behavior:auto!important}
}
body[data-reduced=true] *,body[data-reduced=true] *::before{animation:none!important; transition:none!important}
:root{--rail-width:100px}
.depth-rail{position:fixed;right:0;top:0;bottom:0;width:var(--rail-width);z-index:3;visibility:hidden;pointer-events:none}
body[data-view=game] .depth-rail,body[data-view=result] .depth-rail{visibility:visible}
.depth-rail canvas{width:100%;height:100%;position:absolute;inset:0}
.key{width:calc((100% - 36px)/7);max-width:49px}
@media(max-width:760px){:root{--rail-width:58px}.game-hud{flex-wrap:wrap}.expedition{margin-left:auto}.tier-badge{flex-direction:row;margin-left:auto;gap:6px}.topbar .controls{gap:4px}}
@media(max-width:480px){:root{--rail-width:58px}body[data-view=game] .topbar,body[data-view=result] .topbar{flex-wrap:wrap;gap:12px}.game-shell{padding:8px 12px}.puzzle-panel{padding:18px 10px 12px}.puzzle-panel h1{font-size:28px}.word{gap:3px}.letter{min-width:13px;flex-basis:13px;font-size:24px;height:40px}.word-meta{font-size:10px}.key{width:calc((100% - 24px)/7);height:44px;max-width:none}.game-hud{gap:8px}.expedition{font-size:10px}.pips i{width:17px;font-size:13px}.depth{min-width:90px}.tier-badge{font-size:15px}.puzzle-foot{flex-wrap:wrap}}
@media(max-width:480px){}


/* Transparent instruments share the ocean coordinates; they never reserve layout space. */
.depth-marker{position:absolute;right:4px;width:64px;height:64px;transform:translateY(-50%);color:var(--foam);text-shadow:0 1px 3px #041321}
.player-marker{display:block;width:100%;height:100%;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 2px 0 #041321)}
.depth-marker strong{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);font:24px/1 var(--pixel);white-space:nowrap}
.depth-marker small{font-size:15px}
.depth-marker.danger{color:var(--coral)}
@media(max-width:760px){.depth-marker{right:2px;width:44px;height:44px}.depth-marker strong{font-size:18px}.depth-marker small{font-size:11px}}

.puzzle-heading{display:flex;align-items:center;gap:8px}
.exit-dive{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;height:44px;padding:10px;border:0;background:none;color:var(--muted)}
.exit-dive svg{width:22px;height:22px}
.exit-dive:hover{color:var(--gold)}
.exit-dive:active{transform:translateY(1px)}
.exit-dialog{width:min(460px,calc(100% - 32px));max-height:calc(100svh - 32px);padding:28px;background:var(--ink);color:var(--foam);border:2px solid var(--line)}
.exit-dialog::backdrop{background:#031321bd}
.exit-dialog h2{margin:0 0 12px;font:clamp(26px,6vw,34px)/1.2 var(--pixel);color:var(--gold)}
.exit-dialog p{margin:0 0 24px;color:var(--muted)}
.exit-actions{display:flex;flex-wrap:wrap;gap:12px}
.exit-actions button{flex:1;min-height:48px;white-space:nowrap}
@media(max-width:480px){.exit-dialog{padding:22px}.exit-actions{flex-direction:column}}

.word-meta{align-items:center}
.word-meta .keyboard-toggle{font:inherit;letter-spacing:inherit;min-height:36px;padding:6px 0;white-space:nowrap}

.puzzle-top{align-items:center}
.puzzle-top .skip-button{font:12px var(--pixel);letter-spacing:.02em;text-transform:none;color:#8fa8b5;min-height:44px;padding:8px 0}

.word-life{display:flex;flex-direction:column;gap:7px;min-width:0}
.life-label{font:12px/1.2 var(--pixel);letter-spacing:.06em;color:var(--muted)}
.life-meter{display:flex;align-items:center;gap:4px;color:var(--mint)}
.pixel-heart{width:18px;height:16px;flex-shrink:0;fill:currentColor}
.pixel-heart.empty{fill:none;stroke:var(--line);stroke-width:1}
.life-count{margin-left:5px;white-space:nowrap;font:22px/1 var(--pixel)}
.last-chance .life-meter,.last-chance .life-label{color:#FF5D8F}
.exhausted .life-meter,.exhausted .life-label{color:var(--coral)}
.life-result{font:20px/1 var(--pixel);color:var(--muted)}
.life-result.solved{color:var(--mint)}
.depth-stakes{display:flex;flex-direction:column;align-items:flex-end;gap:4px;margin-left:auto;font:16px/1.2 var(--pixel);white-space:nowrap}
.depth-stakes small{font-size:11px;color:var(--muted);margin-right:4px}
.puzzle-foot{padding-top:16px;gap:14px;flex-wrap:wrap}
.puzzle-foot>[data-action="finish-motion"]{margin-left:auto}
@media(max-width:480px){.pixel-heart{width:14px;height:13px}.life-meter{gap:3px}.life-label{font-size:10px}.life-count{font-size:18px}.depth-stakes{font-size:14px}}

.puzzle-tools{display:flex;align-items:center;gap:20px;margin-left:auto}
.round-clock{display:flex;flex-direction:column;gap:4px;align-items:center;color:#FF5D8F;font-family:var(--pixel)}
.round-clock .life-label{color:inherit}
.round-clock strong{font-size:26px;font-weight:400;line-height:1;font-variant-numeric:tabular-nums;text-transform:none}
.round-clock.urgent,.round-clock.urgent .life-label{color:#FF5D8F}
@media(max-width:480px){.puzzle-top{gap:8px}.puzzle-tools{gap:12px}.round-clock strong{font-size:22px}.round-clock .life-label{font-size:9px}}


.result-actions a.primary{text-decoration:none}

/* Ranked results retain the game's pixel palette and quieter reading rhythm. */
.leaderboard-link{display:block; margin:14px auto 0}
.result-marks{display:flex; justify-content:center; gap:8px; margin:20px 0 8px}
.result-marks span{display:grid; place-items:center; width:30px; height:30px; border:1px solid var(--line); color:var(--muted)}
.result-marks .solved{color:var(--mint); border-color:var(--mint)}
.result-marks .failed{color:var(--coral)}
.result-summary{color:var(--muted); margin:0 0 28px}
.total-panel{border-block:1px solid var(--line); padding:24px 0; text-align:left; margin:24px auto; max-width:620px}
.total-panel h2{font:20px var(--pixel); color:var(--muted); margin:0 0 8px}
.total-depth{font:48px var(--pixel); font-variant-numeric:tabular-nums; overflow-wrap:anywhere}
.total-depth small{font-size:.55em; color:var(--muted)}
.diver-identity{display:flex; flex-wrap:wrap; align-items:center; gap:10px; overflow-wrap:anywhere}
.you-tag{font-size:10px; color:var(--mint); border:1px solid var(--line); padding:2px 5px; vertical-align:middle}
.rank-note{color:var(--muted); margin:6px 0 0}
.name-form label{display:block; font:18px var(--pixel); margin:12px 0 8px}
.name-entry{display:flex; gap:10px}
.nickname-picker{display:flex; flex:1; min-width:0; gap:6px}
.nickname-picker .roll-name{display:grid; place-items:center; padding:10px; min-width:44px}
.name-entry input{min-width:0; flex:1; background:var(--deep); color:var(--foam); border:1px solid var(--muted); padding:10px 12px; border-radius:0; caret-color:var(--gold); font-size:16px}
.name-entry button{flex-shrink:0}
.name-form p{font-size:12px; color:var(--muted); line-height:1.6; margin:8px 0}
.name-form #name-error{color:var(--coral)}
.hide-name{margin-left:20px}
.share-result{display:inline-block; margin:16px 0 0}
.leaderboard-page{max-width:760px; margin:24px auto 60px; padding:28px; background:var(--ink); border:1px solid var(--line)}
.board-heading{display:flex; justify-content:space-between; gap:20px}
.leaderboard-page h1{font:clamp(38px,7vw,64px)/1.1 var(--pixel); font-weight:400; margin:24px 0 12px}
.rankings{width:100%; border-collapse:collapse; table-layout:fixed; font-variant-numeric:tabular-nums; margin:20px 0}
.rankings th,.rankings td{padding:14px 10px; border-bottom:1px solid var(--line); text-align:left; font-weight:400}
.rankings thead{font:18px var(--pixel); color:var(--muted)}
.rankings th:first-child,.rankings td:first-child{width:17%}
.rankings th:last-child,.rankings td:last-child{width:36%; text-align:right; overflow-wrap:anywhere}
.rankings small{color:var(--muted)}
.diver-name{display:inline-block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; margin-right:6px}
.my-ranking{background:#17344a; color:var(--mint)}
.my-position{margin:32px 0; border-top:1px solid var(--line); padding-top:16px}
.empty-board{color:var(--muted)}
.board-error{color:var(--coral)}
body[data-view=leaderboard] .brand{color:var(--foam); text-shadow:1px 1px var(--ink)}
body[data-view=leaderboard] .depth-rail,body[data-view=result] .depth-rail{display:none}
.network-status{max-width:700px; margin:12px auto; padding:12px 20px; background:var(--ink); border:1px solid var(--line); color:var(--gold)}
.network-status button{margin-left:12px}
::selection{background:var(--gold); color:var(--ink)}
@media(max-width:600px){
  .name-entry{flex-direction:column}
  .leaderboard-page{margin:12px 12px 32px; padding:18px 12px}
  .rankings th,.rankings td{padding:12px 5px; font-size:13px}
  .rankings th:first-child,.rankings td:first-child{width:15%}
  .rankings th:last-child,.rankings td:last-child{width:38%}
  .result-actions{display:flex; flex-direction:column; gap:12px}
  .total-depth{font-size:40px}
}

.results .result-tier{font:24px var(--pixel); color:var(--muted); margin:0 0 8px}
.total-line{display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:16px}
.total-line h2{margin:0}
.total-line .total-depth{font-size:36px}
.total-panel{padding:18px 0; margin:20px auto}
.result-marks{margin-top:14px}
.result-summary{margin-bottom:18px}
.diver-identity .rank-note{margin:0 0 0 auto; font-variant-numeric:tabular-nums}
.edit-name{display:grid; place-items:center; width:44px; height:44px; padding:0}
.leaderboard-page h1{margin-bottom:28px}

.skip-button:disabled{opacity:1}

.help-dialog{width:min(660px,calc(100% - 24px));max-height:calc(100svh - 32px);padding:0;border:2px solid var(--line);background:var(--ink);color:var(--foam);overscroll-behavior:contain}
.help-dialog::backdrop{background:#031321bd}
.help-heading{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:18px 24px;background:var(--ink);border-bottom:1px solid var(--line)}
.help-heading h2{margin:0;font:36px/1 var(--pixel);font-weight:400}
.help-heading .control{width:44px;height:44px}
.help-content{padding:0 24px 24px;line-height:1.65}
.help-content section{margin-top:28px}
.help-content h3{font:26px/1.2 var(--pixel);font-weight:400;margin:0 0 12px;color:var(--gold)}
.help-content p{margin:0 0 12px;color:var(--muted)}
.help-content strong{color:var(--foam)}
.help-content ol{padding-left:22px;margin:0;color:var(--muted)}
.help-content li{padding-left:4px;margin-bottom:8px}
.help-content .help-example{font:28px var(--pixel);color:var(--foam);padding:12px 0}
.help-example span{color:var(--mint)}
.help-content .help-notice{color:var(--gold);margin-top:20px}
.help-tiers{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;margin:12px 0 16px}
.help-tiers caption{text-align:left;color:var(--muted);font-size:12px;margin-bottom:8px}
.help-tiers th,.help-tiers td{padding:8px 4px;border-bottom:1px solid var(--line);text-align:right;font-weight:400}
.help-tiers th:first-child{text-align:left}
.help-tiers thead{color:var(--muted);font-size:12px}
@media(max-width:480px){.topbar{flex-wrap:wrap}.help-heading{padding:14px 18px}.help-content{padding:0 18px 20px}.help-heading h2{font-size:30px}}

.settings-dialog{width:min(420px,calc(100% - 24px));max-height:calc(100svh - 32px);padding:0;border:2px solid var(--line);background:var(--ink);color:var(--foam)}
.settings-dialog::backdrop{background:#031321bd}
.settings-options{padding:16px 24px}
.settings-options label{min-height:44px;align-items:center;cursor:pointer}
.settings-version{margin:0 24px 20px;padding-top:16px;border-top:1px solid var(--line);font:600 14px var(--body);color:var(--foam)}
#bank-version{overflow-wrap:anywhere;user-select:text}
