:root {
  color-scheme: dark;
  --ink: #f4f7e8;
  --muted: #9ca390;
  --acid: #baff28;
  --acid-hot: #e1ff68;
  --warning: #ff5b21;
  --danger: #ff3038;
  --harvest: #ff9b3d;
  --cranberry: #ff3158;
  --gold: #ffd660;
  --panel: rgba(12, 15, 11, 0.88);
  --line: rgba(223, 255, 127, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #100704;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  overscroll-behavior: none;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible {
  outline: 3px solid var(--acid-hot);
  outline-offset: 4px;
}

.game-shell {
  position: relative;
  isolation: isolate;
  width: min(100vw, 760px);
  height: 100dvh;
  min-height: 520px;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(23, 8, 3, 0.38), rgba(6, 3, 2, 0.12) 42%, rgba(5, 2, 1, 0.48)),
    url("./assets/thanksgiving-kitchen.webp") center / cover no-repeat,
    #160a05;
  border-inline: 1px solid rgba(255, 159, 67, 0.14);
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.9);
  contain: layout paint;
}

.game-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 7%, rgba(255, 170, 75, 0.12), transparent 31%),
    linear-gradient(105deg, transparent 0 47%, rgba(255, 255, 255, 0.018) 48%, transparent 49%);
  pointer-events: none;
}

.game-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, 0.38) 100%);
  pointer-events: none;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.back-glow {
  position: absolute;
  z-index: 1;
  inset: auto 8% -10% 8%;
  height: 34%;
  background: radial-gradient(ellipse, rgba(164, 255, 31, 0.14), transparent 66%);
  opacity: 0.72;
  pointer-events: none;
}

.screen-grain {
  position: absolute;
  z-index: 7;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.09) 0 0.6px, transparent 0.9px),
    radial-gradient(circle at 68% 74%, rgba(255, 255, 255, 0.07) 0 0.6px, transparent 0.9px);
  background-size: 8px 8px, 11px 11px;
}

.game-shell.is-playing .screen-grain {
  display: none;
}

.hud {
  position: absolute;
  z-index: 15;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: max(14px, env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(2, 4, 2, 0.88), rgba(2, 4, 2, 0));
  pointer-events: none;
}

.score-card {
  justify-self: start;
  min-width: 94px;
}

.hud-label {
  display: block;
  margin-bottom: 1px;
  color: var(--acid);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.score-card strong {
  display: block;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.15rem, 4.8vw, 1.7rem);
  font-style: italic;
  letter-spacing: 0.035em;
  line-height: 1;
  text-shadow: 0 0 18px rgba(186, 255, 40, 0.28);
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(0.88rem, 3.6vw, 1.25rem);
  font-style: italic;
  letter-spacing: -0.045em;
  transform: skew(-7deg);
}

.brand-lockup b {
  color: var(--acid);
}

.hud-actions {
  justify-self: end;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(222, 242, 190, 0.15);
  border-radius: 11px;
  background: rgba(10, 13, 9, 0.7);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 8px 18px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.icon-button:active {
  transform: translateY(1px) scale(0.97);
}

.icon {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.icon-sound-off,
.is-muted .icon-sound-on {
  display: none;
}

.is-muted .icon-sound-off {
  display: block;
}

.status-rail {
  position: absolute;
  z-index: 14;
  top: max(76px, calc(env(safe-area-inset-top) + 65px));
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.season-chip {
  position: absolute;
  z-index: 16;
  top: max(116px, calc(env(safe-area-inset-top) + 105px));
  left: 50%;
  display: grid;
  min-width: 178px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 7px;
  border: 1px solid rgba(255, 189, 91, 0.26);
  border-radius: 999px;
  background: rgba(24, 10, 4, 0.86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translate(-50%, -5px);
  transition: opacity 180ms ease, transform 180ms ease, border-color 180ms ease;
  pointer-events: none;
}

.game-shell.is-playing .season-chip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.season-chip img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.season-chip span,
.season-chip small,
.season-chip strong {
  display: block;
}

.season-chip small {
  color: #e0b887;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1;
}

.season-chip strong {
  margin-top: 3px;
  color: #fff0d1;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.season-chip > b {
  color: var(--gold);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 0.8rem;
}

.season-chip[data-tone="wishbone"] {
  border-color: rgba(255, 224, 103, 0.68);
  box-shadow: 0 0 22px rgba(255, 200, 64, 0.22), inset 0 1px rgba(255, 255, 255, 0.08);
}

.season-chip[data-tone="rush"] {
  border-color: rgba(255, 125, 48, 0.7);
}

.season-chip[data-tone="boss"] {
  border-color: rgba(255, 49, 67, 0.72);
}

.level-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px 6px 11px;
  border: 1px solid rgba(186, 255, 40, 0.16);
  border-radius: 999px;
  background: rgba(7, 10, 7, 0.82);
}

.level-chip span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.level-chip strong {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--acid);
  color: #11170c;
  font-size: 0.78rem;
  box-shadow: 0 0 15px rgba(186, 255, 40, 0.35);
}

.lives {
  display: flex;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(7, 10, 7, 0.8);
}

.spray-button {
  position: absolute;
  z-index: 20;
  right: 14px;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  display: grid;
  width: 132px;
  min-height: 72px;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 5px;
  border: 1px solid rgba(205, 255, 94, 0.42);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(224, 255, 104, 0.13), transparent 48%),
    rgba(7, 12, 6, 0.9);
  color: var(--ink);
  box-shadow:
    0 0 0 1px rgba(13, 20, 9, 0.84),
    0 0 24px rgba(166, 255, 34, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.08);
  opacity: 0;
  transform: translateY(18px) scale(0.92);
  pointer-events: none;
  cursor: pointer;
  transition: opacity 180ms ease, transform 220ms ease, filter 180ms ease;
}

.game-shell.is-playing .spray-button {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.spray-button:not(:disabled):active {
  transform: translateY(2px) scale(0.97);
}

.spray-button img {
  width: 48px;
  height: 60px;
  object-fit: contain;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.62));
}

.spray-button-copy,
.spray-button-copy strong,
.spray-button-copy small {
  display: block;
  min-width: 0;
}

.spray-button-copy {
  text-align: left;
}

.spray-button-copy strong {
  color: var(--acid-hot);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.02;
}

.spray-button-copy small {
  margin-top: 5px;
  color: #c6cdbb;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
}

.spray-button.is-active {
  border-color: rgba(231, 255, 142, 0.82);
  background:
    linear-gradient(145deg, rgba(224, 255, 104, 0.24), transparent 54%),
    rgba(14, 23, 9, 0.94);
  box-shadow:
    0 0 0 1px rgba(13, 20, 9, 0.84),
    0 0 34px rgba(186, 255, 40, 0.52),
    inset 0 1px rgba(255, 255, 255, 0.12);
}

.spray-button.is-active img {
  animation: spray-can-kick 310ms ease-in-out 4;
}

.spray-button.is-used {
  border-color: rgba(213, 223, 198, 0.14);
  filter: grayscale(0.88) brightness(0.62);
}

.game-shell.is-playing .spray-button.is-used {
  opacity: 0.48;
  pointer-events: none;
}

.spray-button:disabled {
  cursor: default;
}

.spray-effect {
  position: absolute;
  z-index: 12;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.spray-effect.is-active {
  visibility: visible;
  opacity: 1;
}

.spray-haze,
.spray-pass {
  position: absolute;
  display: block;
}

.spray-effect.is-active .spray-haze,
.spray-effect.is-active .spray-pass {
  will-change: opacity, transform;
}

.spray-haze {
  inset: -8%;
  background:
    radial-gradient(circle at 78% 82%, rgba(239, 255, 219, 0.38), transparent 26%),
    radial-gradient(circle at 27% 46%, rgba(197, 255, 115, 0.26), transparent 35%),
    linear-gradient(116deg, rgba(229, 255, 204, 0.06), rgba(166, 255, 56, 0.18), rgba(240, 255, 224, 0.08));
  mix-blend-mode: screen;
  opacity: 0;
}

.spray-pass {
  right: -32%;
  width: 158%;
  height: 24%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 12% 47%, rgba(255, 255, 245, 0.82) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 23% 32%, rgba(211, 255, 158, 0.7) 0 2px, transparent 3.5px),
    radial-gradient(circle at 34% 68%, rgba(245, 255, 234, 0.72) 0 1px, transparent 2.5px),
    radial-gradient(ellipse at right, rgba(249, 255, 240, 0.55), rgba(187, 255, 91, 0.28) 34%, transparent 73%);
  background-size: 44px 36px, 61px 53px, 37px 47px, 100% 100%;
  filter: blur(4px) drop-shadow(0 0 16px rgba(193, 255, 95, 0.38));
  opacity: 0;
  transform: translateX(38%) rotate(-9deg) scaleX(0.38);
  transform-origin: right center;
}

.spray-pass-one {
  top: 68%;
}

.spray-pass-two {
  top: 41%;
}

.spray-pass-three {
  top: 15%;
}

.spray-effect.is-active .spray-haze {
  animation: spray-haze-hold 7s linear both;
}

.spray-effect.is-active .spray-pass-one {
  animation: spray-across 1.14s 40ms cubic-bezier(0.16, 0.72, 0.24, 1) both;
}

.spray-effect.is-active .spray-pass-two {
  animation: spray-across 1.2s 210ms cubic-bezier(0.16, 0.72, 0.24, 1) both;
}

.spray-effect.is-active .spray-pass-three {
  animation: spray-across 1.24s 390ms cubic-bezier(0.16, 0.72, 0.24, 1) both;
}

.game-shell:not(.is-playing) .spray-effect.is-active * {
  animation-play-state: paused;
}

.life {
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(213, 223, 198, 0.22);
  border-radius: 50% 48% 45% 52%;
  transform: rotate(-9deg);
  transition: 240ms ease;
}

.life::before,
.life::after {
  content: "";
  position: absolute;
  left: 4px;
  width: 11px;
  height: 2px;
  border-radius: 999px;
  background: rgba(213, 223, 198, 0.22);
  transition: inherit;
}

.life::before {
  top: 7px;
  transform: rotate(45deg);
}

.life::after {
  top: 10px;
  transform: rotate(-35deg);
}

.life.active {
  border-color: var(--acid);
  background: rgba(186, 255, 40, 0.11);
  box-shadow: 0 0 12px rgba(186, 255, 40, 0.38);
}

.life.active::before,
.life.active::after {
  background: var(--acid-hot);
}

.life.lost {
  opacity: 0.28;
  transform: rotate(25deg) scale(0.78);
}

.combo-burst {
  position: absolute;
  z-index: 18;
  top: 24%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translate(-50%, 18px) scale(0.72) rotate(-5deg);
  transition: opacity 160ms ease, transform 240ms cubic-bezier(0.2, 1.5, 0.4, 1);
  pointer-events: none;
}

.combo-burst.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1) rotate(-5deg);
}

.combo-burst span {
  color: var(--acid-hot);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(3.2rem, 16vw, 6.2rem);
  font-style: italic;
  line-height: 0.82;
  text-shadow: 4px 4px 0 #1b2b08, 0 0 26px rgba(186, 255, 40, 0.55);
}

.combo-burst small {
  margin-top: 10px;
  padding: 4px 9px;
  color: #10150c;
  background: var(--acid);
  font-size: 0.72rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
  transform: skew(-8deg);
}

.announcement {
  position: absolute;
  z-index: 19;
  top: 39%;
  left: 50%;
  width: 90%;
  opacity: 0;
  transform: translate(-50%, 16px) scale(0.88);
  color: var(--acid-hot);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.4rem, 7vw, 2.5rem);
  font-style: italic;
  letter-spacing: -0.025em;
  line-height: 0.95;
  text-align: center;
  text-shadow: 3px 3px 0 #172109, 0 0 26px rgba(186, 255, 40, 0.35);
  pointer-events: none;
  transition: opacity 150ms ease, transform 260ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.announcement.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.announcement.danger {
  color: #ff7753;
  text-shadow: 3px 3px 0 #32100b, 0 0 28px rgba(255, 64, 35, 0.45);
}

.gesture-hint {
  position: absolute;
  z-index: 16;
  left: 50%;
  bottom: max(7%, calc(env(safe-area-inset-bottom) + 24px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity 300ms ease;
}

.gesture-hint.show {
  opacity: 0.78;
}

.gesture-hint b {
  color: #d9dfcd;
  font-size: 0.75rem;
  letter-spacing: 0.17em;
}

.gesture-line {
  position: relative;
  width: 110px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--acid-hot), white, transparent);
  filter: drop-shadow(0 0 6px var(--acid));
  transform: rotate(-27deg);
  animation: swipe-hint 1.35s ease-in-out infinite;
}

.gesture-line::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(50%, -50%);
  box-shadow: 0 0 12px var(--acid);
}

.overlay {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(26px, env(safe-area-inset-top)) 24px max(26px, env(safe-area-inset-bottom));
  visibility: hidden;
  opacity: 0;
  background: rgba(3, 5, 3, 0.86);
  transition: opacity 260ms ease, visibility 260ms ease;
}

.overlay.is-visible {
  visibility: visible;
  opacity: 1;
}

.start-overlay {
  z-index: 50;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 135, 45, 0.17), transparent 34%),
    linear-gradient(180deg, rgba(20, 7, 2, 0.58), rgba(4, 2, 1, 0.95));
}

.start-content {
  display: flex;
  width: min(100%, 470px);
  flex-direction: column;
  align-items: center;
  padding-block: 12px;
  text-align: center;
}

.roach-emblem {
  position: relative;
  width: clamp(132px, 26vh, 206px);
  height: clamp(132px, 26vh, 206px);
  margin-bottom: 3px;
}

.roach-emblem::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 18%;
  border-radius: 50%;
  background: rgba(255, 119, 38, 0.25);
  filter: blur(22px);
  animation: emblem-glow 2.2s ease-in-out infinite;
}

.roach-emblem img {
  position: absolute;
  z-index: 2;
  inset: 2%;
  width: 96%;
  height: 96%;
  object-fit: contain;
  transform: rotate(-9deg);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.72));
  animation: roach-hover 3.2s ease-in-out infinite;
}

.emblem-ring {
  position: absolute;
  inset: 12%;
  border: 2px solid rgba(255, 166, 65, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 0 9px rgba(186, 255, 40, 0.04), inset 0 0 20px rgba(186, 255, 40, 0.13);
}

.emblem-ring::before,
.emblem-ring::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 60%;
  height: 7px;
  background: var(--warning);
  box-shadow: 0 0 16px rgba(255, 91, 33, 0.55);
  transform: translateX(-50%) rotate(-24deg) skew(-16deg);
}

.emblem-ring::before {
  top: -7px;
}

.emblem-ring::after {
  bottom: -7px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--acid);
  font-size: clamp(0.7rem, 2.8vw, 0.82rem);
  font-weight: 900;
  letter-spacing: 0.22em;
}

.season-title {
  margin: 11px 0 0;
  padding: 6px 11px;
  border: 1px solid rgba(255, 177, 78, 0.38);
  border-radius: 999px;
  background: rgba(255, 121, 30, 0.1);
  color: #ffd18b;
  font-size: 0.77rem;
  font-weight: 1000;
  letter-spacing: 0.16em;
}

h1,
h2 {
  margin: 0;
  font-family: "Arial Black", Impact, sans-serif;
  font-style: italic;
  letter-spacing: -0.065em;
  line-height: 0.82;
  transform: skew(-6deg);
}

h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(4.3rem, 20vw, 7.4rem);
  text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.78);
}

h1 strong {
  margin-top: 5px;
  color: var(--acid);
  font-size: 0.82em;
  letter-spacing: -0.04em;
  text-shadow: 5px 5px 0 #24370d, 0 0 30px rgba(186, 255, 40, 0.25);
}

.game-rules {
  max-width: 420px;
  margin: 15px 0 13px;
  color: #d6cab9;
  font-size: clamp(0.95rem, 3.8vw, 1.06rem);
  line-height: 1.48;
}

.season-features {
  display: flex;
  max-width: 430px;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
}

.season-features span {
  padding: 5px 8px;
  border: 1px solid rgba(255, 190, 102, 0.18);
  border-radius: 7px;
  background: rgba(36, 15, 6, 0.72);
  color: #e6c89f;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.game-shell.performance-mode .back-glow,
.game-shell.performance-mode .screen-grain {
  display: none;
}

.player-account-card {
  display: grid;
  width: min(100%, 410px);
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid rgba(186, 255, 40, 0.2);
  border-radius: 14px;
  background: rgba(8, 12, 7, 0.8);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
  text-align: left;
}

.player-account-card > svg {
  width: 24px;
  height: 24px;
  fill: var(--acid);
  filter: drop-shadow(0 0 8px rgba(186, 255, 40, 0.35));
}

.player-account-card span {
  min-width: 0;
}

.player-account-card strong,
.player-account-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-account-card strong {
  color: #edf4df;
  font-size: 0.8rem;
}

.player-account-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.69rem;
}

.player-account-card button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(186, 255, 40, 0.28);
  border-radius: 9px;
  background: rgba(186, 255, 40, 0.08);
  color: var(--acid-hot);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
}

.player-account-card button:disabled {
  cursor: wait;
  opacity: 0.45;
}

.primary-button {
  position: relative;
  display: inline-flex;
  min-width: min(100%, 280px);
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 25px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--acid-hot), var(--acid) 60%, #8bd515);
  color: #10150b;
  font-size: 0.98rem;
  font-weight: 1000;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 34px rgba(135, 218, 18, 0.22), inset 0 2px rgba(255, 255, 255, 0.34), inset 0 -3px rgba(54, 92, 5, 0.32);
  cursor: pointer;
  transition: transform 150ms ease, filter 150ms ease;
}

.primary-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -70%;
  width: 42%;
  height: 210%;
  background: rgba(255, 255, 255, 0.35);
  transform: rotate(25deg);
  transition: left 420ms ease;
}

.primary-button:hover::after {
  left: 130%;
}

.primary-button:active {
  transform: translateY(2px) scale(0.985);
  filter: brightness(0.94);
}

.primary-button:disabled {
  cursor: wait;
  filter: grayscale(0.45) brightness(0.68);
  opacity: 0.72;
}

.primary-button:disabled::after {
  display: none;
}

.primary-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.best-score {
  margin-top: 16px;
  color: #858d7c;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.best-score strong {
  margin-left: 6px;
  color: #d3d8c8;
  font-variant-numeric: tabular-nums;
}

.start-records {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 15px;
}

.start-records .best-score {
  margin-top: 0;
}

.leaderboard-link {
  padding: 5px 9px;
  border: 1px solid rgba(186, 255, 40, 0.25);
  border-radius: 999px;
  background: rgba(186, 255, 40, 0.07);
  color: var(--acid-hot);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.install-button {
  display: grid;
  width: min(100%, 310px);
  min-height: 52px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 6px 10px 6px 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(5, 8, 5, 0.76);
  color: var(--ink);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), 0 12px 25px rgba(0, 0, 0, 0.18);
  text-align: left;
  cursor: pointer;
}

.install-button img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 14px rgba(186, 255, 40, 0.22);
}

.install-button span,
.install-button strong,
.install-button small {
  display: block;
  min-width: 0;
}

.install-button strong {
  color: var(--acid-hot);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
}

.install-button small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-button > svg {
  width: 21px;
  height: 21px;
  fill: var(--acid);
}

.install-button:active {
  transform: translateY(1px) scale(0.99);
}

.install-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.music-credit {
  margin: 8px 0 0;
  color: #727a69;
  font-size: 0.75rem;
  line-height: 1.35;
}

.music-credit a {
  color: #9ca790;
  text-decoration-color: rgba(186, 255, 40, 0.32);
  text-underline-offset: 2px;
}

.music-credit a:focus-visible,
.music-credit a:hover {
  color: var(--acid-hot);
}

.panel {
  width: min(100%, 430px);
  padding: 32px 24px 26px;
  border: 1px solid rgba(186, 255, 40, 0.18);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(9, 12, 8, 0.92);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6), inset 0 1px rgba(255, 255, 255, 0.06);
  text-align: center;
}

.panel h2 {
  margin: 10px 0 30px;
  font-size: clamp(3.4rem, 16vw, 5.4rem);
}

.auth-overlay {
  z-index: 70;
  background:
    radial-gradient(circle at 50% 35%, rgba(186, 255, 40, 0.12), transparent 38%),
    rgba(2, 4, 2, 0.94);
}

.install-overlay {
  z-index: 75;
  background:
    radial-gradient(circle at 50% 32%, rgba(186, 255, 40, 0.14), transparent 40%),
    rgba(2, 4, 2, 0.95);
}

.install-panel {
  position: relative;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  text-align: left;
}

.install-app-icon {
  display: block;
  width: 82px;
  height: 82px;
  margin-bottom: 18px;
  border: 1px solid rgba(186, 255, 40, 0.28);
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 0 28px rgba(186, 255, 40, 0.2), 0 15px 35px rgba(0, 0, 0, 0.32);
}

.install-panel h2 {
  max-width: 320px;
  margin: 8px 0 16px;
  font-size: clamp(2.15rem, 11vw, 3.45rem);
  line-height: 0.92;
}

.install-now {
  width: 100%;
  margin-bottom: 16px;
}

.install-now[hidden] {
  display: none;
}

.install-steps {
  display: grid;
  gap: 10px;
}

.install-steps div {
  display: grid;
  gap: 3px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.install-steps strong {
  color: var(--acid-hot);
  font-size: 0.82rem;
}

.install-steps span {
  color: #bbc2b2;
  font-size: 0.86rem;
  line-height: 1.42;
}

.auth-panel {
  position: relative;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding-top: 26px;
  text-align: left;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 13px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #d9dfd0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.auth-key {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(186, 255, 40, 0.24);
  border-radius: 14px;
  background: rgba(186, 255, 40, 0.08);
}

.auth-key svg {
  width: 25px;
  height: 25px;
  fill: var(--acid);
}

.auth-panel h2 {
  max-width: 330px;
  margin: 8px 0 16px;
  font-size: clamp(2rem, 10vw, 3.15rem);
  line-height: 0.92;
}

.auth-description {
  margin: 0 0 20px;
  color: #b9c0b0;
  font-size: 0.96rem;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: #e9efdf;
  font-size: 0.86rem;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 233, 192, 0.2);
  border-radius: 11px;
  outline: none;
  background: rgba(1, 3, 1, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.auth-form input:focus {
  border-color: rgba(186, 255, 40, 0.72);
  box-shadow: 0 0 0 3px rgba(186, 255, 40, 0.1);
}

.auth-form input::placeholder {
  color: #747d6d;
}

.auth-feedback {
  padding: 10px 11px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.auth-feedback[hidden] {
  display: none;
}

.auth-error {
  border: 1px solid rgba(255, 48, 56, 0.28);
  background: rgba(255, 48, 56, 0.09);
  color: #ffb7b2;
}

.auth-message {
  border: 1px solid rgba(186, 255, 40, 0.24);
  background: rgba(186, 255, 40, 0.08);
  color: #dfffa0;
}

.auth-submit {
  width: 100%;
  margin-top: 3px;
}

.compact-panel .primary-button {
  min-width: 240px;
}

.text-button {
  display: block;
  margin: 18px auto 0;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: #aeb5a5;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.text-button:disabled {
  cursor: wait;
  opacity: 0.42;
}

.gameover-overlay {
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 47, 56, 0.12), transparent 38%),
    rgba(3, 4, 3, 0.78);
}

.gameover-panel {
  position: relative;
  overflow: hidden;
}

.gameover-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--danger), var(--warning), transparent);
  box-shadow: 0 0 18px var(--danger);
}

.gameover-panel h2 {
  margin-bottom: 26px;
  color: #fff2e8;
  text-shadow: 4px 4px 0 #3a0c08;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 17px;
  border-block: 1px solid rgba(255, 255, 255, 0.09);
}

.result-grid div {
  padding: 16px 9px;
}

.result-grid div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.result-grid span {
  display: block;
  margin-bottom: 4px;
  color: #858d7c;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.result-grid strong {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(1.65rem, 8vw, 2.5rem);
  font-style: italic;
}

.new-record {
  min-height: 20px;
  margin: 0 0 18px;
  color: var(--acid);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  opacity: 0;
}

.new-record.show {
  opacity: 1;
  animation: record-pulse 0.8s ease-in-out infinite alternate;
}

.gameover-leaderboard {
  margin-top: 12px;
}

.leaderboard-overlay {
  z-index: 76;
  background:
    radial-gradient(circle at 50% 30%, rgba(186, 255, 40, 0.13), transparent 40%),
    rgba(2, 4, 2, 0.95);
}

.leaderboard-panel {
  position: relative;
  display: flex;
  max-height: calc(100dvh - 40px);
  flex-direction: column;
  overflow: hidden;
  padding: 27px 18px 18px;
  text-align: left;
}

.leaderboard-panel h2 {
  margin: 7px 0 18px;
  color: var(--acid-hot);
  font-size: clamp(2.6rem, 13vw, 4.5rem);
  text-shadow: 3px 3px 0 #26390e;
}

.leaderboard-status {
  margin: 18px 0;
  color: #aeb7a4;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-align: center;
}

.leaderboard-list {
  min-height: 0;
  margin: 0;
  padding: 0 4px 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: rgba(186, 255, 40, 0.4) transparent;
}

.leaderboard-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 37px;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.018);
}

.leaderboard-list li:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.leaderboard-list li:nth-child(-n + 3) {
  background: linear-gradient(90deg, rgba(186, 255, 40, 0.1), rgba(186, 255, 40, 0.015));
}

.leaderboard-list li.is-current-player {
  box-shadow: inset 3px 0 var(--acid);
}

.leaderboard-list span {
  color: #7f8978;
  font-size: 0.72rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.leaderboard-list strong {
  color: #f3f8e8;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 1.02rem;
  font-style: italic;
  letter-spacing: 0.14em;
}

.leaderboard-list b {
  color: var(--acid-hot);
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 0.94rem;
  font-style: italic;
  font-variant-numeric: tabular-nums;
}

.leaderboard-panel > .text-button {
  margin-top: 12px;
}

.score-entry-overlay {
  z-index: 78;
  background:
    radial-gradient(circle at 50% 34%, rgba(186, 255, 40, 0.17), transparent 39%),
    rgba(2, 4, 2, 0.96);
}

.score-entry-panel {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}

.score-entry-panel h2 {
  margin: 8px 0 15px;
  color: var(--acid-hot);
  font-size: clamp(2.55rem, 13vw, 4.2rem);
  text-shadow: 3px 3px 0 #26390e;
}

.score-entry-description {
  margin: 0;
  color: #b9c1b0;
  font-size: 0.92rem;
}

.qualifying-score {
  display: block;
  margin: 10px 0 18px;
  color: #f5f8ed;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(2rem, 10vw, 3rem);
  font-style: italic;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(186, 255, 40, 0.22);
}

.score-entry-form {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.score-entry-form label {
  color: var(--acid);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.score-entry-form input {
  width: 170px;
  min-height: 66px;
  padding: 7px 10px;
  border: 2px solid rgba(186, 255, 40, 0.38);
  border-radius: 12px;
  outline: none;
  background: rgba(1, 3, 1, 0.84);
  color: #f5f9eb;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 2rem;
  font-style: italic;
  letter-spacing: 0.28em;
  text-align: center;
  text-indent: 0.28em;
  text-transform: uppercase;
}

.score-entry-form input:focus {
  border-color: var(--acid-hot);
  box-shadow: 0 0 0 4px rgba(186, 255, 40, 0.12), 0 0 26px rgba(186, 255, 40, 0.16);
}

.score-entry-form .auth-feedback {
  width: 100%;
}

.score-entry-form .primary-button {
  width: 100%;
}

.loading-badge {
  position: absolute;
  z-index: 80;
  left: 50%;
  bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--acid);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  transform: translateX(-50%);
  transition: opacity 220ms ease, visibility 220ms ease;
}

.loading-badge.is-hidden {
  visibility: hidden;
  opacity: 0;
}

@keyframes roach-hover {
  0%, 100% { transform: translateY(0) rotate(-9deg); }
  50% { transform: translateY(-9px) rotate(-5deg); }
}

@keyframes emblem-glow {
  0%, 100% { opacity: 0.55; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes swipe-hint {
  0%, 100% { opacity: 0.25; transform: translate(-26px, 20px) rotate(-27deg) scaleX(0.65); }
  48% { opacity: 1; }
  65% { opacity: 0.9; transform: translate(28px, -20px) rotate(-27deg) scaleX(1.05); }
}

@keyframes record-pulse {
  from { text-shadow: 0 0 4px rgba(186, 255, 40, 0.2); }
  to { text-shadow: 0 0 16px rgba(186, 255, 40, 0.8); }
}

@keyframes spray-can-kick {
  0%, 100% { transform: rotate(0deg) translateX(0); }
  35% { transform: rotate(5deg) translateX(-2px); }
  70% { transform: rotate(-3deg) translateX(1px); }
}

@keyframes spray-across {
  0% { opacity: 0; transform: translateX(38%) rotate(-9deg) scaleX(0.38); }
  12% { opacity: 0.94; }
  68% { opacity: 0.76; }
  100% { opacity: 0; transform: translateX(-17%) rotate(-9deg) scaleX(1.06); }
}

@keyframes spray-haze-hold {
  0% { opacity: 0; transform: scale(0.96); }
  9% { opacity: 0.82; }
  78% { opacity: 0.31; }
  100% { opacity: 0; transform: scale(1.05); }
}

@media (max-height: 710px) {
  .roach-emblem {
    width: 118px;
    height: 118px;
  }

  h1 {
    font-size: clamp(3.8rem, 17vw, 5.5rem);
  }

  .game-rules {
    margin-block: 13px 15px;
    font-size: 0.91rem;
  }

  .season-title {
    margin-top: 7px;
  }

  .season-features {
    margin-bottom: 10px;
  }

  .player-account-card {
    margin-bottom: 10px;
    padding-block: 8px;
  }

  .primary-button {
    min-height: 52px;
  }

  .best-score {
    margin-top: 11px;
  }

  .start-records {
    margin-top: 10px;
  }

  .install-button {
    min-height: 46px;
    margin-top: 9px;
  }
}

@media (max-height: 600px) {
  .roach-emblem {
    width: 82px;
    height: 82px;
  }

  h1 {
    font-size: 3rem;
  }

  .game-rules {
    display: none;
  }

  .player-account-card {
    margin-top: 12px;
  }

  .install-button {
    min-height: 42px;
  }

  .install-button img {
    width: 34px;
    height: 34px;
  }

  .leaderboard-panel {
    padding-block: 22px 14px;
  }

  .leaderboard-panel h2 {
    margin-bottom: 12px;
    font-size: 2.45rem;
  }

  .leaderboard-list li {
    min-height: 31px;
    padding-block: 5px;
  }

  .spray-button {
    width: 118px;
    min-height: 62px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .spray-button img {
    width: 40px;
    height: 51px;
  }
}

@media (max-width: 390px) {
  .hud {
    padding-inline: 11px;
  }

  .status-rail {
    left: 11px;
    right: 11px;
  }

  .brand-lockup {
    display: none;
  }

  .hud {
    grid-template-columns: 1fr 1fr;
  }

  .season-chip {
    min-width: 168px;
  }
}

@media (min-width: 761px) {
  body {
    background:
      radial-gradient(circle at 50% 55%, rgba(211, 91, 27, 0.12), transparent 36%),
      repeating-linear-gradient(135deg, #080402 0 24px, #0d0603 24px 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Thanksgiving comic film: native video decoding, no per-frame DOM animation. */
.intro-replay {
  margin: 0 0 12px;
  padding: 10px 14px;
  min-height: 44px;
  border: 1px solid rgba(255, 190, 94, 0.5);
  border-radius: 7px;
  color: #ffdba3;
  background: rgba(37, 15, 7, 0.88);
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}
.comic-intro {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #130a07;
  color: #fff2d9;
}
.comic-intro::backdrop { background: #130a07; }
.comic-intro video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.intro-controls {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  left: max(12px, env(safe-area-inset-left));
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.intro-controls button, .intro-play {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #bd956d;
  border-radius: 5px;
  background: rgba(20, 10, 6, 0.94);
  color: #fff0d0;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}
.intro-controls button:last-child { margin-left: auto; }
.intro-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.intro-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.intro-is-playing .game-shell *,
.intro-is-playing .game-shell *::before,
.intro-is-playing .game-shell *::after { animation-play-state: paused !important; }
