/* =========================================================
   CURSOR REBELLION v2.0 — Teenage Engineering × Swiss Industrial
   Tactile aluminum console + warm drafting mat + crisp telemetry
   ========================================================= */

:root {
  --bg: #EFECE4;
  --bg-dot: rgba(20, 20, 18, 0.09);
  --bg-grid: rgba(20, 20, 18, 0.035);
  --ink: #141412;
  --ink-muted: #6E6A61;
  --border: rgba(20, 20, 18, 0.14);
  --surface: #FAF9F5;
  --metal-1: #E3DFD5;
  --metal-2: #CFCAC0;
  --red: #E5382B;
  --red-hi: #F44F42;
  --red-dark: #B12117;
  --red-deep: #80150E;
  --green: #1B9C58;
  --amber: #E59819;
  --blue: #2272D9;
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Noto Sans TC', 'PingFang TC', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.45) 0%, rgba(20, 20, 18, 0.04) 100%),
    linear-gradient(to right, var(--bg-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bg-grid) 1px, transparent 1px),
    radial-gradient(var(--bg-dot) 1.15px, transparent 1.15px);
  background-size: 100% 100%, 100px 100px, 100px 100px, 20px 20px;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Hide real OS cursor everywhere during active play, except HUD controls */
body.cursor-hidden,
body.cursor-hidden * {
  cursor: none !important;
}

body.cursor-hidden .hud-right,
body.cursor-hidden .hud-right * {
  cursor: pointer !important;
}

/* Architectural Registration Corner Marks */
.corner-mark {
  position: fixed;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(20, 20, 18, 0.28);
  pointer-events: none;
  z-index: 5;
}
.cm-tl { top: 8px; left: 14px; }
.cm-tr { top: 8px; right: 14px; }
.cm-br { bottom: 8px; right: 14px; }

/* Canvas Overlay */
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 42;
}

/* Screen Shake */
body.shake-light { animation: shakeLight 0.22s cubic-bezier(.36,.07,.19,.97) both; }
body.shake-heavy { animation: shakeHeavy 0.48s cubic-bezier(.36,.07,.19,.97) both; }

@keyframes shakeLight {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 3px); }
  45% { transform: translate(4px, -3px); }
  70% { transform: translate(-2px, 2px); }
}

@keyframes shakeHeavy {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  15% { transform: translate(-11px, 8px) rotate(-0.7deg); }
  30% { transform: translate(11px, -8px) rotate(0.7deg); }
  45% { transform: translate(-8px, 6px) rotate(-0.4deg); }
  65% { transform: translate(6px, -4px) rotate(0.3deg); }
}

/* =========================================================
   TOP PRECISION INSTRUMENT BAR
   ========================================================= */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px 28px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  z-index: 30;
  pointer-events: none;
}

.hud-left,
.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.hud-right { justify-content: flex-end; }

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  background: rgba(250, 249, 245, 0.86);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(20, 20, 18, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.stat-label {
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.stat-value {
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Stage 10 Marker Scribble on Goal '10 -> 15' */
.goal-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.goal-old.crossed {
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2.5px;
}

.goal-new {
  color: var(--red);
  font-weight: 900;
  font-size: 13.5px;
  animation: scribblePop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scribblePop {
  0% { transform: scale(2.2) rotate(-14deg); opacity: 0; }
  100% { transform: scale(1) rotate(-4deg); opacity: 1; }
}

/* Segmented Compliance LED Bar */
.led-bars {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}

.led {
  width: 5px;
  height: 11px;
  border-radius: 2px;
  background: rgba(20, 20, 18, 0.12);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.led.on { background: var(--green); box-shadow: 0 0 6px rgba(27, 156, 88, 0.45); }
.led.warn { background: var(--amber); box-shadow: 0 0 6px rgba(229, 152, 25, 0.45); }
.led.crit { background: var(--red); box-shadow: 0 0 8px rgba(229, 56, 43, 0.6); animation: ledBlink 0.7s infinite alternate; }

@keyframes ledBlink {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

.timer-display {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  padding: 7px 11px;
  background: rgba(250, 249, 245, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.icon-btn {
  height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(250, 249, 245, 0.9);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 4px rgba(20, 20, 18, 0.05), inset 0 1px 0 #FFFFFF;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
}

.icon-btn:active { transform: scale(0.94); }

.icon-btn-hint {
  background: #FFF3BF;
  border-color: rgba(229, 152, 25, 0.5);
  color: #8C5300;
}

/* Editorial Title & Interactive 'O' */
.title-block {
  text-align: center;
  pointer-events: auto;
}

.main-title {
  font-size: clamp(20px, 2.5vw, 31px);
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.05;
  color: var(--ink);
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.title-word-accent { color: var(--red); }

.title-o {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.title-o.hiding-active {
  padding: 0 4px;
  border-radius: 8px;
}

.title-o.hiding-wiggle { animation: oWiggle 0.48s ease-in-out; }
.title-o.hiding-hovered { transform: scale(1.26); color: var(--red); }

@keyframes oWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-10deg) scale(1.1); }
  65% { transform: rotate(10deg) scale(1.1); }
}

.o-eyes {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.title-o.hiding-active .o-eyes { opacity: 1; }

.o-eyes .eye {
  display: block;
  width: 3.5px;
  height: 4.5px;
  border-radius: 50%;
  background: var(--ink);
  animation: eyeBlink 3.1s infinite;
}

@keyframes eyeBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

.sub-title {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
}

/* =========================================================
   ARENA & STAGE BANNER
   ========================================================= */
.arena {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stage-banner {
  position: fixed;
  top: 96px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 7px;
  border-radius: 999px;
  background: rgba(250, 249, 245, 0.85);
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(20, 20, 18, 0.05);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  pointer-events: none;
  z-index: 24;
}

.stage-banner.pop { animation: bannerPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

@keyframes bannerPop {
  0% { transform: translateX(-50%) scale(0.85); opacity: 0.4; }
  60% { transform: translateX(-50%) scale(1.06); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.act-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.stage-code { font-weight: 800; color: var(--red); }
.stage-name { font-family: var(--font-sans); font-weight: 700; color: var(--ink); }

/* =========================================================
   MACHINED ALUMINUM CONSOLE HOUSING & RED BUTTON
   ========================================================= */
.button-housing {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 306px;
  height: 146px;
  border-radius: 28px;
  background: linear-gradient(180deg, #E8E4DA 0%, #D9D4C7 100%);
  border: 1.5px solid rgba(20, 20, 18, 0.16);
  box-shadow:
    0 22px 44px rgba(20, 20, 18, 0.12),
    0 4px 12px rgba(20, 20, 18, 0.08),
    inset 0 2px 0 rgba(255, 255, 255, 0.8),
    inset 0 -3px 8px rgba(20, 20, 18, 0.08);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.housing-bolt {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F8F7F2, #B8B3A6);
  border: 1px solid rgba(20, 20, 18, 0.25);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.8);
}
.housing-bolt::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  right: 2px;
  height: 1px;
  background: rgba(20, 20, 18, 0.35);
  transform: rotate(-30deg);
}
.hb-tl { top: 11px; left: 12px; }
.hb-tr { top: 11px; right: 12px; }
.hb-bl { bottom: 11px; left: 12px; }
.hb-br { bottom: 11px; right: 12px; }

.housing-wires {
  width: 248px;
  height: 92px;
  border-radius: 20px;
  background: #232220;
  box-shadow: inset 0 5px 14px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.socket-label {
  position: absolute;
  bottom: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #FF6B6B;
}

.housing-led-row {
  position: absolute;
  bottom: 8px;
  left: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.housing-serial {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(20, 20, 18, 0.45);
}

.housing-status-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.housing-status-led.alert {
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
}

/* Red Button Wrapper */
.red-button-wrap {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  will-change: left, top, transform;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.red-button-wrap.shrunk {
  transform: translate(-50%, -50%) scale(0.48);
}

.red-button-wrap.dragging {
  z-index: 68;
  filter: drop-shadow(0 28px 34px rgba(20, 20, 18, 0.32));
}

.red-button-wrap.detachable-glow .red-button-face {
  animation: detachPulse 1.35s ease-in-out infinite;
}

@keyframes detachPulse {
  0%, 100% { box-shadow: inset 0 2px 0 rgba(255,255,255,0.42), 0 0 0 0 rgba(229, 56, 43, 0.42); }
  50% { box-shadow: inset 0 2px 0 rgba(255,255,255,0.42), 0 0 0 14px rgba(229, 56, 43, 0); }
}

.red-button {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  outline: none;
  border-radius: 20px;
  width: 244px;
  height: 88px;
}

.red-button-edge {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--red-dark) 0%, var(--red-deep) 100%);
  transform: translateY(8px);
  box-shadow:
    0 12px 22px rgba(128, 21, 14, 0.32),
    0 4px 8px rgba(20, 20, 18, 0.18);
  transition: transform 0.07s ease, box-shadow 0.07s ease;
}

.red-button-face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--red-hi) 0%, var(--red) 60%, #CE291E 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.42),
    inset 0 -3px 6px rgba(128, 21, 14, 0.35);
  transform: translateY(0);
  transition: transform 0.07s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.15s ease;
  overflow: hidden;
}

.red-button-gloss {
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 44%;
  border-radius: 16px 16px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.red-button.is-hovered .red-button-face {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.red-button.is-pressed .red-button-face {
  transform: translateY(7px);
}

.red-button.is-pressed .red-button-edge {
  box-shadow: 0 3px 8px rgba(128, 21, 14, 0.25);
}

.red-button-text {
  position: relative;
  z-index: 2;
  color: #FFFFFF;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px rgba(100, 14, 8, 0.5);
}

.red-button-sub {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.8);
}

/* Stage 10 Little Mechanical Legs under Button */
.button-legs {
  position: absolute;
  bottom: -24px;
  display: flex;
  gap: 80px;
  pointer-events: none;
}

.b-leg {
  width: 7px;
  height: 22px;
  background: var(--ink);
  border-radius: 4px;
  transform-origin: top center;
  animation: legRun 0.22s ease-in-out infinite alternate;
}

.b-leg.leg-r { animation-delay: 0.11s; }

@keyframes legRun {
  from { transform: rotate(-28deg); }
  to { transform: rotate(28deg); }
}

.detach-hint {
  position: absolute;
  top: calc(100% + 36px);
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(20, 20, 18, 0.22);
  animation: floatBob 1.7s ease-in-out infinite;
}

@keyframes floatBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* =========================================================
   STAGE 6: SPIKES RING
   ========================================================= */
.spikes-ring {
  position: absolute;
  inset: -26px;
  pointer-events: none;
  z-index: 1;
}

.spike {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 24px solid #262522;
  transform-origin: center bottom;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.spikes-ring.active .spike { opacity: 1; }

/* =========================================================
   STAGE 9: ARMORED GLASS DOME + 4 SCREWS
   ========================================================= */
.glass-dome {
  position: absolute;
  inset: -24px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(210, 234, 255, 0.42) 0%, rgba(255, 255, 255, 0.22) 55%, rgba(180, 215, 245, 0.38) 100%);
  border: 2.5px solid rgba(34, 114, 217, 0.55);
  box-shadow:
    inset 0 2px 14px rgba(255, 255, 255, 0.8),
    0 12px 26px rgba(34, 114, 217, 0.16);
  backdrop-filter: blur(2px);
  z-index: 25;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
}

.glass-sheen {
  position: absolute;
  top: 8px;
  left: 16px;
  width: 70px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  transform: rotate(-8deg);
  pointer-events: none;
}

.glass-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #164E9B;
  background: rgba(255, 255, 255, 0.88);
  padding: 2px 8px;
  border-radius: 999px;
}

.dome-screw {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: radial-gradient(circle at 35% 35%, #FFFFFF, #C9C5B8);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.dome-screw.unscrewed {
  transform: scale(0.2) rotate(360deg);
  opacity: 0;
  pointer-events: none;
}

.ds-tl { top: 6px; left: 6px; }
.ds-tr { top: 6px; right: 6px; }
.ds-bl { bottom: 6px; left: 6px; }
.ds-br { bottom: 6px; right: 6px; }

/* =========================================================
   STAGE 3: NAP ZONE & ALARM CLOCK
   ========================================================= */
.prop-nap {
  position: fixed;
  right: 48px;
  bottom: 52px;
  width: 118px;
  height: 58px;
  border-radius: 14px;
  background: #DCE8F2;
  border: 2px dashed #6B8EAD;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
  z-index: 12;
  pointer-events: none;
}

.nap-pillow {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 24px;
  height: 36px;
  border-radius: 7px;
  background: #FFFFFF;
  border: 1.5px solid #6B8EAD;
}

.nap-mat {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #4D6F8E;
  letter-spacing: 0.08em;
}

.prop-alarm {
  position: fixed;
  right: 182px;
  bottom: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  z-index: 22;
}

.alarm-emoji {
  font-size: 32px;
  display: inline-block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.16));
  animation: alarmWiggle 0.45s ease-in-out infinite alternate;
}

@keyframes alarmWiggle {
  from { transform: rotate(-10deg); }
  to { transform: rotate(10deg); }
}

/* =========================================================
   STAGE 4: ICED AMERICANO COFFEE PROP
   ========================================================= */
.prop-coffee {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 18;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.prop-coffee.drinking { animation: coffeeSip 0.22s ease-in-out infinite alternate; }
@keyframes coffeeSip {
  from { transform: scale(1) rotate(-5deg); }
  to { transform: scale(1.09) rotate(5deg); }
}

.coffee-cup { position: relative; width: 50px; height: 64px; }
.coffee-straw {
  position: absolute;
  top: -14px;
  left: 26px;
  width: 5px;
  height: 22px;
  background: var(--green);
  border-radius: 2px;
  transform: rotate(12deg);
}
.coffee-lid {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 11px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 2px solid var(--ink);
  z-index: 2;
}
.coffee-body {
  position: absolute;
  top: 12px;
  left: 4px;
  right: 4px;
  bottom: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 2px solid var(--ink);
  border-radius: 4px 4px 10px 10px;
  overflow: hidden;
}
.coffee-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78%;
  background: linear-gradient(180deg, #6A4326 0%, #2D180B 100%);
  transition: height 0.14s linear;
}
.coffee-ice {
  position: absolute;
  top: 10px;
  left: 8px;
  width: 11px;
  height: 11px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  transform: rotate(18deg);
}
.coffee-ice.ice-2 { top: 20px; left: 22px; width: 9px; height: 9px; transform: rotate(-16deg); }

.prop-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
  background: #FFFFFF;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(20, 20, 18, 0.08);
  white-space: nowrap;
}

/* =========================================================
   STAGE 7: DRAGGABLE LABOR RIGHTS MODAL
   ========================================================= */
.labor-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(375px, 88vw);
  background: #FFFFFF;
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 24px 52px rgba(20, 20, 18, 0.24);
  z-index: 28;
  overflow: hidden;
}

.labor-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}

.labor-dots { display: flex; gap: 5px; }
.labor-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.labor-dots i:first-child { background: var(--red); }

.labor-drag-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.labor-modal-body { padding: 18px 18px 16px; }
.labor-modal-body p { font-size: 13.5px; line-height: 1.65; color: var(--ink); margin-bottom: 16px; }
.labor-actions { display: flex; flex-direction: column; gap: 8px; }
.labor-btn { border-radius: 9px; font-family: var(--font-sans); font-weight: 700; }
.labor-btn-primary { padding: 10px 14px; background: var(--red); color: #FFFFFF; border: none; font-size: 13px; }
.labor-btn-tiny { align-self: flex-end; padding: 5px 10px; background: transparent; color: var(--ink-muted); border: 1px solid var(--border); font-size: 11px; }

/* =========================================================
   STAGE 11: FAKE SYSTEM UPDATE MODAL (DRAGGABLE 99% BAR!)
   ========================================================= */
.update-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(410px, 90vw);
  padding: 24px 26px;
  background: rgba(250, 249, 245, 0.96);
  backdrop-filter: blur(12px);
  border: 2px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(20, 20, 18, 0.28);
  text-align: center;
  z-index: 32;
}

.update-icon {
  font-size: 34px;
  display: inline-block;
  animation: spinSlow 4s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.update-title { margin-top: 8px; font-size: 17px; font-weight: 800; }
.update-sub { margin-top: 6px; font-size: 12px; color: var(--ink-muted); }

.update-bar-track {
  position: relative;
  margin: 18px 0 12px;
  height: 18px;
  border-radius: 999px;
  background: rgba(20, 20, 18, 0.1);
  border: 1.5px solid var(--ink);
  overflow: visible;
}

.update-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), #4DABF7);
}

.update-bar-handle {
  position: absolute;
  top: 50%;
  left: 92%;
  transform: translate(-50%, -50%);
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--red);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(229, 56, 43, 0.35);
}

.update-tip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
}

/* =========================================================
   STAGE 12: HORSESHOE MAGNETS
   ========================================================= */
.prop-magnet {
  position: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 18;
}

.magnet-body {
  font-size: 38px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.16));
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.prop-magnet.off .magnet-body {
  opacity: 0.35;
  transform: scale(0.85);
}

.magnet-switch {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--red);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
}

.prop-magnet.off .magnet-switch {
  background: #D8D4C8;
  color: var(--ink-muted);
}

/* =========================================================
   STAGE 13: OVERTIME MEMO PROJECTILES
   ========================================================= */
.memo-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 26;
}

.memo-card {
  position: fixed;
  left: 0;
  top: 0;
  padding: 5px 10px;
  background: #FFF9DB;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 3px 4px 0 rgba(20, 20, 18, 0.2);
  white-space: nowrap;
  will-change: transform;
}

/* =========================================================
   STAGE 14: DECOY BUTTONS
   ========================================================= */
.decoy-btn-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 19;
}

.decoy-red-btn {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #F06256 0%, #D9382C 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(138, 24, 16, 0.22);
  white-space: nowrap;
}

/* =========================================================
   STAGE 15: BEACH UMBRELLA & CHAIR CAMP
   ========================================================= */
.prop-camp {
  position: fixed;
  pointer-events: none;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.camp-umbrella { font-size: 40px; transform: translateY(-10px) rotate(-8deg); }
.camp-chair { font-size: 26px; transform: translateX(-16px); }

/* =========================================================
   LIVE SYSTEM TICKER & PROGRESS DOTS
   ========================================================= */
.sys-ticker {
  position: fixed;
  left: 22px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(20, 20, 18, 0.86);
  color: #E8E5DC;
  font-family: var(--font-mono);
  font-size: 10.5px;
  max-width: min(360px, 44vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 25;
  pointer-events: none;
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.progress-dots {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(250, 249, 245, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  z-index: 25;
}

.p-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(20, 20, 18, 0.14);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
}

.p-dot.done { background: var(--red); transform: scale(1.1); }
.p-dot.current { background: var(--ink); transform: scale(1.35); }
.p-dot.bonus { border: 1.5px solid var(--red); background: transparent; }
.p-dot.bonus.done { background: var(--red); }

.hint-toast {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 18, 0.94);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 600;
  z-index: 36;
  box-shadow: 0 10px 24px rgba(20, 20, 18, 0.24);
}

/* =========================================================
   EXPRESSIVE CUSTOM CURSOR & SPEECH BUBBLES
   ========================================================= */
.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  pointer-events: none;
  will-change: transform;
}

.cursor-body {
  position: relative;
  width: 34px;
  height: 34px;
  transform-origin: 6px 4px;
  will-change: transform;
}

.cursor-svg { display: block; overflow: visible; }

/* Expressive micro-eyes on cursor */
.cursor-eyes {
  position: absolute;
  top: 11px;
  left: 8px;
  display: flex;
  gap: 3px;
}

.c-eye {
  width: 2.8px;
  height: 3.8px;
  border-radius: 50%;
  background: var(--ink);
}

.cursor-eyes.panic .c-eye {
  width: 3.5px;
  height: 4.5px;
  background: var(--red);
}

.cursor-eyes.tired .c-eye {
  height: 1.6px;
  border-radius: 1px;
}

.cursor-shades {
  position: absolute;
  top: 10px;
  left: 7px;
  width: 14px;
  height: 5px;
  background: #141412;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}

.cursor-headband {
  position: absolute;
  top: 6px;
  left: 5px;
  width: 12px;
  height: 4px;
  background: var(--red);
  transform: rotate(-28deg);
  border-radius: 1px;
}

.cursor-dizzy {
  position: absolute;
  top: -12px;
  left: 8px;
  font-size: 14px;
  color: var(--amber);
  animation: spinFast 0.6s linear infinite;
}

@keyframes spinFast {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cursor-bubble {
  position: absolute;
  left: 26px;
  bottom: calc(100% + 4px);
  max-width: 250px;
  width: max-content;
  padding: 7px 12px;
  background: #FFFFFF;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 14px 14px 14px 3px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 8px 20px rgba(20, 20, 18, 0.14);
}

.cursor-bubble.flip-x { left: auto; right: 14px; border-radius: 14px 14px 3px 14px; }
.cursor-bubble.flip-y { bottom: auto; top: calc(100% + 6px); border-radius: 3px 14px 14px 14px; }
.cursor-bubble.flip-x.flip-y { border-radius: 14px 3px 14px 14px; }

.cursor-alert {
  position: absolute;
  top: -22px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(229, 56, 43, 0.35);
}

.cursor-alert.calm { background: var(--green); font-size: 11px; }

.protest-sign {
  position: absolute;
  top: -36px;
  left: 14px;
  padding: 4px 9px;
  background: #FFF9DB;
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 900;
  color: var(--red);
  white-space: nowrap;
  transform: rotate(7deg);
  box-shadow: 2px 3px 0 var(--ink);
}

.protest-sign::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 50%;
  width: 3px;
  height: 14px;
  background: #8B5A2B;
  transform: translateX(-50%);
}

/* Stage 8 Decoy Cursors */
.decoy-layer { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
.decoy-cursor { position: fixed; left: 0; top: 0; width: 32px; height: 32px; will-change: transform; }
.decoy-tag {
  position: absolute;
  left: 22px;
  top: -12px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--ink);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.ghost-hand {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 95;
}

/* =========================================================
   ACHIEVEMENTS & THERMAL RECEIPT MODAL
   ========================================================= */
.achievement-stack {
  position: fixed;
  left: 22px;
  bottom: 62px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 85;
  pointer-events: none;
}

.ach-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(20, 20, 18, 0.25);
  animation: achSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ach-toast.out { animation: achSlideOut 0.3s ease forwards; }

@keyframes achSlideIn {
  from { opacity: 0; transform: translateX(-24px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes achSlideOut {
  to { opacity: 0; transform: translateX(-20px); }
}

.ach-icon { font-size: 18px; }
.ach-text { display: flex; flex-direction: column; gap: 2px; }
.ach-title { font-size: 12.5px; font-weight: 800; color: #FFD43B; }
.ach-desc { font-size: 11px; color: rgba(255, 255, 255, 0.78); }

.victory-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, 0.58);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120;
  padding: 20px;
}

.receipt-card {
  width: min(445px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #FCFBF7;
  color: var(--ink);
  box-shadow: 0 32px 72px rgba(0, 0, 0, 0.42);
  border-radius: 4px;
  animation: receiptDrop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes receiptDrop {
  from { opacity: 0; transform: translateY(-36px) rotate(-1.5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

.receipt-tear-top,
.receipt-tear-bottom {
  height: 10px;
  background-image: radial-gradient(circle at 8px 0, transparent 5px, #FCFBF7 5.5px);
  background-size: 16px 10px;
}
.receipt-tear-bottom {
  background-image: radial-gradient(circle at 8px 10px, transparent 5px, #FCFBF7 5.5px);
}

.receipt-inner { padding: 22px 26px 24px; }
.receipt-header { text-align: center; }
.receipt-stamp {
  display: inline-block;
  padding: 3px 10px;
  border: 2px solid var(--red);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  transform: rotate(-3deg);
  margin-bottom: 10px;
}
.receipt-title { font-size: 21px; font-weight: 900; letter-spacing: 0.04em; }
.receipt-sub { margin-top: 4px; font-family: var(--font-mono); font-size: 10px; color: var(--ink-muted); letter-spacing: 0.1em; }
.receipt-divider { margin: 16px 0; border-top: 1.5px dashed rgba(20, 20, 18, 0.22); }
.receipt-stats { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; }
.r-row { display: flex; justify-content: space-between; align-items: center; }
.r-row span { color: var(--ink-muted); }

.receipt-rank { text-align: center; padding: 12px 14px; background: rgba(20, 20, 18, 0.045); border-radius: 10px; }
.rank-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-muted); }
.rank-title { margin-top: 4px; font-size: 20px; font-weight: 900; color: var(--red); }
.rank-quote { margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }

.receipt-achievements { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ach-badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #FFFFFF; border: 1px solid var(--border); }
.ach-badge.locked { opacity: 0.4; text-decoration: line-through; }

.receipt-actions { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.receipt-btn { padding: 11px 12px; border-radius: 10px; font-family: var(--font-sans); font-size: 13px; font-weight: 700; border: none; cursor: pointer !important; }
.receipt-btn-primary { background: var(--red); color: #FFFFFF; }
.receipt-btn-secondary { background: var(--ink); color: #FFFFFF; }

.stage-select-wrap { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.stage-select-label { display: block; font-size: 11px; color: var(--ink-muted); margin-bottom: 8px; text-align: center; }
.stage-select-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stage-jump-btn {
  padding: 6px 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer !important;
}
.stage-jump-btn:hover { background: var(--red); color: #FFFFFF; border-color: var(--red); }

.hidden { display: none !important; }

@media (max-width: 780px) {
  .top-bar { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
  .hud-left, .hud-right { justify-content: center; }
  .stage-banner { top: 158px; }
  .sys-ticker { display: none; }
}
