*{box-sizing:border-box}html{background:#08242d;color:#f8edcf;font:16px -apple-system,BlinkMacSystemFont,Roboto,sans-serif}body{margin:0}main{width:min(100%,540px);margin:auto;padding:max(20px,env(safe-area-inset-top)) 22px max(16px,env(safe-area-inset-bottom))}header,footer,.line{display:flex;align-items:center;justify-content:space-between;gap:12px}header{border-bottom:1px solid #477077;padding-bottom:16px}header b{font:italic bold 31px Georgia,serif}header span,small,footer,.tag{font:11px/1.5 monospace;letter-spacing:.13em;text-transform:uppercase;color:#afd1c8}h1,h2{font:normal clamp(40px,9vw,62px)/1.02 Georgia,serif;letter-spacing:-.045em;margin:12px 0 15px}h2{font-size:36px}p{line-height:1.5;color:#d1e1d8}section{padding-top:24px}figure{margin:20px 0;position:relative;background:#10444d;border:1px solid #477077}figure img{display:block;width:100%;aspect-ratio:900/431}figcaption{display:flex;justify-content:space-between;padding:9px 12px;border-top:1px solid #477077;font:italic 14px Georgia}button,input{width:100%;font:inherit;border-radius:7px;padding:15px 17px}button{cursor:pointer;font-weight:650;background:#ffba96;color:#172e32;border:1px solid transparent;margin:5px 0}button.alt{color:#f3e6cd;background:#113943;border-color:#467178}input{background:#fff7e6;color:#102e39;border:0;margin:15px 0 8px}footer{margin-top:24px;border-top:1px solid #42676c;padding-top:14px;font-size:9px}.meter{height:6px;background:#28545c;margin:16px 0}.meter i{display:block;height:100%;background:#ffc096}ol{padding:0;list-style:none}li{border-bottom:1px solid #34575c;padding:10px 0}li b{white-space:nowrap}details{margin:16px 0}summary{cursor:pointer;padding:8px 0}
.depth{background:linear-gradient(120deg,#164754,#102936 76%);padding:14px 18px;border:1px solid #467178;border-radius:7px;margin:16px 0}.depth progress{width:100%;height:7px;accent-color:#ffba96}
.transect{height:66px;margin:8px -8px;background:#123448 url(transect.jpg) center/100% 100%;position:relative;overflow:hidden;border-radius:3px}
.track{position:absolute;inset:50% 12px auto;border-top:1px dashed #badbd47d}
.locator{position:absolute;top:0;left:0;width:100%;height:0;transform:translateX(var(--to));color:#ffbb8f;font-size:16px;line-height:0;text-indent:-7px}.locator.moving{animation:descend .65s ease-out}
@keyframes descend{from{transform:translateX(var(--from))}to{transform:translateX(var(--to))}}
@media(prefers-reduced-motion:reduce){.locator.moving{animation:none}}
html{background:#081827;color:#e5f7ff;font-family:ui-monospace,Menlo,monospace}main{padding:max(14px,env(safe-area-inset-top)) 16px max(18px,env(safe-area-inset-bottom));width:min(100%,600px)}section{padding-top:0}button,input{border-radius:2px}button{background:#123345;color:#c9faff;border:1px solid #58d7e6;box-shadow:inset 0 -3px #071b29;letter-spacing:.04em}button:focus-visible,summary:focus-visible,input:focus-visible{outline:3px solid #ffd68e;outline-offset:2px}button.alt{background:#102331;border-color:#37515f}h1,h2{font-family:ui-monospace,Menlo,monospace;font-weight:800}h2{font-size:clamp(24px,5vw,32px)}.hero{margin:0 -16px 14px;position:relative;min-height:230px;height:clamp(230px,41svh,390px);background:#d6ecf5 url(surface.png) center/100% 100%;image-rendering:pixelated;text-align:center;color:#13374b;display:flex;flex-direction:column;justify-content:center;padding:0 15px 12%}.hero h1{margin:0;font-size:clamp(48px,13vw,84px);letter-spacing:.055em;color:#fff4e1;text-shadow:3px 0 #ef718c,-3px 0 #46c6df,0 3px #24526a}.hero strong{font-size:14px;letter-spacing:.24em}.hero p{color:#214759;font-size:12px;margin:10px 0 0}.buddy{height:32px;width:51px;image-rendering:pixelated;vertical-align:middle}.hero .buddy{position:absolute;bottom:6%;left:65%}.ocean{position:relative;isolation:isolate;text-align:center;background:linear-gradient(170deg,#1c5666,#092436 74%);border:1px solid #365766;padding:18px 14px 10px;margin:0 0 14px;min-height:25svh;display:grid;align-content:center}.ocean:before{content:"";position:absolute;inset:0;z-index:-1;opacity:.35;background:url(transect.jpg) center/cover;image-rendering:pixelated}.ocean .buddy{margin:3px auto 0}.depth{border-radius:0}.depth .line{font-variant-numeric:tabular-nums}.low-power *{animation:none!important;transition:none!important}.contrast small,.contrast p{color:#fff}.contrast .hero p{color:#102b40}.note{color:#ffcda6;min-height:1.2em}.tools{display:grid;grid-template-columns:1fr 1fr;gap:6px}.tools button{font-size:13px}.round-log details{margin:0}.round-log summary{line-height:1.5}.setting{display:flex;align-items:center;gap:10px;min-height:48px}.setting input{width:22px;height:22px;margin:0}
.seascape{position:relative;min-height:clamp(205px,41svh,450px);margin:0 -16px 14px;padding:60px 40px 40px;display:grid;place-items:center;text-align:center;background-size:100% 100%;image-rendering:pixelated}.water-0{background-image:url(water-0.png)}.water-1{background-image:url(water-1.png)}.water-2{background-image:url(water-2.png)}.water-3{background-image:url(water-3.png)}.seascape h2{margin:10px auto;color:#f0faf8;line-height:1.2}.underwater-copy strong{color:#8ce2e5}.underwater-copy p{margin:8px 0}.seascape .buddy{position:absolute;left:9%;bottom:10%}.hud{position:absolute;inset:8px 28px auto 14px;display:flex;align-items:center;justify-content:space-between;gap:5px}.hud>div:not(.rounds){background:#092338e8;border-radius:2px;padding:5px 9px;text-align:left}.hud small,.hud b{display:block}.hud b{font-size:14px;color:#96f0fa}.hud small{font-size:9px}.hud .rounds{display:flex;gap:3px}.rounds i{width:9px;height:9px;background:#071728;border:1px solid #526d7d}.rounds .tier-1{background:#f2aa88}.rounds .tier-4{background:#de88a0}.rounds .tier--1{background:#506474}.rounds .tier-0{background:#9fcf92}.rounds .tier-2{background:#54ccf5}.rounds .tier-3{background:#ca99df}.rounds .tier-5{background:#f2cd70}.ocean-ruler{position:absolute;right:0;top:10%;bottom:12%;width:13px;border-left:1px solid #87c0d4;background:repeating-linear-gradient(transparent 0 13px,#87c0d4 13px 14px)}.ocean-ruler span{position:absolute;top:54%;right:100%;font:9px monospace;white-space:nowrap;color:#f2baa3;background:#123345}.setting input{accent-color:#69cecf}button:disabled{opacity:.6;cursor:default}.note:empty{display:none}
#screen{position:relative}.settings-shortcut{position:absolute;top:9px;right:0;width:auto;padding:7px 9px;margin:0;font:10px/1.4 monospace;background:#142f43;color:#dcf7ff;border-color:#7ca8b6;box-shadow:none}.rules{margin:0 0 12px}.rules summary{text-transform:uppercase;font-size:12px;letter-spacing:.12em}.network{text-align:left;padding:10px 13px;color:#fce8c6;font-size:15px}.network small{display:block;letter-spacing:.045em;margin:3px 0 0 22px;font-size:10px}.party-icon{color:#ffbd77}.descent{min-height:58px;text-transform:uppercase;letter-spacing:.12em;border:2px solid #6adbe7;margin-top:8px}.surface-nav{display:flex;gap:5px}.surface-nav button{flex:1;padding:10px 3px;font-size:12px;letter-spacing:0;min-height:44px}.personal{display:block;font-size:10px;margin-top:8px;text-align:center}.hero{height:clamp(260px,51svh,440px)}.rules p{font-size:14px}
.settings-shortcut{min-height:44px;min-width:44px}.surface-nav button{font-size:clamp(10px,3vw,12px)}@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
select{display:block;width:100%;margin:6px 0 12px;padding:12px;background:#102e43;color:#e8f8f8;font:inherit;border:1px solid #527b89}
.meter i{transform-origin:left center}

.distribution{list-style:none;padding:0}.distribution li{display:grid;grid-template-columns:6em 1fr 3em;align-items:center;gap:8px;font-variant-numeric:tabular-nums}.distribution meter{width:100%}.distribution b{text-align:right}

.reset-clock{font:12px/1.5 monospace;font-variant-numeric:tabular-nums;text-align:center;color:#aac6d1}

/* The surface artwork includes the sea below the controls. Its size stays
   fixed when the rules open or the page grows at large text sizes. */
.wordmark{display:block;width:clamp(176px,55vw,310px);height:auto;margin:auto;image-rendering:pixelated}
main:has(.hero){width:100%;padding:0}
#screen:has(>.hero){
  --scene-height:max(640px,100svh);
  min-height:var(--scene-height);
  padding:0 max(16px,env(safe-area-inset-right)) max(14px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  background:#071323;isolation:isolate;
}
#screen:has(>.hero)::before{
  content:"";position:absolute;inset:0 0 auto;height:var(--scene-height);z-index:-1;
  background:url(surface.png) center / 100% 100% no-repeat;image-rendering:pixelated;
}
#screen>.hero{
  height:calc(var(--scene-height,100svh) * .595);min-height:0;margin:0;
  background:none;padding:0 0 calc(var(--scene-height,100svh) * .095);
}
.hero h1{margin:0 0 14px}
.hero strong{color:#265269;font-size:13px;letter-spacing:.28em}
.hero p{font:12px/1.5 monospace;letter-spacing:.04em}
.hero .buddy{left:76%;bottom:1%;width:40px;height:25px}
#screen>.settings-shortcut{top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right))}
#screen:has(>.hero)>:is(.surface-tools,.network,.descent,.surface-nav,.personal,.reset-clock){
  width:min(100%,376px);margin-left:auto;margin-right:auto;
}
#screen>.network,#screen>.descent{display:block}
.surface-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:start}
.surface-tools .rules{margin:0}.surface-tools summary{min-height:44px;padding:12px 0}
.surface-tools button{width:auto;min-height:44px;margin:0;padding:8px;background:transparent;border-color:transparent;color:#d3f2ff;box-shadow:none;font-size:13px}
#screen>.network{border-color:#598497;background:#102539}
#screen>.descent{border-color:#56d5de;background:#102337;min-height:50px}
@media(min-aspect-ratio:1/1){
  #screen:has(>.hero){--scene-height:max(520px,100svh)}
  #screen:has(>.hero)::before{background-image:url(surface-wide.png)}
}
@media(max-height:640px){
  #screen:has(>.hero){--scene-height:100svh}
}
@media(min-aspect-ratio:1/1) and (max-height:540px){
  #screen:has(>.hero){display:grid;grid-template-columns:repeat(2,minmax(0,212px));justify-content:center;align-content:start;column-gap:8px}
  #screen:has(>.hero)>:is(.hero,.surface-tools,.surface-nav,.personal,.reset-clock){grid-column:1 / -1}
  #screen>.network,#screen>.descent{margin:2px 0 5px;align-self:stretch}
  #screen>.hero{height:55svh}
  .hero .wordmark{width:clamp(160px,27vw,220px)}
}

@font-face{
  font-family:VT323;
  src:url(vt323.woff2) format("woff2");
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
h1,h2,.hero strong,.hud b,.descent,.network,.surface-nav button,#clock,#ranked-clock{
  font-family:VT323,ui-monospace,monospace;font-weight:400;
}
h1,h2{letter-spacing:0}
.seascape h2{font-size:clamp(29px,7vw,42px);line-height:1.04}
.hero strong{font-size:19px;letter-spacing:.22em}
.hud b,#clock,#ranked-clock{font-size:20px}
.descent{font-size:24px}.network{font-size:21px}
.surface-nav button{font-size:clamp(16px,4vw,19px);line-height:1}
.descent,.network{line-height:1.05}
@media(max-height:640px){
  #screen>.network{padding-block:6px}
  #screen>.descent{padding-block:8px}
}

.contrast .rounds i{width:14px;height:16px;text-align:center;border-color:#a9b9c8}.contrast .rounds i[data-marker]::after{content:attr(data-marker);font:bold 12px/14px monospace;color:#091827}.contrast .rounds .tier--1::after{color:white}

/* Give the awarded tier the whole water column between the HUD and the next action. */
main:has(.round-reveal){width:100%;padding:0}
#screen:has(>.round-reveal){
  min-height:100svh;display:grid;grid-template-rows:1fr auto;
  background:#071323;padding-bottom:max(14px,env(safe-area-inset-bottom))
}
.round-reveal{display:grid;--tier-color:#cedeea}
.round-reveal .seascape{
  margin:0;min-height:260px;padding:64px 42px 36px;
  background-size:cover;background-position:center;
}
.round-reveal .hud{inset:max(12px,env(safe-area-inset-top)) max(28px,env(safe-area-inset-right)) auto max(14px,env(safe-area-inset-left));max-width:560px;margin-inline:auto}
.round-reveal h2{color:var(--tier-color);text-transform:uppercase;letter-spacing:.06em}
.round-reveal .reveal-species{display:block;width:66px;height:48px;object-fit:contain;margin:0 auto 12px}
.round-reveal .underwater-copy{overflow-wrap:anywhere}
.round-reveal .underwater-copy strong{color:var(--tier-color)}
.reveal-tier-0{--tier-color:#9fcf92}.reveal-tier-1{--tier-color:#f2aa88}.reveal-tier-2{--tier-color:#54ccf5}
.reveal-tier-3{--tier-color:#ca99df}.reveal-tier-4{--tier-color:#de88a0}.reveal-tier-5{--tier-color:#f2cd70}
#screen:has(>.round-reveal)>button{justify-self:center;width:auto;min-width:152px;max-width:90%;margin:14px 0 0}
#screen:has(>.round-reveal)>[role=status]:empty{display:none}
@media(max-height:480px) and (orientation:landscape){
  .round-reveal .seascape{min-height:200px;padding:42px 48px 12px}
  .round-reveal .reveal-species{width:45px;height:32px;margin-bottom:4px}
  .round-reveal h2{margin-block:4px}
}

.result-header{display:block;padding:12px 0;border:0}
.result-header>div{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.result-header img{width:96px;height:auto;image-rendering:pixelated}
.result-header h1{display:inline-block;margin:18px 8px 0 0;font:64px/1 VT323,monospace}
.result-header h1 small,.result-header strong{font-size:16px;color:#89dbe6}
.dive-chart{margin:24px 0 32px}
.dive-chart figcaption{letter-spacing:.08em;text-transform:uppercase;font:18px VT323,monospace}
.dive-chart figcaption small{font:11px monospace;color:#acbdca}
.plot{display:grid;grid-template-columns:3ch 1fr;gap:8px;margin-top:14px}
.plot-scale,.round-line{height:clamp(128px,25svh,230px)}
.plot-scale{display:flex;flex-direction:column;justify-content:space-between;color:#a8bdc9;font:10px monospace;text-align:right}
.round-columns{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));margin:0;padding:0;list-style:none;text-align:center}
.round-line{position:relative;background:repeating-linear-gradient(to bottom,#43607777 0 1px,transparent 1px 25%);border-bottom:1px solid #43607777}
.round-line::before{content:"";position:absolute;top:0;height:var(--depth);left:50%;border-left:1px solid #62a2b2}
.round-line i{position:absolute;top:var(--depth);left:50%;transform:translate(-50%,-50%);line-height:1}
.round-line img{width:24px;height:16px;object-fit:contain;image-rendering:pixelated}
.round-columns li>span{display:block;margin-top:12px;font:12px monospace;color:#bcd1db}

.bearing h2{font:18px VT323,monospace;text-transform:uppercase;letter-spacing:.08em}
.bearing ul{list-style:none;padding:0;margin:12px 0 20px}
.bearing li{display:grid;grid-template-columns:24px 7ch 1fr auto;align-items:center;gap:8px;padding:8px 0;border-top:1px solid #365169;color:#a4b9c5;font-size:13px}
.bearing li[aria-current]{color:#99edf5;border-color:#69ccd1;font-weight:bold}
.bearing img{width:24px;height:20px;object-fit:contain;image-rendering:pixelated}
.bearing small{font-size:9px;color:inherit}

.sound-toggle{position:absolute;z-index:1;right:max(3px,env(safe-area-inset-right));top:58px;width:44px;height:44px;margin:0;padding:0;font:24px/1 monospace;color:#c4edf0;background:transparent;border:0;box-shadow:none}
.sound-toggle span{position:relative;display:inline-grid;place-items:center;width:28px;height:28px;border:1px solid #658395;background:#102536}
.sound-toggle[aria-pressed=false] span::after{content:"";position:absolute;width:25px;border-top:2px solid #f5b3ac;transform:rotate(-48deg)}
.result-header{position:relative}
.result-header .sound-toggle{top:auto;bottom:4px;right:0}

.line:has(.sound-toggle){gap:8px}
.line:has(.sound-toggle)>b{margin-left:auto}
.line .sound-toggle{position:static;flex:none}

.wardrobe-shortcut {position:absolute;left:74%;bottom:0;width:52px;height:44px;padding:0;margin:0;background:transparent;border:0;box-shadow:none}
.hero .wardrobe-shortcut .buddy {position:static;margin:0}
.wardrobe-panel {width:min(360px,92vw);max-height:82vh;max-height:82svh;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;background:#0d1b30;color:#dfebff;border:2px solid #334f76;padding:12px;box-shadow:0 4px 0 #050c17}
.wardrobe-panel::backdrop {background:rgba(2,8,17,.78)}
.wardrobe-panel header {display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:8px}
.wardrobe-panel h2 {margin:0;font-size:21px}
.wardrobe-panel header button {margin:0;width:44px;height:44px;padding:0}
.buddy-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.buddy-grid button {margin:0;min-height:115px;padding:9px 3px;display:grid;justify-items:center;align-content:center;gap:4px;background:#12243a;color:#e0f2ff;border:2px solid #324661;text-transform:capitalize}
.buddy-grid button[aria-pressed=true] {border-color:#4cd9ee;color:#68e8f8}
.buddy-grid img {width:64px;height:40px;object-fit:contain;image-rendering:pixelated}
.buddy-grid button:disabled img {filter:grayscale(.75)}
.buddy-grid small {font-size:12px;text-transform:none}

.score-comparison {margin:12px 0;color:#b9e6f2}
.score-comparison svg {display:block;width:100%;height:auto;background:linear-gradient(#0d2439,#0a192a)}
.score-bars {fill:#467f9c}
.score-axis,.score-marker path {fill:none;stroke:currentColor;stroke-width:1}
.score-marker {color:#ffba90;fill:currentColor}
.score-marker text,.score-ticks {font:10px ui-monospace,monospace}
.score-ticks {fill:#c0dfeb}
.score-comparison figcaption {padding-top:6px}

.rarity-filters{display:flex;flex-wrap:wrap;gap:4px;margin:10px 0}
.rarity-filters button{width:auto;min-height:44px;margin:0;padding:6px 10px;font:inherit}
.rarity-filters button[aria-pressed="true"]{color:#081827;background:#88e7e2;border-color:#b8ffff}

.language-setting{display:flex;align-items:center;justify-content:space-between;gap:1em;margin-block:1em}
.language-setting select{font:inherit;color:inherit;background:#102b3b;padding:.4em;max-width:65%}
html:lang(ar),html:lang(hi),html:lang(th),html:lang(ja),html:lang(ko),html:lang(zh){font-family:system-ui,sans-serif}

button.question-language{display:inline-block;width:auto;min-height:24px;padding:2px 5px;margin:0;border:1px solid currentColor;background:transparent;color:inherit;font:12px/1.3 system-ui;vertical-align:middle}

html:lang(zh-Hans) body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
html:lang(zh-Hans) :is(button,input,summary,select):focus-visible{outline:3px solid #ffe0a5;outline-offset:3px}
html:lang(zh-Hans) :is(.surface-nav button,.rarity-filters button,.round-log summary){min-height:44px}
html:lang(zh-Hans) .descent{background:#91e6d6;color:#062b32;border:1px solid #adf6e8}
html:lang(zh-Hans) .round-log summary{line-height:1.55;padding-block:10px}
html:lang(zh-Hans) .note{line-height:1.55}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
