:root{
  --cabinet-bg:#08050b;
  --panel:#120d18;
  --panel-2:#1b1324;
  --line:#2c2138;

  --text:#f7f1da;
  --text-muted:#b8aeca;

  --toxic-green:#6dff5a;
  --toxic-green-dark:#2ea43d;

  --arcade-magenta:#ff2e88;
  --arcade-magenta-2:#ff6db2;

  --arcade-yellow:#ffd84a;
  --arcade-cyan:#4de9ff;

  --danger-red:#ff4d57;
  --deep-black:#000000;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Trebuchet MS", "Arial Black", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 580px at 50% 12%, rgba(255,46,136,0.16) 0%, rgba(255,46,136,0) 66%),
    radial-gradient(860px 620px at 50% 120%, rgba(77,233,255,0.08) 0%, rgba(77,233,255,0) 72%),
    linear-gradient(180deg, #0f0914 0%, #08050b 62%, #040206 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 48%, transparent 32%, rgba(0,0,0,0.44) 100%);
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.014) 0px,
    rgba(255,255,255,0.014) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.34;
  z-index: 0;
}

.app-root {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  justify-items: center;
  padding: 18px 16px;
}

.cabinet-shell {
  width: fit-content;
  background: linear-gradient(180deg, #19111f 0%, #110b17 55%, #0d0811 100%);
  border: 4px solid #3a2a4d;
  border-radius: 18px;
  padding: 12px 12px 10px;
  box-shadow:
    0 26px 42px rgba(0,0,0,0.62),
    inset 0 2px 0 rgba(255,255,255,0.06),
    inset 0 -2px 0 rgba(0,0,0,0.58),
    0 0 24px rgba(255,46,136,0.12);
  position: relative;
}

.marquee-housing {
  position: relative;
  min-height: 112px;
  border: 4px solid #271a35;
  border-radius: 14px;
  background: linear-gradient(180deg, #24182f 0%, #171021 100%);
  box-shadow:
    inset 0 3px 8px rgba(0,0,0,0.58),
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 10px 18px rgba(0,0,0,0.35);
  padding: 12px 100px 12px 12px;
  margin-bottom: 12px;
  display: grid;
  align-items: center;
}

.marquee-rivets {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.marquee-rivets span,
.screen-rivets span,
.module-rivets span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9f90ad;
  border: 1px solid #463854;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.45), inset 0 -1px 1px rgba(0,0,0,0.65);
}

.marquee-rivets span:nth-child(1) { left: 7px; top: 7px; }
.marquee-rivets span:nth-child(2) { right: 7px; top: 7px; }
.marquee-rivets span:nth-child(3) { left: 7px; bottom: 7px; }
.marquee-rivets span:nth-child(4) { right: 7px; bottom: 7px; }

.cabinet-marquee {
  border: 3px solid #2f1935;
  border-radius: 10px;
  background: linear-gradient(180deg, #2f1940 0%, #241433 100%);
  padding: 7px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.5);
}

.marquee-plate {
  border: 2px solid #7a1f53;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--arcade-magenta) 0%, var(--arcade-magenta-2) 100%);
  padding: 13px 14px 10px;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.18),
    inset 0 -2px 0 rgba(87,8,48,0.55),
    0 0 16px rgba(255,46,136,0.34);
  position: relative;
  overflow: hidden;
}

.marquee-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(118deg, transparent 0%, rgba(255,255,255,0.24) 44%, transparent 72%);
  transform: translateX(-120%);
  animation: marqueeSweep 6.7s linear infinite;
}

@keyframes marqueeSweep {
  0% { transform: translateX(-120%); }
  63%, 100% { transform: translateX(125%); }
}

.marquee-text {
  display: grid;
  justify-items: center;
  text-align: center;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.marquee-title {
  font-weight: 900;
  font-size: 34px;
  letter-spacing: 1.8px;
  color: #1f0b1b;
  text-shadow:
    0 1px 0 rgba(255,255,255,0.2),
    0 -1px 0 rgba(66,8,45,0.4);
}

.marquee-subtitle {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.4px;
  color: #341536;
  text-transform: uppercase;
}

.marquee-mascot {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.mascot-slot {
  width: 118px;
  height: 92px;
  border: 3px solid #2b1c37;
  border-radius: 10px;
  background: linear-gradient(180deg, #130f19 0%, #0d0a12 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.08),
    inset 0 -2px 0 rgba(0,0,0,0.48),
    0 6px 10px rgba(0,0,0,0.36);
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.mascot-image {
  display: block;
  width: 110%;
  height: 110%;
  object-fit: contain;
  object-position: center top;
  image-rendering: auto;
  transform: translateY(-12px);
  transition: filter .2s ease, transform .2s ease;
}

.mascot-image.state-amused {
  filter: saturate(1) brightness(1);
}

.mascot-image.state-showtime {
  filter: saturate(1.1) brightness(1.05) drop-shadow(0 0 10px rgba(255,46,136,0.42));
  animation: mascotShowtimePulse .78s ease-in-out 2;
}

.mascot-image.state-offended {
  filter: saturate(0.86) brightness(0.92);
}

@keyframes mascotShowtimePulse {
  0%, 100% { transform: translateY(-12px) scale(1); }
  50% { transform: translateY(-12px) scale(1.03); }
}

.cabinet-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cut-module-wrap {
  width: 132px;
  flex: 0 0 132px;
  padding-top: 10px;
}

.cut-module {
  position: relative;
  border: 5px solid #735b1b;
  border-radius: 8px;
  padding: 10px 8px 9px;
  background:
    linear-gradient(180deg, rgba(255,216,74,0.15) 0%, rgba(0,0,0,0) 45%),
    linear-gradient(180deg, #2e2410 0%, #1f1709 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.1),
    inset 0 -3px 0 rgba(0,0,0,0.64),
    inset 0 0 0 2px rgba(0,0,0,0.36),
    inset 0 0 0 5px rgba(25,19,6,0.55),
    0 10px 16px rgba(0,0,0,0.44);
  display: grid;
  gap: 9px;
  overflow: hidden;
}

.cut-module::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background:
    repeating-linear-gradient(135deg, #3a2d0e 0 8px, #4a3810 8px 16px);
  opacity: 0.7;
  pointer-events: none;
}

.module-rivets {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.module-rivets span:nth-child(1) { left: 5px; top: 5px; }
.module-rivets span:nth-child(2) { right: 5px; top: 5px; }
.module-rivets span:nth-child(3) { left: 5px; bottom: 5px; }
.module-rivets span:nth-child(4) { right: 5px; bottom: 5px; }

.cut-module-label {
  border: 2px solid #af8c2a;
  border-radius: 3px;
  background:
    linear-gradient(180deg, #ffd954 0%, #f2bf2a 100%);
  color: #1b1404;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.2px;
  padding: 3px 4px 2px;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 -1px 0 rgba(138,97,14,0.55);
}

.cut-button-block {
  border: 3px solid #4e3f14;
  border-radius: 6px;
  background: linear-gradient(180deg, #1d170a 0%, #151108 100%);
  box-shadow:
    inset 0 8px 10px rgba(0,0,0,0.6),
    inset 0 -3px 4px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.05);
  padding: 7px 6px 6px;
}

.booster-btn,
.start-btn {
  border-radius: 6px;
  border: 2px solid #2d8a3a;
  background: linear-gradient(180deg, #2fac40 0%, #1f7f2d 100%);
  color: #f4ffea;
  font-weight: 900;
  font-size: 13px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.15), 0 3px 0 rgba(0,0,0,0.45);
  transition: transform .06s ease, filter .12s ease, box-shadow .12s ease;
}

.booster-btn {
  width: 100%;
  min-height: 74px;
  padding: 10px 6px;
  line-height: 1.12;
  text-transform: uppercase;
  border-width: 2px;
  letter-spacing: 0.6px;
}

.booster-btn:hover,
.start-btn:hover { filter: brightness(1.07); }

.booster-btn:active,
.start-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.13), 0 2px 0 rgba(0,0,0,0.45);
}

.cut-module-foot {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
}

.cut-foot-cell {
  min-height: 28px;
  border: 2px solid #534015;
  border-radius: 4px;
  background: linear-gradient(180deg, #1f1709 0%, #181207 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.56), inset 0 1px 0 rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
}

.cut-led {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #1e1e1e;
  background: #4b4b4b;
  box-shadow:
    inset 0 -2px 2px rgba(0,0,0,0.55),
    inset 0 1px 1px rgba(255,255,255,0.26);
  position: relative;
}

.cut-led::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
}

.cut-led.led-locked {
  background: #9d7a23;
  box-shadow:
    0 0 8px rgba(255,216,74,0.25),
    inset 0 -2px 2px rgba(0,0,0,0.5),
    inset 0 1px 1px rgba(255,255,255,0.27);
}

.cut-led.led-ready {
  background: var(--toxic-green);
  box-shadow:
    0 0 12px rgba(109,255,90,0.58),
    inset 0 -2px 2px rgba(0,0,0,0.4),
    inset 0 1px 1px rgba(255,255,255,0.34);
  animation: ledPulse 2.1s ease-in-out infinite;
}

.cut-led.led-used {
  background: #913943;
  box-shadow:
    0 0 8px rgba(255,77,87,0.25),
    inset 0 -2px 2px rgba(0,0,0,0.48),
    inset 0 1px 1px rgba(255,255,255,0.24);
}

.cut-led.led-off {
  background: #4a4d53;
  box-shadow:
    inset 0 -2px 2px rgba(0,0,0,0.52),
    inset 0 1px 1px rgba(255,255,255,0.18);
}

@keyframes ledPulse {
  0%, 82%, 100% { transform: scale(1); }
  89% { transform: scale(1.08); }
}

.cut-state-badge {
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.9px;
  padding: 3px 6px;
  border-radius: 4px;
  border: 2px solid #7f6617;
  background: linear-gradient(180deg, #30240a 0%, #251c08 100%);
  color: #ffe5a0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.cut-state-badge.is-ready {
  border-color: #2f8e3d;
  background: linear-gradient(180deg, #113419 0%, #0d2612 100%);
  color: #b6ffc0;
}

.cut-state-badge.is-used {
  border-color: #6f3138;
  background: linear-gradient(180deg, #35151a 0%, #271014 100%);
  color: #ffc6cc;
}

.booster-btn:disabled {
  cursor: not-allowed;
  filter: none;
}

.booster-btn.is-locked,
.booster-btn.is-locked:disabled {
  border-color: #8e7018;
  background: linear-gradient(180deg, #6c561b 0%, #4d3c11 100%);
  color: #ffe7a6;
}

.booster-btn.is-ready:not(:disabled) {
  border-color: #4ad060;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.16),
    0 3px 0 rgba(0,0,0,0.45),
    0 0 15px rgba(109,255,90,0.43);
  animation: readyPulse 2.5s ease-in-out infinite;
}

@keyframes readyPulse {
  0%, 84%, 100% { filter: brightness(1); }
  90% { filter: brightness(1.2); }
}

.booster-btn.is-used,
.booster-btn.is-used:disabled {
  border-color: #7b323a;
  background: linear-gradient(180deg, #5d323a 0%, #43232a 100%);
  color: #f3c7ce;
}

.cut-module.is-ready {
  border-color: #3da84c;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.08),
    inset 0 -3px 0 rgba(0,0,0,0.64),
    inset 0 0 0 2px rgba(0,0,0,0.28),
    inset 0 0 0 5px rgba(17,39,21,0.38),
    0 10px 16px rgba(0,0,0,0.44),
    0 0 16px rgba(109,255,90,0.3);
}

.cut-module.is-used {
  border-color: #73353f;
  background:
    linear-gradient(180deg, rgba(255,77,87,0.08) 0%, rgba(0,0,0,0) 52%),
    linear-gradient(180deg, #2b171b 0%, #201115 100%);
}

.play-stack {
  display: grid;
}

.screen-cavity {
  border: 5px solid #2a1d36;
  border-radius: 11px;
  background: linear-gradient(180deg, #1d1428 0%, #130d1b 100%);
  padding: 9px;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.06),
    inset 0 -3px 0 rgba(0,0,0,0.62),
    inset 0 0 0 3px rgba(0,0,0,0.35),
    0 14px 22px rgba(0,0,0,0.5);
}

.screen-bezel-outer {
  position: relative;
  border: 8px solid #0f0b14;
  border-radius: 8px;
  background: linear-gradient(180deg, #2a1d38 0%, #1a1222 100%);
  padding: 9px;
  box-shadow:
    inset 0 14px 16px rgba(0,0,0,0.68),
    inset 0 -7px 9px rgba(0,0,0,0.58),
    inset 0 0 0 2px rgba(255,255,255,0.05);
}

.screen-rivets {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.screen-rivets span:nth-child(1) { left: 6px; top: 6px; }
.screen-rivets span:nth-child(2) { right: 6px; top: 6px; }
.screen-rivets span:nth-child(3) { left: 6px; bottom: 6px; }
.screen-rivets span:nth-child(4) { right: 6px; bottom: 6px; }

.screen-bezel-inner {
  border: 3px solid #4f2c65;
  border-radius: 6px;
  background: linear-gradient(180deg, #21152d 0%, #170f21 100%);
  box-shadow:
    inset 0 0 0 2px rgba(77,233,255,0.22),
    inset 0 10px 12px rgba(0,0,0,0.5),
    inset 0 -3px 5px rgba(0,0,0,0.45),
    0 0 12px rgba(255,46,136,0.2);
  padding: 6px;
}

.canvas-wrap {
  position: relative;
  border: 3px solid #17101f;
  border-radius: 5px;
  padding: 4px;
  background: linear-gradient(180deg, #09070d 0%, #050408 100%);
  box-shadow:
    inset 0 12px 20px rgba(0,0,0,0.72),
    inset 0 -7px 10px rgba(0,0,0,0.62),
    inset 0 0 0 2px rgba(255,255,255,0.04);
  overflow: hidden;
}

.canvas-wrap::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 7px;
  height: 92px;
  border-radius: 7px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.02) 35%, rgba(255,255,255,0) 100%);
  opacity: 0.22;
}

canvas {
  display: block;
  background: #000;
  border: 1px solid #2a2034;
  border-radius: 4px;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
}

.canvas-wrap::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.026) 0px,
    rgba(255,255,255,0.026) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.26;
}

.status-flash {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translateX(-50%) translateY(-6px);
  z-index: 4;
  pointer-events: none;
  font-size: 11px;
  letter-spacing: 0.9px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff7d3;
  border: 2px solid #8f7118;
  background: rgba(35,27,8,0.92);
  padding: 2px 10px;
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
  opacity: 0;
  transition: opacity .12s ease, transform .12s ease;
}

.status-flash.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.status-flash[data-tone="fast"] {
  border-color: #8f7118;
  color: #fff0bc;
}

.status-flash[data-tone="slow"] {
  border-color: #2f6f8f;
  background: rgba(10,25,34,0.92);
  color: #d9f7ff;
}

.status-flash[data-tone="ready"] {
  border-color: #2f8e3d;
  background: rgba(11,35,15,0.92);
  color: #ceffd4;
}

.start-overlay {
  position: absolute;
  inset: 2px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: rgba(2,2,4,0.84);
  z-index: 5;
  padding: 10px;
}

.start-card {
  width: min(430px, 100%);
  background: linear-gradient(180deg, #160f20 0%, #110a18 100%);
  border: 5px solid #332347;
  border-radius: 6px;
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.08),
    inset 0 -3px 0 rgba(0,0,0,0.58),
    inset 0 0 0 2px #1d1428,
    inset 0 0 0 5px rgba(0,0,0,0.28);
  padding: 14px 12px 12px;
  color: var(--text);
  position: relative;
}

.start-card::before {
  content: "SYSTEM INTERRUPT";
  position: absolute;
  top: -11px;
  left: 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.9px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 2px solid #8f7118;
  background: #2a220d;
  color: #ffe7a5;
}

.start-card::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  left: 8px;
  top: 8px;
  border-radius: 50%;
  background: #9f90ad;
  border: 1px solid #463854;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.45),
    inset 0 -1px 1px rgba(0,0,0,0.65),
    402px 0 0 #9f90ad;
}

.start-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.start-title { margin: 0 0 6px; font-size: 24px; line-height: 1.05; }
.start-subtitle { margin: 0 0 12px; font-size: 14px; color: #d6cade; line-height: 1.45; }
.start-list {
  margin: 0 0 12px 18px;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: #eee9f8;
}

.start-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.start-btn {
  padding: 9px 12px;
  font-size: 13px;
  text-transform: uppercase;
}

.start-btn.secondary {
  border-color: #69567d;
  background: linear-gradient(180deg, #4f3f62 0%, #3c3049 100%);
  color: #f3eefd;
}

.cabinet-bottom {
  margin-top: 10px;
  border: 4px solid #2a1d36;
  border-radius: 8px;
  background: linear-gradient(180deg, #1a1124 0%, #120c1a 100%);
  box-shadow:
    inset 0 3px 0 rgba(255,255,255,0.05),
    inset 0 -3px 0 rgba(0,0,0,0.56),
    inset 0 0 0 2px rgba(0,0,0,0.3);
  padding: 8px 7px 7px;
}

.hud {
  display: grid;
  gap: 7px;
  width: 100%;
  max-width: 620px;
}

.hud-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 8px 7px;
  border: 4px solid #2f233d;
  border-radius: 6px;
  background: linear-gradient(180deg, #120c1a 0%, #0e0914 100%);
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.05),
    inset 0 -3px 0 rgba(0,0,0,0.6),
    inset 0 0 0 2px rgba(0,0,0,0.34);
  position: relative;
}

.hud-stats::before {
  content: "STATUS PANEL";
  position: absolute;
  top: -11px;
  left: 10px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffe8a5;
  border: 2px solid #8f7118;
  border-radius: 3px;
  background: #2a210a;
  padding: 1px 6px;
}

.stat-chip {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 68px;
  padding: 6px 4px 5px;
  border-radius: 3px;
  border: 2px solid #3b2d4a;
  background: linear-gradient(180deg, #0e0a15 0%, #0a0710 100%);
  box-shadow:
    inset 0 6px 8px rgba(0,0,0,0.6),
    inset 0 -2px 4px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.stat-chip span {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  font-weight: 900;
}

#score { color: var(--toxic-green); }
#high { color: var(--arcade-yellow); }
#time { color: #f5ebd4; }
#specialStats { color: var(--arcade-magenta-2); }

.stat-chip b {
  font-size: 24px;
  line-height: 1;
  letter-spacing: 0.3px;
  text-shadow: 0 0 8px rgba(0,0,0,0.35);
}

.hud-controls-strip {
  border: 3px solid #2e233c;
  border-radius: 4px;
  background: linear-gradient(180deg, #140f1d 0%, #100b16 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -2px 0 rgba(0,0,0,0.5);
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
  color: #cbc0d8;
  font-size: 11px;
  line-height: 1.25;
  padding: 5px 8px 4px;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.event-text {
  min-height: 14px;
  font-size: 10px;
  letter-spacing: 0.8px;
  color: #9fefff;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .15s ease, transform .15s ease;
}

.event-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.leaderboard-panel {
  border: 3px solid #3b2b4e;
  border-radius: 5px;
  background: linear-gradient(180deg, #181124 0%, #100a18 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.05), inset 0 -2px 0 rgba(0,0,0,0.52);
  padding: 8px;
  display: grid;
  gap: 7px;
}

.leaderboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#lblLeaderboard {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #f1e8ff;
}

.leaderboard-mode {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  border: 2px solid #8f7118;
  border-radius: 4px;
  padding: 2px 6px;
  background: #2a220d;
  color: #ffe7a5;
}

.leaderboard-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.leaderboard-name {
  width: 100%;
  min-width: 0;
  border-radius: 5px;
  border: 2px solid #3d2b4f;
  background: #120b1b;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 8px;
  outline: none;
}

.leaderboard-name:focus {
  border-color: #59dd6a;
  box-shadow: 0 0 0 2px rgba(109,255,90,0.18);
}

.leaderboard-submit-btn {
  border-radius: 5px;
  border: 2px solid #2d8a3a;
  background: linear-gradient(180deg, #2fac40 0%, #1f7f2d 100%);
  color: #f4ffea;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  padding: 0 10px;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.15), 0 3px 0 rgba(0,0,0,0.45);
  transition: transform .06s ease, filter .12s ease, box-shadow .12s ease;
}

.leaderboard-submit-btn:hover { filter: brightness(1.07); }

.leaderboard-submit-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.13), 0 2px 0 rgba(0,0,0,0.45);
}

.leaderboard-submit-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.65) brightness(0.78);
}

.leaderboard-status {
  min-height: 15px;
  font-size: 11px;
  color: #d6cade;
}

.leaderboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.leaderboard-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 2px solid #342743;
  border-radius: 4px;
  background: linear-gradient(180deg, #140d1d 0%, #0f0a15 100%);
  padding: 5px 7px;
}

.leaderboard-rank-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #efe6ff;
}

.leaderboard-score {
  font-size: 13px;
  font-weight: 900;
  color: var(--toxic-green);
}

.leaderboard-empty {
  border: 2px dashed #3a2a4d;
  border-radius: 4px;
  padding: 8px 7px;
  font-size: 11px;
  color: #bdafd1;
}

.cabinet-decals {
  position: absolute;
  right: -86px;
  top: 152px;
  display: grid;
  gap: 7px;
  pointer-events: none;
  z-index: 2;
}

.cabinet-sticker {
  width: fit-content;
  justify-self: end;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  border: 2px solid #3f2e4e;
  box-shadow:
    0 3px 5px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.16);
}

.cabinet-sticker.warning {
  background: repeating-linear-gradient(135deg, #31270b 0 8px, #42330e 8px 16px);
  color: #ffedac;
  border-color: #a2811f;
}

.cabinet-sticker.cert {
  background: linear-gradient(180deg, #16311f 0%, #112416 100%);
  color: #bdfbc7;
  border-color: #2f8e3d;
}

.cabinet-sticker.flavor {
  background: linear-gradient(180deg, #2a152f 0%, #1e1022 100%);
  color: #ffc0df;
  border-color: #9b3472;
  transform: rotate(-7deg);
}

.version-link {
  position: fixed;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  color: #cca4ff;
  opacity: 0.88;
  text-decoration: none;
  z-index: 2;
}

.version-link:hover { opacity: 1; text-decoration: underline; }

@media (max-width: 860px) {
  .marquee-housing { min-height: 98px; padding-right: 78px; }
  .marquee-title { font-size: 28px; }
  .marquee-subtitle { font-size: 10px; }
  .marquee-mascot { right: 8px; transform: translateY(-50%) scale(0.82); transform-origin: top right; }
  .cabinet-decals { right: -54px; top: 158px; }
  .cabinet-main { gap: 8px; }
  .cut-module-wrap { width: 116px; flex-basis: 116px; }
  .booster-btn { min-height: 66px; font-size: 12px; }
}

@media (max-width: 700px) {
  .app-root { padding: 10px 6px 16px; }
  .cabinet-main { display: grid; gap: 8px; }
  .cut-module-wrap { width: 100%; }
  .cut-module {
    grid-template-columns: 1fr;
    max-width: 200px;
    margin-inline: auto;
  }
  .cabinet-decals { display: none; }
  .hud-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leaderboard-form { grid-template-columns: 1fr; }
  .leaderboard-submit-btn { min-height: 36px; }
  .marquee-housing { padding-right: 12px; }
  .marquee-mascot { position: static; transform: scale(0.7); margin-left: auto; margin-right: auto; }
  .start-card::after { box-shadow: 308px 0 0 #9f90ad; }
}
