/* PolarChase website — shared styles */

:root {
  color-scheme: dark;
  --night: #08121d;
  --night-2: #0d1b2a;
  --panel: rgba(18, 36, 54, 0.72);
  --panel-solid: #122436;
  --line: rgba(190, 225, 245, 0.14);
  --line-strong: rgba(190, 225, 245, 0.28);
  --snow: #f1f7fb;
  --ice: #cfe7f4;
  --muted: #94adbf;
  --glacier: #7cc8ea;
  --glacier-deep: #3f93c4;
  --aurora: #7eecc4;
  --backrooms: #e2cc72;
  --danger: #ff8a7a;
  --discord: #5865f2;
  --radius: 14px;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(126, 236, 196, 0.13), transparent 60%),
    radial-gradient(900px 600px at 10% -12%, rgba(124, 200, 234, 0.16), transparent 62%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night) 55%, #060e17 100%);
  background-attachment: fixed;
  color: var(--snow);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--glacier); }
a:hover { color: var(--snow); }

:focus-visible {
  outline: 2px solid var(--aurora);
  outline-offset: 3px;
  border-radius: 6px;
}

#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(8, 18, 29, 0.66);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--snow);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.brand svg { width: 26px; height: 26px; color: var(--glacier); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: var(--ice);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav-links a:hover { background: rgba(207, 231, 244, 0.08); color: var(--snow); }
.nav-links a[aria-current="page"] { color: var(--snow); background: rgba(207, 231, 244, 0.1); }

@media (max-width: 640px) {
  .nav-links .hide-sm { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 12px;
  font-family: var(--body);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:hover { transform: translateY(-2px); }

.btn-discord {
  background: var(--discord);
  color: #fff;
  box-shadow: 0 8px 28px -8px rgba(88, 101, 242, 0.75);
}
.btn-discord:hover { color: #fff; background: #6874f5; box-shadow: 0 12px 34px -8px rgba(88, 101, 242, 0.9); }

.btn-ghost {
  background: rgba(207, 231, 244, 0.06);
  color: var(--snow);
  border-color: var(--line-strong);
}
.btn-ghost:hover { color: var(--snow); background: rgba(207, 231, 244, 0.12); }

.btn-sm { padding: 8px 14px; font-size: 0.9rem; border-radius: 10px; }
.btn-sm svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */

.hero {
  --ground: clamp(80px, 9vw, 130px);
  position: relative;
  overflow-x: clip; /* the bear's glow and snow mound may spill past narrow screens */
  padding-block: clamp(56px, 11vw, 120px) 0;
}

/* Snowy ground across the bottom of the hero; it hides where the player screenshot ends. */
.hero-ground {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  height: var(--ground);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--aurora);
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--aurora);
  box-shadow: 0 0 12px var(--aurora);
}

.hero-copy {
  container-type: inline-size;
  min-width: 0;
  padding-bottom: calc(var(--ground) + 24px);
}

.wordmark {
  margin: 14px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 7rem);
  /* "PolarChase" is ~4.8em wide: fill the column, never overflow it */
  font-size: clamp(3rem, 19.5cqi, 7.6rem);
  white-space: nowrap;
  line-height: 0.92;
  letter-spacing: 0.005em;
  background: linear-gradient(180deg, #ffffff 0%, #e4f3fb 45%, #9fd6f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(124, 200, 234, 0.35));
  text-wrap: balance;
}

.hero-lede {
  max-width: 44ch;
  margin: 22px 0 0;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  color: var(--ice);
  text-wrap: pretty;
}
.hero-lede strong { color: var(--snow); }

.hero-sub {
  max-width: 50ch;
  margin: 14px 0 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* Mode names in the intro: colored like their tab, and they open that slide. */
.lede-mode {
  color: var(--c);
  font-weight: 800;
  text-decoration: underline dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, var(--c) 55%, transparent);
  transition: text-shadow 0.2s ease, text-decoration-color 0.2s ease;
}
.lede-mode:hover {
  color: var(--c);
  text-decoration-color: var(--c);
  text-shadow: 0 0 18px color-mix(in srgb, var(--c) 60%, transparent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* The player peeking over a snowbank, under a soft aurora glow (no frame, no hard edges). */
.hero-player {
  position: relative;
  isolation: isolate;
  justify-self: center;
  align-self: end;
  width: min(100%, 500px);
  padding-top: 8%;
  /* stand the bear a little below the snow line so the ground covers the cut */
  margin-bottom: calc(var(--ground) * 0.1);
}
.hero-player::before {
  content: "";
  position: absolute;
  inset: -12% -18% 6%;
  z-index: -1;
  background:
    radial-gradient(ellipse 46% 42% at 50% 46%, rgba(124, 200, 234, 0.34), transparent 72%),
    radial-gradient(ellipse 34% 26% at 28% 26%, rgba(126, 236, 196, 0.2), transparent 70%),
    radial-gradient(ellipse 30% 24% at 76% 30%, rgba(167, 139, 250, 0.14), transparent 70%);
  filter: blur(18px);
  animation: aurora 9s ease-in-out infinite alternate;
}
@keyframes aurora {
  from { opacity: 0.75; transform: translateX(-2%) scale(1); }
  to { opacity: 1; transform: translateX(2%) scale(1.05); }
}
.hero-player img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(124, 200, 234, 0.45));
  animation: bob 6s ease-in-out infinite;
}
.hero-drift {
  position: absolute;
  left: -12%;
  bottom: -2%;
  width: 124%;
  height: 34%;
  filter: drop-shadow(0 -4px 14px rgba(207, 231, 244, 0.22));
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .hero-player { width: min(100%, 340px); }
}

/* ---------- Sections ---------- */

.section { padding-block: 72px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 32px;
  margin-bottom: 32px;
}
.section-head h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
  text-wrap: balance;
}
.section-head p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
}

/* ---------- Shared bits ---------- */

.mode-icon {
  --tint: var(--glacier);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--tint);
  background: color-mix(in srgb, var(--tint) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint) 30%, transparent);
}
.mode-icon svg { width: 26px; height: 26px; }

.tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--glacier);
}

.section-tight { padding-block: 48px 0; }

/* ---------- "Pick a game mode" slider ---------- */

.worlds {
  --mode-color: var(--glacier);
  position: relative;
  z-index: 1;
  padding-top: 72px;
  scroll-margin-top: 64px;
}
.worlds-head { margin-bottom: 24px; }

/* Big all-caps title; "GAME MODE" glows in the selected mode's color (set by worlds.js). */
.section-head h2.worlds-title {
  margin-top: 10px;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #e4f3fb 50%, #9fd6f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.worlds-title span {
  display: inline-block;
  color: var(--mode-color);
  -webkit-text-fill-color: currentColor;
  text-shadow: 0 0 28px color-mix(in srgb, var(--mode-color) 55%, transparent);
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.worlds-controls {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.world-tabs {
  position: relative;
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(207, 231, 244, 0.06);
  border: 1px solid var(--line);
}
.world-tabs::-webkit-scrollbar { display: none; }
.world-tab {
  --tab-color: var(--glacier);
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ice);
  font: 700 0.92rem var(--body);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.world-tab:hover { color: var(--snow); background: rgba(207, 231, 244, 0.08); }
.world-tab[aria-selected="true"] {
  color: var(--snow);
  background: color-mix(in srgb, var(--tab-color) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tab-color) 60%, transparent);
}
.tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tab-color);
  box-shadow: 0 0 10px var(--tab-color);
}

.world-arrows {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.world-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(207, 231, 244, 0.06);
  color: var(--snow);
  cursor: pointer;
  transition: background 0.2s ease;
}
.world-arrow:hover { background: rgba(207, 231, 244, 0.16); }
.world-arrow svg { width: 20px; height: 20px; }
.world-count {
  min-width: 3.4em;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.world-track {
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  transition: height 0.45s ease;
}
.world-track::-webkit-scrollbar { display: none; }
.world-track > .slide {
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* Cards rise in as their slide arrives (they rest fully visible). */
@keyframes rise {
  from { opacity: 0.15; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.slide.is-active :is(.entity, .horror, .mode-art, .mode-point) { animation: rise 0.5s ease backwards; }
.slide.is-active :is(.entity, .horror, .mode-art, .mode-point):nth-child(2) { animation-delay: 0.06s; }
.slide.is-active :is(.entity, .horror, .mode-art, .mode-point):nth-child(3) { animation-delay: 0.12s; }
.slide.is-active :is(.entity, .horror, .mode-art, .mode-point):nth-child(4) { animation-delay: 0.18s; }
.slide.is-active :is(.entity, .horror, .mode-art, .mode-point):nth-child(5) { animation-delay: 0.24s; }
.slide.is-active :is(.entity, .horror, .mode-art, .mode-point):nth-child(6) { animation-delay: 0.3s; }

/* ---------- Backrooms zone ---------- */
/* The one warm place on a cold site: mono-yellow wallpaper under fluorescent tubes. */

.backrooms-zone {
  --wall: #c9b458;
  --wall-dark: #1c1808;
  position: relative;
  margin-block: 40px;
  background:
    linear-gradient(180deg, rgba(8, 18, 29, 0.9) 0%, rgba(24, 20, 6, 0.86) 14%, rgba(24, 20, 6, 0.86) 86%, rgba(8, 18, 29, 0.9) 100%),
    repeating-linear-gradient(90deg, rgba(226, 204, 114, 0.22) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(90deg, rgba(226, 204, 114, 0.1) 0 1px, transparent 1px 9px),
    #2a2410;
  border-block: 1px solid rgba(226, 204, 114, 0.18);
  overflow: hidden;
}
.backrooms-zone .eyebrow { color: var(--backrooms); }
.backrooms-zone .eyebrow .dot { background: var(--backrooms); box-shadow: 0 0 12px var(--backrooms); }
.backrooms-zone .section-head h2 { color: #f6eab8; }
.backrooms-zone .section-head p { color: #cbbf8f; }

.fluorescent {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  padding-inline: 20px;
  margin: -72px auto 56px;
  max-width: 1120px;
}
.fluorescent span {
  display: block;
  width: min(220px, 28%);
  height: 8px;
  border-radius: 0 0 4px 4px;
  background: #fffbe0;
  box-shadow: 0 0 18px 4px rgba(255, 245, 190, 0.55), 0 18px 80px 30px rgba(255, 240, 170, 0.12);
}
.fluorescent span:nth-child(2) { animation: flicker 6s steps(1) infinite; }

@keyframes flicker {
  0%, 100% { opacity: 1; }
  41% { opacity: 0.25; }
  42% { opacity: 1; }
  44% { opacity: 0.4; }
  45% { opacity: 1; }
  78% { opacity: 0.6; }
  79% { opacity: 1; }
}

.entities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 900px) { .entities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .entities { grid-template-columns: 1fr; } }

.entity {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(16, 13, 3, 0.72);
  border: 1px solid rgba(226, 204, 114, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.entity:hover {
  transform: translateY(-3px);
  border-color: rgba(226, 204, 114, 0.55);
}
.entity-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
  color: var(--backrooms);
  background: rgba(226, 204, 114, 0.1);
  border: 1px dashed rgba(226, 204, 114, 0.45);
}
.entity-mark svg { width: 30px; height: 30px; }
.entity .tag { color: var(--backrooms); }
.entity h3 {
  margin: 2px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.1;
  color: #fbf3cf;
}
.entity p { margin: 6px 0 0; color: #d9cfa6; font-size: 0.97rem; }

/* The Smiler lives in the dark, so its card does too. */
.entity.smiler { background: #050403; border-color: rgba(255, 255, 255, 0.12); }
.entity.smiler .entity-mark {
  color: #fffef2;
  background: #000;
  border-color: rgba(255, 255, 255, 0.2);
  filter: drop-shadow(0 0 8px rgba(255, 255, 240, 0.6));
}
.entity.smiler .tag { color: #e9e6d6; }

/* ---------- Horror zone ---------- */
/* Deep crimson, blood dripping from the top edge. */

.horror-zone {
  --blood: #e5484d;
  position: relative;
  margin-block: 40px;
  padding-top: 110px;
  background:
    radial-gradient(900px 420px at 50% 20%, rgba(170, 16, 30, 0.35), transparent 70%),
    radial-gradient(ellipse at 50% 100%, rgba(90, 6, 14, 0.5), transparent 70%),
    #0c0305;
  border-bottom: 1px solid rgba(229, 72, 77, 0.25);
  overflow: hidden;
}
.drips {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: 60px;
  fill: #7a0c16;
  filter: drop-shadow(0 2px 6px rgba(229, 72, 77, 0.35));
}
.horror-zone .eyebrow { color: var(--blood); }
.horror-zone .eyebrow .dot { background: var(--blood); box-shadow: 0 0 12px var(--blood); }
.horror-zone .section-head h2 { color: #ffe3e4; text-shadow: 0 0 28px rgba(229, 72, 77, 0.55); }
.horror-zone .section-head p { color: #cfa3a6; }

.horrors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
/* Three cards: go straight from a row of three to one per row, with the picture beside the text. */
@media (max-width: 900px) {
  .horrors { grid-template-columns: 1fr; }
  .horrors .horror { flex-direction: row; }
  .horror .horror-art {
    flex: none;
    width: clamp(96px, 28%, 180px);
    aspect-ratio: 1;
    border-bottom: 0;
    border-right: 1px solid rgba(229, 72, 77, 0.25);
  }
  .horror-body { align-self: center; }
}

.horror {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(60, 8, 14, 0.6), rgba(20, 4, 6, 0.9));
  border: 1px solid rgba(229, 72, 77, 0.28);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.horror:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 72, 77, 0.7);
  box-shadow: 0 14px 40px -12px rgba(229, 72, 77, 0.45);
}
.horror-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  background: #0d0405;
  border-bottom: 1px solid rgba(229, 72, 77, 0.25);
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transition: transform 0.5s ease;
}
/* Screenshots creep a little closer on hover. */
img.horror-art { transform-origin: var(--focus, 50% 50%); }
.horror:hover img.horror-art { transform: scale(1.05); }
.horror-body { padding: 18px 20px 22px; }
.horror .tag { color: var(--blood); }
.horror h3 {
  margin: 4px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.1;
  color: #ffe9ea;
}
.horror p { margin: 6px 0 0; color: #dcb9bb; font-size: 0.97rem; }


/* ---------- Mode slides (Sandbox, Only Up, Russian Roulette, Color Blocks) ---------- */

.mode-slide {
  --accent: var(--glacier);
  position: relative;
  overflow: hidden;
}
.mode-slide .eyebrow { color: var(--accent); }
.mode-slide .eyebrow .dot { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.mode-slide .section-head p { color: color-mix(in srgb, var(--accent) 18%, #d9e6ee); }

.mode-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}
@media (max-width: 760px) { .mode-layout { grid-template-columns: 1fr; } }

.mode-art {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 7%, rgba(4, 10, 16, 0.55));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.mode-art svg { display: block; width: 100%; height: auto; }
/* Real screenshots: same 4:3 frame as the drawings, cropped around the action. */
.mode-shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
}

.mode-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.mode-point {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(4, 10, 16, 0.5);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.point-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1;
}
.point-mark svg { width: 20px; height: 20px; }
.mode-point h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.15;
}
.mode-point p { margin: 4px 0 0; color: var(--ice); font-size: 0.97rem; }

/* Sandbox: no backdrop, the falling snow shows straight through. Gold like sand. */
.sandbox-zone { --accent: #f5b942; }
.ghost-block { animation: ghost 2.4s ease-in-out infinite; }
@keyframes ghost {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.45; transform: translateY(6px); }
}

/* Only Up: purple night sky with the summit glowing at the top. */
.onlyup-zone {
  --accent: #b794ff;
  background:
    radial-gradient(700px 320px at 75% 0%, rgba(183, 148, 255, 0.32), transparent 70%),
    linear-gradient(180deg, #1c1042 0%, #150c33 60%, #0c0822 100%);
  border-block: 1px solid rgba(183, 148, 255, 0.2);
}

/* Russian Roulette: a dark room under one cyan spotlight. */
.roulette-zone {
  --accent: #5ee7ff;
  background:
    radial-gradient(ellipse 45% 75% at 50% -10%, rgba(94, 231, 255, 0.26), transparent 70%),
    #04121a;
  border-block: 1px solid rgba(94, 231, 255, 0.2);
}
.cylinder { transform-box: fill-box; transform-origin: center; }
.slide.is-active .cylinder { animation: cylinder-spin 1.6s cubic-bezier(0.15, 0.7, 0.2, 1) backwards; }
@keyframes cylinder-spin {
  from { transform: rotate(-420deg); }
  to { transform: rotate(0deg); }
}

/* Color Blocks: green tile grid on the floor. */
.colorblocks-zone {
  --accent: #4ade80;
  background:
    linear-gradient(rgba(74, 222, 128, 0.07) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(74, 222, 128, 0.07) 1px, transparent 1px) 0 0 / 44px 44px,
    radial-gradient(800px 360px at 50% 0%, rgba(74, 222, 128, 0.18), transparent 70%),
    #04140c;
  border-block: 1px solid rgba(74, 222, 128, 0.2);
}
.tile-hot { animation: tile-pulse 1.4s ease-in-out infinite; }
@keyframes tile-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ---------- Extras strip ---------- */

.extras {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
}
.extras .mode-icon { --tint: var(--aurora); color: var(--aurora); background: rgba(126, 236, 196, 0.12); border-color: rgba(126, 236, 196, 0.3); }
.extras h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.4rem; }
.extras p { margin: 2px 0 0; color: var(--ice); }

/* ---------- Discord band ---------- */

.discord-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 22px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(88, 101, 242, 0.45), transparent 70%),
    radial-gradient(500px 280px at 0% 100%, rgba(124, 200, 234, 0.22), transparent 70%),
    var(--panel-solid);
  border: 1px solid rgba(140, 150, 255, 0.35);
  overflow: hidden;
}
@media (max-width: 760px) { .discord-band { grid-template-columns: 1fr; } }

.discord-band h2 {
  margin: 8px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.05;
}
.discord-band p { max-width: 46ch; margin: 12px 0 0; color: var(--ice); }
.discord-band .eyebrow { color: #aab2ff; }
.discord-band .eyebrow .dot { background: #aab2ff; box-shadow: 0 0 12px #aab2ff; }

.invite {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}
.invite-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
  background: rgba(6, 14, 23, 0.6);
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--snow);
}
.invite-code span { overflow-wrap: anywhere; user-select: all; }
.copy-btn {
  flex: none;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(207, 231, 244, 0.08);
  color: var(--ice);
  font: 700 0.82rem var(--body);
  cursor: pointer;
}
.copy-btn:hover { background: rgba(207, 231, 244, 0.16); color: var(--snow); }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(6, 14, 23, 0.7);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer a { color: var(--ice); text-decoration: none; }
.footer a:hover { color: var(--snow); text-decoration: underline; }

/* ---------- Privacy page ---------- */

.doc-hero { padding-block: 56px 28px; }
.doc-hero h1 {
  margin: 12px 0 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 18px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(207, 231, 244, 0.07);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--ice);
}
.chip b { color: var(--snow); font-weight: 700; }

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 48px;
  padding-bottom: 40px;
}
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; gap: 24px; } }

.toc {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 88px);
  padding: 18px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .toc { position: static; } }
.toc h2 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a {
  display: grid;
  grid-template-columns: 1.6em 1fr;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--ice);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
}
.toc a span { color: var(--glacier); font-variant-numeric: tabular-nums; }
.toc a:hover { background: rgba(207, 231, 244, 0.08); color: var(--snow); }

.doc {
  max-width: 70ch;
  padding: clamp(22px, 4vw, 44px);
  border-radius: 18px;
  background: rgba(13, 27, 42, 0.82);
  border: 1px solid var(--line);
}
.doc section + section {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.doc h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.65rem;
  line-height: 1.15;
  scroll-margin-top: 96px;
}
.doc h2 .num {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--glacier);
  font-variant-numeric: tabular-nums;
}
.doc h3 {
  margin: 22px 0 8px;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--snow);
}
.doc p { margin: 0 0 12px; color: var(--ice); }
.doc ul { margin: 0 0 12px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.doc li {
  position: relative;
  padding-left: 22px;
  color: var(--ice);
}
.doc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  transform: rotate(45deg);
  background: var(--glacier);
  opacity: 0.8;
}
.doc li b { color: var(--snow); }

.contact-card {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(6, 14, 23, 0.55);
  border: 1px solid var(--line-strong);
}
.contact-card .label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card a { font-weight: 700; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-player img, .hero-player::before, .fluorescent span, .ghost-block, .tile-hot,
  .slide.is-active :is(.entity, .horror, .mode-art, .mode-point), .slide.is-active .cylinder { animation: none; }
  .world-track { transition: none; }
  .btn, .entity, .horror { transition: none; }
  .btn:hover, .entity:hover, .horror:hover, .horror:hover img.horror-art { transform: none; }
}
