:root {
  --paper: #f4f0e6;
  --paper-2: #ece5d6;
  --card: #fbf8f0;
  --card-2: #f7f2e6;
  --ink: #2b2924;
  --ink-2: #56504a;
  --dim: #8a8175;
  --faint: #b6ac9b;
  --line: #d9d0be;
  --line-soft: rgba(120, 100, 70, .16);
  --vermilion: #8f3624;
  --vermilion-2: #a8452e;
  --celadon: #3f6f6a;
  --gold: #a8793f;
  --shadow: 0 1px 2px rgba(60, 45, 20, .06), 0 10px 30px rgba(60, 45, 20, .07);
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --num: "Georgia", "Times New Roman", var(--serif);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(1100px 620px at 72% 6%, rgba(255, 255, 255, .62), transparent 62%),
    linear-gradient(140deg, #f6f2e8 0%, #efe8d8 100%);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(143, 54, 36, .16); }
:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.app {
  position: relative;
  display: grid;
  height: 100vh;
  height: 100dvh;
  grid-template-columns: 268px minmax(0, 1fr) 352px;
  grid-template-rows: 60px minmax(0, 1fr) 152px;
  grid-template-areas:
    "top top top"
    "rail stage detail"
    "timeline timeline timeline";
}

/* ── 顶栏 ───────────────────────────────────────────── */
.topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px 0 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(252, 249, 242, .96), rgba(247, 242, 232, .9));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  z-index: 6;
}
.mark {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: var(--vermilion);
  color: #f8efdd;
  border-radius: 2px;
  font-size: 17px;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 2px 6px rgba(120, 40, 20, .22);
}
.brand { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.25;
  white-space: nowrap;
}
.brand small {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: .3em;
  color: var(--dim);
  text-transform: uppercase;
  white-space: nowrap;
}
.top-meta {
  margin-left: 10px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--dim);
  white-space: nowrap;
}
.top-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.linkbtn {
  border: 0; background: none; cursor: pointer;
  padding: 7px 10px;
  font-size: 12px; letter-spacing: .08em;
  color: var(--ink-2);
  border-radius: 2px;
  transition: color .16s, background .16s;
}
.linkbtn:hover { color: var(--vermilion); background: rgba(143, 54, 36, .06); }
.compliance {
  margin-left: 8px;
  padding: 5px 9px;
  border: 1px solid rgba(143, 54, 36, .28);
  border-radius: 2px;
  font-size: 10px;
  letter-spacing: .06em;
  color: #7d4a3b;
  background: rgba(255, 250, 240, .6);
  white-space: nowrap;
}

/* ── 左栏卷目 ───────────────────────────────────────── */
.rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px 16px 16px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fcfaf4 0%, #f8f4ea 100%);
  z-index: 4;
}
.rail-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.rail-head h2 {
  margin: 0;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .24em;
  color: var(--ink-2);
}
.rail-head span {
  font-family: var(--num);
  font-size: 10.5px; color: var(--faint);
  letter-spacing: .1em;
}
.vol-list { display: flex; flex-direction: column; gap: 1px; min-height: 0; flex: 1; overflow-y: auto; }
.vol-list::-webkit-scrollbar { width: 4px; }
.vol-list::-webkit-scrollbar-thumb { background: rgba(150, 130, 95, .35); border-radius: 2px; }
.vol {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "no range" "title range";
  gap: 1px 8px;
  width: 100%;
  padding: 6px 8px 6px 12px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background .16s, border-color .16s, transform .16s;
}
.vol .no {
  grid-area: no;
  font-size: 9.5px; letter-spacing: .18em; color: var(--faint);
  font-family: var(--sans);
}
.vol .title {
  grid-area: title;
  font-size: 13.5px; letter-spacing: .05em; color: var(--ink-2);
  display: flex; align-items: center; gap: 7px;
}
.vol .range {
  grid-area: range;
  align-self: center;
  font-family: var(--num);
  font-size: 9.5px; color: var(--faint);
  letter-spacing: .02em;
  white-space: nowrap;
}
.vol:hover { background: rgba(255, 255, 255, .55); transform: translateX(2px); }
.vol.on {
  background: linear-gradient(to right, rgba(143, 54, 36, .085), rgba(143, 54, 36, 0));
  border-left-color: var(--vermilion);
}
.vol.on .title { color: var(--ink); font-weight: 600; }
.vol.on .no { color: var(--vermilion); }
.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--faint); flex: 0 0 auto;
}
.dot.ready { background: var(--vermilion); box-shadow: 0 0 0 3px rgba(143, 54, 36, .12); }
.dot.planned { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); }
.vol-overview {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  margin-bottom: 10px;
  font-size: 12px; letter-spacing: .1em; color: var(--ink-2);
  transition: background .16s, border-color .16s;
}
.vol-overview:hover { background: #fff; border-color: rgba(143, 54, 36, .3); }
.vol-overview.on { border-color: var(--vermilion); color: var(--vermilion); background: rgba(143, 54, 36, .05); }
.vol-overview .mini {
  display: flex; gap: 2px; margin-left: auto;
}
.vol-overview .mini i {
  width: 4px; height: 12px; background: var(--line); border-radius: 1px;
}
.vol-overview .mini i.ready { background: var(--vermilion); }
.rail-foot { margin-top: auto; padding: 14px 2px 0; border-top: 1px solid var(--line); }
.prog-line { display: flex; justify-content: space-between; font-size: 10px; color: var(--dim); letter-spacing: .06em; }
.prog-bar { height: 2px; background: var(--line); margin: 7px 0 9px; overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: var(--vermilion); width: 12.5%; transition: width .4s ease; }
.rail-foot .meta { font-family: var(--num); font-size: 9px; color: var(--faint); letter-spacing: .06em; }

/* ── 地图舞台 ───────────────────────────────────────── */
.stage {
  grid-area: stage;
  position: relative;
  overflow: hidden;
  background: #e9e2d2;
  min-height: 0;
}
#map {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
#map.dragging { cursor: grabbing; }
#map text { pointer-events: none; }
.polity { cursor: pointer; transition: fill-opacity .16s, stroke-width .16s; }
.polity:hover, .polity.hot { fill-opacity: .38; stroke-width: 2; }
.polity.sel { fill-opacity: .46; stroke-width: 2.6; }
.pin { cursor: pointer; }
.pin .hit { fill: transparent; }
.pin:hover .halo { opacity: .55; }
.pin.anchor:hover circle:last-of-type { stroke-opacity: .5; }
.map-label {
  font-family: var(--serif);
  paint-order: stroke;
  stroke: #f7f3e8;
  stroke-width: 3.2px;
  stroke-linejoin: round;
  fill: #4a443c;
  letter-spacing: .06em;
}
.map-label.polity { font-size: 15.5px; font-weight: 600; fill: #3d3830; stroke-width: 4.2px; }
.map-label.capital { font-size: 11.5px; fill: #4b443a; }
.map-label.event { font-size: 11px; fill: #7c3a28; }
.map-label .yr { font-family: var(--num); font-size: 9.5px; fill: #8a6a55; }

.stage-head {
  position: absolute; left: 18px; top: 16px; z-index: 3;
  padding: 8px 12px 9px;
  background: rgba(251, 248, 240, .86);
  border: 1px solid rgba(120, 100, 70, .2);
  border-radius: 2px;
  box-shadow: var(--shadow);
  pointer-events: none;
  max-width: calc(100% - 120px);
}
.stage-head .k {
  font-family: var(--sans);
  font-size: 9px; letter-spacing: .22em; color: var(--dim);
  margin-bottom: 3px;
}
.stage-head .t { font-size: 14px; letter-spacing: .08em; }
.stage-head .t b { font-weight: 600; }
.stage-head .s { margin-top: 2px; font-size: 10px; color: var(--dim); letter-spacing: .04em; }
.stage-head .back {
  pointer-events: auto;
  border: 0; background: none; padding: 0 0 0 8px; margin-left: 2px;
  color: var(--vermilion); cursor: pointer; font-size: 11px;
}
.stage-head .back:hover { text-decoration: underline; }

.map-tools {
  position: absolute; right: 16px; top: 16px; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.tool-group {
  display: flex; gap: 3px;
  padding: 3px;
  background: rgba(251, 248, 240, .9);
  border: 1px solid rgba(120, 100, 70, .2);
  border-radius: 2px;
  box-shadow: var(--shadow);
}
.tool {
  min-width: 28px; height: 26px;
  padding: 0 5px;
  border: 0; border-radius: 1px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11px; letter-spacing: .04em;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.tool:hover { background: rgba(143, 54, 36, .07); color: var(--vermilion); }
.tool.on { background: var(--ink); color: #f8f2e4; }
.tool:disabled { color: var(--faint); cursor: not-allowed; background: transparent; }
.tool-num { font-family: var(--num); font-size: 15px; line-height: 1; }

.legend {
  position: absolute; left: 18px; bottom: 16px; z-index: 3;
  padding: 9px 11px;
  background: rgba(251, 248, 240, .87);
  border: 1px solid rgba(120, 100, 70, .2);
  border-radius: 2px;
  box-shadow: var(--shadow);
  font-size: 10px; color: var(--ink-2);
  pointer-events: none;
  max-width: 210px;
}
.legend .row { display: flex; align-items: center; gap: 7px; margin: 3px 0; }
.legend .sw { width: 13px; height: 8px; border-radius: 1px; flex: 0 0 auto; }
.legend .sw.terr { background: rgba(95, 158, 125, .32); border: 1px solid #2f5f48; }
.legend.plan .sw.terr { background: transparent; border: 1px dashed #8a8175; opacity: .65; }
.legend .sw.cap { width: 7px; height: 7px; border-radius: 50%; background: #4b443a; margin: 0 3px; }
.legend .sw.evt { width: 7px; height: 7px; background: var(--vermilion); transform: rotate(45deg); margin: 0 3px; }
.legend .scale { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line); }
.legend .scale .bar { height: 4px; border: 1px solid #6f6658; border-top: 0; margin-bottom: 2px; }
.legend .scale .txt { font-family: var(--num); font-size: 9px; color: var(--dim); }
.map-empty {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 3; display: none;
  padding: 7px 12px;
  background: rgba(251, 248, 240, .9);
  border: 1px dashed rgba(120, 100, 70, .35);
  border-radius: 2px;
  box-shadow: var(--shadow);
  font-size: 10px; color: var(--dim);
  white-space: nowrap;
}
.map-empty.on { display: flex; align-items: baseline; gap: 8px; }
.map-empty b { font-weight: 600; color: #7d4a3b; letter-spacing: .06em; }
.map-empty span { color: var(--faint); }
.map-note {
  position: absolute; right: 16px; bottom: 15px; z-index: 3;
  padding: 4px 7px;
  background: rgba(251, 248, 240, .78);
  font-size: 9px; letter-spacing: .04em; color: #8b7d6a;
  pointer-events: none;
}

.map-tip {
  position: absolute; z-index: 8;
  width: 250px;
  padding: 12px 13px 11px;
  background: var(--card);
  border: 1px solid rgba(120, 100, 70, .26);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(60, 45, 20, .08), 0 16px 40px rgba(60, 45, 20, .16);
  display: none;
}
.map-tip.on { display: block; animation: tipIn .18s ease-out; }
@keyframes tipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.map-tip .close {
  position: absolute; right: 6px; top: 5px;
  border: 0; background: none; cursor: pointer;
  color: var(--faint); font-size: 14px; line-height: 1; padding: 3px;
}
.map-tip .close:hover { color: var(--vermilion); }
.map-tip h4 { margin: 0 0 3px; font-size: 14px; letter-spacing: .06em; }
.map-tip .meta { font-size: 10px; color: var(--dim); letter-spacing: .04em; margin-bottom: 6px; }
.map-tip p { margin: 0 0 5px; font-size: 11.5px; line-height: 1.75; color: var(--ink-2); }
.map-tip .src { font-size: 9.5px; color: var(--faint); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }

/* ── 右栏详情 ───────────────────────────────────────── */
.detail {
  grid-area: detail;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 22px 34px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfbf6 0%, #f9f5eb 100%);
  z-index: 4;
}
.detail::-webkit-scrollbar { width: 6px; }
.detail::-webkit-scrollbar-thumb { background: rgba(150, 130, 95, .26); border-radius: 999px; }
.detail > .inner { animation: fadeUp .32s cubic-bezier(.22, .8, .3, 1); }
.detail::after {
  content: ""; position: sticky; bottom: -1px; display: block;
  height: 26px; margin-top: -26px;
  background: linear-gradient(rgba(249, 245, 235, 0), #f9f5eb 78%);
  pointer-events: none;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eyebrow {
  font-family: var(--sans);
  font-size: 9.5px; letter-spacing: .24em; color: var(--vermilion);
  margin-bottom: 7px;
}
.detail h2 {
  margin: 0;
  font-size: 27px; font-weight: 600; letter-spacing: .08em; line-height: 1.25;
}
.range {
  margin-top: 6px;
  font-family: var(--num);
  font-size: 11.5px; color: var(--dim); letter-spacing: .05em;
}
.range .sep { margin: 0 7px; color: var(--faint); }
.range .cn { font-family: var(--serif); font-size: 10.5px; letter-spacing: .08em; }
.tagline {
  margin: 15px 0 12px;
  padding-left: 10px;
  border-left: 2px solid rgba(143, 54, 36, .5);
  font-size: 13.5px; line-height: 1.75; color: #4c443b;
  letter-spacing: .02em;
}
.summary {
  margin: 0 0 16px;
  font-size: 12px; line-height: 1.95; color: var(--ink-2);
  text-align: justify;
}
.actions { display: flex; flex-direction: column; gap: 7px; margin: 4px 0 18px; }
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px;
  background: var(--vermilion);
  color: #fbf3e2;
  text-decoration: none;
  border: 1px solid var(--vermilion);
  border-radius: 2px;
  font-size: 13px; letter-spacing: .12em;
  cursor: pointer;
  transition: background .16s, transform .12s, box-shadow .16s;
  box-shadow: 0 4px 14px rgba(143, 54, 36, .2);
}
.cta:hover { background: #7c2d1d; box-shadow: 0 6px 18px rgba(143, 54, 36, .26); }
.cta:active { transform: translateY(1px); }
.cta .arrow { font-family: var(--sans); font-size: 13px; letter-spacing: 0; }
.cta.ghost {
  background: transparent; color: var(--dim);
  border: 1px dashed var(--line); box-shadow: none;
  cursor: default;
  font-size: 12px;
}
.cta.ghost:hover { background: transparent; }
.subact {
  align-self: center;
  border: 0; background: none; cursor: pointer;
  font-size: 10.5px; letter-spacing: .08em; color: var(--dim);
  padding: 2px;
}
.subact:hover { color: var(--vermilion); text-decoration: underline; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  margin: 0 0 18px;
}
.stats div { padding: 0 6px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; padding-left: 0; }
.stats b { display: block; font-family: var(--num); font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.stats span { display: block; margin-top: 2px; font-size: 9.5px; color: var(--dim); letter-spacing: .06em; }
.stats.planned b { font-size: 13px; font-family: var(--serif); font-weight: 500; color: var(--ink-2); }

section.blk { margin: 0 0 19px; }
section.blk h3 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 9px;
  font-size: 10px; font-weight: 600; letter-spacing: .2em; color: var(--dim);
}
section.blk h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
section.blk h3 .n { font-family: var(--num); font-weight: 400; letter-spacing: 0; color: var(--faint); }

.ev { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px dotted rgba(150, 130, 95, .22); }
.ev:last-child { border-bottom: 0; }
.ev .y { font-family: var(--num); font-size: 11px; color: var(--vermilion); letter-spacing: .02em; padding-top: 1px; }
.ev .t { font-size: 12px; line-height: 1.5; color: var(--ink); }
.ev .p { display: block; margin-top: 2px; font-size: 9.5px; color: var(--dim); line-height: 1.5; }
.ev .p em { font-style: normal; color: var(--faint); }

.reg { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dotted rgba(150, 130, 95, .22); }
.reg:last-child { border-bottom: 0; }
.reg .nm { font-size: 12px; color: var(--ink); }
.reg .nm i { font-style: normal; font-size: 9px; color: var(--faint); margin-left: 6px; letter-spacing: .04em; }
.reg .yr { font-family: var(--num); font-size: 10px; color: var(--dim); white-space: nowrap; }
.reg .cap { font-size: 9.5px; color: var(--faint); white-space: nowrap; }
.reg-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.reg-btn {
  border: 1px solid var(--line); background: rgba(255, 255, 255, .5);
  border-radius: 999px; padding: 4px 9px;
  font-size: 10.5px; color: var(--ink-2); cursor: pointer;
  transition: border-color .14s, color .14s, background .14s;
}
.reg-btn:hover, .reg-btn.on { border-color: var(--vermilion); color: var(--vermilion); background: rgba(143, 54, 36, .05); }
.reg-btn small { font-family: var(--num); font-size: 8.5px; color: var(--faint); margin-left: 4px; }

.cov { margin: 0; padding: 0 0 0 2px; list-style: none; }
.cov li { position: relative; padding: 3px 0 3px 14px; font-size: 11px; line-height: 1.65; color: var(--ink-2); }
.cov li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 4px; height: 4px; background: var(--faint); transform: rotate(45deg); }
.cov li.todo::before { background: transparent; box-shadow: inset 0 0 0 1px var(--faint); }
.srcs { margin: 0; padding: 0; list-style: none; }
.srcs li { font-size: 10px; line-height: 1.8; color: var(--dim); padding-left: 11px; text-indent: -11px; }
.srcs li::before { content: "·"; margin-right: 5px; color: var(--faint); }
.note {
  margin: 16px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 9.5px; line-height: 1.8; color: var(--faint);
}
.note b { font-weight: 500; color: var(--dim); }
.status-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px;
  border: 1px solid rgba(143, 54, 36, .3);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 9px; letter-spacing: .08em; color: var(--vermilion);
  vertical-align: 2px;
}
.status-chip.plan { border-color: var(--line); color: var(--dim); }
.status-chip i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

/* ── 时间轴 ─────────────────────────────────────────── */
.timeline {
  grid-area: timeline;
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 9px 22px 10px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f9f5ea 0%, #f3ecdd 100%);
  z-index: 5;
}
.tl-head {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 10px; letter-spacing: .16em; color: var(--dim);
  padding-bottom: 4px;
}
.tl-head b { font-weight: 600; color: var(--ink-2); letter-spacing: .2em; }
.tl-head .span { font-family: var(--num); letter-spacing: .04em; color: var(--faint); }
.tl-head .hint { margin-left: auto; font-size: 9.5px; letter-spacing: .04em; color: var(--faint); }
.tl-scroll { flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; }
.tl-scroll::-webkit-scrollbar { height: 4px; }
.tl-scroll::-webkit-scrollbar-thumb { background: rgba(150, 130, 95, .25); border-radius: 999px; }
.tl-inner { position: relative; min-width: 760px; height: 108px; }
.tl-bracket {
  position: absolute; top: 1px; height: 5px;
  border: 1px solid rgba(143, 54, 36, .55); border-bottom: 0;
  opacity: 0; transition: opacity .2s, left .3s, width .3s;
  pointer-events: none;
}
.tl-bracket.on { opacity: 1; }
.tl-bracket::before, .tl-bracket::after {
  content: ""; position: absolute; top: -1px; width: 1px; height: 5px; background: rgba(143, 54, 36, .55);
}
.tl-bracket::before { left: -1px; }
.tl-bracket::after { right: -1px; }
.tl-rows { position: absolute; left: 0; right: 0; top: 8px; height: 66px; }
.band {
  position: absolute; height: 25px;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 0 5px;
  font-size: 11px; line-height: 23px;
  color: #5a5248;
  white-space: nowrap; overflow: hidden;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s, transform .12s;
}
.band.row-1 { top: 34px; }
.band:hover { transform: translateY(-1px); border-color: rgba(90, 75, 55, .35); }
.band.on { color: #fbf3e2; border-color: rgba(0, 0, 0, .12); }
.band .lb { pointer-events: none; }
.band .sm { font-family: var(--num); font-size: 8.5px; opacity: .65; margin-left: 4px; }
.band.hidden-label .lb { display: none; }
.tl-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 20px; border-top: 1px solid var(--line); }
.tick { position: absolute; top: 0; width: 1px; height: 5px; background: var(--line); }
.tick.major { height: 7px; background: #c3b8a5; }
.tick span {
  position: absolute; top: 7px; left: 0; transform: translateX(-50%);
  font-family: var(--num); font-size: 9.5px; color: var(--faint); white-space: nowrap;
}
.tl-tip {
  position: absolute; z-index: 9; display: none;
  max-width: min(460px, calc(100vw - 40px));
  padding: 5px 8px;
  background: rgba(43, 41, 36, .94);
  color: #f6efdf;
  font-size: 10px; line-height: 1.6;
  border-radius: 2px;
  pointer-events: none;
  white-space: normal;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.tl-tip.on { display: block; }
.tl-tip b { color: #f0d9a8; font-weight: 500; }

/* ── 弹层 ───────────────────────────────────────────── */
dialog.about {
  width: min(680px, calc(100vw - 40px));
  max-height: min(78vh, 720px);
  padding: 0;
  border: 1px solid rgba(120, 100, 70, .3);
  border-radius: 2px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(40, 30, 15, .3);
}
dialog.about::backdrop { background: rgba(40, 34, 24, .38); }
.about-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.about-head h2 { margin: 0; font-size: 20px; letter-spacing: .1em; }
.about-head p { margin: 3px 0 0; font-size: 10px; color: var(--dim); letter-spacing: .08em; }
.about-head button {
  margin-left: auto; border: 1px solid var(--line); background: none;
  width: 28px; height: 28px; cursor: pointer; color: var(--dim); border-radius: 2px;
}
.about-head button:hover { color: var(--vermilion); border-color: var(--vermilion); }
.about-body { padding: 18px 22px 24px; overflow-y: auto; max-height: calc(78vh - 78px); }
.about-body h3 { margin: 20px 0 8px; font-size: 10.5px; letter-spacing: .18em; color: var(--dim); font-weight: 600; }
.about-body h3:first-child { margin-top: 0; }
.about-body p, .about-body li { font-size: 11.5px; line-height: 1.9; color: var(--ink-2); }
.about-body ul { margin: 0; padding-left: 16px; }
.about-body code {
  font-family: var(--num); font-size: 10.5px;
  background: rgba(120, 100, 70, .08); padding: 1px 4px; border-radius: 2px;
}
.about-body a { color: var(--vermilion); text-decoration: none; border-bottom: 1px solid rgba(143, 54, 36, .3); }
.about-body a:hover { border-bottom-color: var(--vermilion); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.about-grid div { display: flex; gap: 6px; font-size: 11px; color: var(--ink-2); }
.about-grid b { font-weight: 500; color: var(--ink); min-width: 44px; }
.warn {
  margin-top: 10px; padding: 9px 11px;
  border-left: 2px solid var(--vermilion);
  background: rgba(143, 54, 36, .045);
  font-size: 10.5px; line-height: 1.8; color: #6d4337;
}

@media (max-width: 1240px) {
  .app { grid-template-columns: 238px minmax(0, 1fr) 322px; }
  .brand h1 { font-size: 17px; }
  .top-meta { display: none; }
  .detail { padding: 20px 18px 30px; }
  .detail h2 { font-size: 24px; }
}

@media (max-width: 960px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 54px 48px minmax(220px, 42vh) minmax(0, 1fr) 128px;
    grid-template-areas: "top" "rail" "stage" "detail" "timeline";
  }
  .topbar { padding: 0 12px; gap: 10px; }
  .mark { width: 26px; height: 26px; font-size: 15px; }
  .brand h1 { font-size: 15px; letter-spacing: .08em; }
  .brand small { display: none; }
  .top-links { gap: 0; }
  .linkbtn { padding: 6px 7px; font-size: 11px; }
  .compliance { display: none; }
  .rail {
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail::-webkit-scrollbar { height: 0; }
  .rail-head, .rail-foot { display: none; }
  .vol-list { flex-direction: row; gap: 6px; flex: 0 0 auto; overflow-y: visible; overflow-x: visible; }
  .vol {
    flex: 0 0 auto;
    width: auto;
    min-width: 118px;
    grid-template-columns: 1fr;
    grid-template-areas: "title" "range";
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: rgba(255, 255, 255, .42);
  }
  .vol .no { display: none; }
  .vol .title { font-size: 12px; gap: 5px; }
  .vol .range { font-size: 8.5px; color: var(--faint); }
  .vol.on { border-color: rgba(143, 54, 36, .28); background: rgba(143, 54, 36, .07); }
  .vol-overview { display: none; }
  .map-label.polity { font-size: 13px; stroke-width: 3.8px; }
  .map-label.capital { font-size: 10.5px; }
  .map-label.event { font-size: 10px; }
  .detail { border-left: 0; border-top: 1px solid var(--line); padding: 16px 16px 26px; }
  .detail h2 { font-size: 22px; }
  .tagline { font-size: 12.5px; margin: 12px 0 10px; }
  .summary { font-size: 11.5px; line-height: 1.9; }
  .cta { height: 36px; font-size: 12.5px; }
  .stage-head { left: 10px; top: 10px; padding: 6px 9px 7px; max-width: calc(100% - 100px); }
  .stage-head .t { font-size: 12px; }
  .stage-head .k { font-size: 8px; }
  .stage-head .s { font-size: 9px; }
  .map-tools { right: 10px; top: 10px; bottom: auto; transform: none; gap: 4px; }
  .tool { min-width: 25px; height: 23px; font-size: 10px; }
  .tool-num { font-size: 14px; }
  .legend { left: 10px; bottom: 10px; padding: 6px 8px; font-size: 9px; max-width: 170px; }
  .legend .scale { display: none; }
  .map-empty {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 3; display: none;
  padding: 7px 12px;
  background: rgba(251, 248, 240, .9);
  border: 1px dashed rgba(120, 100, 70, .35);
  border-radius: 2px;
  box-shadow: var(--shadow);
  font-size: 10px; color: var(--dim);
  white-space: nowrap;
}
.map-empty.on { display: flex; align-items: baseline; gap: 8px; }
.map-empty b { font-weight: 600; color: #7d4a3b; letter-spacing: .06em; }
.map-empty span { color: var(--faint); }
.map-note { right: 10px; bottom: 9px; font-size: 8px; }
  .timeline { padding: 7px 12px 8px; }
  .tl-head .hint { display: none; }
  .tl-inner { min-width: 820px; height: 86px; }
  .stats b { font-size: 15px; }
  .map-tip { width: min(250px, calc(100vw - 40px)); }
}

@media (max-width: 480px) {
  .app { grid-template-rows: 50px 46px minmax(200px, 38vh) minmax(0, 1fr) 118px; }
  .brand h1 { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
  .brand { min-width: 0; }
  .top-links .linkbtn { padding: 5px 5px; font-size: 10.5px; }
  .map-empty { display: none !important; }
  .map-note { right: 8px; bottom: 8px; font-size: 7.5px; }
  .detail { padding: 14px 13px 24px; }
  .detail h2 { font-size: 20px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px 0; }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats b { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .detail > .inner, .map-tip.on { animation: none; }
}
