*{box-sizing:border-box}
:root{font-family:system-ui,sans-serif;background:#d8e9e7;color:#153545}
body{margin:0}
main{width:min(100%,550px);margin:auto;padding:10px 10px max(10px,env(safe-area-inset-bottom))}
header a{color:#265467;font-size:.76rem;font-weight:850}
h1{font-size:clamp(1.32rem,5.9vw,1.62rem);margin:4px 0 9px}
#stage{position:relative;height:clamp(340px,73dvh,700px);border:2px solid #316b78;overflow:hidden;border-radius:16px;background:#0b3144}
canvas{display:block;width:100%;height:100%;touch-action:none}
#stage::after{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 51% 48%,transparent 34%,#03253254);z-index:1}
#depth,#air,#signal{position:absolute;z-index:2;color:#edf9eb;background:#103147d8;border:1px solid #6fb3b7;border-radius:9px;padding:6px 9px}
#depth{left:9px;top:10px;font-size:.8rem}
#metres{font-size:1.23rem;margin-left:4px}
#air{right:9px;top:10px;display:grid;gap:2px;width:117px;font-size:.78rem;font-weight:800}
#air label{display:flex;justify-content:space-between}
progress{width:100%;height:.55rem;appearance:none;accent-color:#67ddd4}
progress::-webkit-progress-bar{background:#235564;border-radius:8px}
progress::-webkit-progress-value{background:#82ecd7;border-radius:8px}
#air.low progress::-webkit-progress-value{background:#f3aa84}
#signal{bottom:12px;left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap;font-weight:850;pointer-events:none}
#signal:empty{display:none}
#intro{position:absolute;z-index:3;inset:0;display:grid;place-items:center;background:#062c3c80;padding:18px}
#intro[hidden]{display:none}
#intro div{max-width:340px;padding:17px;background:#f0f5dc;border:2px solid #638f92;border-radius:16px}
h2,p{margin:0 0 8px}p{line-height:1.46}
button{min-height:47px;border:0;border-radius:8px;background:#25516b;color:#eff8ed;font:900 .99rem system-ui;touch-action:manipulation}
button:disabled{opacity:.55}
#start{width:100%}
#controls{display:grid;grid-template-columns:.75fr .75fr 1.1fr 1.5fr;gap:6px;margin-top:7px}
#dive[aria-pressed=true]{background:#376e78}
#rope{background:#8a5b37}
