/* 海口游学 · 研究提案 · OpenAI 浅色主题
   离线可用、投影可读、可打印。 */

:root {
  --bg:        #ffffff;
  --paper:     #ffffff;
  --paper-2:   #f7f7f8;
  --card:      #f7f7f8;
  --card-2:    #fbfbfb;
  --ink:       #0d0d0d;
  --ink-soft:  #4b4b4b;
  --ink-faint: #8e8e8e;
  --rule:      #ececec;
  --rule-dark: #d9d9d9;
  --accent:    #10a37f;

  --sea:       #dee6e7;
  --land:      #e6e1d3;
  --land-line: #b9b09b;

  --c-ming: #2f6f7e;
  --c-war:  #8c3a2b;
  --c-farm: #7a6a3a;
  --c-road: #4a5d8f;
  --c-bg:   #8a8375;

  --ok:   #167a4a;
  --warn: #9a6700;
  --todo: #b42318;

  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --kai:  "KaiTi", "Kaiti SC", "STKaiti", "SimSun", serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: linear-gradient(180deg, #fbfbfb 0%, #ffffff 26%, #ffffff 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
body > * { position: relative; z-index: 1; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ── 顶栏 ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.topbar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; padding: 8px 28px; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: .02em; white-space: nowrap; color: var(--ink); }
.brand span { color: var(--ink-faint); font-weight: 400; margin-left: 10px; font-size: 13px; }
.nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 13.5px; padding: 6px 10px; border-radius: 8px;
  transition: color .18s, background .18s;
}
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.on { color: var(--ink); background: var(--paper-2); font-weight: 600; }

/* ── 封面 ─────────────────────────────────────────────── */
.hero { padding: 96px 0 64px; border-bottom: 1px solid var(--rule); }
.hero .eyebrow { font-size: 12.5px; letter-spacing: .2em; color: var(--accent); margin-bottom: 24px; }
.hero h1 {
  font-size: clamp(32px, 5.2vw, 62px);
  line-height: 1.16; margin: 0 0 8px; font-weight: 800;
  letter-spacing: -.03em; max-width: 22em;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede {
  font-family: var(--kai);
  font-size: clamp(17px, 1.7vw, 20px);
  line-height: 2; color: var(--ink-soft);
  max-width: 34em; margin: 26px 0 0;
  padding-left: 20px; border-left: 3px solid var(--rule-dark);
}
.hero .meta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 13px; color: var(--ink-faint); }
.hero .meta b { color: var(--ink-soft); font-weight: 600; }

/* ── 通用区块 ─────────────────────────────────────────── */
section { padding: 66px 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: 0; }
.sec-head { margin-bottom: 34px; }
.sec-head .num { font-size: 12px; letter-spacing: .2em; color: var(--accent); display: block; margin-bottom: 10px; }
.sec-head h2 { font-size: clamp(23px, 2.8vw, 32px); margin: 0; font-weight: 800; letter-spacing: -.02em; }
.sec-head p { color: var(--ink-soft); max-width: 46em; margin: 12px 0 0; font-size: 15px; }

.method {
  background: var(--card); border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: 24px 26px; color: var(--ink-soft);
  font-family: var(--kai); font-size: 16px; line-height: 2;
  border-radius: 8px;
}

/* ── 地图（纸面） ─────────────────────────────────────── */
.map-layout { display: grid; grid-template-columns: 1fr 268px; gap: 34px; align-items: start; }
@media (max-width: 900px) { .map-layout { grid-template-columns: 1fr; } }

.map-frame {
  background: var(--sea); border: 1px solid var(--rule-dark);
  border-radius: 10px; padding: 10px; position: relative;
  box-shadow: 0 14px 40px rgba(0,0,0,.06);
}
.map-frame svg { display: block; width: 100%; height: auto; }
.map-note {
  position: absolute; right: 16px; bottom: 14px;
  font-size: 11px; color: #5d6a6c; background: rgba(255,255,255,.82);
  padding: 3px 8px; border-radius: 4px;
}
.area { fill: var(--land); stroke: var(--land-line); stroke-width: .0035; }
.area.on  { fill: #cfc2a2; stroke-width: .006; }
.area.off { fill: #eeeadf; }
.map-label { font-size: .030px; fill: #83806f; font-family: var(--sans); pointer-events: none; }

.mk { cursor: pointer; }
.mk .dot { fill: #fff; stroke-width: .0045; transition: r .15s; }
.mk .ring { fill: none; stroke-width: .003; opacity: .38; transition: opacity .15s; }
.mk:hover .dot { r: .021; }
.mk:hover .ring { opacity: .95; }
.mk.dim { opacity: .16; }
.mk text {
  font-size: .034px; font-family: var(--sans); font-weight: 600;
  paint-order: stroke; stroke: rgba(242,239,232,.95); stroke-width: .013;
  stroke-linejoin: round; pointer-events: none;
}

.legend { font-size: 13.5px; color: var(--ink-soft); }
.legend h4 { font-size: 12px; letter-spacing: .16em; color: var(--ink-faint); margin: 0 0 12px; font-weight: 600; }
.legend-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.legend-list button {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: #fff; border: 1px solid var(--rule);
  border-radius: 8px; padding: 9px 11px; cursor: pointer;
  font-family: var(--sans); font-size: 13px; color: var(--ink-soft);
  text-align: left; transition: border-color .15s, background .15s;
}
.legend-list button:hover { border-color: var(--rule-dark); }
.legend-list button.off { opacity: .42; }
.legend-list button.on { border-color: var(--accent); color: var(--ink); background: rgba(16,163,127,.06); }
.swatch { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }

/* ── 时间轴 ───────────────────────────────────────────── */
.tl-scroll { overflow-x: auto; padding: 14px 0 16px; }
.tl { display: flex; gap: 0; min-width: 860px; border-top: 2px solid var(--ink); padding-top: 0; }
.tl-item { flex: 1 1 0; min-width: 88px; position: relative; padding: 20px 12px 0 0; cursor: default; }
.tl-item::before {
  content: ""; position: absolute; left: 0; top: -6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--c-bg);
}
.tl-item.key::before { width: 13px; height: 13px; top: -8px; border-width: 3px; }
.tl-item .y { font-size: 15px; font-weight: 700; letter-spacing: .01em; display: block; margin-bottom: 5px; }
.tl-item .t { font-size: 12.5px; color: var(--ink-faint); line-height: 1.62; display: block; }

/* ── 因果链 ───────────────────────────────────────────── */
.chain { margin-bottom: 74px; }
.chain:last-child { margin-bottom: 0; }
.chain-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 8px; }
.chain-no {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  color: #fff; padding: 4px 10px; border-radius: 4px; margin-top: 7px;
}
.chain-head h3 { font-size: clamp(20px, 2.3vw, 27px); margin: 0; font-weight: 800; line-height: 1.45; }
.chain-kicker { font-size: 12.5px; color: var(--ink-faint); letter-spacing: .1em; margin: 10px 0 0; }
.chain-claim {
  font-family: var(--kai); font-size: 17.5px; line-height: 2;
  color: var(--ink-soft); margin: 18px 0 34px; max-width: 40em;
  padding-left: 18px; border-left: 3px solid var(--rule-dark);
}

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 34px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 0 26px 0 24px; }
.step + .step { border-left: 1px dashed var(--rule-dark); }
@media (max-width: 860px) {
  .step { padding: 22px 0; }
  .step + .step { border-left: 0; border-top: 1px dashed var(--rule-dark); }
}
.step .tag {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  letter-spacing: .16em; padding: 3px 9px; border-radius: 4px;
  color: #fff; margin-bottom: 12px;
}
.step p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.9; }
.step .arrow {
  position: absolute; right: -9px; top: 3px; z-index: 2;
  width: 18px; height: 18px; line-height: 16px; text-align: center;
  background: #fff; color: var(--ink-faint); font-size: 13px;
}
@media (max-width: 860px) { .step .arrow { display: none; } }

.facts { display: flex; flex-direction: column; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin-bottom: 26px; }
.fact { background: #fff; padding: 15px 18px; display: flex; gap: 14px; align-items: flex-start; }
.fact .body { flex: 1; font-size: 14px; color: var(--ink-soft); line-height: 1.85; }
.fact .refs { margin-top: 7px; font-size: 12px; color: var(--ink-faint); }
.fact .refs a { color: var(--ink-faint); text-decoration: none; border-bottom: 1px dotted var(--rule-dark); }
.fact .refs a:hover { color: var(--accent); }
.fact .refs i { font-style: normal; }
.badge {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 4px; margin-top: 3px; white-space: nowrap;
  border: 1px solid;
}
.badge.ok   { color: var(--ok);   border-color: rgba(22,122,74,.35);  background: rgba(22,122,74,.07); }
.badge.warn { color: var(--warn); border-color: rgba(154,103,0,.35);  background: rgba(154,103,0,.07); }
.badge.todo { color: var(--todo); border-color: rgba(180,35,24,.3);   background: rgba(180,35,24,.06); }

.today {
  background: var(--card); border: 1px solid var(--rule-dark);
  border-top: 3px solid var(--accent); padding: 20px 22px; border-radius: 10px;
  margin-bottom: 26px;
}
.today h4 { margin: 0 0 9px; font-size: 13px; letter-spacing: .16em; color: var(--ink-faint); font-weight: 600; }
.today p { margin: 0; font-size: 15px; color: var(--ink); line-height: 1.95; }
.today .note { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--rule); font-size: 13.5px; color: var(--warn); }

/* ── 出处表 ───────────────────────────────────────────── */
table.src { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.src th {
  text-align: left; font-size: 11.5px; letter-spacing: .14em; color: var(--ink-faint);
  border-bottom: 2px solid var(--ink); padding: 0 12px 9px 0; font-weight: 600;
}
table.src td { border-bottom: 1px solid var(--rule); padding: 12px 12px 12px 0; vertical-align: top; color: var(--ink-soft); }
table.src tr:last-child td { border-bottom: 0; }
table.src a { color: var(--ink-soft); word-break: break-all; }
table.src a:hover { color: var(--accent); }
.kind {
  font-size: 11px; padding: 2px 7px; border-radius: 4px; white-space: nowrap;
  border: 1px solid var(--rule-dark); color: var(--ink-soft);
}
.kind.政府 { border-color: rgba(22,122,74,.4); color: var(--ok); background: rgba(22,122,74,.06); }
.kind.官媒 { border-color: rgba(16,163,127,.4); color: var(--accent); background: rgba(16,163,127,.06); }
.kind.媒体转述 { border-color: rgba(154,103,0,.4); color: var(--warn); background: rgba(154,103,0,.06); }
.kind.需升级 { border-color: rgba(180,35,24,.35); color: var(--todo); background: rgba(180,35,24,.05); }
.idcode { font-family: Consolas, "Courier New", monospace; font-size: 12px; color: var(--ink-faint); }

/* ── 页脚 ─────────────────────────────────────────────── */
footer { padding: 46px 0 60px; color: var(--ink-faint); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 26px; }
footer a { color: var(--ink-soft); }
footer a:hover { color: var(--accent); }

/* ══ 研究提案 ══════════════════════════════════════════ */
.q-main { font-size: clamp(24px, 3vw, 36px); font-weight: 800; line-height: 1.45; color: var(--ink); margin: 0 0 10px; max-width: 26em; letter-spacing: -.02em; }
.q-narrow { font-family: var(--kai); font-size: 17px; color: var(--ink-soft); margin: 0 0 26px; max-width: 44em; line-height: 1.9; }
.q-subs { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
.q-sub { background: #fff; padding: 15px 18px; display: flex; gap: 16px; align-items: flex-start; }
.q-sub.counter { background: rgba(16,163,127,.05); }
.q-sub .q-no { flex: 0 0 auto; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--ink-faint); padding-top: 3px; white-space: nowrap; }
.q-sub.counter .q-no { color: var(--accent); }
.q-sub p { margin: 0; font-size: 15px; color: var(--ink-soft); line-height: 1.85; }
.q-why { font-family: var(--kai); font-size: 17px; color: var(--ink); line-height: 2; border-left: 3px solid var(--c-war); padding-left: 18px; max-width: 42em; margin: 0; }

.mot-lead { font-size: 19px; font-weight: 700; color: var(--ink); margin: 0 0 16px; }
#motivation-body p { max-width: 42em; color: var(--ink-soft); font-size: 15.5px; line-height: 1.95; }
#motivation-body p + p { margin-top: 12px; }

.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 26px; }
@media (max-width: 860px) { .stages { grid-template-columns: 1fr; } }
.stage { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; }
.stage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.stage-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.stage-when { font-size: 11.5px; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.stage-desc { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 10px; line-height: 1.75; }
.stage ul { margin: 0; padding: 0; list-style: none; }
.stage li { position: relative; padding-left: 18px; font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 6px; }
.stage li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

.standards { border-top: 1px solid var(--rule); }
.std { display: flex; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14px; align-items: baseline; }
.std-k { flex: 0 0 9em; color: var(--ink); font-weight: 600; }
.std-v { color: var(--ink-soft); line-height: 1.8; }
@media (max-width: 620px) { .std { flex-direction: column; gap: 4px; } .std-k { flex: none; } }

.sub-head { margin: 40px 0 4px; }
.sub-head h3 { font-size: 18px; margin: 0 0 6px; color: var(--ink); }
.sub-head p { color: var(--ink-soft); font-size: 14px; margin: 0; }

.field-plan { display: grid; gap: 14px; margin-top: 18px; }
.field-group { border: 1px dashed var(--rule-dark); border-radius: 10px; padding: 16px 20px; background: var(--card-2); }
.fg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.fg-no { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: #fff; padding: 3px 9px; border-radius: 4px; }
.fg-title { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.field-group ul { margin: 0; padding: 0; list-style: none; }
.field-group li { position: relative; padding-left: 24px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 7px; }
.field-group li::before { content: ""; position: absolute; left: 3px; top: 8px; width: 10px; height: 10px; border: 1.5px solid var(--rule-dark); border-radius: 3px; }

.deliver-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 18px; }
@media (max-width: 860px) { .deliver-grid { grid-template-columns: 1fr; } }
.deliver { background: var(--card); border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 10px; padding: 18px 20px; }
.deliver h4 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.deliver p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }
.deliver-note { font-family: var(--kai); font-size: 16px; color: var(--ink); line-height: 1.95; border-left: 3px solid var(--rule-dark); padding-left: 18px; max-width: 46em; }

.fstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 18px; }
@media (max-width: 760px) { .fstats { grid-template-columns: repeat(2, 1fr); } }
.fstat { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; text-align: center; }
.fstat .fv { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.fstat .fl { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.fnotes { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 14px; line-height: 1.9; }
.fnotes li { margin-bottom: 6px; }

/* ── 观众反馈 ── */
.fb-form { max-width: 56rem; background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 18px 20px; }
.fb-row { display: flex; gap: 14px; flex-wrap: wrap; }
.fb-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-faint); }
.fb-form input, .fb-form select, .fb-form textarea { font-family: var(--sans); font-size: 13.5px; color: var(--ink); background: #fff; border: 1px solid var(--rule-dark); border-radius: 8px; padding: 8px 10px; }
.fb-form input { width: 180px; }
.fb-form select { width: 140px; }
.fb-form textarea { width: 100%; resize: vertical; }
.fb-comment { margin-top: 12px; }
.fb-actions { margin-top: 12px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fb-actions button { font-family: var(--sans); font-size: 13px; font-weight: 600; color: #fff; background: var(--ink); border: 1px solid var(--ink); border-radius: 8px; padding: 8px 16px; cursor: pointer; }
.fb-actions button:disabled { opacity: .5; cursor: wait; }
.fb-stats { font-size: 12px; color: var(--ink-faint); }
.fb-msg { min-height: 1.2em; margin: 8px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.fb-msg.ok { color: var(--ok); }
.fb-msg.err { color: var(--todo); }

/* ── AI 对话 ── */
.chat { max-width: 56rem; background: #fff; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.05); }
.chat-log { height: 420px; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: #fbfbfb; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: #f0f0f0; color: var(--ink); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--rule); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.sys { align-self: center; color: var(--ink-faint); font-size: 12px; background: none; padding: 4px 0; }
.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 14px; background: #fbfbfb; }
.chat-chips button { font-family: var(--sans); font-size: 12px; color: var(--ink-soft); background: #fff; border: 1px solid var(--rule-dark); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chat-chips button:hover { border-color: var(--accent); color: var(--accent); }
.chat-form { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--rule); background: #fff; }
.chat-form textarea { flex: 1; resize: none; border: 1px solid var(--rule-dark); border-radius: 10px; padding: 10px 12px; font-family: var(--sans); font-size: 14px; color: var(--ink); background: #fff; line-height: 1.5; }
.chat-form textarea:focus { outline: none; border-color: var(--accent); }
.chat-form button { background: var(--ink); color: #fff; border: 1px solid var(--ink); border-radius: 10px; padding: 0 18px; font-family: var(--sans); font-size: 14px; font-weight: 600; cursor: pointer; }
.chat-form button:disabled { opacity: .5; cursor: wait; }
.chat-note { font-size: 12px; color: var(--ink-faint); margin-top: 10px; max-width: 52em; }

/* ══ 地形推演（浅色外框 + 纸面地图） ═══════════════════ */
.rts { position: relative; border: 1px solid var(--rule-dark); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: 0 16px 46px rgba(0,0,0,.08); }
#rts-canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: crosshair; background: #87a3a9; }
.rts-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; pointer-events: none; z-index: 6; flex-wrap: wrap; }
.rts-modes { display: flex; gap: 4px; pointer-events: auto; flex-wrap: wrap; }
.rts-modes button, .rts-topright button {
  font-family: var(--sans); font-size: 12px; color: var(--ink-soft);
  background: rgba(255,255,255,.92); border: 1px solid var(--rule-dark);
  border-radius: 8px; padding: 5px 9px; cursor: pointer;
  backdrop-filter: blur(8px);
}
.rts-modes button.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.rts-modes button:hover, .rts-topright button:hover { border-color: var(--ink-faint); color: var(--ink); }
.rts-topright button.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.rts-planbar { flex-basis: 100%; display: flex; gap: 4px; pointer-events: auto; flex-wrap: wrap; }
.rts-planbar button {
  font-family: var(--sans); font-size: 12px; color: var(--ink-soft);
  background: rgba(255,255,255,.92); border: 1px solid var(--rule-dark);
  border-radius: 8px; padding: 5px 10px; cursor: pointer;
}
.rts-planbar button:hover { border-color: var(--ink-faint); color: var(--ink); }
.rts-planbar button.on { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.rts-obj { pointer-events: none; background: rgba(255,255,255,.92); border: 1px solid var(--rule-dark); border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--ink); font-weight: 600; }
.rts-topright { margin-left: auto; display: flex; gap: 4px; pointer-events: auto; }
.rts-tip { position: absolute; left: 10px; bottom: 10px; z-index: 5; background: rgba(255,255,255,.86); border: 1px solid var(--rule-dark); border-radius: 8px; padding: 4px 8px; font-size: 10.5px; color: var(--ink-faint); max-width: 62%; }
.rts-touch { position: absolute; left: 10px; bottom: 10px; z-index: 7; display: none; gap: 6px; flex-wrap: wrap; max-width: 62%; }
.rts-touch button { font-family: var(--sans); font-size: 11.5px; color: var(--ink-soft); background: rgba(255,255,255,.94); border: 1px solid var(--rule-dark); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.rts-touch button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rts-build { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); z-index: 7; width: min(92%, 720px); background: rgba(255,255,255,.94); border: 1px solid var(--rule-dark); border-radius: 10px; padding: 6px 8px; backdrop-filter: blur(8px); }
.rts-build-head { font-size: 11px; color: var(--ink-faint); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 10px; }
.rts-build-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.rts-build-btns button { font-family: var(--sans); font-size: 11px; color: var(--ink-soft); background: var(--paper-2); border: 1px solid var(--rule-dark); border-radius: 8px; padding: 4px 7px; cursor: pointer; }
.rts-build-btns button:hover { border-color: var(--accent); color: var(--ink); }
.rts-build-btns button:disabled { opacity: .35; cursor: not-allowed; }
.rts-build-btns button b { color: var(--accent); font-weight: 700; margin-left: 4px; }
.rts-unit { position: absolute; right: 10px; bottom: 172px; z-index: 6; width: 210px; background: rgba(255,255,255,.96); border: 1px solid var(--rule-dark); border-radius: 10px; padding: 9px 11px; font-size: 11.5px; color: var(--ink-soft); display: none; }
.rts-unit.on { display: block; }
.rts-unit h5 { margin: 0 0 5px; font-size: 12.5px; color: var(--ink); }
.rts-unit .row2 { display: flex; justify-content: space-between; }
.rts-unit .bar { height: 5px; background: var(--rule); border-radius: 3px; margin: 4px 0; overflow: hidden; }
.rts-unit .bar i { display: block; height: 100%; background: var(--accent); }
.rts-unit .bar.org i { background: #d0a22e; }
.rts-site { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 8; width: min(360px,82%); background: #fff; border: 1px solid var(--rule-dark); border-left: 4px solid var(--c-war); border-radius: 10px; padding: 15px 17px; display: none; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.rts-site.on { display: block; }
.rts-site h5 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.rts-site p { margin: 0 0 6px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }
.rts-site .src { font-size: 10.5px; color: var(--ink-faint); }
.rts-site .src a { color: var(--accent); }
.rts-site button { position: absolute; top: 6px; right: 9px; border: 0; background: none; font-size: 17px; color: var(--ink-faint); cursor: pointer; }
.rts-mini { position: absolute; right: 10px; bottom: 10px; z-index: 5; width: 150px; border: 1px solid var(--rule-dark); background: #87a3a9; border-radius: 6px; overflow: hidden; }
.rts-mini canvas { display: block; width: 100%; height: auto; cursor: pointer; }
.rts-msg { position: absolute; inset: 0; display: none; z-index: 4; align-items: center; justify-content: center; background: rgba(255,255,255,.86); padding: 24px; }
.rts-msg.on { display: flex; }
.rts-msg .box { max-width: 440px; background: #fff; border: 1px solid var(--rule-dark); border-left: 4px solid var(--c-war); border-radius: 10px; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.16); }
.rts-msg h4 { margin: 0 0 8px; font-size: 19px; color: var(--ink); }
.rts-msg p { margin: 0; color: var(--ink-soft); font-size: 13.5px; line-height: 1.8; }
.rts-msg .hint { margin-top: 10px; font-size: 11.5px; color: var(--ink-faint); }
.rts-note { font-size: 12px; color: var(--ink-faint); margin-top: 12px; max-width: 54em; }

/* ── 鼠标跟随高光 ── */
.card, .stage, .deliver, .fstat, .q-sub, .fact, .method, .legend-list button { position: relative; overflow: hidden; }
.card::after, .stage::after, .deliver::after, .fstat::after, .q-sub::after, .fact::after, .method::after, .legend-list button::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle 130px at var(--mx, 50%) var(--my, 50%), rgba(16,163,127,.06), transparent 70%);
}
.card:hover::after, .stage:hover::after, .deliver:hover::after, .fstat:hover::after, .q-sub:hover::after, .fact:hover::after, .method:hover::after, .legend-list button:hover::after { opacity: 1; }

/* ── 滚动渐入 ── */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── 响应式 ── */
@media (max-width: 760px) {
  html { scroll-padding-top: 78px; }
  .topbar .wrap { flex-wrap: nowrap; gap: 12px; }
  .brand { flex: 0 0 auto; }
  .brand span { display: none; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}
@media (max-width: 620px) {
  .hero { padding: 68px 0 44px; }
  .hero h1 { font-size: clamp(28px, 8vw, 42px); }
  .wrap { padding: 0 18px; }
  .topbar .wrap { padding: 8px 18px; }
  .nav a { padding: 5px 7px; font-size: 12.5px; }

  .rts-unit { display: none !important; }
  .rts-mini { width: 92px; }
  .rts-touch { display: flex; max-width: 58%; }
  .rts-build { bottom: 100px; width: 94%; }
  .rts-build-btns button { font-size: 10px; padding: 3px 5px; }
  .rts-tip { display: none; }
  .rts-obj { font-size: 10.5px; padding: 4px 7px; }
  .rts-modes button, .rts-topright button, .rts-planbar button { font-size: 10.5px; padding: 4px 6px; }
  .chat-log { height: 320px; }
}
@media (hover: none) and (pointer: coarse) {
  .rts-touch { display: flex; }
  .rts-tip { display: none; }
}

/* ── 打印 ─────────────────────────────────────────────── */
@media print {
  body { background: #fff !important; color: #111 !important; font-size: 11pt; }
  .topbar { display: none; }
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
  .card, .stage, .deliver, .fstat, .q-sub, .fact, .method, .today, .field-group, .map-frame, .rts {
    background: #fff !important; border-color: #ccc !important; color: #111 !important; box-shadow: none !important;
  }
  .card::after, .stage::after, .deliver::after, .fstat::after, .q-sub::after, .fact::after, .method::after, .legend-list button::after { display: none !important; }
  .hero h1, .sec-head h2, .q-main, .chain-head h3, .today p, .deliver h4, .fstat .fv, .mot-lead, .std-k, .fg-title { color: #111 !important; }
  .hero .lede, .chain-claim, .q-why, .deliver-note, .chain-kicker, .step p, .fact .body { color: #333 !important; }
  .q-narrow, .q-sub p, .stage-desc, .stage li, .deliver p, .fnotes, .field-group li, .std-v { color: #333 !important; }
  .rts-top, .rts-tip, .rts-touch, .rts-unit, .rts-site, .rts-msg, .rts-mini, .rts-build, .fb-form, .chat { display: none !important; }
  .tl-scroll { overflow: visible; }
  .legend-list button { border: 1px solid #ccc; background: #fff; }
  .map-note { position: static; display: block; padding: 4px 0 0; background: none; color: #555; }
  section { break-inside: avoid; padding: 20px 0; }
  .chain, .field-group, .rts, .deliver, .stage { break-inside: avoid; }
  .steps, .stages, .deliver-grid, .fstats { grid-template-columns: repeat(3, 1fr); }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #777; }
}
