@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/NotoSerifSC-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('./fonts/NotoSansSC-Variable.woff2') format('woff2');
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #c8a86b;
  --gold-dim: #7a6540;
  --bg: #070707;
  --bg2: #0d0d0d;
  --text: #e2e2e2;
  --muted: #888;
  --dim: #444;
  --border: #1c1c1c;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', 'Georgia', serif;
  height: 100vh;
  overflow: hidden;
  user-select: none;
}

/* ── SLIDES ── */
.deck { position: relative; width: 100vw; height: 100vh; }

.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 64px 80px;
  opacity: 0; pointer-events: none;
  transition: opacity .55s ease;
}
.slide.active { opacity: 1; pointer-events: all; }

/* Tall slides: body is overflow:hidden; centered flex clips the bottom. Top-align + scroll. */
.slide--fit {
  justify-content: flex-start;
  padding-top: clamp(64px, 15vh, 128px);
  padding-bottom: 40px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* stagger children on entry */
.slide.active > * {
  animation: up .5s ease both;
}
.slide.active > *:nth-child(1) { animation-delay: .05s; }
.slide.active > *:nth-child(2) { animation-delay: .15s; }
.slide.active > *:nth-child(3) { animation-delay: .22s; }
.slide.active > *:nth-child(4) { animation-delay: .30s; }
.slide.active > *:nth-child(5) { animation-delay: .38s; }
.slide.active > *:nth-child(6) { animation-delay: .46s; }
.slide.active > *:nth-child(7) { animation-delay: .52s; }

@keyframes up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CHROME ── */
#progress {
  position: fixed; bottom: 0; left: 0;
  height: 2px; background: var(--gold);
  transition: width .4s ease; z-index: 99;
}
#counter {
  position: fixed; bottom: 22px; right: 36px;
  font-family: 'Courier New', monospace; font-size: 11px;
  color: var(--dim); letter-spacing: 3px; z-index: 99;
}
#hint {
  position: fixed; bottom: 22px; left: 36px;
  font-family: 'Courier New', monospace; font-size: 11px;
  color: #222; letter-spacing: 2px; z-index: 99;
}

/* ── ATOMS ── */
.label {
  font-family: 'Courier New', monospace;
  font-size: 11px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 28px;
}
.rule { width: 48px; height: 1px; background: var(--gold); margin: 20px 0; }
.rule.center { margin: 20px auto; }

h1 { font-size: clamp(38px,5.5vw,76px); font-weight: 400; line-height: 1.12; }
h2 { font-size: clamp(26px,3.8vw,54px); font-weight: 400; line-height: 1.2; }
h3 { font-size: clamp(16px,2vw,26px); font-weight: 400; color: var(--gold); }

.sub {
  font-family: 'Courier New', monospace; font-size: clamp(12px,1.4vw,16px);
  letter-spacing: 5px; text-transform: uppercase; color: var(--dim);
}
.body { font-size: clamp(14px,1.5vw,19px); line-height: 1.9; color: var(--muted); max-width: 680px; }
.gold { color: var(--gold); }
.bright { color: var(--text); }

blockquote {
  border-left: 2px solid var(--gold);
  padding: 8px 0 8px 24px;
  font-size: clamp(16px,1.8vw,22px);
  font-style: italic; line-height: 1.7;
  color: #ccc; max-width: 720px;
}
blockquote cite {
  display: block; margin-top: 12px;
  font-style: normal; font-size: 13px; color: var(--dim);
  letter-spacing: 1px;
}

/* ── LAYOUTS ── */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; width: 100%; max-width: 960px; align-items: start;
}
/* First column a bit wider — helps long CJK titles stay on one line */
.two-col.first-wider {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}
.three-col {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 24px; width: 100%; max-width: 960px;
}
.col { display: flex; flex-direction: column; gap: 12px; }

/* ── CARDS ── */
.card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
}
.card .card-tag {
  font-family: 'Courier New', monospace; font-size: 10px;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.card p { font-size: 14px; color: #777; line-height: 1.75; }

/* ── TIMELINE ── */
.timeline { width: 100%; max-width: 720px; }
.tl-item { display: flex; gap: 20px; padding: 12px 0; border-bottom: 1px solid #111; }
.tl-year {
  font-family: 'Noto Sans SC', 'Courier New', monospace; color: var(--gold);
  font-size: 16px; width: 80px; flex-shrink: 0; padding-top: 1px;
}
.tl-text { font-size: 18px; color: #888; line-height: 1.35; }
.tl-text strong { color: #ccc; font-weight: normal; }

/* ── STATS ── */
.stat-row { display: flex; gap: 48px; margin-top: 28px; flex-wrap: wrap; align-items: flex-start; }
.stat { align-self: flex-start; }
.stat-n {
  font-family: 'Noto Sans SC', sans-serif;
  font-weight: 300;
  font-size: clamp(28px,3.5vw,48px); color: var(--gold);
  letter-spacing: 1px;
}
.stat-l {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 4px;
  line-height: 1.45;
  white-space: normal;
}

/* ── LEDGER (mono table) ── */
.ledger {
  font-family: 'Courier New', monospace; font-size: 14px;
  color: var(--dim); line-height: 2.4;
}
.ledger .ledger-hi { color: var(--gold); }

/* ── SLIDE PHOTOS (remote CC images) ── */
.slide-photo {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
}
.slide-photo--logo {
  object-fit: contain;
  object-position: center;
  background: #0a0a0a;
  max-height: 140px;
  padding: 16px;
}
.slide-fig { margin: 0; }

/* Straussian slide: taller screenshot, vertically centered in the right column */
#slide-straussian .two-col {
  align-items: stretch;
}
#slide-straussian .two-col > .col:last-child {
  justify-content: center;
}
#slide-straussian .slide-fig .slide-photo {
  max-height: clamp(400px, 62vh, 720px);
  object-fit: contain;
  object-position: center;
  background: #f3efe4;
  padding: 10px;
}

.slide-cap {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #333;
  margin-top: 8px;
  line-height: 1.5;
}

/* ── REVIEW SWAP (slide 07 · click cover to reveal alumni network) ── */
.review-swap {
  position: relative;
  width: 100%;
  height: clamp(320px, 42vh, 440px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f3efe4;
  cursor: pointer;
}
.review-swap .review-swap-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  border: none;
  background: #f3efe4;
  transition: opacity .8s ease;
}
.review-swap .review-swap-img--a { opacity: 1; }
.review-swap .review-swap-img--b { opacity: 0; }
.review-swap.swapped .review-swap-img--a { opacity: 0; }
.review-swap.swapped .review-swap-img--b { opacity: 1; }
.review-swap-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 1px;
  color: #333;
  background: rgba(243, 239, 228, .85);
  border: 1px solid var(--border);
  padding: 4px 8px;
  pointer-events: none;
  transition: opacity .4s ease;
}
.review-swap.swapped .review-swap-hint { opacity: 0; }
.review-swap-cap {
  position: relative;
  display: grid;
  cursor: pointer;
}
.review-swap-cap > span {
  grid-area: 1 / 1;
  transition: opacity .8s ease;
}
.review-swap-cap .review-swap-cap--a { opacity: 1; }
.review-swap-cap .review-swap-cap--b { opacity: 0; }
.review-swap-cap.swapped .review-swap-cap--a { opacity: 0; }
.review-swap-cap.swapped .review-swap-cap--b { opacity: 1; }

/* ── PROMISE LIST ── */
.promise-list { list-style: none; max-width: 640px; margin-top: 8px; }
.promise-list li {
  display: flex; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid #111;
  font-size: clamp(14px,1.5vw,18px); color: #aaa; line-height: 1.7;
}
.promise-list li::before { content: '—'; color: var(--gold); flex-shrink: 0; margin-top: 2px; }

/* ── TITLE SLIDE ── */
.title-slide { text-align: center; }
.title-slide h1 { font-size: clamp(48px,7vw,96px); }
.title-slide .meta {
  margin-top: 56px; font-family: 'Courier New', monospace;
  font-size: 12px; color: #292929; letter-spacing: 3px;
}

/* ── ENLIGHTENMENT FOLDABLE (slide-straussian) ── */
.enlight-col-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}
.enlight-col-toggle:focus {
  outline: none;
}
.enlight-col-toggle:focus-visible {
  outline: 2px solid var(--gold-dim);
  outline-offset: 4px;
}
.enlight-col-title {
  font-size: clamp(26px, 3.8vw, 54px);
  font-weight: 400;
  line-height: 1.2;
  transition: color .2s ease;
}
.enlight-col-toggle .rule {
  display: block;
}
.enlight-col-toggle:hover .enlight-col-title,
.enlight-col-toggle:focus-visible .enlight-col-title,
.enlight-col-toggle[aria-expanded="true"] .enlight-col-title {
  color: #e4c282;
}

/* Straussian slide: smaller title on one line; body text + gold word on hover (no full-line gold) */
#slide-straussian .enlight-col-title {
  font-size: clamp(34px, 2.65vw, 48px);
}
#slide-straussian .enlight-col-toggle:hover .enlight-col-title,
#slide-straussian .enlight-col-toggle:focus-visible .enlight-col-title,
#slide-straussian .enlight-col-toggle[aria-expanded="true"] .enlight-col-title {
  color: var(--text);
}

.enlight-inline-mark {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 3px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.enlight-col-toggle:hover .enlight-inline-mark,
.enlight-col-toggle:focus-visible .enlight-inline-mark {
  color: #e4c282;
  text-decoration-color: var(--gold);
}
.enlight-col-toggle[aria-expanded="true"] .enlight-inline-mark {
  text-decoration-style: solid;
  text-decoration-color: var(--gold);
}

.enlight-annotation {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s ease, margin .4s ease, opacity .3s ease;
  opacity: 0;
  margin: 0;
}
.enlight-annotation.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin: 10px 0;
}
.enlight-annotation > .enlight-annotation-inner {
  min-height: 0;
  overflow: hidden;
  border-left: 2px solid var(--gold-dim);
  padding: 2px 0 2px 16px;
}
.enlight-annotation-head {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin: 6px 0 8px;
}
.enlight-annotation p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}
.enlight-annotation p + p { margin-top: 6px; }
.enlight-annotation ul {
  list-style: none;
  padding-left: 0;
  margin: 6px 0 2px;
}
.enlight-annotation li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  padding: 2px 0;
}
.enlight-annotation li::before {
  content: '· ';
  color: var(--gold);
}
.enlight-coda {
  margin-top: 8px;
  padding-bottom: 4px;
}

/* ── DISCUSSION SLIDE ── */
.disc-q {
  width: 100%; max-width: 720px;
  padding: 18px 0; border-bottom: 1px solid #111;
  font-size: clamp(14px,1.5vw,18px); color: #999; line-height: 1.7;
  display: flex; gap: 18px; align-items: flex-start;
}
.disc-q .qn {
  font-family: 'Courier New', monospace; color: var(--gold);
  font-size: 13px; flex-shrink: 0; padding-top: 3px;
}

/* bg glow */
.slide::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 65% 45%, rgba(200,168,107,.025) 0%, transparent 65%);
}

/* wide util */
.wide { width: 100%; max-width: 900px; }
.tc { text-align: center; }

/* ── GENEALOGY SLIDE ── */
.gen-layout {
  display: grid;
  grid-template-columns: 1fr 30%;
  gap: 0;
  width: 100%; max-width: 1200px;
  align-items: start;
  height: 70vh;
}
@media (max-width: 800px) {
  .gen-layout { grid-template-columns: 1fr; height: auto; gap: 24px; }
}
.gen-tree {
  position: relative;
  display: flex; flex-direction: column;
  gap: 36px;
  padding: 12px 0;
  overflow: visible;
  z-index: 1;
  touch-action: manipulation;
}
.gen-lines {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
/* 边的颜色由 JS 写在 SVG 属性上，避免 class + CSS 在 <line> 上表现不一致 */
.gen-lines line {
  fill: none;
  transition: stroke .35s ease, opacity .35s ease, stroke-width .35s ease;
}
.gen-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  position: relative; z-index: 1;
}
.gen-node {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  cursor: pointer;
  opacity: .4;
  transition: opacity .4s ease, transform .3s ease;
  user-select: none;
}
.gen-node.revealed { opacity: 1; }
.gen-node[data-id="strauss"],
.gen-node[data-id="yarvin"] { opacity: 1; }
.gen-node:not(.revealed) {
  animation: nodePulse 2.5s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.4); }
}
.gen-node.active .gen-avatar {
  box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(200,168,107,.25);
  transform: scale(1.12);
}
.gen-node:hover { transform: translateY(-2px); opacity: .85; }
.gen-tree--fisheye .gen-row {
  z-index: auto;
}
.gen-tree--fisheye .gen-node:not([data-id="thiel"]) {
  position: relative;
  z-index: 2;
  transition: opacity .25s ease, transform .1s ease-out;
}
.gen-tree--fisheye .gen-node:not([data-id="thiel"]):hover { transform: none; }
.gen-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 2px solid #2a2a2a;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 700;
  color: #666;
  background: #111;
  transition: border-color .3s, box-shadow .3s, transform .3s, color .3s;
}
.gen-node.revealed .gen-avatar { border-color: var(--dim); color: var(--text); background: var(--bg2); }
.gen-node.active .gen-avatar { border-color: var(--gold); color: var(--gold); }
.gen-avatar--gold { border-color: var(--gold-dim) !important; }
.gen-avatar--img {
  padding: 0;
  overflow: hidden;
  background: #444;
}
.gen-avatar--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}
/* Schmitt：必须压过 .gen-avatar--img img 的 cover，否则一直裁切 */
.gen-avatar--img.gen-avatar--schmitt img {
  object-fit: contain;
  object-position: left top;
  transform: scale(1.1);
  transform-origin: left top;
}
.gen-name {
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
  font-size: 11px; letter-spacing: 1px;
  color: var(--dim);
  transition: color .3s;
  white-space: nowrap;
}
.gen-node.revealed .gen-name { color: var(--muted); }
.gen-node.active .gen-name { color: var(--text); }

.gen-info {
  position: relative;
  min-height: 300px;
  display: flex; align-items: flex-start;
  padding-top: 8px;
  /* If a person's panel is taller than the layout (e.g. Nick Land),
     scroll inside the panel instead of getting clipped by body overflow. */
  max-height: 65vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 12px;
  /* Reserve gutter so the scrollbar appearing/disappearing doesn't reflow text. */
  scrollbar-gutter: stable;
  /* IMPORTANT: do NOT set `scrollbar-width` here — in Chrome 121+ that opts
     this element into the standard scrollbar API and silently disables our
     ::-webkit-scrollbar styling, causing the OS overlay scrollbar to show. */
  /* Firefox: hidden by default, gold while .is-scrolling / on hover. */
  scrollbar-color: transparent transparent;
  transition: scrollbar-color .35s ease;
}
.gen-info.is-scrollable:hover,
.gen-info.is-scrollable.is-scrolling {
  scrollbar-color: var(--gold) transparent;
}
/* WebKit/Blink: classic styled scrollbar (always 8px, transparent → gold). */
.gen-info::-webkit-scrollbar {
  width: 8px;
  background: transparent;
}
.gen-info::-webkit-scrollbar-track {
  background: transparent;
  border: none;
}
.gen-info::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 4px;
  transition: background-color .35s ease;
}
.gen-info.is-scrollable:hover::-webkit-scrollbar-thumb,
.gen-info.is-scrollable.is-scrolling::-webkit-scrollbar-thumb {
  background-color: var(--gold);
}
.gen-info.is-scrollable.is-scrolling::-webkit-scrollbar-thumb {
  box-shadow: 0 0 6px rgba(200, 168, 107, .45);
}
/* Hide the corner if it ever appears */
.gen-info::-webkit-scrollbar-corner { background: transparent; }
.gen-info-inner {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: up .45s ease both;
}
.gen-info-inner.visible {
  display: flex;
}
.gen-info-tag {
  font-family: 'Courier New', monospace;
  font-size: 11px; letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dim);
}
.gen-info-inner h3 {
  font-size: clamp(18px,2.2vw,28px);
  font-weight: 400;
  color: var(--gold);
  line-height: 1.3;
}
.gen-info-inner p {
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 480px;
}
.gen-yarvin-body,
.gen-land-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 480px;
}
.gen-info-inner .gen-yarvin-body p,
.gen-info-inner .gen-land-body p {
  margin: 0;
}
.gen-thiel-lead {
  margin: 0 0 2px;
}
.gen-thiel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 480px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}
.gen-thiel-list li {
  padding-left: 0.1em;
}
.gen-thiel-list li + li {
  margin-top: 2px;
}
.gen-nietzsche-themes {
  margin: 0;
  padding-bottom: 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--dim);
  border-bottom: 1px solid rgba(200, 168, 107, 0.22);
  max-width: 480px;
}
.gen-nietzsche-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 480px;
}
.gen-nietzsche-intro,
.gen-nietzsche-outro {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}
.gen-nietzsche-flip {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 14px 16px;
  margin: 2px 0;
  background: rgba(0, 0, 0, 0.28);
  border-left: 2px solid var(--gold-dim);
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease;
}
.gen-nietzsche-flip:hover,
.gen-nietzsche-flip:focus-visible,
.gen-nietzsche-flip[aria-expanded="true"] {
  background: rgba(0, 0, 0, 0.42);
  border-left-color: var(--gold);
  outline: none;
}
.gen-nietzsche-flip__row {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.gen-nietzsche-flip__hint {
  position: absolute;
  top: 8px;
  right: 12px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--dim);
  opacity: .55;
  transition: opacity .25s ease, color .25s ease;
  pointer-events: none;
}
.gen-nietzsche-flip:hover .gen-nietzsche-flip__hint,
.gen-nietzsche-flip:focus-visible .gen-nietzsche-flip__hint {
  opacity: 1;
  color: var(--gold);
}
.gen-nietzsche-flip[aria-expanded="true"] .gen-nietzsche-flip__hint::before {
  content: '▾ ';
}
.gen-nietzsche-flip:not([aria-expanded="true"]) .gen-nietzsche-flip__hint::before {
  content: '▸ ';
}

/* Resentment-morality cases inside the foldable */
.nietzsche-case {
  padding: 6px 0 8px;
  border-top: 1px dashed rgba(200, 168, 107, 0.18);
}
.nietzsche-case:first-of-type {
  border-top: 0;
  padding-top: 2px;
}
.nietzsche-case-tag {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.enlight-annotation .nietzsche-case p {
  margin: 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}
.nietzsche-case-lede {
  margin-bottom: 10px !important;
}
.nietzsche-case-coda {
  margin-top: 12px !important;
  padding-top: 8px;
  border-top: 1px dashed rgba(200, 168, 107, 0.18);
  font-style: italic;
  color: var(--dim) !important;
}

/* ── MATCHING GAME (Roman ↔ Christian) ── */
.match-game {
  position: relative;
  margin: 6px 0 4px;
  padding: 4px 0;
  user-select: none;
}
.match-cols {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 110px;
  z-index: 2;
}
.match-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.match-col-head {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
  margin-bottom: 6px;
  opacity: .85;
}
.match-item {
  position: relative;
  appearance: none;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(200, 168, 107, 0.16);
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.3;
  letter-spacing: 0.3px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease;
}
.match-item em {
  font-style: italic;
  font-size: 11px;
  color: var(--dim);
  margin-left: 4px;
}
.match-item--left {
  border-radius: 0 18px 18px 0;
  text-align: left;
  border-left: 2px solid var(--gold-dim);
}
.match-item--right {
  border-radius: 18px 0 0 18px;
  text-align: right;
  border-right: 2px solid #5a3030;
}
.match-item:hover:not(.is-locked) {
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  border-color: var(--gold);
}
.match-item--left:hover:not(.is-locked)  { transform: translateX(2px); }
.match-item--right:hover:not(.is-locked) { transform: translateX(-2px); }

.match-item.is-active {
  background: rgba(200, 168, 107, 0.18);
  color: var(--text);
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 0 12px rgba(200, 168, 107, 0.35);
}
.match-item.is-locked {
  cursor: default;
  background: rgba(200, 168, 107, 0.07);
  border-color: var(--gold);
  color: var(--gold);
}
.match-item.is-locked em {
  color: rgba(200, 168, 107, 0.65);
}
.match-item.is-wrong {
  animation: matchShake .42s ease;
  border-color: #c0524a !important;
  background: rgba(192, 82, 74, 0.18) !important;
  color: #f4b8b3 !important;
}
@keyframes matchShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

.match-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}
.match-line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(200, 168, 107, 0.55));
}
.match-line.is-new {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: matchDraw .55s ease forwards;
}
@keyframes matchDraw {
  to { stroke-dashoffset: 0; }
}

.match-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(200, 168, 107, 0.14);
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--dim);
  text-transform: uppercase;
}
.match-status.is-done {
  color: var(--gold);
  letter-spacing: 2.5px;
}
.match-actions {
  display: inline-flex;
  gap: 14px;
}
.match-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--dim);
  cursor: pointer;
  letter-spacing: 2px;
  text-decoration: underline;
  text-decoration-color: rgba(200, 168, 107, 0.25);
  text-underline-offset: 4px;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.match-btn:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* ── PORTAL CTA (inline → fullscreen stage) ── */
.case-portal {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin: 14px 0 6px;
  padding: 14px 18px 14px 16px;
  appearance: none;
  background: linear-gradient(135deg, rgba(200, 168, 107, 0.06) 0%, rgba(0, 0, 0, 0.55) 60%);
  border: 1px solid rgba(200, 168, 107, 0.28);
  border-left: 2px solid var(--gold);
  color: var(--text);
  font-family: inherit;
  font-size: clamp(10px, 1.25vw, 18px);
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.case-portal::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 200% at 0% 50%, rgba(200, 168, 107, 0.10), transparent 55%),
    radial-gradient(120% 200% at 100% 50%, rgba(192, 82, 74, 0.10), transparent 55%);
  opacity: .55;
  pointer-events: none;
  transition: opacity .35s ease;
}
.case-portal:hover,
.case-portal:focus-visible {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(200, 168, 107, 0.12) 0%, rgba(0, 0, 0, 0.6) 60%);
  box-shadow: 0 0 0 1px rgba(200, 168, 107, 0.35), 0 8px 32px rgba(0, 0, 0, 0.45);
  outline: none;
}
.case-portal:hover::before,
.case-portal:focus-visible::before {
  opacity: 1;
}
.case-portal:active { transform: translateY(1px); }

/* One continuous label: grid would otherwise treat each text run + span as separate cells. */
.case-portal-main {
  grid-column: 1 / -1;
  min-width: 0;
}

.case-portal-grid {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: lowercase;
  color: var(--dim);
}
.case-portal-col {
  display: inline-block;
  min-width: 56px;
  padding: 4px 10px;
  border: 1px dashed rgba(200, 168, 107, 0.35);
  color: var(--gold);
  text-align: center;
}
.case-portal-col--right {
  border-style: dashed;
  border-color: rgba(192, 82, 74, 0.45);
  color: #e6a8a3;
}
.case-portal-arrow {
  color: var(--gold);
  letter-spacing: 0;
}

.case-portal-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.case-portal-eyebrow {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
}
.case-portal-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text);
}
.case-portal-sub {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.case-portal-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding-left: 14px;
  border-left: 1px dashed rgba(200, 168, 107, 0.25);
  color: var(--gold);
  font-family: 'Courier New', monospace;
}
.case-portal-cta-label {
  font-size: 10px;
  letter-spacing: 3px;
}
.case-portal-cta-arrow {
  font-size: 22px;
  line-height: 1;
  transform: translateX(0);
  transition: transform .25s ease;
}
.case-portal:hover .case-portal-cta-arrow,
.case-portal:focus-visible .case-portal-cta-arrow {
  transform: translate(3px, -3px);
}

/* ── FULLSCREEN STAGE OVERLAY ── */
.case-stage {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.case-stage[hidden] { display: none !important; }

.case-stage-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 50% 50%, rgba(20, 12, 4, 0.78), rgba(0, 0, 0, 0.94));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity .35s ease;
  cursor: zoom-out;
}

.case-stage-panel {
  position: relative;
  width: min(1180px, 94vw);
  height: min(86vh, 820px);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(180deg, rgba(18, 14, 10, 0.96) 0%, rgba(8, 6, 4, 0.98) 100%);
  border: 1px solid rgba(200, 168, 107, 0.28);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 40px 120px rgba(0, 0, 0, 0.7),
    inset 0 0 80px rgba(200, 168, 107, 0.05);
  /* The cinematic open: clip-path expands from the click origin (set by JS) */
  --origin-x: 50%;
  --origin-y: 50%;
  clip-path: circle(0% at var(--origin-x) var(--origin-y));
  opacity: 0;
  transition:
    clip-path .65s cubic-bezier(.68, .05, .22, 1),
    opacity .25s ease .05s;
  pointer-events: none;
}

.case-stage.is-open { pointer-events: auto; }
.case-stage.is-open .case-stage-backdrop { opacity: 1; }
.case-stage.is-open .case-stage-panel {
  clip-path: circle(160% at var(--origin-x) var(--origin-y));
  opacity: 1;
  pointer-events: auto;
}

/* corner glyphs (cinematic frame) */
.case-stage-panel::before,
.case-stage-panel::after {
  content: '';
  position: absolute;
  width: 28px; height: 28px;
  border: 1px solid var(--gold);
  opacity: .6;
  pointer-events: none;
}
.case-stage-panel::before {
  top: 10px; left: 10px;
  border-right: 0; border-bottom: 0;
}
.case-stage-panel::after {
  bottom: 10px; right: 10px;
  border-left: 0; border-top: 0;
}

.case-stage-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  appearance: none;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(200, 168, 107, 0.25);
  color: var(--dim);
  font-family: 'Courier New', monospace;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.case-stage-close-label {
  font-size: 9px;
  letter-spacing: 2.5px;
}
.case-stage-close:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(200, 168, 107, 0.10);
}

.case-stage-head {
  padding: 36px 42px 14px;
  border-bottom: 1px dashed rgba(200, 168, 107, 0.18);
  text-align: center;
}
.case-stage-tag {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
  margin-bottom: 10px;
}
.case-stage-title {
  margin: 0 0 8px;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text);
}
.case-stage-sub {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.case-stage-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 36px 18px;
  min-height: 0;
  overflow: hidden;
}
@media (max-width: 900px) {
  .case-stage-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* Match game inside the stage */
.match-game--stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: 8px 4px;
  border-right: 1px dashed rgba(200, 168, 107, 0.14);
  padding-right: 24px;
}
@media (max-width: 900px) {
  .match-game--stage {
    border-right: 0;
    padding-right: 4px;
  }
}
.match-game--stage .match-cols {
  column-gap: clamp(70px, 9vw, 130px);
}
.match-game--stage .match-item {
  font-size: 13.5px;
  padding: 9px 14px;
}
.match-game--stage .match-foot {
  margin-top: 16px;
  padding-top: 10px;
  font-size: 10.5px;
}

/* Bible-verse scroll panel */
.case-verses {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.case-verses-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(200, 168, 107, 0.18);
}
.case-verses-eyebrow {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
}
.case-verses-counter {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold);
}
.case-verses-counter-sep { color: var(--dim); margin: 0 2px; }

.case-verses-list {
  list-style: none;
  margin: 0;
  padding: 4px 12px 8px 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  flex: 1;
  min-height: 0;
}
.case-verses-list::-webkit-scrollbar { width: 6px; }
.case-verses-list::-webkit-scrollbar-track { background: transparent; }
.case-verses-list::-webkit-scrollbar-thumb {
  background: rgba(200, 168, 107, 0.20);
  border-radius: 3px;
}

.case-verse {
  position: relative;
  padding: 10px 0 10px 18px;
  border-bottom: 1px dashed rgba(200, 168, 107, 0.10);
  opacity: .25;
  filter: blur(2px);
  transform: translateY(6px);
  transition: opacity .5s ease, filter .5s ease, transform .5s ease;
}
.case-verse::before {
  content: '·';
  position: absolute;
  left: 4px; top: 12px;
  color: var(--dim);
  font-size: 16px;
  line-height: 1;
}
.case-verse.is-revealed {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  animation: verseFlash .9s ease;
}
.case-verse.is-revealed::before {
  content: '✦';
  color: var(--gold);
  font-size: 11px;
  top: 14px;
}
@keyframes verseFlash {
  0%   { background: rgba(200, 168, 107, 0); box-shadow: inset 2px 0 0 rgba(200, 168, 107, 0); }
  35%  { background: rgba(200, 168, 107, 0.10); box-shadow: inset 2px 0 0 rgba(200, 168, 107, 0.7); }
  100% { background: rgba(200, 168, 107, 0); box-shadow: inset 2px 0 0 rgba(200, 168, 107, 0.25); }
}
.case-verse-pair {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--dim);
  margin-bottom: 4px;
}
.case-verse.is-revealed .case-verse-pair { color: var(--muted); }
.case-verse-pair em {
  font-style: italic;
  color: var(--gold);
  margin: 0 2px;
  font-size: 10.5px;
}
.case-verse-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  font-style: normal;
  letter-spacing: 0.3px;
}
.case-verse-cite {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-family: 'Courier New', monospace;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: var(--gold);
  opacity: .8;
}

.case-stage-foot {
  padding: 14px 42px 26px;
  border-top: 1px dashed rgba(200, 168, 107, 0.18);
  text-align: center;
  min-height: 56px;
}
.case-stage-coda {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  font-style: italic;
  color: var(--dim);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .8s ease, transform .8s ease, color .8s ease;
}
.case-stage-coda.is-revealed {
  opacity: 1;
  transform: translateY(0);
  color: var(--muted);
}

/* Lock the underlying slide while the stage is open */
body.case-stage-open .gen-info { overflow: hidden; }

.gen-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 2px;
}
.gen-next-arrow {
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 50;
  margin: 0;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--gold);
  font-family: system-ui, 'Segoe UI', sans-serif;
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, filter .2s ease;
}
#slide-genealogy.is-complete .gen-next-arrow {
  opacity: 1;
  pointer-events: auto;
}
.gen-next-arrow:hover {
  filter: brightness(1.2);
}

/* ── PHONE MOCKUP SLIDE ── */
.phone-slide {
  padding: 32px 40px;
  gap: 0;
}
#slide-phone-feed {
  background: radial-gradient(circle at 50% 42%, #2f2f2f 0%, #222222 38%, #171717 64%, #0a0a0a 100%);
}
.phone-caption {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 18px;
}
.phone-caption .gold { color: var(--gold); }

.phone-mock {
  position: relative;
  height: min(68vh, calc(100vw * 0.38));
  aspect-ratio: 9 / 19.5;
  background: #050505;
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 0 0 2px #1a1a1a,
    0 0 0 3px #bbbbbb,
    0 30px 80px -10px rgba(0,0,0,.9),
    0 10px 30px rgba(200,168,107,.06);
  transform-origin: 50% 50%;
  animation: phone-pickup 1.1s cubic-bezier(.22,.9,.28,1) both;
  cursor: pointer;
  transition: height .55s cubic-bezier(.22,.9,.28,1),
              transform .55s cubic-bezier(.22,.9,.28,1),
              box-shadow .55s ease;
}
@keyframes phone-pickup {
  0%   { opacity: 0; transform: translateY(60%) rotate(-14deg) scale(.9); filter: blur(4px); }
  55%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); filter: blur(0); }
}
.slide:not(.active) .phone-mock { animation: none; }

.phone-mock.is-zoomed {
  aspect-ratio: 9 / 16;
  height: calc(100vh - 56px);
  max-width: 92vw;
  padding: 14px;
  border-radius: 52px;
  box-shadow:
    0 0 0 2px #1a1a1a,
    0 0 0 3px #2a2a2a,
    0 40px 120px -10px rgba(0,0,0,1),
    0 0 90px rgba(200,168,107,.22);
}
.phone-mock.is-zoomed .phone-screen { border-radius: 40px; }

.phone-slide.has-zoomed {
  padding: 0 0 56px 0;
}
.phone-slide.has-zoomed .phone-caption,
.phone-slide.has-zoomed .phone-hint {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.phone-slide.has-zoomed .phone-caption { top: 24px; }
.phone-slide.has-zoomed .phone-hint    { bottom: 24px; }

.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: #000;
}
.phone-screen video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 26px;
  background: #000;
  border-radius: 20px;
  z-index: 3;
  pointer-events: none;
}
.phone-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 4;
  pointer-events: none;
  transition: opacity .35s ease, backdrop-filter .35s ease;
}
.phone-play::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 80%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity .35s ease;
}
.phone-play-btn {
  position: relative;
  width: 78px; height: 78px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  border: 1px solid rgba(200,168,107,.55);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px rgba(200,168,107,.08), 0 0 30px rgba(200,168,107,.25);
  animation: phone-pulse 2s ease-in-out infinite;
}
.phone-play-btn::after {
  content: '';
  width: 0; height: 0;
  border-left: 22px solid var(--gold);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 6px;
}
@keyframes phone-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(200,168,107,.35), 0 0 30px rgba(200,168,107,.25); }
  50%     { box-shadow: 0 0 0 14px rgba(200,168,107,0),  0 0 40px rgba(200,168,107,.4); }
}
.phone-mock.is-playing .phone-play { opacity: 0; }

.phone-pause-ind {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 4; pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.phone-pause-ind::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.phone-pause-ind .bars {
  position: relative;
  display: flex; gap: 10px;
}
.phone-pause-ind .bars span {
  display: block;
  width: 10px; height: 44px;
  background: var(--gold);
  border-radius: 2px;
}
.phone-mock.is-paused .phone-pause-ind { opacity: 1; }
.phone-mock.is-paused.is-playing .phone-play { opacity: 0; }
.phone-mock:not(.is-playing) .phone-pause-ind { opacity: 0; }

.phone-progress {
  position: absolute;
  left: 16px; right: 16px; bottom: 14px;
  height: 14px;
  z-index: 6;
  cursor: pointer;
  opacity: 0;
  transition: opacity .3s ease;
  display: flex; align-items: center;
  touch-action: none;
}
.phone-mock.is-playing .phone-progress,
.phone-mock.is-paused  .phone-progress { opacity: 1; }

.phone-progress-track {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,.18);
  border-radius: 2px;
  overflow: visible;
  transition: height .15s ease;
}
.phone-progress:hover .phone-progress-track,
.phone-progress.is-scrubbing .phone-progress-track { height: 5px; }

.phone-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
  pointer-events: none;
}
.phone-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px; height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(200,168,107,.5);
  transform: translateY(-50%) scale(0);
  transition: transform .15s ease;
  pointer-events: none;
}
.phone-progress:hover .phone-progress-thumb,
.phone-progress.is-scrubbing .phone-progress-thumb { transform: translateY(-50%) scale(1); }

.phone-hint {
  margin-top: 18px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: #2e2e2e;
  text-transform: uppercase;
  transition: color .3s ease;
}
.phone-slide.has-zoomed .phone-hint { color: var(--gold); opacity: .6; }

/* ── SPLIT (PHONE + MACBOOK) SLIDE ── */
.phone-split .phone-split-wrap {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(0, 1.6fr);
  gap: 56px;
  width: 100%;
  max-width: 1280px;
  align-items: center;
}
.phone-split .phone-split-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.phone-split .phone-mock {
  height: min(58vh, 32vw);
}
.phone-split .phone-mock.is-zoomed {
  height: calc(100vh - 56px);
}
.phone-split .phone-caption { margin-bottom: 14px; }
.phone-split .phone-hint    { margin-top: 14px; }

.phone-split .phone-split-right {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

/* when the phone is zoomed, hide the macbook and center the phone */
.phone-slide.has-zoomed.phone-split .phone-split-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone-slide.has-zoomed.phone-split .phone-split-right { display: none; }

/* ── MACBOOK MOCKUP ── */
.macbook {
  position: relative;
  width: 100%;
  max-width: 640px;
  filter: drop-shadow(0 40px 60px rgba(0,0,0,.7));
  animation: mb-open 1.1s cubic-bezier(.22,.9,.28,1) both;
  animation-delay: .2s;
  transform-origin: 50% 100%;
}
.slide:not(.active) .macbook { animation: none; }
@keyframes mb-open {
  0%   { opacity: 0; transform: perspective(1400px) rotateX(-60deg) translateY(10%); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: perspective(1400px) rotateX(0) translateY(0); }
}

.mb-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0a0a0a;
  border-radius: 12px 12px 4px 4px;
  padding: 12px;
  box-shadow:
    inset 0 0 0 1px #222,
    inset 0 0 0 2px #0a0a0a;
}
.mb-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 16%; height: 9px;
  background: #000;
  border-radius: 0 0 7px 7px;
  z-index: 2;
}
.mb-content {
  width: 100%; height: 100%;
  background: radial-gradient(circle at 30% 20%, #121212, #050505 70%);
  border-radius: 3px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  position: relative;
  overflow: hidden;
}
.mb-content::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(200,168,107,.04) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(200,168,107,.04) 0 1px, transparent 1px 40px);
  pointer-events: none;
}
.feed-tile {
  position: relative;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(200,168,107,.18);
  box-shadow: 0 4px 16px rgba(0,0,0,.6);
  animation: feed-pop .55s cubic-bezier(.22,.9,.28,1) both;
  cursor: zoom-in;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.feed-tile:hover {
  transform: translateY(-2px) scale(1.015);
  border-color: rgba(200,168,107,.55);
  box-shadow: 0 8px 24px rgba(0,0,0,.75), 0 0 0 1px rgba(200,168,107,.25);
}
.feed-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ── FEED IMAGE LIGHTBOX ── */
.feed-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity .3s ease;
  cursor: zoom-out;
  padding: 56px 48px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.feed-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.feed-lightbox::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg,  rgba(200,168,107,.035) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(200,168,107,.035) 0 1px, transparent 1px 48px);
  pointer-events: none;
}
/* enlarged macbook stage inside the lightbox */
.feed-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  /* keep the laptop fully in view: width must respect viewport height too */
  max-width: min(1400px, 94vw, calc((100vh - 120px) * 1.58));
  max-height: calc(100vh - 120px);
}
.feed-lightbox .macbook.macbook-zoomed {
  width: 100%;
  max-width: 100%;
  filter: drop-shadow(0 60px 110px rgba(0,0,0,.85));
  animation: none;
  transform: scale(.45) translateY(40px);
  opacity: 0;
  transform-origin: 50% 60%;
  transition:
    transform .55s cubic-bezier(.22,.9,.28,1),
    opacity  .35s ease;
}
.feed-lightbox.is-open .macbook.macbook-zoomed {
  transform: scale(1) translateY(0);
  opacity: 1;
}
/* single-image layout inside the enlarged macbook screen */
.mb-content.mb-content-single {
  display: flex;
  grid-template-columns: none;
  grid-template-rows: none;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 14px;
}
.mb-content.mb-content-single img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 6px 24px rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .35s ease .15s;
}
.feed-lightbox.is-open .mb-content.mb-content-single img { opacity: 1; }
.mb-content.mb-content-single .feed-label {
  position: absolute;
  top: 12px; left: 14px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  background: rgba(0,0,0,.78);
  padding: 5px 12px;
  border-radius: 2px;
  text-transform: uppercase;
  z-index: 2;
  border: 1px solid rgba(200,168,107,.45);
}
.feed-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: var(--gold);
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  background: transparent;
  border: 1px solid rgba(200,168,107,.4);
  padding: 8px 14px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background .2s ease, border-color .2s ease;
  z-index: 2;
}
.feed-lightbox-close:hover {
  background: rgba(200,168,107,.12);
  border-color: rgba(200,168,107,.8);
}
.feed-lightbox-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: #555;
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
}
.feed-lightbox-counter {
  position: absolute;
  top: 24px;
  left: 28px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  opacity: .7;
  pointer-events: none;
}
.feed-lightbox,
.feed-lightbox .macbook.macbook-zoomed,
.feed-lightbox-close { cursor: pointer; }
.feed-tile .feed-label {
  position: absolute;
  top: 6px; left: 6px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(0,0,0,.7);
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  z-index: 2;
  border: 1px solid rgba(200,168,107,.35);
}
@keyframes feed-pop {
  0%   { opacity: 0; transform: translateY(14px) scale(.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.slide.active .feed-tile:nth-child(1) { animation-delay: .9s; }
.slide.active .feed-tile:nth-child(2) { animation-delay: 1.1s; }
.slide.active .feed-tile:nth-child(3) { animation-delay: 1.3s; }
.slide.active .feed-tile:nth-child(4) { animation-delay: 1.5s; }
.slide:not(.active) .feed-tile { animation: none; opacity: 0; }

.mb-base {
  position: relative;
  width: 112%;
  height: 14px;
  margin: 0 -6% 0;
  background: linear-gradient(180deg, #d6d6d6 0%, #9c9c9c 45%, #5a5a5a 90%, #333 100%);
  border-radius: 0 0 14px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -1px 0 rgba(0,0,0,.4),
    0 4px 12px rgba(0,0,0,.5);
}
.mb-base::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 12%;
  height: 5px;
  background: #1a1a1a;
  border-radius: 0 0 6px 6px;
}

/* ── FOUR BOOKS · accordion (scoped to #slide-fourbooks) ── */
#slide-fourbooks {
  padding-left: clamp(20px,4vw,48px);
  padding-right: clamp(20px,4vw,48px);
}
.bk-list { width: 100%; max-width: min(1080px,100%); }

.bk-row {
  border-bottom: 1px solid #111;
  cursor: pointer;
  user-select: none;
}
.bk-row:first-child { border-top: 1px solid #111; }
.bk-row.bk-open .bk-header { border-left: 2px solid var(--gold); padding-left: 14px; }

.bk-header {
  display: grid;
  grid-template-columns: 60px minmax(0,1fr) 190px 16px;
  align-items: baseline;
  column-gap: 18px;
  padding: 14px 4px 14px 16px;
  transition: border .25s;
}
.bk-year  { font-family: 'Courier New',monospace; font-size: 13px; color: var(--gold-dim); letter-spacing: 2px; width: 60px; flex-shrink: 0; }
.bk-title { font-size: 21px; color: #ccc; }
.bk-author{
  font-family: 'Courier New',monospace;
  font-size: 13px;
  color: #b8b8b8;
  letter-spacing: 1px;
  width: 190px;
  text-align: right;
  justify-self: end;
}
.bk-chevron{
  font-family: 'Courier New',monospace; font-size: 11px; color: #333;
  transition: transform .3s ease; justify-self: end;
}
.bk-row.bk-open .bk-chevron { transform: rotate(90deg); color: var(--gold); }

/* smooth height animation via grid */
.bk-body-wrap {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .35s ease;
  overflow: hidden;
}
.bk-row.bk-open .bk-body-wrap { grid-template-rows: 1fr; }
.bk-body-inner { min-height: 0; overflow: hidden; }

.bk-body {
  display: grid; grid-template-columns: 1fr 180px;
  gap: 24px; padding: 0 16px 18px 16px;
  align-items: start;
}
.bk-text { font-size: 17px; color: #777; line-height: 1.85; }
.bk-text p + p { margin-top: 9px; }
.bk-note  { font-size: 15px; color: #3a3a3a; font-family: 'Courier New',monospace; letter-spacing: .5px; margin-top: 10px; line-height: 1.7; }

.bk-img-wrap {
  width: 180px; height: 210px;
  background: #090909; border: 1px solid #181818;
  overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bk-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: grayscale(.4) brightness(.8);
  display: block;
}
.bk-img-wrap .bk-ph {
  font-family: 'Courier New',monospace; font-size: 10px;
  color: #252525; text-align: center; letter-spacing: 2px; padding: 8px;
}
.bk-cap {
  font-family: 'Courier New',monospace; font-size: 9px;
  color: #2a2a2a; letter-spacing: .5px; margin-top: 5px;
  line-height: 1.4; text-align: center;
}

/* 四部书：大图封面栏（不溢出 bk-body-wrap） */
.bk-body--cover {
  grid-template-columns: minmax(0,1fr) auto;
  gap: 28px;
  padding: 0 0 18px 16px;
}
.bk-body--cover > div:last-child {
  justify-self: end;
  margin-left: 8px;
}
.bk-body--cover .bk-img-wrap {
  width: 232px;
  height: 320px;
}
.bk-body--cover .bk-cap { max-width: 232px; margin-right: 0; }

/* Keep long book notes inside the viewport and scroll internally. */
.bk-body--cover .bk-text {
  max-height: clamp(220px, 56vh, 520px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}
.bk-body--cover .bk-text::-webkit-scrollbar {
  width: 0;
  height: 0;
}
