/* ============ 设计变量 ============ */
:root {
  --bg: #ecebe8;
  --ground: #f3f2ef;
  --grid: rgba(0, 0, 0, .055);
  --grid-major: rgba(0, 0, 0, .09);
  --ink: #141414;
  --ink-2: #555;
  --ink-3: #8a8a8a;
  --line: #1a1a1a;
  --card: #ffffff;
  --card-2: #f6f6f4;
  --hud: rgba(255, 255, 255, .78);
  --hud-line: rgba(0, 0, 0, .08);

  --paper: #2f6bd8;
  --closed: #141414;
  --open: #1f9d74;
  --infra: #c77a12;
  --event: #c2410c;
  --accent: #1f9d74;

  --tilt: 52deg;
  --spin: 12deg;
  --zoom: .55;

  --sans: "Inter", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Site Mono", ui-monospace, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111213; --ground: #17181a; --grid: rgba(255,255,255,.05); --grid-major: rgba(255,255,255,.085);
    --ink: #f1f1ee; --ink-2: #b4b4b0; --ink-3: #7c7c78; --line: #e8e8e4;
    --card: #1f2023; --card-2: #26272a; --hud: rgba(24,25,27,.8); --hud-line: rgba(255,255,255,.08);
    --paper: #6a9bff; --closed: #f1f1ee; --open: #3cc79a; --infra: #f0a23a; --event: #fb8a5c; --accent: #3cc79a;
  }
}
:root[data-theme="dark"] {
  --bg: #111213; --ground: #17181a; --grid: rgba(255,255,255,.05); --grid-major: rgba(255,255,255,.085);
  --ink: #f1f1ee; --ink-2: #b4b4b0; --ink-3: #7c7c78; --line: #e8e8e4;
  --card: #1f2023; --card-2: #26272a; --hud: rgba(24,25,27,.8); --hud-line: rgba(255,255,255,.08);
  --paper: #6a9bff; --closed: #f1f1ee; --open: #3cc79a; --infra: #f0a23a; --event: #fb8a5c; --accent: #3cc79a;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); }
body { font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ 舞台 / 地面 ============ */
.stage {
  position: fixed; inset: 0; overflow: hidden; outline: none;
  /* 等轴测：不用透视，三条泳道上的卡片一样大 */
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.stage.is-dragging { cursor: grabbing; }
.plane {
  position: absolute; left: 50%; top: var(--cy, 50%);
  transform-origin: 0 0; transform-style: preserve-3d;
  background-color: var(--ground);
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 240px 240px, 240px 240px, 40px 40px, 40px 40px;
  will-change: transform;
}
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 75% at 50% 50%, transparent 45%, var(--bg) 95%),
    linear-gradient(var(--bg), transparent 16%, transparent 80%, color-mix(in srgb, var(--bg) 85%, transparent));
}

/* 轴线与刻度 */
.axis { position: absolute; height: 2px; background: var(--lane-c); transform: translateY(-1px); }
.is-lane-closed { --lane-c: var(--line); }
.is-lane-open { --lane-c: var(--open); }
.is-lane-research { --lane-c: var(--paper); }
.tick { position: absolute; width: 1px; height: 12px; background: var(--lane-c); transform: translate(-.5px, -6px); opacity: .55; }
.tick.is-year { height: 22px; width: 2px; transform: translate(-1px, -11px); opacity: 1; }
.tick-label {
  position: absolute; font: 500 15px var(--mono); color: var(--ink-3); white-space: nowrap;
  transform: translate(8px, 10px); letter-spacing: .04em;
}
.tick-label.is-year { font-weight: 600; font-size: 20px; color: var(--ink); }

.lane-label {
  position: absolute; padding: 10px 28px; border-radius: 12px; color: #fff;
  font: 900 34px/1 var(--sans); letter-spacing: .08em; white-space: nowrap;
  transform: translate(-100%, -50%); box-shadow: 0 10px 0 -4px rgba(0,0,0,.12);
}
.lane-label.is-lane-closed { background: var(--closed); color: var(--bg); }
.lane-label.is-lane-open { background: var(--open); }
.lane-label.is-lane-research { background: var(--paper); }

/* 幕的分隔 */
.era-mark { position: absolute; pointer-events: none; }
.era-mark .rule { position: absolute; left: 0; top: 0; width: 0; border-left: 2px dashed var(--ink-3); opacity: .35; }
.era-mark .label { position: absolute; right: 28px; top: 0; white-space: nowrap; text-align: right; }
.era-mark .no { font: 600 18px var(--mono); color: var(--accent); letter-spacing: .2em; }
.era-mark .name { font: 900 88px/1.05 var(--sans); color: var(--ink); opacity: .1; letter-spacing: .02em; }
.era-mark .range { font: 500 18px var(--mono); color: var(--ink-3); }

/* 节点 */
.dot {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  background: var(--line); transform: translate(-8px, -8px); box-shadow: 0 0 0 4px var(--ground);
}
.stem { position: absolute; width: 2px; background: var(--line); transform: translateX(-1px); }
.node { position: absolute; transform-style: preserve-3d; }
.node.is-dim .card, .node.is-dim .plate { opacity: .15 !important; }

.card {
  position: absolute; inset: 0; border-radius: 14px; cursor: pointer;
  background: var(--card); border: 2.5px solid var(--line);
  padding: 16px 18px 14px; display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
  box-shadow: 0 0 0 7px var(--card), 0 0 0 9.5px var(--line), 0 18px 30px -18px rgba(0,0,0,.35);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: auto -10% -30% 30%; height: 70%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent), color-mix(in srgb, var(--c) 4%, transparent));
  filter: blur(6px); border-radius: 40%; pointer-events: none;
}
.card > * { position: relative; }
.node:hover .card.is-flat, .node.is-active .card.is-flat { transform: translateZ(22px); }
.node.is-active .card { border-color: var(--c); box-shadow: 0 0 0 7px var(--card), 0 0 0 9.5px var(--c), 0 40px 40px -20px rgba(0,0,0,.4); }

.card-meta { font: 600 12px/1.35 var(--mono); letter-spacing: .08em; color: var(--ink-3); text-transform: uppercase; padding-right: 58px; }
.card h3 { margin: 4px 0 2px; font: 900 34px/1.08 var(--sans); letter-spacing: -.01em; white-space: nowrap; }
.card .sub { margin: 0; font: 600 15px/1.35 var(--sans); color: var(--ink-2); }
.tag {
  position: absolute; top: 14px; right: 14px; font: 700 12px/1 var(--sans); padding: 5px 8px; border-radius: 6px;
  background: var(--c); color: #fff;
}
[data-type="closed"] .tag { color: var(--bg); }
[data-type="paper"]  { --c: var(--paper); }
[data-type="closed"] { --c: var(--closed); }
[data-type="open"]   { --c: var(--open); }
[data-type="infra"]  { --c: var(--infra); }
[data-type="event"]  { --c: var(--event); }

/* 立起来的重大节点 */
.plate {
  position: absolute; inset: 0; border-radius: 16px; border: 2.5px solid var(--line);
  background: color-mix(in srgb, var(--card) 70%, transparent);
}
.card.is-stand {
  inset: auto -9% 42% -9%; height: 240px; transform-origin: 50% 100%;
  transform: rotateX(-72deg);
  justify-content: center; padding: 18px 22px;
  box-shadow: 0 0 0 7px var(--card), 0 0 0 9.5px var(--line), 0 30px 30px -16px rgba(0,0,0,.28);
}
.card.is-stand h3 { font-size: 50px; margin: 6px 0 4px; }
.card.is-stand .card-meta { font-size: 13px; }
.card.is-stand .sub { font-size: 17px; }
.card.is-stand .stat { margin-top: 4px; font: 700 15px/1.35 var(--sans); color: var(--ink-2); }
.node:hover .card.is-stand, .node.is-active .card.is-stand { transform: rotateX(-72deg) translateY(-12px); }

/* 关系连线（选中时出现） */
.links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.links path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 10 10; animation: dash 1s linear infinite; }
.links circle { fill: var(--accent); }
@keyframes dash { to { stroke-dashoffset: -20; } }

/* ============ HUD ============ */
.hud-top {
  position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; padding: 22px 28px; pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
.kicker { margin: 0; font: 600 12px var(--mono); letter-spacing: .2em; color: var(--accent); }
.brand h1 { margin: 2px 0 0; font: 900 30px/1.2 var(--sans); letter-spacing: -.01em; }
.tools { display: flex; gap: 8px; align-items: center; }
.btn {
  height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--hud-line);
  background: var(--hud); color: var(--ink); font: 600 14px var(--sans); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn:hover { border-color: var(--ink-3); }
.btn.icon { width: 38px; padding: 0; font-size: 16px; }
.search input {
  height: 38px; width: 200px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--hud-line);
  background: var(--hud); color: var(--ink); font: 14px var(--sans);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.eras { position: fixed; top: 92px; left: 28px; right: 28px; display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.eras::-webkit-scrollbar { display: none; }
.era-chip { flex: none; }
.era-chip {
  border: 0; background: none; cursor: pointer; font: 600 13px var(--sans); color: var(--ink-3);
  padding: 4px 10px; border-radius: 8px; white-space: nowrap;
}
.era-chip b { font: 600 11px var(--mono); margin-right: 6px; }
.era-chip:hover { color: var(--ink); }
.era-chip.is-current { background: var(--ink); color: var(--bg); }

.caption {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  width: max-content; max-width: min(760px, calc(100% - 32px));
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  padding: 12px 18px 13px 16px; border-radius: 14px; color: var(--ink); font: inherit;
  background: var(--hud); border: 1px solid var(--hud-line); border-left: 4px solid var(--c, var(--ink));
  box-shadow: 0 14px 34px -18px rgba(0,0,0,.35);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.caption:empty { display: none; }
.caption { transition: opacity .25s; }
.caption.is-moving { opacity: 0; }
.caption:hover { border-color: var(--c, var(--ink)); }
.caption.is-swap { animation: capIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes capIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translateX(-50%); } }
.cap-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cap-tag { font: 700 12px/1 var(--sans); padding: 4px 7px; border-radius: 5px; background: var(--c); color: #fff; align-self: center; }
.caption[data-type="closed"] .cap-tag { color: var(--bg); }
.cap-head b { font: 900 18px/1.2 var(--sans); }
.cap-date { font: 500 12px var(--mono); color: var(--ink-3); letter-spacing: .04em; }
.cap-text { font: 500 15px/1.55 var(--sans); color: var(--ink-2); }
/* 字幕对应的卡片 */
.node.is-current .card { border-color: var(--accent); box-shadow: 0 0 0 7px var(--card), 0 0 0 11px var(--accent), 0 30px 34px -18px rgba(0,0,0,.38); }
.node.is-current .plate { border-color: var(--accent); }
.node.is-current .card.is-flat { transform: translateZ(14px); }

.hud-bottom { position: fixed; left: 0; right: 0; bottom: 0; padding: 0 28px 24px; display: flex; gap: 12px; align-items: center; }
.minimap {
  position: relative; flex: 1; height: 38px; border-radius: 10px; cursor: pointer; touch-action: none;
  background: var(--hud); border: 1px solid var(--hud-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.mm-era { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--hud-line); }
.mm-era span { position: absolute; left: 6px; top: 3px; font: 600 10px var(--mono); color: var(--ink-3); white-space: nowrap; }
.mm-dot { position: absolute; bottom: 7px; width: 6px; height: 10px; border-radius: 2px; background: var(--c); transform: translateX(-3px); }
.mm-dot.is-major { height: 16px; }
.mm-window { position: absolute; top: 3px; bottom: 3px; border-radius: 7px; pointer-events: none; border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.hint { position: fixed; bottom: 66px; left: 28px; margin: 0; font: 500 12px var(--sans); color: var(--ink-3); transition: opacity .6s; }

/* 详情面板 */
.panel {
  position: fixed; top: 132px; right: 16px; bottom: 96px; width: 400px; max-width: calc(100% - 32px); z-index: 20;
  background: var(--card); border: 1px solid var(--hud-line); border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.35); padding: 28px 28px 24px; overflow-y: auto;
  transform: translateX(calc(100% + 24px)); transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.panel.is-open { transform: none; }
.panel-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--hud-line); background: var(--card-2); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer;
}
.p-meta { font: 600 12px var(--mono); letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; padding-right: 40px; }
.p-tag { display: inline-block; font: 700 12px/1 var(--sans); padding: 5px 8px; border-radius: 6px; background: var(--c); color: #fff; margin-right: 8px; vertical-align: 1px; letter-spacing: 0; text-transform: none; }
[data-type="closed"] .p-tag { color: var(--bg); }
.panel h2 { font: 900 30px/1.2 var(--sans); margin: 12px 0 6px; }
.p-summary { font-size: 16px; color: var(--ink); margin: 0 0 16px; }
.p-stat { border-left: 3px solid var(--c); padding: 2px 0 2px 14px; margin: 0 0 20px; }
.p-stat b { display: block; font: 900 28px/1.2 var(--sans); color: var(--c); }
[data-type="closed"] .p-stat b { color: var(--ink); }
.p-stat small { color: var(--ink-3); font-size: 13px; }
.panel h4 { font: 700 12px var(--sans); letter-spacing: .08em; color: var(--ink-3); margin: 18px 0 4px; }
.panel p { margin: 0; }
.p-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.p-jump { border: 1px solid var(--hud-line); background: var(--card-2); color: var(--ink); border-radius: 8px; padding: 4px 10px; font: 600 13px var(--sans); cursor: pointer; }
.p-jump:hover { border-color: var(--accent); color: var(--accent); }
.p-ext { display: inline-block; margin-top: 22px; color: var(--accent); font-weight: 700; text-decoration: none; }
.p-ext:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .links path { animation: none; }
  .card, .panel { transition: none; }
}

/* ============ 手机 ============ */
@media (max-width: 760px) {
  :root { --tilt: 52deg; }
  .hud-top { padding: 14px 16px; flex-direction: column; gap: 10px; }
  .brand h1 { font-size: 22px; }
  .tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .eras { top: auto; bottom: 66px; left: 16px; right: 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .eras::-webkit-scrollbar { display: none; }
  .era-chip { flex: none; }
  .caption { bottom: 100px; padding: 9px 12px 10px; }
  .cap-head b { font-size: 16px; }
  .cap-text { font-size: 13px; }
  .hud-bottom { padding: 0 16px 14px; }
  .mm-era span { display: none; }
  .hint { display: none; }
  .panel { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; max-height: 72vh; transform: translateY(calc(100% + 24px)); }
}

/* ============ 沙盘：泳道地块 + 焦点卡片立起 ============ */
.lane-zone { position: absolute; border-radius: 40px; pointer-events: none; }
.z-research { background: color-mix(in srgb, var(--paper) 7%, transparent); }
.z-closed   { background: color-mix(in srgb, var(--ink) 4.5%, transparent); }
.z-open     { background: color-mix(in srgb, var(--open) 8%, transparent); }
.lane-label { box-shadow: none; }
.card.is-flat { transform-origin: 50% 100%; transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s; }
/* 主角：焦点卡片从地面翻起、放大，其余卡片退暗 */
/* 注意：不能给 .node 设透明度，否则里面立起的卡片会被拍平 */
.card, .plate { transition: opacity .5s, transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s; }
.plane.has-current .node:not(.is-current) .card, .plane.has-current .node:not(.is-current) .plate { opacity: .55; }
.plane.has-current .node:not(.is-current):hover .card, .plane.has-current .node:not(.is-current):hover .plate { opacity: 1; }
.card.is-stand { transition: transform .55s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s; }
.node.is-current .card.is-flat { transform: rotateX(-64deg) scale(1.7); box-shadow: 0 0 0 7px var(--card), 0 0 0 11px var(--accent), 0 50px 60px -30px rgba(0,0,0,.45); }
.node.is-current .card.is-stand { transform: rotateX(-72deg) scale(1.55); }
.node.is-current { z-index: 50; }
.node:hover .card.is-flat { transform: translateZ(18px); }
.node.is-current:hover .card.is-flat { transform: rotateX(-64deg) scale(1.7) translateY(-8px); }
.node.is-current:hover .card.is-stand { transform: rotateX(-72deg) scale(1.55) translateY(-8px); }
/* 聚光灯 */
.spot {
  position: absolute; width: 900px; height: 620px; margin: -310px 0 0 -450px; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c, var(--accent)) 26%, transparent), color-mix(in srgb, var(--c, var(--accent)) 8%, transparent) 55%, transparent);
  transition: left .7s cubic-bezier(.2,.8,.2,1), top .7s cubic-bezier(.2,.8,.2,1), background .5s;
}
.spot[data-type="closed"] { --c: #8a8a8a; }
@media (prefers-reduced-motion: reduce) { .spot, .node { transition: none; } }
@media (prefers-reduced-motion: reduce) { .card.is-flat { transition: none; } }

/* ============ 每一幕的开场 ============ */
.stage { transition: opacity .6s, filter .6s; }
body.is-curtain .stage { opacity: .25; filter: blur(2px); }
body.is-curtain .caption { opacity: 0; }
.curtain { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .5s; }
.curtain.is-on { opacity: 1; }
.c-inner { display: flex; align-items: center; gap: clamp(28px, 5vw, 72px); }
.c-name { writing-mode: vertical-rl; text-orientation: mixed; font: 900 clamp(64px, 11vh, 112px)/1.05 var(--sans); letter-spacing: .06em; max-height: 72vh; }
.c-name i { font-style: normal; display: inline-block; opacity: 0; transform: translateY(-.4em); }
.curtain.is-on .c-name i { animation: cDrop .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--k) * 70ms + 120ms); }
@keyframes cDrop { to { opacity: 1; transform: none; } }
.c-side { max-width: 380px; }
.c-no { font: 600 16px var(--mono); color: var(--accent); letter-spacing: .2em; }
.c-range { font: 500 16px var(--mono); color: var(--ink-3); margin-left: 12px; }
.c-tag { margin: 14px 0 26px; font: 600 20px/1.7 var(--sans); color: var(--ink-2); }
.c-count { display: flex; gap: 34px; margin: 0; }
.c-count div { display: flex; flex-direction: column-reverse; }
.c-count dt { font: 600 14px var(--sans); color: var(--ink-3); }
.c-count dd { margin: 0; font: 900 58px/1 var(--sans); font-variant-numeric: tabular-nums; }
.c-count .k-open dd { color: var(--open); }
.c-count .k-paper dd { color: var(--paper); }
.curtain .c-side > * { opacity: 0; transform: translateY(10px); }
.curtain.is-on .c-side > * { animation: cRise .6s cubic-bezier(.2,.8,.2,1) forwards; }
.curtain.is-on .c-side > :nth-child(2) { animation-delay: .25s; }
.curtain.is-on .c-side > :nth-child(3) { animation-delay: .45s; }
@keyframes cRise { to { opacity: 1; transform: none; } }
.lang-en .c-name { writing-mode: horizontal-tb; font-size: clamp(48px, 7vw, 92px); letter-spacing: -.02em; max-width: 48vw; }
.lang-en .c-name i { transform: translateY(-.25em); }
@media (prefers-reduced-motion: reduce) { .curtain.is-on .c-name i, .curtain.is-on .c-side > * { animation: none; opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .c-inner { flex-direction: column; gap: 18px; }
  .c-name, .lang-en .c-name { writing-mode: horizontal-tb; font-size: 42px; max-width: none; text-align: center; }
  .c-side { max-width: calc(100vw - 48px); text-align: center; }
  .c-count { justify-content: center; }
  .c-count dd { font-size: 40px; }
}

/* ============ 分岔 ============ */
.branches { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.branches path { fill: none; stroke-width: 2; }
.branches .br-closed { stroke: var(--line); }
.branches .br-open { stroke: var(--open); }
.split-label {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font: 900 44px var(--sans); color: var(--ink); opacity: .14; letter-spacing: .04em;
}
@media (max-width: 760px) {
  .node.is-current .card.is-flat, .node.is-current:hover .card.is-flat { transform: rotateX(-64deg) scale(1.15); }
  .node.is-current .card.is-stand, .node.is-current:hover .card.is-stand { transform: rotateX(-72deg) scale(1.1); }
  .split-label { font-size: 30px; }
}

/* 出处核实状态 */
.p-verify { margin: 10px 0 0 !important; padding: 8px 10px 8px 30px; position: relative; border-radius: 8px; font: 500 13px/1.5 var(--sans); color: var(--ink-2); background: color-mix(in srgb, var(--infra) 12%, transparent); }
.p-verify::before { content: "!"; position: absolute; left: 10px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--infra); color: #fff; font: 800 10px/14px var(--sans); text-align: center; }
.p-verify.is-secondary { background: color-mix(in srgb, var(--ink-3) 14%, transparent); }
.p-verify.is-secondary::before { background: var(--ink-3); }

/* 幕导航在窄屏上横向滚动时，右端渐隐提示还有内容 */
@media (min-width: 761px) { .eras { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); padding-right: 40px; } }

/* ============ 反馈弹窗 ============ */
.fb { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.fb[hidden] { display: none; }
.fb-scrim { position: absolute; inset: 0; background: rgba(10,10,12,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.fb-box {
  position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--card); color: var(--ink); border: 2.5px solid var(--line, var(--edge)); border-radius: 18px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); padding: 26px 26px 22px; font: 15px/1.5 var(--sans);
}
.fb-box h2 { margin: 0 0 14px; font: 900 24px/1.2 var(--sans); }
.fb-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-3); font-size: 22px; cursor: pointer; }
.fb-x:hover { color: var(--ink); }
.fb-types { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-type input { position: absolute; opacity: 0; pointer-events: none; }
.fb-type span { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--ink-3); font-weight: 700; font-size: 14px; cursor: pointer; }
.fb-type input:checked + span { background: var(--ink); color: var(--card); border-color: var(--ink); }
.fb-type input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fb-hint { margin: 10px 0 14px; color: var(--ink-2); font-size: 14px; }
.fb-row { display: block; margin-bottom: 12px; }
.fb-row[hidden], .fb-two[hidden] { display: none; }
.fb-row > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
.fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fb input:not([type=radio]), .fb select, .fb textarea {
  width: 100%; box-sizing: border-box; font: 15px/1.45 var(--sans); color: var(--ink);
  background: var(--bg, var(--paper)); border: 1.5px solid var(--ink-3); border-radius: 10px; padding: 9px 11px;
}
.fb textarea { resize: vertical; min-height: 110px; }
.fb input:focus, .fb select:focus, .fb textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.fb-trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; }
.fb-status { margin: 2px 0 10px; font-size: 14px; min-height: 1em; }
.fb-status.is-err { color: var(--event); }
.fb-status.is-ok { color: var(--accent); font-weight: 600; }
.fb-actions { display: flex; justify-content: flex-end; }
.fb-send { border: 0; border-radius: 10px; padding: 10px 22px; background: var(--ink); color: var(--card); font: 700 15px var(--sans); cursor: pointer; }
.fb-send:disabled { opacity: .6; cursor: wait; }
@media (max-width: 520px) { .fb-two { grid-template-columns: 1fr; } .fb-box { padding: 22px 18px 18px; } }

.p-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; }
.p-perma { color: var(--ink-3); font: 600 13px var(--sans); text-underline-offset: 3px; }
.p-perma:hover { color: var(--ink); }
.p-report { display: block; margin-top: 0; padding: 0; border: 0; background: none; color: var(--ink-3); font: 600 13px var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.p-report:hover { color: var(--ink); }
@media (max-width: 760px) {
  .tools { flex-wrap: wrap; justify-content: flex-start; }
  .tools .search { flex: 1 0 100%; }
  .eras { top: auto; }
}

/* 详情面板打开时，说明卡让到面板左侧 */
@media (min-width: 761px) {
  body.has-panel .caption { left: calc((100% - 432px) / 2); max-width: calc(100% - 480px); }
}

.fb-note { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-3); }
.fb-note a { color: var(--accent); }
/* 右下角两个文字链接：上下分开、加大点击区域，避免误点 */
.legal-link { position: fixed; right: 22px; bottom: 72px; margin: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font: 500 12px var(--sans); color: var(--ink-3); }
.legal-link a { color: inherit; text-decoration: none; padding: 4px 6px; border-radius: 6px; line-height: 1.3; }
.legal-link .copy { padding: 4px 6px 0; font-size: 11px; color: var(--ink-3); opacity: .8; }
.legal-link a:hover, .legal-link a:focus-visible { color: var(--ink); background: var(--hud); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .legal-link { display: none; } }

/* 手机版：顶部「⋯」更多菜单（放文字版目录和隐私政策），桌面版隐藏 */
.more-menu { display: none; position: relative; }
.more-menu > summary { list-style: none; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 210px; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: var(--card); border: 1px solid var(--hud-line); box-shadow: 0 18px 30px -16px rgba(0,0,0,.35); }
.more-pop a { padding: 12px 14px; border-radius: 8px; font: 600 15px var(--sans); color: var(--ink); text-decoration: none; }
.more-pop a + a { border-top: 1px solid var(--hud-line); }
.more-copy { margin: 0; padding: 10px 14px 6px; border-top: 1px solid var(--hud-line); font: 500 12px var(--sans); color: var(--ink-3); }
.more-pop a:active, .more-pop a:hover { background: var(--hud); }
@media (max-width: 760px) { .more-menu { display: block; } }

/* 平板竖屏等中等宽度：标题稍小，避免折成三行 */
@media (min-width: 761px) and (max-width: 1100px) {
  .brand h1 { font-size: 24px; }
  .search input { width: 160px; }
}

/* 放大后出现的「恢复默认大小」按钮 */
.zoom-reset { flex: none; font: 600 12px var(--mono); padding: 0 10px; }

/* ============ 矮屏幕（手机横屏、小窗口）：压缩顶部和底部界面，把空间留给时间轴 ============ */
@media (max-height: 520px) and (orientation: landscape) {
  .hud-top { padding: 10px 16px; align-items: center; flex-direction: row; gap: 12px; }
  .tools { width: auto; flex-wrap: nowrap; justify-content: flex-end; }
  .search, .tools .search { flex: 0 1 150px; min-width: 90px; }
  .search input { width: 100%; }
  .brand { min-width: 0; }
  .brand h1 { overflow: hidden; text-overflow: ellipsis; }
  .mm-era span { display: none; }
  /* 详情面板打开时，说明卡和面板会重叠：先把说明卡收起来 */
  body.has-panel .caption { display: none; }
  .kicker { display: none; }
  .brand h1 { font-size: 17px; white-space: nowrap; }
  .tools { gap: 6px; }
  .btn { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 9px; }
  .btn.icon { width: 32px; }
  .search input { height: 32px; font-size: 13px; }
  .eras { top: 50px; bottom: auto; left: 16px; right: 16px; }
  .era-chip { font-size: 12px; padding: 3px 8px; }
  .era-chip b { font-size: 10px; }
  .caption { bottom: 54px; padding: 7px 12px 8px; gap: 2px; max-width: min(560px, 62vw); }
  .cap-head b { font-size: 15px; }
  .cap-tag { font-size: 11px; padding: 3px 6px; }
  .cap-text { font-size: 12.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hud-bottom { padding: 0 16px 10px; gap: 8px; }
  .minimap { height: 30px; }
  .hint, .legal-link { display: none; }
  .more-menu { display: block; }
  .more-pop { min-width: 200px; }
  .panel { top: 50px; bottom: 50px; left: auto; right: 12px; width: 340px; max-height: none; padding: 18px 20px; transform: translateX(calc(100% + 24px)); }
  .panel.is-open { transform: none; }
}

/* 被放下的卡片：主角和立起的效果都取消，平放在地面上 */
.node.is-down .card.is-stand, .node.is-down:hover .card.is-stand { transform: rotateX(0deg) translateZ(3px); }
.node.is-down .card.is-flat, .node.is-down:hover .card.is-flat { transform: translateZ(3px); }
.node.is-down .card { box-shadow: 0 0 0 7px var(--card), 0 0 0 9.5px var(--line), 0 8px 14px -10px rgba(0,0,0,.25); }

/* 平放的卡片比地面略高，避免和地面在同一平面导致点不中 */
.card.is-flat { transform: translateZ(3px); }
.plate { transform: translateZ(1px); }
