:root {
  color-scheme: dark;
  --void: #041316;
  --white: #eef8f4;
  --mint: #b7f0dd;
  --faint: #a3c6c0;
  --aqua: #6cedce;
  --line: rgba(178, 233, 222, .24);
  --round: 11px;
  --fluid-pad: clamp(21px, 5.4vw, 104px);
  --ui-font: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --code-font: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: var(--ui-font);
  background: var(--void);
  color: var(--white);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow: hidden; margin: 0; width: 100%; height: 100%; }
button { color: inherit; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 2px solid var(--aqua); outline-offset: 6px; }
button, svg { user-select: none; }
.svg-icon { width: 21px; height: 21px; display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
#gameRoot { width: 100%; height: 100%; height: 100dvh; background: #041316; isolation: isolate; position: relative; overflow: hidden; }
#ocean { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.glass { position: absolute; z-index: 2; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 44%, transparent 36%, rgba(0,12,12,.12) 67%, rgba(0,6,6,.45) 100%); }
#flashFx { z-index: 6; position: absolute; inset: 0; pointer-events: none; background: rgba(224,255,246,.92); opacity: 0; }
#flashFx:is(.active,.is-active,.flash) { animation: camera-flash .34s ease both; }
@keyframes camera-flash { 0% { opacity: .8; } 100% { opacity: 0; } }
#rendererNotice { pointer-events: none; position: absolute; z-index: 9; top: 11px; left: 50%; transform: translateX(-50%); background: #102c2e; color: var(--mint); padding: 6px 12px; border: 1px solid var(--line); border-radius: 5px; font-size: 11px; }
.screen { position: absolute; inset: 0; z-index: 8; }
.home-screen { background: #061c20; overflow: auto; }
.home-cover, .home-shade { position: absolute; inset: 0; pointer-events: none; }
.home-cover {
  background: url("media/cover-v4.webp") 59% 54% / cover no-repeat, radial-gradient(ellipse at 60% 16%, #287579, transparent 55%), linear-gradient(137deg, #031a1d, #0a353a 45%, #041315 84%);
}
.home-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, #abd8d38c 0 .6px, transparent 1px), radial-gradient(circle, #79d8c590 0 .7px, transparent 1.4px), radial-gradient(circle, #addcde9f 0 .35px, transparent 1px);
  background-position: 69px 38px, 138px 144px, 27px 120px; background-size: 145px 179px, 269px 241px, 171px 87px;
  opacity: .55; mix-blend-mode: screen;
}
.home-shade {
  background: linear-gradient(90deg,rgba(2,13,17,.97),rgba(3,16,20,.88) 20%,rgba(4,19,23,.61) 43%,rgba(3,18,21,.10) 76%),
              linear-gradient(0deg,rgba(1,13,16,.88),transparent 32%,transparent 76%,rgba(4,19,21,.53));
}
.home-frame {
  position: relative; min-height: 100%; display: grid; grid-template-rows: auto 1fr auto;
  padding: max(26px, env(safe-area-inset-top)) var(--fluid-pad) max(21px, env(safe-area-inset-bottom));
}
.home-header, .home-footer { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.home-header { align-self: start; padding: 0 0 19px; border-bottom: 1px solid rgba(200,240,230,.21); }
.home-brand { display: flex; align-items: center; gap: 13px; }
.brand-icon { background: rgba(146,227,209,.075); border: 1px solid #b0e7da55; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; color: #bbf0e5; }
.brand-icon .svg-icon { width: 20px; height: 20px; }
.home-brand strong, .home-brand small { display: block; line-height: 1.35; }
.home-brand strong { font-size: 14px; font-weight: 620; letter-spacing: .14em; }
.home-brand small { margin-top: 4px; font-family: var(--code-font); font-size: 8px; color: #94b8b3; letter-spacing: .15em; }
.header-index, .home-footer { font-size: 12px; color: #bdd9d1; letter-spacing: .14em; }
.header-index { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.header-index i, .home-footer i { display: inline-block; width: 20px; height: 1px; background: #83b6af70; vertical-align: middle; }
.home-body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; align-self: stretch; padding: clamp(28px, 7vh, 85px) 0; }
.hero-detail { display: flex; gap: 9px; align-items: center; color: #d5ede7; font-size: 11px; font-weight: 650; letter-spacing: .16em; line-height: 1; border: 1px solid #acdacf59; background: #0b292c64; padding: 9px 11px; border-radius: 99px; white-space: nowrap; }
.hero-detail span { display: inline-block; width: 6px; height: 6px; background: #80f4d0; border-radius: 50%; box-shadow: 0 0 15px #47f5ce7a; }
.hero-detail b { color: #8aacaa; font-weight: 400; }
.home-body h1 { margin: 21px 0 0 -4px; font-size: clamp(46px, 7.03vw, 122px); letter-spacing: -.094em; font-weight: 750; line-height: 1.07; color: #f1fdf7; text-wrap: balance; text-shadow: 0 5px 35px #00101045; }
.home-body h1 span { color: #a6ebd8; }
.hero-en { margin: 15px 0 0; font-family: var(--code-font); font-weight: 500; letter-spacing: .34em; color: #aee4d6; font-size: clamp(10px, 1.35vw, 18px); }
.hero-description { margin: clamp(23px, 4vh, 39px) 0 25px; font-size: clamp(13px, 1.4vw, 18px); line-height: 1.9; color: #d2e8e2; letter-spacing: .035em; }
.start-button, .filled-button, .outline-button { min-height: 49px; border: none; border-radius: 6px; padding: 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .06em; display: inline-flex; gap: 18px; justify-content: space-between; align-items: center; transition: background .15s, box-shadow .15s, transform .15s; }
.start-button, .filled-button { background: #b8f1dd; color: #062624; }
.start-button { width: 172px; box-shadow: 0 8px 32px #46cdbb2d; }
.start-button:hover, .filled-button:hover { transform: translateY(-2px); background: #d5ffe8; box-shadow: 0 9px 27px #4bf2b944; }
.start-button:active, .filled-button:active { transform: translateY(1px); }
.outline-button { background: #102e32; color: #d7f0eb; border: 1px solid var(--line); }
.outline-button:hover { background: #184348; border-color: #9adac3; }
.home-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 19px; color: #a9c6c4; font-size: 11px; }
.home-controls span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
kbd { display: inline-flex; align-items: center; justify-content: center; padding: 2px 4px; min-width: 14px; height: 17px; border: 1px solid #b1e6dd37; border-radius: 3px; color: #e1faf0; background: #dafff212; font: 9px var(--code-font); }
.touch-copy { display: none; }
.home-footer { border-top: 1px solid #c8f0e22d; padding: 14px 0 3px; color: #92bcb8; font-family: var(--code-font); font-size: 10px; }
.home-footer span:first-child { font-size: 11px; }
.home-footer i { margin: 0 6px; }
.home-footer em { font-style: normal; letter-spacing: .12em; }
#hud { position: absolute; z-index: 3; inset: 0; pointer-events: none; text-shadow: 0 2px 12px #001112, 0 1px 4px #001112; }
.hud-corners { position: absolute; inset: 12px; opacity: .55; background: linear-gradient(var(--line),var(--line)) left top / 22px 1px, linear-gradient(var(--line),var(--line)) left top / 1px 22px, linear-gradient(var(--line),var(--line)) right top / 22px 1px, linear-gradient(var(--line),var(--line)) right top / 1px 22px, linear-gradient(var(--line),var(--line)) left bottom / 22px 1px, linear-gradient(var(--line),var(--line)) left bottom / 1px 22px, linear-gradient(var(--line),var(--line)) right bottom / 22px 1px, linear-gradient(var(--line),var(--line)) right bottom / 1px 22px; background-repeat: no-repeat; }
.sensor-top { position: absolute; top: max(27px, env(safe-area-inset-top)); left: 29px; right: 29px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 9px; align-items: center; }
.sensor-brand, .compass, .top-actions, .sensor-item, .mission-panel { border-radius: 7px; }
.sensor-brand, .compass, .sensor-item, .mission-panel {
  background: linear-gradient(135deg,#0b30359c,#04171bb8); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.sensor-brand { display: flex; align-items: center; justify-self: start; gap: 8px; padding: 9px 11px; color: #e0efec; font-size: 11px; letter-spacing: .09em; }
.sensor-brand small { padding-left: 5px; font: 8px var(--code-font); color: var(--faint); }
.sensor-signal, .small-dot, .rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 13px #70fcdd79; display: inline-block; flex: none; }
.compass { align-items: center; display: flex; gap: 8px; padding: 6px 10px; font-size: 10px; letter-spacing: .08em; color: var(--faint); }
.compass .svg-icon { width: 17px; height: 17px; color: var(--mint); }
.compass strong { min-width: 37px; font: 650 14px var(--code-font); color: #ecfffa; }
.top-actions { display: flex; gap: 5px; justify-self: end; }
.icon-button, .action-button { color: #dffaf2; background: #102b30b5; border: 1px solid #c6f2ed4f; backdrop-filter: blur(8px); border-radius: 7px; pointer-events: auto; }
.icon-button { display: grid; place-items: center; padding: 0; width: 36px; height: 36px; }
.icon-button .svg-icon { width: 18px; height: 18px; }
.icon-button:is(:hover, [aria-pressed="true"]), .action-button:is(:hover, [aria-pressed="true"], .active) { border-color: #b4f5e2a0; background: #175353e4; }
.mission-panel { position: absolute; top: max(77px,calc(env(safe-area-inset-top) + 48px)); left: 29px; max-width: min(46%,370px); min-width: 197px; min-height: 65px; padding: 11px 37px 11px 13px; }
.mission-index { font-size: 9px; letter-spacing: .095em; color: var(--faint); display: flex; align-items: center; gap: 7px; }
.mission-index .small-dot { width: 5px; height: 5px; }
.mission-slash { color: #56827c; }
.mission-panel p { margin: 7px 0 0; font-weight: 580; letter-spacing: .025em; font-size: 13px; line-height: 1.38; }
#navArrow { position: absolute; right: 10px; top: 50%; margin-top: -12px; display: grid; place-items: center; width: 25px; height: 25px; color: var(--aqua); font: 22px/1 var(--code-font); transform-origin: center; }
.sensor-stack { position: absolute; top: max(77px,calc(env(safe-area-inset-top) + 48px)); right: 29px; display: flex; gap: 7px; }
.sensor-item { display: flex; gap: 9px; min-width: 106px; padding: 8px 10px 9px; }
.sensor-item .svg-icon { width: 17px; height: 17px; color: var(--aqua); margin-top: 3px; }
.sensor-item small { display: block; color: #add0ca; font: 8px/1 var(--code-font); letter-spacing: .07em; white-space: nowrap; }
.sensor-item strong { display: block; margin-top: 5px; color: #ecfff9; font: 650 17px/1 var(--code-font); white-space: nowrap; }
.oxygen-track { margin: 6px 0 0; height: 2px; width: 100%; background: #b0e4d947; }
#oxygenFill { width: 100%; height: 100%; background: var(--aqua); transition: width .2s linear, background-color .4s ease; }
#oxygenFill:is(.low,.critical,.danger) { background: #ff9471; }
#oxygenValue:is(.low,.critical,.danger) { color: #ffc1a8; }
.reticle { width: 42px; height: 42px; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: #a7dcd4b5; }
.reticle i, .reticle b { position: absolute; width: 9px; height: 9px; border: 1px solid currentColor; }
.reticle i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.reticle i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.reticle i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.reticle i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.reticle b { width: 4px; height: 4px; top: 50%; left: 50%; transform: translate(-50%,-50%); border: none; border-radius: 50%; background: currentColor; }
.reticle:is(.ready,.target,.on-target,.active) { color: #caffd9; filter: drop-shadow(0 0 6px #46f9a0); }
.interaction-hint, .toast { color: #e2fff4; letter-spacing: .04em; text-align: center; position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; max-width: calc(100% - 32px); background: #0a242ae0; border: 1px solid var(--line); border-radius: 6px; padding: 6px 11px; backdrop-filter: blur(6px); white-space: nowrap; }
.interaction-hint { top: calc(50% + 39px); }
.toast { top: calc(50% + 85px); }
.toast:empty { display: none; }
.hud-bottom { position: absolute; left: 29px; right: 29px; bottom: max(26px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; justify-content: space-between; gap: 10px; }
.rec-block { align-self: center; color: #cfede7; }
.rec-line { display: flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .09em; white-space: nowrap; }
.rec-dot { background: #ff9b81; box-shadow: 0 0 10px #ec785d8e; }
.rec-label { font: 9px var(--code-font); color: var(--faint); margin: 6px 0 0 13px; letter-spacing: .09em; }
.action-stack { display: flex; justify-content: flex-end; gap: 6px; }
.action-button { display: flex; align-items: center; gap: 6px; padding: 8px 10px; height: 42px; font-size: 11px; white-space: nowrap; }
.action-button .svg-icon { width: 19px; height: 19px; }
.primary-action { border-color: #b9f2dd88; background: #246051bb; }
.primary-action:hover { background: #388776d8; }
.desktop-instructions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; padding-bottom: 7px; font-size: 10px; margin-left: auto; gap: 10px; color: #d6e7e5; }
.desktop-instructions span { white-space: nowrap; }
.desktop-instructions kbd { margin: 0 1px; }
.touch-controls { display: none; }
.modal-screen {
  z-index: 8; display: grid; place-items: center; overflow: auto; padding: 18px;
  background: rgba(2,13,17,.63); backdrop-filter: blur(7px);
}
.modal-card { position: relative; width: min(100%,500px); padding: clamp(25px,5vw,43px); border-radius: 13px; color: var(--white); border: 1px solid #a8e8db4d; background: linear-gradient(158deg,#123638,#081e23 66%); box-shadow: 0 27px 100px #0008; }
.modal-card h2 { font-size: clamp(26px,4.6vw,43px); letter-spacing: -.05em; line-height: 1.15; font-weight: 690; margin: 16px 0 13px; }
.chapter-label { color: #b2d8d3; font-size: 11px; letter-spacing: .13em; display: flex; align-items: center; gap: 7px; }
.chapter-label b { width: 6px; height: 6px; background: var(--aqua); border-radius: 50%; box-shadow: 0 0 12px #70fcdd70; }
.chapter-label span { font: 9px var(--code-font); color: #90bcb8; }
.modal-card p { color: #cde6e1; font-size: 14px; line-height: 1.8; margin: 0; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.modal-actions .svg-icon { width: 17px; height: 17px; }
#endStats { color: #acd7d1; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); font: 11px/1.7 var(--code-font); white-space: pre-line; }
#endStats:empty { display: none; }
@media (max-width: 800px) {
  .desktop-instructions { font-size: 9px; gap: 6px; }
}
@media (max-width: 680px) {
  .home-frame { padding: max(18px,env(safe-area-inset-top)) 21px max(18px,env(safe-area-inset-bottom)); min-height: 100%; }
  .home-header { padding-bottom: 13px; }
  .header-index { font-size: 9px; gap: 7px; letter-spacing: .10em; }
  .header-index i { width: 12px; }
  .home-body { justify-content: flex-end; padding: 50px 0 23px; }
  .home-cover { background-position: 64% center; }
  .home-shade { background: linear-gradient(0deg,rgba(3,16,20,.98) 3%,rgba(3,16,20,.92) 23%,rgba(3,16,20,.51) 52%,transparent 82%), linear-gradient(90deg,#02101399,transparent 75%), linear-gradient(180deg,#05151aca,transparent 23%); }
  .home-body h1 { margin-top: 17px; font-size: clamp(39px,10.4vw,65px); margin-left: -2px; }
  .hero-en { margin-top: 11px; }
  .hero-description { margin: 17px 0; line-height: 1.6; }
  .home-controls { font-size: 10px; gap: 9px; margin-top: 14px; }
  .hud-corners { inset: 6px; }
  .sensor-top, .hud-bottom { left: 14px; right: 14px; }
  .sensor-top { top: max(13px, env(safe-area-inset-top)); }
  .sensor-brand { padding: 7px 8px; gap: 4px; font-size: 9px; white-space: nowrap; }
  .sensor-brand small { display: none; }
  .compass { padding: 6px; gap: 4px; font-size: 9px; }
  .compass strong { font-size: 12px; min-width: 30px; }
  .icon-button { width: 31px; height: 31px; }
  .mission-panel { top: max(53px,calc(env(safe-area-inset-top) + 42px)); left: 14px; min-width: 0; width: calc(100% - 110px); max-width: none; padding: 8px 28px 8px 9px; min-height: 0; }
  #navArrow { right: 3px; }
  .mission-panel p { font-size: 11px; margin-top: 4px; }
  .sensor-stack { top: max(53px,calc(env(safe-area-inset-top) + 42px)); right: 14px; flex-direction: column; gap: 4px; }
  .sensor-item { min-width: 77px; gap: 4px; padding: 6px; }
  .sensor-item .svg-icon { width: 12px; height: 12px; margin-top: 0; }
  .sensor-item small { font-size: 7px; }
  .sensor-item strong { font-size: 13px; margin-top: 4px; }
  .oxygen-track { margin-top: 4px; }
  .action-button { height: 41px; }
  .modal-actions { gap: 7px; }
  .filled-button, .outline-button { font-size: 12px; min-height: 45px; }
}
@media (pointer: coarse), (max-width: 680px) {
  .desktop-copy, .desktop-instructions { display: none; }
  .touch-copy { display: flex; }
  .hud-bottom { grid-template-columns: 1fr auto; align-items: end; bottom: max(12px, env(safe-area-inset-bottom)); }
  .rec-block { align-self: end; }
  .action-stack { flex-direction: column; padding-bottom: 15px; }
  .action-button { justify-content: center; padding: 8px; width: 60px; height: 43px; border-radius: 9px; }
  .action-button kbd { display: none; }
  .touch-controls { position: absolute; left: 14px; bottom: max(49px, calc(env(safe-area-inset-bottom) + 43px)); display: grid; grid-template-columns: repeat(3, 42px); grid-template-rows: repeat(2, 39px); gap: 3px; }
  .touch-controls button { pointer-events: auto; display: grid; place-items: center; touch-action: none; background: #0b252abf; border: 1px solid #b4e1d964; color: #e0f7f0; padding: 0; border-radius: 9px; }
  .touch-controls button:active { background: #367664; }
  .touch-up { grid-area: 1/2; }
  .touch-left { grid-area: 2/1; }
  .touch-down { grid-area: 2/2; }
  .touch-right { grid-area: 2/3; }
}
@media (max-height: 530px) and (min-width: 681px) {
  .home-frame { padding-top: 12px; padding-bottom: 12px; }
  .home-header { padding-bottom: 9px; }
  .home-body { padding: 15px 0 14px; }
  .hero-detail { padding-block: 6px; }
  .home-body h1 { margin-top: 10px; font-size: clamp(35px, 7.7vh, 70px); }
  .hero-en { margin-top: 6px; }
  .hero-description { margin: 10px 0; line-height: 1.5; }
  .home-controls { margin-top: 8px; }
  .home-footer { padding-top: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* V3 / dive instruments: only the two critical readings sit in the center. */
.center-instruments{
  position:absolute; z-index:2; left:50%; bottom:max(24px, calc(env(safe-area-inset-bottom) + 12px));
  transform:translateX(-50%); width:clamp(222px,25vw,342px); pointer-events:none;
}
.center-instruments .sensor-stack{
  position:static; display:grid; grid-template-columns:.82fr 1.18fr; align-items:center; gap:0;
  background:linear-gradient(105deg,#092b33dd,#071c25ee 78%);
  border:1px solid #9ccac46e; border-radius:9px; box-shadow:0 10px 22px #0006;
  backdrop-filter:blur(10px); min-height:68px; padding:8px 12px 8px 11px;
}
.center-instruments .sensor-item{
  padding:0; min-width:0; border:0; display:block; background:none; backdrop-filter:none;
}
.center-instruments .depth-item{
  padding:1px 8px 1px 0; margin-right:10px;
  border-right:1px solid #9ccac442; border-radius:0;
}
.center-instruments .instrument-title{
  display:flex; align-items:center; justify-content:flex-start; gap:5px; min-width:0;
}
.center-instruments .instrument-title .svg-icon{height:13px; width:13px; margin:0; color:#91bfbc}
.center-instruments .instrument-title small{color:#b7d6d2;font:.68rem/1.2 var(--ui-font); letter-spacing:.06em}
.center-instruments #depthValue{font:650 clamp(20px,2.17vw,31px)/1 var(--code-font); letter-spacing:-.065em; color:#f1fffd; margin:4px 0 0}
.center-instruments .gas-readout{display:flex;justify-content:space-between;align-items:center;gap:4px}
.center-instruments #oxygenValue{margin:0; font:650 clamp(14px,1.3vw,20px)/1 var(--code-font); color:#c6f5e6; letter-spacing:-.05em;}
.center-instruments .oxygen-track{margin-top:7px; height:5px; border-radius:20px; overflow:hidden; background:#537b816b}
.center-instruments #oxygenFill{border-radius:20px; background:#8bdfc4;}
#hud:is([data-oxygen="low"],[data-oxygen="critical"]) #oxygenFill,
.center-instruments #oxygenFill:is(.low,.critical,.danger){background:#eca782}
#hud:is([data-oxygen="low"],[data-oxygen="critical"]) #oxygenValue,
#oxygenValue:is(.low,.critical,.danger),.oxygen-item:is(.low,.critical,.danger) #oxygenValue{color:#ffd0aa}
#hud[data-oxygen="critical"] .sensor-stack{border-color:#e59c76bd}
.air-warning{
  display:block; position:absolute; bottom:calc(100% + 8px); width:max-content; max-width:100%; text-align:center; left:50%; transform:translateX(-50%);
  padding:5px 9px; border-radius:5px; font-size:10px; letter-spacing:.08em; color:#ffe3c8;
  background:#2f201bee; border:1px solid #c39570b0; text-shadow:none;
}
.hud-bottom{grid-template-columns:1fr 1fr;bottom:max(28px,env(safe-area-inset-bottom)); gap:8px}
.hud-bottom .action-stack{grid-column:2;grid-row:1;justify-self:end}
.hud-bottom .rec-block{grid-column:1;grid-row:1;align-self:end}
.desktop-instructions{grid-column:1;grid-row:2;justify-content:flex-start;margin-left:0;opacity:.79;padding-bottom:0}
.sensor-brand,.compass{border-color:#89b5b54a;background:#0b272d9c}
.sensor-top .compass{opacity:.83}
.mission-panel{background:linear-gradient(120deg,#0b3239e6,#081f24b0); max-width:min(47%,365px)}
.mission-panel p{font-weight:660}
@media (pointer:coarse), (max-width:680px){
  .center-instruments{bottom:max(138px,calc(env(safe-area-inset-bottom) + 133px)); width:min(58vw,275px)}
  .center-instruments .sensor-stack{min-height:54px;padding:7px 8px}
  .center-instruments .instrument-title{gap:3px}
  .center-instruments .instrument-title .svg-icon{width:10px;height:10px}
  .center-instruments .instrument-title small{font-size:9px;letter-spacing:0}
  .center-instruments #depthValue{font-size:20px}
  .center-instruments #oxygenValue{font-size:13px}
  .center-instruments .depth-item{margin-right:7px;padding-right:6px}
  .center-instruments .oxygen-track{height:4px;margin-top:6px}
  .hud-bottom .action-stack{padding-bottom:0}
  .mission-panel{width:calc(100% - 28px);max-width:min(81%,370px)}
  .action-button,.icon-button{backdrop-filter:none}
  .toast{top:max(123px,calc(50% - 75px));white-space:normal}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:600px){
  .center-instruments{bottom:max(13px,env(safe-area-inset-bottom)); width:clamp(200px,34vw,270px)}
  .hud-bottom{bottom:max(11px,env(safe-area-inset-bottom))}
  .center-instruments .sensor-stack{min-height:47px}
}
@media (max-width:340px){
  .center-instruments{width:57vw}
  .center-instruments .instrument-title .svg-icon{display:none}
  .center-instruments .gas-readout{gap:2px}
}
/* Cinematic viewport at the start, uses the live underwater scene behind glass. */
.intro-screen{z-index:7;overflow:hidden;pointer-events:none;}
.intro-look{position:absolute;inset:0;overflow:hidden;pointer-events:none;isolation:isolate}
.intro-port{
  --diameter:min(56vw,68vh,640px);
  position:absolute;z-index:1;top:45%;left:50%;width:var(--diameter);height:var(--diameter);transform:translate(-50%,-50%);
  color:#85b1af; border-radius:50%; border:clamp(10px,1.8vw,27px) solid #132b31;
  box-shadow:0 0 0 2px #91aaa968,0 0 0 7px #455752,0 0 0 11px #0b181e,0 0 0 13px #71878955,
    0 0 0 170vmax #030d13ed, inset 0 0 30px 18px #0718249c,inset 0 0 0 2px #acd6c782;
  animation:port-appear .75s ease-out both;
}
@keyframes port-appear{from{opacity:.05;transform:translate(-50%,-50%) scale(.96)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
.intro-port::after{
  content:"";position:absolute;inset:1%;border-radius:50%;background:linear-gradient(127deg,#d7eee722 5%,transparent 24%,transparent 72%,#7faeb91c 88%);box-shadow:inset 0 0 8px #b1ecdf58;
}
.port-bolts{
  position:absolute;inset:-9px;border-radius:50%;opacity:.74;
  background:repeating-conic-gradient(from -7.5deg,#86a69f 0 1.2deg, transparent 1.3deg 30deg);
  -webkit-mask:radial-gradient(transparent 66%,#000 67% 70.3%,transparent 71%);
  mask:radial-gradient(transparent 66%,#000 67% 70.3%,transparent 71%);
}
.port-glare{
  position:absolute; inset:0; border-radius:50%; background:radial-gradient(ellipse at 28% 19%,#d1ffe329,transparent 48%);
}
.intro-screen[data-scene="arrival"] .intro-port,
.intro-screen[data-scene="open"] .intro-port,
.intro-screen[data-scene="open-water"] .intro-port{display:none}
.intro-screen[data-scene="arrival"] .intro-look,
.intro-screen[data-scene="open"] .intro-look,
.intro-screen[data-scene="open-water"] .intro-look{background:linear-gradient(180deg,#03121bd1,transparent 29%,transparent 60%,#020b13ed)}
.intro-top{
  position:absolute;left:var(--fluid-pad);right:var(--fluid-pad);top:max(26px,calc(env(safe-area-inset-top) + 12px));
  display:flex;justify-content:space-between;align-items:center;gap:8px;
}
.intro-record{display:flex;align-items:center;gap:9px;color:#d1e7e6;font-size:11px;letter-spacing:.13em;text-shadow:0 1px 5px #06141d}
.intro-record i{width:5px;height:5px;border-radius:50%;background:#91dbc9;box-shadow:0 0 12px #89e9dc80}
.intro-skip{
  pointer-events:auto; display:flex; align-items:center; gap:6px; border:1px solid #a0b9b96b; border-radius:5px;
  background:#0b2029c9; padding:7px 11px; min-height:36px;color:#f1faf9; font-size:11px;letter-spacing:.08em
}
.intro-skip:hover{background:#22444b}
.intro-skip .svg-icon{width:15px;height:15px}
.intro-copy{
  position:absolute; z-index:2; width:min(570px,calc(100% - 30px)); text-align:center; text-wrap:pretty;
  left:50%; bottom:max(38px,calc(env(safe-area-inset-bottom) + 25px)); transform:translateX(-50%);
  padding:10px 14px; color:#f1f8f7; text-shadow:0 1px 5px #000,0 1px 18px #001014;
}
#introKicker{
  color:#9bcabd;text-transform:uppercase; font:650 10px/1.4 var(--code-font); letter-spacing:.18em; margin:0 auto 8px;
}
.intro-copy h2{font-size:clamp(19px,3.15vw,40px);font-weight:720;letter-spacing:-.035em;line-height:1.18;margin:1px 0 8px}
.intro-copy p{font-size:clamp(12px,1.12vw,15px);line-height:1.65;margin:0;color:#cae5e2}
#introCaption{font-size:10px;letter-spacing:.08em;margin-top:5px;color:#a8ccc5}
#introCaption:empty{display:none}
@media (max-width:680px){
  .intro-port{--diameter:min(85vw,63vh);top:43%; border-width:10px}
  .intro-top{left:20px;right:20px;top:max(16px,env(safe-area-inset-top))}
  .intro-copy{bottom:max(25px,calc(env(safe-area-inset-bottom) + 14px));}
}
@media (max-height:530px){
  .intro-port{--diameter:min(46vw,67vh);top:43%}
  .intro-top{top:max(11px,env(safe-area-inset-top))}
  .intro-copy{bottom:max(9px,env(safe-area-inset-bottom));padding:0 8px}
  .intro-copy h2{font-size:clamp(17px,3.25vh,26px);margin-bottom:4px}
  .intro-copy p{font-size:11px;}
  #introKicker{font-size:8px;margin-bottom:3px}
}

.home-cover{background-position:59% 53%}
@media (max-width:680px){.home-cover{background-position:67% center}}

.help-button span{font:660 16px/1 system-ui,sans-serif;color:var(--mint)}
.help-button[aria-pressed=true]{background:#184956}

.photo-subject{position:absolute;left:50%;top:calc(50% + 38px);max-width:85vw;transform:translateX(-50%);padding:5px 9px;border-radius:4px;background:#082229ba;color:#d8e5db;border:1px solid #98cfc461;font-size:12px;letter-spacing:.035em;white-space:nowrap;pointer-events:none}

.board-capsule{position:absolute;z-index:5;left:50%;bottom:max(133px,calc(env(safe-area-inset-bottom) + 133px));transform:translateX(-50%);pointer-events:auto;column-gap:9px;white-space:nowrap;box-shadow:0 10px 35px #001416a0}
.board-capsule small{font-size:10px;opacity:.77}.board-capsule svg{width:17px;height:17px}
@media (pointer:coarse), (max-width:680px){.board-capsule{bottom:max(205px,calc(env(safe-area-inset-bottom) + 200px))}}
