:root {
  --brat-green: #b2ff1a;
  --accent-color: #d8ff74;
  --ink: #060606;
  --card-bg: rgba(0, 0, 0, 0.08);
  --line: rgba(0, 0, 0, 0.24);
  --subtle: rgba(0, 0, 0, 0.68);
  --soft: rgba(255, 255, 255, 0.55);
  --turbo-flash: rgba(178, 255, 26, 0.7);
  --dark-contrast-level: 0;
  --page-shell-max: 896px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.52);
  outline-offset: 2px;
}

body {
  position: relative;
  background: var(--brat-green);
  color: var(--ink);
  font-family: "Space Grotesk", sans-serif;
  padding: 1rem 1rem 1.3rem;
  overflow-x: hidden;
  transition: background 240ms ease;
}

body.level-1 {
  --brat-green: #b2ff1a;
  --accent-color: #d8ff74;
  --turbo-flash: rgba(178, 255, 26, 0.7);
}

body.level-2 {
  --brat-green: #ff9fd7;
  --accent-color: #ffe4f3;
  --turbo-flash: rgba(255, 173, 219, 0.78);
}

body.level-3 {
  --brat-green: #8ec1ff;
  --accent-color: #e9f2ff;
  --turbo-flash: rgba(162, 203, 255, 0.78);
}

body.dark-contrast .app-title,
body.dark-contrast .clicker-heading,
body.dark-contrast .phase-label,
body.dark-contrast .eyebrow,
body.dark-contrast .footer-note {
  color: rgba(245, 255, 221, 0.98);
}

body.dark-contrast .topbar,
body.dark-contrast .tab-toolbar,
body.dark-contrast .fx-controls,
body.dark-contrast .quest-card-wide,
body.dark-contrast .status-card,
body.dark-contrast .status-scroll > section,
body.dark-contrast .tutorial-hint-card,
body.dark-contrast .viral-card,
body.dark-contrast .objective-row,
body.dark-contrast .tip-row,
body.dark-contrast .ad-slot {
  background: rgba(255, 255, 255, calc(0.12 + var(--dark-contrast-level) * 0.34));
  border: 1px solid rgba(255, 255, 255, calc(0.22 + var(--dark-contrast-level) * 0.42));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

body.dark-contrast .topbar,
body.dark-contrast .tab-toolbar,
body.dark-contrast .fx-controls,
body.dark-contrast .quest-card-wide,
body.dark-contrast .tutorial-hint-card,
body.dark-contrast .viral-card {
  border-radius: 12px;
  padding: 0.5rem 0.56rem;
}

body.dark-contrast .tutorial-hint-card {
  margin-top: 0.55rem;
  gap: 0.7rem;
}

body.dark-contrast .viral-note,
body.dark-contrast #viral-status,
body.dark-contrast .viral-cooldown,
body.dark-contrast .tutorial-hint-card .micro-note {
  color: rgba(0, 0, 0, 0.8);
}

body.dark-contrast .viral-track {
  background: rgba(0, 0, 0, 0.32);
}

body.dark-contrast .hint {
  color: rgba(245, 255, 221, 0.96);
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.82);
}

body.dark-contrast .viral-banner {
  background: rgba(255, 255, 255, calc(0.26 + var(--dark-contrast-level) * 0.36));
  color: rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, calc(0.28 + var(--dark-contrast-level) * 0.42));
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

body.dark-contrast.turbo-mode .viral-banner {
  background: rgba(255, 255, 255, calc(0.28 + var(--dark-contrast-level) * 0.38));
  color: rgba(0, 0, 0, 0.95);
  border-color: rgba(255, 255, 255, calc(0.3 + var(--dark-contrast-level) * 0.44));
}

body.dark-contrast .status-card,
body.dark-contrast .status-scroll > section {
  border-radius: 10px;
  padding: 0.45rem 0.52rem 0.62rem;
  border-bottom: 1px solid rgba(255, 255, 255, calc(0.18 + var(--dark-contrast-level) * 0.36));
}

body.dark-contrast .status-scroll > section:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, calc(0.18 + var(--dark-contrast-level) * 0.36));
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Bungee", sans-serif;
  letter-spacing: 0.03em;
}

.snow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.snow-particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  animation: snowBurst 780ms ease-out forwards;
}

.emoji-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.turbo-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 34;
  background: transparent;
}

body.intro-active {
  overflow: hidden;
}

body.hide-seek-active {
  overflow: hidden;
}

body.tier-minigame-active {
  overflow: hidden;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}

.intro-dialog {
  width: min(92vw, 760px);
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 0.65rem;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.88), rgba(8, 8, 8, 0.92)),
    rgba(0, 0, 0, 0.9);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  text-align: center;
  padding: 1.1rem 1rem;
}

.intro-line {
  margin: 0;
  color: #d9ff7f;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.45;
  max-width: 92%;
  text-wrap: balance;
}

.intro-arrow {
  display: inline-block;
  margin-left: 0.52rem;
  color: #ffffff;
  animation: introArrowPulse 850ms ease-in-out infinite;
}

.intro-continue {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intro-actions {
  margin-top: 0.18rem;
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
}

.intro-btn {
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #f2ffd1;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.8rem;
  padding: 0.38rem 0.85rem;
  cursor: pointer;
}

.intro-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.intro-btn.intro-skip {
  color: #ffffff;
}

.hide-seek-overlay {
  position: fixed;
  inset: 0;
  z-index: 44;
  display: grid;
  place-items: start center;
  padding: clamp(1rem, 8vh, 4.8rem) 1rem 1rem;
  background: rgba(0, 0, 0, 0.78);
}

.hide-seek-dialog {
  width: min(92vw, 560px);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.92), rgba(10, 10, 10, 0.95));
  color: #f2ffd0;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.52);
  text-align: center;
  padding: 1rem;
}

.hide-seek-dialog h2 {
  font-size: clamp(1rem, 2.6vw, 1.45rem);
  color: #d2ff67;
}

.hide-seek-copy {
  margin-top: 0.38rem;
  font-size: 0.88rem;
  color: rgba(242, 255, 214, 0.94);
}

.hide-seek-choices {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.52rem;
}

.hide-seek-choice {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f2ffd0;
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  line-height: 1;
  padding: 0.58rem 0.4rem;
  cursor: pointer;
  transition: transform 110ms ease, background 130ms ease, border-color 140ms ease;
}

.hide-seek-choice:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
}

.hide-seek-choice.is-picked {
  border-color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.22);
}

.hide-seek-choice.is-winning {
  border-color: rgba(178, 255, 26, 0.96);
  background: rgba(178, 255, 26, 0.22);
  box-shadow: 0 0 0 2px rgba(178, 255, 26, 0.26);
}

.hide-seek-choice:disabled {
  cursor: default;
}

.hide-seek-result {
  min-height: 1.2rem;
  margin-top: 0.62rem;
  color: rgba(242, 255, 214, 0.95);
  font-size: 0.82rem;
  font-weight: 700;
}

.hide-seek-continue {
  margin-top: 0.34rem;
}

.tier-minigame-overlay {
  position: fixed;
  inset: 0;
  z-index: 44;
  display: grid;
  place-items: start center;
  padding: clamp(1rem, 8vh, 4.8rem) 1rem 1rem;
  background: rgba(0, 0, 0, 0.8);
}

.tier-minigame-dialog {
  width: min(92vw, 620px);
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.92), rgba(7, 7, 7, 0.95));
  color: #efffc7;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.54);
  text-align: center;
  padding: 0.95rem;
}

.tier-minigame-dialog h2 {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: #d4ff70;
}

.tier-minigame-subtitle {
  margin-top: 0.32rem;
  font-size: 0.83rem;
  color: rgba(239, 255, 199, 0.9);
}

.tier-minigame-timer {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.tier-minigame-arena {
  margin-top: 0.58rem;
  display: grid;
  gap: 0.46rem;
}

.tier-briefing {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 0.7rem 0.72rem;
}

.tier-briefing-rule {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: rgba(239, 255, 199, 0.96);
}

.tier-start-btn {
  min-width: min(220px, 96%);
}

.tier-wheel-wrap {
  display: grid;
  gap: 0.52rem;
  justify-items: center;
}

.tier-wheel-shell {
  position: relative;
  width: min(250px, 82vw);
}

.tier-wheel-pointer {
  position: absolute;
  top: -0.7rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.15rem;
  color: #ffffff;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.tier-wheel-disc {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.22),
    0 12px 22px rgba(0, 0, 0, 0.35);
}

.tier-wheel-go {
  min-width: min(220px, 100%);
}

.tier-wheel-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(440px, 100%);
  display: grid;
  gap: 0.26rem;
}

.tier-wheel-legend-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.34rem;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9px;
  padding: 0.24rem 0.42rem;
  background: rgba(255, 255, 255, 0.06);
}

.tier-wheel-legend-item.is-selected {
  border-color: rgba(178, 255, 26, 0.84);
  background: rgba(178, 255, 26, 0.2);
}

.tier-wheel-legend-swatch {
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.42);
}

.tier-wheel-legend-label {
  font-size: 0.71rem;
  line-height: 1.22;
  text-align: left;
  color: rgba(239, 255, 199, 0.95);
}

.tier-wheel-legend-share {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(239, 255, 199, 0.9);
}

.tier-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.tier-choice-btn,
.tier-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #f0ffd0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.2rem, 3.2vw, 2rem);
  font-weight: 700;
  line-height: 1;
  padding: 0.52rem 0.36rem;
  cursor: pointer;
  transition: transform 110ms ease, background 130ms ease, border-color 130ms ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.tier-action-btn {
  width: min(320px, 100%);
  min-height: 96px;
  font-size: clamp(1.4rem, 4.8vw, 2.1rem);
  letter-spacing: 0.08em;
}

.tier-rapid-wrap {
  display: grid;
  justify-items: center;
  gap: 0.44rem;
}

.tier-choice-btn:hover,
.tier-action-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.tier-action-btn:active {
  transform: scale(0.97);
}

.tier-choice-btn.is-picked {
  border-color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.24);
}

.tier-choice-btn.is-winning {
  border-color: rgba(178, 255, 26, 0.95);
  background: rgba(178, 255, 26, 0.22);
  box-shadow: 0 0 0 2px rgba(178, 255, 26, 0.26);
}

.tier-choice-btn:disabled,
.tier-action-btn:disabled {
  cursor: default;
}

.tier-progress {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  color: rgba(239, 255, 199, 0.92);
}

.tier-sequence-view {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.95rem);
  letter-spacing: 0.06em;
}

.tier-drag-tokens {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.44rem;
  flex-wrap: wrap;
}

.tier-drag-token {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #f0ffd0;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 1;
  padding: 0.45rem 0.52rem;
  cursor: grab;
  touch-action: manipulation;
}

.tier-drop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}

.tier-drop-zone {
  border: 1px dashed rgba(255, 255, 255, 0.52);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  min-height: 70px;
  display: grid;
  place-items: center;
  gap: 0.12rem;
  padding: 0.35rem;
}

.tier-drop-zone.is-matched {
  border-style: solid;
  border-color: rgba(178, 255, 26, 0.94);
  background: rgba(178, 255, 26, 0.18);
}

.tier-shadow {
  font-size: clamp(1.2rem, 2.7vw, 1.8rem);
  opacity: 0.36;
  filter: grayscale(1) brightness(0.4) blur(0.2px);
}

.tier-drop-zone.is-matched .tier-shadow {
  opacity: 1;
  filter: none;
}

.tier-drop-label {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(239, 255, 199, 0.78);
}

.tier-minigame-result {
  min-height: 1.2rem;
  margin-top: 0.58rem;
  color: rgba(239, 255, 199, 0.96);
  font-size: 0.82rem;
  font-weight: 700;
}

.tier-minigame-continue {
  margin-top: 0.26rem;
}

.bg-emoji {
  position: absolute;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  opacity: 0.56;
  animation: emojiFloat 3200ms ease-out forwards;
  user-select: none;
}

.ad-banner,
.topbar,
.tab-toolbar,
.layout,
.tip-row,
.footer-note {
  max-width: var(--page-shell-max);
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 5;
}

.ad-banner {
  margin-bottom: 0.7rem;
}

.ad-bottom {
  margin-top: 0.95rem;
}

.mobile-controls-dock {
  display: none;
}

.ad-slot {
  min-height: 96px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
  padding: 0.32rem;
  transition: border-color 180ms ease, background 180ms ease;
}

.ad-slot-auto-preferred {
  display: grid;
  place-items: center;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.28);
  background: rgba(255, 255, 255, 0.4);
}

.ad-placement-note {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: rgba(0, 0, 0, 0.72);
}

.gam-ad-slot {
  width: 100%;
  min-height: 88px;
  display: grid;
  place-items: center;
}

.gam-ad-slot iframe {
  max-width: 100%;
}

.ad-slot-fallback {
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.24);
}

.ad-fallback {
  min-height: 88px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.68);
}

.ad-fallback:not(.ad-fallback-creative) {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.22),
      rgba(255, 255, 255, 0.22) 10px,
      rgba(0, 0, 0, 0.03) 10px,
      rgba(0, 0, 0, 0.03) 20px
    );
}

.ad-fallback-creative {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.56rem;
  text-align: left;
  padding: 0.52rem 0.62rem;
  color: #0a0a0a;
  background:
    linear-gradient(135deg, rgba(218, 255, 70, 0.92), rgba(246, 255, 205, 0.94)),
    repeating-linear-gradient(
      -35deg,
      rgba(0, 0, 0, 0.04),
      rgba(0, 0, 0, 0.04) 9px,
      rgba(255, 255, 255, 0.1) 9px,
      rgba(255, 255, 255, 0.1) 18px
    );
  border: 1px solid rgba(0, 0, 0, 0.18);
  animation: adFallbackFade 220ms ease-out;
}

.ad-fallback-badge {
  align-self: start;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.14rem 0.36rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  background: rgba(255, 255, 255, 0.74);
  white-space: nowrap;
}

.ad-fallback-main {
  min-width: 0;
}

.ad-fallback-title,
.ad-fallback-copy {
  margin: 0;
}

.ad-fallback-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.ad-fallback-emoji {
  font-size: 1.15rem;
  line-height: 1;
}

.ad-fallback-copy {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.74);
}

.ad-fallback-cta {
  justify-self: end;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.24rem 0.52rem;
  white-space: nowrap;
}

@keyframes adFallbackFade {
  from {
    opacity: 0.45;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
  text-align: center;
}

.topbar-spacer {
  min-height: 1px;
}

.app-title-btn {
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.app-title-btn:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.42);
  outline-offset: 3px;
  border-radius: 8px;
}

.top-help-btn {
  justify-self: start;
  min-height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  background: rgba(255, 255, 255, 0.45);
}

.topbar-links {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
}

.topbar-sep {
  font-weight: 700;
  color: rgba(0, 0, 0, 0.56);
  user-select: none;
}

.top-media-link {
  color: rgba(0, 0, 0, 0.88);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}

.top-media-link:hover,
.top-media-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.phase-label {
  margin-top: -0.25rem;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  color: rgba(0, 0, 0, 0.72);
}

.tab-toolbar {
  margin: 0 auto 0.75rem;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.32rem;
}

.toolbar-side-anchor {
  min-height: 50px;
}

.toolbar-side {
  min-height: 50px;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.18rem;
  align-self: stretch;
}

.fx-controls {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.2rem;
  align-items: stretch;
}

.fx-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  padding: 0.08rem 0.32rem;
  font-size: 0.62rem;
  font-weight: 700;
  min-height: 100%;
  white-space: nowrap;
}

.fx-toggle input {
  margin: 0;
  transform: scale(0.74);
  transform-origin: center center;
}

.tab-bar {
  display: flex;
  gap: 0.28rem;
  min-width: 0;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 999px;
  padding: 0.2rem 0.28rem;
}

.tab-bar-items {
  display: flex;
  gap: 0.24rem;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  width: 100%;
}

.tab-bar-items::-webkit-scrollbar {
  display: none;
}

.tab-btn.mobile-tab-toggle {
  display: none;
}

.tab-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #090909;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1;
  min-height: 36px;
  padding: 0.4rem 0.82rem;
  cursor: pointer;
  transition: transform 100ms ease, background 120ms ease;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  touch-action: manipulation;
}

.tab-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.56);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tab-btn.active {
  background: rgba(0, 0, 0, 0.88);
  color: var(--accent-color);
  border-color: rgba(0, 0, 0, 0.92);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  margin-left: 0.3rem;
  padding: 0 0.35rem;
  background: #ff2c74;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.eyebrow {
  margin-bottom: 0.24rem;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.6);
}

h1 {
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
}

.app-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  display: block;
  width: auto;
  text-align: center;
  transform-origin: center center;
  white-space: nowrap;
}

.app-title-btn:hover .app-title,
.app-title-btn:focus-visible .app-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.clicker-heading {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #0a0a0a;
}

.app-title.clicker-heading {
  font-size: clamp(0.98rem, 2.2vw, 1.54rem);
  line-height: 1.05;
  animation: titlePulseSlow 6.2s ease-in-out infinite;
}

.quest-card-wide > h2.clicker-heading,
.quest-inline-copy > h2.clicker-heading,
.stats-card > h2.clicker-heading,
.tip-card > h2.clicker-heading {
  font-size: clamp(1.14rem, 2.3vw, 1.52rem);
}

.tab-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 0.2rem;
  justify-content: end;
  align-items: stretch;
}

.tab-actions .secondary-btn {
  min-height: 100%;
  padding: 0.16rem 0.54rem;
  font-size: 0.66rem;
  line-height: 1;
}

.icon-btn {
  min-width: 1.65rem;
  padding-left: 0.34rem;
  padding-right: 0.34rem;
}

.icon-btn span {
  font-size: 1rem;
  line-height: 1;
}

.secondary-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--ink);
  min-height: 34px;
  padding: 0.42rem 0.86rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: transform 110ms ease, background 120ms ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.62);
  transform: translateY(-1px);
}

.danger-btn {
  border-color: rgba(0, 0, 0, 0.35);
}

.layout {
  max-width: var(--page-shell-max);
  margin: 0 auto;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-bg);
  padding: 0.72rem;
}

.tutorial-hint-card {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  background: rgba(0, 0, 0, 0.16);
  border-color: rgba(0, 0, 0, 0.32);
}

.tutorial-hint-card h3 {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tutorial-dismiss {
  white-space: nowrap;
}

.click-card {
  display: grid;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.quest-card-wide {
  padding: 0.36rem 0.62rem;
}

.quest-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  align-items: center;
  gap: 0.62rem;
}

.quest-inline-copy {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 0.12rem;
  min-width: 0;
}

.quest-inline-copy > h2.clicker-heading {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.quest-inline-progress {
  display: flex;
  align-items: center;
  gap: 0.46rem;
}

.quest-card-hidden {
  display: none;
}

.quest-card-reveal {
  animation: questUnlockReveal 560ms cubic-bezier(0.2, 0.9, 0.22, 1) both;
}

.game-top-grid {
  margin-top: 0.68rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 0.74rem;
  align-items: start;
}

.game-top-grid > * {
  min-width: 0;
}

.status-column {
  display: grid;
  gap: 0.58rem;
  align-content: start;
  min-width: 0;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
}

.status-card {
  min-width: 0;
}

.status-scroll {
  display: grid;
  gap: 0.58rem;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  min-width: 0;
}

.status-scroll::-webkit-scrollbar {
  width: 9px;
}

.status-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.28);
  border-radius: 999px;
}

.status-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.status-scroll > section {
  margin: 0;
  padding: 0 0 0.62rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
  min-width: 0;
  overflow: hidden;
}

.status-scroll > section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.hint {
  margin: 0.2rem 0 0.65rem;
  color: var(--subtle);
  text-align: center;
  font-weight: 700;
  font-size: 0.86rem;
}

.clicker-zone {
  position: relative;
  --drag-x: 0px;
  --drag-y: 0px;
  transform: translate(var(--drag-x), var(--drag-y));
  transition: transform 180ms cubic-bezier(0.2, 0.9, 0.22, 1);
}

.clicker-zone.is-dragging {
  transition: none;
}

.clicker-btn {
  width: min(94%, 420px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  border: 8px solid #030303;
  border-radius: 2px;
  background: var(--brat-green);
  color: #0a0a0a;
  font-family: "Bungee", sans-serif;
  cursor: grab;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 90ms ease, box-shadow 140ms ease;
  box-shadow:
    0 22px 34px rgba(0, 0, 0, 0.22),
    inset 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.clicker-btn::after {
  content: "";
  position: absolute;
  inset: -6%;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.58), transparent 56%),
    radial-gradient(circle at 50% 75%, rgba(0, 0, 0, 0.25), transparent 64%);
}

.clicker-btn > * {
  pointer-events: none;
}

.clicker-btn:hover {
  transform: translateY(-2px) scale(1.005);
  box-shadow:
    0 28px 40px rgba(0, 0, 0, 0.26),
    inset 0 0 0 2px rgba(0, 0, 0, 0.14);
}

.clicker-btn:active {
  transform: scale(0.978) rotate(-0.18deg);
}

.clicker-zone.is-dragging .clicker-btn {
  cursor: grabbing;
}

.clicker-btn.pulse {
  animation: clickPulse 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.clicker-btn.pulse::after {
  animation: clickFlash 240ms ease-out;
}

.bump-label {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #0a0a0a;
}

.button-bumps {
  margin-top: 0.05rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #0a0a0a;
}

.tap-pop-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.tap-pop {
  position: absolute;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
  animation: tapPop 520ms ease-out forwards;
  z-index: 9;
}

.viral-card {
  margin: 0;
  padding: 0.64rem 0.76rem;
}

.viral-card h3 {
  text-align: left;
  font-size: 0.95rem;
}

.viral-card-wide {
  width: 100%;
}

.viral-full-width {
  width: 100%;
  margin-top: 0.72rem;
}

.viral-note {
  margin-top: 0.2rem;
  text-align: center;
  color: rgba(0, 0, 0, 0.72);
  font-size: 0.75rem;
}

.viral-track {
  margin-top: 0.45rem;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.viral-inline-row {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem;
}

.viral-inline-title {
  white-space: nowrap;
  font-size: clamp(0.9rem, 1.35vw, 1.04rem);
}

.viral-inline-track {
  margin-top: 0;
  min-width: 0;
}

.viral-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffffff, #ffd1f1);
  transition: width 120ms ease;
}

.viral-meter-readout {
  margin-top: 0.22rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
}

.viral-actions {
  margin-top: 0.45rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
}

.viral-cooldown {
  --cooldown-progress: 0;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.32);
  background: conic-gradient(
    from -90deg,
    rgba(122, 122, 122, 0.86) calc(var(--cooldown-progress) * 1turn),
    rgba(160, 160, 160, 0.18) calc(var(--cooldown-progress) * 1turn) 1turn
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 2px 8px rgba(0, 0, 0, 0.18);
  position: relative;
  flex: 0 0 auto;
}

.viral-cooldown::after {
  content: "";
  position: absolute;
  inset: 0.33rem;
  border-radius: 50%;
  background: rgba(240, 240, 240, 0.86);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

body.dark-contrast .viral-cooldown {
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.24);
}

.viral-cooldown.hidden {
  display: none;
}

.viral-btn {
  white-space: nowrap;
}

.viral-btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.viral-btn.viral-ready-glow {
  border-color: rgba(0, 0, 0, 0.9);
  background: rgba(255, 255, 255, 0.98);
  color: #060606;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.52),
    0 0 20px rgba(255, 255, 255, 0.84),
    0 0 46px rgba(178, 255, 26, 0.88),
    0 0 72px rgba(0, 0, 0, 0.4);
  animation: alarmReadyGlow 780ms ease-in-out infinite;
}

@keyframes alarmReadyGlow {
  0% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.42),
      0 0 14px rgba(255, 255, 255, 0.72),
      0 0 34px rgba(178, 255, 26, 0.72),
      0 0 52px rgba(0, 0, 0, 0.3);
  }
  50% {
    transform: translateY(-1px) scale(1.08);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.54),
      0 0 26px rgba(255, 255, 255, 0.96),
      0 0 58px rgba(178, 255, 26, 0.94),
      0 0 88px rgba(0, 0, 0, 0.48);
  }
  100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.42),
      0 0 14px rgba(255, 255, 255, 0.72),
      0 0 34px rgba(178, 255, 26, 0.72),
      0 0 52px rgba(0, 0, 0, 0.3);
  }
}

.dealer-card {
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.56rem;
}

.dealer-card-wide {
  margin-top: 0;
}

.dealer-full-width {
  width: 100%;
  margin-top: 0.72rem;
}

.dealer-card-wide .dealer-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strobe-card {
  padding: 0.2rem 0.54rem 0.54rem;
}

.strobe-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.strobe-toggle input {
  width: auto;
  margin: 0;
}

.strobe-note {
  margin-top: 0.18rem;
}

.dealer-card h3 {
  color: #111;
  text-align: center;
  font-size: 0.98rem;
}

.section-title-clicker {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  text-align: left;
  color: #0a0a0a;
}

.compact-section-title {
  font-size: clamp(0.94rem, 1.6vw, 1.16rem);
}

.dealer-note {
  margin-top: 0.25rem;
  text-align: center;
  color: var(--subtle);
  font-size: 0.76rem;
}

.dealer-card-wide .dealer-note {
  text-align: left;
}

.dealer-subtitle {
  margin: 0.4rem 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.74);
}

.bulk-buy-row {
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.bulk-buy-label {
  margin: 0;
}

.bulk-buy-btn {
  padding: 0.28rem 0.64rem;
}

.bulk-buy-btn.active {
  background: rgba(0, 0, 0, 0.88);
  color: var(--accent-color);
  border-color: rgba(0, 0, 0, 0.9);
}

.generator-carousel {
  margin-top: 0.28rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.3rem;
  align-items: start;
}

.generator-arrow {
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: #0b0b0b;
  font-weight: 700;
  font-size: 1.2rem;
  width: 2.2rem;
  min-height: 2.35rem;
  height: 2.35rem;
  align-self: start;
  cursor: pointer;
  transition: transform 90ms ease, background 120ms ease;
}

.generator-arrow:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.9);
}

.generator-arrow:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.generator-page-label {
  text-align: center;
}

.characters-card {
  width: 100%;
}

.character-list {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.36rem;
}

.character-item {
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  padding: 0.46rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.character-item.active {
  border-color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.82);
  color: #dbff7d;
}

.character-item.locked {
  opacity: 0.52;
  filter: grayscale(1);
}

.character-name {
  font-weight: 700;
  font-size: 0.84rem;
}

.character-meta {
  font-size: 0.7rem;
  opacity: 0.82;
}

.character-passcode {
  margin-top: 0.16rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.character-state {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code-entry {
  margin-top: 0.58rem;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  padding-top: 0.5rem;
}

.code-controls {
  margin-top: 0.32rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
}

.code-input {
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 9px;
  padding: 0.45rem 0.55rem;
  background: rgba(255, 255, 255, 0.66);
  color: #0b0b0b;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
}

.code-input::placeholder {
  color: rgba(0, 0, 0, 0.46);
  text-transform: none;
}

.code-btn {
  white-space: nowrap;
}

.code-feedback-success {
  color: #0b3f00;
  font-weight: 700;
}

.code-feedback-error {
  color: #8a0027;
  font-weight: 700;
}

.help-card {
  width: 100%;
}

.help-steps {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.3rem;
  font-size: 0.82rem;
  line-height: 1.35;
}

.help-steps li {
  margin: 0;
}

.shop-list {
  display: grid;
  align-items: start;
  align-content: start;
  grid-auto-rows: minmax(0, auto);
  gap: 0.52rem;
  margin-top: 0.24rem;
}

.dealer-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-item {
  position: relative;
  align-self: start;
  height: auto;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.26);
  border-radius: 11px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 255, 255, 0.78), transparent 60%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.62), rgba(220, 250, 255, 0.34) 52%, rgba(0, 0, 0, 0.08)),
    rgba(255, 255, 255, 0.44);
  padding: 0.52rem 0.54rem 0.5rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition: transform 120ms ease, box-shadow 150ms ease, border-color 120ms ease, background 140ms ease;
}

.shop-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.14), transparent 30%, transparent 70%, rgba(255, 255, 255, 0.1)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 10px
    );
  pointer-events: none;
}

.shop-item-upgrade {
  border-left: 4px solid rgba(255, 71, 176, 0.64);
}

.shop-item-generator {
  border-left: 4px solid rgba(59, 133, 255, 0.62);
}

.shop-item:hover {
  transform: translateY(-1px) scale(1.005);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
  border-color: rgba(0, 0, 0, 0.44);
}

.shop-item.affordable {
  border-color: rgba(10, 120, 0, 0.62);
  box-shadow: 0 12px 24px rgba(5, 82, 0, 0.26);
}

.shop-item-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: start;
}

.shop-item-emoji {
  width: 3.34rem;
  height: 3.34rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.58));
  border: 1px solid rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.46),
    0 8px 16px rgba(0, 0, 0, 0.18);
  font-size: 2.26rem;
  line-height: 1;
}

.shop-item-title-wrap h4 {
  font-size: 0.79rem;
  color: #0e0e0e;
  line-height: 1.15;
  word-break: break-word;
}

.shop-item-title-wrap {
  min-width: 0;
}

.shop-item-subtitle {
  margin-top: 0.08rem;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.7);
}

.shop-item-chip {
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.34rem;
  color: rgba(0, 0, 0, 0.78);
}

.shop-item-tags {
  display: grid;
  justify-items: end;
  gap: 0.16rem;
}

.shop-item-ready {
  border-radius: 999px;
  border: 1px solid rgba(12, 79, 0, 0.35);
  background: rgba(214, 255, 122, 0.84);
  color: #0c4f00;
  font-size: 0.52rem;
  letter-spacing: 0.09em;
  font-weight: 800;
  padding: 0.12rem 0.35rem;
}

.shop-item-desc {
  position: relative;
  z-index: 1;
  margin: 0.28rem 0 0.38rem;
  min-height: 2.25em;
  font-size: 0.68rem;
  line-height: 1.32;
  color: rgba(0, 0, 0, 0.76);
}

.shop-item-footer {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.32rem;
}

.shop-item-stat {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.66);
}

.shop-item button {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.34);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(233, 233, 233, 0.74));
  color: #0f0f0f;
  font-weight: 700;
  font-size: 0.69rem;
  letter-spacing: 0.02em;
  padding: 0.34rem 0.45rem;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: transform 90ms ease, background 120ms ease, box-shadow 150ms ease;
}

.shop-item button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -34%;
  width: 22%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.95), transparent);
  opacity: 0;
  pointer-events: none;
  transform: skewX(-18deg);
}

.shop-item button:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(245, 245, 245, 0.84));
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.18);
}

.shop-item button:hover::after {
  opacity: 1;
  animation: shopShine 640ms ease-out;
}

.shop-item button:active {
  transform: scale(0.972);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.shop-item button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.dark-contrast .shop-item {
  border-color: rgba(255, 255, 255, 0.5);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(255, 255, 255, 0.3), transparent 60%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12) 58%, rgba(0, 0, 0, 0.18)),
    rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.26);
}

body.dark-contrast .shop-item-title-wrap h4,
body.dark-contrast .shop-item-subtitle,
body.dark-contrast .shop-item-desc,
body.dark-contrast .shop-item-chip,
body.dark-contrast .shop-item-stat {
  color: rgba(0, 0, 0, 0.86);
}

body.dark-contrast .shop-item button {
  border-color: rgba(0, 0, 0, 0.4);
}

.viral-banner,
.rebrand-row {
  width: min(96%, 560px);
  margin-left: auto;
  margin-right: auto;
}

.achievement-pop {
  width: min(92%, 500px);
  margin: 0.55rem auto 0;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.86);
  color: #080808;
  text-align: center;
  padding: 0.42rem 0.58rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.viral-banner {
  margin-top: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #0d0d0d;
  text-align: center;
  padding: 0.38rem 0.5rem;
  font-weight: 700;
}

body.turbo-mode .turbo-overlay {
  animation: turboStrobe 1200ms ease-in-out infinite;
}

body.turbo-strobe .turbo-overlay {
  animation: turboStrobeFast 360ms steps(2, end) infinite;
}

body.turbo-mode .viral-banner {
  background: rgba(0, 0, 0, 0.86);
  color: #d2ff67;
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.hidden {
  display: none;
}

.rebrand-row {
  margin-top: 0.62rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  text-align: center;
}

.rebrand-btn {
  border-color: rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.56);
  margin-bottom: 0.35rem;
}

.rebrand-btn.rebrand-ready {
  width: 100%;
  min-width: 0;
  padding: 0.72rem 1.1rem;
  font-family: "Bungee", sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.36rem);
  letter-spacing: 0.04em;
  border-width: 2px;
  border-radius: 12px;
}

.rebrand-btn.rebrand-pulse {
  animation: rebrandReadyPulse 1300ms ease-in-out infinite;
}

.rebrand-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status-card {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.22);
  padding: 0.64rem;
  text-align: center;
}

.status-feedback {
  min-height: 1.32rem;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.1;
  color: rgba(0, 0, 0, 0.85);
  text-align: center;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
}

.status-feedback-track {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  will-change: transform;
}

.status-feedback.status-feedback-marquee .status-feedback-track {
  animation: statusFeedbackMarquee var(--status-marquee-duration, 7.4s) ease-in-out infinite alternate;
}

.status-run-code-label {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(0, 0, 0, 0.62);
  text-align: left;
  white-space: nowrap;
}

.status-run-code-row {
  margin-top: 0.22rem;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.38rem;
}

.status-run-code-input {
  margin-top: 0;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(0, 0, 0, 0.88);
  padding: 0.4rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
}

.status-run-code-input:focus {
  outline: 2px solid rgba(0, 0, 0, 0.42);
  outline-offset: 1px;
}

.music-card {
  padding: 0.64rem;
  min-width: 0;
}

.music-now-playing {
  margin: 0;
}

.music-track-title {
  margin-top: 0.34rem;
  font-weight: 700;
  font-size: 0.84rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.music-track-meta {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.72);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.music-open-link {
  display: inline-flex;
  margin-top: 0.18rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  color: rgba(0, 0, 0, 0.84);
}

.music-player-wrap {
  margin-top: 0.46rem;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.09);
}

.music-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
  background: rgba(0, 0, 0, 0.16);
}

.objective-row {
  width: min(96%, 620px);
  margin-top: 0.95rem;
  border-top: 2px solid rgba(0, 0, 0, 0.22);
  padding-top: 0.72rem;
}

.objective-btn {
  display: block;
  width: fit-content;
  min-width: 180px;
  margin: 0 auto 0.42rem;
  padding: 0.42rem 0.85rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 10px;
  border-width: 1px;
  background: rgba(0, 0, 0, 0.86);
  color: var(--accent-color);
  transition: transform 130ms ease, box-shadow 140ms ease, background 140ms ease;
}

.objective-btn:hover {
  background: rgba(0, 0, 0, 0.94);
}

.objective-hint {
  margin-top: 0.08rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.82);
}

@keyframes rebrandReadyPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.18), 0 0 0 rgba(178, 255, 26, 0);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2), 0 0 28px rgba(178, 255, 26, 0.48);
  }
}

@keyframes statusFeedbackMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-1 * var(--status-marquee-distance, 0px)));
  }
}

.stats-card {
  padding: 0.2rem 0.54rem 0.54rem;
  min-width: 0;
}

.stats-grid {
  margin-top: 0.44rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.26rem;
}

.stat-card {
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
  padding: 0.4rem 0.3rem;
  display: grid;
  justify-items: center;
  align-items: center;
  text-align: center;
  gap: 0.06rem;
  min-height: 66px;
}

.stat-card h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.57rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: rgba(0, 0, 0, 0.64);
  order: 3;
}

.stat-card p {
  margin-top: 0;
  font-weight: 800;
  font-size: clamp(1rem, 1.8vw, 1.34rem);
  line-height: 1.06;
  order: 1;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stat-subline {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(0, 0, 0, 0.62);
  order: 2;
}

.stats-meta-line {
  margin-top: 0.34rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.7);
  text-align: left;
  overflow-wrap: anywhere;
}

body.ui-concept-strip .stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.ui-concept-strip .stat-card h2 {
  font-size: 0.67rem;
  letter-spacing: 0.08em;
}

body.ui-concept-strip .stat-card p {
  font-size: 0.95rem;
}

body.ui-concept-pulse .game-top-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
}

body.ui-concept-pulse .status-column {
  grid-template-columns: 1fr;
  gap: 0.42rem;
  max-width: 420px;
}

body.ui-concept-pulse .status-column > section {
  border-bottom: 2px solid rgba(0, 0, 0, 0.28);
  border-radius: 0;
  background: transparent;
  padding-bottom: 0.7rem;
}

body.ui-concept-pulse .status-column .status-card,
body.ui-concept-pulse .status-column .strobe-card {
  grid-column: 1 / -1;
}

body.ui-concept-pulse .stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

body.ui-concept-pulse .stat-card {
  display: grid;
  justify-content: stretch;
  gap: 0.1rem;
}

body.ui-concept-pulse .stat-card p {
  margin-top: 0.2rem;
}

body.ui-concept-terminal .status-column {
  gap: 0.5rem;
}

body.ui-concept-terminal .status-column > section {
  border-bottom: 1px dashed rgba(0, 0, 0, 0.42);
}

body.ui-concept-terminal .status-feedback,
body.ui-concept-terminal .status-run-code-input,
body.ui-concept-terminal .stat-card p {
  font-family: "Bungee", sans-serif;
  letter-spacing: 0.05em;
}

body.ui-concept-terminal .stats-grid {
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.3);
}

body.ui-concept-terminal .stat-card {
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
}

.quest-title {
  margin: 0;
  font-weight: 800;
  font-size: 0.98rem;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.quest-summary {
  margin-top: 0;
  font-size: 0.69rem;
  line-height: 1.25;
  text-align: left;
}

.quest-progress-meta {
  margin: 0;
  min-width: 3.2rem;
  text-align: right;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.quest-progress-track {
  height: 9px;
  margin: 0;
  flex: 1 1 auto;
  width: auto;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.14);
}

.quest-progress-fill {
  width: 0%;
  height: 100%;
  background: rgba(255, 255, 255, 0.84);
  transition: width 160ms ease;
}

.quest-card.quest-win {
  animation: questWinPulse 1100ms ease-out;
  border-color: rgba(0, 0, 0, 0.68);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.62), 0 8px 22px rgba(0, 0, 0, 0.22);
}

.achievement-list {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
}

.achievement-list li {
  margin-bottom: 0.3rem;
  color: rgba(0, 0, 0, 0.72);
}

.achievement-grid {
  list-style: none;
  padding-left: 0;
  margin-top: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, auto);
  gap: 0.42rem;
}

.achievement-item {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 0.42rem;
  background: rgba(255, 255, 255, 0.4);
  min-height: 70px;
}

.achievement-item.locked {
  opacity: 0.44;
  filter: grayscale(1);
}

.achievement-item.unlocked {
  opacity: 1;
}

.achievement-name {
  display: inline-block;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.2;
}

.achievement-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.42rem;
  margin-bottom: 0.2rem;
}

.achievement-labels {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  flex-shrink: 0;
}

.achievement-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  padding: 0.08rem 0.34rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
}

.achievement-tag-new {
  background: #050505;
  color: #b2ff1a;
  border-color: rgba(0, 0, 0, 0.72);
}

.achievement-tag-unlocked {
  background: rgba(178, 255, 26, 0.46);
  color: rgba(0, 0, 0, 0.9);
}

.achievement-tag-locked {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.7);
}

.achievement-requirement {
  display: block;
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.7);
}

.tip-card p {
  margin-top: 0.26rem;
  text-align: center;
}

.tip-row {
  margin-top: 0.82rem;
  width: fit-content;
  max-width: min(92vw, 420px);
  margin-left: auto;
  margin-right: auto;
  padding: 0.52rem 0.72rem;
  text-align: center;
}

.tip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tip-card .clicker-heading,
.tip-card .tip-link,
.tip-card .micro-note {
  text-transform: lowercase;
}

.tip-links {
  margin-top: 0.16rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  flex-wrap: nowrap;
}

.tip-link {
  display: inline-block;
  margin: 0.15rem 0.28rem 0.1rem 0;
  padding: 0.3rem 0.58rem;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  color: #080808;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
  font-weight: 700;
  font-size: 0.79rem;
}

.micro-note {
  margin-top: 0.42rem;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.66);
}

.ambient-snow {
  position: absolute;
  font-size: var(--size);
  line-height: 1;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
  opacity: 0.95;
  animation: ambientSnowFall var(--duration) linear forwards;
}

.footer-note {
  margin-top: 0.88rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.62);
}

.minigame-lab-toggle {
  border: 0;
  background: none;
  color: rgba(0, 0, 0, 0.82);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.08rem 0.2rem;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.48);
}

.minigame-lab-toggle:hover {
  color: #090909;
  border-bottom-style: solid;
}

.minigame-lab-controls {
  margin: 0.45rem auto 0;
  width: min(520px, 100%);
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.46);
  padding: 0.55rem 0.56rem;
}

.minigame-lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.minigame-lab-field {
  display: grid;
  gap: 0.18rem;
  text-align: left;
}

.minigame-lab-field > span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.72);
}

.minigame-lab-field select {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #080808;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.34rem 0.4rem;
}

.minigame-lab-actions {
  margin-top: 0.48rem;
  display: flex;
  justify-content: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.run-recap-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.74);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.run-recap-overlay.hidden {
  display: none !important;
}

.run-recap-dialog {
  width: min(92vw, 760px);
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  background: rgba(5, 5, 5, 0.92);
  color: #f1ffd2;
  padding: 1rem;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5);
}

.run-recap-dialog h2,
.run-recap-dialog h3 {
  text-align: center;
}

.run-recap-metrics {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.run-recap-metrics p {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.38rem 0.46rem;
  font-size: 0.8rem;
}

.run-modifier-options {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.35rem;
}

.run-modifier-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #e7ffc2;
  padding: 0.42rem 0.5rem;
  cursor: pointer;
}

.run-modifier-item strong {
  display: block;
  font-size: 0.86rem;
}

.run-modifier-item span {
  display: block;
  font-size: 0.74rem;
  opacity: 0.92;
}

.run-modifier-item.active {
  border-color: rgba(178, 255, 26, 0.86);
  background: rgba(178, 255, 26, 0.16);
}

.run-recap-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.admin-link {
  color: rgba(0, 0, 0, 0.78);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.5);
}

.admin-link:hover {
  color: #090909;
  border-bottom-style: solid;
}

.admin-hidden {
  display: none !important;
}

@keyframes tapPop {
  from {
    transform: translateY(0) scale(0.94);
    opacity: 1;
  }
  to {
    transform: translateY(-22px) scale(1.02);
    opacity: 0;
  }
}

@keyframes clickPulse {
  from {
    transform: scale(0.97) rotate(-0.3deg);
    box-shadow:
      0 36px 42px rgba(0, 0, 0, 0.34),
      inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  }
  to {
    transform: scale(1);
  }
}

@keyframes clickFlash {
  from {
    opacity: 0.86;
  }
  to {
    opacity: 0;
  }
}

@keyframes introArrowPulse {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.45;
  }
  50% {
    transform: translateX(4px);
    opacity: 1;
  }
}

@keyframes snowBurst {
  from {
    opacity: 0.94;
    transform: translate(0, 0) scale(0.6);
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.2);
  }
}

@keyframes emojiFloat {
  from {
    opacity: 0.66;
    transform: translateY(0) scale(0.95) rotate(0deg);
  }
  to {
    opacity: 0.1;
    transform: translateY(-88px) scale(1.18) rotate(12deg);
  }
}

@keyframes ambientSnowFall {
  from {
    transform: translate3d(0, -12vh, 0);
    opacity: 0.15;
  }
  7% {
    opacity: 0.95;
  }
  to {
    transform: translate3d(var(--drift), 112vh, 0);
    opacity: 0;
  }
}

@keyframes turboStrobe {
  0%,
  100% {
    background: rgba(0, 0, 0, 0);
  }
  40% {
    background: rgba(0, 0, 0, 0.26);
  }
  70% {
    background: rgba(0, 0, 0, 0.45);
  }
}

@keyframes turboStrobeFast {
  0%,
  100% {
    background: rgba(0, 0, 0, 0);
  }
  25% {
    background: rgba(0, 0, 0, 0.76);
  }
  50% {
    background: var(--turbo-flash);
  }
  75% {
    background: rgba(0, 0, 0, 0.68);
  }
}

@keyframes questWinPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.72);
  }
  45% {
    transform: scale(1.014);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@keyframes questUnlockReveal {
  0% {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
  60% {
    opacity: 1;
    transform: translateY(2px) scale(1.005);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shopShine {
  from {
    left: -28%;
  }
  to {
    left: 122%;
  }
}

@keyframes titlePulseSlow {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.038);
  }
}

@media (max-width: 980px) {
  .layout {
    max-width: 720px;
  }

  .game-top-grid {
    grid-template-columns: 1fr;
  }

  .status-column {
    grid-template-columns: 1fr;
    align-items: start;
    max-width: none;
  }

  .status-scroll {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .stats-grid,
  body.ui-concept-strip .stats-grid,
  body.ui-concept-pulse .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dealer-list {
    grid-template-columns: 1fr;
  }

  .dealer-card-wide .dealer-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .run-recap-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y;
  }

  body {
    padding: 0.8rem;
    padding-bottom: calc(5.8rem + env(safe-area-inset-bottom, 0px));
    touch-action: pan-y;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.32rem;
    text-align: center;
  }

  .app-title.clicker-heading {
    font-size: clamp(0.9rem, 4.4vw, 1.2rem);
  }

  .top-help-btn {
    min-height: 30px;
    padding: 0.32rem 0.62rem;
    font-size: 0.72rem;
  }

  .topbar-links {
    gap: 0.2rem;
  }

  .top-media-link {
    font-size: 0.7rem;
  }

  .tab-toolbar {
    min-height: 0;
    margin-bottom: 0.5rem;
    gap: 0.45rem;
    grid-template-columns: 1fr;
    align-items: stretch;
    z-index: 110;
    pointer-events: auto;
  }

  .toolbar-side-anchor {
    min-height: 0;
  }

  .mobile-controls-dock {
    display: block;
    margin: 0 auto 0.42rem;
    max-width: var(--page-shell-max);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    z-index: 220;
  }

  .mobile-controls-dock::-webkit-scrollbar {
    display: none;
  }

  .mobile-controls-dock .toolbar-side {
    min-height: 0;
    width: max-content;
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.26rem;
  }

  .mobile-controls-dock .tab-actions,
  .mobile-controls-dock .fx-controls {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0.26rem;
  }

  .mobile-controls-dock .tab-actions .secondary-btn,
  .mobile-controls-dock .fx-toggle {
    min-height: 34px;
  }

  .fx-controls {
    grid-template-columns: repeat(3, minmax(0, auto));
    justify-content: flex-start;
    gap: 0.36rem;
  }

  .tab-bar {
    position: fixed;
    left: 50%;
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(calc(100% - 1rem), var(--page-shell-max));
    min-height: 52px;
    margin-bottom: 0;
    justify-content: flex-start;
    z-index: 1000;
    background: rgb(245 247 230 / 1);
    border: 1px solid rgba(0, 0, 0, 0.52);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
    pointer-events: auto;
    opacity: 1;
    backdrop-filter: none;
  }

  .tab-bar,
  .tab-bar * {
    pointer-events: auto;
  }

  .toolbar-side,
  .tab-actions,
  .fx-controls {
    pointer-events: auto;
  }

  .tab-btn.mobile-tab-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    min-height: 42px;
    padding: 0.36rem 0.62rem;
    gap: 0.18rem;
  }

  .mobile-tab-icon {
    font-size: 1rem;
    line-height: 1;
  }

  .mobile-tab-label {
    font-size: 0.68rem;
    text-transform: lowercase;
  }

  .tab-bar-items {
    flex: 1 1 auto;
    justify-content: flex-start;
    max-width: 100%;
    opacity: 1;
    transition: max-width 220ms ease, opacity 180ms ease, transform 180ms ease;
  }

  body.mobile-tabs-collapsed .tab-bar {
    width: auto;
    min-width: 3.1rem;
    padding-right: 0.24rem;
    padding-left: 0.24rem;
  }

  body.mobile-tabs-collapsed .tab-bar-items {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateX(0.2rem);
  }

  body.mobile-tabs-collapsed .mobile-tab-label {
    display: none;
  }

  .tab-actions {
    justify-content: flex-start;
  }

  .quest-inline-row {
    grid-template-columns: 1fr;
    gap: 0.42rem;
  }

  .minigame-lab-grid {
    grid-template-columns: 1fr;
  }

  .quest-title {
    font-size: 0.82rem;
  }

  .quest-summary {
    font-size: 0.65rem;
  }

  .quest-inline-progress {
    width: 100%;
  }

  .quest-progress-meta {
    min-width: 2.9rem;
    font-size: 0.62rem;
  }

  .status-run-code-row {
    gap: 0.26rem;
  }

  .status-run-code-label {
    font-size: 0.6rem;
  }

  .status-run-code-input {
    padding: 0.3rem 0.4rem;
    font-size: 0.66rem;
  }

  .clicker-btn {
    width: 100%;
    max-width: 440px;
    border-width: 6px;
  }

  .viral-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .viral-inline-row {
    grid-template-columns: auto minmax(92px, 1fr) auto auto;
    gap: 0.34rem;
  }

  .viral-inline-title {
    font-size: 0.78rem;
  }

  .viral-btn {
    font-size: 0.64rem;
    padding: 0.3rem 0.58rem;
  }

  .viral-cooldown {
    width: 1.72rem;
    height: 1.72rem;
  }

  .code-controls {
    grid-template-columns: 1fr;
  }

  .status-column {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  body.ui-concept-strip .stats-grid,
  body.ui-concept-pulse .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ui-concept-pulse .status-column {
    grid-template-columns: 1fr;
  }

  .dealer-card-wide .dealer-list {
    grid-template-columns: 1fr;
  }

  .run-recap-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
