:root {
  --black: #0A0A0A;
  --blue: #00AEEF;
  --ice: #66D9FF;
  --grey: #2A2A2A;
  --green: #00FF88;
  --red: #FF3B30;
  --gold: #FFD700;
  --orange: #FF9F1C;
  --white: #FFFFFF;
  --panel: rgba(16, 22, 27, 0.78);
  --panel-strong: rgba(30, 39, 46, 0.9);
  --line: rgba(102, 217, 255, 0.18);
  --shadow-blue: 0 0 28px rgba(0, 174, 239, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior-y: contain;
  background: var(--black);
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

button:focus-visible {
  outline: 3px solid rgba(102, 217, 255, 0.9);
  outline-offset: 3px;
}

#root {
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

.app-shell,
.arcade-shell {
  position: relative;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(0, 174, 239, 0.16), transparent 34%),
    radial-gradient(circle at 16% 12%, rgba(0, 174, 239, 0.22), transparent 28rem),
    radial-gradient(circle at 84% 22%, rgba(255, 215, 0, 0.1), transparent 22rem),
    linear-gradient(145deg, #050505 0%, #0A0A0A 52%, #11181c 100%);
}

.app-shell::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(102, 217, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(102, 217, 255, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 88%);
}

.screen-pad {
  width: min(1180px, 100%);
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.start-screen,
.intro-screen,
.ad-screen,
.game-over {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  text-align: center;
}

.brand-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(102, 217, 255, 0.22);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.62);
  box-shadow: inset 0 0 18px rgba(0, 174, 239, 0.08);
  color: var(--ice);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

.volume-toggle {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 20;
  display: grid;
  grid-template-columns: 34px minmax(0, auto);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: calc(100vw - 24px);
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(102, 217, 255, 0.28);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.78);
  box-shadow: 0 0 24px rgba(0, 174, 239, 0.22);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: blur(16px);
}

.volume-toggle span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.92), rgba(102, 217, 255, 0.7));
  color: #061116;
  font-size: 0.58rem;
  font-weight: 950;
}

.volume-toggle strong {
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.volume-toggle.muted {
  border-color: rgba(255, 59, 48, 0.36);
}

.volume-toggle.muted span {
  background: linear-gradient(135deg, var(--red), #ff8a84);
}

.hero-logo {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: min(100%, 720px);
}

.logo-orbit {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}

.orbit-ring,
.logo-core {
  position: absolute;
  border-radius: 999px;
}

.ring-one {
  inset: 0;
  border: 2px solid rgba(0, 174, 239, 0.62);
  box-shadow: 0 0 28px rgba(0, 174, 239, 0.45);
  animation: slow-spin 9s linear infinite;
}

.ring-two {
  inset: 22px;
  border: 1px solid rgba(255, 215, 0, 0.52);
  border-top-color: transparent;
  animation: slow-spin 5s linear infinite reverse;
}

.logo-core {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.98), rgba(102, 217, 255, 0.78));
  box-shadow: var(--shadow-blue);
  color: #061116;
  font-size: 3.7rem;
  font-weight: 950;
}

.eyebrow {
  margin: 0;
  color: var(--ice);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.gold-text {
  color: var(--gold);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero-logo h1,
.intro-screen h1,
.ad-panel h1,
.game-over h1,
.music-challenge-band h1 {
  margin: 0;
  color: var(--white);
  font-size: 3rem;
  line-height: 0.92;
  font-weight: 950;
  text-shadow: 0 0 24px rgba(0, 174, 239, 0.52), 0 0 54px rgba(0, 174, 239, 0.26);
}

.tagline {
  max-width: 32rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  font-weight: 700;
}

.primary-button,
.ghost-button,
.gold-button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 950;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.primary-button {
  min-width: min(100%, 280px);
  padding: 0 26px;
  background: linear-gradient(135deg, var(--blue), var(--ice));
  box-shadow: 0 0 30px rgba(0, 174, 239, 0.48), inset 0 -10px 24px rgba(0, 0, 0, 0.18);
  color: #061116;
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:hover,
  .gold-button:hover,
  .ghost-button:hover,
  .answer-card:hover,
  .difficulty-button:hover,
  .volume-toggle:hover,
  .power-button:not(:disabled):hover {
    transform: translateY(-2px);
  }
}

.start-button {
  width: min(100%, 360px);
}

.difficulty-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 680px);
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.56);
  box-shadow: inset 0 0 22px rgba(0, 174, 239, 0.08), 0 14px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px);
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.difficulty-button {
  display: grid;
  gap: 4px;
  min-height: 84px;
  padding: 10px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.difficulty-button span,
.difficulty-button small,
.difficulty-summary {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.difficulty-button strong {
  color: var(--white);
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.difficulty-button small,
.difficulty-summary {
  text-transform: none;
}

.difficulty-button.active {
  border-color: rgba(0, 255, 136, 0.58);
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.28), rgba(0, 255, 136, 0.1));
  box-shadow: 0 0 26px rgba(0, 174, 239, 0.24);
}

.difficulty-button.active span {
  color: var(--green);
}

.difficulty-summary {
  display: block;
  color: rgba(255, 255, 255, 0.76);
}

.ghost-button {
  min-width: min(100%, 220px);
  padding: 0 18px;
  border: 1px solid rgba(102, 217, 255, 0.34);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}

.gold-button {
  min-width: min(100%, 180px);
  padding: 0 18px;
  background: linear-gradient(135deg, var(--gold), #fff2a1);
  box-shadow: 0 0 32px rgba(255, 215, 0, 0.4);
  color: #161100;
}

.gold-ghost {
  border-color: rgba(255, 215, 0, 0.38);
}

.equalizer {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  align-items: end;
  gap: 5px;
  width: min(100%, 420px);
  height: 76px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.44);
}

.equalizer span {
  min-width: 5px;
  height: var(--bar-height);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ice), var(--blue));
  box-shadow: 0 0 14px rgba(0, 174, 239, 0.7);
  animation: pulse-bar 900ms ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * 55ms);
}

.intro-screen {
  background: radial-gradient(circle at center, rgba(0, 174, 239, 0.18), transparent 25rem);
}

.intro-mark {
  width: 124px;
  height: 124px;
  filter: drop-shadow(0 0 28px rgba(0, 174, 239, 0.58));
  animation: intro-pop 900ms ease both;
}

.intro-loader {
  width: min(100%, 320px);
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.intro-loader span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--ice), var(--gold));
  transform-origin: left center;
  animation: load-sting 3.8s linear forwards;
}

.game-screen,
.music-screen {
  display: grid;
  gap: 14px;
  padding-top: max(66px, env(safe-area-inset-top));
}

.active-panel-stack {
  display: grid;
  gap: 14px;
}

.mode-window {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 260px);
}

.mode-tab {
  min-height: 42px;
  border: 1px solid rgba(102, 217, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 950;
}

.mode-tab.active {
  border-color: rgba(102, 217, 255, 0.48);
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.92), rgba(102, 217, 255, 0.72));
  color: #061116;
  box-shadow: 0 0 22px rgba(0, 174, 239, 0.28);
}

.timer-state {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(0, 255, 136, 0.22);
  border-radius: 999px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.timer-state.paused {
  border-color: rgba(255, 215, 0, 0.28);
  color: var(--gold);
}

.game-header {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.68);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.mini-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-brand img {
  width: 42px;
  height: 42px;
}

.mini-brand p,
.mini-brand span {
  display: block;
  margin: 0;
}

.mini-brand p {
  font-size: 0.88rem;
  font-weight: 950;
}

.mini-brand span {
  color: var(--ice);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.stat,
.power-button,
.answer-card,
.board-panel,
.question-panel,
.ad-panel,
.music-challenge-band {
  border: 1px solid rgba(102, 217, 255, 0.16);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.stat {
  min-height: 62px;
  padding: 10px;
  border-radius: 8px;
}

.stat > span {
  display: block;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 3px;
  color: var(--white);
  font-size: 1.14rem;
  line-height: 1.05;
  font-weight: 950;
}

.danger-stat strong {
  color: var(--red);
}

.timer-track {
  width: 100%;
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.timer-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--ice), var(--blue));
  transition: width 220ms ease;
}

.danger-stat .timer-track span {
  background: var(--red);
}

.hearts {
  display: inline-flex;
  gap: 3px;
  white-space: nowrap;
}

.heart {
  display: inline-block;
  color: rgba(255, 255, 255, 0.22);
  text-shadow: none;
}

.heart.alive {
  color: var(--red);
  text-shadow: 0 0 12px rgba(255, 59, 48, 0.5);
}

.progress-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.progress-strip span,
.height-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(102, 217, 255, 0.16);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 850;
}

.game-layout {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.question-panel {
  order: -1;
}

.board-panel,
.question-panel {
  border-radius: 8px;
  padding: 14px;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title-row h2 {
  margin: 3px 0 0;
  font-size: 1.05rem;
  line-height: 1.15;
  font-weight: 950;
}

.board-grid {
  display: grid;
  gap: 3px;
  width: min(100%, 352px);
  aspect-ratio: 10 / 18;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(0, 0, 0, 0.36);
  box-shadow: inset 0 0 24px rgba(0, 174, 239, 0.1), 0 0 28px rgba(0, 174, 239, 0.16);
}

.board-grid.placement-ready {
  cursor: crosshair;
  border-color: rgba(255, 215, 0, 0.34);
  box-shadow: inset 0 0 24px rgba(255, 215, 0, 0.08), 0 0 30px rgba(255, 215, 0, 0.16);
}

.board-cell {
  min-width: 0;
  min-height: 0;
  border-radius: 4px;
  border: 1px solid rgba(102, 217, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.board-cell.filled,
.piece-preview .active {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.2), 0 0 14px rgba(0, 174, 239, 0.25);
}

.board-cell.ghost-cell {
  opacity: 0.58;
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: inset 0 0 12px rgba(255, 215, 0, 0.22), 0 0 16px rgba(255, 215, 0, 0.2);
}

.piece-cyan {
  background: linear-gradient(135deg, #66D9FF, #00AEEF);
}

.piece-blue {
  background: linear-gradient(135deg, #00AEEF, #0078ff);
}

.piece-green {
  background: linear-gradient(135deg, #00FF88, #00AEEF);
}

.piece-ice {
  background: linear-gradient(135deg, #FFFFFF, #66D9FF);
}

.piece-gold {
  background: linear-gradient(135deg, #FFD700, #FFFFFF);
}

.piece-red {
  background: linear-gradient(135deg, #FF3B30, #FFD700);
}

.piece-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.placement-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.placement-panel.active {
  border-color: rgba(255, 215, 0, 0.28);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(0, 174, 239, 0.08));
}

.placement-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.placement-title strong {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 950;
}

.placement-controls {
  display: grid;
  grid-template-columns: 50px minmax(0, 0.9fr) minmax(0, 1.1fr) 50px;
  gap: 8px;
}

.control-button,
.rotate-button,
.drop-button {
  min-width: 0;
  min-height: 50px;
}

.rotate-button {
  padding: 0 10px;
  border-color: rgba(255, 215, 0, 0.34);
  color: var(--gold);
  font-size: 0.72rem;
}

.control-button {
  padding: 0;
  font-size: 1.8rem;
  line-height: 1;
}

.control-button:disabled,
.column-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.column-picker {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}

.column-button {
  min-width: 0;
  min-height: 38px;
  border: 1px solid rgba(102, 217, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 950;
}

.column-button.active {
  border-color: rgba(255, 215, 0, 0.58);
  background: var(--gold);
  color: #161100;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);
}

.piece-dock strong {
  display: block;
  margin-top: 3px;
  font-size: 0.92rem;
}

.piece-preview {
  display: grid;
  gap: 4px;
  min-width: 72px;
  min-height: 72px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.piece-preview span {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.question-panel {
  display: grid;
  gap: 14px;
}

.question-panel .panel-title-row {
  margin-bottom: 0;
}

.answers-grid {
  display: grid;
  gap: 10px;
}

.answer-card {
  min-height: 62px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--white);
  text-align: left;
  touch-action: manipulation;
}

.answer-card:disabled {
  cursor: not-allowed;
}

.answer-card span:last-child {
  min-width: 0;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.18;
}

.answer-letter {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 174, 239, 0.14);
  color: var(--ice);
  font-weight: 950;
  box-shadow: inset 0 0 18px rgba(0, 174, 239, 0.13);
}

.hidden-choice {
  opacity: 0.48;
}

.hidden-choice .answer-letter {
  color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

.power-dock {
  display: grid;
  gap: 8px;
}

.power-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.power-button {
  min-height: 52px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  touch-action: manipulation;
}

.power-button span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.power-button strong {
  color: var(--ice);
  font-size: 1rem;
  font-weight: 950;
}

.power-button.disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.power-badge {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.92), rgba(102, 217, 255, 0.74));
  color: #061116;
  font-size: 0.72rem;
  font-weight: 950;
}

.result-flash {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: max(14px, env(safe-area-inset-top));
  width: min(calc(100% - 24px), 420px);
  min-height: 44px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border-radius: 8px;
  padding: 10px 14px;
  color: #061116;
  font-weight: 950;
  text-align: center;
  animation: flash-in 720ms ease both;
}

.result-flash.good {
  background: var(--green);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.45);
}

.result-flash.bad {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 0 24px rgba(255, 59, 48, 0.45);
}

.ad-panel,
.music-challenge-band {
  width: min(100%, 620px);
  display: grid;
  justify-items: center;
  gap: 14px;
  border-radius: 8px;
  padding: 24px 16px;
}

.ad-panel h1,
.ad-panel h2,
.music-challenge-band h1,
.music-challenge-band p {
  margin: 0;
}

.ad-panel h2 {
  color: var(--ice);
  font-size: 1.2rem;
  font-weight: 950;
}

.ad-slot {
  width: min(100%, 420px);
  min-height: 132px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  border: 1px dashed rgba(102, 217, 255, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.12), rgba(255, 215, 0, 0.08)),
    rgba(0, 0, 0, 0.24);
}

.ad-slot span,
.ad-slot small,
.reward-reveal small {
  color: rgba(255, 255, 255, 0.62);
  font-weight: 800;
}

.ad-slot strong {
  font-size: 1.12rem;
  font-weight: 950;
}

.reward-reveal {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.reward-reveal p,
.reward-reveal strong,
.reward-reveal small {
  margin: 0;
}

.reward-reveal strong {
  font-size: 1.24rem;
  color: var(--ice);
}

.reward-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), var(--ice));
  color: #061116;
  font-size: 1.4rem;
  font-weight: 950;
  box-shadow: 0 0 28px rgba(255, 215, 0, 0.38);
}

.music-screen {
  background: radial-gradient(circle at 50% 14%, rgba(255, 215, 0, 0.16), transparent 28rem);
}

.music-challenge-band {
  width: 100%;
  border-color: rgba(255, 215, 0, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 215, 0, 0.16), rgba(0, 174, 239, 0.08)),
    rgba(10, 10, 10, 0.78);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.music-challenge-band h1 {
  color: var(--gold);
  text-shadow: 0 0 24px rgba(255, 215, 0, 0.42);
}

.music-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(100%, 460px);
}

.audio-notice {
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 900;
}

.challenge-question {
  border-color: rgba(255, 215, 0, 0.26);
}

.game-over {
  gap: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 620px);
}

@media (min-width: 540px) {
  .screen-pad {
    padding-inline: 22px;
  }

  .hero-logo h1,
  .intro-screen h1,
  .ad-panel h1,
  .game-over h1,
  .music-challenge-band h1 {
    font-size: 4rem;
  }

  .answers-grid,
  .power-list,
  .music-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 860px) {
  .screen-pad {
    padding: 26px 28px 30px;
  }

  .game-layout {
    grid-template-columns: minmax(310px, 0.88fr) minmax(420px, 1.12fr);
    align-items: start;
  }

  .question-panel {
    order: 0;
  }

  .challenge-layout {
    grid-template-columns: minmax(300px, 0.8fr) minmax(430px, 1.2fr);
  }

  .game-header {
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: center;
  }

  .progress-strip {
    grid-column: 1 / -1;
  }

  .board-grid {
    width: min(100%, 390px);
  }
}

@media (max-width: 380px) {
  .hero-logo h1,
  .intro-screen h1,
  .ad-panel h1,
  .game-over h1,
  .music-challenge-band h1 {
    font-size: 2.42rem;
  }

  .stat strong {
    font-size: 1rem;
  }

  .answer-card {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .answer-letter,
  .power-badge {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 430px) {
  .screen-pad {
    padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right));
  }

  .game-header,
  .board-panel,
  .question-panel {
    padding: 12px;
  }

  .answer-card {
    min-height: 64px;
  }

  .power-button {
    min-height: 56px;
  }
}

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

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-bar {
  from {
    transform: scaleY(0.52);
    opacity: 0.65;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes intro-pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes load-sting {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes flash-in {
  0% {
    transform: translate(-50%, -14px);
    opacity: 0;
  }
  18%,
  78% {
    transform: translate(-50%, 0);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -8px);
    opacity: 0;
  }
}

@keyframes music-fall {
  from {
    transform: translate3d(0, -12vh, 0) rotate(0deg);
    opacity: 0;
  }
  12%,
  82% {
    opacity: 1;
  }
  to {
    transform: translate3d(var(--drift), 116vh, 0) rotate(220deg);
    opacity: 0;
  }
}

@keyframes confetti-pop {
  0% {
    opacity: 1;
    transform: rotate(var(--angle)) translate3d(0, 0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translate3d(var(--distance), calc(var(--distance) * -0.72), 0) scale(0.25);
  }
}

@keyframes chess-piece-travel {
  0% {
    left: var(--from-x);
    top: var(--from-y);
    transform: translate(-50%, -50%) scale(1);
  }
  55% {
    transform: translate(-50%, -68%) scale(1.12);
  }
  100% {
    left: var(--to-x);
    top: var(--to-y);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes smash-card {
  0% {
    opacity: 0;
    transform: scale(0.78) rotate(-3deg);
  }
  15%,
  74% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: scale(1.08) rotate(2deg);
  }
}

@keyframes piece-smashed {
  0% {
    transform: translateY(-8px) rotate(0deg) scale(1);
  }
  35% {
    transform: translateY(8px) rotate(-9deg) scale(1.16, 0.82);
  }
  62% {
    transform: translateY(2px) rotate(8deg) scale(0.9, 1.08);
  }
  100% {
    transform: translateY(22px) rotate(18deg) scale(1.22, 0.34);
  }
}

@keyframes eyes-pop {
  0%,
  26% {
    opacity: 0;
    transform: scale(0);
  }
  38%,
  76% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(0.4);
  }
}

@keyframes hit-pop {
  0% {
    opacity: 0;
    transform: rotate(10deg) scale(0.4);
  }
  24%,
  70% {
    opacity: 1;
    transform: rotate(10deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(18deg) scale(1.2);
  }
}

@keyframes guess-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes guess-blink {
  0%,
  78%,
  100% {
    transform: scaleY(1);
  }
  86% {
    transform: scaleY(0.92);
  }
}

@keyframes guess-tilt {
  0%,
  100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(2deg);
  }
}

@keyframes guess-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 215, 0, 0));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.45));
    transform: scale(1.025);
  }
}

/* Dave Me OFFICIAL Arcade */
.arcade-shell {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(0, 174, 239, 0.26), transparent 38%),
    radial-gradient(circle at 14% 10%, rgba(0, 229, 255, 0.34), transparent 26rem),
    radial-gradient(circle at 82% 18%, rgba(255, 175, 42, 0.3), transparent 24rem),
    radial-gradient(circle at 50% 96%, rgba(27, 255, 190, 0.16), transparent 28rem),
    #0A0A0A;
  color: var(--white);
}

.arcade-volume,
.back-button {
  position: fixed;
  z-index: 30;
  min-height: 42px;
  border: 1px solid rgba(102, 217, 255, 0.28);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.8);
  box-shadow: 0 0 24px rgba(0, 174, 239, 0.22);
  color: var(--white);
  cursor: pointer;
  font-weight: 950;
  backdrop-filter: blur(16px);
}

.arcade-volume {
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
}

.arcade-volume span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--blue), var(--ice));
  color: #061116;
  font-size: 0.58rem;
}

.arcade-volume strong {
  font-size: 0.66rem;
  white-space: nowrap;
}

.back-button {
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  padding: 0 14px;
}

.arcade-hub,
.arcade-game {
  display: grid;
  gap: 18px;
  padding-top: max(72px, env(safe-area-inset-top));
  min-height: 0;
}

.arcade-hub {
  position: relative;
  align-content: start;
  justify-items: center;
  text-align: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.arcade-game {
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  overflow: hidden;
  gap: clamp(8px, 1.5vh, 14px);
  padding-top: max(56px, env(safe-area-inset-top));
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.arcade-game > :not(.game-mast) {
  min-height: 0;
}

.arcade-game .game-control-card,
.arcade-game .knowledge-card,
.arcade-game .song-card,
.arcade-game .lifestyle-card,
.arcade-game .book-list,
.arcade-game .pet-picker {
  min-height: 0;
  overflow: visible;
}

.music-rain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.music-rain span {
  position: absolute;
  top: -10vh;
  left: var(--left);
  color: var(--note-colour);
  font-size: var(--size);
  font-weight: 950;
  opacity: 0.62;
  text-shadow: 0 0 14px currentColor, 0 0 26px rgba(0, 174, 239, 0.28);
  animation: music-fall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.music-rain .falling-face {
  position: absolute;
  top: -12vh;
  left: var(--left);
  width: var(--face-size);
  height: var(--face-size);
  border: 2px solid rgba(255, 215, 0, 0.72);
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(0, 174, 239, 0.58), 0 0 24px rgba(255, 159, 28, 0.36);
  object-fit: cover;
  object-position: 50% 42%;
  opacity: 0.78;
  animation: music-fall var(--duration) linear infinite;
  animation-delay: var(--delay);
}

.arcade-hub > :not(.music-rain) {
  position: relative;
  z-index: 1;
}

.hub-copyright {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 18px 0 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.policy-link {
  border: 0;
  background: transparent;
  color: var(--ice);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.policy-link:hover {
  color: var(--gold);
}

.device-status {
  display: grid;
  gap: 4px;
  width: min(100%, 760px);
  padding: 10px 12px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.16), rgba(255, 159, 28, 0.09)),
    rgba(10, 10, 10, 0.64);
  box-shadow: 0 0 24px rgba(0, 174, 239, 0.14);
  text-align: center;
}

.device-status strong {
  color: var(--gold);
  font-weight: 950;
  text-transform: uppercase;
}

.device-status span,
.device-status small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  font-weight: 850;
}

.arcade-logo,
.song-logo {
  width: min(42vw, 210px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(102, 217, 255, 0.32);
  box-shadow: 0 0 38px rgba(0, 174, 239, 0.34), 0 0 52px rgba(255, 215, 0, 0.16);
  object-fit: cover;
}

.hub-title h1,
.game-mast h1,
.song-card h2,
.game-control-card h2 {
  margin: 0;
  font-weight: 950;
  line-height: 0.98;
  text-shadow: 0 0 24px rgba(0, 174, 239, 0.42);
}

.hub-title h1 {
  font-size: clamp(2.6rem, 10vw, 5.6rem);
}

.arcade-difficulty {
  display: grid;
  gap: 9px;
  width: min(100%, 760px);
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.58);
  box-shadow: 0 0 30px rgba(0, 174, 239, 0.16);
}

.game-difficulty-dock {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  justify-self: center;
}

.game-difficulty-dock .arcade-difficulty {
  padding: 8px;
}

.game-difficulty-dock .difficulty-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.game-difficulty-dock .difficulty-chip {
  min-height: 38px;
  padding: 5px;
}

.game-difficulty-dock .difficulty-chip span {
  font-size: 0.52rem;
}

.game-difficulty-dock .difficulty-chip strong {
  font-size: 0.66rem;
}

.game-rules-tab {
  position: fixed;
  top: max(58px, calc(env(safe-area-inset-top) + 58px));
  right: max(12px, env(safe-area-inset-right));
  z-index: 32;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 7px;
}

.rules-toggle {
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 215, 0, 0.42);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.76);
  color: var(--gold);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.rules-panel {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.16), rgba(255, 215, 0, 0.08)),
    rgba(10, 10, 10, 0.86);
  box-shadow: 0 0 28px rgba(0, 174, 239, 0.16);
}

.rules-panel h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.05rem, 4vw, 1.45rem);
  font-weight: 950;
}

.rules-panel ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.social-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 760px);
}

.social-links a {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.2), rgba(255, 175, 42, 0.14)),
    rgba(10, 10, 10, 0.64);
  box-shadow: 0 0 22px rgba(0, 174, 239, 0.16);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

.difficulty-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.difficulty-chip {
  display: grid;
  gap: 2px;
  min-height: 62px;
  padding: 9px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  cursor: pointer;
}

.difficulty-chip span {
  color: var(--ice);
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
}

.difficulty-chip strong {
  font-weight: 950;
}

.difficulty-chip.active {
  border-color: rgba(255, 215, 0, 0.56);
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.22), rgba(255, 175, 42, 0.16));
  box-shadow: 0 0 26px rgba(255, 215, 0, 0.18);
}

.game-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(100%, 760px);
}

.game-tile,
.game-control-card,
.song-card,
.knowledge-card,
.pong-stage,
.solitaire-top,
.tableau,
.chess-board {
  border: 1px solid rgba(102, 217, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.13), rgba(255, 175, 42, 0.08)),
    rgba(16, 22, 27, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.game-tile {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 16px;
  color: var(--white);
  cursor: pointer;
  text-align: left;
}

.game-tile span,
.game-tile small,
.arcade-note {
  color: rgba(255, 255, 255, 0.64);
  font-weight: 800;
}

.game-tile span {
  color: var(--ice);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.game-tile strong {
  font-size: 1.55rem;
  line-height: 1;
}

.settings-screen {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}

.settings-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.14), rgba(255, 159, 28, 0.08)),
    rgba(10, 10, 10, 0.74);
  box-shadow: 0 0 26px rgba(0, 174, 239, 0.14);
}

.settings-panel h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.05rem, 4vw, 1.55rem);
  font-weight: 950;
}

.volume-slider {
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
}

.saved-list {
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.saved-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  cursor: pointer;
  text-align: left;
}

.saved-row strong {
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-row span {
  color: var(--ice);
  font-size: 0.68rem;
  font-weight: 850;
}

.settings-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.settings-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
}

.settings-stats strong {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 950;
}

.danger-panel {
  border-color: rgba(255, 59, 48, 0.38);
  background:
    linear-gradient(135deg, rgba(255, 59, 48, 0.16), rgba(255, 159, 28, 0.08)),
    rgba(10, 10, 10, 0.76);
}

.danger-button {
  min-height: 48px;
  border: 1px solid rgba(255, 59, 48, 0.72);
  border-radius: 8px;
  background: linear-gradient(135deg, #FF3B30, #9A100A);
  color: var(--white);
  cursor: pointer;
  font-weight: 950;
  text-transform: uppercase;
}

.settings-test-button {
  width: 100%;
  min-width: 0;
}

.game-mast {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.68);
  min-height: 0;
}

.game-mast img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.game-mast h1 {
  font-size: clamp(1.05rem, 3.2vw, 1.55rem);
}

.game-mast strong {
  grid-column: 1 / -1;
  color: var(--gold);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.block-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.arcade-board {
  width: min(100%, 320px);
  max-height: min(52vh, 520px);
  max-height: min(52dvh, 520px);
  justify-self: center;
}

.game-control-card,
.song-card,
.knowledge-card {
  display: grid;
  gap: clamp(7px, 1.2vh, 10px);
  padding: clamp(8px, 1.8vw, 12px);
  align-content: start;
}

.arcade-controls,
.solitaire-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pong-stage {
  position: relative;
  width: min(100%, 760px);
  max-height: min(48vh, 480px);
  max-height: min(48dvh, 480px);
  aspect-ratio: 16 / 10;
  justify-self: center;
  overflow: hidden;
  touch-action: none;
  background:
    linear-gradient(90deg, rgba(0, 174, 239, 0.08), transparent, rgba(255, 215, 0, 0.06)),
    #071014;
}

.pong-net {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.36) 0 12px, transparent 12px 24px);
}

.pong-paddle {
  position: absolute;
  width: 14px;
  height: 16%;
  border-radius: 999px;
  background: var(--ice);
  box-shadow: 0 0 22px rgba(102, 217, 255, 0.6);
}

.pong-paddle.player {
  left: 3%;
}

.pong-paddle.cpu {
  right: 3%;
  background: var(--gold);
}

.pong-ball {
  position: absolute;
  width: clamp(34px, 9vw, 62px);
  height: clamp(34px, 9vw, 62px);
  border-radius: 50%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(0, 174, 239, 0.62);
}

.solitaire-top {
  display: grid;
  grid-template-columns: 46px 46px minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  padding: 5px;
}

.solitaire-game {
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
}

.foundation-row,
.tableau {
  display: grid;
  gap: 8px;
}

.foundation-row {
  grid-template-columns: repeat(4, clamp(42px, 8vw, 54px));
  gap: 5px;
  justify-content: end;
}

.foundation {
  width: clamp(42px, 8vw, 54px);
  height: clamp(50px, 8vh, 64px);
  min-height: 0;
  aspect-ratio: auto;
  border: 1px dashed rgba(102, 217, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  font-weight: 950;
}

.foundation > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: clamp(1.05rem, 4vw, 1.55rem);
}

.foundation > .card {
  min-height: 100%;
  height: 100%;
  width: 100%;
  border: 0;
}

.tableau {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: start;
  padding: 5px;
  min-height: 0;
  max-height: min(55vh, 500px);
  max-height: min(55dvh, 500px);
  overflow: hidden;
}

.tableau-col {
  display: grid;
  align-content: start;
}

.tableau-col .card {
  margin-top: clamp(-38px, -5vh, -28px);
}

.tableau-col .card:first-child {
  margin-top: 0;
}

.card {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(58px, 10vh, 82px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #f7fbff;
  color: #071014;
  cursor: pointer;
  overflow: hidden;
  font-weight: 950;
}

.solitaire-top > .card {
  min-height: 46px;
  height: 60px;
  border-radius: 7px;
}

.solitaire-top .card-face strong,
.foundation .card-face strong {
  font-size: clamp(0.74rem, 2vw, 0.92rem);
}

.solitaire-top .card-face span,
.foundation .card-face span {
  font-size: clamp(0.9rem, 2.8vw, 1.1rem);
}

.card-back {
  background: #050505;
}

.card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-back span {
  position: absolute;
  right: 5px;
  bottom: 4px;
  color: var(--white);
  font-size: 0.7rem;
  text-shadow: 0 1px 4px #000;
}

.card-face {
  align-content: center;
  gap: 4px;
}

.card-face.red {
  color: var(--red);
}

.card-face.black {
  color: #071014;
}

.card-face.selected {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.28);
}

.card-face em {
  position: absolute;
  right: 5px;
  top: 5px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #171000;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 950;
}

.card-empty {
  background: rgba(255, 255, 255, 0.04);
}

.tableau-empty {
  border-style: dashed;
  color: rgba(255, 255, 255, 0.32);
}

.song-card {
  justify-items: center;
  text-align: center;
}

.song-logo {
  width: min(52vw, 230px);
}

.song-options {
  display: grid;
  gap: 7px;
  width: min(100%, 560px);
}

.song-answer-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.song-answer-row span {
  color: var(--gold);
  font-weight: 950;
}

.song-answer-row strong {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-card {
  width: min(100%, 820px);
  justify-self: center;
  padding: clamp(10px, 2vw, 18px);
  border: 1px solid rgba(102, 217, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.16), rgba(255, 159, 28, 0.08)),
    rgba(10, 10, 10, 0.86);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.18);
}

.knowledge-card h2 {
  margin: 0;
  font-size: clamp(1.12rem, 3.4vw, 2rem);
  font-weight: 950;
  line-height: 1.05;
}

.knowledge-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.knowledge-stats span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(102, 217, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.knowledge-options {
  display: grid;
  gap: 7px;
}

.knowledge-timer {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(102, 217, 255, 0.16);
}

.knowledge-timer span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
  transition: width 240ms linear;
}

.chess-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.bubble-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.challenge-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.challenge-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(100%, 380px);
  max-height: min(48vh, 380px);
  max-height: min(48dvh, 380px);
  justify-self: center;
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.16), rgba(255, 175, 42, 0.12)),
    rgba(16, 22, 27, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 38px rgba(0, 0, 0, 0.24);
}

.challenge-tile {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  cursor: pointer;
  text-align: center;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.challenge-tile.good {
  border-color: rgba(0, 255, 136, 0.28);
  box-shadow: 0 0 20px rgba(0, 174, 239, 0.12);
}

.challenge-tile.bad {
  border-color: rgba(255, 59, 48, 0.18);
}

.challenge-tile:not(:disabled):hover {
  transform: translateY(-2px);
  border-color: rgba(255, 215, 0, 0.42);
}

.challenge-tile span {
  font-size: 1.6rem;
}

.challenge-tile strong {
  font-size: 0.78rem;
  line-height: 1.05;
}

.bubble-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
  width: min(100%, 360px);
  max-height: min(48vh, 390px);
  max-height: min(48dvh, 390px);
  justify-self: center;
  padding: 8px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.14), rgba(255, 175, 42, 0.1)),
    rgba(16, 22, 27, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 38px rgba(0, 0, 0, 0.24);
}

.bubble-cell {
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset -8px -10px 16px rgba(0, 0, 0, 0.24), inset 5px 5px 12px rgba(255, 255, 255, 0.34), 0 0 18px rgba(0, 174, 239, 0.18);
  transition: transform 150ms ease, filter 150ms ease;
}

.bubble-cell:not(:disabled):hover {
  transform: scale(1.08);
}

.bubble-cell.empty {
  opacity: 0;
  pointer-events: none;
}

.bubble-blue {
  background: linear-gradient(135deg, #66D9FF, #00AEEF);
}

.bubble-ice {
  background: linear-gradient(135deg, #FFFFFF, #66D9FF);
}

.bubble-gold {
  background: linear-gradient(135deg, #FFF2A1, #FFD700);
}

.bubble-orange {
  background: linear-gradient(135deg, #FFD08A, #FF9F1C);
}

.bubble-green {
  background: linear-gradient(135deg, #90FFD1, #00FF88);
}

.bubble-red {
  background: linear-gradient(135deg, #FF9A93, #FF3B30);
}

.bubble-white {
  background: linear-gradient(135deg, #FFFFFF, #DDE9EF);
}

.bubble-blast-screen,
.bubble-blast-game {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(8px, 1.4vh, 12px);
  min-height: 0;
}

.bubble-title-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  min-height: min(72vh, 620px);
  padding: clamp(18px, 5vw, 34px);
  border: 1px solid rgba(102, 217, 255, 0.28);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 18%, rgba(0, 174, 239, 0.34), transparent 24rem),
    radial-gradient(circle at 82% 28%, rgba(255, 215, 0, 0.2), transparent 20rem),
    linear-gradient(145deg, rgba(10, 10, 10, 0.94), rgba(10, 32, 38, 0.86));
  text-align: center;
  box-shadow: 0 0 42px rgba(0, 174, 239, 0.18);
}

.bubble-title-card img {
  width: clamp(72px, 21vw, 118px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.6);
  box-shadow: 0 0 28px rgba(0, 174, 239, 0.38);
  object-fit: cover;
}

.bubble-title-card h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(2.05rem, 9vw, 4.4rem);
  font-weight: 1000;
  line-height: 0.9;
  text-shadow: 0 0 22px rgba(0, 174, 239, 0.6);
}

.bubble-title-card p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.blast-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 0;
}

.blast-mode-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(102, 217, 255, 0.25);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 174, 239, 0.18), rgba(255, 215, 0, 0.08)),
    rgba(16, 22, 27, 0.86);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 36px rgba(0, 0, 0, 0.25);
}

.blast-mode-card strong {
  color: var(--ice);
  font-size: 1.05rem;
  font-weight: 1000;
}

.blast-mode-card span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.blast-mode-card small {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.blast-mode-card.locked {
  opacity: 0.48;
  filter: grayscale(0.65);
}

.blast-hud {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.blast-hud span {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 5px 7px;
  border: 1px solid rgba(102, 217, 255, 0.22);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.72);
  color: var(--white);
  font-size: clamp(0.68rem, 2vw, 0.84rem);
  font-weight: 1000;
  text-align: center;
}

.blast-stage-wrap {
  position: relative;
  min-height: 0;
  height: min(64vh, 650px);
  height: min(64dvh, 650px);
  border: 1px solid rgba(102, 217, 255, 0.28);
  border-radius: 8px;
  overflow: hidden;
  background: var(--black);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.18);
  touch-action: none;
}

.blast-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.blast-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 18px;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(8px);
  text-align: center;
}

.blast-overlay h2 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.6rem, 7vw, 3.2rem);
  font-weight: 1000;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.28);
}

.blast-overlay p {
  max-width: 440px;
  margin: 0;
  color: var(--white);
  font-weight: 850;
}

.blast-controls {
  gap: 8px;
}

.blast-queue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
}

.blast-queue span {
  color: var(--ice);
  font-size: 0.64rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.blast-queue strong {
  overflow: hidden;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.snake-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.snake-board {
  display: grid;
  gap: 3px;
  width: min(100%, 440px, 52vh);
  width: min(100%, 440px, 52dvh);
  justify-self: center;
  padding: 10px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 159, 28, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(0, 174, 239, 0.12), rgba(255, 255, 255, 0.04)),
    rgba(2, 9, 12, 0.92);
  box-shadow: 0 0 36px rgba(0, 174, 239, 0.18);
  touch-action: none;
  user-select: none;
}

.snake-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.045);
  overflow: hidden;
}

.snake-head,
.snake-body {
  display: grid;
  place-items: center;
  width: 82%;
  height: 82%;
  border-radius: 35%;
  background: linear-gradient(135deg, var(--gold), #35f7d2 42%, var(--blue));
  box-shadow: 0 0 13px rgba(0, 174, 239, 0.62);
}

.snake-head {
  border-radius: 42% 42% 32% 32%;
  border: 2px solid rgba(255, 255, 255, 0.76);
}

.snake-body {
  opacity: 0.86;
}

.snake-face,
.snake-scale {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #041014;
  font-size: clamp(0.44rem, 1.5vw, 0.74rem);
  font-weight: 950;
  line-height: 1;
}

.snake-scale {
  font-size: clamp(0.32rem, 1.2vw, 0.58rem);
}

.snake-skin-classic {
  background: linear-gradient(135deg, var(--orange), #35f7d2 42%, var(--blue));
}

.snake-skin-disco {
  background: conic-gradient(from 20deg, var(--blue), var(--gold), #7d5cff, var(--green), var(--blue));
}

.snake-skin-gold {
  background: linear-gradient(135deg, #fff2a1, var(--gold), var(--orange));
}

.snake-skin-mic {
  background: linear-gradient(135deg, #101010, var(--blue));
}

.snake-skin-mic .snake-face,
.snake-skin-mic .snake-scale,
.snake-skin-space .snake-face,
.snake-skin-space .snake-scale {
  color: var(--white);
}

.snake-skin-space {
  background: radial-gradient(circle at 30% 25%, var(--gold), transparent 20%), linear-gradient(135deg, #101428, #00aeef 58%, #66d9ff);
}

.snake-prize {
  display: grid;
  place-items: center;
  width: 76%;
  height: 76%;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
}

.snake-prize.coin {
  background: var(--gold);
  color: #1d1300;
}

.snake-prize.token {
  background: var(--blue);
  color: var(--white);
}

.snake-prize.egg {
  background: #ffffff;
  color: var(--orange);
}

.snake-prize.power {
  background: var(--green);
  color: #002414;
}

.snake-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  grid-template-areas:
    ". up ."
    "left center right"
    ". down .";
}

.snake-pad .up {
  grid-area: up;
}

.snake-pad .left {
  grid-area: left;
}

.snake-pad .center {
  grid-area: center;
}

.snake-pad .right {
  grid-area: right;
}

.snake-pad .down {
  grid-area: down;
}

.snake-skin-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
  gap: 7px;
}

.snake-skin-button {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 6px 4px;
  border: 1px solid rgba(102, 217, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.snake-skin-button span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 40%;
  border: 1px solid rgba(255, 255, 255, 0.54);
  color: #061014;
  font-size: 0.72rem;
  line-height: 1;
}

.snake-skin-button.snake-skin-mic span,
.snake-skin-button.snake-skin-space span {
  color: var(--white);
}

.snake-skin-button small {
  max-width: 100%;
  margin-top: 3px;
  font-size: 0.52rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.snake-skin-button.active {
  border-color: var(--gold);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.22);
}

.checkers-layout,
.darts-layout,
.pool-layout,
.runner-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.checkers-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  width: min(100%, 360px);
  max-height: min(48vh, 380px);
  max-height: min(48dvh, 380px);
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden;
  padding: 6px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.78);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.18);
}

.checkers-square {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(10, 10, 10, 0.18);
  cursor: pointer;
}

.checkers-square.plain {
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.9), rgba(255, 255, 255, 0.82));
}

.checkers-square.playable {
  background:
    linear-gradient(rgba(10, 10, 10, 0.3), rgba(10, 10, 10, 0.5)),
    url("/assets/dave-logo.jpeg") center / cover;
}

.checkers-square.selected {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.checkers-square.can-move::after {
  content: "";
  width: 28%;
  height: 28%;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.86);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.6);
}

.checker-piece {
  display: grid;
  place-items: center;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: inset 0 7px 12px rgba(255, 255, 255, 0.24), inset 0 -10px 14px rgba(0, 0, 0, 0.28), 0 0 18px rgba(0, 174, 239, 0.22);
}

.checker-piece.white {
  border: 3px solid var(--orange);
  background: #ffffff;
  color: var(--orange);
}

.checker-piece.black {
  border: 3px solid var(--orange);
  background: #111111;
  color: var(--gold);
}

.checker-piece.king {
  box-shadow: inset 0 7px 12px rgba(255, 255, 255, 0.24), inset 0 -10px 14px rgba(0, 0, 0, 0.28), 0 0 20px rgba(255, 215, 0, 0.5);
}

.dartboard {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 330px);
  max-height: min(48vh, 350px);
  max-height: min(48dvh, 350px);
  aspect-ratio: 1;
  border: 10px solid rgba(255, 215, 0, 0.32);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -9deg, rgba(0, 174, 239, 0.55) 0deg 9deg, rgba(255, 255, 255, 0.12) 9deg 18deg),
    radial-gradient(circle, #071014 0 12%, rgba(255, 59, 48, 0.74) 13% 18%, rgba(10, 10, 10, 0.88) 19% 100%);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.24);
  cursor: none;
  touch-action: none;
}

.dart-bull,
.dart-sector {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-weight: 950;
  cursor: pointer;
}

.dart-bull {
  z-index: 2;
  width: 27%;
  height: 27%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold), var(--red));
  color: #160900;
}

.dart-sector {
  width: clamp(28px, 6.8vw, 42px);
  height: clamp(28px, 6.8vw, 42px);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.74);
  transform: rotate(var(--angle)) translateY(clamp(-155px, -36vw, -112px)) rotate(calc(-1 * var(--angle)));
}

.dart-sector.active {
  background: var(--blue);
  box-shadow: 0 0 18px rgba(0, 174, 239, 0.72);
}

.aim-dart,
.dart-mark {
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--dart-colour);
  font-size: 1.42rem;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 10px currentColor, 0 2px 4px rgba(0, 0, 0, 0.76);
  pointer-events: none;
  transform: translate(calc(-50% + var(--wobble-x, 0px)), calc(-50% + var(--wobble-y, 0px))) rotate(-42deg);
}

.aim-dart {
  z-index: 7;
  filter: drop-shadow(0 0 8px currentColor);
  animation: dart-wobble 220ms ease-in-out infinite alternate;
}

.dart-mark {
  opacity: 0.95;
}

.dart-mark.dave {
  color: var(--orange);
  transform: translate(-50%, -50%) rotate(136deg);
}

.dart-colours {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dart-swatch {
  position: relative;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: transparent;
  cursor: pointer;
}

.dart-swatch::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  background: var(--dart-colour);
  box-shadow: 0 0 14px var(--dart-colour);
}

.dart-swatch.active {
  border-color: rgba(255, 215, 0, 0.72);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.22);
}

@keyframes dart-wobble {
  from {
    transform: translate(calc(-50% + var(--wobble-x, 0px)), calc(-50% + var(--wobble-y, 0px))) rotate(-49deg);
  }

  to {
    transform: translate(calc(-50% - var(--wobble-x, 0px)), calc(-50% - var(--wobble-y, 0px))) rotate(-35deg);
  }
}

.mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-chip {
  flex: 1 1 88px;
  min-height: 36px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  font-weight: 900;
  cursor: pointer;
}

.mode-chip.active {
  border-color: rgba(255, 215, 0, 0.58);
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.22), rgba(255, 159, 28, 0.18));
}

.pool-table {
  position: relative;
  justify-self: center;
  width: min(100%, 620px);
  max-height: min(48vh, 420px);
  max-height: min(48dvh, 420px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 14px solid #2a1708;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 12%, #050505 0 4%, transparent 4.4%),
    radial-gradient(circle at 50% 8%, #050505 0 3.6%, transparent 4%),
    radial-gradient(circle at 88% 12%, #050505 0 4%, transparent 4.4%),
    radial-gradient(circle at 12% 88%, #050505 0 4%, transparent 4.4%),
    radial-gradient(circle at 50% 92%, #050505 0 3.6%, transparent 4%),
    radial-gradient(circle at 88% 88%, #050505 0 4%, transparent 4.4%),
    linear-gradient(135deg, #0b715f, #06453d);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.2);
  touch-action: none;
}

.cue-ball,
.pool-ball {
  position: absolute;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 950;
  transform: translate(-50%, -50%);
  box-shadow: inset -5px -6px 9px rgba(0, 0, 0, 0.28), inset 4px 4px 8px rgba(255, 255, 255, 0.32), 0 0 12px rgba(0, 0, 0, 0.28);
}

@media (min-width: 680px) {
  .cue-ball,
  .pool-ball {
    width: 42px;
    height: 42px;
    font-size: 0.86rem;
  }
}

.cue-ball {
  left: 78%;
  top: 50%;
  background: #ffffff;
}

.pool-ball {
  border: 2px solid rgba(255, 255, 255, 0.72);
  background: var(--blue);
  color: var(--white);
  transition: left 24ms linear, top 24ms linear;
}

.pool-ball.ball-1,
.pool-ball.ball-9 {
  background: var(--gold);
  color: #201200;
}

.pool-ball.ball-3,
.pool-ball.ball-7 {
  background: var(--red);
}

.pool-ball.ball-4,
.pool-ball.ball-8 {
  background: #111111;
}

.pool-ball.ball-2,
.pool-ball.ball-6 {
  background: var(--ice);
  color: #041014;
}

.pool-ball.ball-5 {
  background: var(--orange);
  color: #190c00;
}

.pool-aim-line {
  position: absolute;
  z-index: 1;
  width: 34%;
  height: 3px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(0, 174, 239, 0.15), transparent);
  box-shadow: 0 0 12px rgba(0, 174, 239, 0.48);
  pointer-events: none;
}

.cue-stick {
  position: absolute;
  z-index: 2;
  height: 7px;
  border-radius: 999px;
  transform-origin: left center;
  background:
    linear-gradient(90deg, #f6d49b 0 66%, #2a1708 66% 100%);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.36);
  pointer-events: none;
}

.cue-stick::before {
  content: "";
  position: absolute;
  left: -10px;
  top: -3px;
  width: 14px;
  height: 13px;
  border-radius: 4px;
  background: var(--ice);
  box-shadow: 0 0 9px rgba(102, 217, 255, 0.5);
}

.cue-stick.pulling {
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.42);
}

.pool-power-meter {
  position: relative;
  height: 24px;
  overflow: hidden;
  border: 1px solid rgba(102, 217, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.pool-power-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold), var(--red));
  transition: width 120ms ease;
}

.pool-power-meter strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 950;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.84);
}

.range-label {
  display: grid;
  gap: 8px;
  color: var(--ice);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.range-label input {
  width: 100%;
  accent-color: var(--blue);
}

.runner-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  justify-self: center;
  width: min(100%, 420px);
  max-height: min(58vh, 460px);
  max-height: min(58dvh, 460px);
  padding: 7px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 174, 239, 0.18), transparent),
    rgba(2, 9, 12, 0.9);
  touch-action: none;
  user-select: none;
}

.runner-board.space-theme {
  position: relative;
  overflow: hidden;
  gap: 6px;
  width: min(100%, 560px, 62vh);
  width: min(100%, 560px, 62dvh);
  max-height: none;
  padding: 10px;
  background:
    radial-gradient(circle at 50% 120%, rgba(0, 174, 239, 0.26), transparent 38%),
    radial-gradient(circle at 16% 18%, rgba(255, 215, 0, 0.92) 0 1.5px, transparent 2px),
    radial-gradient(circle at 82% 12%, rgba(102, 217, 255, 0.85) 0 1.5px, transparent 2px),
    radial-gradient(circle at 48% 36%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 10% 48%, rgba(255, 255, 255, 0.55) 0 1px, transparent 2px),
    radial-gradient(circle at 92% 74%, rgba(255, 215, 0, 0.65) 0 1px, transparent 2px),
    radial-gradient(circle at 75% 64%, rgba(0, 174, 239, 0.46), transparent 22%),
    radial-gradient(circle at 22% 78%, rgba(255, 159, 28, 0.24), transparent 24%),
    linear-gradient(180deg, #02040f, #07182a 48%, #030713);
  box-shadow: inset 0 0 70px rgba(0, 174, 239, 0.2), 0 0 38px rgba(0, 174, 239, 0.22);
}

.runner-board.space-theme::before,
.runner-board.messenger-theme::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
  background:
    url("/assets/dave-cartoon-face.png") 10% 15% / 86px 86px no-repeat,
    url("/assets/dave-cartoon-face.png") 86% 72% / 70px 70px no-repeat,
    radial-gradient(circle at 22% 18%, rgba(0, 174, 239, 0.24), transparent 24%),
    radial-gradient(circle at 76% 82%, rgba(255, 159, 28, 0.22), transparent 26%);
  animation: runner-dave-drift 9s ease-in-out infinite alternate;
}

.runner-board.messenger-theme::before {
  opacity: 0.11;
  filter: sepia(0.35) saturate(1.25);
}

.space-theme .runner-cell {
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 50%, rgba(102, 217, 255, 0.1), transparent 58%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(102, 217, 255, 0.08);
}

.space-theme .runner-player {
  width: 86%;
  height: 86%;
  font-size: clamp(0.95rem, 3vw, 1.45rem);
  border-radius: 42%;
}

.space-theme .runner-item {
  width: 78%;
  height: 78%;
  font-size: clamp(0.78rem, 2.5vw, 1.1rem);
}

.runner-board.messenger-theme {
  position: relative;
  overflow: hidden;
  gap: 3px;
  background:
    linear-gradient(180deg, rgba(255, 215, 0, 0.1), rgba(0, 174, 239, 0.08)),
    linear-gradient(135deg, #17100a, #071014);
}

.runner-cell {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@keyframes runner-dave-drift {
  from {
    transform: translate3d(-10px, -6px, 0) scale(1);
  }
  to {
    transform: translate3d(12px, 10px, 0) scale(1.04);
  }
}

.runner-player,
.runner-item,
.runner-door {
  display: grid;
  place-items: center;
  width: 78%;
  height: 78%;
  font-size: 1.15rem;
  font-weight: 950;
}

.runner-player,
.runner-item {
  border-radius: 50%;
}

.runner-player {
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.72), rgba(255, 159, 28, 0.62));
  box-shadow: 0 0 16px rgba(0, 174, 239, 0.5);
}

.runner-item.good {
  background: var(--green);
  color: #002414;
}

.runner-item.bad {
  background: var(--red);
  color: var(--white);
}

.messenger-theme .runner-item {
  width: 82%;
  height: 58%;
  border-radius: 6px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 54%, 100% 0, 100% 18%, 50% 70%, 0 18%);
  box-shadow: 0 0 14px currentColor;
}

.messenger-theme .runner-player {
  width: 88%;
  height: 88%;
  font-size: 0.92rem;
}

.runner-door {
  height: 92%;
  width: 84%;
  border-radius: 9px 9px 3px 3px;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 18px currentColor, inset 0 -12px 18px rgba(0, 0, 0, 0.34);
}

.runner-door.orange {
  background: linear-gradient(180deg, #ffb24a, #9d4b0d);
  color: #ff9f1c;
}

.runner-door.blue {
  background: linear-gradient(180deg, #66d9ff, #006f9a);
  color: var(--ice);
}

.runner-shot {
  display: block;
  width: 28%;
  height: 78%;
  border-radius: 999px;
  box-shadow: 0 0 14px currentColor;
}

.runner-shot.laser {
  background: var(--ice);
  color: var(--ice);
}

.runner-shot.flare {
  background: var(--gold);
  color: var(--gold);
}

.nose-layout,
.stickman-layout,
.jigsaw-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.nose-stage {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 340px);
  max-height: min(50vh, 380px);
  max-height: min(50dvh, 380px);
  aspect-ratio: 1 / 1.08;
  overflow: hidden;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 20%, rgba(102, 217, 255, 0.2), transparent 34%),
    linear-gradient(180deg, rgba(0, 174, 239, 0.12), rgba(255, 159, 28, 0.08)),
    rgba(10, 10, 10, 0.82);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.18);
}

.nose-danger-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30%;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 2px;
  background: rgba(255, 215, 0, 0.82);
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 950;
  text-shadow: 0 0 8px #000;
}

.nose-floor-danger {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  z-index: 7;
  display: grid;
  place-items: center;
  height: 3px;
  background: var(--red);
  color: var(--red);
  font-size: 0.58rem;
  font-weight: 950;
  text-shadow: 0 0 8px rgba(255, 59, 48, 0.82);
  box-shadow: 0 0 18px rgba(255, 59, 48, 0.62);
}

.sleepy-face {
  position: absolute;
  left: 50%;
  bottom: 30%;
  z-index: 2;
  display: block;
  width: clamp(190px, 54vw, 250px);
  height: 250px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 26px rgba(255, 159, 28, 0.2), 0 0 34px rgba(0, 174, 239, 0.16);
  transition: transform 420ms cubic-bezier(0.2, 0.85, 0.2, 1);
}

.face-body {
  position: absolute;
  left: 50%;
  bottom: -58px;
  z-index: 1;
  width: 54%;
  height: 92px;
  border-radius: 42% 42% 18% 18%;
  background:
    radial-gradient(circle at 50% 20%, rgba(102, 217, 255, 0.25), transparent 42%),
    linear-gradient(160deg, #111f25, #071115 62%, #020506);
  border: 2px solid rgba(0, 174, 239, 0.44);
  box-shadow: 0 0 22px rgba(0, 174, 239, 0.22);
  transform: translateX(-50%);
  pointer-events: none;
}

.face-arm {
  position: absolute;
  bottom: -34px;
  z-index: 1;
  width: 18%;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffc19d, #b9684f);
  box-shadow: inset -4px -8px 8px rgba(0, 0, 0, 0.16), 0 0 12px rgba(255, 159, 28, 0.2);
  pointer-events: none;
}

.face-arm.left {
  left: 14%;
  transform: rotate(-24deg);
}

.face-arm.right {
  right: 14%;
  transform: rotate(24deg);
}

.cartoon-face img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(0, 174, 239, 0.32)) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42));
  pointer-events: none;
  user-select: none;
}

.cartoon-face.contact img {
  filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.32)) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
}

.face-eyelid {
  position: absolute;
  top: 36%;
  z-index: 3;
  width: 15%;
  height: 9%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 230, 206, 0.9), transparent 34%),
    linear-gradient(180deg, #f1b692, #b9684f);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
  opacity: calc(var(--eye-close) * 0.98);
  transform: scaleY(calc(0.08 + var(--eye-close) * 1.18));
  transition: opacity 420ms ease, transform 420ms cubic-bezier(0.2, 0.85, 0.2, 1);
  pointer-events: none;
}

.face-eyelid.left {
  left: 34%;
  rotate: -5deg;
}

.face-eyelid.right {
  right: 31%;
  rotate: 5deg;
}

.face-nose {
  position: absolute;
  left: 51%;
  top: calc(100% - var(--face-drop));
  z-index: 4;
  width: 20%;
  height: 28%;
  border-radius: 48% 48% 58% 58%;
  background:
    radial-gradient(circle at 46% 30%, rgba(255, 255, 255, 0.2), transparent 18%),
    url("/assets/dave-cartoon-face.png") 50% 48% / 430% 430% no-repeat,
    linear-gradient(160deg, #ffc19d, #d88162 62%, #a94f3e);
  box-shadow: inset -8px -12px 12px rgba(0, 0, 0, 0.18), 0 0 18px rgba(255, 159, 28, 0.28);
  opacity: var(--nose-opacity);
  transform: translateX(-50%) scaleY(var(--nose-stretch));
  transform-origin: 50% 0%;
  transition: transform 420ms cubic-bezier(0.2, 0.85, 0.2, 1), opacity 160ms ease;
  pointer-events: none;
}

.face-nose::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 116%;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 193, 157, 0.95), rgba(169, 79, 62, 0.78));
  box-shadow: 0 0 14px rgba(255, 159, 28, 0.34);
  transform: translateX(-50%);
}

.breakfast-table {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30%;
  background: transparent;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  z-index: 5;
  pointer-events: none;
}

.table-surface {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 0;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 7px 7px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255, 215, 0, 0.28), transparent 16%),
    linear-gradient(135deg, rgba(124, 70, 28, 0.92), rgba(54, 27, 10, 0.88));
  border: 1px solid rgba(255, 215, 0, 0.22);
  box-shadow:
    inset 0 8px 16px rgba(255, 255, 255, 0.08),
    inset 0 -16px 24px rgba(0, 0, 0, 0.28),
    0 18px 22px rgba(0, 0, 0, 0.42);
  transform: perspective(260px) rotateX(7deg);
}

.table-surface::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 18px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(90deg, #9b5a25, #e39a49 48%, #5a2d10);
  box-shadow: 0 0 14px rgba(255, 159, 28, 0.24);
}

.table-label {
  position: relative;
  z-index: 3;
  margin-top: 12px;
}

.table-leg {
  position: absolute;
  top: 55px;
  bottom: 8px;
  width: 22px;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(90deg, #4a220c, #a45d22 45%, #2a1205);
  box-shadow: inset -5px 0 7px rgba(0, 0, 0, 0.35);
}

.table-leg.left {
  left: 18%;
}

.table-leg.right {
  right: 18%;
}

.table-foot {
  position: absolute;
  bottom: 3px;
  width: 58px;
  height: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2a1205, #a45d22, #2a1205);
  box-shadow: 0 0 12px rgba(255, 159, 28, 0.18);
}

.table-foot.left {
  left: calc(18% - 18px);
}

.table-foot.right {
  right: calc(18% - 18px);
}

.cereal-bowl {
  position: absolute;
  left: 16%;
  top: -21px;
  z-index: 4;
  width: 70px;
  height: 42px;
  border-radius: 8px 8px 34px 34px;
  background:
    radial-gradient(circle at 44% 18%, #fff8ce 0 5px, transparent 6px),
    radial-gradient(circle at 62% 24%, #fff8ce 0 4px, transparent 5px),
    linear-gradient(180deg, #ffffff 0 42%, #66d9ff 43% 100%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 7px 12px rgba(0, 0, 0, 0.32), 0 0 12px rgba(102, 217, 255, 0.32);
}

.cereal-bowl::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 8px;
  height: 10px;
  border-radius: 999px;
  background: #fff8ce;
}

.table-spoon {
  position: absolute;
  right: 10%;
  top: -24px;
  z-index: 4;
  width: 64px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d9edf3, #ffffff, #7a8e96);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.28);
  transform: rotate(-22deg);
}

.table-spoon::before {
  content: "";
  position: absolute;
  right: -17px;
  top: -8px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #ffffff, #99aeb8);
}

.nose-meter span {
  background: linear-gradient(90deg, var(--green), var(--gold) 50%, var(--red));
}

.platform-board {
  display: grid;
  gap: 5px;
  justify-self: center;
  width: min(100%, 560px);
  padding: 10px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 174, 239, 0.1), rgba(255, 159, 28, 0.08)),
    rgba(3, 12, 16, 0.9);
}

.platform-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.035);
}

.stickman,
.platform-coin,
.platform-enemy,
.platform-portal {
  display: grid;
  place-items: center;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  font-weight: 950;
}

.stickman {
  background: linear-gradient(135deg, var(--blue), var(--gold));
  color: var(--white);
  box-shadow: 0 0 16px rgba(0, 174, 239, 0.5);
}

.platform-coin {
  background: var(--gold);
  color: #1d1300;
}

.platform-enemy {
  background: var(--red);
  color: var(--white);
}

.platform-portal {
  border: 2px solid var(--green);
  color: var(--green);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.stickman-3d-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.stickman-3d-stage {
  position: relative;
  justify-self: center;
  width: min(100%, 440px);
  max-height: min(50vh, 420px);
  max-height: min(50dvh, 420px);
  aspect-ratio: 4 / 5;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(0, 174, 239, 0.22);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(102, 217, 255, 0.42), transparent 34%),
    linear-gradient(180deg, #ffffff, #edf8ff 58%, #f7fbff);
  box-shadow: 0 0 38px rgba(0, 174, 239, 0.22), inset 0 -20px 40px rgba(255, 159, 28, 0.08);
}

.stickman-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.three-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--ice);
  font-weight: 950;
}

.fight-meter {
  position: relative;
  height: 30px;
  overflow: hidden;
  border: 1px solid rgba(102, 217, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.fight-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 180ms ease;
}

.fight-meter.enemy span {
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.fight-meter.energy span {
  background: linear-gradient(90deg, var(--blue), var(--ice));
}

.fight-meter strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 950;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.fight-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.literal-card {
  display: grid;
  gap: 14px;
  width: min(100%, 760px);
  max-height: 100%;
  justify-self: center;
  padding: 18px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at top right, rgba(255, 215, 0, 0.13), transparent 30%),
    rgba(10, 10, 10, 0.78);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.18);
}

.literal-card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 7vw, 3rem);
  font-weight: 950;
  line-height: 1;
}

.literal-mode-scale .literal-option:nth-child(3) {
  min-height: 106px;
  transform: scale(1.03);
}

.literal-mode-tiny .literal-option:first-child,
.literal-mode-count .literal-option:first-child {
  font-size: 0.8rem;
}

.literal-mode-danger {
  background:
    radial-gradient(circle at top right, rgba(255, 59, 48, 0.18), transparent 34%),
    rgba(10, 10, 10, 0.8);
}

.literal-mode-silent {
  background:
    radial-gradient(circle at bottom left, rgba(102, 217, 255, 0.14), transparent 34%),
    rgba(4, 9, 12, 0.84);
}

.literal-mode-space .literal-options {
  gap: 18px;
}

.literal-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.literal-option {
  min-height: 82px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 950;
  cursor: pointer;
}

.literal-0 {
  color: var(--red);
}

.literal-1 {
  color: var(--blue);
}

.literal-2 {
  color: var(--green);
}

.literal-3 {
  color: var(--gold);
}

.literal-colour-0 {
  --literal-accent: var(--blue);
}

.literal-colour-1 {
  --literal-accent: var(--gold);
}

.literal-colour-2 {
  --literal-accent: var(--green);
}

.literal-colour-3 {
  --literal-accent: var(--ice);
}

.literal-card {
  border-color: color-mix(in srgb, var(--literal-accent, var(--blue)) 42%, transparent);
  box-shadow: 0 0 28px color-mix(in srgb, var(--literal-accent, var(--blue)) 20%, transparent);
}

.jigsaw-board {
  display: grid;
  gap: 2px;
  width: min(100%, 520px, 62vh);
  width: min(100%, 520px, 62dvh);
  aspect-ratio: 1;
  justify-self: center;
  padding: 5px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.82);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.18);
}

.jigsaw-tile {
  position: relative;
  display: grid;
  place-items: end start;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  background-repeat: no-repeat;
  background-color: #111;
  background-origin: border-box;
  background-clip: border-box;
}

.jigsaw-tile.selected {
  outline: 3px solid var(--gold);
  z-index: 2;
}

.jigsaw-tile.blank {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.16), rgba(255, 159, 28, 0.1)),
    rgba(255, 255, 255, 0.04);
  cursor: default;
}

.wordsearch-layout,
.sudoku-layout,
.crossword-layout,
.guess-layout {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.wordsearch-board,
.sudoku-board,
.crossword-board {
  display: grid;
  justify-self: center;
  width: min(100%, 520px);
  max-height: min(52vh, 520px);
  max-height: min(52dvh, 520px);
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.84);
  box-shadow: 0 0 34px rgba(0, 174, 239, 0.18);
}

.wordsearch-board {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 3px;
}

.wordsearch-cell,
.sudoku-cell,
.crossword-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: clamp(0.74rem, 2.6vw, 1.1rem);
  font-weight: 950;
  text-align: center;
}

.wordsearch-cell.selected {
  background: var(--gold);
  color: #211600;
}

.wordsearch-cell.found {
  background: var(--green);
  color: #002414;
}

.word-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.word-list span {
  padding: 6px 8px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 999px;
  color: var(--ice);
  font-size: 0.72rem;
  font-weight: 950;
}

.word-list span.found {
  border-color: rgba(0, 255, 136, 0.55);
  background: rgba(0, 255, 136, 0.14);
  color: var(--green);
  text-decoration: line-through;
}

.sudoku-grid-board {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  grid-template-rows: repeat(9, minmax(0, 1fr));
  justify-self: center;
  width: min(100%, 520px, 58vh);
  width: min(100%, 520px, 58dvh);
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid #071014;
  border-radius: 4px;
  background: #071014;
  box-shadow: 0 0 0 1px rgba(102, 217, 255, 0.42), 0 0 34px rgba(0, 174, 239, 0.22);
  contain: layout paint;
  isolation: isolate;
}

.sudoku-square {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: static;
  grid-column: auto;
  grid-row: auto;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  inline-size: auto;
  block-size: auto;
  padding: 0;
  border: 0;
  border-right: 1px solid #8aa4ad;
  border-bottom: 1px solid #8aa4ad;
  border-radius: 0;
  background: #f8fcff;
  color: #071014;
  font-size: clamp(1rem, 4.1vw, 1.7rem);
  font-weight: 950;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.sudoku-square:focus-visible {
  outline: 3px solid rgba(0, 174, 239, 0.75);
  outline-offset: -3px;
}

.sudoku-square.box-right {
  border-right: 3px solid #071014;
}

.sudoku-square.box-bottom {
  border-bottom: 3px solid #071014;
}

.sudoku-square.given {
  background: #dff6ff;
  color: #102331;
}

.sudoku-square.peer {
  background: #e9f8ff;
}

.sudoku-square.same {
  background: #c8eeff;
  color: #005a7a;
}

.sudoku-square.active {
  background: var(--gold);
  color: #171000;
  box-shadow: inset 0 0 0 3px #071014;
  z-index: 1;
}

.sudoku-square.wrong {
  background: #ffe5e2;
  color: var(--red);
}

.sudoku-control-card {
  align-content: start;
}

.sudoku-number-pad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.sudoku-number-pad button {
  min-height: 44px;
  border: 1px solid rgba(102, 217, 255, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 1.12rem;
  font-weight: 950;
  cursor: pointer;
}

.sudoku-number-pad button.active {
  border-color: rgba(255, 215, 0, 0.8);
  background: var(--gold);
  color: #171000;
}

.sudoku-number-pad button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.crossword-board {
  gap: 1px;
  width: min(100%, 560px, 62vh);
  width: min(100%, 560px, 62dvh);
  padding: 5px;
}

.crossword-cell {
  width: 100%;
  height: 100%;
  padding: 0;
  text-transform: uppercase;
  border-radius: 2px;
  background: #F8FCFF;
  color: #071014;
  font-size: clamp(0.72rem, 2.4vw, 1.25rem);
}

.crossword-cell.block {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(0, 0, 0, 0.7);
}

.clue-list {
  display: grid;
  gap: 6px;
  max-height: min(28vh, 260px);
  overflow: auto;
  padding-right: 4px;
  color: var(--ice);
  font-size: 0.82rem;
}

.guess-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  justify-self: center;
  width: min(100%, 560px);
  max-height: min(54vh, 520px);
  max-height: min(54dvh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.guess-face {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 950;
  transition: transform 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.guess-face img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  animation: guess-bob 2.7s ease-in-out infinite;
}

.guess-face.blink img {
  animation-name: guess-blink;
}

.guess-face.tilt img {
  animation-name: guess-tilt;
}

.guess-face.pulse img {
  animation-name: guess-pulse;
}

.guess-face.down {
  opacity: 0.42;
  filter: grayscale(1);
  transform: rotateX(62deg) scale(0.94);
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  width: min(100%, 520px, 62vh);
  width: min(100%, 520px, 62dvh);
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden;
  padding: 0;
  border: 3px solid rgba(255, 215, 0, 0.6);
  border-radius: 8px;
  background: #0A0A0A;
}

.chess-square {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(10, 10, 10, 0.34);
  color: var(--white);
  cursor: pointer;
  overflow: hidden;
  line-height: 1;
  text-align: center;
  touch-action: manipulation;
}

.chess-square.light {
  background: linear-gradient(135deg, #EAFBFF, #8BE5FF);
}

.chess-square.dark {
  background:
    linear-gradient(rgba(4, 12, 16, 0.78), rgba(0, 0, 0, 0.9)),
    url("/assets/dave-logo.jpeg") center / 88% no-repeat,
    #061014;
  filter: saturate(1.15);
}

.chess-square.selected {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.chess-square.can-move::after {
  position: absolute;
  width: 28%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.82);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.45);
  content: "";
}

.chess-square span {
  position: relative;
  z-index: 1;
  font-size: clamp(1.6rem, 8vw, 3.4rem);
  line-height: 1;
  font-weight: 950;
  transition: transform 220ms ease, filter 220ms ease;
}

.white-piece {
  color: #FFFFFF !important;
  -webkit-text-stroke: 1.35px #FF9F1C;
  text-shadow: 0 2px 0 #9a4f00, 0 0 14px rgba(255, 159, 28, 0.42), 0 2px 8px rgba(0, 0, 0, 0.65);
}

.black-piece {
  color: #101820;
  -webkit-text-stroke: 1.35px #FF9F1C;
  text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 159, 28, 0.48), 0 2px 8px rgba(0, 0, 0, 0.78);
}

.black-piece::before {
  position: absolute;
  inset: -12%;
  z-index: -1;
  border-radius: 50%;
  background: url("/assets/dave-logo.jpeg") center / cover;
  content: "";
  filter: invert(1) hue-rotate(180deg) saturate(1.55) brightness(1.22);
  opacity: 0.34;
}

.moving-chess-piece {
  position: absolute;
  left: var(--from-x);
  top: var(--from-y);
  z-index: 6;
  font-size: clamp(1.7rem, 8vw, 3.5rem);
  line-height: 1;
  transform: translate(-50%, -50%);
  animation: chess-piece-travel 360ms cubic-bezier(0.2, 0.9, 0.16, 1) forwards;
  pointer-events: none;
}

.capture-smash {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.smash-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: min(72%, 280px);
  padding: 18px;
  border: 2px solid rgba(255, 159, 28, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.26), rgba(255, 159, 28, 0.2)),
    rgba(10, 10, 10, 0.94);
  box-shadow: 0 0 36px rgba(255, 159, 28, 0.35);
  animation: smash-card 920ms ease-out forwards;
}

.smash-piece {
  position: relative;
  font-size: clamp(4rem, 18vw, 7rem);
  line-height: 0.9;
  animation: piece-smashed 920ms ease-out forwards;
}

.smash-eye {
  position: absolute;
  top: 28%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: inset 3px 2px 0 #101820;
  animation: eyes-pop 920ms ease-out forwards;
}

.eye-left {
  left: 43%;
}

.eye-right {
  right: 43%;
}

.smash-hit {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--gold);
  color: #101000;
  font-size: 0.78rem;
  font-weight: 950;
  transform: rotate(10deg);
  animation: hit-pop 920ms ease-out forwards;
}

.smash-stage strong {
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 950;
}

.smash-stage p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 850;
  text-align: center;
}

.confetti-burst {
  position: fixed;
  left: 50%;
  top: 42%;
  z-index: 60;
  pointer-events: none;
}

.confetti-burst span {
  position: absolute;
  width: 10px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--blue), var(--gold));
  animation: confetti-pop 980ms ease-out forwards;
  animation-delay: var(--delay);
  transform: rotate(var(--angle));
}

.result-good,
.result-bad {
  margin: 0;
  font-weight: 950;
}

.result-good {
  color: var(--green);
}

.result-bad {
  color: var(--red);
}

.lifestyle-screen {
  position: relative;
}

.lifestyle-grid,
.reading-layout,
.pet-layout {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.lifestyle-card,
.book-list,
.pet-picker {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(255, 159, 28, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(0, 174, 239, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(10, 10, 10, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 42px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.lifestyle-card h2 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.55rem, 6vw, 2.35rem);
  font-weight: 950;
  line-height: 1.04;
}

.lifestyle-card p {
  margin: 0;
}

.daily-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(255, 215, 0, 0.28);
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.1);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
}

@media (min-width: 520px) {
  .block-layout,
  .chess-layout,
  .bubble-layout,
  .snake-layout,
  .checkers-layout,
  .darts-layout,
  .pool-layout,
  .runner-layout,
  .nose-layout,
  .stickman-layout,
  .stickman-3d-layout,
  .jigsaw-layout,
  .wordsearch-layout,
  .sudoku-layout,
  .crossword-layout,
  .guess-layout,
  .lifestyle-grid,
  .reading-layout,
  .pet-layout,
  .store-layout,
  .challenge-layout {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.72fr);
    align-items: start;
  }

  .snake-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(200px, 0.62fr);
  }

  .guess-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .guess-face {
    padding: 5px;
    font-size: 0.58rem;
  }

  .guess-face strong {
    line-height: 1;
  }

  .knowledge-card,
  .song-card,
  .literal-card {
    max-height: 100%;
  }

  .game-control-card h2,
  .song-card h2,
  .knowledge-card h2,
  .lifestyle-card h2 {
    font-size: clamp(1rem, 2.4vw, 1.8rem);
  }

  .arcade-game .game-control-card .arcade-note {
    display: none;
  }

  .arcade-game .game-control-card {
    font-size: 0.78rem;
    line-height: 1.22;
  }

  .arcade-game .game-control-card p {
    margin: 0;
  }

  .mode-row,
  .mood-row,
  .dart-colour-row,
  .word-list {
    gap: 5px;
  }

  .mode-chip,
  .mood-chip,
  .dart-swatch {
    min-height: 30px;
    padding: 5px;
    font-size: 0.68rem;
  }

  .dart-colour-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .snake-pad,
  .fight-controls,
  .arcade-controls {
    gap: 5px;
  }
}

@media (max-height: 740px) {
  .arcade-game {
    padding-top: max(50px, env(safe-area-inset-top));
    gap: 7px;
  }

  .game-mast {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 6px;
  }

  .game-mast img {
    width: 36px;
    height: 36px;
  }

  .game-mast strong,
  .arcade-note,
  .game-control-card p,
  .knowledge-card p,
  .song-card p,
  .lifestyle-card p {
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .game-control-card,
  .song-card,
  .knowledge-card,
  .lifestyle-card,
  .book-list,
  .pet-picker,
  .store-panel,
  .track-card {
    gap: 6px;
    padding: 8px;
  }

  .primary-button,
  .gold-button,
  .ghost-button,
  .answer-card,
  .literal-option,
  .mode-chip,
  .mood-chip,
  .book-tab {
    min-height: 34px;
    padding: 7px;
    font-size: 0.75rem;
  }

  .arcade-board,
  .pong-stage,
  .bubble-board,
  .snake-board,
  .checkers-board,
  .dartboard,
  .pool-table,
  .runner-board,
  .nose-stage,
  .stickman-3d-stage,
  .jigsaw-board,
  .wordsearch-board,
  .sudoku-board,
  .crossword-board,
  .chess-board {
    max-height: 42vh;
    max-height: 42dvh;
  }

  .card {
    min-height: 52px;
  }

  .foundation {
    min-height: 52px;
  }

  .tableau {
    max-height: 40vh;
    max-height: 40dvh;
  }

  .jigsaw-board,
  .crossword-board,
  .chess-board {
    width: min(100%, 560px, 58vh);
    width: min(100%, 560px, 58dvh);
    max-height: none;
  }

  .runner-board.space-theme {
    width: min(100%, 520px, 58vh);
    width: min(100%, 520px, 58dvh);
    max-height: none;
  }
}

@media (min-width: 520px) and (max-width: 679px) {
  .chess-layout,
  .snake-layout,
  .runner-layout,
  .jigsaw-layout,
  .crossword-layout {
    grid-template-columns: 1fr;
  }

  .jigsaw-board,
  .crossword-board,
  .chess-board {
    width: min(100%, 430px, 58vh);
    width: min(100%, 430px, 58dvh);
  }

  .snake-board {
    width: min(100%, 400px, 50vh);
    width: min(100%, 400px, 50dvh);
    max-height: none;
  }

  .runner-board.space-theme {
    width: min(100%, 350px, 43vh);
    width: min(100%, 350px, 43dvh);
    max-height: none;
  }
}

@media (max-width: 519px) {
  .arcade-game {
    padding-top: max(50px, env(safe-area-inset-top));
  }

  .solitaire-game {
    grid-template-rows: auto auto auto auto;
    gap: 6px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .game-mast {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .game-mast img {
    width: 34px;
    height: 34px;
  }

  .game-mast h1 {
    font-size: 1.02rem;
  }

  .game-mast strong {
    font-size: 0.66rem;
  }

  .arcade-board,
  .pong-stage,
  .bubble-board,
  .snake-board,
  .checkers-board,
  .dartboard,
  .pool-table,
  .runner-board,
  .nose-stage,
  .stickman-3d-stage,
  .jigsaw-board,
  .wordsearch-board,
  .sudoku-board,
  .crossword-board,
  .chess-board {
    width: min(100%, 300px);
    max-height: 34vh;
    max-height: 34dvh;
  }

  .jigsaw-board,
  .crossword-board,
  .chess-board {
    width: min(100%, 360px, 48vh);
    width: min(100%, 360px, 48dvh);
    max-height: none;
  }

  .snake-board {
    width: min(100%, 360px, 46vh);
    width: min(100%, 360px, 46dvh);
    max-height: none;
  }

  .runner-board.space-theme {
    width: min(100%, 320px, 42vh);
    width: min(100%, 320px, 42dvh);
    max-height: none;
  }

  .runner-layout {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 6px;
  }

  .runner-board.messenger-theme {
    width: min(100%, 330px, 45vh);
    width: min(100%, 330px, 45dvh);
    max-height: none;
  }

  .runner-layout .game-control-card {
    position: relative;
    z-index: 3;
    gap: 5px;
    padding: 7px;
  }

  .runner-layout .arcade-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .runner-layout .arcade-controls .primary-button,
  .runner-layout .arcade-controls .gold-button,
  .runner-layout .arcade-controls .ghost-button {
    min-height: 30px;
    padding: 5px 4px;
    font-size: 0.62rem;
  }

  .runner-layout .game-control-card h2 {
    font-size: 0.95rem;
  }

  .runner-layout .game-control-card p {
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .crossword-cell {
    font-size: clamp(0.62rem, 3.4vw, 0.95rem);
  }

  .clue-list {
    max-height: 150px;
    font-size: 0.72rem;
  }

  .solitaire-top {
    grid-template-columns: 44px 44px minmax(0, 1fr);
    gap: 4px;
    padding: 4px;
  }

  .tableau {
    grid-template-columns: repeat(7, minmax(32px, 1fr));
    max-height: min(40vh, 390px);
    max-height: min(40dvh, 390px);
    gap: 4px;
    padding: 5px;
  }

  .card,
  .foundation {
    min-height: 46px;
    font-size: 0.72rem;
  }

  .tableau .card,
  .solitaire-top .card {
    aspect-ratio: auto;
    height: 46px;
  }

  .solitaire-top .card,
  .solitaire-top .foundation {
    min-height: 44px;
    height: 50px;
  }

  .tableau-col .card {
    margin-top: -31px;
  }

  .solitaire-actions {
    gap: 6px;
  }

  .solitaire-actions .primary-button,
  .solitaire-actions .ghost-button {
    min-height: 38px;
  }

  .solitaire-game > .arcade-note {
    display: none;
  }

  .literal-card h2,
  .knowledge-card h2,
  .game-control-card h2,
  .lifestyle-card h2 {
    font-size: 1rem;
  }

  .literal-options,
  .knowledge-options,
  .arcade-controls,
  .solitaire-actions {
    gap: 6px;
  }
}

.chart-links {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(102, 217, 255, 0.14);
}

.chart-links a {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ice);
  font-size: 0.78rem;
  font-weight: 950;
  text-decoration: none;
  text-transform: uppercase;
}

.store-layout {
  display: grid;
  gap: clamp(8px, 1.5vh, 12px);
  min-height: 0;
}

.store-panel,
.track-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgba(255, 215, 0, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(0, 174, 239, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(10, 10, 10, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 30px rgba(0, 0, 0, 0.22);
}

.store-panel h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3.4vw, 2rem);
  font-weight: 950;
}

.voucher-card {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px dashed rgba(255, 215, 0, 0.42);
  border-radius: 8px;
  background: rgba(255, 215, 0, 0.08);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
}

.voucher-card.active {
  border-style: solid;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.18);
}

.track-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.track-card {
  grid-template-columns: minmax(0, 1fr);
}

.track-card strong,
.track-card span {
  display: block;
}

.track-card strong {
  font-size: 0.95rem;
  font-weight: 950;
}

.track-card span {
  color: var(--ice);
  font-size: 0.74rem;
  font-weight: 850;
}

.track-card.owned {
  border-color: rgba(0, 255, 136, 0.36);
  background:
    linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 174, 239, 0.1)),
    rgba(10, 10, 10, 0.82);
}

.track-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
}

.store-policy-link {
  justify-self: start;
  padding: 0;
  text-align: left;
}

.policy-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
}

.policy-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.legal-screen {
  justify-content: start;
}

.legal-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 760px);
  max-height: min(620px, calc(100vh - 150px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  border: 1px solid rgba(102, 217, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 174, 239, 0.12), rgba(255, 215, 0, 0.08)),
    rgba(10, 10, 10, 0.88);
  box-shadow: 0 0 26px rgba(0, 174, 239, 0.12);
}

.legal-panel h2 {
  margin: 0;
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 950;
}

.legal-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.5;
}

.store-pager {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  gap: 6px;
  align-items: center;
  text-align: center;
}

.store-pager strong {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
}

.download-link {
  display: grid;
  place-items: center;
  min-height: 36px;
  text-decoration: none;
}

.joke-card {
  min-height: 330px;
  place-content: center;
  text-align: center;
}

.mood-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mood-chip,
.book-tab,
.pet-choice {
  min-height: 48px;
  border: 1px solid rgba(102, 217, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  font-weight: 900;
  cursor: pointer;
}

.mood-chip {
  flex: 1 1 92px;
  padding: 10px;
}

.mood-chip.active,
.book-tab.active,
.pet-choice.active {
  border-color: rgba(255, 215, 0, 0.58);
  background: linear-gradient(135deg, rgba(0, 174, 239, 0.2), rgba(255, 159, 28, 0.18));
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.16);
}

.breathing-card {
  overflow: hidden;
}

.breathing-card h2 {
  color: var(--ice);
  text-shadow: 0 0 18px rgba(0, 174, 239, 0.5);
}

.book-list,
.pet-picker {
  align-content: start;
}

.book-tab,
.pet-choice {
  display: grid;
  gap: 3px;
  padding: 12px;
  text-align: left;
}

.book-tab span,
.pet-choice small {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.74rem;
}

.reader-card {
  min-height: 390px;
}

.reader-page {
  min-height: 150px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.05rem;
  line-height: 1.55;
}

.reading-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.reading-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  box-shadow: 0 0 18px rgba(0, 174, 239, 0.5);
}

.pet-choice {
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
}

.pet-choice span {
  grid-row: span 2;
  font-size: 2rem;
}

.pet-card {
  text-align: center;
}

.pet-stage {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 108px;
  height: 108px;
  border: 2px solid rgba(255, 215, 0, 0.4);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(102, 217, 255, 0.28), rgba(255, 159, 28, 0.12) 58%, rgba(10, 10, 10, 0.8));
  box-shadow: 0 0 30px rgba(0, 174, 239, 0.34);
  font-size: 3.6rem;
}

.pet-stage.large {
  width: 138px;
  height: 138px;
  font-size: 4.4rem;
}

.pet-companion {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  top: max(74px, env(safe-area-inset-top));
  z-index: 55;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.26), transparent 24%),
    linear-gradient(135deg, rgba(0, 174, 239, 0.8), rgba(255, 159, 28, 0.75));
  box-shadow: 0 0 24px rgba(0, 174, 239, 0.42), 0 0 30px rgba(255, 159, 28, 0.22);
  color: var(--white);
  cursor: pointer;
  animation: pet-float 2.8s ease-in-out infinite;
}

.pet-companion span {
  display: inline-block;
  font-size: 1.9rem;
  line-height: 1;
}

.pet-companion.dog .pet-companion-icon {
  animation: pet-dog-backflip 760ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.pet-companion.cat .pet-companion-icon {
  animation: pet-cat-purr 760ms ease;
}

.pet-companion.bird .pet-companion-icon {
  animation: pet-bird-chirp 720ms ease;
}

.pet-companion.llama .pet-companion-icon {
  animation: pet-llama-hoof 760ms ease;
}

.pet-companion small {
  position: absolute;
  right: -4px;
  bottom: -2px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #1b1200;
  font-size: 0.62rem;
  font-weight: 950;
}

@keyframes pet-float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes pet-dog-backflip {
  0% { transform: translateY(0) rotate(0deg) scale(1); }
  45% { transform: translateY(-20px) rotate(220deg) scale(1.15); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}

@keyframes pet-cat-purr {
  0% { transform: scale(1) skewX(0deg); }
  35% { transform: scaleX(1.18) scaleY(0.9) skewX(-8deg); }
  65% { transform: scaleX(0.96) scaleY(1.18) skewX(6deg); }
  100% { transform: scale(1) skewX(0deg); }
}

@keyframes pet-bird-chirp {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 0 var(--ice)); }
  30% { transform: translateY(-10px) scale(1.12); filter: drop-shadow(0 0 10px var(--ice)); }
  58% { transform: translateY(-4px) scale(1.04) rotate(-8deg); }
}

@keyframes pet-llama-hoof {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  32% { transform: translateY(-14px) rotate(-8deg) scale(1.12); }
  64% { transform: translateY(-10px) rotate(8deg) scale(1.14); }
}

@media (min-width: 680px) {
  .game-menu,
  .knowledge-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .block-layout {
    grid-template-columns: minmax(320px, 0.9fr) minmax(300px, 1fr);
    align-items: start;
  }

  .chess-layout {
    grid-template-columns: minmax(340px, 0.95fr) minmax(300px, 1fr);
    align-items: start;
  }

  .bubble-layout {
    grid-template-columns: minmax(320px, 0.88fr) minmax(280px, 1fr);
    align-items: start;
  }

  .snake-layout {
    grid-template-columns: minmax(320px, 0.88fr) minmax(300px, 1fr);
    align-items: start;
  }

  .checkers-layout,
  .darts-layout,
  .runner-layout,
  .nose-layout,
  .stickman-layout,
  .stickman-3d-layout,
  .jigsaw-layout {
    grid-template-columns: minmax(340px, 0.95fr) minmax(300px, 1fr);
    align-items: start;
  }

  .pool-layout {
    grid-template-columns: minmax(520px, 1.35fr) minmax(280px, 0.75fr);
    align-items: start;
  }

  .challenge-layout {
    grid-template-columns: minmax(340px, 0.95fr) minmax(300px, 1fr);
    align-items: start;
  }

  .lifestyle-grid,
  .reading-layout,
  .pet-layout {
    grid-template-columns: minmax(280px, 0.75fr) minmax(320px, 1fr);
    align-items: start;
  }

  .difficulty-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .social-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-mast {
    grid-template-columns: 64px minmax(0, 1fr) auto;
  }

  .game-mast strong {
    grid-column: auto;
  }
}

@media (max-width: 430px) {
  .solitaire-game {
    gap: 5px;
  }

  .tableau {
    gap: 3px;
    padding: 4px;
    max-height: min(38vh, 360px);
    max-height: min(38dvh, 360px);
  }

  .card {
    min-height: 58px;
    border-radius: 5px;
    font-size: 0.66rem;
  }

  .tableau-col .card {
    margin-top: -32px;
  }

  .solitaire-top {
    grid-template-columns: 40px 40px minmax(0, 1fr);
    gap: 4px;
    padding: 4px;
  }

  .foundation {
    min-height: 42px;
  }

  .solitaire-top .card,
  .solitaire-top .foundation {
    height: 46px;
    min-height: 40px;
  }

  .card-face em {
    right: 2px;
    top: 2px;
    min-width: 17px;
    height: 17px;
    font-size: 0.54rem;
  }
}

@media (min-width: 520px) {
  .arcade-game .dart-swatch,
  .arcade-game .mode-chip,
  .arcade-game .mood-chip,
  .arcade-game .primary-button,
  .arcade-game .gold-button,
  .arcade-game .ghost-button,
  .arcade-game .answer-card {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 0.66rem;
    line-height: 1;
  }

  .arcade-game .dart-swatch::before {
    inset: 5px;
  }

  .arcade-game .game-control-card {
    gap: 5px;
    padding: 7px;
  }

  .arcade-game .mode-row,
  .arcade-game .mood-row,
  .arcade-game .dart-colour-row,
  .arcade-game .arcade-controls,
  .arcade-game .fight-controls {
    gap: 4px;
  }

  .arcade-game .dart-colour-row {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .arcade-game .game-control-card h2 {
    font-size: 0.98rem;
    line-height: 1;
  }

  .arcade-game .game-control-card p:not(.eyebrow) {
    font-size: 0.68rem;
    line-height: 1.12;
  }
}

@media (max-width: 519px) {
  .game-difficulty-dock .arcade-difficulty {
    padding: 6px;
  }

  .game-difficulty-dock .difficulty-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .game-difficulty-dock .difficulty-chip {
    min-height: 32px;
    padding: 4px 2px;
  }

  .game-difficulty-dock .difficulty-chip span {
    display: none;
  }

  .game-difficulty-dock .difficulty-chip strong {
    font-size: 0.58rem;
  }

  .game-rules-tab {
    gap: 5px;
  }

  .rules-toggle {
    min-height: 30px;
    padding: 0 9px;
    font-size: 0.6rem;
  }

  .rules-panel {
    padding: 9px;
  }

  .rules-panel ul {
    font-size: 0.7rem;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .settings-panel {
    padding: 9px;
  }

  .saved-list {
    max-height: 190px;
  }

  .saved-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .bubble-blast-screen,
  .bubble-blast-game {
    gap: 7px;
  }

  .bubble-title-card {
    min-height: min(70vh, 560px);
    padding: 16px;
  }

  .blast-mode-grid {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .blast-mode-card {
    min-height: 94px;
    padding: 10px;
  }

  .blast-stage-wrap {
    height: min(56vh, 520px);
    height: min(56dvh, 520px);
  }

  .blast-hud {
    gap: 4px;
  }

  .blast-hud span {
    min-height: 24px;
    padding: 3px 4px;
    font-size: 0.62rem;
  }

  .blast-controls {
    padding: 8px;
  }

  .blast-controls p {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .blast-controls .mode-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .blast-controls .ghost-button {
    min-height: 34px;
    padding: 6px 5px;
    font-size: 0.62rem;
  }

  .sudoku-layout {
    gap: 8px;
  }

  .sudoku-grid-board {
    width: min(100%, 350px);
    border-width: 2px;
  }

  .sudoku-square {
    font-size: clamp(0.9rem, 5vw, 1.28rem);
  }

  .sudoku-square.box-right {
    border-right-width: 2px;
  }

  .sudoku-square.box-bottom {
    border-bottom-width: 2px;
  }

  .sudoku-number-pad {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 3px;
  }

  .sudoku-number-pad button {
    min-height: 32px;
    padding: 2px;
    font-size: 0.86rem;
  }

  .guess-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .guess-face {
    padding: 4px;
    font-size: 0.52rem;
  }

  .guess-layout .answer-card,
  .pet-layout .mood-chip,
  .pet-layout .primary-button,
  .pet-layout .gold-button {
    min-height: 26px;
    padding: 4px;
    font-size: 0.62rem;
    line-height: 1;
  }

  .pet-stage.large {
    width: 86px;
    height: 86px;
    font-size: 3rem;
  }

  .pet-choice {
    min-height: 34px;
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .pet-choice span {
    font-size: 1.45rem;
  }

  .track-card {
    padding: 7px;
  }

  .track-actions {
    gap: 4px;
  }
}

@media (min-width: 680px) {
  .tableau {
    max-height: min(34vh, 270px);
    max-height: min(34dvh, 270px);
  }

  .tableau-col .card {
    margin-top: -50px;
  }

  .tableau-col .card:first-child {
    margin-top: 0;
  }

  .card,
  .foundation {
    min-height: 58px;
  }

  .tableau .card,
  .solitaire-top .card {
    aspect-ratio: auto;
    height: 58px;
  }
}
