  :root {
    --play: #8b3dff; --play-bg: #f3ebff; --primary: #0040c0;
    --ink: #0a0e1a; --ink-2: #10182b; --green: #00b377; --gold: #fbbf24;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html, body { height: 100%; background: var(--ink); font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif; color: #fff; overflow: hidden; }
  .stage { position: relative; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,61,255,.18), transparent 60%), var(--ink); }
  .cabinet { position: relative; width: min(92vw, 900px, calc(88dvh * 4 / 3)); aspect-ratio: 4 / 3; background: var(--ink-2); border-radius: 22px; overflow: hidden;
    box-shadow: 0 24px 80px rgba(139,61,255,.22), 0 0 0 1px rgba(255,255,255,.06); }
  video { display: none; }
  canvas#view { width: 100%; height: 100%; display: block; transform: scaleX(-1); }
  .hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: linear-gradient(180deg, rgba(10,14,26,.75), transparent); pointer-events: none; z-index: 5; }
  .pill { display: inline-flex; align-items: center; gap: 8px; background: rgba(10,14,26,.65); backdrop-filter: blur(6px);
    padding: 8px 14px; border-radius: 100px; font-size: 13px; font-weight: 700; border: 1px solid rgba(255,255,255,.1); }
  .pill b { font-family: 'JetBrains Mono', monospace; font-size: 15px; color: var(--gold); }
  .pill .t-num { color: #fff; }
  .pill.time-low b, .pill.time-low .t-num { color: #ff6b6b; }
  .brand-tag { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,.55); }
  .brand-mark { width: 20px; height: 20px; border-radius: 6px; background: linear-gradient(135deg, var(--primary), var(--play)); display: grid; place-items: center; font-size: 10px; font-weight: 800; }
  .overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column;
    text-align: center; padding: 32px; background: rgba(10,14,26,.82); backdrop-filter: blur(4px); z-index: 10; }
  .overlay.hidden { display: none; }
  .overlay .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--play-bg); color: var(--play);
    padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; margin-bottom: 18px; }
  .overlay h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
  .overlay p { font-size: 14.5px; color: rgba(255,255,255,.68); max-width: 420px; line-height: 1.7; margin-bottom: 26px; }
  .overlay .score-big { font-family: 'JetBrains Mono', monospace; font-size: 56px; font-weight: 800; color: var(--gold); margin-bottom: 6px; line-height: 1; }
  .overlay .score-label { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 28px; }
  .btn { display: inline-flex; align-items: center; gap: 8px; background: var(--play); color: #fff; padding: 14px 30px; border-radius: 10px;
    font-weight: 700; font-size: 15px; border: none; cursor: pointer; box-shadow: 0 10px 30px rgba(139,61,255,.35); transition: all .15s ease; font-family: inherit; }
  .btn:hover { background: #7527e6; transform: translateY(-1px); }
  .btn:disabled { opacity: .5; cursor: default; transform: none; }
  .err { color: #ff8080; font-size: 13px; margin-top: 16px; max-width: 380px; }
  .countdown-num { font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 96px; color: #fff; text-shadow: 0 0 40px rgba(139,61,255,.8); }
  footer.note { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: rgba(255,255,255,.35); }
  @media (max-width: 600px), (max-height: 600px) {
    .overlay { position: fixed; inset: 12px; padding: 24px 16px; border-radius: 18px; overflow-y: auto; justify-content: flex-start; }
    .overlay > * { flex-shrink: 0; }
    .overlay > :first-child { margin-top: auto; }
    .overlay > :last-child { margin-bottom: auto; }
  }
