:root {
  color-scheme: dark;
  --bg: #040608;
  --bg-soft: rgba(11, 18, 24, 0.82);
  --line: rgba(174, 220, 255, 0.12);
  --text: #edf5ff;
  --muted: rgba(237, 245, 255, 0.68);
  --accent-strong: #d8f1ff;
  --shadow: rgba(0, 0, 0, 0.44);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(73, 124, 168, 0.18), transparent 32%),
    radial-gradient(circle at 50% 120%, rgba(26, 63, 92, 0.24), transparent 36%),
    var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

body {
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  inset: auto;
  width: 32rem;
  height: 32rem;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.22;
}

.ambient-left {
  top: -10rem;
  left: -8rem;
  background: rgba(56, 113, 158, 0.36);
}

.ambient-right {
  right: -10rem;
  bottom: -12rem;
  background: rgba(16, 76, 120, 0.34);
}

.shell {
  width: min(1280px, calc(100vw - 28px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 18px 0 24px;
  display: grid;
  align-items: center;
}

.playground {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 360px);
  gap: 18px;
  align-items: stretch;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 22, 28, 0.9), var(--bg-soft));
  border-radius: 28px;
  box-shadow: 0 24px 80px var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow,
.section-label,
.overlay-kicker {
  margin: 0 0 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
}

.game-copy h1,
.copy-block h2,
.overlay-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.game-copy h1 {
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 0.92;
  max-width: 11ch;
}

.copy-block h2 {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 12px;
}

.lede,
.copy-block p,
.overlay-subtitle,
.hint {
  color: var(--muted);
  line-height: 1.65;
  font-size: 1rem;
}

.game-panel {
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-height: min(92svh, 960px);
}

.game-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.game-copy {
  max-width: 42rem;
}

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

.stat-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-card strong {
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.game-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background:
    radial-gradient(circle at 50% 20%, rgba(108, 180, 255, 0.12), transparent 24%),
    linear-gradient(180deg, #06090d, #020304);
}

.depth-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(420px, 68svh, 760px);
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(4, 8, 12, 0.18), rgba(4, 8, 12, 0.52));
  pointer-events: none;
  transition: opacity 180ms ease;
}

.overlay.is-hidden {
  opacity: 0;
}

.overlay-title {
  font-size: clamp(2rem, 6vw, 3.3rem);
}

.overlay-subtitle {
  margin: 10px auto 0;
  max-width: 26ch;
}

.game-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  transition:
    transform 160ms ease,
    opacity 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(180deg, #dff5ff, #99d7ff);
  color: #0c1620;
  font-weight: 700;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hint span {
  color: var(--accent-strong);
}

.copy-panel {
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.aside-note {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 1080px) {
  .shell {
    width: min(900px, calc(100vw - 22px));
    padding-top: 12px;
  }

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

  .game-panel {
    min-height: unset;
  }

  .game-topline,
  .game-bottomline {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-panel {
    order: 2;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 14px, 100%);
    padding: 8px 0 14px;
  }

  .copy-panel,
  .game-panel {
    padding: 14px;
    border-radius: 20px;
  }

  .game-stage {
    border-radius: 18px;
  }

  .game-copy h1 {
    font-size: clamp(2rem, 12vw, 3.3rem);
  }

  .copy-block h2 {
    font-size: 1.72rem;
  }

  .overlay-title {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
  }

  .depth-canvas {
    min-height: min(66svh, 560px);
  }

  .stats-inline,
  .controls {
    grid-template-columns: 1fr;
  }

  .controls {
    display: grid;
  }
}

@media (max-width: 420px) {
  .depth-canvas {
    min-height: min(62svh, 500px);
  }
}
