/* 高佣联盟新手教程（旺仔整理）
   Design tokens first, then layout, then components.
   Light + dark via prefers-color-scheme. */

:root {
  --bg: #f6f3ee;
  --bg-wash: #efe8dc;
  --surface: #ffffff;
  --surface-2: #f3efe8;
  --ink: #1c1915;
  --ink-2: #5e574d;
  --ink-3: #8a8276;
  --line: #e4ddd2;
  --line-strong: #d4cbbd;
  --accent: #b3271e;
  --accent-hover: #951f18;
  --accent-soft: #fbecea;
  --gold: #8a6d1f;
  --gold-soft: #f6efdc;
  --ok: #1e6b3a;
  --ok-soft: #e7f3eb;
  --warn-bg: #fdf4e4;
  --warn-line: #e8c98a;
  --warn-ink: #6d4c0e;
  --video-bg: #1a1714;
  --video-ink: #f5efe6;
  --invite-bg: #241f1a;
  --invite-ink: #f7f1e8;
  --shadow-sm: 0 1px 2px rgba(28, 25, 21, 0.05);
  --shadow: 0 1px 3px rgba(28, 25, 21, 0.06), 0 10px 28px rgba(28, 25, 21, 0.06);
  --font-sans: "Noto Sans SC", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 48px;
  --s-10: 64px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --wrap: 1120px;
  --toc: 232px;
  --bar: 64px;
  --bottom: 72px;
  --focus: #557fbd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161411;
    --bg-wash: #1d1a16;
    --surface: #211e1a;
    --surface-2: #2a2621;
    --ink: #ece7dd;
    --ink-2: #b3ab9d;
    --ink-3: #8d8679;
    --line: #3a352e;
    --line-strong: #4a433a;
    --accent: #e0655c;
    --accent-hover: #ec8179;
    --accent-soft: #3a2321;
    --gold: #d9b45c;
    --gold-soft: #332c1c;
    --ok: #7cc79a;
    --ok-soft: #1e2f24;
    --warn-bg: #2f2716;
    --warn-line: #6b5726;
    --warn-ink: #e8c98a;
    --video-bg: #0f0e0c;
    --video-ink: #f5efe6;
    --invite-bg: #2a2420;
    --invite-ink: #f7f1e8;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.28);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; height: auto; display: block; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button, [role="button"], summary { min-height: 2rem; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25em; }
li + li { margin-top: 6px; }

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 400;
  background: var(--accent);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin: 0 auto;
  padding-bottom: calc(var(--bottom) + 48px);
}

/* ---------- Site bar ---------- */
.sitebar {
  height: var(--bar);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  margin: 0 calc(50% - 50vw);
  padding: 0 max(16px, calc((100vw - var(--wrap)) / 2));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15px;
  flex: none;
}
.brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface);
}
.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
  min-width: 0;
}
.brand-title {
  font-size: 17px;
  font-weight: 800;
}
.brand-sub {
  font-weight: 500;
  color: var(--ink-2);
  font-size: 12px;
  margin-left: 0;
}

.sitebar nav {
  display: none;
  gap: var(--s-6);
}
.sitebar nav a {
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
}
.sitebar nav a:hover { color: var(--ink); }

@media (min-width: 720px) {
  .sitebar nav { display: flex; }
}

/* ---------- Buttons ---------- */
.actions {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  min-height: 48px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--invite-ink);
  border-color: rgba(247, 241, 232, 0.28);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--invite-ink);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* ---------- Invite code (one treatment everywhere) ---------- */
.invite-code {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: 0.08em;
  font-weight: 800;
  font-family: var(--font-sans);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  gap: var(--s-7);
  padding: var(--s-8) 0 var(--s-7);
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: var(--s-4);
}

.hero h1 {
  font-size: clamp(28px, 7vw, 48px);
  font-weight: 900;
  line-height: 1.22;
  margin: 0 0 var(--s-3);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 var(--s-4);
  max-width: 36em;
}
.hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: #7eb8e8;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line);
}
.hero-byline-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.35;
  min-width: 0;
}
.hero-byline-text strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.hero-byline-text span {
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}

.hero-lead {
  font-size: var(--fs-md);
  color: var(--ink-2);
  max-width: 36em;
  margin: 0 0 var(--s-5);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  font-weight: 600;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.invite-card {
  background: var(--invite-bg);
  color: var(--invite-ink);
  border-radius: var(--r-xl);
  padding: var(--s-6);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.invite-card .invite-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #e0c074;
  margin-bottom: var(--s-3);
  text-transform: none;
}
.invite-card .invite-code {
  font-size: clamp(32px, 8vw, 42px);
  line-height: 1.15;
  color: #fff;
  margin-bottom: var(--s-5);
  user-select: all;
}
.invite-card .btn-primary { width: 100%; }
.invite-card p {
  margin: var(--s-4) 0 0;
  font-size: 14px;
  color: rgba(247, 241, 232, 0.78);
  line-height: 1.65;
}
.invite-divider {
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(247, 241, 232, 0.14);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  font-size: 13px;
  color: rgba(247, 241, 232, 0.65);
}
.invite-divider a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.invite-divider a:hover { text-decoration: underline; color: #fff; }

@media (min-width: 880px) {
  .hero {
    grid-template-columns: 1.25fr 0.9fr;
    gap: 56px;
    padding: 56px 0 40px;
  }
  .hero-lead { font-size: 17px; }
}

/* ---------- Start steps ---------- */
.start-section { margin: var(--s-4) 0 var(--s-6); }

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.section-title h2 { font-size: clamp(22px, 4vw, 26px); }
.section-title span {
  font-size: var(--fs-sm);
  color: var(--ink-2);
  font-weight: 600;
  flex: none;
}

.start-grid {
  display: grid;
  gap: var(--s-3);
}
.start-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-5);
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
}
.start-card h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
}
.start-card p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 10px;
}
.start-card a {
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.start-card a:hover { text-decoration: underline; }

.step-badge {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 18px;
}

@media (min-width: 800px) {
  .start-grid { grid-template-columns: repeat(3, 1fr); }
  .start-card { flex-direction: column; }
}

/* ---------- Callouts / notices ---------- */
.notice-strip,
.callout {
  border-radius: var(--r-lg);
  padding: 14px 16px;
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-ink);
  margin: 0 0 var(--s-5);
}
.notice-strip { font-size: 14.5px; line-height: 1.7; }
.callout .t,
.notice-strip strong {
  display: block;
  font-weight: 800;
  margin-bottom: 4px;
  font-size: 14px;
}
.notice-strip strong { display: inline; margin-right: 4px; }
.notice-strip a { color: inherit; font-weight: 800; }

.callout p { margin: 0; font-size: 14.5px; }
.callout.ok {
  background: var(--ok-soft);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--ok-soft));
  color: var(--ok);
}
.callout.info {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--accent-soft));
  color: var(--ink);
}
.callout.info .t { color: var(--accent); }

.hl {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}

.redlist { padding-left: 1.15em; }
.redlist li::marker { color: var(--accent); }
.redlist li { font-weight: 600; }

/* ---------- About (details) ---------- */
.quick {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 4px 4px;
  margin: 0 0 var(--s-6);
}
.quick > summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  border-radius: var(--r-md);
}
.quick > summary::-webkit-details-marker { display: none; }
.quick > summary span {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-2);
}
.quick > summary::after {
  content: "＋";
  color: var(--ink-3);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
}
.quick[open] > summary::after { content: "–"; }
.quick > summary:hover { background: var(--surface-2); }
.quick-body { padding: 4px 16px 18px; }
.quick-body h2 {
  font-size: 20px;
  margin: 0 0 var(--s-3);
}

/* ---------- Layout + TOC ---------- */
.layout {
  display: grid;
  gap: var(--s-5);
}

nav.toc {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 10px;
  box-shadow: var(--shadow-sm);
}
nav.toc p,
.toc-panel > p {
  margin: 2px 10px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
nav.toc a,
.toc-panel a {
  display: flex;
  gap: 8px;
  align-items: baseline;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  line-height: 1.45;
  font-weight: 500;
}
nav.toc a i,
.toc-panel a i {
  font-style: normal;
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--accent);
  font-size: 12px;
  flex: none;
  width: 1.6em;
}
nav.toc a:hover,
.toc-panel a:hover { background: var(--surface-2); color: var(--ink); }
nav.toc a.active {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
}

@media (min-width: 960px) {
  .layout {
    grid-template-columns: var(--toc) 1fr;
    gap: 36px;
    align-items: start;
  }
  nav.toc {
    display: block;
    position: sticky;
    top: calc(var(--bar) + 12px);
  }
}

/* Mobile TOC FAB */
.toc-fab { display: block; }
.toc-fab-btn {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 80;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.toc-panel {
  display: none;
  position: fixed;
  top: 62px;
  right: 14px;
  left: 14px;
  z-index: 80;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 12px;
  max-height: min(70vh, 520px);
  overflow: auto;
}
.toc-panel.open { display: block; }
.toc-panel-grid {
  display: grid;
  gap: 2px;
}

@media (min-width: 960px) {
  .toc-fab { display: none; }
}

/* ---------- Chapters ---------- */
section.chapter,
.faq {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-6) var(--s-5);
  margin: 0 0 var(--s-5);
}

.ch-head {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.ch-no {
  flex: none;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--r-sm);
  min-width: 40px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-top: 3px;
}
.ch-head h2 { font-size: clamp(20px, 3.6vw, 24px); }
.ch-note {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 500;
  line-height: 1.55;
}

section.chapter > p,
.faq > p { font-size: 15.5px; }

/* ---------- Videos (unified player chrome) ---------- */
.vids {
  display: grid;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
@media (min-width: 700px) {
  .vids { grid-template-columns: 1fr 1fr; }
  .vids.one { grid-template-columns: minmax(0, 420px); }
}

.vid-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.vid-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 10px 12px 8px;
}
.vid-no {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: none;
}
.vid-title {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  flex: 1 1 auto;
  margin: 0;
}
.vid-time {
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  margin-left: auto;
}

.vid-facade,
.vid-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 420px;
  background: var(--video-bg);
  border: 0;
  display: block;
}
.vid-card video {
  object-fit: contain;
  height: auto;
}

.vid-facade {
  position: relative;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.vid-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 420px;
}
.vid-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 92%, #000);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.vid-play::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 20px;
  border-style: solid;
  border-width: 12px 0 12px 18px;
  border-color: transparent transparent transparent #fff;
}
.vid-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  color: var(--video-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}
.vid-note {
  font-size: 13px;
  color: var(--ink-3);
  margin: -4px 0 var(--s-5);
}

/* ---------- Figures ---------- */
figure {
  margin: 0 0 var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
figure img {
  width: 100%;
  cursor: zoom-in;
}
figcaption {
  padding: 10px 12px 12px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.fig-row {
  display: grid;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.fig-row figure { margin-bottom: 0; }
@media (min-width: 640px) {
  .fig-row.two { grid-template-columns: 1fr 1fr; }
}
figure.narrow { max-width: 520px; }
figure.mid { max-width: 720px; }

/* ---------- Schedule ---------- */
.schedule {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin: var(--s-4) 0 0;
}
@media (min-width: 600px) {
  .schedule { grid-template-columns: repeat(4, 1fr); }
}
.schedule div {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
  text-align: center;
}
.schedule .t {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 700;
}
.schedule .n {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.3;
}

/* ---------- Steps list ---------- */
ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: var(--s-3);
  margin: 0 0 var(--s-5);
}
ol.steps li {
  counter-increment: step;
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  margin: 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
ol.steps li::before {
  content: counter(step);
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-serif);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 14px;
}

/* ---------- Tables ---------- */
.tbl-wrap {
  overflow-x: auto;
  margin: 0 0 var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 320px;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.6;
}
th {
  background: var(--surface-2);
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
tr:last-child td { border-bottom: 0; }

/* ---------- FAQ ---------- */
.faq h2 {
  font-size: clamp(20px, 3.6vw, 24px);
  margin: 0 0 var(--s-4);
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.faq details:first-of-type { border-top: 0; }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "＋";
  color: var(--ink-3);
  font-weight: 500;
  flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 15px;
}

/* ---------- Footer / bottom bar / toast ---------- */
.site-footer {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.7;
  padding: 8px 4px 16px;
}
.site-footer strong { color: var(--ink); font-weight: 700; }
.footer-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--s-4);
}
.footer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
  background: #7eb8e8;
}
.footer-byline p { margin: 0; }
.footer-byline p + p { margin-top: 2px; }

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: var(--bottom);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(28, 25, 21, 0.06);
}
.bottom-code {
  font-size: 12px;
  color: var(--ink-2);
  font-weight: 600;
  line-height: 1.35;
}
.bottom-code .invite-code {
  display: block;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--ink);
  margin-top: 1px;
}
.bottom-bar .actions { flex-wrap: nowrap; }
.bottom-bar .btn {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 14px;
}

.toast {
  position: fixed;
  bottom: calc(var(--bottom) + 24px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  max-width: 90vw;
  text-align: center;
  box-shadow: var(--shadow);
}
.toast[hidden] { display: none; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(12, 10, 8, 0.86);
  display: grid;
  place-items: center;
  padding: 24px 16px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(960px, 100%);
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--r-md);
  cursor: default;
}

/* ---------- Reduced motion / mobile tweaks ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .vid-play { transition: none; }
}

@media (max-width: 700px) {
  .hero .actions .btn { flex: 1; }
  .section-title { align-items: flex-start; }
  .section-title span { max-width: 42%; text-align: right; }
  .vid-facade, .vid-facade img, .vid-card video { max-height: 360px; }
  .bottom-code .invite-code { font-size: 16px; }
  .bottom-bar .btn { padding: 8px 12px; }
  .sitebar { padding-right: 96px; } /* room for TOC fab */
}
