/* Keeperlore shared visual shell. No external fonts, no build step. */
:root {
  --bg: #0a0b0d;
  --panel: #111214;
  --panel2: #17181b;
  --border: rgba(236, 233, 226, .11);
  --text: #ece9e2;
  --muted: #99968f;
  --dim: #6d6b66;
  --accent: #c9a227;
  --accent2: #c9a227;
  --danger: #c47a6b;
  --ok: #91a58e;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Songti SC", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 4px;
  --ease: cubic-bezier(.2,.6,.2,1);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(900px 520px at 78% -10%, rgba(201,162,39,.07), transparent 62%),
    radial-gradient(700px 500px at 8% 18%, rgba(96,118,132,.08), transparent 60%),
    var(--bg);
}

h1, h2, h3, .brand, .login h1, .join-card h1, .empty h2, .room-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.015em;
}

button, input, textarea { font-family: var(--sans); }
button { border-radius: var(--radius); }
button:hover { transform: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.card, .join-card, .panel {
  background: linear-gradient(180deg, rgba(23,24,27,.92), rgba(17,18,20,.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.eyebrow, .panel-title, .badge, .room-meta, .pill, .hint {
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow, .panel-title { color: var(--accent); font-size: 10px; }

/* Shared shell */
.shell { max-width: 1120px; padding: 32px 28px 64px; }
.top { margin-bottom: 28px; align-items: flex-start; }
.brand { color: var(--text); font-size: 24px; letter-spacing: .16em; text-transform: none; }
.top .brand::after { content: " · KEEPERLORE"; color: var(--accent); font-family: var(--sans); font-size: 9px; letter-spacing: .18em; vertical-align: middle; margin-left: 4px; }
.small, .muted, .hint { font-size: 12px; }
.muted, .hint { color: var(--muted); }
.top .pill { border-radius: 2px; text-transform: none; letter-spacing: .04em; }

.sidebar { gap: 18px; }
.sidebar h2 { color: var(--dim); font-family: var(--sans); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.room-list { gap: 2px; }
.room-item {
  border-radius: 2px;
  padding: 13px 12px;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
}
.room-item:hover { border-color: var(--border); background: rgba(255,255,255,.025); }
.room-item.active { border-color: rgba(201,162,39,.55); background: rgba(201,162,39,.06); }
.room-name { font-family: var(--serif); font-size: 16px; font-weight: 400; }
.room-meta { font-family: var(--mono); font-size: 9px; color: var(--dim); }
hr { border-top-color: var(--border); }

button { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.secondary, button.ghost { background: transparent; }
button.primary {
  background: var(--accent);
  color: #121008;
  border: 0;
  font-weight: 600;
  letter-spacing: .02em;
}
button.primary:hover { filter: brightness(1.12); }
button.small { border-radius: 2px; }
.invite-box { border-radius: 2px; border-color: rgba(201,162,39,.35); background: rgba(201,162,39,.04); }
.invite-box code { color: var(--accent); font-family: var(--mono); }

/* Home: split hero + form */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: center;
  gap: clamp(32px, 7vw, 112px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 28px;
}
.login-hero { max-width: 620px; position: relative; isolation: isolate; }
.login-hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 1.03;
  letter-spacing: -.035em;
}
.login-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -22%;
  top: -30%;
  width: min(34vw, 440px);
  aspect-ratio: 1;
  border: 1px solid rgba(201,162,39,.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,.07), transparent 62%);
  pointer-events: none;
}
.login-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -4%;
  top: -18%;
  width: min(20vw, 260px);
  aspect-ratio: 1;
  border: 1px solid rgba(236,233,226,.05);
  border-radius: 50%;
  pointer-events: none;
}
.login-hero .hero-lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 28px;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding: 8px 0;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero-link:hover { color: var(--accent); }
.hero-meta { color: var(--dim); font-family: var(--mono); font-size: 10px; margin-top: 18px; }
.login {
  width: 100%;
  padding: 28px;
  display: grid;
  gap: 13px;
  border: 1px solid var(--border);
  background: rgba(17,18,20,.72);
}
.form-head { margin-bottom: 4px; }
.form-head h2 { margin: 8px 0 0; font-size: 28px; }
.form-head p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.tabs { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0; gap: 18px; }
.tab { border: 0; border-bottom: 1px solid transparent; border-radius: 0; padding: 10px 0; color: var(--dim); font-size: 12px; }
.tab.active { background: transparent; color: var(--text); border-bottom-color: var(--accent); }
label { color: var(--dim); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; gap: 7px; }
input, textarea {
  background: rgba(0,0,0,.22);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text);
  padding: 12px;
}
input:focus, textarea:focus { border-color: rgba(201,162,39,.65); }
input::placeholder, textarea::placeholder { color: #5f5e59; }
.login .primary { margin-top: 4px; padding: 12px 16px; }
.login .hint { color: var(--dim); font-size: 10px; letter-spacing: .04em; text-transform: none; }
.guest-entry { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; color: var(--dim); font-size: 10px; }
.guest-entry a { color: var(--accent); text-decoration: none; }

/* Home: room shell */
.room { min-height: 620px; }
.room-head { padding-bottom: 16px; }
.room-head h2 { font-size: 30px; }
.members { gap: 4px; }
.members .pill { border-radius: 2px; font-family: var(--mono); font-size: 9px; text-transform: none; letter-spacing: .04em; }
.messages { padding: 18px 4px 24px; gap: 20px; max-height: 58vh; }
.msg { max-width: min(78%, 620px); gap: 6px; }
.msg .who { color: var(--accent); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.msg .body { border-radius: 2px; background: rgba(255,255,255,.025); border-color: var(--border); padding: 12px 14px; font-size: 14px; line-height: 1.7; }
.msg.mine .body { background: rgba(201,162,39,.07); border-color: rgba(201,162,39,.25); }
.msg.system .body { background: transparent; border-style: dashed; color: var(--muted); }
.composer { padding-top: 16px; }
.composer textarea { min-height: 62px; }
.empty { min-height: 500px; }
.empty h2 { font-size: 34px; }

/* Play room */
.join-screen {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 50% -15%, rgba(201,162,39,.07), transparent 62%),
    radial-gradient(700px 500px at 15% 70%, rgba(75,92,102,.12), transparent 65%),
    var(--bg);
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}
.join-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('/assets/hero-study.jpg');
  background-size: cover;
  background-position: 64% 40%;
  opacity: .26;
  filter: brightness(.8);
  pointer-events: none;
}
.join-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(10,11,13,.45) 55%, rgba(10,11,13,.8) 100%);
  pointer-events: none;
}
.join-card { position: relative; z-index: 1; }
.join-card { width: min(560px, 100%); padding: 34px; }
.join-card h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); line-height: 1.02; margin: 12px 0 14px; }
.join-card .lead { color: var(--muted); font-size: 13px; line-height: 1.8; }
.howto { border: 1px solid var(--border); border-radius: 2px; padding: 10px 12px; margin: 18px 0 20px; background: rgba(255,255,255,.018); }
.howto summary { color: var(--text); font-size: 11px; letter-spacing: .04em; }
.howto ol { color: var(--muted); font-size: 11px; line-height: 1.7; }
.join-card label { margin-top: 14px; }
.join-card .primary { margin-top: 16px; width: 100%; padding: 12px; }
.join-card .ghost { border-radius: 2px; white-space: nowrap; }
#join-btn { width: auto; flex: 1; }
#reset-token-btn { width: auto; flex: 0 0 auto; }
.join-card .note { color: var(--dim); font-size: 10px; letter-spacing: .02em; text-transform: none; }

.app { max-width: 1120px; padding: 28px; }
.app header { align-items: flex-start; padding-bottom: 18px; }
.app h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
.room-meta { font-family: var(--mono); font-size: 9px; color: var(--dim); }
.badge { border-radius: 2px; font-family: var(--mono); font-size: 9px; }
.badge.seat { color: var(--accent); border-color: rgba(201,162,39,.4); }
.badge.online { color: var(--ok); border-color: rgba(145,165,142,.4); }
.badge.phase { color: var(--muted); border-color: var(--border); }

.panel { padding: 16px; }
.panel-title { color: var(--dim); font-family: var(--sans); }
.player { border-radius: 2px; padding: 12px; }
.player.current { border-color: rgba(201,162,39,.55); }
.player-top { font-family: var(--serif); font-size: 15px; }
.pips { font-family: var(--mono); }
.pip { border-radius: 2px; }
.progress-row { font-size: 10px; letter-spacing: .04em; }
.note { font-size: 10px; line-height: 1.7; }
.log { height: 500px; gap: 16px; }
.event { border-left-color: var(--border); font-size: 13px; line-height: 1.75; }
.event .meta { font-family: var(--mono); color: var(--dim); }
.event.private { border-left-color: rgba(122,162,214,.55); }
.event.complete { border-left-color: var(--accent); }
.composer-row input { min-width: 0; }
.composer-foot label { text-transform: none; letter-spacing: .02em; font-size: 10px; }
.status { color: var(--dim); font-size: 10px; }

@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; gap: 36px; padding: 36px 20px 64px; align-items: start; }
  .login-hero h1 { font-size: clamp(2.8rem, 12vw, 4.6rem); }
  .login { padding: 22px; }
  .shell { padding: 20px 16px 48px; }
  .room-head h2 { font-size: 26px; }
  .join-screen { padding: 24px 14px; }
  .join-card { padding: 24px; }
}

/* Sparse landing: one promise, one action. */
.landing-page { min-height: 100vh; display: flex; flex-direction: column; }
.landing-nav {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.nav-brand { color: var(--text); font-family: var(--serif); font-size: 26px; letter-spacing: .18em; text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 22px; }
.nav-login { border: 0; color: var(--muted); font-size: 12px; letter-spacing: .06em; padding: 8px 0; }
.nav-login:hover { color: var(--text); }
.nav-cta, .hero-cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #121008; text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  padding: 13px 22px; border-radius: 2px;
  transition: filter .18s var(--ease);
}
.nav-cta:hover, .hero-cta:hover { filter: brightness(1.12); }
.landing-main { width: 100%; margin: 0 auto; flex: 1; display: block; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: clamp(32px, 7vw, 100px); width: min(1180px, calc(100% - 48px)); margin: 0 auto; align-items: center; padding: 72px 0 96px; }
.hero-copy { max-width: 620px; }
.hero-copy h1 { margin: 18px 0 24px; font-size: clamp(3.4rem, 7vw, 6.2rem); line-height: 1.02; letter-spacing: -.04em; }
.hero-lead { max-width: 44ch; color: var(--muted); font-size: 15px; line-height: 1.9; margin: 0 0 32px; }
.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero-cta { padding: 15px 26px; }
.hero-note { color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.hero-art {
  position: relative;
  justify-self: end;
  width: min(100%, 480px);
  aspect-ratio: 4 / 5;
  overflow: visible;
}
.hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 45%;
  animation: hero-drift 28s ease-in-out infinite alternate;
  transform-origin: 58% 45%;
  will-change: transform;
  filter: brightness(1.16) contrast(1.06) saturate(1.08);
}
.hero-glow {
  position: absolute;
  z-index: 1;
  inset: 20% 12% 18% 20%;
  pointer-events: none;
  background: radial-gradient(ellipse at 52% 46%, rgba(142,198,214,.24), transparent 62%);
  filter: blur(28px);
  mix-blend-mode: screen;
  animation: hero-breathe 7s ease-in-out infinite alternate;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(10,11,13,.72) 16%, transparent 48%),
    linear-gradient(0deg, var(--bg) 0%, transparent 38%);
}
.portal-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(201,162,39,.13);
  pointer-events: none;
}
.image-ring {
  width: 104%;
  aspect-ratio: 1;
  left: -2%;
  top: 9%;
  animation: ring-turn 70s linear infinite;
}
.image-ring::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(236,233,226,.055);
  border-radius: 50%;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: -7%;
  background: radial-gradient(circle at 55% 48%, rgba(117,161,174,.09), transparent 55%);
  filter: blur(20px);
  pointer-events: none;
}
.landing-page { position: relative; }
.landing-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: overlay;
  background-image: url('/assets/grain.svg');
  background-size: 240px 240px;
  animation: grain-shift 9s steps(2) infinite;
}
@keyframes hero-drift {
  from { transform: scaleX(-1) scale(1); }
  to { transform: scaleX(-1) scale(1.055); }
}
@keyframes hero-breathe {
  from { opacity: .42; }
  to { opacity: .8; }
}
@keyframes ring-turn {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes grain-shift {
  0% { background-position: 0 0; }
  50% { background-position: 18px -12px; }
  100% { background-position: -10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-image, .image-ring, .hero-glow, .landing-page::after { animation: none; }
}

/* Auth is a small overlay, not the first screen. */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 24px;
  background: rgba(4,5,6,.78);
  backdrop-filter: blur(4px);
}
.modal {
  position: relative; width: min(420px, 100%);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 2px; padding: 28px;
}
.modal-close {
  position: absolute; top: 10px; right: 12px;
  border: 0; color: var(--dim); font-size: 22px; line-height: 1; padding: 6px;
}
.modal-close:hover { color: var(--text); }
.modal .login { border: 0; background: transparent; padding: 0; gap: 12px; }
.modal-title { margin: 0 0 4px; font-size: 30px; }

@media (max-width: 860px) {
  .landing-nav { height: 72px; }
  .nav-brand { font-size: 22px; }
  .landing-main { width: 100%; }
  .landing-hero { width: calc(100% - 32px); grid-template-columns: 1fr; padding: 48px 0 64px; gap: 42px; }
  .hero-copy h1 { font-size: clamp(3rem, 14vw, 5rem); }
  .hero-art { justify-self: center; width: min(74vw, 330px); }
  .nav-login { display: inline; font-size: 11px; }
}

/* The world below the fold. One real place, not a fake card grid. */
.landing-story {
  position: relative;
  width: 100%;
  margin: 0;
  min-height: 540px;
  border-top: 1px solid var(--border);
  overflow: hidden;
  background: #07080a;
}
.story-image {
  position: absolute;
  inset: 0;
  background-image: url('/assets/hero-door.svg');
  background-size: cover;
  background-position: 62% 42%;
  opacity: .44;
  transform: scale(1.03);
}
.landing-story::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #07080a 0%, rgba(7,8,10,.88) 34%, rgba(7,8,10,.18) 70%, rgba(7,8,10,.7) 100%),
    linear-gradient(0deg, #07080a 0%, transparent 50%);
}
.story-copy {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 540px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  padding: 72px 0;
}
.story-copy h2 { margin: 14px 0 14px; font-size: clamp(2.4rem, 4.4vw, 4.2rem); }
.story-copy p { max-width: 38ch; margin: 0 0 26px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.story-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding: 8px 0;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.story-link:hover { color: var(--accent); }
@media (max-width: 860px) {
  .landing-story, .story-copy { min-height: 460px; }
  .story-copy { width: calc(100% - 32px); padding: 56px 0; }
  .story-image { background-position: 70% 45%; opacity: .38; }
}

/* Full-bleed cinematic hero: art belongs to the page, not a card. */
.landing-main { width: 100%; flex: 1; display: block; }
.landing-hero {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 88px);
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #07080a;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: .98;
  animation: hero-drift 32s ease-in-out infinite alternate;
  filter: sepia(.06) saturate(.92) brightness(1.38) contrast(1.12);
  will-change: transform;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,8,10,.96) 0%, rgba(7,8,10,.9) 30%, rgba(7,8,10,.2) 55%, rgba(7,8,10,.36) 100%),
    linear-gradient(0deg, #07080a 0%, transparent 34%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0 72px;
  max-width: 1180px;
}
.hero-copy h1 { max-width: 760px; font-size: clamp(3.6rem, 6.2vw, 6.6rem); line-height: 1.02; font-weight: 400; }
.hero-copy .hero-lead { max-width: 480px; }
.hero-note { color: rgba(236,233,226,.5); }
.landing-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; height: 30%;
  background: linear-gradient(0deg, #07080a, transparent);
  pointer-events: none;
}
@media (max-width: 860px) {
  .landing-hero { min-height: calc(100vh - 72px); }
  .hero-bg { object-position: 68% 50%; opacity: .72; }
  .hero-copy { width: calc(100% - 32px); padding: 48px 0 64px; }
  .hero-copy h1 { font-size: clamp(3.1rem, 13vw, 5rem); }
  .hero-overlay { background: linear-gradient(90deg, #07080a 0%, rgba(7,8,10,.82) 55%, rgba(7,8,10,.55) 100%), linear-gradient(0deg,#07080a,transparent 40%); }
}

/* Editorial sections below the fold. Images are placeholders; replace files in /assets. */
[data-reveal] { opacity: 1; transform: none; animation: section-rise 1s var(--ease) both; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@keyframes section-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.landing-manifesto {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 120px 0;
  border-top: 1px solid var(--border);
}
.manifesto-inner { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 100px); align-items: center; }
.manifesto-copy h2 { margin: 16px 0 20px; font-size: clamp(2.6rem, 4vw, 4rem); line-height: 1.08; }
.section-lead { max-width: 40ch; color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 38px; }
.feature-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.feature-list li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.feature-num { color: var(--accent); font-family: var(--mono); font-size: 10px; padding-top: 4px; }
.feature-list h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.feature-list p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.manifesto-media { position: relative; overflow: hidden; border: 1px solid var(--border); }
.manifesto-media img { display: block; width: 100%; height: auto; min-height: 480px; object-fit: cover; opacity: .82; filter: sepia(.06) brightness(1.2) contrast(1.08); }
.manifesto-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, #0a0b0d 0%, transparent 35%, rgba(10,11,13,.12) 100%); pointer-events: none; }
.media-caption { position: absolute; z-index: 1; left: 16px; bottom: 14px; color: rgba(236,233,226,.5); font-family: var(--mono); font-size: 9px; letter-spacing: .14em; }

.landing-world { position: relative; width: 100%; min-height: 620px; overflow: hidden; border-top: 1px solid var(--border); background: #07080a; }
.world-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; opacity: .55; filter: sepia(.08) brightness(.92) contrast(1.12); animation: hero-drift 38s ease-in-out infinite alternate; }
.world-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, #07080a 0%, rgba(7,8,10,.9) 34%, rgba(7,8,10,.2) 70%, rgba(7,8,10,.55) 100%), linear-gradient(0deg, #07080a 0%, transparent 45%); }
.world-copy { position: relative; z-index: 1; width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: 620px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.world-copy h2 { margin: 16px 0 16px; font-size: clamp(3.2rem, 7vw, 6.8rem); line-height: 1; }
.world-copy p { max-width: 38ch; color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 0 28px; }
.landing-footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 26px 0 34px; display: flex; justify-content: space-between; gap: 16px; color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; border-top: 1px solid var(--border); }

.hero-scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px;
  color: rgba(236,233,226,.38); font-family: var(--mono); font-size: 8px; letter-spacing: .2em;
}
.hero-scroll::after { content: ""; width: 1px; height: 32px; background: linear-gradient(180deg, var(--accent), transparent); animation: scroll-line 2.4s ease-in-out infinite; }
.landing-hero::before {
  content: ""; position: absolute; z-index: 1; inset: -10% -5%;
  background:
    radial-gradient(ellipse at 72% 47%, rgba(180,130,50,.09), transparent 46%),
    radial-gradient(ellipse at 25% 80%, rgba(120,90,50,.06), transparent 50%);
  pointer-events: none;
}
@keyframes scroll-line { 0%,100% { opacity: .3; transform: scaleY(.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; animation: none; }
  .hero-scroll::after, .world-bg { animation: none; }
}
@media (max-width: 860px) {
  .landing-manifesto { width: calc(100% - 32px); padding: 72px 0; }
  .manifesto-inner { grid-template-columns: 1fr; gap: 36px; }
  .manifesto-media img { min-height: 320px; }
  .landing-world, .world-copy { min-height: 520px; }
  .world-copy { width: calc(100% - 32px); }
  .world-copy h2 { font-size: clamp(3rem, 15vw, 5rem); }
  .landing-footer { width: calc(100% - 32px); flex-direction: column; }
}

.observe-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--dim);
  font-size: 10px;
  letter-spacing: .02em;
  text-transform: none;
}
.observe-toggle input { width: auto; }

/* Prequel and character creation */
.prologue-card {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 2px solid var(--accent);
  background: rgba(201,162,39,.035);
}
.prologue-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.prologue-card .prologue-question { color: var(--text); font-family: var(--serif); font-size: 15px; }
.character-card { margin: 16px 0 4px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }
.character-card summary { color: var(--text); font-size: 11px; cursor: pointer; list-style: none; }
.character-card summary::-webkit-details-marker { display: none; }
.character-card summary span { color: var(--dim); margin-left: 8px; font-size: 10px; }
.character-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 12px; }
.character-grid label { margin: 0; }
.character-grid input { padding: 9px 10px; }
.prologue-room { margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid var(--border); }
.prologue-room p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
@media (max-width: 640px) {
  .character-grid { grid-template-columns: 1fr; }
}

.roll-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.roll-row label { margin: 0; color: var(--dim); font-size: 10px; letter-spacing: .03em; text-transform: none; }
.roll-row select { width: auto; padding: 7px 9px; }
.roll-row button { padding: 7px 12px; }
.roll-status { color: var(--red); font-size: 10px; }
.roll-card-mini { color: var(--accent); font-family: var(--mono); font-size: 10px; margin-top: 6px; }
.event.roll { border-left-color: var(--accent); }

/* Play scene map and roll controls */
.grid { grid-template-columns: 260px minmax(0, 1fr) 230px; }
.map-panel { align-self: start; }
.map-scene { display: grid; grid-template-columns: 1fr 28px .75fr; gap: 6px; margin: 10px 0; }
.map-room { min-height: 180px; border: 1px solid var(--border); background: rgba(255,255,255,.018); padding: 8px; display: flex; flex-direction: column; }
.map-room-title { color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }
.map-door { align-self: center; color: var(--accent); font-family: var(--mono); font-size: 8px; text-align: center; border-top: 1px dashed rgba(201,162,39,.45); padding-top: 5px; }
.map-tokens { display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start; }
.map-token { border: 1px solid var(--border); padding: 4px 6px; color: var(--text); font-size: 10px; background: rgba(15,19,27,.7); }
.map-token.mine { border-color: var(--accent); color: var(--accent); }
.map-token.npc { border-color: rgba(122,162,214,.3); color: var(--muted); }
.map-empty { color: var(--dim); font-size: 9px; }
.event.move { border-left-color: var(--accent); color: var(--muted); }
@media (max-width: 1100px) {
  .grid { grid-template-columns: 240px minmax(0, 1fr); }
  .map-panel { grid-column: 1 / -1; order: 3; }
  .map-scene { grid-template-columns: 1fr 36px 1fr; }
}
@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .map-panel { order: 2; }
}

.roll-card-mini.pending { color: var(--dim); }
.roll-row label { max-width: 240px; }
