:root {
  --vermilion: #c9261b;
  --vermilion-dark: #8e150d;
  --vermilion-light: #e54335;
  --cream: #f6edd9;
  --cream-deep: #e6d7b8;
  --cobalt: #174a8b;
  --marigold: #e89b1e;
  --steel-dark: #1d232c;
  --steel-mid: #4a5362;
  --steel-light: #c8cfd9;
  --led-red: #ff2a1c;
  --led-bg: #170505;
  --ekyc-bg: #0b0f17;
  --ekyc-surface: #121926;
  --ekyc-border: #253248;
  --ekyc-emerald: #19e68c;
  --ekyc-cyan: #38d9ff;
  --ekyc-amber: #ffbe3b;
  --ekyc-crimson: #ff4d4d;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 18%, #2a3346 0%, #121620 68%, #090b10 100%);
  color: #1c1917;
  font-family: "M PLUS Rounded 1c", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  user-select: none;
  -webkit-user-select: none;
}

body:not(.is-ekyc-open) {
  height: 100dvh;
  overflow: hidden;
}

body.is-ekyc-open {
  min-height: 100dvh;
  overflow-y: auto;
}

.rooftop-stage {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: max(4px, env(safe-area-inset-top)) 6px max(4px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}

body:not(.is-ekyc-open) .rooftop-stage {
  height: 100dvh;
  justify-content: space-between;
}

/* ==================== SHEET-METAL CABINET CHASSIS ==================== */
.cabinet-chassis {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 920px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(108deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 28%),
    linear-gradient(180deg, var(--vermilion-light) 0%, var(--vermilion) 14%, var(--vermilion) 86%, var(--vermilion-dark) 100%);
  border: 3px solid #590c06;
  border-radius: 18px 18px 12px 12px;
  padding: 7px 8px 6px;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.68),
    inset 0 2px 2px rgba(255, 218, 198, 0.45),
    inset 0 -3px 6px rgba(58, 6, 2, 0.7);
  transform-origin: 50% 92%;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

body.is-ekyc-open .cabinet-chassis {
  height: min(92dvh, 840px);
  flex-shrink: 0;
}

/* Iconic ZUKO Cabinet Tilt & Shake */
.cabinet-chassis.is-zuko-tilt {
  animation: cabinetZukoTilt 0.78s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes cabinetZukoTilt {
  0% { transform: rotate(0deg) translateY(0); }
  14% { transform: rotate(-4.2deg) translateY(7px); }
  30% { transform: rotate(2.4deg) translateY(4px); }
  48% { transform: rotate(-3.1deg) translateY(6px); }
  72% { transform: rotate(-1.5deg) translateY(3px); }
  100% { transform: rotate(0deg) translateY(0); }
}

.cabinet-chassis.is-fever-glow {
  box-shadow:
    0 0 38px rgba(255, 208, 42, 0.65),
    0 18px 44px rgba(0, 0, 0, 0.68),
    inset 0 2px 3px rgba(255, 244, 180, 0.8);
}

/* Corner Hex Bolts */
.chassis-bolt {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #eef2f7, #7a8391 65%, #2f3540 100%);
  border: 1px solid #2b0805;
  z-index: 4;
}
.bolt-tl { top: 6px; left: 6px; }
.bolt-tr { top: 6px; right: 6px; }
.bolt-bl { bottom: 6px; left: 6px; }
.bolt-br { bottom: 6px; right: 6px; }

/* ==================== 1. TOP MARQUEE ==================== */
.cabinet-marquee {
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(180deg, #fffdf4 0%, #ffe89e 54%, #ffc845 100%);
  border: 2.5px solid #6e150a;
  border-radius: 11px 11px 6px 6px;
  padding: 4px 10px 5px;
  overflow: hidden;
  box-shadow:
    inset 0 0 14px rgba(255, 136, 0, 0.45),
    0 2px 5px rgba(0, 0, 0, 0.32);
}

.marquee-lamp-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 240, 0.72), transparent 72%);
  pointer-events: none;
}

.marquee-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.marquee-sub {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #7c180c;
  line-height: 1.1;
}

.marquee-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 1px;
}

.marquee-title {
  margin: 0;
  font-size: clamp(16px, 4.6vw, 21px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #b8170c;
  text-shadow: 1px 1px 0 #fff9db, 0 2px 0 rgba(92, 18, 8, 0.25);
  line-height: 1.15;
}

.marquee-pill {
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  background: #174a8b;
  color: #fff9e6;
  border: 1px solid #0d2c56;
  white-space: nowrap;
}

.marquee-pill-fever {
  background: #c9261b;
  border-color: #6b0f08;
}

/* ==================== 2. CREAM SILK-SCREENED FACEPLATE ==================== */
.cabinet-faceplate {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 5px;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(180, 146, 94, 0.03) 0px,
      rgba(180, 146, 94, 0.03) 2px,
      transparent 2px,
      transparent 4px
    ),
    linear-gradient(180deg, var(--cream) 0%, #efe2c4 100%);
  border: 2.5px solid #69180d;
  border-radius: 9px;
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  box-shadow: inset 0 1px 4px rgba(85, 52, 15, 0.25);
}

/* Scoreboard Row: 2x 7-Segment LEDs + Circular 12-Bulb Roulette */
.scoreboard-row {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #f9f3e5 0%, #e7d6b5 100%);
  border: 1.5px solid #c5ae87;
  border-radius: 8px;
  padding: 4px 6px;
}

.led-module {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.led-caption {
  font-size: 9.5px;
  font-weight: 900;
  color: #5b2214;
  letter-spacing: 0.06em;
}

.led-window {
  background: var(--led-bg);
  border: 2px solid #484f5c;
  border-radius: 5px;
  padding: 2px 5px;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.9),
    0 1px 0 rgba(255, 255, 255, 0.65);
  width: 78px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seven-seg-svg {
  width: 100%;
  height: 100%;
}

.seg-poly.is-dim {
  fill: rgba(255, 42, 28, 0.10);
}

.seg-poly.is-lit {
  fill: var(--led-red);
  filter: drop-shadow(0 0 3px rgba(255, 52, 30, 0.85));
}

.led-unit {
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5px;
  font-weight: 800;
  color: #6b583d;
  letter-spacing: 0.08em;
}

.sound-metal-btn {
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 800;
  font-family: inherit;
  color: #222934;
  background: linear-gradient(180deg, #f3f5f8 0%, #c6cdd8 100%);
  border: 1px solid #596273;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.sound-metal-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #505764 0%, #313742 100%);
  color: #cbd5e1;
}

.icon-svg {
  width: 12px;
  height: 12px;
}

/* 12-Bulb Circular Incandescent Roulette */
.roulette-wheel-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, #1c2432 0%, #0f141d 68%, #c9261b 70%, #8f160e 100%);
  border: 2.5px solid #495262;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 0 8px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.roulette-ring {
  position: absolute;
  inset: 0;
}

.roulette-bulb {
  position: absolute;
  width: 17px;
  height: 17px;
  margin-left: -8.5px;
  margin-top: -8.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #665544, #2a211b 80%);
  border: 1.2px solid #8a7b6a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 7.5px;
  font-weight: 800;
  color: rgba(255, 245, 220, 0.55);
  transition: transform 0.06s ease, background 0.06s ease, box-shadow 0.06s ease;
}

.roulette-bulb[data-medals="20"] {
  border-color: #ffd343;
  color: #ffe885;
}

.roulette-bulb.is-active {
  transform: scale(1.24);
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ffe85e 45%, #ff8800 100%);
  color: #3d1200;
  border-color: #fffbe0;
  box-shadow: 0 0 10px 3px rgba(255, 200, 36, 0.92);
  z-index: 2;
}

.roulette-bulb[data-medals="20"].is-active {
  background: radial-gradient(circle at 35% 35%, #ffffff 0%, #ff6347 45%, #d90429 100%);
  color: #ffffff;
  box-shadow: 0 0 13px 4px rgba(255, 68, 42, 0.98);
}

.roulette-center-hub {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #283347 0%, #111622 100%);
  border: 1.5px solid #d4af37;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.05;
}

.hub-top {
  font-size: 6.5px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.08em;
}

.hub-val {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 900;
  color: #fff7cc;
}

.hub-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 6px;
  color: #94a3b8;
}

/* ==================== 3. METALLIC CRT / HALF-MIRROR CAMERA WINDOW ==================== */
.crt-bezel-outer {
  flex: 1 1 auto;
  min-height: 195px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #525c6d 0%, #272e3a 45%, #171b24 100%);
  border: 2.5px solid #12161d;
  border-radius: 11px;
  padding: 4px 5px 5px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    0 3px 8px rgba(0, 0, 0, 0.36);
}

.crt-instruction-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 9.5px;
  font-weight: 800;
  color: #e2e8f0;
  padding-bottom: 3px;
  letter-spacing: 0.03em;
}

.strip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fbbf24;
}

.crt-screen {
  position: relative;
  flex: 1 1 auto;
  min-height: 170px;
  border-radius: 9px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 55%, #1c2838 0%, #0b1018 100%);
  border: 2px solid #090c12;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.85);
}

/* Mirrored In-Camera Video */
.crt-camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  filter: contrast(1.05) saturate(1.08);
}

.crt-standby-guide {
  position: absolute;
  inset: 58px 12px 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.35s ease;
}

.crt-standby-guide.is-camera-live {
  opacity: 0;
}

.standby-guide-svg {
  width: 100%;
  max-width: 310px;
  height: auto;
}

/* Subtle Retro Scanlines & Curved Glass Sheen */
.crt-scanlines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 34%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.16) 0px,
      rgba(0, 0, 0, 0.16) 1px,
      transparent 1px,
      transparent 3px
    );
  pointer-events: none;
  z-index: 2;
}

.crt-shutter-flash {
  position: absolute;
  inset: 0;
  background: rgba(255, 250, 210, 0.72);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

.crt-shutter-flash.is-flashing {
  animation: shutterFlashAnim 0.22s ease-out;
}

@keyframes shutterFlashAnim {
  0% { opacity: 0.78; }
  100% { opacity: 0; }
}

/* JEV Bounding Box Lock-On Reticles */
.jev-reticle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.jev-box-reticle {
  position: absolute;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.jev-box-reticle.is-hidden {
  opacity: 0;
  transform: scale(1.12);
}

.reticle-hand {
  border: 1.5px dashed rgba(25, 230, 140, 0.85);
  background: rgba(25, 230, 140, 0.09);
  box-shadow: 0 0 12px rgba(25, 230, 140, 0.35);
}

.reticle-face {
  border: 1.5px dashed rgba(56, 217, 255, 0.85);
  background: rgba(56, 217, 255, 0.08);
  box-shadow: 0 0 12px rgba(56, 217, 255, 0.35);
}

.reticle-corner {
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: #ffe659;
  border-style: solid;
}
.rc-tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; }
.rc-tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; }
.rc-bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; }
.rc-br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; }

.reticle-tag {
  position: absolute;
  top: -19px;
  left: 0;
  padding: 1px 6px;
  border-radius: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
  background: rgba(10, 15, 24, 0.90);
  color: #19e68c;
  border: 1px solid rgba(25, 230, 140, 0.7);
}

.reticle-face .reticle-tag {
  color: #38d9ff;
  border-color: rgba(56, 217, 255, 0.7);
}

/* Top HUD inside CRT */
.crt-top-hud {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  z-index: 6;
  pointer-events: none;
}

.ai-rival-card {
  width: clamp(98px, 28%, 124px);
  background: rgba(12, 17, 28, 0.84);
  border: 1.5px solid rgba(246, 237, 217, 0.55);
  border-radius: 8px;
  padding: 3px;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.ai-sprite-stage {
  width: 100%;
  aspect-ratio: 140 / 108;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-vector-svg {
  width: 100%;
  height: 100%;
}

.anim-bob {
  animation: aiBobAnim 0.42s infinite alternate ease-in-out;
}

@keyframes aiBobAnim {
  from { transform: translateY(0px); }
  to { transform: translateY(-4px); }
}

.anim-pop {
  animation: aiPopAnim 0.2s cubic-bezier(0.18, 1.3, 0.4, 1);
}

@keyframes aiPopAnim {
  from { transform: scale(0.76); opacity: 0.5; }
  to { transform: scale(1); opacity: 1; }
}

.turn-guidance-box {
  flex: 1;
  background: rgba(11, 16, 26, 0.80);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 8px;
  padding: 5px 8px;
  color: #f8fafc;
  backdrop-filter: blur(4px);
}

.jev-live-lamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  color: #94a3b8;
}

.lamp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
}

.lamp-dot.is-online {
  background: #19e68c;
  box-shadow: 0 0 7px #19e68c;
}

.guidance-main {
  margin: 2px 0 1px;
  font-size: clamp(11px, 3vw, 12.5px);
  font-weight: 800;
  color: #fffbeb;
  line-height: 1.25;
}

.guidance-sub {
  margin: 0;
  font-size: 9.5px;
  color: #cbd5e1;
  line-height: 1.2;
}

/* Center Drama Stamp */
.crt-drama-stamp {
  position: absolute;
  left: 50%;
  top: 54%;
  transform: translate(-50%, -50%) rotate(-5deg);
  z-index: 7;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(18, 10, 12, 0.90);
  border: 3px solid #ffbe3b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  text-align: center;
}

.crt-drama-stamp.is-hidden {
  display: none;
}

.crt-drama-stamp.is-zuko {
  border-color: #ff4d4d;
}

.crt-drama-stamp.is-fever {
  border-color: #ffe853;
  background: rgba(155, 18, 10, 0.92);
}

.stamp-text {
  font-family: "DotGothic16", monospace;
  font-size: clamp(18px, 5.2vw, 25px);
  font-weight: 900;
  color: #ffe853;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Bottom Rhythm HUD */
.crt-rhythm-hud {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 13, 22, 0.86);
  border: 1.5px solid rgba(255, 224, 130, 0.45);
  border-radius: 7px;
  padding: 4px 9px;
  pointer-events: none;
}

.beat-lamps {
  display: flex;
  align-items: center;
  gap: 5px;
}

.beat-lamp {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #27303f;
  border: 1.5px solid #526077;
}

.beat-lamp.is-lit {
  background: #ffbe3b;
  border-color: #fffbeb;
  box-shadow: 0 0 8px #ffbe3b;
}

.beat-lamp-shutter.is-lit {
  background: #ff3828;
  border-color: #fff0ed;
  box-shadow: 0 0 11px #ff3828;
}

.callout-banner {
  flex: 1;
  font-family: "DotGothic16", monospace;
  font-size: clamp(13px, 3.8vw, 16px);
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.05em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Manual Fallback Arcade Buttons */
.manual-fallback-deck {
  flex-shrink: 0;
  margin-top: 4px;
  padding: 5px 6px;
  background: #141a24;
  border: 1px solid #3c475c;
  border-radius: 7px;
}

.manual-fallback-deck.is-hidden,
.manual-btn-group.is-hidden {
  display: none;
}

.manual-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  color: #cbd5e1;
  margin-bottom: 4px;
}

.manual-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5px;
  font-weight: 800;
  color: #fbbf24;
}

.manual-btn-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
  gap: 5px;
}

.arcade-push-btn {
  padding: 6px 4px;
  border-radius: 6px;
  border: 2px solid #0f141d;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 3px 0 #0b0f17;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

.arcade-push-btn:active,
.arcade-push-btn.is-selected {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #0b0f17;
  outline: 2px solid #fff59d;
}

.btn-red { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.btn-blue { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.btn-yellow { background: linear-gradient(180deg, #f59e0b, #b45309); }
.btn-green { background: linear-gradient(180deg, #10b981, #047857); }

/* ==================== 4. COIN INSERT & ACTION DECK ==================== */
.coin-action-deck {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding-top: 1px;
}

.rule-micro-plate {
  flex: 1;
  background: #efe1c1;
  border: 1px solid #bfa77a;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 9.5px;
  font-weight: 800;
  color: #3f2b14;
  line-height: 1.35;
}

.micro-plate-line + .micro-plate-line {
  margin-top: 2px;
}

.plate-tag {
  display: inline-block;
  padding: 0 4px;
  border-radius: 3px;
  background: #b91c1c;
  color: #fff8eb;
  font-size: 8.5px;
  margin-right: 2px;
}

.plate-tag-atk {
  background: #174a8b;
}

/* Die-Cast Zinc Coin Slot Start Button */
.coin-mech-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 2px solid #591109;
  background: linear-gradient(180deg, #ffd84a 0%, #f59e0b 52%, #d97706 100%);
  color: #2b0d04;
  font-family: inherit;
  cursor: pointer;
  box-shadow:
    0 3px 0 #78350f,
    0 5px 10px rgba(0, 0, 0, 0.28),
    inset 0 1px 1px rgba(255, 255, 255, 0.75);
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}

.coin-mech-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.coin-mech-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #78350f;
}

.coin-mech-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.coin-slot-slit {
  width: 6px;
  height: 26px;
  border-radius: 3px;
  background: #18181b;
  border: 1.5px solid #d4d4d8;
  box-shadow: inset 0 1px 3px #000;
}

.coin-btn-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.coin-btn-top {
  font-size: 9px;
  font-weight: 900;
  color: #6b2106;
}

.coin-btn-main {
  font-size: 13.5px;
  font-weight: 900;
  color: #1f0a03;
}

/* ==================== 5. STAINLESS-STEEL MEDAL TRAY ==================== */
.medal-tray-section {
  flex-shrink: 0;
  margin-top: 5px;
  background: linear-gradient(180deg, #353d4b 0%, #8e98a8 18%, #cfd6e0 42%, #6d7787 100%);
  border: 2px solid #1f252e;
  border-radius: 7px 7px 10px 10px;
  padding: 3px 6px 5px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6);
}

.medal-chute-lip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 2px;
}

.chute-slot {
  width: 54px;
  height: 6px;
  border-radius: 3px;
  background: #090c11;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.chute-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 8.5px;
  font-weight: 800;
  color: #18202c;
  letter-spacing: 0.05em;
}

.stainless-pan {
  height: 46px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04) 0px,
      rgba(255, 255, 255, 0.04) 2px,
      transparent 2px,
      transparent 5px
    ),
    linear-gradient(180deg, #1b2029 0%, #2d3543 52%, #475264 100%);
  border: 1.5px solid #14181f;
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.medal-physics-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==================== 6. SERVICE BAR & MODE TOGGLE ==================== */
.cabinet-service-bar {
  flex-shrink: 0;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 4px 0;
}

.ekyc-toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(12, 16, 24, 0.88);
  border: 1px solid rgba(255, 232, 180, 0.42);
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
}

.switch-bracket {
  color: #64748b;
}

.switch-label-prefix {
  color: #cbd5e1;
}

.switch-state {
  padding: 1px 4px;
  border-radius: 3px;
  color: #94a3b8;
}

.switch-state.is-active {
  background: #19e68c;
  color: #062216;
  font-weight: 800;
}

.service-right-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.service-link-btn {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
}

.privacy-pill {
  font-size: 8.5px;
  font-weight: 800;
  color: #fde68a;
  letter-spacing: 0.02em;
}

/* ==================== EXPANDABLE DARK LIVENESS eKYC TELEMETRY PANEL ==================== */
.ekyc-proof-panel {
  width: 100%;
  margin-top: 10px;
  margin-bottom: 24px;
  background: var(--ekyc-bg);
  border: 1.5px solid var(--ekyc-border);
  border-radius: 12px;
  color: #e2e8f0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.ekyc-proof-panel.is-collapsed {
  display: none;
}

.ekyc-panel-inner {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ekyc-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--ekyc-border);
  padding-bottom: 10px;
}

.ekyc-eyebrow {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ekyc-cyan);
  letter-spacing: 0.08em;
}

.ekyc-title {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 800;
  color: #f8fafc;
}

.ekyc-header-actions {
  display: flex;
  gap: 6px;
}

.ekyc-diag-btn,
.ekyc-copy-btn {
  padding: 5px 9px;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
}

.ekyc-diag-btn {
  border-color: rgba(56, 217, 255, 0.5);
  color: var(--ekyc-cyan);
}

.human-pass-card {
  background: var(--ekyc-surface);
  border: 1.5px solid #334155;
  border-radius: 10px;
  padding: 11px 12px;
}

.human-pass-card.is-verified {
  border-color: var(--ekyc-emerald);
  background: linear-gradient(180deg, rgba(25, 230, 140, 0.11) 0%, rgba(18, 25, 38, 0.96) 100%);
}

.human-pass-card.is-rejected {
  border-color: var(--ekyc-crimson);
  background: linear-gradient(180deg, rgba(255, 77, 77, 0.11) 0%, rgba(18, 25, 38, 0.96) 100%);
}

.pass-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pass-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ekyc-amber);
}

.human-pass-card.is-verified .pass-indicator-dot {
  background: var(--ekyc-emerald);
  box-shadow: 0 0 10px var(--ekyc-emerald);
}

.human-pass-card.is-rejected .pass-indicator-dot {
  background: var(--ekyc-crimson);
  box-shadow: 0 0 10px var(--ekyc-crimson);
}

.pass-badge-title {
  flex: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  color: #f8fafc;
}

.human-pass-card.is-verified .pass-badge-title {
  color: var(--ekyc-emerald);
}

.pass-latency-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #0f172a;
  border: 1px solid #334155;
  color: var(--ekyc-cyan);
}

.pass-desc {
  margin: 6px 0 8px;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
}

.ekyc-gates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.gate-chip {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  background: #0f172a;
  border: 1px solid #334155;
  color: #64748b;
}

.gate-chip.is-pass {
  border-color: rgba(25, 230, 140, 0.65);
  color: var(--ekyc-emerald);
  background: rgba(25, 230, 140, 0.08);
}

.gate-chip.is-fail {
  border-color: rgba(255, 77, 77, 0.65);
  color: var(--ekyc-crimson);
  background: rgba(255, 77, 77, 0.08);
}

.sha-hash-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #080c14;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 6px 8px;
}

.sha-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  color: #64748b;
}

.sha-code {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #e2e8f0;
  word-break: break-all;
}

.ekyc-phases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 520px) {
  .ekyc-phases-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.telemetry-card {
  background: var(--ekyc-surface);
  border: 1px solid var(--ekyc-border);
  border-radius: 9px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.telemetry-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 5px;
}

.phase-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--ekyc-amber);
}

.latency-mono,
.conf-mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: var(--ekyc-cyan);
}

.primitive-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prim-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.prim-label-row code {
  font-family: "JetBrains Mono", monospace;
  color: #f8fafc;
}

.prob-bars-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prob-row {
  display: grid;
  grid-template-columns: 118px 1fr 38px;
  align-items: center;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
}

.prob-key {
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prob-row.is-winner .prob-key {
  color: var(--ekyc-emerald);
  font-weight: 800;
}

.prob-track {
  height: 7px;
  border-radius: 999px;
  background: #090d16;
  border: 1px solid #1e293b;
  overflow: hidden;
}

.prob-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #38d9ff);
  transition: width 0.24s ease;
}

.prob-row.is-winner .prob-fill {
  background: linear-gradient(90deg, #10b981, #19e68c);
}

.prob-val {
  text-align: right;
  color: #cbd5e1;
}

.box-coord-readout {
  display: block;
  background: #080c14;
  border: 1px solid #1e293b;
  border-radius: 5px;
  padding: 5px 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: #a5f3fc;
}

.zero-retention-footer {
  font-family: "JetBrains Mono", monospace;
  font-size: 9.5px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid #1e293b;
  padding-top: 8px;
}

/* Compact adjustments for smaller phone viewports (e.g. iPhone SE 667px) */
@media (max-height: 720px) {
  .roulette-wheel-wrap {
    width: 76px;
    height: 76px;
  }
  .roulette-bulb {
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    font-size: 6.5px;
  }
  .roulette-center-hub {
    width: 36px;
    height: 36px;
  }
  .stainless-pan {
    height: 36px;
  }
  .rule-micro-plate {
    font-size: 8.5px;
    padding: 3px 5px;
  }
}
