/* ============================================================
   thinkread.ai — portrait.css
   「你的阅读肖像 / A Portrait of You as a Reader」
   ONE integrated dark, premium scrollytelling work that fuses
   读你 / 执念图谱 / 阅读疆域 into a single design system.

   The dark "思想的夜空" tokens below are LIFTED from themes.css —
   this is the unified skin for every chapter (hero · clock ·
   persona · constellation · streamgraph · blind spots · ask).
   Layers on base.css; never redefines its tokens.
   ============================================================ */

/* ============================================================
   UNIFIED DARK DESIGN TOKENS (one palette / type scale / easing /
   glass / focus ring for ALL five chapters) — from themes.css
   ============================================================ */
:root {
  --sky-0:   #121419;  /* page ground */
  --sky-1:   #15171c;  /* canvas */
  --sky-2:   #191b21;  /* lit centre */
  --sky-line:    rgba(192,200,216,0.085);
  --sky-line-2:  rgba(192,200,216,0.16);
  --sky-line-3:  rgba(192,200,216,0.26);
  --cream:       #EAE7DE;
  --cream-soft:  #A6ACB8;
  --cream-mute:  #777D89;
  --accent:      #93A8C6;
  --accent-dim:  rgba(147,168,198,0.5);
  --gold:        #C6A86A;  /* the one warm accent (peak hour / share card) */
  --book-fill:   #8B93A3;
  --link-color:  rgba(170,178,192,1);
  --glass:       rgba(23,25,31,0.74);
  --glass-card:  rgba(22,24,30,0.86);
  --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:      160ms;
  --t-base:      220ms;
}

/* ---- the premium dark surface: soft top glow + edge vignette + grain ---- */
body {
  background:
    radial-gradient(120% 100% at 50% 0%, #181a20 0%, var(--sky-0) 52%, #0f1116 100%);
  background-attachment: fixed;
  color: var(--cream);
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025;
  mix-blend-mode: overlay;
}
#main, .site-header, .pt-rail { position: relative; z-index: 1; }
::selection { background: rgba(147,168,198,0.30); color: var(--cream); }

[lang="zh"] { font-family: var(--font-cjk-serif); }
[lang="zh"] .kicker,
[lang="zh"] .rd-badge,
[lang="zh"] .local-toggle__label,
[lang="zh"] .nav-link,
[lang="zh"] .th-ctrl,
[lang="zh"] .th-legend,
[lang="zh"] .th-tip,
[lang="zh"] .pt-ask__input,
[lang="zh"] .pt-hero__stats,
[lang="zh"] .pt-fingerprint__hint { font-family: var(--font-cjk-sans); }
[lang="zh"] h1, [lang="zh"] h2, [lang="zh"] h3 {
  font-family: var(--font-cjk-serif); letter-spacing: 0.01em; line-height: 1.18; font-weight: 700;
}
[lang="zh"] p, [lang="zh"] li { line-height: 1.75; }

/* ============================================================
   HEADER (quiet dark glass) — from themes.css
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(19,21,25,0.82);
  backdrop-filter: saturate(1.05) blur(10px);
  -webkit-backdrop-filter: saturate(1.05) blur(10px);
  border-bottom: 1px solid var(--sky-line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.7rem 0; min-height: 56px;
}
.wordmark__text { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--cream); }
.wordmark__text .hl { color: var(--accent); -webkit-text-fill-color: var(--accent); background: none; }
.wordmark__tld { color: var(--cream-mute); }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.nav-link { font-family: var(--font-ui); font-size: 0.92rem; letter-spacing: -0.005em; color: var(--cream-soft); transition: color var(--t-fast) var(--ease-soft); }
.nav-link:hover { color: var(--cream); }
.nav-link:focus-visible, .local-toggle:focus-visible, .wordmark:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px;
}

.local-toggle { display: inline-flex; align-items: center; gap: 0.5em; font-size: 0.82rem; color: var(--cream-soft); }
.local-toggle__track {
  width: 34px; height: 20px; border-radius: 999px;
  background: rgba(170,186,230,0.22); position: relative;
  transition: background 0.18s var(--ease-soft); flex: none;
}
.local-toggle__thumb {
  position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--cream);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: transform 0.18s var(--ease-soft);
}
.local-toggle[aria-checked="true"] .local-toggle__track { background: var(--accent); }
.local-toggle[aria-checked="true"] .local-toggle__thumb { transform: translateX(14px); }
.local-toggle__label { white-space: nowrap; }
@media (max-width: 560px) { .local-toggle__label { display: none; } }

.rd-badge { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--cream-soft); border: 1px solid var(--sky-line-2); border-radius: 3px; padding: 0.16em 0.55em; white-space: nowrap; }
.rd-badge--real { color: var(--accent); border-color: var(--accent-dim); }
@media (max-width: 420px) { .rd-badge { display: none; } }

/* ============================================================
   SLIM CHAPTER-PROGRESS RAIL (tasteful, right edge)
   ============================================================ */
.pt-rail {
  position: fixed; right: clamp(0.7rem, 1.6vw, 1.4rem); top: 50%;
  transform: translateY(-50%); z-index: 35;
}
.pt-rail__list { display: flex; flex-direction: column; gap: 0.85rem; margin: 0; padding: 0; }
.pt-rail__dot { display: block; padding: 4px; }
.pt-rail__dot span {
  display: block; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(166,172,184,0.28);
  transition: background var(--t-base) var(--ease-soft), transform var(--t-base) var(--ease-soft),
              box-shadow var(--t-base) var(--ease-soft);
}
.pt-rail__dot:hover span { background: var(--cream-soft); transform: scale(1.25); }
.pt-rail__dot.is-active span {
  background: var(--accent); transform: scale(1.4);
  box-shadow: 0 0 0 4px rgba(147,168,198,0.16);
}
.pt-rail__dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 50%; }
@media (max-width: 900px) { .pt-rail { display: none; } }

/* ============================================================
   CHAPTER SCAFFOLDING + reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.pt-chapter { padding: clamp(3.4rem, 9vh, 6.5rem) 0; position: relative; }
.pt-chapter + .pt-chapter { border-top: 1px solid var(--sky-line); }
.pt-chapter__head { max-width: 56rem; margin-bottom: clamp(2rem, 5vh, 3rem); }
.pt-chapter__kicker { color: var(--accent); letter-spacing: 0.2em; margin-bottom: 0.8rem; }
.pt-chapter__title {
  font-family: var(--font-cjk-serif); font-weight: 700;
  font-size: clamp(1.7rem, 4.4vw, 3rem); line-height: 1.25; color: var(--cream);
  max-width: 22ch;
}
.pt-chapter__sub {
  font-family: var(--font-cjk-sans); font-size: 0.98rem; color: var(--cream-soft);
  margin-top: 1.1rem; max-width: 46ch; line-height: 1.8;
}
.pt-chapter__insight {
  font-family: var(--font-cjk-serif); font-size: 1.05rem; color: var(--accent);
  margin-top: 1.2rem; max-width: 50ch; line-height: 1.75;
  border-left: 2px solid var(--accent-dim); padding-left: 1rem;
}
.pt-chapter__insight:empty { display: none; }

/* ============================================================
   TITLE
   ============================================================ */
.pt-title { padding: clamp(4rem, 13vh, 8rem) 0 clamp(1rem, 3vh, 2rem); }
.pt-title__kicker { color: var(--accent); letter-spacing: 0.26em; margin-bottom: 1.4rem; }
.pt-title__h {
  font-family: var(--font-cjk-serif); font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 5.5rem); line-height: 1.08; letter-spacing: 0.01em;
  color: var(--cream);
}
.pt-title__sub {
  font-family: var(--font-cjk-serif); font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--cream-soft); margin-top: 1.5rem; max-width: 38ch; line-height: 1.7;
}

/* ============================================================
   CH.1 · HERO (count-up) — ported from reading.js, dark recolor
   ============================================================ */
.pt-hero { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.pt-hero__lead { line-height: 0.9; }
.pt-hero__num {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3.4rem, 17vw, 9rem); line-height: 0.9;
  letter-spacing: -0.04em; color: var(--cream);
  font-variant-numeric: tabular-nums; display: inline-block;
}
.pt-hero__unit { font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--cream-soft); margin-left: 0.2em; }
.pt-hero__human { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--cream-soft); margin-top: 0.8rem; }
.pt-hero__human .hl { color: var(--cream); font-weight: 600; background: none; -webkit-text-fill-color: currentColor; box-shadow: inset 0 -0.1em 0 var(--accent-dim); }
.pt-hero__sub { color: var(--cream-mute); font-size: 1rem; margin-top: 0.5rem; }
.pt-hero__stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem; max-width: 40rem; margin-top: 2rem;
  border-top: 1px solid var(--sky-line); padding-top: 1.4rem;
}
.rd-stat__value {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(1.2rem, 3.4vw, 1.9rem);
  color: var(--cream); font-variant-numeric: tabular-nums; line-height: 1;
}
.rd-stat__label { font-family: var(--font-cjk-sans); font-size: 0.78rem; color: var(--cream-mute); margin-top: 0.35rem; }
@media (max-width: 480px) { .pt-hero__stats { grid-template-columns: repeat(2, 1fr); gap: 1.1rem 0.6rem; } }

/* ---- clock + persona side by side ---- */
.pt-who-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3rem); align-items: center;
}
@media (max-width: 820px) { .pt-who-grid { grid-template-columns: 1fr; gap: 2.4rem; } }

/* ---- CH.1 clock (radial 24h) — ported, dark recolor ---- */
.pt-clock__stage { display: flex; justify-content: center; }
.pt-clock-svg { width: min(100%, 440px); height: auto; overflow: visible; }
.pt-clock-svg .ck-bar { opacity: 0.5; transition: opacity 0.3s var(--ease-soft); }
.pt-clock-svg .ck-bar--peak { opacity: 1; }
.pt-clock-svg .ck-ring { fill: none; stroke: var(--sky-line-2); stroke-width: 1; }
.pt-clock-svg .ck-tick { fill: var(--cream-mute); font-family: var(--font-mono); font-size: 11px; }
.pt-clock-svg .ck-tick--peak { fill: var(--gold); font-weight: 700; }
.pt-clock-svg .ck-center-num {
  fill: var(--gold); font-family: var(--font-display); font-weight: 900; font-size: 44px;
  text-anchor: middle; font-variant-numeric: tabular-nums;
}
.pt-clock-svg .ck-center-lbl { fill: var(--cream-mute); font-family: var(--font-cjk-sans); font-size: 13px; text-anchor: middle; }
.pt-clock__line {
  font-family: var(--font-cjk-serif); font-size: 0.98rem; line-height: 1.75;
  color: var(--cream-soft); margin-top: 1.2rem; text-align: center; max-width: 40ch; margin-inline: auto;
}

/* ---- CH.1 persona card (dark glass) ---- */
.pt-persona__card {
  position: relative; overflow: hidden;
  background: var(--glass-card);
  border: 1px solid var(--sky-line-2); border-radius: 14px;
  padding: clamp(1.6rem, 4vw, 2.4rem); min-height: 200px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.04);
}
.pt-persona__card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}
.pt-persona__loading { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.pt-persona__eyebrow { font-family: var(--font-cjk-sans); font-size: 0.78rem; letter-spacing: 0.16em; color: var(--cream-mute); }
.pt-persona__pending { font-family: var(--font-cjk-sans); font-size: 0.92rem; color: var(--cream-soft); line-height: 1.7; }
.pt-persona__name {
  font-family: var(--font-cjk-serif); font-weight: 700; font-size: clamp(1.6rem, 4.6vw, 2.4rem);
  line-height: 1.25; color: var(--cream); margin-bottom: 0.9rem;
}
.pt-persona__name .hl { color: var(--gold); background: none; -webkit-text-fill-color: var(--gold); box-shadow: inset 0 -0.12em 0 rgba(198,168,106,0.3); }
.pt-persona__text { font-family: var(--font-cjk-serif); font-size: 1.06rem; line-height: 1.85; color: var(--cream-soft); }
.pt-persona__note { font-family: var(--font-cjk-sans); font-size: 0.82rem; color: var(--cream-mute); margin-top: 0.9rem; }

/* ============================================================
   CH.2 · CONSTELLATION — ALL graph styling ported from themes.css
   (the th-* classes below are the proven Obsidian-grade graph)
   ============================================================ */
.pt-graph-frame { width: min(100% - 1.6rem, 1320px); margin-inline: auto; position: relative; }

.th-stage {
  position: relative; border-radius: 16px; overflow: hidden;
  background: radial-gradient(135% 130% at 50% 42%, var(--sky-2) 0%, var(--sky-1) 58%, #101217 100%);
  border: 1px solid var(--sky-line);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.014),
    inset 0 1px 0 0 rgba(255,255,255,0.03),
    0 1px 2px rgba(0,0,0,0.3);
  width: 100%; aspect-ratio: 16 / 9; min-height: 520px; max-height: 78vh;
  touch-action: none;
}
.th-stage::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: inherit; box-shadow: inset 0 0 120px 8px rgba(8,9,12,0.5);
}
.th-graph-svg { width: 100%; height: 100%; display: block; position: relative; z-index: 1; cursor: grab; }
.th-graph-svg.is-dragging { cursor: grabbing; }
.th-root { opacity: 1; }
.th-graph-svg.is-ready { animation: th-fade-in 0.45s var(--ease-soft); }
@keyframes th-fade-in { from { opacity: 0.3; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .th-graph-svg.is-ready { animation: none; } .th-root { transition: none; opacity: 1; } }

.th-edge {
  stroke: var(--link-color); stroke-width: 1; fill: none; pointer-events: none;
  stroke-opacity: 0.18;
  transition: stroke-opacity var(--t-base) var(--ease-soft), stroke-width var(--t-base) var(--ease-soft);
  vector-effect: non-scaling-stroke;
}

.th-theme { cursor: pointer; }
.th-theme__circle { stroke: rgba(255,255,255,0.085); stroke-width: 1; vector-effect: non-scaling-stroke; transition: opacity var(--t-base) var(--ease-soft); }
.th-theme__rim { fill: none; stroke: rgba(255,255,255,0.20); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; opacity: 0.5; transition: opacity var(--t-base) var(--ease-soft); }
.th-theme__label {
  font-family: var(--font-ui); font-weight: 500; font-size: 13.5px; letter-spacing: -0.005em;
  fill: #EAE7DE; paint-order: stroke; stroke: rgba(16,18,23,0.85); stroke-width: 2.5px;
  pointer-events: none; text-anchor: middle;
}
[lang] .th-theme__label:lang(zh) { letter-spacing: 0; }

.th-book { cursor: pointer; }
.th-book__circle { stroke: rgba(255,255,255,0.055); stroke-width: 1; vector-effect: non-scaling-stroke; transition: opacity var(--t-base) var(--ease-soft); }
.th-book__rim { fill: none; stroke: rgba(255,255,255,0.14); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; opacity: 0.45; transition: opacity var(--t-base) var(--ease-soft); }
.th-book__label {
  font-family: var(--font-ui); font-weight: 400; font-size: 11px; letter-spacing: -0.005em;
  fill: #969CAA; paint-order: stroke; stroke: rgba(16,18,23,0.8); stroke-width: 2.5px;
  pointer-events: none; text-anchor: middle;
}

.th-graph-svg.th-has-focus .th-node.is-dim { opacity: 0.12; }
.th-graph-svg.th-has-focus .th-edge.is-dim { stroke-opacity: 0.035; }
.th-graph-svg.th-has-focus .th-edge.is-lit { stroke-opacity: 0.62; stroke-width: 1.5; }
.th-graph-svg.th-has-focus .th-node.is-lit .th-book__label,
.th-graph-svg.th-has-focus .th-node.is-lit .th-theme__label { opacity: 1 !important; }
.th-graph-svg.th-has-focus .th-node.is-dim .th-book__label,
.th-graph-svg.th-has-focus .th-node.is-dim .th-theme__label { opacity: 0 !important; }
.th-node.is-focus .th-theme__circle { stroke: currentColor; stroke-width: 1.5; stroke-opacity: 0.95; }
.th-node.is-focus .th-theme__rim { stroke: rgba(255,255,255,0.42); opacity: 1; }
.th-node.is-focus .th-book__circle { stroke: var(--accent); stroke-width: 1.5; stroke-opacity: 0.9; }
.th-node.is-focus .th-book__rim { stroke: rgba(255,255,255,0.34); opacity: 1; }
.th-graph-svg.th-has-focus .th-node.is-lit:not(.is-focus) .th-book__rim,
.th-graph-svg.th-has-focus .th-node.is-lit:not(.is-focus) .th-theme__rim { opacity: 0.85; }
.th-theme:focus-visible, .th-book:focus-visible { outline: none; }
.th-theme:focus-visible .th-theme__circle { stroke: currentColor; stroke-width: 1.75; stroke-opacity: 1; }
.th-book:focus-visible .th-book__circle { stroke: var(--accent); stroke-width: 1.75; stroke-opacity: 1; }
.th-theme:focus-visible .th-theme__rim, .th-book:focus-visible .th-book__rim { opacity: 1; }

/* legend chip */
.th-legend {
  position: absolute; left: 0.9rem; top: 0.9rem; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 0.35rem 0.95rem;
  font-family: var(--font-cjk-sans); font-size: 0.72rem; color: var(--cream-soft);
  background: var(--glass); backdrop-filter: saturate(1.05) blur(10px); -webkit-backdrop-filter: saturate(1.05) blur(10px);
  border: 1px solid var(--sky-line-2); border-radius: 11px;
  padding: 0.5rem 0.8rem; max-width: calc(100% - 1.8rem); box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.th-legend__item { display: inline-flex; align-items: center; gap: 0.45em; white-space: nowrap; }
.th-legend__swatch { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,0.18); }
.th-legend__swatch--theme { background: linear-gradient(180deg, #8AA0C4, #7E94BE); }
.th-legend__swatch--book { width: 8px; height: 8px; background: var(--book-fill); }

/* loading / failure overlay */
.th-stage__overlay[hidden] { display: none !important; }
.th-stage__overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.7rem; text-align: center; padding: 2rem;
  background: rgba(22,24,29,0.9); backdrop-filter: blur(3px);
}
.th-stage__overlay-text { font-family: var(--font-cjk-sans); font-size: 1.02rem; color: var(--cream); letter-spacing: 0.02em; }
.th-stage__overlay-sub { font-family: var(--font-cjk-sans); font-size: 0.82rem; color: var(--cream-soft); max-width: 30ch; }

/* one unified loading language — the three quiet pulsing dots */
.th-spark { display: inline-flex; gap: 11px; align-items: center; margin-bottom: 0.4rem; }
.th-spark span { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: th-constellate 1.6s var(--ease-soft) infinite both; }
.th-spark span:nth-child(2) { animation-delay: 0.25s; }
.th-spark span:nth-child(3) { animation-delay: 0.5s; }
@keyframes th-constellate { 0%, 85%, 100% { opacity: 0.25; transform: scale(0.7); } 40% { opacity: 1; transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .th-spark span { animation: none; opacity: 0.85; } }

/* floating controls */
.th-controls { position: absolute; top: 0.9rem; right: 0.9rem; z-index: 4; display: flex; gap: 0.4rem; }
.th-ctrl {
  font-family: var(--font-cjk-sans); font-size: 0.76rem; letter-spacing: 0.02em; color: var(--cream-soft);
  background: var(--glass); border: 1px solid var(--sky-line-2); border-radius: 999px;
  padding: 0.36em 0.95em; backdrop-filter: saturate(1.05) blur(10px); -webkit-backdrop-filter: saturate(1.05) blur(10px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: border-color var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft);
}
.th-ctrl:hover { border-color: var(--accent-dim); color: var(--cream); background: rgba(28,31,38,0.82); }
.th-ctrl:active { background: rgba(20,22,28,0.9); }
.th-ctrl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* tooltip */
.th-tip {
  position: absolute; z-index: 6; max-width: 264px;
  background: var(--glass-card); color: var(--cream);
  border: 1px solid var(--sky-line-2); border-radius: 11px; padding: 0.72rem 0.88rem;
  box-shadow: 0 14px 38px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: saturate(1.1) blur(12px); -webkit-backdrop-filter: saturate(1.1) blur(12px);
  pointer-events: none; font-size: 0.85rem; line-height: 1.55;
  transform: translate(-50%, calc(-100% - 14px));
}
.th-tip[hidden] { display: none; }
.th-tip__title { font-family: var(--font-cjk-serif); font-weight: 700; font-size: 0.98rem; color: var(--cream); display: flex; align-items: center; gap: 0.45rem; line-height: 1.4; }
.th-tip__dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,0.2); }
.th-tip__blurb { font-family: var(--font-cjk-serif); font-size: 0.85rem; color: var(--cream-soft); margin-top: 0.38rem; line-height: 1.62; }
.th-tip__meta { font-family: var(--font-cjk-sans); font-size: 0.76rem; letter-spacing: 0.01em; color: var(--accent); margin-top: 0.5rem; }

/* focused theme panel (dark glass) */
.th-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(404px, 82%); z-index: 8;
  background: linear-gradient(180deg, rgba(25,27,33,0.94), rgba(21,23,29,0.95));
  border-left: 1px solid var(--sky-line-2); border-radius: 0 16px 16px 0;
  box-shadow: -28px 0 64px rgba(0,0,0,0.42), inset 1px 0 0 rgba(255,255,255,0.03);
  backdrop-filter: saturate(1.08) blur(14px); -webkit-backdrop-filter: saturate(1.08) blur(14px);
  overflow-y: auto; animation: th-panel-in 0.34s var(--ease-soft);
}
.th-panel[hidden] { display: none; }
@keyframes th-panel-in { from { transform: translateX(18px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .th-panel { animation: none; } }
.th-panel__close {
  position: absolute; top: 0.8rem; right: 0.85rem; z-index: 2; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(160,176,210,0.08); color: var(--cream-soft);
  border: 1px solid var(--sky-line-2); font-size: 1.2rem; line-height: 1; display: grid; place-items: center;
  transition: color var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft), background var(--t-fast) var(--ease-soft);
}
.th-panel__close:hover { color: var(--cream); border-color: var(--accent-dim); background: rgba(160,176,210,0.14); }
.th-panel__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.th-panel__body { padding: 1.7rem 1.5rem 2.1rem; }
.th-panel__kicker { font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.th-panel__theme { font-family: var(--font-cjk-serif); font-weight: 700; font-size: 1.46rem; line-height: 1.32; color: var(--cream); display: flex; align-items: center; gap: 0.55rem; }
.th-panel__theme-dot { width: 13px; height: 13px; border-radius: 50%; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,0.22); }
.th-panel__blurb { font-family: var(--font-cjk-serif); font-size: 1rem; line-height: 1.78; color: var(--cream-soft); margin-top: 0.9rem; }
.th-panel__meta { font-family: var(--font-cjk-sans); font-size: 0.8rem; color: var(--cream-mute); margin-top: 0.55rem; }
.th-panel__books { margin-top: 1.35rem; padding-top: 1.15rem; border-top: 1px solid var(--sky-line); }
.th-panel__h { font-family: var(--font-cjk-sans); font-size: 0.76rem; letter-spacing: 0.01em; color: var(--cream-mute); margin-bottom: 0.6rem; }
.th-book-chip {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-family: var(--font-cjk-serif); font-size: 0.85rem; color: var(--cream);
  border: 1px solid var(--sky-line-2); border-radius: 999px; background: rgba(160,176,210,0.05);
  padding: 0.3em 0.72em; margin: 0 0.36rem 0.42rem 0; transition: background var(--t-fast) var(--ease-soft);
}
.th-book-chip__bridge { font-family: var(--font-mono); font-size: 0.62rem; color: #C49079; }
.th-panel__evidence { margin-top: 1.45rem; padding-top: 1.15rem; border-top: 1px solid var(--sky-line); }
.th-evi { position: relative; margin: 0 0 1rem; padding: 0.1rem 0 0.1rem 1rem; border-left: 2px solid var(--accent-dim); }
.th-evi__text { font-family: var(--font-cjk-serif); font-size: 0.95rem; line-height: 1.74; color: var(--cream); }
.th-evi__src { font-family: var(--font-cjk-sans); font-size: 0.73rem; color: var(--cream-mute); margin-top: 0.35rem; }
.th-evi__src::before { content: "— 《"; }
.th-evi__src::after { content: "》"; }
.th-panel__evidence-note { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--cream-mute); line-height: 1.7; }
.th-panel__local-only { font-family: var(--font-cjk-sans); font-size: 0.86rem; color: var(--cream-soft); background: rgba(170,186,230,0.07); border-radius: 10px; padding: 0.9rem 1rem; line-height: 1.7; }

/* ============================================================
   CH.3 · STREAMGRAPH — ported from themes.css
   ============================================================ */
.th-tide-section[hidden] { display: none; }
.th-tide-frame { width: min(100% - 1.6rem, 1100px); margin-inline: auto; }
.th-tide__head { margin-bottom: 1.4rem; }
.th-tide__kicker { color: var(--accent); margin-bottom: 0.7rem; letter-spacing: 0.2em; }
.th-tide__title { font-family: var(--font-cjk-serif); font-weight: 700; font-size: clamp(1.7rem, 4.4vw, 3rem); line-height: 1.3; color: var(--cream); max-width: 22ch; }
.th-tide__sub { font-family: var(--font-cjk-sans); font-size: 0.94rem; color: var(--cream-soft); margin-top: 0.9rem; max-width: 50ch; }
.th-tide__sub b { color: var(--cream); font-weight: 600; font-variant-numeric: tabular-nums; }
.th-tide-stage {
  position: relative; border-radius: 16px; overflow: hidden;
  background: radial-gradient(135% 150% at 50% 100%, var(--sky-2) 0%, var(--sky-1) 58%, #101217 100%);
  border: 1px solid var(--sky-line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.014), inset 0 1px 0 0 rgba(255,255,255,0.03), 0 1px 2px rgba(0,0,0,0.3);
  width: 100%; aspect-ratio: 16 / 7; min-height: 280px;
}
.th-tide-svg { width: 100%; height: 100%; display: block; cursor: crosshair; }
.th-band { stroke: rgba(16,18,23,0.6); stroke-width: 0.6; transition: opacity var(--t-base) var(--ease-soft), filter var(--t-base) var(--ease-soft); cursor: pointer; }
.th-band.is-hot { filter: brightness(1.08); }
.th-band.is-dim { opacity: 0.16; }
.th-tide-axis text { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.02em; fill: var(--cream-mute); }
.th-tide-axis .th-axis-major text { font-size: 12.5px; fill: var(--cream-soft); }
.th-tide-axis line { stroke: var(--sky-line); stroke-width: 1; }
.th-tide-axis .th-tide-axis-base { stroke: var(--sky-line-2) !important; }
.th-tide-guide { stroke: rgba(190,198,214,0.6); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; transition: opacity 0.12s var(--ease-soft); }
.th-tide-guide.is-on { opacity: 0.55; }
.th-tide__readout {
  position: absolute; left: 0.9rem; bottom: 0.9rem; z-index: 3; max-width: 70%;
  background: var(--glass-card); backdrop-filter: saturate(1.1) blur(12px); -webkit-backdrop-filter: saturate(1.1) blur(12px);
  border: 1px solid var(--sky-line-2); border-radius: 11px; padding: 0.55rem 0.82rem;
  font-family: var(--font-cjk-sans); font-size: 0.85rem; color: var(--cream); line-height: 1.5; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.04);
}
.th-tide__readout[hidden] { display: none; }
.th-tide__readout b { font-weight: 600; }
.th-tide__readout .th-tide__readout-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.4em; vertical-align: baseline; }
.th-tide__readout em { font-style: normal; color: var(--accent); font-variant-numeric: tabular-nums; }
.th-tide__caption { font-family: var(--font-cjk-serif); font-size: 1rem; line-height: 1.7; color: var(--cream-soft); margin-top: 1.2rem; max-width: 56ch; }
.th-tide__caption b { color: var(--cream); font-weight: 600; }
.th-tide__caption em { font-style: normal; color: var(--accent); font-variant-numeric: tabular-nums; }
.th-tide-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; list-style: none; margin: 1.1rem 0 0; padding: 0; }
.th-tide-legend__item {
  display: inline-flex; align-items: center; gap: 0.45em; font-family: var(--font-cjk-sans); font-size: 0.82rem; color: var(--cream-soft);
  cursor: pointer; transition: color 0.14s var(--ease-soft), opacity 0.14s var(--ease-soft); background: none; border: none; padding: 0.1em 0; line-height: 1.4;
}
.th-tide-legend__item:hover, .th-tide-legend__item.is-hot { color: var(--cream); }
.th-tide-legend__item.is-dim { opacity: 0.4; }
.th-tide-legend__swatch { width: 11px; height: 11px; border-radius: 3px; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,0.16); }
.th-tide-legend__item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* ============================================================
   CH.4 · BLIND SPOTS — ported intent from atlas.js, as dim cards
   ============================================================ */
.pt-blind__row {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 1rem;
}
.pt-blind-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(20,22,28,0.92), rgba(16,18,23,0.96));
  border: 1px dashed var(--sky-line-2); border-radius: 14px;
  padding: 1.3rem 1.4rem 1.5rem; min-height: 168px;
  display: flex; flex-direction: column; gap: 0.65rem;
  transition: border-color var(--t-base) var(--ease-soft), transform var(--t-base) var(--ease-soft), background var(--t-base) var(--ease-soft);
}
.pt-blind-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 60px 4px rgba(8,9,12,0.55);
}
.pt-blind-card:hover { border-color: var(--accent-dim); transform: translateY(-3px); background: linear-gradient(160deg, rgba(24,27,34,0.94), rgba(18,20,26,0.97)); }
.pt-blind-card__domain { font-family: var(--font-cjk-serif); font-weight: 700; font-size: 1.18rem; color: var(--cream); position: relative; z-index: 1; }
.pt-blind-card__domain::before { content: "○ "; color: var(--cream-mute); }
.pt-blind-card__note { font-family: var(--font-cjk-serif); font-size: 0.92rem; line-height: 1.7; color: var(--cream-soft); position: relative; z-index: 1; flex: 1; }
.pt-blind-card__gate { position: relative; z-index: 1; margin-top: auto; padding-top: 0.7rem; border-top: 1px solid var(--sky-line); }
.pt-blind-card__gate-k { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.pt-blind-card__gate-book { font-family: var(--font-cjk-serif); font-size: 0.96rem; color: var(--cream); margin-top: 0.25rem; }
.pt-blind-card__gate-author { font-family: var(--font-cjk-sans); font-size: 0.76rem; color: var(--cream-mute); margin-top: 0.1rem; }
.pt-blind-card.is-loading .pt-blind-card__gate { opacity: 0.5; }
.pt-blind-card__shimmer {
  height: 0.85rem; width: 70%; border-radius: 4px; margin-top: 0.4rem;
  background: linear-gradient(90deg, rgba(166,172,184,0.06), rgba(166,172,184,0.16), rgba(166,172,184,0.06));
  background-size: 200% 100%; animation: pt-shimmer 1.4s var(--ease-soft) infinite;
}
@keyframes pt-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pt-blind-card__shimmer { animation: none; } }

/* an opened card spans the full row width so its path can breathe */
.pt-blind-card.is-open { grid-column: 1 / -1; border-style: solid; border-color: var(--accent-dim); }

/* the affordance — "为我打开这片大陆 →" */
.pt-blind-card__open {
  position: relative; z-index: 1; margin-top: 0.85rem; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-cjk-sans); font-size: 0.82rem; letter-spacing: 0.01em; color: var(--accent);
  background: rgba(147,168,198,0.07); border: 1px solid var(--accent-dim); border-radius: 999px;
  padding: 0.4em 0.95em; cursor: pointer;
  transition: background var(--t-fast) var(--ease-soft), color var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft);
}
.pt-blind-card__open:hover { background: rgba(147,168,198,0.14); color: var(--cream); border-color: var(--accent); }
.pt-blind-card__open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pt-blind-card__open-arrow { transition: transform var(--t-fast) var(--ease-soft); }
.pt-blind-card__open:hover .pt-blind-card__open-arrow { transform: translateX(3px); }
.pt-blind-card__open[aria-expanded="true"] .pt-blind-card__open-arrow { transform: rotate(90deg); }

/* the entry-path panel inside the card */
.pt-path {
  position: relative; z-index: 1; margin-top: 1.1rem; padding-top: 1.2rem;
  border-top: 1px solid var(--sky-line-2);
  animation: pt-path-in 0.34s var(--ease-soft);
}
@keyframes pt-path-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .pt-path { animation: none; } }
.pt-path[hidden] { display: none; }
.pt-path__loading { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.2rem 0; }
.pt-path__loading-text { font-family: var(--font-cjk-sans); font-size: 0.9rem; letter-spacing: 0.02em; color: var(--cream-soft); }
.pt-path__placeholder {
  font-family: var(--font-cjk-sans); font-size: 0.88rem; color: var(--cream-soft); line-height: 1.7;
  background: rgba(170,186,230,0.07); border-radius: 10px; padding: 0.9rem 1rem;
}
.pt-path__hook {
  font-family: var(--font-cjk-serif); font-size: 1.08rem; line-height: 1.85; color: var(--cream);
  max-width: 62ch;
}
.pt-path__books { margin-top: 1.3rem; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pt-path__book {
  background: var(--glass-card); border: 1px solid var(--sky-line); border-radius: 12px;
  padding: 1rem 1.15rem; box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.pt-path__book-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem 0.6rem; }
.pt-path__tag {
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(198,168,106,0.4); border-radius: 999px; padding: 0.18em 0.6em; flex: none;
}
.pt-path__book-title { font-family: var(--font-cjk-serif); font-weight: 700; font-size: 1.04rem; color: var(--cream); }
.pt-path__book-author { font-family: var(--font-cjk-sans); font-size: 0.78rem; color: var(--cream-mute); }
.pt-path__book-why { font-family: var(--font-cjk-serif); font-size: 0.92rem; line-height: 1.72; color: var(--cream-soft); margin-top: 0.55rem; }
.pt-path__note { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.03em; color: var(--cream-mute); line-height: 1.7; margin-top: 1rem; }

/* ============================================================
   CH.5 · ASK + closer + fingerprint
   ============================================================ */
.pt-ask__panel { max-width: 56rem; }
.pt-ask__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.pt-ask__chip {
  font-family: var(--font-cjk-sans); font-size: 0.86rem; color: var(--cream-soft);
  border: 1px solid var(--sky-line-2); border-radius: 999px; padding: 0.45em 1em;
  background: rgba(160,176,210,0.05); transition: border-color 0.15s var(--ease-soft), color 0.15s var(--ease-soft); text-align: left;
}
.pt-ask__chip:hover:not(:disabled) { border-color: var(--accent-dim); color: var(--cream); }
.pt-ask__chip:disabled { opacity: 0.4; cursor: default; }
.pt-ask__form { display: flex; gap: 0.6rem; margin-bottom: 1.4rem; }
.pt-ask__input {
  flex: 1; font-family: var(--font-cjk-sans); font-size: 1rem; color: var(--cream);
  background: var(--glass-card); border: 1px solid var(--sky-line-2); border-radius: 10px; padding: 0.72rem 1rem;
}
.pt-ask__input::placeholder { color: var(--cream-mute); }
.pt-ask__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pt-ask__send { flex: none; font-size: 0.9rem; padding: 0.5em 1.4em; }
.pt-ask__transcript { display: flex; flex-direction: column; gap: 1.1rem; }
.pt-turn {
  background: var(--glass-card); border: 1px solid var(--sky-line); border-radius: 12px; padding: 1.1rem 1.3rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.pt-turn__q { font-family: var(--font-cjk-sans); font-weight: 600; font-size: 0.98rem; color: var(--accent); margin-bottom: 0.6rem; }
.pt-turn__a { font-family: var(--font-cjk-serif); font-size: 1.05rem; line-height: 1.85; color: var(--cream-soft); }
.pt-ask.is-locked .pt-ask__form, .pt-ask.is-locked .pt-ask__chips { opacity: 0.4; pointer-events: none; }
.pt-ask__locked { font-family: var(--font-cjk-sans); font-size: 0.86rem; color: var(--cream-mute); margin-top: 0.6rem; }

/* shared thinking dots (reused from reading.js transcript) */
.rd-thinking { display: inline-flex; gap: 5px; align-items: center; }
.rd-thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.4; animation: rd-blink 1.2s infinite both; }
.rd-thinking span:nth-child(2) { animation-delay: 0.18s; }
.rd-thinking span:nth-child(3) { animation-delay: 0.36s; }
@keyframes rd-blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .rd-thinking span { animation: none; opacity: 0.6; } }

/* closer */
.pt-closer { max-width: 48rem; margin-top: clamp(3rem, 8vh, 5rem); }
.pt-closer__text { font-family: var(--font-cjk-serif); font-size: clamp(1.1rem, 2.6vw, 1.5rem); line-height: 1.75; color: var(--cream); margin-bottom: 2rem; }

/* shareable fingerprint card — dark, screenshot-ready */
.pt-fingerprint {
  background:
    radial-gradient(120% 90% at 90% 0%, rgba(198,168,106,0.14), transparent 55%),
    linear-gradient(160deg, #1a1d24, #101218);
  color: var(--cream); border-radius: 14px; padding: clamp(1.8rem, 5vw, 3rem);
  border: 1px solid var(--sky-line-2); box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  position: relative; overflow: hidden;
}
.rd-fingerprint__brand { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; }
.rd-fingerprint__name { font-family: var(--font-cjk-serif); font-weight: 700; font-size: clamp(1.8rem, 6vw, 3rem); line-height: 1.2; margin: 0.8rem 0 1.6rem; color: var(--cream); }
.rd-fingerprint__name .u { box-shadow: inset 0 -0.12em 0 var(--gold); }
.rd-fingerprint__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.4rem; }
.rd-fp-stat__value { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 4vw, 2rem); color: var(--cream); font-variant-numeric: tabular-nums; line-height: 1; }
.rd-fp-stat__label { font-family: var(--font-cjk-sans); font-size: 0.74rem; color: var(--cream-mute); margin-top: 0.4rem; }
@media (max-width: 520px) { .rd-fingerprint__grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; } }
.pt-fingerprint__hint { font-family: var(--font-cjk-sans); font-size: 0.8rem; color: var(--cream-mute); margin-top: 1rem; text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
.pt-footer { padding: 3rem 0 4rem; border-top: 1px solid var(--sky-line); margin-top: clamp(1rem, 3vh, 2rem); }
.pt-footer__src { font-family: var(--font-cjk-sans); font-size: 0.9rem; color: var(--cream-soft); margin-bottom: 0.55rem; }
.pt-footer__note { font-family: var(--font-cjk-sans); font-size: 0.85rem; color: var(--accent); margin-bottom: 0.55rem; line-height: 1.7; }
.pt-footer__fine { font-family: var(--font-cjk-sans); font-size: 0.8rem; letter-spacing: 0.01em; color: var(--cream-mute); line-height: 1.75; max-width: 60ch; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .th-stage { aspect-ratio: auto; height: 76vh; min-height: 520px; }
  .th-legend { font-size: 0.66rem; gap: 0.3rem 0.6rem; padding: 0.4rem 0.6rem; }
  .th-panel {
    width: 100%; height: auto; max-height: 80%; top: auto; bottom: 0; right: 0;
    border-left: none; border-top: 1px solid var(--sky-line-2); border-radius: 14px 14px 0 0;
    box-shadow: 0 -18px 40px rgba(0,0,0,0.42); animation: th-sheet-in 0.26s var(--ease-soft);
  }
  @keyframes th-sheet-in { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
  .th-tide-stage { aspect-ratio: 4 / 3; min-height: 240px; }
}
@media (max-width: 420px) {
  .th-stage { height: 72vh; min-height: 460px; }
  .th-legend { left: 0.5rem; top: 0.5rem; }
  .th-tide-stage { aspect-ratio: 1 / 1; min-height: 280px; }
  .th-tide__readout { max-width: calc(100% - 1.8rem); font-size: 0.8rem; }
  .pt-ask__form { flex-direction: column; }
  .pt-ask__send { align-self: flex-start; }
}

/* ============================================================
   CONNECT GATE — the trustworthy front door (dark, premium)
   Shown before any portrait exists; same tokens / glass / type.
   ============================================================ */
.gate[hidden] { display: none !important; }
.gate {
  position: fixed; inset: 0; z-index: 60;
  background:
    radial-gradient(120% 90% at 50% -10%, #1b1e26 0%, var(--sky-0) 54%, #0e1015 100%);
  overflow: hidden;
}
.gate__grain {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.025; mix-blend-mode: overlay;
}
.gate__scroll { position: relative; z-index: 1; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.gate__inner {
  width: min(100% - 2.4rem, 40rem); margin-inline: auto;
  padding: clamp(2.6rem, 8vh, 5rem) 0 clamp(3rem, 8vh, 5rem);
  display: flex; flex-direction: column; align-items: flex-start;
}
.gate__brand { margin-bottom: clamp(1.8rem, 6vh, 3.4rem); }
.gate__kicker { color: var(--accent); letter-spacing: 0.24em; margin-bottom: 1.1rem; }
.gate__h {
  font-family: var(--font-cjk-serif); font-weight: 700;
  font-size: clamp(1.9rem, 6.6vw, 3.4rem); line-height: 1.18; letter-spacing: 0.01em;
  color: var(--cream); margin: 0;
}
.gate__lead {
  font-family: var(--font-ui); font-size: clamp(0.92rem, 2.4vw, 1.12rem);
  color: var(--cream-soft); margin-top: 1rem; line-height: 1.6; letter-spacing: 0.01em;
}

/* the five chapters, quiet ribbon */
.gate__chapters {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; list-style: none;
  margin: 1.8rem 0 0; padding: 0;
}
.gate__chapters li {
  display: inline-flex; align-items: center; gap: 0.45em;
  font-family: var(--font-cjk-sans); font-size: 0.82rem; color: var(--cream-soft);
  border: 1px solid var(--sky-line-2); border-radius: 999px;
  padding: 0.34em 0.85em; background: rgba(160,176,210,0.04);
}
.gate__chapters-num { font-family: var(--font-cjk-serif); color: var(--accent); font-weight: 700; }

/* connect form */
.gate__form { width: 100%; margin-top: clamp(2rem, 5vh, 2.8rem); }
.gate__label {
  display: block; font-family: var(--font-cjk-sans); font-size: 0.82rem;
  letter-spacing: 0.04em; color: var(--cream-mute); margin-bottom: 0.7rem;
}
.gate__field { position: relative; display: flex; }
.gate__input {
  flex: 1; width: 100%; font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.02em;
  color: var(--cream); background: var(--glass-card);
  border: 1px solid var(--sky-line-2); border-radius: 11px;
  padding: 0.85rem 4.2rem 0.85rem 1rem;
  transition: border-color var(--t-fast) var(--ease-soft), box-shadow var(--t-fast) var(--ease-soft);
}
.gate__input::placeholder { color: var(--cream-mute); font-family: var(--font-mono); letter-spacing: 0.08em; }
.gate__input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(147,168,198,0.16); }
.gate__input.is-bad { border-color: #C49079; box-shadow: 0 0 0 3px rgba(196,144,121,0.16); }
.gate__reveal {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-cjk-sans); font-size: 0.76rem; color: var(--cream-soft);
  background: rgba(160,176,210,0.06); border: 1px solid var(--sky-line-2); border-radius: 8px;
  padding: 0.4em 0.7em; transition: color var(--t-fast) var(--ease-soft), border-color var(--t-fast) var(--ease-soft);
}
.gate__reveal:hover { color: var(--cream); border-color: var(--accent-dim); }
.gate__reveal:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gate__error {
  font-family: var(--font-cjk-sans); font-size: 0.84rem; color: #D6A088;
  line-height: 1.6; margin-top: 0.7rem;
}
.gate__error[hidden] { display: none; }

.gate__submit {
  width: 100%; margin-top: 1.1rem;
  display: flex; align-items: baseline; justify-content: center; gap: 0.6rem;
  font-family: var(--font-cjk-serif); font-weight: 700; font-size: 1.05rem; color: #14161b;
  background: linear-gradient(180deg, #C9D4E6, var(--accent));
  border: none; border-radius: 11px; padding: 0.95rem 1.4rem; cursor: pointer;
  box-shadow: 0 10px 30px rgba(147,168,198,0.22), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform var(--t-fast) var(--ease-soft), box-shadow var(--t-fast) var(--ease-soft), filter var(--t-fast) var(--ease-soft);
}
.gate__submit:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(147,168,198,0.3); filter: brightness(1.04); }
.gate__submit:active { transform: translateY(0); }
.gate__submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.gate__submit:disabled { opacity: 0.55; cursor: default; transform: none; filter: saturate(0.7); }
.gate__submit-en { font-family: var(--font-ui); font-weight: 500; font-size: 0.82rem; color: rgba(20,22,27,0.66); }
.gate__sample {
  display: block; margin: 1rem auto 0; font-family: var(--font-cjk-sans); font-size: 0.86rem;
  color: var(--cream-soft); background: none; border: none; cursor: pointer; padding: 0.4em 0.6em;
  text-decoration: underline; text-decoration-color: var(--sky-line-3); text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease-soft);
}
.gate__sample:hover { color: var(--cream); text-decoration-color: var(--accent-dim); }
.gate__sample:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.gate__sample [lang="en"] { font-family: var(--font-ui); }

/* how to get a key (expandable) */
.gate__how { width: 100%; margin-top: 1.7rem; border-top: 1px solid var(--sky-line); padding-top: 1.4rem; }
.gate__how-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; cursor: pointer;
  font-family: var(--font-cjk-sans); font-size: 0.92rem; color: var(--cream-soft); list-style: none;
}
.gate__how-summary::-webkit-details-marker { display: none; }
.gate__how-summary:hover { color: var(--cream); }
.gate__how-summary [lang="en"] { font-family: var(--font-ui); color: var(--cream-mute); font-size: 0.82rem; }
.gate__how-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.gate__how-chev { font-family: var(--font-mono); color: var(--cream-mute); transition: transform var(--t-base) var(--ease-soft); }
.gate__how[open] .gate__how-chev { transform: rotate(45deg); }
.gate__how-body { margin-top: 1rem; }
.gate__how-body p { font-family: var(--font-cjk-sans); font-size: 0.88rem; line-height: 1.75; color: var(--cream-soft); margin: 0 0 0.7rem; }
.gate__how-en { color: var(--cream-mute) !important; font-family: var(--font-ui) !important; font-size: 0.8rem !important; }
.gate__code {
  display: block; font-family: var(--font-mono); font-size: 0.84rem; color: var(--accent);
  background: rgba(8,9,12,0.5); border: 1px solid var(--sky-line-2); border-radius: 9px;
  padding: 0.75rem 0.9rem; margin: 0 0 0.8rem; overflow-x: auto; user-select: all;
}
.gate__mono, .gate__how .gate__mono { font-family: var(--font-mono); color: var(--accent); font-size: 0.92em; }
.gate__how-link {
  display: inline-flex; align-items: center; margin: 0.2rem 0 0.9rem;
  font-family: var(--font-ui); font-size: 0.86rem; color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  padding-bottom: 1px; transition: color 0.16s, border-color 0.16s;
}
.gate__how-link:hover { color: var(--cream); border-bottom-color: var(--cream); }

/* staged progress */
.gate__progress[hidden] { display: none; }
.gate__progress {
  width: 100%; margin-top: 1.8rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem; text-align: center;
  background: var(--glass-card); border: 1px solid var(--sky-line-2); border-radius: 14px;
  padding: clamp(1.6rem, 5vw, 2.4rem); box-shadow: 0 14px 40px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.04);
}
.gate__progress-text { font-family: var(--font-cjk-serif); font-size: 1.1rem; color: var(--cream); letter-spacing: 0.02em; transition: opacity var(--t-base) var(--ease-soft); }
.gate__progress-sub { font-family: var(--font-cjk-sans); font-size: 0.82rem; color: var(--cream-soft); max-width: 32ch; line-height: 1.7; }
.gate__progress-rail { width: min(100%, 18rem); height: 3px; border-radius: 999px; background: rgba(160,176,210,0.14); overflow: hidden; margin-top: 0.4rem; }
.gate__progress-fill {
  display: block; height: 100%; width: 4%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width 0.6s var(--ease-soft);
}

/* data security */
.gate__sec { width: 100%; margin-top: 2rem; border-top: 1px solid var(--sky-line); padding-top: 1.7rem; }
.gate__sec-h {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-cjk-serif); font-weight: 700; font-size: 1.12rem; color: var(--cream); margin: 0 0 1.1rem;
}
.gate__sec-h [lang="en"] { font-family: var(--font-ui); font-weight: 500; font-size: 0.84rem; color: var(--cream-mute); }
.gate__sec-icon { color: var(--accent); flex: none; }
.gate__sec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.gate__sec-list li {
  position: relative; padding-left: 1.5rem;
  font-family: var(--font-cjk-sans); font-size: 0.9rem; line-height: 1.75; color: var(--cream-soft);
}
.gate__sec-list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); opacity: 0.7;
}
.gate__sec-list b { color: var(--cream); font-weight: 600; }
.gate__sec-list .gate__sec-en { display: block; font-family: var(--font-ui); font-size: 0.8rem; color: var(--cream-mute); margin-top: 0.25rem; line-height: 1.6; }
.gate__sec-list .gate__sec-tag {
  display: inline-block; font-family: var(--font-cjk-sans); font-size: 0.74rem; color: var(--accent);
  border: 1px solid var(--accent-dim); border-radius: 999px; padding: 0.04em 0.6em; margin-left: 0.2em; white-space: nowrap;
}

/* gate scrolled to the security section (from footer link) gets a soft pulse */
.gate__sec.is-flash { animation: gate-flash 1.4s var(--ease-soft); }
@keyframes gate-flash { 0%, 100% { background: transparent; } 30% { background: rgba(147,168,198,0.06); } }
@media (prefers-reduced-motion: reduce) { .gate__sec.is-flash { animation: none; } }

/* gate enter motion */
.gate__inner > * { animation: gate-rise 0.6s var(--ease-soft) both; }
@keyframes gate-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gate__inner > * { animation: none; } }

/* header disconnect button (matches nav-link) */
.nav-link--btn { background: none; border: none; cursor: pointer; font-family: var(--font-ui); padding: 0; }
.nav-link--btn[hidden] { display: none; }
@media (max-width: 560px) { .nav-link--btn { font-size: 0.84rem; } }

/* sample ribbon at the top of the rendered demo */
.pt-sample-ribbon[hidden] { display: none; }
.pt-sample-ribbon {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem;
  margin-top: 1rem; padding: 0.7rem 1rem;
  background: rgba(160,176,210,0.06); border: 1px solid var(--sky-line-2); border-radius: 11px;
}
.pt-sample-ribbon__badge {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--gold);
  border: 1px solid rgba(198,168,106,0.4); border-radius: 4px; padding: 0.16em 0.55em; flex: none;
}
.pt-sample-ribbon__text { font-family: var(--font-cjk-sans); font-size: 0.86rem; color: var(--cream-soft); line-height: 1.6; }
.pt-sample-ribbon__link {
  font-family: inherit; font-size: inherit; color: var(--accent); background: none; border: none;
  cursor: pointer; padding: 0; text-decoration: underline; text-decoration-color: var(--accent-dim); text-underline-offset: 3px;
}
.pt-sample-ribbon__link:hover { color: var(--cream); }
.pt-sample-ribbon__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* footer links */
.pt-footer__links { margin-top: 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.pt-footer__link {
  font-family: var(--font-cjk-sans); font-size: 0.82rem; color: var(--cream-soft);
  background: none; border: none; cursor: pointer; padding: 0;
  text-decoration: underline; text-decoration-color: var(--sky-line-3); text-underline-offset: 3px;
  transition: color var(--t-fast) var(--ease-soft);
}
.pt-footer__link:hover { color: var(--cream); }
.pt-footer__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.pt-footer__sep { color: var(--cream-mute); }

@media (max-width: 480px) {
  .gate__submit { flex-direction: column; align-items: center; gap: 0.2rem; }
}

/* ============================================================
   把肖像带走 / 发小红书 — the UGC share loop
   ============================================================ */
.pt-share { text-align: center; max-width: 36rem; margin: 0 auto; padding: 3rem 1.5rem 1rem; }
.pt-share__kicker { display: block; margin-bottom: 0.7rem; }
.pt-share__h {
  font-family: var(--font-cjk-serif, "Songti SC", serif);
  font-size: clamp(1.3rem, 3.5vw, 1.8rem); font-weight: 600;
  color: #EAE7DE; line-height: 1.3; margin: 0 0 0.8rem;
}
.pt-share__hint {
  font-family: var(--font-cjk-serif, serif); font-size: 0.92rem; line-height: 1.6;
  color: #A6ACB8; margin: 0 auto 1.4rem; max-width: 30rem;
}
.pt-share__hint b { color: #C9A24B; font-weight: 600; }
.pt-share__btn {
  font-family: var(--font-cjk-sans, "PingFang SC", sans-serif);
  font-weight: 600; font-size: 0.95rem;
  border-radius: 999px; padding: 0.7rem 1.7rem; cursor: pointer;
  color: #FF6B81; background: rgba(255,79,107,0.08);
  border: 1px solid rgba(255,107,129,0.45);
  transition: transform .18s ease, background .25s ease, border-color .25s ease;
}
.pt-share__btn:hover { transform: translateY(-1px); background: rgba(255,79,107,0.16); border-color: rgba(255,107,129,0.7); }
.pt-share__btn.is-copied { color: #C9A24B; border-color: #C9A24B; background: rgba(201,162,75,0.1); }
.pt-share__btn:focus-visible { outline: 2px solid #FF6B81; outline-offset: 3px; }
.pt-share__mark {
  margin-top: 1.4rem;
  font-family: "Space Mono", ui-monospace, monospace; font-size: 0.66rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: #777D89;
}
/* persona card watermark — quiet, travels in the money-shot screenshot */
.pt-persona__mark {
  margin-top: 1.1rem;
  font-family: "Space Mono", ui-monospace, monospace; font-size: 0.6rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(201,162,75,0.55);
}
