/* ==========================================================================
   Aither Receipts — White-Label Dark Architectural Template
   Theme tokens are overridden dynamically from brand.config.json
   ========================================================================== */

:root {
  --bg: #000000;
  --surface: #0a0a0c;
  --surface-elevated: #0c0c0e;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --dim: #737373;

  --accent: #4b7cf3;
  --accent-hover: #5e8bf7;
  --accent-rgb: 75, 124, 243;
  --accent-tint: #93c5fd;
  --gold-start: #f5b942;
  --gold-end: #d97706;
  --gold-rgb: 245, 185, 66;

  --red: #f87171;
  --amber: #fbbf24;
  --green: #4ade80;
  --blue: #60a5fa;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); font-size: 0.88em; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.txt-red { color: var(--red); }
.txt-amber { color: var(--amber); }
.txt-green { color: var(--green); }
.txt-blue { color: var(--blue); }
.txt-accent { color: var(--accent-tint); }

/* ---------- TOP NAV ---------- */
.nav-header {
  position: sticky; top: 0; z-index: 40; min-height: 60px;
  background: rgba(0, 0, 0, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.nav-inner {
  max-width: 1120px; min-height: 60px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px;
  letter-spacing: -0.02em; margin-inline-end: auto; flex-shrink: 0;
}
.brand-strong { font-weight: 700; color: #ffffff; }
.brand-muted { color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 18px; font-size: 13.5px; color: var(--muted); }
.nav-link, .nav-cta { white-space: nowrap; flex-shrink: 0; }
.nav-link:hover, .nav-cta:hover { color: #ffffff; }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px; color: #e5e5e5; font-weight: 500;
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); transition: border-color 140ms ease, background 140ms ease;
}
.nav-cta:hover { border-color: var(--border-strong); background: rgba(255, 255, 255, 0.09); }

.preset-picker {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.35); background: rgba(var(--accent-rgb), 0.1); color: #f5f5f5;
  flex-shrink: 0;
}
.preset-select { background: transparent; border: 0; color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; outline: none; }
.preset-select option { background: #111114; color: #f5f5f5; }

.ico-sm { width: 15px; height: 15px; flex-shrink: 0; }
.ico-btn { width: 18px; height: 18px; flex-shrink: 0; }
.btn-icon-slot { display: inline-flex; align-items: center; }

/* ---------- HERO ---------- */
.hero { position: relative; padding: 84px 0 64px; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.036) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.036) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 58% at 50% 24%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 58% at 50% 24%, #000 20%, transparent 80%);
}
.hero-stage { position: relative; max-width: 1120px; margin: 0 auto 56px; padding: 16px 24px 0; }
.hero-copy { position: relative; z-index: 2; max-width: 740px; margin: 0 auto; text-align: center; }

.hero-h1 {
  margin: 0 0 20px; font-size: clamp(32px, 6.2vw, 72px); font-weight: 600;
  line-height: 1.07; letter-spacing: -0.035em; color: #ffffff; text-wrap: balance;
}
.hero-sub { margin: 0 auto 28px; max-width: 610px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.hero-cta-stack { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.btn-accent {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 24px; border-radius: 10px; background: var(--accent); color: #ffffff;
  font-size: 15px; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 8px 30px rgba(var(--accent-rgb), 0.35);
  transition: background 140ms ease, transform 140ms ease;
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 0 20px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.03);
  color: var(--text); font-size: 14.5px; font-weight: 500; transition: background 140ms ease, border-color 140ms ease;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }
.btn-sm-outline { min-height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 8px; }
.hero-ghost-link { font-size: 14px; color: var(--muted); transition: color 120ms ease; }
.hero-ghost-link:hover { color: #ffffff; }

.float-tile {
  position: absolute; width: 62px; height: 62px; border-radius: 16px;
  background: rgba(18, 18, 20, 0.92); border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6); display: flex; align-items: center; justify-content: center;
  transition: transform 220ms ease, border-color 220ms ease; z-index: 3;
}
.float-tile svg { width: 26px; height: 26px; }
.float-tile:hover { border-color: rgba(255, 255, 255, 0.32); transform: rotate(0deg) scale(1.06); z-index: 5; }
.float-tile::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 9px); left: 50%;
  transform: translateX(-50%) translateY(4px); white-space: nowrap;
  padding: 5px 10px; border-radius: 8px; background: #141418; color: #f5f5f5;
  border: 1px solid rgba(255, 255, 255, 0.18); font-size: 11.5px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65); opacity: 0; pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
}
.float-tile:hover::after, .float-tile:focus-visible::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.tile-tl { top: -48px; left: 24%; transform: rotate(8deg); }
.tile-ml { top: 82px; left: 3%; transform: rotate(-9deg); }
.tile-bl { bottom: -10px; left: 13%; transform: rotate(10deg); }
.tile-tr { top: -48px; right: 24%; transform: rotate(-8deg); }
.tile-mr { top: 82px; right: 3%; transform: rotate(9deg); }
.tile-br { bottom: -10px; right: 13%; transform: rotate(-10deg); }

/* ---------- PREVIEW WINDOW ---------- */
.app-window {
  position: relative; z-index: 2; background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85);
}
.app-win-bar {
  min-height: 44px; padding: 6px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; background: var(--surface-elevated);
}
.win-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.win-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex-shrink: 0; }
.win-open-pill {
  padding: 5px 11px; border-radius: 7px; background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.35); color: var(--accent-tint); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.win-open-pill:hover { background: var(--accent); color: #ffffff; }

.app-win-grid { display: grid; grid-template-columns: 248px minmax(0, 1fr) 232px; }
.win-col-left { border-inline-end: 1px solid rgba(255, 255, 255, 0.08); padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.win-thread-list { display: flex; flex-direction: column; gap: 6px; }
.win-list-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--dim); padding: 2px 6px 6px; }

.win-thread-item {
  width: 100%; text-align: start; background: transparent; color: inherit; font: inherit; cursor: pointer;
  padding: 9px 10px; border-radius: 8px; display: flex; flex-direction: column; gap: 3px;
  border: 1px solid transparent; transition: background 120ms ease, border-color 120ms ease;
}
.win-thread-item:hover { background: rgba(255, 255, 255, 0.045); border-color: rgba(255, 255, 255, 0.08); }
.win-thread-item.is-active { background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.38); }
.win-th-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; color: #e5e5e5; }
.win-th-date { color: var(--dim); font-weight: 400; font-family: var(--font-mono); font-size: 11px; flex-shrink: 0; }
.win-th-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.win-col-center { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.win-cards-stack { display: flex; flex-direction: column; gap: 10px; }
.win-msg-card {
  display: block; padding: 13px 15px; border-radius: 10px; background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07); transition: border-color 140ms ease, background 140ms ease;
}
a.win-msg-card:hover { border-color: rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.045); }
.win-msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-bottom: 6px; }
.win-badge-red, .win-badge-green, .win-badge-amber, .win-badge-blue {
  padding: 2px 7px; border-radius: 5px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
}
.win-badge-red { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.win-badge-green { background: rgba(74, 222, 128, 0.14); color: #86efac; }
.win-badge-amber { background: rgba(251, 191, 36, 0.16); color: #fde68a; }
.win-badge-blue { background: rgba(var(--accent-rgb), 0.18); color: var(--accent-tint); }
.win-msg-card p { margin: 0; font-size: 13.5px; color: #e4e4e7; line-height: 1.55; }
.win-card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.win-card-link { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent-tint); }
.win-card-link:hover { color: #ffffff; text-decoration: underline; }

.win-composer-cta {
  margin-top: auto; padding: 11px 14px; border-radius: 10px; text-align: center;
  background: rgba(var(--accent-rgb), 0.14); border: 1px solid rgba(var(--accent-rgb), 0.36);
  font-size: 13px; font-weight: 600; color: #dbeafe; transition: background 140ms ease;
}
.win-composer-cta:hover { background: var(--accent); color: #ffffff; }

.win-col-right { border-inline-start: 1px solid rgba(255, 255, 255, 0.08); padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.win-stats-grid { display: flex; flex-direction: column; gap: 10px; }
.win-stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-bottom: 9px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.win-stat-row:last-child { border-bottom: 0; padding-bottom: 0; }
.win-stat-row > span:last-child { white-space: nowrap; font-family: var(--font-mono); font-size: 12px; font-weight: 600; }

/* ---------- MEDIA / ROAST VIDEO ---------- */
.sec-media { padding: 24px 0 48px; }
.media-card {
  padding: 28px 30px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--border); display: flex; flex-direction: column; gap: 16px;
}
.media-head { display: flex; flex-direction: column; gap: 10px; }
.media-sub { margin: 0; font-size: 15.5px; color: var(--muted); max-width: 760px; line-height: 1.6; }
.roast-shell {
  border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14);
  background: #050507; box-shadow: 0 18px 46px rgba(0, 0, 0, 0.7);
}
.roast-shell video { display: block; width: 100%; height: auto; background: #050507; }
.media-foot { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.listen-block {
  margin-top: 8px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; gap: 12px;
}
.listen-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.listen-head a { color: var(--accent-tint); }
.listen-video { width: 100%; border-radius: 12px; background: #000; border: 1px solid var(--border); }
.listen-audio { width: 100%; }
.lyrics-details { font-size: 13.5px; color: var(--muted); }
.lyrics-details summary { cursor: pointer; color: #e5e5e5; font-weight: 500; }
.lyrics-pre {
  margin: 10px 0 0; padding: 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border); white-space: pre-wrap; font-family: var(--font-sans); font-size: 14px; line-height: 1.7; color: #e4e4e7;
}

/* ---------- SECTIONS ---------- */
section { padding: 72px 0; }
.sec-head-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 28px; }
.sec-h2 { margin: 0; font-size: clamp(26px, 3.8vw, 40px); font-weight: 600; line-height: 1.14; letter-spacing: -0.03em; color: #ffffff; }
.sec-lead { margin: 14px 0 32px; max-width: 660px; font-size: 16px; color: var(--muted); }
.sec-lead.center { margin-left: auto; margin-right: auto; }

/* ---------- ORIGIN / STORY ---------- */
.sec-origin { padding: 24px 0 64px; }
.origin-card {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 36px; align-items: center;
  padding: 32px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
}
.origin-copy { display: flex; flex-direction: column; gap: 14px; }
.origin-h2 { margin: 0; font-size: clamp(23px, 3vw, 32px); font-weight: 600; line-height: 1.18; letter-spacing: -0.025em; color: #ffffff; }
.origin-p { margin: 0; font-size: 16px; line-height: 1.72; color: #e4e4e7; }
.origin-p-muted { color: #b4b4bc; }
.origin-link {
  align-self: flex-start; margin-top: 4px; padding: 8px 14px; border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.14); border: 1px solid rgba(var(--accent-rgb), 0.36);
  color: var(--accent-tint); font-size: 13.5px; font-weight: 500; transition: background 140ms ease, color 140ms ease;
}
.origin-link:hover { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.origin-shot {
  display: block; border-radius: 12px; overflow: hidden; background: #111114;
  border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.65);
  transition: transform 180ms ease, border-color 180ms ease;
}
.origin-shot:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.32); }
.origin-shot img { display: block; width: 100%; height: auto; }

/* ---------- GALLERY / PROOF GRID ---------- */
.sec-gallery { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.xr-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.xr-filter {
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); color: var(--muted);
  padding: 7px 13px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.xr-filter:hover { color: #ffffff; border-color: var(--border-strong); }
.xr-filter.is-active { background: var(--accent); border-color: var(--accent); color: #ffffff; }

.xr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.xr-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column; transition: border-color 150ms ease, transform 150ms ease;
}
.xr-card:hover { border-color: rgba(255, 255, 255, 0.24); transform: translateY(-2px); }
.xr-thumb-btn { display: block; width: 100%; padding: 10px 10px 0; border: 0; background: #141417; cursor: zoom-in; }
.xr-thumb-frame {
  position: relative; height: 196px; border-radius: 9px 9px 0 0; overflow: hidden; background: #0e0e12;
  display: flex; align-items: center; justify-content: center;
}
.xr-thumb-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease; }
.xr-card:hover .xr-thumb-frame img { transform: scale(1.02); }
.xr-card-body { padding: 13px 15px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.xr-card-title { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: #ffffff; }
.xr-card-sub { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.xr-card-actions { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.xr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 32px; padding: 5px 11px; border-radius: 7px; font: inherit;
  font-size: 12.5px; font-weight: 500; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); color: #e5e5e5; cursor: pointer; white-space: nowrap;
}
.xr-btn:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }
.xr-btn-x { background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.36); color: var(--accent-tint); }
.xr-btn-x:hover { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.xr-btn-gold {
  background: linear-gradient(135deg, var(--gold-start), var(--gold-end)); border-color: rgba(var(--gold-rgb), 0.7);
  color: #0a0a0a; font-weight: 600;
}
.xr-btn-gold:hover { filter: brightness(1.07); color: #0a0a0a; }

/* ---------- CORE FACTS ---------- */
.sec-facts { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.sec-facts .sec-h2 { margin-bottom: 28px; }
.facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact-card {
  padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; transition: border-color 150ms ease, transform 150ms ease;
}
.fact-card:hover { border-color: rgba(255, 255, 255, 0.24); transform: translateY(-2px); }
.fact-stat { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.fact-title { font-size: 15.5px; font-weight: 600; color: #ffffff; line-height: 1.4; }
.fact-desc { margin: 0; font-size: 14px; color: #b4b4bc; line-height: 1.65; }

/* ---------- FEATURE BANNER ---------- */
.sec-story-spot { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 56px 0; }
.story-spot-card {
  display: grid; grid-template-columns: minmax(0, 1.35fr) 268px; gap: 32px; align-items: center;
  padding: 28px 30px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.09), rgba(10, 10, 14, 0.96) 52%, rgba(var(--gold-rgb), 0.07));
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65);
}
.story-spot-copy { display: flex; flex-direction: column; gap: 12px; }
.story-spot-kicker {
  align-self: flex-start; padding: 3px 9px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  color: var(--accent-tint); background: rgba(var(--accent-rgb), 0.16); border: 1px solid rgba(var(--accent-rgb), 0.36);
}
.story-spot-h2 { margin: 0; font-size: clamp(23px, 3.2vw, 34px); font-weight: 650; line-height: 1.14; letter-spacing: -0.028em; color: #ffffff; }
.story-spot-p { margin: 0; font-size: 15px; line-height: 1.65; color: #c4c4cc; max-width: 600px; }
.story-spot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.btn-spot { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-spot-zip { min-height: 42px; padding: 0 16px; border-radius: 10px; font-size: 14px; }
.story-spot-hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.story-spot-preview {
  position: relative; display: block; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16); background: #121216;
  aspect-ratio: 4 / 3; box-shadow: 0 18px 46px rgba(0, 0, 0, 0.7);
  transition: transform 180ms ease, border-color 180ms ease;
}
.story-spot-preview:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.72); }
.story-spot-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.story-spot-pill {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.82); border: 1px solid rgba(255, 255, 255, 0.22);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: #fff;
}

/* ---------- DECK RAIL & FEATURED GRID ---------- */
.sec-memes {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(ellipse 75% 45% at 50% 0%, rgba(var(--gold-rgb), 0.08), transparent 72%);
}
.mm-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-gold-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 15px; border-radius: 8px;
  border: 1px solid rgba(var(--gold-rgb), 0.6); background: linear-gradient(135deg, var(--gold-start), var(--gold-end));
  color: #0a0a0a; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.btn-gold-sm:hover { filter: brightness(1.06); }

.sins-rail {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 16px; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-color: rgba(var(--gold-rgb), 0.35) transparent;
}
.sin-rail-card {
  flex: 0 0 210px; scroll-snap-align: start; border-radius: 13px;
  border: 1px solid rgba(var(--gold-rgb), 0.28); background: linear-gradient(180deg, #13110c, #09090b);
  padding: 8px 8px 10px; cursor: zoom-in; text-align: start; color: inherit; font: inherit;
  display: flex; flex-direction: column; gap: 8px; transition: transform 180ms ease, border-color 180ms ease;
}
.sin-rail-card:hover { transform: translateY(-4px); border-color: rgba(var(--gold-rgb), 0.78); }
.sin-rail-img { border-radius: 9px; overflow: hidden; background: #141418; aspect-ratio: 4 / 3; }
.sin-rail-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sin-rail-title { font-size: 12.5px; font-weight: 600; color: #fef3c7; line-height: 1.35; padding: 0 2px; }

.mm-viral-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mm-viral-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 13px; overflow: hidden;
  display: flex; flex-direction: column; transition: border-color 150ms ease, transform 150ms ease;
}
.mm-viral-card:hover { border-color: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }
.mm-viral-thumb { border: 0; background: #121216; padding: 8px 8px 0; cursor: zoom-in; display: block; width: 100%; }
.mm-viral-thumb img { display: block; width: 100%; height: 185px; object-fit: cover; border-radius: 8px 8px 0 0; }
.mm-viral-body { padding: 12px 14px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mm-viral-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mm-viral-title { font-size: 14px; font-weight: 600; color: #f5f5f5; line-height: 1.38; }
.mm-viral-note { margin: 0; font-size: 12.5px; color: #a1a1aa; line-height: 1.55; }
.mm-viral-link { flex-shrink: 0; font-family: var(--font-mono); font-size: 12px; color: var(--accent-tint); }
.mm-viral-link:hover { color: #ffffff; text-decoration: underline; }

/* ---------- TERMINAL CTA ---------- */
.sec-open { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 88px 0 92px; }
.term-card {
  max-width: 820px; margin: 0 auto 28px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.term-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px; background: var(--surface-elevated); border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.term-dots { display: flex; gap: 6px; }
.term-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.term-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.term-copy-btn {
  padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); color: var(--muted); font: inherit; font-size: 11.5px; cursor: pointer;
}
.term-copy-btn:hover { color: #ffffff; border-color: var(--border-strong); }
.term-body {
  margin: 0; padding: 20px 22px; font-family: var(--font-mono); font-size: 13px;
  line-height: 1.8; color: #e5e5e5; overflow-x: auto; white-space: pre-wrap; direction: ltr; text-align: left;
}
.t-dim { color: var(--dim); }
.t-green { color: var(--green); }
.t-red { color: var(--red); }
.t-amber { color: var(--amber); }
.t-blue { color: var(--accent-tint); }
.cursor-block { color: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.final-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 26px 0 max(26px, env(safe-area-inset-bottom)); font-size: 13px; color: var(--dim); }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: #ffffff; }

/* ---------- LIGHTBOX & TOAST ---------- */
.xr-lightbox { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 18px; }
.xr-lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.88); backdrop-filter: blur(8px); }
.xr-lb-dialog {
  position: relative; z-index: 1; width: min(920px, 100%); max-height: 92dvh;
  background: #0b0b0e; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
}
.xr-lb-head { padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.xr-lb-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xr-lb-counter { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); padding: 2px 7px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); flex-shrink: 0; }
.xr-lb-title { margin: 0; font-size: 14.5px; font-weight: 600; color: #ffffff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xr-lb-close { width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.05); color: #fff; cursor: pointer; font-size: 15px; flex-shrink: 0; }
.xr-lb-stage { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 18px 54px; display: flex; align-items: flex-start; justify-content: center; background: #050507; }
.xr-lb-img-wrap { max-width: 780px; width: 100%; display: flex; justify-content: center; }
.xr-lb-img-wrap img { display: block; max-width: 100%; max-height: 68dvh; width: auto; height: auto; border-radius: 10px; }
.xr-lb-img-wrap.is-drawing img { animation: cardPop 260ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes cardPop { 0% { opacity: 0.25; transform: scale(0.92) rotateY(-14deg); } 100% { opacity: 1; transform: scale(1) rotateY(0deg); } }
.xr-lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(15, 15, 18, 0.9); color: #fff; font-size: 24px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.xr-lb-prev { left: max(12px, calc(50% - 452px)); }
.xr-lb-next { right: max(12px, calc(50% - 452px)); }
.xr-lb-nav:hover { background: var(--accent); border-color: var(--accent); }
.xr-lb-foot { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 10px; background: #0c0c10; }
.xr-lb-note { margin: 0; font-size: 13.5px; line-height: 1.58; color: #d4d4d8; }
.xr-lb-note:empty { display: none; }
.xr-lb-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.xr-lb-mobile-nav { display: none; gap: 6px; }
.xr-lb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 120;
  padding: 9px 16px; border-radius: 10px; background: #18181b; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18); font-size: 13px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65); max-width: calc(100vw - 32px); text-align: center;
}

/* ---------- INBOX / LEDGER VIEW ---------- */
.inbox-shell { max-width: 1160px; margin: 28px auto 64px; padding: 0 24px; }
.inbox-window {
  background: #09090b; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px;
  overflow: hidden; min-height: 74vh; display: grid; grid-template-columns: 310px minmax(0, 1fr);
}
.inbox-sidebar { border-inline-end: 1px solid rgba(255, 255, 255, 0.08); padding: 16px 12px; display: flex; flex-direction: column; gap: 8px; background: #0b0b0e; }
.inbox-search {
  width: 100%; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04); color: #fff; font: inherit; font-size: 13px; outline: none;
}
.inbox-search:focus { border-color: rgba(var(--accent-rgb), 0.6); }
.inbox-reader { padding: 24px 28px; display: flex; flex-direction: column; gap: 14px; }
.inbox-reader-head { border-bottom: 1px solid rgba(255, 255, 255, 0.08); padding-bottom: 14px; }
.inbox-reader-title { margin: 0 0 6px; font-size: 22px; font-weight: 600; color: #fff; }
.inbox-reader-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.inbox-entry { padding: 16px 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.08); }
.inbox-entry p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.65; color: #e4e4e7; }

@media (max-width: 1024px) {
  .float-tile { display: none; }
  .origin-card, .story-spot-card { grid-template-columns: 1fr; padding: 24px; gap: 22px; }
  .app-win-grid { grid-template-columns: 1fr; }
  .win-col-left { border: none; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .win-col-right { border: none; border-top: 1px solid rgba(255, 255, 255, 0.08); }
  .xr-grid, .facts-grid, .mm-viral-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-window { grid-template-columns: 1fr; }
  .inbox-sidebar { border-inline-end: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
}

@media (max-width: 768px) {
  .win-thread-list { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 8px; }
  .win-thread-list::-webkit-scrollbar { display: none; }
  .win-col-left .win-list-label { display: none; }
  .win-thread-item { flex: 0 0 auto; width: auto; min-width: 172px; max-width: 220px; padding: 8px 11px; background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.08); }
  .win-stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
  .win-stat-row { flex-direction: column; gap: 2px; padding: 8px 10px; border-bottom: 0; border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-inner { flex-wrap: wrap; min-height: 0; padding: 8px 14px 0; row-gap: 6px; gap: 8px 10px; }
  .nav-links { flex: 1 0 100%; margin: 2px -14px 0; padding: 8px 14px; border-top: 1px solid rgba(255, 255, 255, 0.07); overflow-x: auto; scrollbar-width: none; gap: 16px; font-size: 13px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .hero { padding: 42px 0 36px; }
  .hero-stage { padding: 0 16px; margin-bottom: 32px; }
  section { padding: 48px 0; }
  .media-card { padding: 18px 16px; }
  .xr-grid, .facts-grid, .mm-viral-grid { grid-template-columns: 1fr; gap: 14px; }
  .term-body { font-size: 11.5px; padding: 14px; line-height: 1.65; }
  .final-actions { flex-direction: column; align-items: stretch; }
  .final-actions > * { width: 100%; }
  .footer-inner { padding: 0 16px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .xr-lb-nav { display: none; }
  .xr-lb-mobile-nav { display: inline-flex; }
}
