/* ══════════════════════════════════════════════════════════════════════
   QTE FINISHER BENCHMARK STYLESHEET (style.css)
   Adheres to ReflexBench Assessment Development Specification
   ══════════════════════════════════════════════════════════════════════ */

:root {
  --test-accent: #00f0ff;
  --test-accent-soft: rgba(0, 240, 255, 0.12);
  --test-accent-border: rgba(0, 240, 255, 0.3);
  --arena-bg: #060912;
  --arena-border: rgba(0, 240, 255, 0.2);
}

html.light {
  --arena-bg: radial-gradient(circle at 50% 50%, #f8fafc 0%, #f1f5f9 70%, #e2e8f0 100%);
  --arena-border: rgba(148, 163, 184, 0.35);
}

/* ── FULLSCREEN FIT-TO-SCREEN ARENA DURING GAMEPLAY (FLICK ACCURACY STYLE) ── */
body:has(#panelTask.active) {
  overflow: hidden !important;
}

body:has(#panelTask.active) header.panda-header,
body:has(#panelTask.active) .panda-nav,
body:has(#panelTask.active) footer.panda-footer,
body:has(#panelTask.active) .t-ambient-glow,
body:has(#panelTask.active) .t-seo-container,
body:has(#panelTask.active) .t-nav {
  display: none !important;
}

body:has(#panelTask.active) .t-shell {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body:has(#panelTask.active) .t-card {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: #060912 !important;
  box-shadow: none !important;
  z-index: 9999 !important;
  overflow: hidden !important;
}

body:has(#panelTask.active) #panelTask,
body:has(#panelTask.active) .t-task {
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  overflow: hidden !important;
}

/* ── MINIMALIST TOP HUD: TIMER & RESTART ONLY (FLICK ACCURACY 1:1) ── */
.top-header {
  position: absolute;
  top: 14px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 30;
  pointer-events: none;
  font-family: var(--font-m, 'JetBrains Mono', monospace);
}

.top-header .round-pill,
.top-header .header-actions,
.top-header .restart-pill {
  pointer-events: auto;
}

.round-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(13, 18, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--test-accent, #f59e0b);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--test-accent, #f59e0b);
  animation: pulseDot 1.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.25); opacity: 1; }
}

#level {
  margin: 0;
  font-family: var(--font-m, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
}

.restart-pill {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(12px);
  transition: all 0.15s ease;
}

.restart-pill:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

/* ── Tactical Animated Visual Preview Box on Intro Screen ── */
.qte-preview-box {
  width: 100%;
  max-width: 440px;
  height: 184px;
  margin: 16px auto 10px;
  background: #060912;
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 12px;
  box-shadow: inset 0 0 28px rgba(0, 240, 255, 0.06), 0 8px 24px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

/* Subtle cyber crosshair background */
.preview-ambient-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.preview-grid-h {
  position: absolute;
  left: 0; right: 0;
  top: 46%;
  height: 1px;
  background: rgba(0, 240, 255, 0.12);
}

.preview-grid-v {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(0, 240, 255, 0.12);
}

.preview-radar-circle {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 1px dashed rgba(0, 240, 255, 0.1);
  border-radius: 50%;
}

/* Floating Feedback Tag */
.preview-feedback-tag {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #00f0ff;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.8);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  white-space: nowrap;
  animation: pFeedbackCycle 5s linear infinite;
}

/* Target Action Node & Approaching Urgency Rings */
.preview-prompt-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  margin-top: 4px;
}

.preview-urgency-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.p-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 2;
}

.p-ring-progress {
  fill: none;
  stroke: #00f0ff;
  stroke-width: 2.5;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  stroke-dasharray: 276.4;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.6));
  animation: pRingProgressCycle 5s linear infinite;
}

.p-ring-contract {
  fill: none;
  stroke: rgba(0, 240, 255, 0.8);
  stroke-width: 2;
  stroke-dasharray: 4 4;
  transform-origin: center;
  animation: pRingContractCycle 5s linear infinite;
}

.preview-center-node {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #131c2e 0%, #0a0f1a 100%);
  border: 2.5px solid #00f0ff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.3), inset 0 0 10px rgba(0, 240, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  animation: pNodePulseCycle 5s linear infinite;
}

.preview-label-group {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.preview-label-group.group-1 {
  animation: pLabelGroup1Cycle 5s linear infinite;
}

.preview-label-group.group-2 {
  animation: pLabelGroup2Cycle 5s linear infinite;
}

.preview-key-txt {
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1;
}

.preview-sub-txt {
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 0.52rem;
  font-weight: 700;
  color: #00f0ff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

/* Simulated Sequence Breadcrumb Track */
.preview-chain-track {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(13, 18, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  z-index: 5;
}

.p-chip {
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 0.68rem;
  font-weight: 700;
  background: #141c28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #64748b;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.p-chip.chip-1 {
  animation: pChip1Cycle 5s linear infinite;
}

.p-chip.chip-2 {
  animation: pChip2Cycle 5s linear infinite;
}

.p-arrow {
  color: #334155;
  font-size: 0.65rem;
}

.qte-preview-caption {
  font-size: 0.85rem;
  color: var(--color-text-dim, #94a3b8);
  margin-top: 8px;
  text-align: center;
}

/* ── Preview Keyframe Animations (5.0s Linear Loop) ── */
@keyframes pFeedbackCycle {
  0%, 35% { opacity: 0; transform: translate(-50%, 4px) scale(0.9); }
  38% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  44% { opacity: 0; transform: translate(-50%, -8px) scale(1); }
  45%, 85% { opacity: 0; transform: translate(-50%, 4px) scale(0.9); }
  88% { opacity: 1; transform: translate(-50%, 0) scale(1.08); }
  94% { opacity: 0; transform: translate(-50%, -8px) scale(1); }
  95%, 100% { opacity: 0; transform: translate(-50%, 4px) scale(0.9); }
}

@keyframes pRingContractCycle {
  0% { transform: scale(1.35); opacity: 0.75; }
  38% { transform: scale(0.82); opacity: 1; }
  39% { transform: scale(0.82); opacity: 0; }
  40%, 49% { transform: scale(1.35); opacity: 0; }
  50% { transform: scale(1.35); opacity: 0.75; }
  88% { transform: scale(0.82); opacity: 1; }
  89% { transform: scale(0.82); opacity: 0; }
  90%, 100% { transform: scale(1.35); opacity: 0; }
}

@keyframes pRingProgressCycle {
  0% { stroke-dashoffset: 0; opacity: 1; }
  38% { stroke-dashoffset: 276; opacity: 1; }
  39% { stroke-dashoffset: 276; opacity: 0; }
  40%, 49% { stroke-dashoffset: 0; opacity: 0; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  88% { stroke-dashoffset: 276; opacity: 1; }
  89% { stroke-dashoffset: 276; opacity: 0; }
  90%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes pNodePulseCycle {
  0%, 36% { transform: scale(1); box-shadow: 0 0 16px rgba(0, 240, 255, 0.3); border-color: #00f0ff; }
  38% { transform: scale(0.92); box-shadow: 0 0 28px rgba(0, 240, 255, 0.85); border-color: #ffffff; }
  41%, 86% { transform: scale(1); box-shadow: 0 0 16px rgba(0, 240, 255, 0.3); border-color: #00f0ff; }
  88% { transform: scale(0.92); box-shadow: 0 0 28px rgba(0, 240, 255, 0.85); border-color: #ffffff; }
  91%, 100% { transform: scale(1); box-shadow: 0 0 16px rgba(0, 240, 255, 0.3); border-color: #00f0ff; }
}

@keyframes pLabelGroup1Cycle {
  0%, 45% { opacity: 1; transform: scale(1); }
  48%, 100% { opacity: 0; transform: scale(0.85); }
}

@keyframes pLabelGroup2Cycle {
  0%, 47% { opacity: 0; transform: scale(0.85); }
  50%, 95% { opacity: 1; transform: scale(1); }
  98%, 100% { opacity: 0; transform: scale(0.85); }
}

@keyframes pChip1Cycle {
  0%, 37% {
    background: rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    transform: scale(1.06);
  }
  38%, 97% {
    background: rgba(34, 197, 94, 0.18);
    border-color: #22c55e;
    color: #86efac;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.25);
    transform: scale(1);
  }
  98%, 100% {
    background: rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    transform: scale(1.06);
  }
}

@keyframes pChip2Cycle {
  0%, 48% {
    background: #141c28;
    border-color: rgba(255, 255, 255, 0.12);
    color: #64748b;
    box-shadow: none;
    transform: scale(1);
  }
  50%, 87% {
    background: rgba(0, 240, 255, 0.2);
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    transform: scale(1.06);
  }
  88%, 97% {
    background: rgba(34, 197, 94, 0.18);
    border-color: #22c55e;
    color: #86efac;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.25);
    transform: scale(1);
  }
  98%, 100% {
    background: #141c28;
    border-color: rgba(255, 255, 255, 0.12);
    color: #64748b;
    box-shadow: none;
    transform: scale(1);
  }
}

/* ══════════════════════════════════════════════════════════════════════
   QTE ACTION ARENA
   ══════════════════════════════════════════════════════════════════════ */
/* Arena Container - Fills Entire Viewport (Flick Accuracy Style) */
.qte-arena {
  position: absolute !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background-color: #060912 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  user-select: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Subtle Vignette Overlay */
.qte-arena::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(4, 7, 13, 0.75) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ── Combo Chain Breadcrumb Track (Floating Pill) ── */
.combo-chain-track {
  position: absolute;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  z-index: 10;
  padding: 8px 18px;
  background: rgba(13, 18, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  width: auto;
  max-width: 90vw;
  box-sizing: border-box;
}

.chain-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #141c28;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap !important;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.chain-step-chip.completed {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.5);
  color: #86efac;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.2);
}

.chain-step-chip.active {
  background: rgba(0, 240, 255, 0.2);
  border-color: #00f0ff;
  color: #00f0ff;
  transform: scale(1.08);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

.chain-step-arrow {
  color: #334155;
  font-size: 0.75rem;
}

#webgl-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#webgl-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ── Central Prompt Interaction Stage ── */
.qte-stage-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Urgency SVG Contracting Ring (Shrinking remaining time indicator) */
.urgency-ring-wrap {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.urgency-svg {
  width: 100%; height: 100%;
  overflow: visible;
}

.ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 3;
}

/* Secondary loading progress bar hidden for clean minimal UI */
.ring-progress {
  display: none !important;
}

.ring-contract {
  fill: none;
  stroke: rgba(0, 240, 255, 0.85);
  stroke-width: 2.5;
  stroke-dasharray: 6 6;
  transform-origin: center;
  transform: scale(1.35);
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
  transition: transform 0.05s linear;
}

/* Central Action Node - Sleek Cyber Precision Fit */
.qte-center-node {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #131c2e 0%, #0a0f1a 100%);
  border: 3px solid #00f0ff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 25px rgba(0, 240, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease;
  z-index: 5;
  padding: 0 14px;
  box-sizing: border-box;
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.qte-center-node:active {
  transform: scale(0.94);
}

.qte-key-label {
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  line-height: 1;
}

.qte-action-sub {
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  font-weight: 700;
  color: #00f0ff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stumble State */
.qte-arena.stumble {
  animation: qteShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.qte-arena.stumble .qte-center-node {
  border-color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
}

@keyframes qteShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* ── Floating Hit Feedback - Centered Above the Node ── */
.qte-feedback-hub {
  position: absolute;
  top: calc(50% - 150px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
  width: 320px;
  height: 48px;
}

.qte-hit-tag {
  font-family: var(--font-m, 'JetBrains Mono', monospace);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-align: center;
  white-space: nowrap !important;
  animation: hitFloat 0.55s ease-out forwards;
}

@keyframes hitFloat {
  0% { opacity: 0; transform: translateY(14px) scale(0.88); }
  25% { opacity: 1; transform: translateY(0) scale(1.08); }
  75% { opacity: 1; transform: translateY(-8px) scale(1.02); }
  100% { opacity: 0; transform: translateY(-22px) scale(0.96); }
}

.qte-hit-tag.perfect {
  color: #00f0ff;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.8);
}

.qte-hit-tag.good {
  color: #86efac;
  text-shadow: 0 0 14px rgba(34, 197, 94, 0.7);
}

.qte-hit-tag.stumble {
  color: #f87171;
  text-shadow: 0 0 16px rgba(239, 68, 68, 0.8);
}

/* ══════════════════════════════════════════════════════════════════════
   PERFORMANCE BRACKETS HIGHLIGHT (.rt-range-row.active)
   ══════════════════════════════════════════════════════════════════════ */
.rt-range-row.active {
  opacity: 1 !important;
  transform: scale(1.02) !important;
  border-width: 1.5px !important;
  font-weight: 700 !important;
}

.rt-range-row.active.elite {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.25) !important;
}
.rt-range-row.active.elite .rt-range-dot {
  background: #10b981 !important;
  box-shadow: 0 0 10px #10b981 !important;
  opacity: 1 !important;
  transform: scale(1.3) !important;
}
.rt-range-row.active.elite .rt-range-val {
  color: #10b981 !important;
  font-weight: 700 !important;
}

.rt-range-row.active.fast {
  background: rgba(14, 165, 233, 0.16) !important;
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.25) !important;
}
.rt-range-row.active.fast .rt-range-dot {
  background: #0ea5e9 !important;
  box-shadow: 0 0 10px #0ea5e9 !important;
  opacity: 1 !important;
  transform: scale(1.3) !important;
}
.rt-range-row.active.fast .rt-range-val {
  color: #0ea5e9 !important;
  font-weight: 700 !important;
}

.rt-range-row.active.avg {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25) !important;
}
.rt-range-row.active.avg .rt-range-dot {
  background: #f59e0b !important;
  box-shadow: 0 0 10px #f59e0b !important;
  opacity: 1 !important;
  transform: scale(1.3) !important;
}
.rt-range-row.active.avg .rt-range-val {
  color: #f59e0b !important;
  font-weight: 700 !important;
}

.rt-range-row.active.slow {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25) !important;
}
.rt-range-row.active.slow .rt-range-dot {
  background: #ef4444 !important;
  box-shadow: 0 0 10px #ef4444 !important;
  opacity: 1 !important;
  transform: scale(1.3) !important;
}
.rt-range-row.active.slow .rt-range-val {
  color: #ef4444 !important;
  font-weight: 700 !important;
}

/* ── Light Mode Overrides ── */
html.light .qte-preview-box {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

html.light .preview-key-badge {
  background: #ffffff;
  color: #b45309;
}

html.light .p-node {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

html.light .chain-step-chip {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

html.light .ring-bg {
  stroke: rgba(0, 0, 0, 0.08);
}

html.light .ring-contract {
  stroke: rgba(0, 0, 0, 0.35);
}

/* ── Mobile Responsive ── */
@media (max-width: 640px) {
  .top-header {
    top: 10px;
    left: 12px;
    right: 12px;
  }

  .combo-chain-track {
    top: 60px;
    padding: 6px 12px;
    gap: 6px;
  }

  .chain-step-chip {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .qte-stage-wrapper {
    width: 200px;
    height: 200px;
  }

  .qte-center-node {
    width: 110px;
    height: 110px;
  }

  .qte-key-label {
    font-size: 1.2rem;
  }

  .qte-action-sub {
    font-size: 0.65rem;
  }
}
