/* IRIS⁴ — the view on top (two thirds), the controls below; side by side on a wide screen. */
:root { --bg: #07080c; --panel: #0e1017; --text: #e9e4da; --dim: #9a958c; --border: #262833; --ice: #6fe0ff; --gold: #ffd27a;
  --mono: ui-monospace, 'JetBrains Mono', Menlo, Consolas, monospace; --sans: -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); overflow: hidden; overscroll-behavior: none; }
body { display: grid; grid-template-rows: 2fr 1fr; height: 100vh; height: 100svh; }
[hidden] { display: none !important; }
#view { position: relative; min-height: 0; overflow: hidden; }
#gl, #ov { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#gl { touch-action: none; } #ov { pointer-events: none; }
#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; padding: calc(8px + env(safe-area-inset-top)) 12px 6px; font: 12px var(--mono); color: var(--dim); pointer-events: none; background: linear-gradient(rgba(7, 8, 12, 0.6), rgba(7, 8, 12, 0)); }
#hud b { color: var(--text); letter-spacing: 0.08em; } #hudBow b { color: var(--gold); }
#stick { display: none; }
@media (pointer: coarse) {
  #stick { display: block; position: absolute; left: 18px; bottom: 18px; width: 92px; height: 92px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.25); pointer-events: none; }
  #stick.live { border-color: rgba(255, 210, 122, 0.6); }
  #knob { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
}
#intro { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 18px; background: rgba(7, 8, 12, 0.72); }
#intro h1 { font: 800 40px/1 var(--mono); letter-spacing: 0.1em; margin: 6px 0 12px; }
#intro h2 { font: 600 11px var(--mono); color: var(--dim); letter-spacing: 0.08em; margin: 0; }
#intro p { max-width: 560px; line-height: 1.55; color: #c9c3b8; margin: 0 0 10px; font-size: 14px; } #intro p b { color: var(--text); }
button.primary { font: 800 15px var(--mono); letter-spacing: 0.12em; background: var(--gold); color: #1a1205; border: 0; border-radius: 10px; padding: 11px 28px; cursor: pointer; margin-top: 6px; }
#panel { min-height: 0; overflow-y: auto; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--panel); }
.read { font: 12px/1.5 var(--mono); color: var(--dim); margin: 0 0 8px; } .read b { color: var(--text); }
.split { display: flex; gap: 14px; align-items: flex-start; }
#map { flex: 0 0 auto; width: 170px; height: 150px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.ctls { flex: 1 1 auto; min-width: 0; }
.ctls h4 { font: 700 11px var(--mono); color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; margin: 2px 0 5px; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.btns button { font: 600 12px var(--mono); background: none; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.btns button:active { border-color: var(--gold); color: var(--gold); }
#show button.on, #foam button.on { border-color: var(--ice); color: var(--ice); }
.ctls label { display: flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--dim); margin: 0 0 4px; }
.ctls input[type=range] { flex: 1 1 auto; min-width: 80px; accent-color: var(--ice); }
output { color: var(--text); min-width: 3.6em; text-align: right; }
.help { font: 11px/1.5 var(--mono); color: var(--dim); margin: 8px 0 0; } .help b { color: var(--text); } .help a { color: var(--text); }
@media (max-width: 520px) { .split { flex-direction: column; } .ctls { order: -1; width: 100%; } #map { width: 100%; height: 130px; } }
.btns.you button { padding: 8px 11px; }
@media (min-aspect-ratio: 4/3) and (min-width: 900px) {
  body { grid-template-rows: none; grid-template-columns: 1fr 380px; }
  #panel { border-top: 0; border-left: 1px solid var(--border); }
  .split { flex-direction: column; } #map { width: 100%; height: 200px; }
}
