/* Nixi — nixivt · one-page site
   Brand: cozy kawaii meets retro pixel game (brand kit 2026-10-04). Frosted-glass panels over a
   pixel-art Minecraft world: animated on a capable GPU (world.js), a still of it everywhere else. */

/* ---------- Tokens ---------- */
:root {
  /* brand palette: pink is Nixi, navy and End purple give depth, teal is live/system information */
  --pink: #EC92BB;
  --rose: #DE76A8;
  --blossom: #F7B4D2;
  --navy: #243058;
  --red: #C02A44;
  --paper: #F8F6F0;
  --teal: #2FB3A5;
  --end: #3B1F4E;

  --red-deep: #8E1D35;
  --red-hover: #CF3150;
  --navy-deep: #19213F;
  --teal-deep: #1E7F75;
  --rose-deep: #C55E92;
  --ink: var(--navy);
  --ink-soft: #3F4870;
  --blush: #FCEEF4;

  /* glass */
  --glass: linear-gradient(140deg, rgba(255, 255, 255, .46), rgba(255, 255, 255, .28));
  --glass-solid: rgba(252, 248, 250, .95);
  --glass-edge: rgba(255, 255, 255, .7);
  --glass-dark: linear-gradient(140deg, rgba(36, 30, 72, .52), rgba(59, 31, 78, .4));
  --glass-dark-solid: #262049;
  --glass-dark-edge: rgba(255, 255, 255, .18);
  --glass-blur: blur(20px) saturate(170%);
  --inner: rgba(255, 255, 255, .3);
  --inner-edge: rgba(255, 255, 255, .75);

  --font-display: "Pixelify Sans", "Silkscreen", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-label: "Silkscreen", "Pixelify Sans", ui-monospace, monospace;
  --font-body: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --shadow: 0 24px 60px -28px rgba(25, 18, 52, .55), 0 2px 6px rgba(25, 18, 52, .08);

  /* semantic colours: light (dark mode redefines these below) */
  --page-bg: #3a2a5c;
  --text: var(--navy);
  --text-soft: #3F4870;
  --heading: var(--navy);
  --accent-text: var(--rose-deep);
  --surface: rgba(255, 255, 255, .3);
  --surface-2: rgba(255, 255, 255, .38);
  --line: rgba(36, 48, 88, .2);
  --soft-bg: rgba(36, 48, 88, .08);
  --hover-bg: rgba(255, 255, 255, .7);
  --meter-bg: rgba(255, 255, 255, .7);
  --header-bg: rgba(255, 255, 255, .5);
  --header-bg-scrolled: rgba(255, 255, 255, .7);
  --header-edge: rgba(255, 255, 255, .55);
  --glass-highlight: rgba(255, 255, 255, .8);
  --ghost-bg: rgba(255, 255, 255, .92);
  --ghost-bg-hover: #fff;
  --ghost-fg: var(--navy);
  --ghost-edge: var(--navy);
  --code-bg: var(--blush);
  --code-fg: var(--navy);
  --focus: var(--navy);
  --live-fg: var(--teal-deep);
  --live-bg: rgba(47, 179, 165, .16);
  --veil: linear-gradient(180deg, rgba(248, 246, 240, .10) 0%, rgba(59, 31, 78, .08) 60%, rgba(36, 30, 72, .22) 100%);
  --still-landscape: url("/assets/img/world-still-landscape.webp");
  --still-portrait: url("/assets/img/world-still-portrait.webp");

  --gutter: 16px;
  --max: 1200px;
  --section-gap: clamp(28px, 5vw, 56px);
  color-scheme: light;
}
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --gutter: 32px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--page-bg);
}
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, iframe, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
h1, h2, h3 { line-height: 1.1; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--rose); }
button { font: inherit; }
code {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95em;
  padding: .05em .4em;
  border-radius: 6px;
  background: var(--code-bg);
  color: var(--code-fg);
  white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--blossom); color: var(--navy); }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.clip-helper { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* pixel icons */
.px { width: 32px; height: 32px; flex: none; shape-rendering: crispEdges; }
.px--sm { width: 24px; height: 24px; }
.px--xl { width: 64px; height: 64px; }
.kit-icon { flex: none; object-fit: contain; }
.twitch-glyph { width: 20px; height: 20px; flex: none; }

/* ---------- Taps: the press animation, not the browser's grey flash; no double-tap-zoom wait on controls ---------- */
a, button, summary, [data-copy] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

/* ---------- The world behind the page ---------- */
.world, .world-still {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}
.world {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.world-on .world { opacity: 1; }
.world-still {
  z-index: -3;
  background: #f3a9c6 var(--still-landscape) center / cover no-repeat;
  image-rendering: pixelated;
}
@media (max-width: 700px) and (orientation: portrait) {
  .world-still { background-image: var(--still-portrait); }
}
/* a soft veil so text on glass reads the same over sky, sea and blossoms */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--veil);
}

/* ---------- Glass ---------- */
.glass {
  position: relative;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-highlight);
}
.glass--dark {
  border-color: var(--glass-dark-edge);
  background: var(--glass-dark);
  color: #fff;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .14);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: var(--glass-solid); }
  .glass--dark { background: var(--glass-dark-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass--dark { background: var(--glass-dark-solid); }
}

.panel { padding: clamp(24px, 4.5vw, 52px); }
.card {
  position: relative;
  padding: 22px;
  border: 1px solid var(--inner-edge);
  border-radius: var(--radius);
  background: var(--inner);
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: #fff;
  --btn-fg: var(--navy);
  --btn-edge: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid var(--btn-edge);
  border-radius: 16px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--btn-edge);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
@media (hover: hover) { .btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--btn-edge); } }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-edge); transition-duration: .05s; }
.btn:focus-visible { outline-offset: 5px; }
.btn--primary { --btn-bg: var(--red); --btn-fg: #fff; --btn-edge: var(--red-deep); }
@media (hover: hover) { .btn--primary:hover { --btn-bg: var(--red-hover); } }
.btn--ghost { --btn-bg: var(--ghost-bg); --btn-fg: var(--ghost-fg); --btn-edge: var(--ghost-edge); }
@media (hover: hover) { .btn--ghost:hover { --btn-bg: var(--ghost-bg-hover); } }
.btn--lg { min-height: 60px; padding: 14px 26px; border-radius: 18px; font-size: 1.12rem; }
.btn--sm { min-height: 40px; padding: 7px 14px; border-radius: 12px; font-size: .95rem; box-shadow: 0 3px 0 var(--btn-edge); }
@media (hover: hover) { .btn--sm:hover { box-shadow: 0 5px 0 var(--btn-edge); } }
.btn--sm .twitch-glyph { width: 17px; height: 17px; }

/* ---------- Live status ---------- */
.status-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 2px;
  background: #9AA0B8;
}
[data-live="live"] .status-dot { background: var(--teal); animation: pulse 2s ease-out infinite; }
[data-live="reconnecting"] .status-dot { background: #F4C95D; animation: blink 1.2s steps(2) infinite; }
[data-live="offline"] .status-dot { background: #9AA0B8; }
[data-live="checking"] .status-dot { background: #C9CDE0; animation: blink 1.2s steps(2) infinite; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  background: rgba(36, 48, 88, .86);
  color: #fff;
  font-family: var(--font-label);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
[data-live="live"] .status-pill { background: var(--teal-deep); }
.status-pill--bar { min-height: 28px; background: rgba(255, 255, 255, .12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--header-edge);
  transition: background-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { background: var(--header-bg-scrolled); box-shadow: 0 10px 30px -20px rgba(25, 18, 52, .6); }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; } }
.nav { display: flex; align-items: center; gap: 10px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; border-radius: 999px; }
.brand__avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--pink); background: #fff; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--heading);
}
.site-header nav { margin-left: auto; }
.nav__links { display: none; list-style: none; gap: 2px; }
.nav__links a {
  display: block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 600;
  font-size: .96rem;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
@media (hover: hover) { .nav__links a:hover { background: var(--hover-bg); color: var(--heading); } }
.site-header .status-pill { margin-left: auto; }
@media (min-width: 980px) {
  .nav__links { display: flex; }
  .site-header .status-pill { margin-left: 4px; }
}
@media (max-width: 420px) { .nav__cta span { display: none; } .nav__cta { padding-inline: 10px; } }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--header-edge);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
@media (hover: hover) { .theme-toggle:hover { background: var(--hover-bg); } }
.theme-toggle svg { width: 24px; height: 24px; shape-rendering: crispEdges; }
.theme-toggle__sun { display: none; }
.theme-toggle[aria-pressed="true"] .theme-toggle__sun { display: block; }
.theme-toggle[aria-pressed="true"] .theme-toggle__moon { display: none; }

/* ---------- Section heads ---------- */
.section { padding-top: var(--section-gap); }
.section-head { max-width: 760px; margin-bottom: clamp(24px, 4vw, 36px); }
.section-head--center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--pink);
  box-shadow: 3px 3px 0 var(--navy);
}
.glass--dark .eyebrow { color: var(--blossom); }
.section-title {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: .01em;
  color: var(--heading);
}
.glass--dark .section-title { color: #fff; }
.section-lead { margin-top: 12px; font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--text-soft); }
.glass--dark .section-lead { color: rgba(255, 255, 255, .86); }
.section-head--center .section-lead { margin-inline: auto; max-width: 620px; }
.fineprint { margin-top: 18px; font-size: .92rem; color: var(--text-soft); }

.deco-spark { position: absolute; width: 24px; height: 24px; pointer-events: none; shape-rendering: crispEdges; animation: twinkle 3.2s ease-in-out infinite; }

/* ---------- Hero ---------- */
.hero { padding: clamp(22px, 5vw, 56px) 0 0; }
.hero__grid { display: grid; gap: 12px; align-items: end; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1fr) auto; gap: 24px; } }
.hero__card { padding: clamp(26px, 5vw, 48px); text-align: center; }
@media (min-width: 900px) { .hero__card { text-align: left; } }
.deco-spark--a { top: -12px; left: 9%; }
.deco-spark--b { top: 26%; right: -12px; width: 18px; height: 18px; animation-delay: -1.2s; }

/* wordmark: pink pixel letters with a navy outline + a pixel ribbon bow */
.wordmark {
  display: block;
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.2rem, 15vw, 7.4rem);
  line-height: .95;
  letter-spacing: .07em;
}
.wordmark__art { position: relative; display: inline-grid; }
.wordmark__layer { grid-area: 1 / 1; white-space: nowrap; }
.wordmark__shadow {
  color: var(--navy);
  -webkit-text-stroke: .15em var(--navy);
  text-shadow: 0 .1em 0 var(--navy), 0 .16em .32em rgba(222, 118, 168, .5);
}
.wordmark__fill {
  color: var(--pink);
  background: linear-gradient(180deg, #FDE1EE 0 24%, #F6B0CF 24% 44%, var(--pink) 44% 76%, var(--rose) 76% 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wordmark__bowlayer { color: transparent; }
.wordmark__x { position: relative; }
.wordmark__bow {
  position: absolute;
  left: 50%;
  bottom: 80%;
  width: .56em;
  height: .3953em;
  transform: translateX(-50%) rotate(-5deg);
  shape-rendering: crispEdges;
  filter: drop-shadow(0 .03em 0 rgba(36, 48, 88, .35));
}
.hero__lede {
  max-width: 30ch;
  margin: 22px auto 0;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 500;
  line-height: 1.38;
  color: var(--heading);
}
@media (min-width: 900px) { .hero__lede { margin-left: 0; } }
.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--soft-bg);
  font-weight: 600;
  color: var(--heading);
}
[data-live="live"] .hero__status { background: var(--live-bg); color: var(--live-fg); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 16px; margin-top: 24px; }
@media (min-width: 900px) { .hero__actions { justify-content: flex-start; } }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--inner-edge);
  border-radius: 16px;
  background: var(--inner);
  font-size: .98rem;
  line-height: 1.35;
  text-align: left;
  color: var(--heading);
}
.hero__art { position: relative; display: none; }
@media (min-width: 900px) { .hero__art { display: block; padding-bottom: 6px; } }
.hero__art img { width: 235px; filter: drop-shadow(0 18px 24px rgba(25, 18, 52, .35)); animation: bob 5s ease-in-out infinite; }
.hero__bubble {
  position: absolute;
  top: 6px;
  right: -8px;
  padding: 8px 14px;
  border: 3px solid var(--navy);
  border-radius: 14px;
  background: #fff;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  box-shadow: 0 4px 0 var(--navy);
  transform: rotate(5deg);
}

/* ---------- Live ---------- */
.stream { display: grid; gap: 18px; }
@media (min-width: 1100px) { .stream { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.screen {
  overflow: hidden;
  border: 3px solid var(--teal);
  border-radius: 20px;
  background: #0E0E10;
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .8);
}
.screen__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 14px;
  background: var(--navy-deep);
  font-family: var(--font-label);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.screen__bar a { color: var(--blossom); text-decoration: none; white-space: nowrap; }
.screen__bar a:hover { text-decoration: underline; }
.screen__frame { position: relative; aspect-ratio: 16 / 9; }
.screen__slot { position: absolute; inset: 0; }
.screen__slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.slot-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--blossom);
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-align: center;
}
.screen__offline { position: absolute; inset: 0; display: none; }
[data-live="offline"] .screen__offline { display: block; }
.screen__offline img { width: 100%; height: 100%; object-fit: cover; }
.screen__offline p {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(25, 33, 63, .82);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}
.screen__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid #fff;
  border-radius: 16px;
  background: rgba(36, 30, 72, .88);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.play-blocked .screen__play { display: inline-flex; }

.starter {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
}
.starter__title { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; color: #fff; }
.starter__steps { display: grid; gap: 14px; margin-top: 14px; list-style: none; }
.starter__steps li { display: flex; align-items: flex-start; gap: 12px; }
.starter__steps b { display: block; color: #fff; }
.starter__cmds { display: block; margin-top: 6px; color: rgba(255, 255, 255, .86); line-height: 1.9; }
.starter__note { margin-top: 16px; font-size: .92rem; line-height: 1.45; color: rgba(255, 255, 255, .78); }
.starter__note a { color: var(--blossom); font-weight: 600; }
.chat { margin-top: 16px; border-radius: 16px; background: rgba(0, 0, 0, .18); }
.chat summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  list-style: none;
}
.chat summary::-webkit-details-marker { display: none; }
.chat summary::after { content: "Open"; margin-left: auto; font-family: var(--font-label); font-size: .66rem; letter-spacing: .1em; color: var(--blossom); }
.chat[open] summary::after { content: "Close"; }
.chat__slot { position: relative; height: 460px; overflow: hidden; border-radius: 0 0 16px 16px; }
.chat__slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.glass--dark .cmd { --chip-bg: var(--pink); --chip-fg: var(--navy); --chip-edge: var(--rose-deep); }
.glass--dark :focus-visible { outline-color: var(--blossom); }

/* ---------- The run ---------- */
.run-grid { display: grid; gap: 18px; }
@media (min-width: 900px) { .run-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.card__kicker {
  font-family: var(--font-label);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.run__phase { margin-top: 10px; font-size: 1.15rem; }
.run__label { font-family: var(--font-label); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.run__phase b { font-family: var(--font-display); font-size: 1.9rem; color: var(--heading); }
.meter { height: 16px; margin-top: 12px; overflow: hidden; border: 2px solid var(--navy); border-radius: 6px; background: var(--meter-bg); }
.meter__fill {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--pink) 0 10px, var(--rose) 10px 12px);
  transition: width 1s ease;
}
.run__progress { margin-top: 8px; color: var(--text-soft); }
.run__progress b { color: var(--heading); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.prev .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats > div { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.stats dt { font-family: var(--font-label); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.stats dd { margin-top: 2px; font-weight: 700; font-size: 1.12rem; color: var(--heading); font-variant-numeric: tabular-nums; }
.splits { display: grid; gap: 6px; margin-top: 14px; list-style: none; }
.splits li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 2px; border-bottom: 1px dashed var(--line); font-size: .96rem; }
.split__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.run__updated { margin-top: 14px; font-size: .88rem; color: var(--text-soft); }
.run__stale, .run__unavailable { display: none; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(244, 201, 93, .25); font-size: .95rem; }
.run[data-state="stale"] .run__stale { display: block; }
.run[data-state="unavailable"] .run__unavailable { display: block; }
.run[data-state="unavailable"] .run__body, .run[data-state="unavailable"] .run__updated { display: none; }
.prev__result { display: flex; align-items: center; gap: 12px; margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.15; color: var(--heading); }
.prev__dates { margin-top: 12px; font-size: .88rem; color: var(--text-soft); }

/* ---------- How she works ---------- */
.how-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .how-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.how__emote { width: 72px; height: 72px; margin-top: -6px; }
.how h3 { margin-top: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; color: var(--heading); }
.how p { margin-top: 8px; font-size: .98rem; line-height: 1.5; color: var(--text-soft); }
.fine { margin-top: 18px; padding: 12px 16px; border-radius: 16px; background: var(--surface); }
.fine summary { font-weight: 700; cursor: pointer; }
.fine p { margin-top: 8px; color: var(--text-soft); }

/* ---------- Play along ---------- */
.teams { display: grid; gap: 18px; }
@media (min-width: 980px) { .teams { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }
.team {
  --accent: var(--teal);
  --chip-bg: var(--teal);
  --chip-fg: var(--navy);
  --chip-edge: var(--teal-deep);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 5px solid var(--accent);
}
.team--devil { --accent: var(--red); --chip-bg: var(--red); --chip-fg: #fff; --chip-edge: var(--red-deep); }
.team--all { --accent: var(--pink); --chip-bg: var(--pink); --chip-fg: var(--navy); --chip-edge: var(--rose-deep); }
.team__head { display: flex; align-items: center; gap: 14px; }
.team__kicker { font-family: var(--font-label); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); }
.team__name { margin-top: 2px; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1; color: var(--heading); }
.cmd-list { display: grid; gap: 10px; list-style: none; }
.cmd-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.cmd-row .px { margin-top: 2px; }
.cmd {
  --chip-bg: var(--pink);
  --chip-fg: var(--navy);
  --chip-edge: var(--rose-deep);
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 3px 11px;
  border: 0;
  border-radius: 9px;
  background: var(--chip-bg);
  color: var(--chip-fg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.04rem;
  line-height: 1.2;
  cursor: copy;
  box-shadow: 0 3px 0 var(--chip-edge);
  transition: transform .12s ease, box-shadow .12s ease;
}
.team--guardian .cmd { --chip-bg: var(--teal); --chip-fg: var(--navy); --chip-edge: var(--teal-deep); }
.team--devil .cmd { --chip-bg: var(--red); --chip-fg: #fff; --chip-edge: var(--red-deep); }
.team--all .cmd { --chip-bg: var(--pink); --chip-fg: var(--navy); --chip-edge: var(--rose-deep); }
@media (hover: hover) { .cmd:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--chip-edge); } }
.cmd:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--chip-edge); transition-duration: .05s; }
.cmd--sm { min-height: 30px; font-size: .96rem; }
.cmd-desc { display: block; margin-top: 6px; font-size: .97rem; line-height: 1.4; color: var(--text); }
.cooldown {
  display: inline-block;
  margin-top: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--soft-bg);
  font-family: var(--font-label);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.team__rule { font-size: .92rem; line-height: 1.45; color: var(--text-soft); }
.team__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: .96rem;
  color: var(--text-soft);
}
.play-tip { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; font-size: .97rem; color: var(--text-soft); text-align: center; }

/* ---------- About ---------- */
.about { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .about { grid-template-columns: auto minmax(0, 1fr); column-gap: clamp(32px, 5vw, 64px); } }
.about__art { justify-self: center; }
.about__art img { width: 222px; filter: drop-shadow(0 16px 22px rgba(25, 18, 52, .3)); }
.about__text > p { max-width: 64ch; margin-top: 14px; color: var(--text-soft); }
.about__text .lede { font-size: clamp(1.15rem, 2.1vw, 1.32rem); line-height: 1.5; font-weight: 500; color: var(--heading); }
.emotes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; list-style: none; }
.emotes li { padding: 4px; border-radius: 16px; background: var(--surface-2); }
.emotes img { width: 64px; height: 64px; }
.sheet { display: grid; gap: 8px; margin-top: 22px; }
.sheet > div { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.sheet > div:last-child { border-bottom: 0; }
.sheet dt { padding-top: 3px; font-family: var(--font-label); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.sheet dd { font-weight: 500; line-height: 1.45; }

/* ---------- Footer ---------- */
.site-footer { padding: var(--section-gap) 0 28px; }
.footer__panel { padding: clamp(24px, 4vw, 40px); }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { width: 56px; height: 56px; border: 3px solid var(--pink); border-radius: 50%; background: #fff; }
.footer__name { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.footer__handle { margin-top: 4px; font-weight: 600; color: var(--blossom); }
.footer__fine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-size: .9rem;
  color: rgba(255, 255, 255, .78);
}
.world-toggle {
  margin-left: auto;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
}
@media (hover: hover) { .world-toggle:hover { background: rgba(255, 255, 255, .18); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 4px 0 var(--pink), var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 12px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  pointer-events: none;
}
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s ease, transform .2s ease; }

/* ---------- Capture mode (?capture=1): the world alone, for its still ---------- */
.capture .site-header, .capture main, .capture .site-footer, .capture body::before { display: none; }

/* ---------- Motion ---------- */
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.6); opacity: .55; } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 179, 165, .75); }
  70% { box-shadow: 0 0 0 9px rgba(47, 179, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 179, 165, 0); }
}
@keyframes blink { 50% { opacity: .35; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Small screens ---------- */
@media (max-width: 639px) {
  body { font-size: 1rem; }
  .hero__actions .btn { width: 100%; }
  .deco-spark--b { display: none; }
  .screen { border-width: 2px; border-radius: 16px; }
  .screen__bar { font-size: .64rem; padding: 8px 12px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:last-child { grid-column: 1 / -1; }
  .card { padding: 18px; }
  .world-toggle { margin-left: 0; }
}

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

/* ---------- 404 ---------- */
.notfound { display: grid; place-items: center; min-height: 100vh; padding-block: 48px; }
.notfound__card {
  max-width: 560px;
  padding: 40px clamp(20px, 5vw, 40px);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  background: var(--glass-solid);
  box-shadow: var(--shadow);
  text-align: center;
}
.notfound__card img { width: 140px; height: 140px; margin: 0 auto 22px; border: 4px solid var(--pink); border-radius: 50%; }
.notfound__card .btn { margin-top: 28px; }

/* ---------- Dark mode: the system's, unless the visitor picked light; or picked dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page-bg: #120f26;
    --text: #F1ECF8;
    --text-soft: #C9C2E2;
    --heading: #FFFFFF;
    --accent-text: var(--blossom);
    --glass: linear-gradient(140deg, rgba(30, 24, 62, .5), rgba(22, 18, 48, .36));
    --glass-solid: rgba(28, 23, 58, .96);
    --glass-edge: rgba(255, 255, 255, .14);
    --glass-dark: linear-gradient(140deg, rgba(12, 10, 30, .56), rgba(30, 14, 46, .44));
    --glass-dark-solid: #141128;
    --glass-highlight: rgba(255, 255, 255, .1);
    --inner: rgba(255, 255, 255, .06);
    --inner-edge: rgba(255, 255, 255, .13);
    --surface: rgba(255, 255, 255, .06);
    --surface-2: rgba(255, 255, 255, .08);
    --line: rgba(255, 255, 255, .16);
    --soft-bg: rgba(255, 255, 255, .09);
    --hover-bg: rgba(255, 255, 255, .12);
    --meter-bg: rgba(255, 255, 255, .1);
    --header-bg: rgba(20, 16, 44, .55);
    --header-bg-scrolled: rgba(20, 16, 44, .8);
    --header-edge: rgba(255, 255, 255, .12);
    --ghost-bg: rgba(255, 255, 255, .1);
    --ghost-bg-hover: rgba(255, 255, 255, .18);
    --ghost-fg: #fff;
    --ghost-edge: var(--blossom);
    --code-bg: rgba(255, 255, 255, .12);
    --code-fg: #fff;
    --focus: var(--blossom);
    --live-fg: #8FE0D4;
    --live-bg: rgba(47, 179, 165, .2);
    --veil: linear-gradient(180deg, rgba(10, 8, 26, .12) 0%, rgba(10, 8, 26, .2) 60%, rgba(6, 5, 18, .4) 100%);
    --still-landscape: url("/assets/img/world-still-landscape-night.webp");
    --still-portrait: url("/assets/img/world-still-portrait-night.webp");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page-bg: #120f26;
  --text: #F1ECF8;
  --text-soft: #C9C2E2;
  --heading: #FFFFFF;
  --accent-text: var(--blossom);
  --glass: linear-gradient(140deg, rgba(30, 24, 62, .5), rgba(22, 18, 48, .36));
  --glass-solid: rgba(28, 23, 58, .96);
  --glass-edge: rgba(255, 255, 255, .14);
  --glass-dark: linear-gradient(140deg, rgba(12, 10, 30, .56), rgba(30, 14, 46, .44));
  --glass-dark-solid: #141128;
  --glass-highlight: rgba(255, 255, 255, .1);
  --inner: rgba(255, 255, 255, .06);
  --inner-edge: rgba(255, 255, 255, .13);
  --surface: rgba(255, 255, 255, .06);
  --surface-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .16);
  --soft-bg: rgba(255, 255, 255, .09);
  --hover-bg: rgba(255, 255, 255, .12);
  --meter-bg: rgba(255, 255, 255, .1);
  --header-bg: rgba(20, 16, 44, .55);
  --header-bg-scrolled: rgba(20, 16, 44, .8);
  --header-edge: rgba(255, 255, 255, .12);
  --ghost-bg: rgba(255, 255, 255, .1);
  --ghost-bg-hover: rgba(255, 255, 255, .18);
  --ghost-fg: #fff;
  --ghost-edge: var(--blossom);
  --code-bg: rgba(255, 255, 255, .12);
  --code-fg: #fff;
  --focus: var(--blossom);
  --live-fg: #8FE0D4;
  --live-bg: rgba(47, 179, 165, .2);
  --veil: linear-gradient(180deg, rgba(10, 8, 26, .12) 0%, rgba(10, 8, 26, .2) 60%, rgba(6, 5, 18, .4) 100%);
  --still-landscape: url("/assets/img/world-still-landscape-night.webp");
  --still-portrait: url("/assets/img/world-still-portrait-night.webp");
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) and (prefers-reduced-transparency: reduce) {
  :root:not([data-theme="light"]) .glass { background: var(--glass-solid); }
}
