/* ==========================================================================
   THE LAST LANTERN
   A persistent cooperative story — visual system
   ========================================================================== */

:root {
  --ink: #07100f;
  --ink-2: #0a1513;
  --ink-3: #0e1b18;
  --panel: rgba(13, 26, 23, 0.72);
  --panel-solid: #0d1a17;
  --panel-raised: rgba(20, 37, 32, 0.78);
  --line: rgba(226, 211, 181, 0.13);
  --line-strong: rgba(226, 211, 181, 0.24);
  --text: #ebe4d4;
  --text-soft: #d5cdbc;
  --muted: #98a49a;
  --muted-2: #707e77;
  --gold: #d7a65f;
  --gold-bright: #f2c77e;
  --gold-dim: #9b7441;
  --green: #8fd6a3;
  --green-dim: #4f8f68;
  --teal: #57a99c;
  --tide: #7f9fae;
  --red: #c97963;
  --blue: #8ca9c4;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Manrope", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Spline Sans Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --max: 1500px;
  --pad: clamp(20px, 4vw, 64px);
}

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

html { scroll-behavior: smooth; scrollbar-gutter: stable; background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 78% 4%, rgba(215, 166, 95, 0.09), transparent 62%),
    radial-gradient(1000px 800px at 8% 80%, rgba(66, 125, 113, 0.08), transparent 65%),
    var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(215, 166, 95, 0.34); color: #fff8e8; }

:focus-visible {
  outline: 1px solid var(--gold-bright);
  outline-offset: 4px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #07100f; }
::-webkit-scrollbar-thumb { background: #243730; border: 3px solid #07100f; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #355046; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.screen { position: relative; width: 100%; }
[hidden] { display: none !important; }

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-sep { color: var(--muted-2); }

.live-dot {
  position: relative;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(143, 214, 163, 0.8);
  flex: none;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(143, 214, 163, 0.4);
  border-radius: 50%;
  animation: pulse-ring 2.8s ease-out infinite;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(143, 214, 163, 0.2);
  border-radius: 100px;
  color: var(--green);
  background: rgba(30, 65, 48, 0.22);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.live-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.live-pill.small { padding: 4px 8px; font-size: 7.5px; }
.live-pill.sealed { color: var(--gold); border-color: rgba(215, 166, 95, 0.28); background: rgba(83, 62, 31, 0.18); }
.live-pill.sealed i { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button .arrow { font-family: var(--sans); font-size: 14px; letter-spacing: 0; transition: transform 0.35s var(--ease); }
.button:hover .arrow { transform: translateX(3px); }
.button-primary {
  color: #171108;
  background: linear-gradient(135deg, #ecc589, var(--gold) 55%, #bd8645);
  box-shadow: 0 10px 34px rgba(215, 166, 95, 0.18), inset 0 1px rgba(255, 249, 232, 0.35);
}
.button-primary:hover { box-shadow: 0 14px 42px rgba(215, 166, 95, 0.27), inset 0 1px rgba(255, 249, 232, 0.4); }
.button-aside {
  padding-left: 11px;
  border-left: 1px solid rgba(20, 14, 6, 0.25);
  color: rgba(23, 17, 8, 0.65);
  font-size: 8px;
  letter-spacing: 0.1em;
}
.button-quiet {
  color: var(--text-soft);
  border-color: var(--line);
  background: rgba(10, 21, 19, 0.24);
}
.button-quiet:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.035); }
.button-ghost { border-color: var(--line-strong); color: var(--text-soft); }
.button-ghost:hover { border-color: var(--gold-dim); color: var(--gold-bright); background: rgba(215, 166, 95, 0.05); }
.button.full { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: 0.45; transform: none; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  color: var(--gold);
  background: none;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease);
}
.text-link:hover { color: var(--gold-bright); }
.text-link span { transition: transform 0.3s var(--ease); }
.text-link:hover span { transform: translateX(3px); }

.rule { display: block; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

.meter {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.075);
}
.meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.85s var(--ease-out);
}
.meter-fill.flame { background: linear-gradient(90deg, #936227, var(--gold-bright)); box-shadow: 0 0 10px rgba(242, 199, 126, 0.25); }
.meter-fill.tide { background: linear-gradient(90deg, #3b5b63, #93b6c4); }
.meter-fill.trust { background: linear-gradient(90deg, #3a7155, var(--green)); }
.meter-fill.stores { background: linear-gradient(90deg, #6c583d, #cbb086); }

/* ==========================================================================
   LANDING — NAV
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}

.hero-art,
.final-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: #07100f;
}
.hero-art .scene-svg,
.final-art .scene-svg { width: 100%; height: 100%; }

.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 12, 11, 0.96) 0%, rgba(5, 12, 11, 0.82) 30%, rgba(5, 12, 11, 0.28) 62%, rgba(5, 12, 11, 0.05) 100%),
    linear-gradient(0deg, rgba(5, 12, 11, 0.96) 0%, rgba(5, 12, 11, 0.2) 38%, rgba(5, 12, 11, 0.1) 70%, rgba(5, 12, 11, 0.55) 100%);
}
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(700px 340px at 70% 72%, rgba(125, 193, 155, 0.08), transparent 70%);
  mix-blend-mode: screen;
}

.site-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px var(--pad);
  border-bottom: 1px solid rgba(226, 211, 181, 0.09);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  padding: 0;
  color: var(--text);
  background: none;
  text-align: left;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  color: var(--gold);
  flex: none;
  transition: transform 0.6s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(45deg); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-words {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 34px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-links a { position: relative; padding: 4px 0; transition: color 0.3s var(--ease); }
.site-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.site-links a:hover { color: var(--text); }
.site-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.site-nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--text);
  background: rgba(8, 17, 15, 0.35);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav-cta:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(215, 166, 95, 0.07); }
.nav-cta span { font-size: 12px; }

.nav-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 2px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease);
}
.nav-live:hover { color: var(--gold-bright); }
.nav-live .live-dot { width: 4px; height: 4px; }

.sound-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.sound-toggle:hover { color: var(--gold); border-color: var(--line); }
.sound-toggle svg { width: 16px; height: 16px; }
.sound-toggle .icon-sound-on { display: none; }
.sound-toggle.is-on { color: var(--gold); }
.sound-toggle.is-on .icon-sound-on { display: block; }
.sound-toggle.is-on .icon-sound-off { display: none; }

/* ==========================================================================
   LANDING — HERO
   ========================================================================== */

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: clamp(40px, 7vw, 120px);
  align-items: end;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(60px, 11vh, 130px) var(--pad) 34px;
  flex: 1;
}

.hero-copy { min-width: 0; max-width: 790px; }

.hero-title {
  display: flex;
  flex-direction: column;
  margin: 25px 0 24px;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 0.78;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.title-pre {
  margin-left: 0.1em;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  font-weight: 400;
  letter-spacing: 0.32em;
  line-height: 1;
  text-transform: uppercase;
}
.title-main {
  display: block;
  margin-top: 0.1em;
  color: #f0e8d8;
  font-size: clamp(4.5rem, 10.8vw, 10.2rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.055em;
  line-height: 0.74;
  text-shadow: 0 0 80px rgba(215, 166, 95, 0.12);
}
.title-main::after {
  content: "";
  display: block;
  width: 0.42em;
  height: 1px;
  margin-top: 0.24em;
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero-lede {
  max-width: 520px;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.75vw, 1.48rem);
  font-weight: 300;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}
.hero-fine {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-fine span { position: relative; }
.hero-fine span + span::before {
  content: "·";
  position: absolute;
  left: -11px;
  color: var(--gold-dim);
}

.world-card {
  position: relative;
  align-self: end;
  padding: 20px 20px 17px;
  border: 1px solid rgba(226, 211, 181, 0.18);
  border-radius: 2px;
  background: linear-gradient(150deg, rgba(13, 27, 24, 0.86), rgba(8, 17, 15, 0.77));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.world-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 15%;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.65;
}
.world-card-top { display: flex; align-items: center; justify-content: space-between; }
.world-cycle {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.world-cycle strong { color: var(--text-soft); font-weight: 500; }
.world-card-name { margin: 25px 0 14px; }
.world-card-name h2 {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.world-card-name p {
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.world-card-quote {
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.03rem;
  font-style: italic;
  line-height: 1.48;
}
.world-vitals-mini { display: grid; gap: 12px; padding-bottom: 17px; }
.vital-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.vital-mini-top b { color: var(--text-soft); font-weight: 500; }
.world-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.world-card-foot strong { color: var(--text-soft); font-weight: 500; }
.world-card-foot .text-link { font-size: 7.5px; white-space: nowrap; }

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad) 25px;
  border-top: 1px solid rgba(226, 211, 181, 0.1);
}
.hero-stats { display: flex; align-items: center; gap: clamp(28px, 5vw, 70px); }
.hero-stat { display: flex; align-items: baseline; gap: 9px; }
.hero-stat b {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero-stat span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-cue {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--gold), transparent);
  animation: scroll-line 2.4s ease-in-out infinite;
}

/* ==========================================================================
   LANDING — SECTIONS
   ========================================================================== */

.section {
  position: relative;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 150px) var(--pad);
}

.section-head { max-width: 900px; }
.section-head h2 {
  margin: 18px 0 24px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.5vw, 5.3rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 0.96;
}
.section-head h2 em { color: var(--gold); font-weight: 300; }
.section-lede {
  max-width: 680px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
  font-weight: 300;
  line-height: 1.58;
}
.section-lede.narrow { max-width: 400px; }
.section-head.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 60px;
  align-items: end;
  max-width: none;
}

.world-memory { border-bottom: 1px solid var(--line); }

.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 62px;
  border: 1px solid var(--line);
  background: var(--line);
}
.memory-card {
  position: relative;
  min-height: 260px;
  padding: 27px 25px 24px;
  background: var(--ink-2);
  transition: background 0.4s var(--ease);
}
.memory-card:hover { background: #0d1b18; }
.memory-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.memory-card-cycle { color: var(--gold-dim); }
.memory-card h3 {
  margin: 30px 0 12px;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.05;
}
.memory-card p {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.5;
}
.memory-card-foot {
  position: absolute;
  right: 25px;
  bottom: 22px;
  left: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.memory-card-foot strong { color: var(--text-soft); font-weight: 500; }
.memory-foot {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 26px;
}
.memory-foot .rule { width: 80px; flex: none; }
.memory-foot p {
  flex: 1;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
}

.plays { border-bottom: 1px solid var(--line); }
.play-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 68px;
}
.play-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(19, 35, 31, 0.65), rgba(10, 20, 18, 0.4));
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.play-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.play-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 166, 95, 0.35));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}
.play-card:hover::after { transform: scaleX(1); transform-origin: left; }
.step-no {
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}
.play-card h3 {
  margin: 44px 0 14px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.play-card p { color: var(--muted); font-size: 13.5px; line-height: 1.68; }
.play-detail {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 26px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.play-detail span + span::before { content: "·"; margin-right: 14px; color: var(--gold-dim); }

/* ==========================================================================
   KEEPER SECTION
   ========================================================================== */

.keeper-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1fr);
  gap: clamp(50px, 8vw, 130px);
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.keeper-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 0.9;
  width: 100%;
  max-width: 500px;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 47%, rgba(215, 166, 95, 0.13), transparent 36%),
    repeating-radial-gradient(circle at 50% 47%, transparent 0 44px, rgba(215, 166, 95, 0.06) 45px 46px),
    #081310;
}
.keeper-art::before {
  content: "";
  position: absolute;
  inset: 19%;
  border: 1px solid rgba(215, 166, 95, 0.12);
  border-radius: 50%;
}
.keeper-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(7, 16, 15, 0.8));
}
.keeper-orbit {
  position: absolute;
  border: 1px solid rgba(215, 166, 95, 0.15);
  border-radius: 50%;
}
.orbit-one { inset: 27%; animation: orbit-spin 28s linear infinite; }
.orbit-one::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
}
.orbit-two { inset: 34%; border-style: dashed; animation: orbit-spin 40s linear infinite reverse; }
.keeper-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(242, 199, 126, 0.38);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(215, 166, 95, 0.2), inset 0 0 35px rgba(215, 166, 95, 0.12);
}
.keeper-core::before,
.keeper-core::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(242, 199, 126, 0.13);
  border-radius: 50%;
}
.keeper-core::before { inset: -18px; }
.keeper-core::after { inset: -42px; }
.keeper-core span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 28px var(--gold), 0 0 60px rgba(215, 166, 95, 0.5);
  animation: core-breathe 4s ease-in-out infinite;
}
.keeper-art p {
  position: absolute;
  right: 17px;
  bottom: 20px;
  z-index: 2;
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.17em;
  line-height: 1.7;
  text-align: right;
}
.keeper-copy { max-width: 660px; }
.keeper-copy h2 {
  margin: 18px 0 22px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 4.6vw, 4.8rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.keeper-copy h2 em { color: var(--gold); font-weight: 300; }
.keeper-copy .section-lede { max-width: 600px; }
.keeper-principles {
  display: grid;
  gap: 0;
  margin: 35px 0 30px;
  border-top: 1px solid var(--line);
}
.keeper-principles > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.principle-mark { color: var(--gold-dim); font-family: var(--mono); font-size: 8px; letter-spacing: 0.08em; }
.keeper-principles p { color: var(--muted); font-size: 13px; line-height: 1.62; }
.keeper-principles strong { color: var(--text-soft); font-weight: 500; }

/* ==========================================================================
   PRICING
   ========================================================================== */

.seasons { border-bottom: 1px solid var(--line); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 65px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  background: rgba(11, 23, 20, 0.55);
}
.price-card.featured {
  border-color: rgba(215, 166, 95, 0.33);
  background: linear-gradient(180deg, rgba(34, 40, 29, 0.55), rgba(12, 23, 20, 0.7));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}
.price-flag {
  position: absolute;
  top: -1px;
  right: 20px;
  padding: 5px 9px;
  color: #1a1208;
  background: var(--gold);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.price-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.plan-name {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.price {
  color: var(--text);
  font-family: var(--serif);
  font-size: 2.7rem;
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
}
.price-desc {
  min-height: 66px;
  padding: 16px 0 12px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 1.45;
}
.price-card ul {
  display: grid;
  gap: 9px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}
.price-card li {
  position: relative;
  padding-left: 15px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}
.price-card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--gold-dim);
}
.price-card .button { margin-top: auto; }
.pricing-fine {
  max-width: 720px;
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

.principle-strip { padding-top: 80px; padding-bottom: 80px; }
.principle-line {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 38px;
  border-bottom: 1px solid var(--line);
}
.principle-line p {
  max-width: 900px;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 300;
  line-height: 1.4;
}
.principle-line em { color: var(--gold); }
.principle-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding-top: 24px;
}
.principle-tags span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================================
   FINAL CTA + FOOTER
   ========================================================================== */

.final-cta {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
  isolation: isolate;
}
.final-art { z-index: -3; }
.final-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 50% 62%, rgba(7, 16, 15, 0.18), rgba(7, 16, 15, 0.82) 70%),
    linear-gradient(0deg, rgba(7, 16, 15, 0.96), transparent 60%);
}
.final-inner {
  max-width: 700px;
  padding: 90px var(--pad);
  text-align: center;
}
.final-inner .eyebrow { justify-content: center; }
.final-inner h2 {
  margin: 18px 0 16px;
  font-family: var(--serif);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 0.9;
}
.final-inner > p:not(.eyebrow):not(.final-fine) {
  max-width: 440px;
  margin: 0 auto 28px;
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
  text-shadow: 0 2px 24px rgba(5, 12, 11, 0.9);
}
.final-fine {
  margin-top: 18px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--pad) 30px;
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 50px;
  padding-bottom: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand div { display: flex; flex-direction: column; gap: 3px; }
.footer-brand strong { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; }
.footer-brand span:not(.brand-mark) { color: var(--muted-2); font-size: 9px; }
.footer-note { max-width: 430px; color: var(--muted-2); font-size: 9px; line-height: 1.65; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.04em;
}
.footer-links { display: flex; align-items: center; gap: 18px; }
.footer-links button,
.footer-links a {
  padding: 0;
  border: 0;
  color: var(--muted-2);
  background: none;
  font: inherit;
  transition: color 0.3s var(--ease);
}
.footer-links button:hover,
.footer-links a:hover { color: var(--gold); }

/* ==========================================================================
   GAME — SHELL
   ========================================================================== */

.game {
  min-height: 100svh;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(215, 166, 95, 0.06), transparent 60%),
    var(--ink);
}

.gamebar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto minmax(230px, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding: 10px var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 15, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.brand-compact { justify-self: start; }
.brand-compact .brand-mark { width: 29px; height: 29px; }
.brand-words { display: flex; flex-direction: column; gap: 2px; }
.brand-small { color: var(--muted-2); font-size: 7px; letter-spacing: 0.13em; }
.brand-world {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}
#game-world-name {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-cycle {
  display: none;
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 6.5px;
  font-style: normal;
  letter-spacing: 0.08em;
}
.gamebar-center { display: flex; align-items: center; gap: 13px; justify-self: center; }
.gamebar-cycle {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}
.gamebar-cycle strong { color: var(--gold); font-weight: 500; }
.gamebar-divider { width: 1px; height: 12px; background: var(--line-strong); }
.gamebar-season {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}
.gamebar-actions { display: flex; align-items: center; gap: 6px; justify-self: end; }
.bar-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.bar-button:hover { color: var(--gold-bright); border-color: var(--line); background: rgba(255, 255, 255, 0.025); }
.bar-button svg { width: 15px; height: 15px; }
.bar-button.icon-only { width: 34px; padding: 0; justify-content: center; }
.keeper-pill { border-color: rgba(215, 166, 95, 0.18); color: var(--gold); }
.keeper-orb {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 9px var(--gold);
}
.keeper-pill.is-live .keeper-orb { background: var(--green); box-shadow: 0 0 9px var(--green); }

.game-shell {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr) 310px;
  gap: clamp(16px, 2vw, 30px);
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--pad) 60px;
  align-items: start;
}

.rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 88px; }

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(17, 32, 28, 0.56), rgba(9, 19, 17, 0.36));
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.panel-title {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.panel-body { padding: 15px; }
.panel-note { color: var(--muted-2); font-size: 10px; line-height: 1.55; }

/* LEFT RAIL */
.world-status-name { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.world-status-name h2 {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
}
.world-status-name span { color: var(--muted-2); font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; }
.vitals { display: grid; gap: 15px; }
.vital-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.vital-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.vital-label .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.vital-value { color: var(--text-soft); font-family: var(--mono); font-size: 8px; letter-spacing: 0.04em; }
.vital-value b { font-weight: 500; }
.vital-hint { margin-top: 5px; color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.vital.flame .vital-label { color: var(--gold); }
.vital.tide .vital-label { color: var(--tide); }
.vital.trust .vital-label { color: var(--green); }
.vital.stores .vital-label { color: #cbb086; }

.echo-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.echo-chip span { color: var(--muted-2); font-family: var(--mono); font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; }
.echo-chip b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}
.echo-chip b::before { content: "◇"; font-size: 8px; color: var(--gold-dim); }

.party { display: grid; gap: 2px; }
.party-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(226, 211, 181, 0.07);
}
.party-row:last-child { border-bottom: 0; }
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(226, 211, 181, 0.16);
  border-radius: 50%;
  color: var(--text-soft);
  background: #182823;
  font-family: var(--serif);
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0;
}
.avatar.you { border-color: rgba(215, 166, 95, 0.48); color: var(--gold-bright); background: rgba(83, 62, 31, 0.35); }
.avatar.mara { color: #d7a65f; background: rgba(74, 54, 30, 0.4); }
.avatar.enna { color: #b5b8c9; background: rgba(43, 47, 60, 0.45); }
.avatar.gull { color: #82b8a5; background: rgba(31, 57, 48, 0.45); }
.avatar.ivo { color: #9bd8a8; background: rgba(34, 65, 44, 0.5); }
.party-name { display: block; color: var(--text-soft); font-size: 10px; line-height: 1.3; }
.party-role { display: block; color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.party-state {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: right;
}
.party-state.is-voted { color: var(--gold); }
.party-state.is-deciding { color: var(--green); animation: soft-blink 1.7s ease-in-out infinite; }

.seat-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding: 9px 10px;
  border: 1px dashed rgba(226, 211, 181, 0.15);
  background: rgba(255, 255, 255, 0.018);
}
.seat-code span { color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; }
.seat-code button {
  padding: 0;
  border: 0;
  color: var(--gold-dim);
  background: none;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.seat-code button:hover { color: var(--gold-bright); }
.season-progress { display: flex; gap: 5px; margin-top: 10px; }
.season-progress i { display: block; flex: 1; height: 2px; background: rgba(226, 211, 181, 0.11); }
.season-progress i.done { background: var(--gold-dim); }
.season-progress i.now { background: var(--gold-bright); box-shadow: 0 0 8px rgba(242, 199, 126, 0.45); }
.season-line { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.season-line b { color: var(--text-soft); font-weight: 500; }

/* ==========================================================================
   GAME — STAGE
   ========================================================================== */

.stage { min-width: 0; outline: none; }

.scene-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #071312;
}
.scene-art {
  position: relative;
  aspect-ratio: 16 / 8.8;
  min-height: 300px;
  overflow: hidden;
  background: #07100f;
}
.scene-art .scene-svg { width: 100%; height: 100%; }
.scene-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 12, 11, 0.9) 0%, transparent 45%, rgba(5, 12, 11, 0.05) 75%, rgba(5, 12, 11, 0.36) 100%);
  pointer-events: none;
}
.scene-topline {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  color: rgba(235, 228, 212, 0.62);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scene-topline span:first-child { display: flex; align-items: center; gap: 7px; }
.scene-topline span:first-child::before { content: ""; width: 12px; height: 1px; background: var(--gold); }
.scene-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 0 24px 22px;
}
.scene-caption .chapter {
  display: block;
  margin-bottom: 7px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scene-caption h1 {
  max-width: 720px;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 4.6vw, 4.4rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.94;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
.scene-caption h1 em { color: var(--gold-bright); font-weight: 300; }

.narrative {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  gap: 36px;
  padding: 30px 28px 28px;
  border-top: 1px solid var(--line);
}
.narrative-body p {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.35vw, 1.26rem);
  font-weight: 300;
  line-height: 1.62;
}
.narrative-body p + p { margin-top: 14px; }
.narrative-body p:first-child::first-letter {
  float: left;
  margin: 0.09em 0.1em 0 0;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 3.5em;
  font-weight: 400;
  line-height: 0.72;
}
.narrative-body .spoken { color: var(--muted); font-style: italic; }
.keeper-aside {
  align-self: start;
  padding-left: 15px;
  border-left: 1px solid rgba(215, 166, 95, 0.35);
}
.keeper-aside-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.keeper-aside-label::before { content: "✳"; font-size: 8px; color: var(--gold); }
.keeper-aside p { color: var(--muted); font-family: var(--serif); font-size: 0.98rem; font-style: italic; line-height: 1.52; }

.choices-wrap { padding: 0 28px 30px; }
.choices-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.choices-question {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.choices-meta { color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; text-transform: uppercase; }

.choices { display: grid; gap: 7px; }
.choice {
  position: relative;
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 15px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--text);
  background: rgba(17, 32, 28, 0.46);
  text-align: left;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.choice::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s var(--ease);
}
.choice:hover { border-color: rgba(215, 166, 95, 0.32); background: rgba(26, 42, 35, 0.58); transform: translateX(2px); }
.choice:hover::before { transform: scaleY(1); transform-origin: top; }
.choice:disabled { cursor: default; }
.choice.is-selected {
  border-color: rgba(215, 166, 95, 0.55);
  background: linear-gradient(90deg, rgba(78, 59, 31, 0.4), rgba(20, 34, 29, 0.55));
}
.choice.is-selected::before { transform: scaleY(1); }
.choice.is-dimmed { opacity: 0.42; }
.choice-index {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-top: 1px;
  border: 1px solid rgba(226, 211, 181, 0.15);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}
.choice.is-selected .choice-index { border-color: var(--gold); color: var(--gold-bright); background: rgba(215, 166, 95, 0.07); }
.choice-main { min-width: 0; }
.choice-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.choice-title {
  display: block;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.choice-body { display: block; margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.choice-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag.up { color: var(--green); border-color: rgba(143, 214, 163, 0.2); background: rgba(52, 96, 68, 0.14); }
.tag.down { color: var(--red); border-color: rgba(201, 121, 99, 0.2); background: rgba(94, 48, 38, 0.12); }
.tag.neutral { color: var(--gold); border-color: rgba(215, 166, 95, 0.2); background: rgba(83, 62, 31, 0.1); }
.choice-voters { display: flex; align-items: center; gap: 4px; min-width: 23px; padding-top: 2px; }
.voter-stack { display: flex; }
.voter-stack .mini-avatar {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  margin-left: -4px;
  border: 1px solid #0b1715;
  border-radius: 50%;
  color: var(--text-soft);
  background: #22342d;
  font-family: var(--serif);
  font-size: 7px;
  font-style: italic;
}
.voter-stack .mini-avatar:first-child { margin-left: 0; }
.voter-count { color: var(--muted-2); font-family: var(--mono); font-size: 7px; }

.vote-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  margin-top: 9px;
  padding: 0 2px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vote-status .pulse {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: soft-blink 1.4s ease-in-out infinite;
}
.vote-status strong { color: var(--text-soft); font-weight: 500; }

/* OUTCOME */
.outcome {
  padding: 34px 28px 30px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(600px 250px at 50% 0%, rgba(215, 166, 95, 0.07), transparent 70%),
    rgba(9, 19, 17, 0.32);
}
.outcome-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.outcome-label::before { content: "◇"; color: var(--gold-bright); }
.outcome h2 {
  max-width: 680px;
  margin: 12px 0 15px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.8vw, 3.5rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}
.outcome-prose { max-width: 720px; }
.outcome-prose p {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.6;
}
.outcome-prose p + p { margin-top: 11px; }
.outcome-quote {
  max-width: 640px;
  margin: 19px 0 0;
  padding: 12px 0 12px 16px;
  border-left: 1px solid rgba(215, 166, 95, 0.4);
}
.outcome-quote p { color: var(--muted); font-family: var(--serif); font-size: 1.04rem; font-style: italic; line-height: 1.5; }
.outcome-quote cite {
  display: block;
  margin-top: 7px;
  color: var(--gold-dim);
  font-family: var(--mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.delta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.delta b { font-weight: 500; }
.delta.pos { color: var(--green); border-color: rgba(143, 214, 163, 0.2); }
.delta.neg { color: var(--red); border-color: rgba(201, 121, 99, 0.2); }
.delta.world { color: var(--gold); border-color: rgba(215, 166, 95, 0.2); }
.outcome-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
}
.chronicle-stamp {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.chronicle-stamp::before { content: "✳"; color: var(--gold-dim); }
.outcome .button { min-height: 44px; }

/* FINALE */
.finale {
  padding: 34px 30px 40px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(600px 320px at 50% 0%, rgba(215, 166, 95, 0.11), transparent 70%),
    rgba(9, 19, 17, 0.4);
}
.finale h2 {
  margin: 14px 0 18px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.98;
}
.finale-prose { max-width: 760px; }
.finale-prose p {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: clamp(1.06rem, 1.3vw, 1.2rem);
  font-weight: 300;
  line-height: 1.62;
}
.finale-prose p + p { margin-top: 12px; }
.finale-epitaph {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid rgba(215, 166, 95, 0.2);
  background: rgba(215, 166, 95, 0.03);
  text-align: center;
}
.finale-epitaph span { color: var(--gold-dim); font-family: var(--mono); font-size: 7px; letter-spacing: 0.14em; text-transform: uppercase; }
.finale-epitaph p {
  margin-top: 8px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2.1rem);
  font-style: italic;
  line-height: 1.15;
}
.finale-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.finale-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.finale-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.finale-next p { max-width: 370px; color: var(--muted); font-family: var(--serif); font-size: 1rem; font-style: italic; line-height: 1.45; }

/* ==========================================================================
   RIGHT RAIL
   ========================================================================== */

.keeper-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(215, 166, 95, 0.2);
  background:
    radial-gradient(300px 180px at 50% 0%, rgba(215, 166, 95, 0.1), transparent 70%),
    rgba(12, 24, 21, 0.7);
}
.keeper-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(215, 166, 95, 0.14);
}
.keeper-card-title { display: flex; align-items: center; gap: 8px; color: var(--gold); font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.12em; text-transform: uppercase; }
.keeper-card-title i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-bright); box-shadow: 0 0 8px var(--gold); }
.keeper-model { color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.keeper-card-body { padding: 17px 15px 15px; }
.keeper-quote {
  color: var(--text-soft);
  font-family: var(--serif);
  font-size: 1.06rem;
  font-style: italic;
  line-height: 1.5;
}
.keeper-quote::before { content: "“"; color: var(--gold-dim); }
.keeper-quote::after { content: "”"; color: var(--gold-dim); }
.keeper-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(215, 166, 95, 0.12); }
.keeper-card-foot span { color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.keeper-talk {
  padding: 0;
  border: 0;
  color: var(--gold);
  background: none;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.keeper-talk:hover { color: var(--gold-bright); }

.chronicle-list { display: grid; }
.chronicle-item {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(226, 211, 181, 0.07);
}
.chronicle-item:last-child { border-bottom: 0; }
.chronicle-item::before {
  content: "";
  position: absolute;
  top: 23px;
  bottom: -13px;
  left: 5px;
  width: 1px;
  background: var(--line);
}
.chronicle-item:last-child::before { display: none; }
.chronicle-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  background: var(--ink-2);
}
.chronicle-item.is-new .chronicle-dot { border-color: var(--gold-bright); background: var(--gold); box-shadow: 0 0 12px rgba(215, 166, 95, 0.4); }
.chronicle-cycle { color: var(--gold-dim); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.chronicle-title { margin: 2px 0 3px; color: var(--text-soft); font-family: var(--serif); font-size: 0.97rem; font-weight: 400; line-height: 1.18; }
.chronicle-by { color: var(--muted-2); font-family: var(--mono); font-size: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.threads { display: flex; flex-wrap: wrap; gap: 5px; }
.thread {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.25;
}
.thread::before { content: "◇"; color: var(--gold-dim); font-size: 6px; }
.empty-note { color: var(--muted-2); font-family: var(--serif); font-size: 0.95rem; font-style: italic; line-height: 1.45; }

/* ==========================================================================
   MOBILE DOCK
   ========================================================================== */

.mobile-dock {
  display: none;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 120;
  border-top: 1px solid var(--line);
  background: rgba(7, 16, 15, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.mobile-dock button {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  padding: 7px 4px;
  border: 0;
  border-right: 1px solid rgba(226, 211, 181, 0.07);
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.mobile-dock button:last-child { border-right: 0; }
.mobile-dock button:active { color: var(--gold-bright); background: rgba(215, 166, 95, 0.06); }
.mobile-dock .dock-icon { color: var(--gold-dim); font-family: var(--serif); font-size: 15px; line-height: 1; }

/* ==========================================================================
   MODALS & DRAWERS
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(3, 8, 7, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fade-in 0.28s var(--ease);
}
.modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(500px 250px at 50% 0%, rgba(215, 166, 95, 0.07), transparent 65%),
    #0b1815;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  animation: modal-in 0.4s var(--ease-out);
}
.modal.wide { max-width: 760px; }
.modal.narrow { max-width: 440px; }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 25px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1;
}
.modal-head p { margin-top: 7px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: none;
  font-size: 15px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.modal-close:hover { color: var(--gold-bright); border-color: var(--gold-dim); transform: rotate(90deg); }
.modal-body { padding: 22px 25px 25px; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 25px;
  border-top: 1px solid var(--line);
}
.modal-foot .fine { color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.04em; text-transform: uppercase; }
.modal-foot .button { min-height: 44px; }

.join-intro {
  margin-bottom: 22px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.5;
}
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.field label span { color: var(--muted-2); font-size: 6.5px; letter-spacing: 0.04em; }
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 1px;
  color: var(--text);
  background: rgba(5, 12, 11, 0.55);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: rgba(215, 166, 95, 0.5); background: rgba(5, 12, 11, 0.8); }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field-hint { color: var(--muted-2); font-size: 9px; line-height: 1.45; }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.role-option { position: relative; }
.role-option input { position: absolute; opacity: 0; pointer-events: none; }
.role-option label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 11px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.role-option label strong { color: var(--text-soft); font-family: var(--serif); font-size: 1rem; font-style: italic; font-weight: 400; }
.role-option label span { font-size: 8.5px; line-height: 1.4; }
.role-option label em { margin-top: auto; padding-top: 6px; color: var(--gold-dim); font-family: var(--mono); font-size: 6.5px; font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; }
.role-option input:checked + label { border-color: rgba(215, 166, 95, 0.5); background: rgba(215, 166, 95, 0.06); color: var(--muted); }
.role-option input:focus-visible + label { outline: 1px solid var(--gold); outline-offset: 3px; }

.plan-picker { display: grid; gap: 8px; }
.plan-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.plan-option:hover { border-color: var(--line-strong); }
.plan-option.is-selected { border-color: rgba(215, 166, 95, 0.5); background: rgba(215, 166, 95, 0.055); }
.plan-option strong { display: block; color: var(--text-soft); font-family: var(--serif); font-size: 1.05rem; font-style: italic; font-weight: 400; }
.plan-option span { display: block; margin-top: 2px; color: var(--muted-2); font-size: 8.5px; line-height: 1.4; }
.plan-option b { color: var(--gold); font-family: var(--serif); font-size: 1.45rem; font-weight: 400; }
.plan-option .plan-check { display: grid; place-items: center; width: 15px; height: 15px; margin-top: 6px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); font-size: 8px; }
.plan-option.is-selected .plan-check { border-color: var(--gold); background: var(--gold); color: #181108; }

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid rgba(215, 166, 95, 0.2);
  background: rgba(215, 166, 95, 0.04);
}
.checkout-summary span { color: var(--muted); font-family: var(--mono); font-size: 7px; letter-spacing: 0.1em; text-transform: uppercase; }
.checkout-summary strong { color: var(--gold-bright); font-family: var(--serif); font-size: 1.6rem; font-style: italic; font-weight: 400; }
.sandbox-banner {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(127, 159, 174, 0.22);
  color: var(--muted);
  background: rgba(60, 88, 98, 0.1);
  font-size: 9px;
  line-height: 1.5;
}
.sandbox-banner strong { color: var(--tide); font-weight: 500; }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-success { padding: 10px 0 0; text-align: center; }
.pay-success .seal {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border: 1px solid rgba(215, 166, 95, 0.45);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 1.6rem;
  font-style: italic;
  box-shadow: 0 0 40px rgba(215, 166, 95, 0.12);
}
.pay-success h3 { font-family: var(--serif); font-size: 2rem; font-style: italic; font-weight: 400; }
.pay-success p { max-width: 340px; margin: 7px auto 20px; color: var(--muted); font-size: 11px; line-height: 1.6; }

/* ARCHIVE */
.archive-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.archive-count { color: var(--muted-2); font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; }
.archive-list { position: relative; max-height: 50vh; overflow-y: auto; padding-right: 5px; }
.archive-year {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 0 7px;
  color: var(--gold-dim);
  background: #0b1815;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.archive-entry {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(226, 211, 181, 0.08);
}
.archive-cycle { color: var(--muted-2); font-family: var(--mono); font-size: 7px; letter-spacing: 0.04em; }
.archive-entry h4 { color: var(--text-soft); font-family: var(--serif); font-size: 1.04rem; font-weight: 400; line-height: 1.2; }
.archive-entry p { margin-top: 3px; color: var(--muted); font-size: 9.5px; line-height: 1.5; }
.archive-entry cite { display: block; margin-top: 4px; color: var(--muted-2); font-family: var(--mono); font-size: 6px; font-style: normal; letter-spacing: 0.03em; text-transform: uppercase; }

/* WORLDS / MENU */
.menu-list { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  color: var(--text-soft);
  background: var(--ink-2);
  text-align: left;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.menu-item:hover { background: #11211d; color: var(--gold-bright); }
.menu-item .mi-icon { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; color: var(--gold-dim); font-family: var(--serif); font-size: 12px; font-style: italic; flex: none; }
.menu-item .mi-text { flex: 1; }
.menu-item strong { display: block; font-family: var(--serif); font-size: 1rem; font-style: italic; font-weight: 400; }
.menu-item span { display: block; color: var(--muted-2); font-size: 8px; line-height: 1.4; }
.menu-item .mi-arrow { color: var(--muted-2); font-size: 13px; }

.world-table { display: grid; gap: 8px; }
.world-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}
.world-row.is-current { border-color: rgba(215, 166, 95, 0.32); }
.world-row h4 { font-family: var(--serif); font-size: 1.16rem; font-style: italic; font-weight: 400; line-height: 1.1; }
.world-row p { margin-top: 3px; color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.05em; text-transform: uppercase; }
.world-row .button { min-height: 32px; padding: 0 11px; font-size: 7px; }

/* SAFETY */
.notes-list { display: grid; gap: 12px; }
.notes-list li { color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.notes-list strong { color: var(--text-soft); font-weight: 500; }

/* KEEPER DRAWER */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 7900;
  background: rgba(3, 8, 7, 0.42);
  backdrop-filter: blur(4px);
  animation: fade-in 0.25s var(--ease);
}
.keeper-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 7950;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  border-left: 1px solid var(--line-strong);
  background:
    radial-gradient(500px 280px at 70% 0%, rgba(215, 166, 95, 0.08), transparent 65%),
    #0a1714;
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.4);
  animation: drawer-in 0.4s var(--ease-out);
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-family: var(--serif); font-size: 2rem; font-style: italic; font-weight: 300; line-height: 1; }
.drawer-head p { margin-top: 5px; color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.drawer-status { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--green); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.drawer-status i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px var(--green); }
.keeper-thread { flex: 1; overflow-y: auto; padding: 20px 22px; }
.keeper-msg { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.keeper-msg .msg-label { color: var(--muted-2); font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.1em; text-transform: uppercase; }
.keeper-msg .msg-bubble { max-width: 92%; padding: 11px 13px; border: 1px solid var(--line); color: var(--text-soft); background: rgba(255, 255, 255, 0.022); font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; }
.keeper-msg.is-keeper .msg-bubble { border-color: rgba(215, 166, 95, 0.2); background: rgba(215, 166, 95, 0.045); }
.keeper-msg.is-user { align-items: flex-end; }
.keeper-msg.is-user .msg-bubble { border-color: rgba(127, 159, 174, 0.18); background: rgba(60, 88, 98, 0.15); font-family: var(--sans); font-size: 11.5px; }
.keeper-msg.is-system { align-items: center; margin: 8px 0 18px; }
.keeper-msg.is-system .msg-bubble { border: 0; padding: 0; color: var(--muted-2); background: none; font-family: var(--mono); font-size: 6.5px; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; }
.keeper-quick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.keeper-quick button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.04em;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.keeper-quick button:hover { color: var(--gold); border-color: var(--gold-dim); }
.keeper-compose { padding: 13px 16px 17px; border-top: 1px solid var(--line); }
.keeper-compose form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.keeper-compose textarea {
  min-height: 45px;
  max-height: 115px;
  padding: 12px 12px;
  resize: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(4, 10, 9, 0.55);
  font-size: 11.5px;
  line-height: 1.45;
  outline: none;
}
.keeper-compose textarea:focus { border-color: rgba(215, 166, 95, 0.45); }
.keeper-send {
  display: grid;
  place-items: center;
  width: 45px;
  border: 1px solid rgba(215, 166, 95, 0.35);
  color: var(--gold-bright);
  background: rgba(215, 166, 95, 0.07);
  font-size: 17px;
  transition: background 0.3s var(--ease);
}
.keeper-send:hover { background: rgba(215, 166, 95, 0.14); }
.keeper-send:disabled { opacity: 0.4; }
.keeper-compose .fine { margin-top: 8px; color: var(--muted-2); font-family: var(--mono); font-size: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.typing-indicator { display: inline-flex; gap: 3px; align-items: center; height: 16px; }
.typing-indicator i { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); animation: typing 1.2s ease-in-out infinite; }
.typing-indicator i:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator i:nth-child(3) { animation-delay: 0.3s; }

/* TOAST */
.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 7800;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  background: rgba(15, 29, 25, 0.95);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  line-height: 1.45;
  text-transform: uppercase;
  animation: toast-in 0.35s var(--ease-out);
}
.toast::before { content: "◇"; color: var(--gold); }
.toast.is-out { animation: toast-out 0.3s var(--ease) forwards; }

.noscript {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--text);
  background: var(--ink);
  font-family: var(--serif);
  font-size: 1.4rem;
  text-align: center;
}

/* ==========================================================================
   SCENE ART ANIMATIONS
   ========================================================================== */

.scene-svg { position: absolute; inset: 0; }
.lf-beam { transform-origin: center; animation: beam-sway 9s ease-in-out infinite; opacity: 0.6; }
.lf-beam-2 { animation-delay: -3s; opacity: 0.3; }
.lf-glow { animation: glow-breathe 5s ease-in-out infinite; }
.lf-green { animation: green-breathe 3.6s ease-in-out infinite; }
.lf-fog { animation: fog-drift 34s linear infinite; }
.lf-fog-2 { animation-duration: 48s; animation-direction: reverse; opacity: 0.5; }
.lf-sea-line { animation: sea-shift 16s ease-in-out infinite; }
.lf-rain line { animation: rain-fall 1.2s linear infinite; }
.lf-boat { animation: boat-bob 7s ease-in-out infinite; transform-origin: center; }
.lf-figure { animation: figure-breathe 6s ease-in-out infinite; }
.lf-embers circle { animation: ember-rise 5s linear infinite; }
.lf-choir { animation: choir-sway 8s ease-in-out infinite; transform-origin: center; }
.lf-rays { animation: rays-pulse 10s ease-in-out infinite; }

@keyframes beam-sway {
  0%, 100% { transform: rotate(-2deg); opacity: 0.45; }
  50% { transform: rotate(3deg); opacity: 0.75; }
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}
@keyframes green-breathe {
  0%, 100% { opacity: 0.7; filter: drop-shadow(0 0 4px rgba(143, 214, 163, 0.6)); }
  50% { opacity: 1; filter: drop-shadow(0 0 16px rgba(143, 214, 163, 0.95)); }
}
@keyframes fog-drift {
  0% { transform: translateX(-5%); }
  50% { transform: translateX(5%); }
  100% { transform: translateX(-5%); }
}
@keyframes sea-shift {
  0%, 100% { transform: translateX(-8px); opacity: 0.5; }
  50% { transform: translateX(8px); opacity: 0.8; }
}
@keyframes rain-fall {
  0% { transform: translateY(-30px); opacity: 0; }
  20% { opacity: 0.5; }
  100% { transform: translateY(180px); opacity: 0; }
}
@keyframes boat-bob {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(4px) rotate(0.6deg); }
}
@keyframes figure-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}
@keyframes ember-rise {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translateY(-150px) translateX(12px); opacity: 0; }
}
@keyframes choir-sway {
  0%, 100% { transform: translateX(-3px); opacity: 0.55; }
  50% { transform: translateX(3px); opacity: 0.8; }
}
@keyframes rays-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.42; }
}

/* ==========================================================================
   MISC ANIMATIONS
   ========================================================================== */

@keyframes pulse-ring {
  0% { transform: scale(0.65); opacity: 0.8; }
  80%, 100% { transform: scale(1.6); opacity: 0; }
}
@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes core-breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.75; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes soft-blink {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(5px); } }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-3px); opacity: 1; }
}
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.reveal { animation: reveal-up 0.9s var(--ease-out) both; animation-delay: var(--d, 0s); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1280px) {
  .game-shell { grid-template-columns: 232px minmax(0, 1fr) 285px; gap: 18px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 330px; gap: 50px; }
  .title-main { font-size: clamp(4.2rem, 10vw, 8.4rem); }
  .narrative { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .keeper-aside { display: flex; gap: 13px; align-items: baseline; padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .keeper-aside-label { margin: 0; flex: none; }
}

@media (max-width: 1100px) {
  .game-shell { grid-template-columns: minmax(0, 1fr) 280px; }
  .rail-left { display: none; }
  .game-shell { padding-top: 18px; }
  .mobile-dock { display: flex; }
  .game { padding-bottom: 64px; }
  .gamebar-center .gamebar-season { display: none; }
  .site-links { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) 320px; }
  .world-card { padding: 17px; }
  .section-head.split { grid-template-columns: 1fr; gap: 26px; }
  .keeper-section { grid-template-columns: 1fr; gap: 50px; }
  .keeper-art { max-width: 420px; aspect-ratio: 1.2; }
  .pricing-grid, .play-grid { grid-template-columns: 1fr; }
  .price-card, .play-card { min-height: 0; }
  .price-desc { min-height: 0; }
  .price-card ul { margin-bottom: 22px; }
}

@media (max-width: 900px) {
  .gamebar { grid-template-columns: 1fr auto; min-height: 60px; padding: 9px 16px; }
  .brand-cycle { display: inline; }
  #game-world-name { max-width: 135px; }
  .gamebar-center { display: none; }
  .game-shell { grid-template-columns: minmax(0, 1fr); padding: 14px 16px 80px; }
  .rail-right { display: none; }
  .gamebar-actions .bar-button:not(.icon-only):not(.keeper-pill) { display: none; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); align-items: start; padding-top: 50px; gap: 34px; }
  .hero-inner > * { min-width: 0; }
  .world-card { max-width: 420px; }
  .hero { min-height: auto; }
  .hero-foot { padding-top: 18px; padding-bottom: 22px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .scroll-cue { display: none; }
  .memory-grid { grid-template-columns: 1fr; }
  .memory-card { min-height: 0; padding-bottom: 70px; }
  .principle-line { grid-template-columns: 1fr; gap: 15px; }
  .footer-top { flex-direction: column; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .narrative { padding: 24px 20px 22px; }
  .choices-wrap { padding: 0 20px 24px; }
  .outcome, .finale { padding: 28px 20px 26px; }
  .scene-caption { padding: 0 20px 18px; }
  .scene-caption h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }
  .scene-topline { padding: 13px 16px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .section-head h2 { font-size: clamp(2.6rem, 8vw, 4.2rem); }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { max-height: 94svh; border-bottom: 0; animation: modal-up 0.4s var(--ease-out); }
  .modal.wide, .modal.narrow { max-width: none; }
  .role-grid { grid-template-columns: 1fr; }
  .role-option label { flex-direction: row; align-items: baseline; gap: 8px; padding: 10px 11px; }
  .role-option label strong { flex: none; }
  .role-option label em { margin: 0 0 0 auto; padding: 0; }
  .toast-root { right: 14px; bottom: 74px; left: 14px; max-width: none; }
  .keeper-drawer { top: auto; left: 0; width: 100%; height: 88svh; border-top: 1px solid var(--line-strong); border-left: 0; animation: drawer-up 0.4s var(--ease-out); }
}

@media (max-width: 560px) {
  :root { --pad: 17px; }
  .site-nav { padding: 18px 17px; }
  .nav-cta { display: none; }
  .hero-inner { padding-top: 38px; padding-bottom: 26px; }
  .title-main { font-size: clamp(3.35rem, 16.4vw, 5.2rem); }
  .title-pre { font-size: 0.62rem; letter-spacing: 0.25em; }
  .hero-lede { font-size: 1.1rem; }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { flex: 1 1 100%; }
  .nav-live { display: none; }
  .hero-fine { gap: 12px; font-size: 7px; }
  .hero-stat b { font-size: 1.25rem; }
  .hero-stat span { font-size: 6.5px; }
  .hero-stats { gap: 14px 20px; }
  .world-card { max-width: none; }
  .world-card-name h2 { font-size: 2.1rem; }
  .section { padding-top: 64px; padding-bottom: 64px; }
  .section-head h2 { font-size: clamp(2.3rem, 10.5vw, 3.4rem); }
  .section-lede { font-size: 1.02rem; }
  .memory-foot { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .memory-foot .rule { display: none; }
  .play-grid { margin-top: 38px; }
  .play-card { min-height: 0; }
  .keeper-art { aspect-ratio: 1; }
  .price-head { align-items: center; }
  .price { font-size: 2.2rem; }
  .final-inner { padding: 70px 17px; }
  .final-inner h2 { font-size: clamp(2.8rem, 13vw, 4.3rem); }
  .footer-links { flex-wrap: wrap; gap: 10px 16px; }
  .scene-art { aspect-ratio: 4 / 3; min-height: 260px; }
  .scene-caption h1 { font-size: clamp(2rem, 9.4vw, 2.8rem); }
  .scene-topline span:last-child { display: none; }
  .narrative-body p { font-size: 1.04rem; }
  .choice { grid-template-columns: 27px minmax(0, 1fr); padding: 13px 12px; }
  .choice-voters { display: none; }
  .choice-title { font-size: 1.16rem; }
  .choice-body { font-size: 10px; }
  .choices-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .outcome-foot { flex-direction: column; align-items: stretch; gap: 13px; }
  .outcome-foot .button { width: 100%; }
  .finale-actions .button { width: 100%; }
  .finale-next { flex-direction: column; align-items: flex-start; }
  .modal-head { padding: 20px 18px 15px; }
  .modal-body { padding: 18px; }
  .modal-foot { padding: 14px 18px; }
  .modal-head h2 { font-size: 1.8rem; }
  .card-row { grid-template-columns: 1fr; }
  .drawer-head { padding: 17px 17px 14px; }
  .keeper-thread { padding: 16px 17px; }
  .keeper-compose { padding: 11px 12px 14px; }
  .toast-root { bottom: 68px; }
  .mobile-dock { padding-bottom: env(safe-area-inset-bottom); }
}

@keyframes modal-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes drawer-up { from { transform: translateY(100%); } to { transform: none; } }

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

/* Print: the chronicle is a keepsake */
@media print {
  body { background: #fff; color: #111; }
  .grain, .gamebar, .rail, .mobile-dock, .hero-art, .final-art, .site-footer, .modal-backdrop, .drawer-backdrop, .keeper-drawer, .toast-root { display: none !important; }
  .game, .stage { display: block !important; }
  .scene-card, .panel, .modal { border: 1px solid #bbb; box-shadow: none; background: #fff; color: #111; }
  .narrative-body p, .choice-body, .outcome-prose p, .finale-prose p { color: #222; }
}
