/* Seminole Wind / Not Seminole Wind - style.css. Mobile first. */

:root {
  --bg: #05070a;
  --panel: rgba(18, 24, 32, .62);
  --line: rgba(140, 170, 200, .14);
  --ink: #eef3f8;
  --muted: #8b97a6;
  --dim: #56606d;
  --sig: #2be38a;
  --sig-2: #7df5bd;
  --yes: #13b965;
  --yes-deep: #067a3f;
  --no: #ff3d4a;
  --no-deep: #a4121c;
  --amber: #ffc857;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Roboto Mono", monospace;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --scan: min(66vw, 290px, 38vh);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }

/* ---------- background ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 35%, #000 20%, transparent 80%);
  opacity: .55;
}
.bg-glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.bg-glow.g1 { width: 70vw; height: 70vw; left: -25vw; top: -10vh; background: radial-gradient(circle, rgba(43, 227, 138, .35), transparent 70%); animation: drift 14s ease-in-out infinite alternate; }
.bg-glow.g2 { width: 70vw; height: 70vw; right: -30vw; bottom: -5vh; background: radial-gradient(circle, rgba(255, 61, 74, .22), transparent 70%); animation: drift 18s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(8vw, 6vh) scale(1.15); } }
.bg-grain {
  position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- layout ---------- */
main {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 12px);
  max-width: 560px; margin: 0 auto;
}

/* ---------- header ---------- */
.top { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.logo { display: flex; align-items: center; gap: 11px; }
.logo-mark {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, var(--bg) 0 38%, transparent 40%),
    conic-gradient(from 200deg, var(--sig), #9cf27a, var(--amber), var(--no), var(--sig));
  box-shadow: 0 0 18px rgba(43, 227, 138, .35), inset 0 0 0 1px rgba(255, 255, 255, .08);
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logo-title { font-family: var(--display); font-weight: 900; font-size: clamp(11px, 3.35vw, 15px); letter-spacing: .01em; text-transform: uppercase; line-height: 1.1; white-space: nowrap; }
.logo-title b { font-weight: 900; }
.logo-title i { font-style: normal; color: var(--dim); margin: 0 .35em; }
.yes { color: var(--sig); }
.no { color: var(--no); }
.logo-sub { margin-top: 3px; font: 600 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.logo-sub span { color: var(--sig); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 999px;
  font: 600 9.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.chip-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
[data-phase="ready"] .chip-live i, [data-phase="verdict"] .chip-live i { background: var(--sig); box-shadow: 0 0 8px var(--sig); animation: blink 2s ease-in-out infinite; }
[data-phase="recording"] .chip-live i { background: var(--no); box-shadow: 0 0 8px var(--no); animation: blink .6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- stage ---------- */
.stage { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px 0 10px; }

.scanner { position: relative; width: var(--scan); aspect-ratio: 1; display: grid; place-items: center; }
.scanner > * { grid-area: 1 / 1; }
.pulse {
  width: 100%; height: 100%; border-radius: 50%;
  border: 1px solid rgba(43, 227, 138, .35);
  opacity: 0; transform: scale(.7);
}
[data-phase="ready"] .pulse { animation: ping 3.6s cubic-bezier(.2, .6, .3, 1) infinite; }
[data-phase="ready"] .pulse:nth-child(2) { animation-delay: 1.2s; }
[data-phase="ready"] .pulse:nth-child(3) { animation-delay: 2.4s; }
@keyframes ping { 0% { opacity: .9; transform: scale(.72); } 100% { opacity: 0; transform: scale(1.32); } }

.dial { width: 100%; height: 100%; animation: spin 40s linear infinite; opacity: .9; }
.dial line { stroke: rgba(160, 190, 220, .28); stroke-width: .6; }
.dial line.major { stroke: rgba(160, 190, 220, .6); stroke-width: 1; }
.dial text { fill: rgba(160, 190, 220, .45); font: 5px var(--mono); }
[data-phase="recording"] .dial { animation-duration: 6s; }

.radial { width: 100%; height: 100%; pointer-events: none; }

.ring { width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke-width: 2.2; }
.ring-track { stroke: rgba(255, 255, 255, .06); }
.ring-fill { stroke: var(--sig); stroke-linecap: round; stroke-dasharray: 358.14; stroke-dashoffset: 358.14; filter: drop-shadow(0 0 3px var(--sig)); }

.core {
  position: relative;
  width: 62%; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .14), transparent 55%),
    radial-gradient(circle at 50% 50%, #18202b 0%, #0b1017 75%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .08),
    0 0 0 7px rgba(43, 227, 138, .06),
    0 18px 50px rgba(0, 0, 0, .65),
    0 0 40px rgba(43, 227, 138, .18),
    inset 0 -8px 20px rgba(0, 0, 0, .5);
  transition: transform .18s cubic-bezier(.2, 1.4, .4, 1), box-shadow .3s;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.core::after {
  content: ""; position: absolute; inset: 9%; border-radius: 50%;
  border: 1px dashed rgba(43, 227, 138, .28);
}
.core:active:not(:disabled) { transform: scale(.93); }
.core:disabled { cursor: default; }
.core:focus-visible { outline: 2px solid var(--sig); outline-offset: 6px; }
[data-phase="ready"] .core { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 0 0 9px rgba(43,227,138,.1), 0 18px 50px rgba(0,0,0,.65), 0 0 60px rgba(43,227,138,.32), inset 0 -8px 20px rgba(0,0,0,.5); } }
[data-phase="recording"] .core { box-shadow: 0 0 0 1px rgba(255, 61, 74, .3), 0 0 0 7px rgba(255, 61, 74, .08), 0 18px 50px rgba(0, 0, 0, .65), 0 0 50px rgba(255, 61, 74, .25), inset 0 -8px 20px rgba(0, 0, 0, .5); }
[data-phase="recording"] .core::after { border-color: rgba(255, 61, 74, .35); animation: spin 3s linear infinite; }

.core-label { font-family: var(--display); font-weight: 900; font-size: clamp(24px, 7.4vw, 34px); letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
[data-phase="recording"] .core-label { font-family: var(--mono); font-size: clamp(34px, 11vw, 50px); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.core-sub { font: 600 9px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.status { margin: 2px 0 0; min-height: 1.3em; font-size: 15px; color: var(--muted); text-align: center; }

.telemetry { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tm {
  padding: 8px 8px 7px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.tm span { font: 600 8.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.tm b { font: 600 12.5px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-phase="recording"] .tm b { color: var(--sig-2); }

.scope { width: 100%; border-radius: 12px; overflow: hidden; background: rgba(3, 6, 9, .8); border: 1px solid var(--line); }
.scope-head, .scope-axis { display: flex; justify-content: space-between; padding: 6px 9px; font: 600 8.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.scope-head span:last-child { color: var(--muted); }
[data-phase="recording"] .scope-head span:last-child { color: var(--no); }
.scope-axis { padding-top: 4px; }
.waterfall { display: block; width: 100%; height: 62px; }

.hint { margin: 0; max-width: 30em; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.4; }

/* ---------- dock ---------- */
.dock { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 8px; }
.dock-stats { display: flex; gap: 22px; }
.dock-stats div { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dock-stats b { font: 700 17px/1 var(--mono); font-variant-numeric: tabular-nums; }
.dock-stats span { font: 600 8.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.dock-last { margin: 0; font-size: 12.5px; color: var(--muted); }
.install-chip {
  margin-top: 2px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font: 600 12px/1 var(--sans); color: var(--ink);
  background: linear-gradient(135deg, rgba(43, 227, 138, .18), rgba(43, 227, 138, .05));
  border: 1px solid rgba(43, 227, 138, .35);
}
[data-phase="recording"] .dock, [data-phase="starting"] .dock { opacity: .35; transition: opacity .3s; }

.foot { max-width: 34em; font-size: 10.5px; line-height: 1.4; color: var(--dim); text-align: center; }

/* ---------- analysis ---------- */
.analysis {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  padding: calc(env(safe-area-inset-top) + 20px) 18px calc(env(safe-area-inset-bottom) + 20px);
  background: radial-gradient(ellipse at 50% 20%, #0c1219, var(--bg) 70%);
  animation: fadein .25s ease;
}
.analysis > * { width: 100%; max-width: 520px; margin: 0 auto; }
.an-head { display: flex; justify-content: space-between; align-items: center; }
.an-title { display: inline-flex; align-items: center; gap: 8px; font: 700 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.an-title i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: blink .5s ease-in-out infinite; }
.an-timer { font: 600 12px/1 var(--mono); color: var(--sig-2); font-variant-numeric: tabular-nums; }
.an-plot { position: relative; aspect-ratio: 2 / 1; border-radius: 12px; overflow: hidden; background: #020407; border: 1px solid var(--line); box-shadow: 0 0 40px rgba(43, 227, 138, .08); }
.an-plot canvas { display: block; width: 100%; height: 100%; }
.an-sweep {
  position: absolute; top: 0; bottom: 0; left: 0; width: 22%;
  background: linear-gradient(90deg, transparent, rgba(125, 245, 189, .16) 80%, rgba(125, 245, 189, .7) 100%);
  transform: translateX(-100%); opacity: 0; pointer-events: none;
}
.an-sweep.on { opacity: 1; animation: sweep 1.1s linear infinite; }
@keyframes sweep { to { transform: translateX(460%); } }
.an-yaxis { position: absolute; left: 6px; top: 6px; bottom: 6px; display: flex; flex-direction: column; justify-content: space-between; font: 600 8px/1 var(--mono); color: rgba(200, 230, 255, .5); pointer-events: none; }

.an-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.an-steps li {
  display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 8px;
  font: 500 12px/1.25 var(--mono); color: var(--dim);
  opacity: .35; transition: opacity .2s, color .2s;
}
.an-steps li.on, .an-steps li.done { opacity: 1; color: var(--ink); }
.an-steps li em { font-style: normal; color: var(--muted); text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.an-steps li.done em { color: var(--sig-2); }
.an-steps .tick { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--dim); position: relative; }
.an-steps li.on .tick { border-color: var(--amber); border-top-color: transparent; animation: spin .6s linear infinite; }
.an-steps li.done .tick { border-color: var(--sig); background: var(--sig); }
.an-steps li.done .tick::after { content: ""; position: absolute; left: 4px; top: 1.5px; width: 3px; height: 6px; border: solid #04120a; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.an-quip { margin: 2px 0 0; min-height: 1.3em; font-size: 14px; font-style: italic; color: var(--muted); text-align: center; }

/* ---------- verdict ---------- */
.verdict {
  position: fixed; inset: 0; z-index: 6; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top) + 20px) 4vw calc(env(safe-area-inset-bottom) + 22px);
  color: #fff;
}
.verdict.yes { background: radial-gradient(circle at 50% 38%, #26d97c 0%, var(--yes) 35%, var(--yes-deep) 100%); }
.verdict.no { background: radial-gradient(circle at 50% 38%, #ff6b74 0%, #e3222f 38%, var(--no-deep) 100%); }
.verdict > * { position: relative; }
.v-burst { position: absolute !important; inset: -50%; opacity: .22; pointer-events: none; }
.verdict.yes .v-burst { background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .55) 0deg 6deg, transparent 6deg 18deg); animation: spin 30s linear infinite; -webkit-mask-image: radial-gradient(circle, #000 0, transparent 60%); mask-image: radial-gradient(circle, #000 0, transparent 60%); }
.verdict.no .v-burst { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 2px, transparent 2px 5px); opacity: .25; }
.verdict.yes { animation: slam .55s cubic-bezier(.2, 1.5, .4, 1); }
.verdict.no { animation: slam .55s cubic-bezier(.2, 1.5, .4, 1), shake .5s .5s ease; }
@keyframes slam { 0% { transform: scale(1.35); opacity: 0; filter: blur(8px); } 60% { opacity: 1; filter: none; } 100% { transform: none; } }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }

.verdict-badge {
  width: min(22vw, 16vh, 120px); aspect-ratio: 1; margin-bottom: 2.6vh; border-radius: 50%;
  border: max(5px, .8vw) solid rgba(255, 255, 255, .95); box-shadow: 0 6px 30px rgba(0, 0, 0, .18);
  animation: pop .5s .15s cubic-bezier(.2, 1.8, .4, 1) both;
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.verdict-badge::before, .verdict-badge::after { content: ""; position: absolute; background: #fff; border-radius: 6px; }
.verdict.yes .verdict-badge::before { width: 18%; height: 7%; left: 24%; top: 54%; transform: rotate(45deg); }
.verdict.yes .verdict-badge::after { width: 44%; height: 7%; left: 33%; top: 46%; transform: rotate(-50deg); }
.verdict.no .verdict-badge::before, .verdict.no .verdict-badge::after { width: 56%; height: 8%; left: 22%; top: 46%; }
.verdict.no .verdict-badge::before { transform: rotate(45deg); }
.verdict.no .verdict-badge::after { transform: rotate(-45deg); }

.verdict-words { width: 100%; display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: -.015em; text-shadow: 0 5px 0 rgba(0, 0, 0, .14), 0 10px 40px rgba(0, 0, 0, .2); }
.vline { white-space: nowrap; animation: rise .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.vline:nth-child(2) { animation-delay: .06s; }
.vline:nth-child(3) { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }

.v-stats { width: 100%; max-width: 440px; margin-top: 3.2vh; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; animation: fadein .5s .45s both; }
.v-stat { padding: 9px 11px; border-radius: 12px; background: rgba(0, 0, 0, .16); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.v-stat span { display: block; font: 600 8.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.v-stat b { display: block; margin-top: 5px; font: 700 16px/1 var(--mono); font-variant-numeric: tabular-nums; }
.v-actions { margin-top: 2.6vh; display: flex; gap: 10px; animation: fadein .5s .6s both; }

.btn {
  padding: 13px 20px; border-radius: 14px; cursor: pointer; touch-action: manipulation;
  font: 700 15px/1 var(--sans); color: #06100a; background: #fff; border: 1px solid #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18); transition: transform .15s;
}
.btn:active { transform: scale(.96); }
.btn.ghost { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); box-shadow: none; }

@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- problem, sheets, toast ---------- */
.problem {
  position: fixed; inset: 0; z-index: 7; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: calc(env(safe-area-inset-top) + 24px) 26px calc(env(safe-area-inset-bottom) + 24px);
  background: radial-gradient(ellipse at 50% 10%, #1a1210, var(--bg) 70%);
}
.problem-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 900 24px/1 var(--display); color: #120a02; background: var(--amber); box-shadow: 0 0 30px rgba(255, 200, 87, .4); margin-bottom: 8px; }
.problem h2 { margin: 0 0 6px; font-size: 27px; line-height: 1.15; }
.problem p, .problem li { font-size: 16.5px; line-height: 1.5; color: #cfd7e0; }
.problem ol { padding-left: 1.3em; margin: 6px 0; }
.problem .btn { margin-top: 16px; align-self: flex-start; }

.recorder, .sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; max-height: 74vh; overflow: auto;
  padding: 16px 18px calc(env(safe-area-inset-bottom) + 16px);
  background: rgba(10, 13, 18, .96); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: sheetup .3s cubic-bezier(.2, 1, .3, 1);
  color: var(--ink);
}
@keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
.recorder h3, .sheet h3 { margin: 0 0 12px; font: 700 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.recorder label { display: block; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.recorder select { display: block; width: 100%; margin-top: 4px; padding: 11px; font: inherit; font-size: 16px; color: var(--ink); background: #121820; border: 1px solid #2a3340; border-radius: 10px; }
.rec-name { margin: 6px 0 10px; font-size: 13px; color: var(--muted); }
.rec-name code { color: var(--ink); font-size: 14px; }
.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-actions .btn { padding: 11px 15px; font-size: 14px; }
.recorder .btn.ghost, .sheet .btn.ghost { color: var(--ink); }
.rec-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); min-height: 1.2em; }
.sheet ol { margin: 0 0 14px; padding-left: 1.3em; font-size: 16px; line-height: 1.6; color: #d5dce5; }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 26px); z-index: 20; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 999px; font-size: 14px; color: var(--ink);
  background: rgba(20, 26, 34, .95); border: 1px solid var(--line); animation: fadein .25s ease;
}

.debug {
  position: fixed; top: calc(env(safe-area-inset-top) + 4px); left: 4px; right: 4px; z-index: 30; max-height: 38vh; overflow: auto; margin: 0;
  padding: 8px 10px; font: 10.5px/1.35 var(--mono); color: #c8f7d4; background: rgba(0, 0, 0, .8); border-radius: 8px; pointer-events: none; white-space: pre-wrap;
}
.noscript { padding: 30px; text-align: center; }

/* Small phones */
@media (max-height: 700px) {
  :root { --scan: min(58vw, 250px, 36vh); }
  .waterfall { height: 46px; }
  .stage { gap: 10px; padding-top: 10px; }
  .foot { display: none; }
}
/* Home-screen app: no browser chrome, a little more room */
@media (display-mode: standalone) {
  main { padding-top: calc(env(safe-area-inset-top) + 8px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
