/* ─────────────────────────────────────────────────────────────────────────
   btq-arena.css — "Beat the Quant" 3D battle arena.
   Vanilla port of docs/design/btq/btq-scene.jsx. Scoped under
   #btq-root.btq-arena so the 3D world + Pokémon HUD never collide with the app
   (or with the flat duel in beat-the-quant.css). Loads AFTER beat-the-quant.css
   so the shared #btq-root base (position:fixed, z-index, font smoothing) applies
   and this layer only adds the arena's own world + chrome.

   Palette tokens (lifted verbatim from btq-scene.jsx):
     YOU #5ec8d8 · GROW #54d08a · QUANT #9fb4d4 · CRIMSON #e0566e
     MARKET #e6bd5c · GLASS rgba(11,17,27,.72) · QUANT_HUE pale steel
   ───────────────────────────────────────────────────────────────────────── */

#btq-root.btq-arena {
  --a-mono: 'Spline Sans Mono', ui-monospace, monospace;
  --a-serif: 'Fraunces', Georgia, serif;
  --a-sans: 'Spline Sans', system-ui, sans-serif;
  --a-muted: #6f7c8f;
  --a-line: #26303d;
  --a-you: #5ec8d8;     /* your cyan */
  --a-grow: #54d08a;    /* growth green */
  --a-quant: #9fb4d4;   /* cold steel */
  --a-crimson: #e0566e; /* adversarial rim */
  --a-market: #e6bd5c;  /* benchmark amber */
  --a-glass: rgba(11, 17, 27, 0.72);
  --a-coral: #ff6f86;

  position: fixed; inset: 0; z-index: 500; overflow: hidden;
  font-family: var(--a-sans);
  color: #eef2f7;
  background: radial-gradient(120% 90% at 50% 8%, #0b1422 0%, #070b13 46%, #04060a 100%);
  -webkit-font-smoothing: antialiased;

  & * { box-sizing: border-box; }
  & button { font-family: inherit; }

  /* ═══ frame (GSAP fades it in) ═══ */
  & .a-frame { position: absolute; inset: 0; overflow: hidden; }

  /* ═══ 3D WORLD ═══ */
  & .a-world { position: absolute; inset: 0; perspective: 1600px; perspective-origin: 50% 42%; }
  & .a-camera { position: absolute; inset: 0; transform-style: preserve-3d; }

  /* deep cosmic backdrop */
  & .a-bg { position: absolute; inset: -10%; transform: translateZ(-520px); }
  & .a-bg .a-bloom { position: absolute; border-radius: 50%; }
  & .a-bg .a-bloom.b1 { left: -6%; top: 8%; width: 620px; height: 620px;
    background: radial-gradient(circle, rgba(46,224,160,0.10), transparent 64%); filter: blur(20px); }
  & .a-bg .a-bloom.b2 { right: -4%; top: 24%; width: 760px; height: 760px;
    background: radial-gradient(circle, rgba(94,140,220,0.12), transparent 66%); filter: blur(24px); }
  & .a-bg .a-bloom.b3 { left: 24%; bottom: -10%; width: 720px; height: 520px;
    background: radial-gradient(circle, rgba(140,90,220,0.10), transparent 64%); filter: blur(26px); }
  & .a-stars { position: absolute; inset: 0; }
  & .a-star { position: absolute; border-radius: 50%; background: #cdd9ec; }
  & .a-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
  & .a-lines path { animation: btq-arena-drift 56s ease-in-out infinite; transform-box: view-box; transform-origin: center; }

  /* receding arena floor */
  & .a-floor { position: absolute; left: 50%; top: 46%; width: 2200px; height: 1500px;
    transform: translateX(-50%) rotateX(74deg) translateZ(-40px); transform-origin: 50% 0%; transform-style: preserve-3d;
    background: radial-gradient(ellipse 60% 50% at 50% 38%, rgba(60,90,130,0.16), transparent 70%); }
  & .a-grid { position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(110,140,180,0.10) 1px, transparent 1px),
      linear-gradient(90deg, rgba(110,140,180,0.08) 1px, transparent 1px);
    background-size: 110px 110px;
    -webkit-mask-image: radial-gradient(ellipse 55% 50% at 50% 36%, #000 0%, transparent 72%);
    mask-image: radial-gradient(ellipse 55% 50% at 50% 36%, #000 0%, transparent 72%); }
  & .a-plat { position: absolute; left: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
  & .a-plat.far { top: 20%; width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(134,166,207,0.34), rgba(134,166,207,0.06) 58%, transparent 72%);
    box-shadow: 0 0 80px rgba(134,166,207,0.25), inset 0 0 60px rgba(224,86,110,0.10);
    border: 1px solid rgba(150,175,210,0.18); }
  & .a-plat.near { top: 70%; width: 620px; height: 560px;
    background: radial-gradient(circle, rgba(94,200,216,0.26), rgba(94,200,216,0.05) 58%, transparent 72%);
    box-shadow: 0 0 90px rgba(94,200,216,0.22); border: 1px solid rgba(94,200,216,0.16); }

  /* The Quant — anchored; placement/scale ride on transform (center↔beside) */
  & .a-quant-anchor { position: absolute; left: 50%; top: 14%;
    transform: translate(-50%, 0) translate(var(--kdx, 0px), var(--kdy, 0px)) translateZ(var(--kz, -560px)) scale(var(--kscale, 0.78));
    transition: transform .75s cubic-bezier(.22, 1, .36, 1); }
  & .a-quant-rise { /* GSAP rises this inner wrapper only */ }

  /* trading monitors — candlestick cockpit (landscape) */
  & .a-monitors { position: absolute; left: 50%; bottom: 300px;
    transform: translateX(-55%) translateZ(120px); transform-style: preserve-3d;
    display: flex; align-items: flex-end; gap: 24px; }
  & .a-mon-wrap { transform-style: preserve-3d; }
  & .a-mon-wrap.left { transform: rotateY(18deg) rotateX(-8deg); transform-origin: right center; }
  & .a-mon-wrap.right { transform: rotateY(-18deg) rotateX(-8deg); transform-origin: left center; }
  & .a-monitor { position: relative; width: 496px; border-radius: 16px; overflow: hidden;
    background: linear-gradient(180deg, rgba(13,20,32,0.96), rgba(7,11,19,0.975)); }
  & .a-monitor.you { border: 1px solid rgba(94,200,216,0.23);
    box-shadow: 0 44px 90px rgba(0,0,0,0.62), inset 0 1px 0 rgba(94,200,216,0.15), 0 0 48px rgba(94,200,216,0.08); }
  & .a-monitor.mkt { border: 1px solid rgba(230,189,92,0.23);
    box-shadow: 0 44px 90px rgba(0,0,0,0.62), inset 0 1px 0 rgba(230,189,92,0.15), 0 0 48px rgba(230,189,92,0.08); }
  & .a-mon-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 9px; }
  & .a-mon-tick { font-family: var(--a-mono); font-size: 12px; letter-spacing: 0.18em; }
  & .a-monitor.you .a-mon-tick { color: var(--a-you); }
  & .a-monitor.mkt .a-mon-tick { color: var(--a-market); }
  & .a-mon-sub { font-family: var(--a-mono); font-size: 10.5px; letter-spacing: 0.13em; color: var(--a-muted); margin-left: 10px; }
  & .a-mon-price { font-family: var(--a-serif); font-weight: 500; font-size: 19px; color: #eef6ff; letter-spacing: -0.01em; }
  & .a-mon-ch { font-family: var(--a-mono); font-size: 12px; color: var(--a-grow); margin-left: 9px; }
  & .a-mon-chart { position: relative; height: 220px; margin: 0 4px 8px; }
  & .a-mon-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  & .a-mon-gloss { position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(180,220,240,0.06), transparent 38%); }

  /* ═══ FLAT HUD OVERLAY ═══ */
  & .a-top { position: absolute; left: 0; right: 0; top: 0; height: 58px; z-index: 25;
    display: flex; align-items: center; justify-content: space-between; padding: 0 70px;
    background: linear-gradient(180deg, rgba(5,8,13,0.8), transparent); }
  & .a-top-l { display: flex; align-items: center; gap: 18px; }
  & .a-top-title { font-family: var(--a-mono); font-size: 13px; letter-spacing: 0.34em; color: #cfd8e6; }
  & .a-top-div { width: 1px; height: 16px; background: rgba(120,140,170,0.3); }
  & .a-top-sub { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--a-muted); }
  & .a-top-r { display: flex; align-items: center; gap: 10px; font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--a-market); }
  & .a-top-r .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--a-market); box-shadow: 0 0 8px var(--a-market); animation: btq-arena-pulse 2.4s ease-in-out infinite; }

  /* 5-second rules line (locked improvement #9) */
  & .a-rules { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); z-index: 24; text-align: center;
    font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.06em; color: #aeb8c7; max-width: min(620px, 88vw);
    line-height: 1.5; padding: 0 16px; }
  & .a-rules b { color: var(--a-you); font-weight: 500; }

  /* nameplates (Pokémon style, glass) */
  & .a-plate { position: absolute; z-index: 30; width: 470px; }
  & .a-plate-box { position: relative; padding: 18px 26px 20px; background: var(--a-glass);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  & .a-enemy { left: 70px; top: 96px; transition: left .75s cubic-bezier(.22, 1, .36, 1); }
  & .a-enemy.beside { left: 250px; }
  & .a-enemy .a-plate-box { clip-path: polygon(0 0, 100% 0, 100% 72%, 94% 100%, 0 100%);
    border: 1px solid rgba(224,86,110,0.32);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 30px rgba(224,86,110,0.06); }
  & .a-you { right: 70px; bottom: 250px; }
  & .a-you .a-plate-box { clip-path: polygon(6% 0, 100% 0, 100% 100%, 0 100%, 0 28%);
    border: 1px solid rgba(94,200,216,0.34);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 30px rgba(94,200,216,0.06); }
  & .a-plate-top { display: flex; align-items: baseline; justify-content: space-between; }
  & .a-plate-id { display: flex; align-items: center; gap: 12px; }
  & .a-plate-dot { width: 9px; height: 9px; border-radius: 50%; }
  & .a-enemy .a-plate-dot { background: var(--a-crimson); box-shadow: 0 0 10px var(--a-crimson); }
  & .a-you .a-plate-dot { background: var(--a-you); box-shadow: 0 0 10px var(--a-you); }
  & .a-plate-name { font-family: var(--a-serif); font-weight: 600; font-size: 27px; color: #eef2f7; letter-spacing: -0.01em; white-space: nowrap; }
  & .a-plate-lv { font-family: var(--a-mono); font-size: 13px; letter-spacing: 0.16em; }
  & .a-enemy .a-plate-lv { color: var(--a-quant); }
  & .a-you .a-plate-lv { color: var(--a-you); }
  & .a-plate-sub { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.22em; margin-top: 3px; margin-left: 21px; text-transform: uppercase; }
  & .a-enemy .a-plate-sub { color: var(--a-crimson); }
  & .a-you .a-plate-sub { color: var(--a-grow); }
  & .a-plate-barrow { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
  & .a-plate-barlab { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--a-muted); }
  & .a-plate-barpct { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.12em; }
  & .a-enemy .a-plate-barpct { color: var(--a-quant); }
  & .a-you .a-plate-barpct { color: var(--a-grow); }
  & .a-plate-foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 11px; }
  & .a-plate-foot.col { align-items: flex-end; }
  & .a-plate-flab { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--a-muted); }
  & .a-plate-flab.sm { font-size: 10px; letter-spacing: 0.18em; }
  & .a-plate-val { font-family: var(--a-serif); font-weight: 500; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
  & .a-enemy .a-plate-val { font-size: 22px; color: #dbe7f6; }
  & .a-you .a-plate-val { font-size: 26px; color: #eef6ff; }
  & .a-plate-pnl { font-family: var(--a-serif); font-weight: 500; font-size: 20px; color: var(--a-grow); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
  & .a-plate-pnl.neg { color: var(--a-crimson); }
  & .a-streak { font-family: var(--a-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--a-market); margin-top: 8px; opacity: 0; transition: opacity .4s; }
  & .a-streak.show { opacity: 1; }

  /* HP bar (track + gradient fill + pip notches) */
  & .a-hp { position: relative; height: 12px; border-radius: 7px; background: rgba(8,12,20,0.85);
    border: 1px solid rgba(120,140,170,0.22); overflow: hidden; flex: 1; }
  & .a-hp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 7px; transition: width .5s cubic-bezier(.4, 1.1, .5, 1); }
  & .a-hp.enemy .a-hp-fill { background: linear-gradient(90deg, #7d93b6, var(--a-quant)); box-shadow: 0 0 12px var(--a-quant); }
  & .a-hp.you .a-hp-fill { background: linear-gradient(90deg, var(--a-grow), var(--a-you)); box-shadow: 0 0 12px var(--a-you); }
  & .a-hp-pips { position: absolute; inset: 0; pointer-events: none;
    background-image: repeating-linear-gradient(90deg, transparent 0, transparent 11px, rgba(5,8,14,0.6) 11px, rgba(5,8,14,0.6) 12px); }

  /* command tray (FIGHT menu) */
  & .a-tray { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; min-height: 210px;
    background: linear-gradient(180deg, rgba(7,11,18,0.30) 0%, rgba(7,11,18,0.86) 30%, rgba(5,8,13,0.97) 100%);
    border-top: 1px solid rgba(94,200,216,0.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
  & .a-tray-inner { display: flex; align-items: stretch; gap: 22px; padding: 22px 70px 26px; }
  & .a-tabs { display: flex; flex-direction: column; gap: 10px; width: 168px; justify-content: center; }
  & .a-tab { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 10px;
    background: rgba(255,255,255,0.02); border: 1px solid rgba(120,140,170,0.16); }
  & .a-tab.on { background: rgba(94,200,216,0.12); border-color: rgba(94,200,216,0.45); box-shadow: 0 0 18px rgba(94,200,216,0.18); }
  & .a-tab .ic { font-family: var(--a-mono); font-size: 12px; color: var(--a-muted); }
  & .a-tab.on .ic { color: var(--a-you); }
  & .a-tab .tx { font-family: var(--a-mono); font-size: 14px; letter-spacing: 0.14em; color: #8b97a8; }
  & .a-tab.on .tx { color: #eaf8fb; }

  & .a-moves { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px; }
  & .a-move { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; min-height: 60px;
    border-radius: 12px; background: rgba(13,20,32,0.6); border: 1px solid rgba(120,140,170,0.18);
    cursor: pointer; transition: transform .16s, border-color .16s, box-shadow .16s, background .16s; }
  & .a-move:hover { transform: translateY(-2px); border-color: var(--mc, rgba(120,140,170,0.5)); box-shadow: 0 12px 30px rgba(0,0,0,0.4); }
  & .a-move.hero { background: rgba(84,208,138,0.10); border-color: rgba(84,208,138,0.5); box-shadow: 0 0 20px rgba(84,208,138,0.16); }
  & .a-move.sel { border-color: var(--mc); box-shadow: 0 0 24px color-mix(in srgb, var(--mc) 40%, transparent); }
  & .a-move .mk { font-family: var(--a-serif); font-weight: 600; font-size: 24px; color: #dbe2ec; letter-spacing: -0.01em; }
  & .a-move.hero .mk { color: #eafff4; }
  & .a-move .mtags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
  & .a-move .mtag { font-family: var(--a-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--mc); padding: 4px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--mc) 33%, transparent); }
  & .a-move .mhero { font-family: var(--a-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--a-market); }

  & .a-info { width: 360px; display: flex; flex-direction: column; justify-content: center; padding: 18px 24px;
    border-radius: 14px; background: rgba(13,20,32,0.66); border: 1px solid rgba(120,140,170,0.2); }
  & .a-info-top { display: flex; align-items: center; justify-content: space-between; }
  & .a-info-k { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.2em; color: var(--a-grow); }
  & .a-info-cash { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--a-muted); }
  & .a-info-desc { font-family: var(--a-sans); font-size: 15px; line-height: 1.55; color: #c4ccd9; margin: 10px 0 0; }
  & .a-info-stats { display: flex; gap: 22px; margin-top: 14px; }
  & .a-stat-lab { font-family: var(--a-mono); font-size: 9.5px; letter-spacing: 0.18em; color: var(--a-muted); }
  & .a-stat-val { font-family: var(--a-mono); font-size: 15px; margin-top: 3px; }

  /* mobile "MAKE YOUR PICK" CTA (locked improvement #8) */
  & .a-cta { display: none; }

  /* speech (Kurus reacts) */
  & .a-speech { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); z-index: 28;
    max-width: min(560px, 86vw); text-align: center; opacity: 0; pointer-events: none; transition: opacity .4s; }
  & .a-speech.show { opacity: 1; }
  & .a-speech .q { font-family: var(--a-serif); font-style: italic; font-weight: 500; font-size: clamp(15px, 2vw, 21px);
    line-height: 1.4; letter-spacing: -0.01em; text-shadow: 0 2px 22px rgba(0,0,0,0.6); color: #eef2f7; }
  & .a-speech .by { font-family: var(--a-mono); font-size: 9.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--a-muted); margin-top: 9px; }

  /* floating "−$X spread" cost (locked improvement #4) */
  & .a-spread-cost { position: absolute; z-index: 31; font-family: var(--a-mono); font-size: 13px; color: var(--a-crimson);
    text-shadow: 0 1px 6px rgba(0,0,0,0.6); pointer-events: none; }

  /* VS splash */
  & .a-vs { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(120% 90% at 50% 45%, rgba(20,25,34,0.4), rgba(8,10,14,0.94)); }
  & .a-vs-inner { position: relative; width: 100%; max-width: 760px; display: flex; align-items: center; justify-content: space-between; padding: 0 6vw; }
  & .a-vs-side { text-align: center; }
  & .a-vs-side .lab { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--a-muted); }
  & .a-vs-side .nm { font-family: var(--a-serif); font-weight: 500; font-size: clamp(26px, 5vw, 46px); letter-spacing: -0.02em; line-height: 1.04; margin-top: 8px; }
  & .a-vs-you .nm { color: var(--a-you); }
  & .a-vs-quant .nm { color: var(--a-quant); }
  & .a-vs-you .lab { color: var(--a-grow); }
  & .a-vs-quant .lab { color: var(--a-crimson); }
  & .a-vs-mark { font-family: var(--a-serif); font-style: italic; font-weight: 500; font-size: clamp(34px, 7vw, 72px); color: #eef2f7; position: relative; }
  & .a-vs-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 160%; height: 1px;
    background: linear-gradient(90deg, transparent, #324053, transparent); transform: translate(-50%, -50%) rotate(-18deg); z-index: -1; }
  & .a-vs-round { position: absolute; left: 0; right: 0; bottom: 13%; text-align: center; font-family: var(--a-mono);
    font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #aeb8c7; padding: 0 24px; line-height: 1.8; }

  /* reveal */
  & .a-reveal { position: absolute; inset: 0; z-index: 42; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 24px; opacity: 0; pointer-events: none;
    background: radial-gradient(120% 90% at 50% 45%, rgba(20,25,34,0.35), rgba(8,10,14,0.86)); }
  & .a-reveal.show { opacity: 1; pointer-events: auto; }
  & .a-reveal .verdict { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--a-muted); }
  & .a-reveal h1 { font-family: var(--a-serif); font-weight: 500; font-size: clamp(34px, 6vw, 62px); letter-spacing: -0.02em; line-height: 1.04; margin: 10px 0 4px; }
  & .a-reveal h1.win { color: var(--a-you); }
  & .a-reveal h1.lose { color: var(--a-quant); }
  & .a-reveal h1.tie { color: #aeb8c7; }
  & .a-reveal .score { font-family: var(--a-mono); font-size: 13px; color: #aeb8c7; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; margin-bottom: 14px; }
  & .a-reveal .cost { font-family: var(--a-mono); font-size: 12px; color: var(--a-market); letter-spacing: 0.06em; margin-bottom: 16px; }
  & .a-reveal .kq { font-family: var(--a-serif); font-style: italic; font-weight: 500; font-size: clamp(15px, 2vw, 19px); line-height: 1.5; max-width: 50ch; margin: 0 auto; color: #eef2f7; }
  & .a-reveal .kq em { font-style: normal; color: var(--a-you); }
  & .a-reveal .btns { display: flex; gap: 11px; margin-top: 26px; flex-wrap: wrap; justify-content: center; }
  & .a-reveal .a-btn { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; padding: 11px 18px;
    border-radius: 11px; border: 1px solid #324053; background: rgba(20,25,34,0.7); color: #eef2f7; cursor: pointer; transition: transform .14s, border-color .14s; }
  & .a-reveal .a-btn:hover { transform: translateY(-2px); }
  & .a-reveal .a-btn.primary { border-color: var(--a-you); color: var(--a-you); }

  /* device framing — corner brackets + vignette */
  & .a-brackets { position: absolute; inset: 0; pointer-events: none; z-index: 35; }
  & .a-brackets .vig { position: absolute; inset: 0; box-shadow: inset 0 0 200px rgba(0,0,0,0.6); }
  & .a-bracket { position: absolute; width: 34px; height: 34px; border-color: rgba(120,150,185,0.4); border-style: solid; }
  & .a-bracket.tl { left: 22px; top: 22px; border-width: 2px 0 0 2px; }
  & .a-bracket.tr { right: 22px; top: 22px; border-width: 2px 2px 0 0; }
  & .a-bracket.bl { left: 22px; bottom: 22px; border-width: 0 0 2px 2px; }
  & .a-bracket.br { right: 22px; bottom: 22px; border-width: 0 2px 2px 0; }

  /* controls (replay + motion toggle + close) */
  & .a-ctl { position: absolute; top: 26px; right: 30px; z-index: 44; display: flex; gap: 8px; }
  & .a-ctl button { font-family: var(--a-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
    color: #cfd8e6; background: rgba(10,16,26,0.6); border: 1px solid rgba(120,140,170,0.28); border-radius: 999px;
    padding: 7px 13px; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
  & .a-ctl button:hover { color: #fff; border-color: rgba(120,140,170,0.5); }
}

/* ═══ keyframes (lifted from btq-scene.jsx Backdrop) ═══ */
@keyframes btq-arena-drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-26px, -14px); } }
@keyframes btq-arena-spin  { to { transform: rotate(360deg); } }
@keyframes btq-arena-pulse { 0%, 100% { opacity: .5; transform: scale(1); } 50% { opacity: .9; transform: scale(1.06); } }

/* ═══ PORTRAIT (mobile) — a real vertical layout, not scaled desktop (locked #7,#8) ═══ */
#btq-root.btq-arena.portrait {
  /* world: Kurus upper-third on his platform, you + ONE chart lower-third */
  & .a-world { perspective: 1100px; perspective-origin: 50% 30%; }
  & .a-quant-anchor { top: 18%;
    transform: translate(-50%, 0) translateZ(-260px) scale(0.62); }
  & .a-monitors { left: 50%; bottom: auto; top: 52%; transform: translateX(-50%) translateZ(40px); gap: 0; }
  & .a-mon-wrap.left { transform: none; }
  & .a-mon-wrap.right { display: none; } /* mobile shows ONE dual-line chart */
  & .a-monitor { width: min(92vw, 460px); }

  /* HUD: stacked plates, no fixed left/right desktop coords */
  & .a-top { padding: 0 18px; height: 50px; }
  & .a-top-sub { display: none; }
  & .a-rules { top: 54px; font-size: 10px; }
  & .a-enemy { left: 14px; right: 14px; top: 92px; width: auto; }
  & .a-enemy.beside { left: 14px; }
  & .a-you { left: 14px; right: 14px; bottom: 132px; top: auto; width: auto; }
  & .a-plate { width: auto; }
  & .a-speech { top: 150px; }

  /* command tray collapses to ONE CTA → reveals a list (one tap = one action) */
  & .a-tray-inner { display: none; }
  & .a-cta { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 24px; }
  & .a-cta-btn { width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid rgba(94,200,216,0.5);
    background: rgba(94,200,216,0.12); color: #eaf8fb; font-family: var(--a-serif); font-weight: 600; font-size: 18px;
    letter-spacing: 0.02em; cursor: pointer; }
  & .a-cta-list { display: none; flex-direction: column; gap: 8px; }
  & .a-cta-list.open { display: flex; }
  & .a-cta-move { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 18px;
    border-radius: 12px; border: 1px solid rgba(120,140,170,0.22); background: rgba(13,20,32,0.7); color: #eef2f7; cursor: pointer; }
  & .a-cta-move.hero { border-color: rgba(84,208,138,0.5); background: rgba(84,208,138,0.10); }
  & .a-cta-move .mk { font-family: var(--a-serif); font-weight: 600; font-size: 18px; }
  & .a-cta-move .mtag { font-family: var(--a-mono); font-size: 9px; letter-spacing: 0.14em; color: var(--mc); }
}

/* ═══ reduced motion: no drift / pulse / orb float; snap to resting world ═══ */
@media (prefers-reduced-motion: reduce) {
  #btq-root.btq-arena .a-lines path,
  #btq-root.btq-arena .a-top-r .dot { animation: none !important; }
}
#btq-root.btq-arena.no-motion .a-lines path,
#btq-root.btq-arena.no-motion .a-top-r .dot { animation: none !important; }

/* ═══ capture mode (9:16 shorts): hide chrome, force portrait resting frame (locked #10) ═══ */
.capture-mode #btq-root.btq-arena .a-ctl,
.capture-mode #btq-root.btq-arena .a-brackets { display: none; }
