:root {
  --ink: #05080f;
  --night: #06101d;
  --night-2: #0c2440;
  --paper: #eef2f6;
  --muted: #9fb3c8;
  --cyan: #52f0ff;
  --coral: #ff6a4d;
  --red: #e8242c;
  --lime: #a6e22e;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --font: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 70% at 50% 50%, #0f2c4d 0%, var(--night) 70%),
    var(--night);
}

#scene {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  opacity: 0;
  transition: opacity .9s var(--ease-out);
}
.is-ready #scene { opacity: 1; }

/* ---------- brand + controls */
.brand {
  position: absolute; top: max(18px, env(safe-area-inset-top)); left: 20px;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .6s var(--ease-out) .5s, transform .6s var(--ease-out) .5s;
}
.is-ready .brand, .is-fallback .brand { opacity: 1; transform: none; }
.brand-logo {
  display: block; width: auto; height: 46px;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,.55));
}
.brand-name {
  font-weight: 700; font-size: 12px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--paper);
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}

.controls {
  position: absolute; top: max(18px, env(safe-area-inset-top)); right: 20px;
  display: flex; gap: 8px;
  opacity: 0; transition: opacity .6s var(--ease-out) .7s;
}
.is-ready .controls, .is-fallback .controls { opacity: 1; }
.ctl {
  font: 700 12px/1 var(--font);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper);
  background: rgba(5, 10, 20, .55);
  border: 1px solid rgba(238, 242, 246, .28);
  padding: 9px 11px 8px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color .2s, background .2s, transform .12s;
}
.ctl .val { color: var(--muted); margin-left: 4px; transition: color .2s; }
.ctl[aria-pressed="true"] .val { color: var(--cyan); }
.ctl:hover { border-color: var(--cyan); }
.ctl:active { transform: translateY(1px); }
.ctl:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
#soundBtn[aria-pressed="true"] { border-color: rgba(82, 240, 255, .6); }
.ctl-vol { display: flex; align-items: center; padding: 0 10px; cursor: default; }
.ctl-vol input {
  -webkit-appearance: none; appearance: none;
  width: 76px; height: 18px; margin: 0; background: transparent; cursor: pointer;
  --fill: 60%;
}
.ctl-vol input::-webkit-slider-runnable-track {
  height: 3px; background: linear-gradient(90deg, var(--cyan) var(--fill), rgba(238,242,246,.28) var(--fill));
}
.ctl-vol input::-moz-range-track { height: 3px; background: rgba(238,242,246,.28); }
.ctl-vol input::-moz-range-progress { height: 3px; background: var(--cyan); }
.ctl-vol input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 10px; height: 14px; margin-top: -5.5px; background: var(--paper); border: 0; border-radius: 1px;
}
.ctl-vol input::-moz-range-thumb { width: 10px; height: 14px; background: var(--paper); border: 0; border-radius: 1px; }
.ctl-vol:hover, .ctl-vol:focus-within { border-color: var(--cyan); }
.ctl-vol input:focus { outline: none; }
.ctl-vol:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ---------- hint */
.hint {
  position: absolute; left: 20px; bottom: max(18px, env(safe-area-inset-bottom));
  margin: 0;
  font-weight: 500; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .6s var(--ease-out) 1.4s, transform .6s var(--ease-out) 1.4s;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
}
.hint::before {
  content: ""; width: 7px; height: 7px; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.8s ease-in-out infinite;
}
.is-ready .hint, .is-fallback .hint { opacity: 1; transform: none; }
.hint.is-done { opacity: 0 !important; transition-delay: 0s; }

@keyframes pulse { 50% { opacity: .25; } }

/* ---------- machine hit area (keyboard + fallback) */
.machine-hit {
  position: absolute; left: 0; top: 0;
  background: transparent; border: 0; padding: 0; margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.machine-hit.is-3d { pointer-events: none; }
.machine-hit:focus { outline: none; }
.machine-hit:focus-visible {
  outline: 2px dashed var(--cyan);
  outline-offset: 6px;
}
.is-fallback .machine-hit:hover { box-shadow: 0 0 0 2px var(--cyan), 0 0 40px rgba(82,240,255,.35); }

.machine-tag {
  position: absolute; left: 0; top: 0; margin: 0;
  pointer-events: none;
  font: 900 italic 17px/1 var(--font);
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--cyan);
  background: var(--ink);
  padding: 7px 10px 6px;
  white-space: nowrap;
  box-shadow: 3px 3px 0 var(--red);
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  transition: clip-path .28s var(--ease-out), opacity .2s;
  will-change: transform;
}
.machine-tag::after {
  content: ""; position: absolute; left: -8px; top: 50%;
  border: 6px solid transparent; border-right-color: var(--ink);
  transform: translateY(-50%);
}
.machine-tag.is-on { opacity: 1; clip-path: inset(0 0 0 0); }
.machine-tag.is-alert { color: var(--paper); background: var(--red); box-shadow: 3px 3px 0 var(--cyan); }
.machine-tag.is-alert::after { border-right-color: var(--red); }

/* ---------- crew hit areas + name tag */
.crew-hit {
  position: absolute; left: 0; top: 0;
  background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.crew-hit.is-3d { pointer-events: none; }
.crew-hit:focus { outline: none; }
.crew-hit:focus-visible { outline: 2px dashed var(--lime); outline-offset: 4px; }

.char-tag {
  position: absolute; left: 0; top: 0; margin: 0;
  pointer-events: none;
  display: flex; align-items: stretch;
  font: 900 italic 18px/1 var(--font);
  text-transform: uppercase; letter-spacing: .04em;
  opacity: 0;
  transition: opacity .18s var(--ease-out);
  will-change: transform;
}
.char-tag b {
  font-weight: 900; color: var(--ink); background: var(--paper);
  padding: 6px 8px 5px;
}
.char-tag span {
  font: 700 11px/1 var(--font); letter-spacing: .16em;
  color: var(--paper); background: var(--ink);
  padding: 9px 8px 0;
}
.char-tag.is-on { opacity: 1; }

/* ---------- intro video */
.intro {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: #000;
  transition: opacity .75s var(--ease-out), visibility 0s linear .75s;
}
.intro.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.intro video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 42% 50%;
  background: #000;
}
.intro-logo { display: none; }
@media (orientation: portrait) {
  .intro video { object-fit: contain; }
  .intro-logo {
    display: block; position: absolute; left: 50%; top: max(9vh, env(safe-area-inset-top));
    width: min(220px, 56vw); height: auto; transform: translateX(-50%); z-index: 1;
  }
}
.intro-ui {
  position: absolute; right: 20px; bottom: max(22px, env(safe-area-inset-bottom));
  display: flex; gap: 8px;
}
.intro-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(238,242,246,.12);
}
.intro-bar span {
  display: block; height: 100%; background: var(--cyan);
  transform: scaleX(0); transform-origin: left;
}
.intro-play {
  position: relative; z-index: 1;
  font: 900 italic 22px/1 var(--font); letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); background: var(--cyan);
  border: 0; padding: 14px 22px 12px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--red);
  transition: transform .12s;
}
.intro-play:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--red); }
.intro-play:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--red); }
.intro-play:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }
.intro.is-waiting video { filter: brightness(.55); }

/* ---------- loader */
.loader {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--night);
  transition: opacity .6s var(--ease-out);
  z-index: 5;
}
.loader.is-done { opacity: 0; pointer-events: none; }
.loader-logo {
  width: min(260px, 60vw); height: auto;
  animation: logo-flicker 2.4s steps(1) infinite;
}
@keyframes logo-flicker {
  0%, 100% { opacity: 1; }
  41% { opacity: .35; }
  43% { opacity: 1; }
  47% { opacity: .5; }
  49% { opacity: 1; }
}
.loader-track { width: 160px; height: 2px; background: rgba(238,242,246,.15); overflow: hidden; }
.loader-bar {
  display: block; height: 100%; background: var(--cyan);
  transform: scaleX(.04); transform-origin: left;
  transition: transform .3s var(--ease-out);
}
.loader-text { font-weight: 500; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

.load-error {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-content: center; justify-items: center; gap: 16px;
  background: var(--night); text-align: center; padding: 24px;
}
.load-error p { margin: 0; font-size: 18px; letter-spacing: .04em; max-width: 30ch; }

/* ---------- fallback */
.fallback { position: absolute; inset: 0; }
.fallback-stage { position: absolute; display: block; }
.fallback-stage img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fallback-stage .fallback-char { inset: auto; height: auto; filter: brightness(.8) saturate(.9); }
.noscript { position: absolute; inset: auto 0 40% 0; text-align: center; }

/* ---------- tagline (fills the empty band on tall screens) */
.tagline {
  position: absolute; left: 0; right: 0; top: 30%;
  margin: 0; text-align: center;
  transform: translateY(-50%);
  font: 900 italic clamp(30px, 9vw, 56px)/.92 var(--font);
  text-transform: uppercase; letter-spacing: -.005em;
  color: var(--paper);
  display: none;
  opacity: 0;
  transition: opacity .8s var(--ease-out) .9s;
  pointer-events: none;
}
.tagline span {
  display: block; margin-top: 12px;
  font-size: .42em; letter-spacing: .18em;
  color: var(--red);
}
.is-letterbox .tagline { display: block; }
.is-ready .tagline, .is-fallback .tagline { opacity: 1; }

/* ---------- small screens */
@media (max-width: 560px) {
  .brand-logo { height: 38px; }
  .brand-name { font-size: 10px; }
  .ctl { padding: 8px 9px 7px; font-size: 11px; letter-spacing: .1em; }
  .ctl-vol { display: none; } /* phones use their own volume buttons */
  .brand-name { display: none; }
  .hint { left: 16px; right: 16px; justify-content: center; text-align: center; font-size: 13px; }
  .machine-tag { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- dropped can (clickable) */
.can-hit {
  position: absolute; left: 0; top: 0;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 10px;
}
.can-hit:focus { outline: none; }
.can-hit:focus-visible { outline: 2px dashed var(--cyan); outline-offset: 4px; }
.can-hit.is-fallback {
  background: url(assets/can-lying.webp) center 70% / 80% auto no-repeat;
  animation: canPulse 1.6s ease-in-out infinite;
}
@keyframes canPulse { 50% { filter: brightness(1.35) drop-shadow(0 0 10px rgba(82,240,255,.6)); } }
.can-tag {
  position: absolute; left: 0; top: 0; margin: 0;
  pointer-events: none;
  font: 900 italic 17px/1 var(--font); letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); background: var(--cyan);
  padding: 7px 10px 6px;
  box-shadow: 3px 3px 0 var(--red);
  opacity: 0; transition: opacity .25s;
  white-space: nowrap;
  will-change: transform;
}
.can-tag.is-on { opacity: 1; }
.can-tag.is-nudge { animation: nudge .5s var(--ease-out); }
@keyframes nudge { 20%, 60% { margin-left: -6px; } 40%, 80% { margin-left: 6px; } }

/* ---------- hunt panel (opens from the can) */
.hunt {
  --h-bg: #0a1624;
  --h-bg2: #0f2033;
  --h-line: #1f3a55;
  --h-mono: "Share Tech Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}
.hunt-scrim {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(6,16,29,.55), rgba(2,5,10,.9));
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .35s var(--ease-out);
}
.hunt.is-open .hunt-scrim { opacity: 1; }
.hunt-sprite {
  position: fixed; pointer-events: none; opacity: 0;
  object-fit: contain; filter: drop-shadow(0 20px 40px rgba(0,0,0,.6));
  transition: opacity .25s;
}
.hunt-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100svh - 24px);
  display: flex; flex-direction: column;
  border-style: solid;
  border-width: 30px 26px;
  border-image: url(assets/can-open/frame.webp) 62 56 fill / 30px 26px / 0 stretch;
  opacity: 0; transform: scale(.9);
  transition: opacity .3s var(--ease-out), transform .45s var(--ease-out);
  pointer-events: none;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.6));
}
.hunt.is-panel .hunt-panel { opacity: 1; transform: none; pointer-events: auto; }
.hunt-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px 8px;
  background: var(--h-bg);
  border-bottom: 1px solid var(--h-line);
  font: 13px/1 var(--h-mono); letter-spacing: .1em; color: var(--muted);
}
.hunt-sys { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hunt-sys::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); vertical-align: 1px; }
.hunt-preview { font: 11px/1.2 var(--h-mono); color: var(--ink); background: #ffd54a; padding: 4px 6px; letter-spacing: .04em; }
.hunt-x {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  background: transparent; color: var(--paper); border: 1px solid var(--h-line); cursor: pointer;
  font: 16px/1 var(--font);
  transition: border-color .15s, background .15s;
}
.hunt-x:hover { border-color: var(--cyan); background: rgba(82,240,255,.08); }
.hunt-x:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.hunt-screen {
  overflow: auto; overscroll-behavior: contain;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--h-bg2), var(--h-bg));
  color: var(--paper);
}
.hv { display: grid; gap: 18px; padding: 22px clamp(16px, 4vw, 34px) 24px; }
.hv-center { text-align: center; justify-items: center; padding-block: 36px 34px; }
.hv > * { min-width: 0; }
.h-kicker { margin: 0; font: 13px/1.2 var(--h-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.h-title {
  margin: 0; font: 900 italic clamp(30px, 6vw, 46px)/.95 var(--font);
  text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance;
}
.h-title:focus { outline: none; }
.h-copy { margin: 0; font: 500 18px/1.4 var(--font); letter-spacing: .02em; color: #c6d3e0; max-width: 46ch; }
.h-note { margin: 0; font: 12px/1.45 var(--h-mono); color: var(--muted); }
.h-note code { color: var(--cyan); }
.h-error {
  margin: 0; font: 14px/1.4 var(--h-mono); color: #ffb3a8;
  border-left: 3px solid var(--red); padding: 6px 10px; background: rgba(232,36,44,.1);
  text-align: left;
}
.h-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.h-stack { display: grid; gap: 10px; }
.h-row { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .h-row { grid-template-columns: 1fr; } }
.h-body { display: grid; gap: 14px; }

/* buttons */
.ico { width: 20px; height: 20px; flex: none; }
.hbtn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 20px 10px;
  font: 900 italic 21px/1 var(--font); letter-spacing: .04em; text-transform: uppercase;
  color: var(--paper); background: rgba(82,240,255,.04);
  border: 2px solid #3a5a78; text-decoration: none; cursor: pointer;
  transition: transform .12s, border-color .15s, background .15s, box-shadow .15s, opacity .15s;
}
.hbtn:hover { border-color: var(--cyan); background: rgba(82,240,255,.1); }
.hbtn:active { transform: translate(2px, 2px); }
.hbtn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.hbtn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.hbtn-primary { color: var(--ink); background: var(--cyan); border-color: var(--cyan); box-shadow: 4px 4px 0 var(--red); }
.hbtn-primary:hover { background: #8ff6ff; }
.hbtn-primary:active { box-shadow: 2px 2px 0 var(--red); }
.hbtn-wide { width: 100%; }
.hbtn.is-done { border-color: #2bd9a1; }
.hbtn-primary.is-done { background: #2bd9a1; border-color: #2bd9a1; box-shadow: 4px 4px 0 #0c5a45; }
.h-tick {
  position: absolute; top: -10px; right: -10px;
  width: 26px; height: 26px; display: grid; place-items: center;
  background: #2bd9a1; color: var(--ink); border: 2px solid var(--ink);
  animation: pop .3s var(--ease-out);
}
.h-tick .ico { width: 15px; height: 15px; }
@keyframes pop { from { transform: scale(0); } }
.hbtn-go { min-width: 170px; white-space: nowrap; color: var(--ink); background: var(--paper); border-color: var(--paper); box-shadow: 4px 4px 0 var(--cyan); }
.hbtn-go:hover { background: #fff; }
.hbtn-go[disabled] { background: #5b6878; border-color: #5b6878; box-shadow: none; opacity: .75; }
.h-link {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  font: 700 17px/1 var(--font); letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); text-decoration: underline; text-underline-offset: 4px;
}
.h-link:hover { color: var(--paper); }
.h-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.h-back { text-decoration: none; }

/* signed-in row */
.h-who { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--h-line); }
.h-who img, .h-av-ph { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--cyan); object-fit: cover; flex: none; }
.h-av-ph { display: grid; place-items: center; background: #1a2a3a; color: var(--cyan); font: 900 italic 20px/1 var(--font); text-transform: uppercase; }
.h-who > span:not(.h-av-ph) { flex: 1; min-width: 0; display: grid; gap: 3px; }
.h-who b { font: 700 19px/1 var(--font); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-who small { font: 12px/1 var(--h-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-who .h-link { font-size: 13px; white-space: nowrap; flex: none; }

/* stepper */
.h-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.h-steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 17px; height: 2px; background: var(--h-line); }
.h-step { position: relative; display: grid; justify-items: center; gap: 7px; }
.h-dot {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--h-bg); border: 2px solid #3a5a78; color: var(--muted);
  font: 16px/1 var(--h-mono);
  transform: rotate(45deg);
  transition: background .25s, border-color .25s, color .25s;
}
.h-dot > * { transform: rotate(-45deg); }
.h-dot .ico { width: 16px; height: 16px; }
.h-lbl { font: 700 14px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.h-step.is-now .h-dot { background: var(--cyan); border-color: var(--cyan); color: var(--ink); box-shadow: 0 0 16px rgba(82,240,255,.5); }
.h-step.is-now .h-lbl { color: var(--paper); }
.h-step.is-done .h-dot { background: #2bd9a1; border-color: #2bd9a1; color: var(--ink); }
@media (max-width: 520px) {
  .h-dot { width: 30px; height: 30px; }
  .h-steps::before { top: 14px; }
  .h-lbl { font-size: 12px; letter-spacing: .03em; }
  /* only the current step keeps its label on narrow screens */
  .h-step:not(.is-now) .h-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .h-step.is-now .h-lbl { position: absolute; top: 38px; }
  .h-steps { padding-bottom: 18px; }
}
.h-bar { position: relative; height: 8px; background: var(--h-line); margin-right: 48px; }
.h-bar span { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--cyan) 0 10px, transparent 10px 13px); transform-origin: left; transition: transform .5s var(--ease-out); }
.h-bar b { position: absolute; right: -48px; top: -5px; font: 14px/1 var(--h-mono); color: var(--muted); font-weight: 400; }

/* card preview */
.h-card {
  margin: 0; width: 100%; aspect-ratio: 16 / 9; max-width: 100%;
  display: grid; place-items: center;
  background: #070b12; border: 1px solid var(--h-line);
}
.h-card img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* form */
.h-form { display: grid; gap: 8px; }
.h-lock { display: flex; align-items: stretch; background: #06101b; border: 2px solid #3a5a78; min-width: 0; }
.h-lock:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(82,240,255,.2); }
.h-lock:has([aria-invalid="true"]) { border-color: var(--red); }
.h-prefix {
  display: flex; align-items: center; padding: 0 2px 0 12px; flex: none; max-width: 62%;
  font: 15px/1.2 var(--h-mono); color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  user-select: none;
}
.h-lock .h-input { border: 0; background: transparent; box-shadow: none; padding-left: 2px; min-width: 0; flex: 1; }
.h-lock .h-input:focus { box-shadow: none; }
@media (max-width: 460px) { .h-prefix { font-size: 12px; } .h-lock .h-input { font-size: 15px; } }
.h-label { font: 700 16px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: #c6d3e0; }
.h-input {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 16px/1.2 var(--h-mono); color: var(--paper);
  background: #06101b; border: 2px solid #3a5a78; border-radius: 0;
}
.h-input::placeholder { color: #5d738a; }
.h-input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(82,240,255,.2); }
.h-input[aria-invalid="true"] { border-color: var(--red); }

.h-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--h-line); }
.h-foot .h-back[hidden] + .hbtn-go { margin-left: auto; }

/* loading ring */
.h-spin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(82,240,255,.25); border-top-color: var(--cyan); animation: spin .8s linear infinite; display: inline-block; }
.h-spin-lg { width: 54px; height: 54px; border-width: 5px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .hunt-panel { border-width: 22px 18px; border-image-width: 22px 18px; }
  .hunt-head { padding: 8px 10px; font-size: 11px; }
  .hbtn { font-size: 18px; min-height: 48px; }
  .hbtn-go { min-width: 0; padding-inline: 14px; }
  .h-who .h-link span.full { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hunt-panel { transform: none; }
}
