/* ==========================================================================
   Stop Oversharing — Warm Dark Editorial
   by Mikey · EELC2010 · 2026
   Inspired by Apple · Linear · Vercel
   ========================================================================== */

:root {
  /* Base */
  --bg:       #0c0a09;
  --bg-2:     #14110f;
  --surface:  rgba(255, 245, 230, 0.04);
  --surface-h:rgba(255, 245, 230, 0.07);
  --border:   rgba(255, 245, 230, 0.09);
  --border-h: rgba(255, 245, 230, 0.18);

  /* Text */
  --fg:       #f5ede0;
  --fg-mid:   #b8ada0;
  --fg-dim:   #7a7267;

  /* Accents */
  --coral:    #ff6b4a;
  --coral-d:  #e55535;
  --gold:     #ffd166;
  --teal:     #6dd3b8;
  --teal-d:   #4eb197;
  --rose:     #ff7d7d;

  --radius:   18px;
  --radius-s: 12px;
  --radius-l: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--coral); color: #fff; }

/* Warm radial glow behind hero */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(255, 107, 74, .15), transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

img { max-width: 100%; display: block; }

/* ========== Type tokens ========== */
.serif {
  font-family: 'Fraunces', 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 30, 'WONK' 0;
}
.coral { color: var(--coral); }
.gold  { color: var(--gold); }
.teal  { color: var(--teal); }
.dim   { color: var(--fg-mid); }

.eyebrow,
.eyebrow-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-mid);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  border-radius: 100px;
  text-transform: uppercase;
}
.eyebrow::before,
.eyebrow-inline::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 10px var(--coral);
}
.light { color: var(--fg) !important; }

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  background: rgba(20, 17, 15, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: 100px;
  z-index: 100;
  max-width: calc(100% - 32px);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 12px var(--coral);
}
.nav-title {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
}
.nav-links {
  display: flex; gap: 8px; align-items: center;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-mid);
  text-decoration: none;
  border-radius: 100px;
  transition: all .2s ease;
}
.nav-links a:hover { color: var(--fg); background: var(--surface-h); }
.btn-small {
  background: var(--fg) !important;
  color: var(--bg) !important;
  font-weight: 600 !important;
}
.btn-small:hover { background: var(--coral) !important; color: #fff !important; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  font-family: inherit;
  letter-spacing: .1px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--coral);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px -10px rgba(255, 107, 74, .5);
}
.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border-h);
}
.btn-ghost:hover { background: var(--surface-h); border-color: var(--fg-mid); }
.btn-coral {
  background: var(--coral);
  color: #fff;
}
.btn-coral:hover { background: var(--coral-d); }
.btn-teal {
  background: var(--teal);
  color: #0c0a09;
}
.btn-teal:hover { background: var(--teal-d); }
.btn-full { width: 100%; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  padding: 140px 40px 80px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  min-height: 92vh;
}
.hero-inner { max-width: 620px; }
.hero-title {
  font-family: 'Fraunces', 'Playfair Display', serif;
  font-weight: 500;
  font-variation-settings: 'SOFT' 40, 'opsz' 144;
  font-size: clamp(48px, 6.8vw, 92px);
  line-height: 1;
  letter-spacing: -3px;
  margin: 24px 0 28px;
  color: var(--fg);
}
.hero-title em {
  font-family: 'Instrument Serif', 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--coral);
  letter-spacing: -2px;
}
.hero-title .outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--fg);
  font-style: italic;
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
}
.hero-lede {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--fg-mid);
  max-width: 500px;
  margin-bottom: 36px;
}
.hero-lede b { color: var(--fg); font-weight: 500; }
.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}
.hero-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 580px;
}
.stat-card {
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .3s ease;
}
.stat-card:hover {
  background: var(--surface-h);
  border-color: var(--border-h);
  transform: translateY(-2px);
}
.stat-num {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 50;
  font-size: 44px;
  line-height: 1;
  color: var(--coral);
  margin-bottom: 8px;
  letter-spacing: -2px;
}
.stat-card:nth-child(2) .stat-num { color: var(--gold); }
.stat-card:nth-child(3) .stat-num { color: var(--teal); }
.stat-lbl {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--fg-mid);
}
.stat-lbl span {
  display: block;
  font-size: 10px;
  color: var(--fg-dim);
  margin-top: 4px;
  font-style: italic;
}

/* Hero photo */
.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-l);
  overflow: hidden;
  background: linear-gradient(135deg, #1a1612, #0a0908);
  box-shadow:
    0 40px 80px -30px rgba(0,0,0,.8),
    0 0 0 1px var(--border);
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.95) brightness(0.9);
}
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(12,10,9,.6) 100%);
}
.photo-badge {
  position: absolute;
  background: rgba(20, 17, 15, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-h);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  color: var(--fg);
  white-space: nowrap;
  z-index: 2;
  animation: badge-float 5s ease-in-out infinite;
}
.photo-badge span:first-child { font-size: 15px; }
.photo-badge.b1 { top: 8%; left: -24px; animation-delay: 0s; }
.photo-badge.b2 { top: 42%; right: -24px; animation-delay: 1.8s; }
.photo-badge.b3 { bottom: 16%; left: -14px; animation-delay: 3.4s; }
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
  padding: 120px 40px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.section-paper,
.section-dark {
  max-width: 100%;
  padding-left: 40px;
  padding-right: 40px;
}
.section-paper {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-paper .section-head,
.section-paper .game-frame,
.section-paper .chat-frame {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.section-dark { background: var(--bg); }
.section-dark .section-head,
.section-dark .action-grid,
.section-dark .pledge {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  text-align: center;
  margin-bottom: 72px;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-variation-settings: 'SOFT' 40, 'opsz' 144;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -2.5px;
  margin: 20px auto 16px;
  max-width: 860px;
}
.section-head h2 em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--coral);
  letter-spacing: -1.5px;
}
.section-sub {
  font-size: 17px;
  color: var(--fg-mid);
  max-width: 560px;
  margin: 14px auto 0;
  line-height: 1.55;
}

/* ==========================================================================
   STORY (4 steps)
   ========================================================================== */
.story {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.story-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: all .35s ease;
  position: relative;
  overflow: hidden;
}
.story-step:hover {
  transform: translateY(-4px);
  border-color: var(--border-h);
  background: var(--surface-h);
}
.story-step.highlight {
  background: linear-gradient(160deg, rgba(109, 211, 184, .14), rgba(109, 211, 184, .03));
  border-color: rgba(109, 211, 184, .35);
}
.step-tag {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'SOFT' 50;
  font-size: 28px;
  color: var(--coral);
  margin-bottom: 16px;
  letter-spacing: -1px;
  line-height: 1;
}
.story-step.highlight .step-tag { color: var(--teal); }
.story-step h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
  color: var(--fg);
}
.story-step > p {
  font-size: 13.5px;
  color: var(--fg-mid);
  margin-bottom: 16px;
  line-height: 1.5;
}
.src {
  display: block;
  margin-top: 14px;
  font-size: 10.5px;
  color: var(--fg-dim);
  font-style: italic;
  letter-spacing: .2px;
}

.mock-post {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 14px;
  font-size: 13px;
}
.mock-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #ef4444, #ec4899);
  flex-shrink: 0;
}
.mock-head b { font-size: 13px; display: block; color: var(--fg); }
.mock-head small { font-size: 10.5px; color: var(--fg-dim); }
.mock-body { line-height: 1.45; margin-bottom: 10px; color: var(--fg); }
.mock-foot {
  font-size: 11px;
  color: var(--fg-dim);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.trace-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.trace-chip {
  background: rgba(255, 107, 74, .1);
  border: 1px solid rgba(255, 107, 74, .25);
  color: var(--coral);
  padding: 5px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}

.risk-row { display: flex; gap: 8px; }
.risk {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  background: rgba(255, 125, 125, .08);
  border: 1px solid rgba(255, 125, 125, .2);
  border-radius: var(--radius-s);
  font-size: 22px;
}
.risk small {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  color: var(--rose);
  font-weight: 600;
}

.solved-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--teal);
  color: var(--bg);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.5px;
  border-radius: 100px;
}

/* ==========================================================================
   GAME — 2-column layout (game on left, live leaderboard on right)
   ========================================================================== */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

.game-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  backdrop-filter: blur(12px);
}

/* Live leaderboard sidebar */
.live-lb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 20px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 100px;
}
.lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.lb-head h4 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 30;
  font-size: 22px;
  color: var(--fg);
  letter-spacing: -0.5px;
  flex: 1;
}
.lb-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(109, 211, 184, 0.12);
  border: 1px solid rgba(109, 211, 184, 0.3);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--teal);
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(0.7); }
}
.lb-refresh {
  cursor: pointer;
  font-size: 18px;
  color: var(--fg-mid);
  padding: 6px 10px;
  border-radius: 100px;
  transition: all .2s;
  user-select: none;
}
.lb-refresh:hover { color: var(--fg); background: var(--surface-h); }
.lb-refresh.spin { animation: refresh-spin .8s linear; }
@keyframes refresh-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.live-lb .lb-tabs { margin-bottom: 10px; }
.live-lb .leaderboard { max-height: 420px; }
.live-lb .lb-row { grid-template-columns: 30px 1fr auto; }
.live-lb .lb-row .lb-time-col { display: none; }

.game-screen { padding: 32px; }
.game-screen.hidden { display: none; }

/* Start */
.start-card { text-align: center; padding: 10px 4px; }
.start-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 107, 74, .12);
  border: 1px solid rgba(255, 107, 74, .3);
  color: var(--coral);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.start-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 30;
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: -1.5px;
  margin-bottom: 14px;
}
.start-card > p {
  color: var(--fg-mid);
  margin-bottom: 24px;
  font-size: 15px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
#player-name {
  width: 100%;
  padding: 16px 22px;
  background: var(--bg);
  border: 1px solid var(--border-h);
  border-radius: 100px;
  font-family: inherit;
  font-size: 15px;
  color: var(--fg);
  margin-bottom: 12px;
  transition: border-color .2s;
}
#player-name::placeholder { color: var(--fg-dim); }
#player-name:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, .15);
}
.start-note {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  color: var(--fg-dim);
}

/* HUD */
.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  padding: 1px;
  border-radius: var(--radius-s);
  margin-bottom: 18px;
  overflow: hidden;
}
.hud-item {
  background: var(--bg);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}
.hud-lbl {
  font-size: 9.5px;
  letter-spacing: 2px;
  color: var(--fg-dim);
  font-weight: 600;
  text-transform: uppercase;
}
.hud-val {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--fg);
  line-height: 1;
  letter-spacing: -0.5px;
}
#hud-name {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  height: 4px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 22px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  border-radius: 100px;
  transition: width .4s ease;
}

.card-stack { min-height: 240px; }
.fake-post {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  animation: slide-in .35s ease;
}
@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.fp-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #ef4444, #ec4899);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.fp-head b { font-size: 14px; color: var(--fg); display: block; }
.fp-head small { font-size: 11px; color: var(--fg-dim); }
.fp-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg);
  padding: 6px 0 10px;
}
.fp-meta {
  font-size: 11.5px;
  color: var(--fg-dim);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.choice-row .btn { padding: 15px; font-size: 14px; }

/* Result feedback */
.game-result {
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius);
  animation: slide-in .35s ease;
  background: var(--surface);
  border: 1px solid var(--border-h);
}
.game-result.correct {
  background: rgba(109, 211, 184, .08);
  border-color: rgba(109, 211, 184, .35);
}
.game-result.wrong {
  background: rgba(255, 125, 125, .08);
  border-color: rgba(255, 125, 125, .35);
}
.game-result.hidden { display: none; }
.result-head {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 30;
  font-size: 26px;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.game-result.correct .result-head { color: var(--teal); }
.game-result.wrong .result-head { color: var(--rose); }
.result-text { font-size: 13.5px; line-height: 1.55; color: var(--fg-mid); }
.result-text b { color: var(--fg); font-weight: 600; }
.result-text small { color: var(--fg-dim); font-size: 11px; font-style: italic; }

/* End screen */
.end-card { text-align: center; }
.end-kicker {
  display: inline-flex;
  padding: 6px 14px;
  background: rgba(255, 209, 102, .12);
  border: 1px solid rgba(255, 209, 102, .3);
  color: var(--gold);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.end-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 30;
  font-size: 36px;
  line-height: 1.02;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.end-score {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 100px;
  line-height: 1;
  color: var(--fg);
  letter-spacing: -4px;
  display: flex;
  align-items: baseline;
  justify-content: center;
}
.end-score-max {
  font-size: 40px;
  color: var(--fg-dim);
  margin-left: 4px;
  letter-spacing: -1px;
}
.end-verdict {
  font-size: 15.5px;
  color: var(--fg-mid);
  margin: 10px auto 30px;
  max-width: 420px;
  line-height: 1.55;
}

.lb-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--fg-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.lb-tabs {
  display: inline-flex;
  background: var(--bg);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 100px;
  gap: 2px;
  margin-bottom: 16px;
}
.lb-tab {
  padding: 7px 16px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--fg-mid);
  border-radius: 100px;
  cursor: pointer;
  transition: all .2s;
}
.lb-tab.active {
  background: var(--fg);
  color: var(--bg);
}
.leaderboard {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 6px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 8px;
}
.lb-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-s);
  font-size: 13.5px;
  transition: background .15s;
}
.lb-row + .lb-row { border-top: 1px solid var(--border); }
.lb-row:hover { background: var(--surface); }
.lb-row.me {
  background: rgba(255, 209, 102, .08);
  border: 1px solid rgba(255, 209, 102, .3);
}
.lb-rank {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 18px;
  color: var(--coral);
  letter-spacing: -0.5px;
}
.lb-row.me .lb-rank { color: var(--gold); }
.lb-name {
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-time { font-size: 11px; color: var(--fg-dim); }
.lb-score {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 20px;
  color: var(--teal);
  letter-spacing: -0.5px;
}
.lb-empty {
  text-align: center;
  padding: 24px;
  color: var(--fg-dim);
  font-size: 13px;
}
.lb-note {
  display: block;
  font-size: 11px;
  color: var(--fg-dim);
  margin-top: 8px;
}
.end-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 26px;
  flex-wrap: wrap;
}

/* ==========================================================================
   CHAT
   ========================================================================== */
.chat-frame {
  max-width: 740px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7);
  backdrop-filter: blur(12px);
}
.chat-box {
  height: 440px;
  overflow-y: auto;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}
.msg-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 80%;
  font-size: 14.5px;
  line-height: 1.55;
}
.msg-ai .msg-bubble {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
}
.msg-user { flex-direction: row-reverse; }
.msg-user .msg-bubble {
  background: var(--coral);
  color: #fff;
}
.msg-user .msg-avatar {
  background: var(--coral);
  border-color: var(--coral);
}
.msg-typing .msg-bubble {
  color: var(--fg-mid);
  font-style: italic;
  opacity: .8;
}

.chat-suggestions {
  padding: 14px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}
.chip {
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-mid);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.chip:hover {
  background: var(--coral);
  color: #fff;
  border-color: var(--coral);
}

.chat-input-bar {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
#chat-input {
  flex: 1;
  padding: 13px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--fg);
}
#chat-input::placeholder { color: var(--fg-dim); }
#chat-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, .12);
}

/* ==========================================================================
   ACTION
   ========================================================================== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 40px;
  margin-bottom: 72px;
}
.action-card {
  padding: 32px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .3s;
  position: relative;
  overflow: hidden;
}
.action-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0%; height: 2px;
  background: linear-gradient(90deg, var(--coral), var(--gold));
  transition: width .5s ease;
}
.action-card:hover {
  transform: translateY(-4px);
  background: var(--surface-h);
  border-color: var(--border-h);
}
.action-card:hover::before { width: 100%; }
.action-num {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 50;
  font-size: 44px;
  color: var(--gold);
  margin-bottom: 14px;
  line-height: 1;
  letter-spacing: -2px;
}
.action-card h4 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin-bottom: 8px;
  color: var(--fg);
}
.action-card p {
  font-size: 14px;
  color: var(--fg-mid);
  line-height: 1.55;
}
.action-card p b { color: var(--fg); font-weight: 600; }

.pledge {
  text-align: center;
  padding: 0 40px;
}
.pledge-main {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-variation-settings: 'SOFT' 30;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.2;
  letter-spacing: -1.5px;
  margin-bottom: 28px;
  color: var(--fg);
}
.pledge-main em {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}
.pledge-sign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--gold);
  color: var(--bg);
  border-radius: 100px;
  font-weight: 600;
  font-size: 14.5px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--bg);
  color: var(--fg-mid);
  padding: 40px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand b { color: var(--fg); }
.footer-author {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 16px;
  color: var(--fg);
}
.footer-author b { font-style: normal; color: var(--coral); }
.footer-refs { font-size: 11px; color: var(--fg-dim); }

/* ==========================================================================
   RESPONSIVE — tablet (≤ 960px)
   ========================================================================== */
@media (max-width: 960px) {
  body::before { width: 500px; height: 400px; }
  .nav {
    top: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    max-width: calc(100% - 20px);
    gap: 10px;
    padding: 8px 8px 8px 14px;
    justify-content: space-between;
  }
  .nav-links { gap: 4px; }
  .nav-links a:not(.btn-small) { display: none; }

  .hero {
    grid-template-columns: 1fr;
    padding: 96px 18px 56px;
    gap: 36px;
    min-height: auto;
  }
  .hero-photo { max-width: 420px; margin: 0 auto; }
  .hero-cards { grid-template-columns: 1fr; max-width: 100%; }

  .section { padding: 72px 18px; }
  .section-paper, .section-dark {
    padding-left: 18px;
    padding-right: 18px;
  }

  .story { grid-template-columns: 1fr; gap: 14px; }

  .game-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .live-lb {
    position: static;
    order: 2;
    padding: 16px;
  }
  .live-lb .leaderboard { max-height: 280px; }

  .action-grid {
    grid-template-columns: 1fr;
    padding: 0 18px;
  }
  .pledge { padding: 0 18px; }

  .hud { grid-template-columns: repeat(2, 1fr); }
  .end-score { font-size: 70px; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
}

/* ==========================================================================
   RESPONSIVE — phone (≤ 560px)
   ========================================================================== */
@media (max-width: 560px) {
  html { -webkit-text-size-adjust: 100%; }

  body::before { width: 320px; height: 280px; opacity: .5; }

  .nav {
    padding: 6px 6px 6px 12px;
    font-size: 12px;
  }
  .nav-brand { font-size: 13px; }
  .nav-brand .nav-dot { width: 6px; height: 6px; }
  .btn-small { padding: 7px 12px; font-size: 12px; }

  .hero { padding: 80px 14px 40px; gap: 28px; }
  .hero-title { letter-spacing: -2px; }
  .hero-cta { gap: 8px; }
  .hero-cta .btn { flex: 1; justify-content: center; min-width: 140px; }

  .section { padding: 56px 14px; }
  .section-paper, .section-dark {
    padding-left: 14px;
    padding-right: 14px;
  }
  .section-head { margin-bottom: 32px; }

  /* Game */
  .game-frame { border-radius: 16px; }
  .game-screen { padding: 22px 18px; }
  .start-card h3 { font-size: 32px; }
  .choice-row { flex-direction: column; gap: 10px; }
  .choice-row .btn { width: 100%; justify-content: center; }
  .hud {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .end-score { font-size: 60px; }
  .end-actions { flex-direction: column; }
  .end-actions .btn { width: 100%; justify-content: center; }

  /* Live leaderboard */
  .live-lb { padding: 14px; border-radius: 16px; }
  .lb-head h4 { font-size: 18px; }
  .lb-live { padding: 3px 8px; font-size: 9px; }
  .lb-tab { padding: 6px 12px; font-size: 11.5px; }
  .lb-row { padding: 8px 10px; gap: 8px; }
  .lb-name { font-size: 13px; }
  .lb-score { font-size: 17px; }

  /* Chat */
  .chat-frame { border-radius: 16px; }
  .chat-msgs { padding: 16px; max-height: 380px; }
  .chat-input { padding: 10px; gap: 8px; }
  .chat-input input { font-size: 14px; padding: 10px 12px; }
  .chat-suggest { padding: 10px 14px; }
  .chat-suggest button { font-size: 11.5px; padding: 6px 10px; }

  /* Action cards */
  .action-card { padding: 22px 18px; }
  .action-num { font-size: 36px; }

  /* Pledge */
  .pledge { padding: 0 14px; }
  .pledge-sign { padding: 12px 22px; font-size: 13px; }

  /* Footer */
  .footer { padding: 40px 14px; }
}

/* Extra-narrow (≤ 380px) tweaks */
@media (max-width: 380px) {
  .hero-cards { gap: 8px; }
  .stat-card { padding: 14px; }
  .stat-num { font-size: 36px; }
  .btn { padding: 10px 16px; font-size: 13px; }
}
