/* ==========================================================================
   2026 国庆 · 丹东-集安-临江 自驾攻略  —  样式表 v2
   纯手写，无依赖。浅色/深色主题、响应式、打印、路线绘制动画。
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --brand-1: #0e7490;
  --brand-2: #15803d;
  --brand-3: #c2410c;
  --brand-4: #b45309;

  --bg: #f4f6fa;
  --bg-soft: #eceff5;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --surface-3: #f2f5f9;
  --ink: #131c26;
  --ink-2: #48566a;
  --ink-3: #78869a;
  --line: #e3e8f0;
  --line-2: #cbd5e2;

  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --info: #0e7490;

  /* 每日配色 */
  --d1: #2563eb;
  --d2: #d97706;
  --d3: #0d9488;
  --d4: #7c3aed;
  --d5: #be123c;
  --alt: #8b98a8;

  --radius: 18px;
  --radius-sm: 11px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -8px rgba(16, 24, 40, .12);
  --shadow-2: 0 2px 6px rgba(16, 24, 40, .06), 0 26px 50px -18px rgba(16, 24, 40, .22);
  --nav-h: 58px;
  --maxw: 1100px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

[data-theme="dark"] {
  --bg: #0b1116;
  --bg-soft: #111a22;
  --surface: #141d26;
  --surface-2: #18222c;
  --surface-3: #1c2731;
  --ink: #e9eff6;
  --ink-2: #a7b6c6;
  --ink-3: #78889a;
  --line: #22303c;
  --line-2: #31414f;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px -10px rgba(0, 0, 0, .6);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 26px 55px -20px rgba(0, 0, 0, .75);
  --brand-1: #38bdf8;
  --brand-2: #4ade80;
  --brand-3: #fb923c;
  --brand-4: #fbbf24;
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --info: #38bdf8;
  --d1: #60a5fa;
  --d2: #fbbf24;
  --d3: #2dd4bf;
  --d4: #a78bfa;
  --d5: #fb7185;
  --alt: #64748b;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .35s var(--ease), color .35s var(--ease);
}

a { color: var(--brand-1); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.28; margin: 0; font-weight: 800; letter-spacing: -.015em; }
h2, h3 { text-wrap: balance; }
p { margin: 10px 0; }
em { font-style: normal; }

code {
  background: var(--surface-3); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; font-size: .86em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere; word-break: break-word;
}

/* 数据来源：长网址/长代码串必须能断行，否则会把整页撑宽（手机端会因此整体缩放错位） */
.src { font-size: 13.2px; color: var(--ink-2); }
.src li { margin: 5px 0; word-break: break-word; overflow-wrap: anywhere; }
.src a { word-break: break-word; overflow-wrap: anywhere; }

/* ---------- 图标体系 ---------- */
.sprite { display: none; }
.ic {
  width: 1.05em; height: 1.05em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.16em;
}
.ic.solid { fill: currentColor; stroke: none; }
.ic.lg { width: 1.3em; height: 1.3em; }

/* ---------- 滚动进度 ---------- */
#progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0; z-index: 70;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2) 55%, var(--brand-4));
  box-shadow: 0 0 12px -2px var(--brand-1);
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .topbar { background: var(--surface); } }

.topbar .brand {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  font-size: 14.5px; font-weight: 800; color: var(--ink); letter-spacing: -.01em;
  text-decoration: none; white-space: nowrap;
}
.topbar .brand .mark {
  width: 26px; height: 26px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 16px -6px var(--brand-1);
}
[data-theme="dark"] .topbar .brand .mark { color: #05121a; }

.topbar nav {
  position: relative; flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  /* 内边距必须留足：nav 是滚动容器，溢出会被裁 —— 之前只有 0/4px，
     胶囊的发光被齐平切掉，看着像“被挡住”。上下各 12px、左右各 10px。 */
  padding: 8px 10px;
  /* 左右渐隐由 JS 按滚动位置动态加（滚到两端时不淡出，避免把指示器边缘洗白） */
}
.topbar nav::-webkit-scrollbar { display: none; }

.topbar nav a {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  transition: color .2s var(--ease);
}
.topbar nav a.active { color: #fff; }
[data-theme="dark"] .topbar nav a.active { color: #05121a; }
.topbar nav a:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 2px; }

/* 滑动指示器：单个圆角滑块，随滚动高亮平滑移动 */
#nav-ind {
  position: absolute; left: -400px; top: 50%; margin-top: -17px;
  height: 34px; width: 0;
  border-radius: 999px; pointer-events: none; opacity: 0;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  /* 发光要在上面留的 12px 空间内：外发光 ~8px + 顶部内高光（内高光在盒子里，绝不会被裁） */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -3px 8px -4px rgba(0, 0, 0, .28),
    0 0 0 1px rgba(255, 255, 255, .12),
    0 0 10px -1px var(--brand-1),
    0 2px 10px -4px var(--brand-2);
  transition: left .38s var(--ease-out), width .38s var(--ease-out), opacity .25s var(--ease);
}
#nav-ind.on { opacity: 1; }

.iconbtn {
  flex: none; width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: grid; place-items: center; font-size: 17px;
  transition: .2s var(--ease);
}
.iconbtn:active { transform: scale(.95); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 60px 18px 52px;
  background:
    radial-gradient(900px 380px at 8% -30%, rgba(194, 65, 12, .5), transparent 60%),
    radial-gradient(760px 360px at 95% -10%, rgba(21, 128, 61, .48), transparent 58%),
    radial-gradient(1000px 520px at 50% 135%, rgba(14, 116, 144, .55), transparent 62%),
    linear-gradient(158deg, #08151f, #123048 52%, #17414f);
}
.hero::before {
  content: ""; position: absolute; inset: -40% -20%;
  background:
    radial-gradient(560px 300px at 30% 40%, rgba(56, 189, 248, .22), transparent 62%),
    radial-gradient(500px 280px at 70% 60%, rgba(74, 222, 128, .18), transparent 62%);
  animation: aurora 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora {
  from { transform: translate3d(-4%, -3%, 0) scale(1); }
  to { transform: translate3d(5%, 4%, 0) scale(1.12); }
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 72%);
  mask-image: linear-gradient(180deg, #000, transparent 72%);
}
.hero-in { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .16em; font-weight: 700;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28); color: #ffe9c9;
  background: rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hero h1 {
  font-size: clamp(24px, 3.8vw, 38px); margin: 18px 0 10px;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .35);
}
.hero h1 small {
  display: block; font-size: clamp(13.5px, 1.7vw, 16px); font-weight: 500;
  color: #bcd2e4; margin-top: 12px; letter-spacing: .02em; line-height: 1.65;
}
.hero .lede { color: #cfe0ee; font-size: 15px; max-width: 72ch; margin: 14px 0 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px; }
.kpi {
  position: relative; overflow: hidden;
  background: rgba(255, 255, 255, .075); border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 14px; padding: 13px 14px; transition: .25s var(--ease);
}
.kpi::after {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
}
.kpi b { display: block; font-size: 20px; letter-spacing: .01em; }
.kpi span { font-size: 11.5px; color: #b9cbdd; }

/* ---------- 布局 ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 30px 18px 96px; }
section { margin: 0 0 40px; scroll-margin-top: calc(var(--nav-h) + 18px); }

h2 {
  font-size: clamp(19px, 2.5vw, 24px); margin: 46px 0 18px;
  display: flex; align-items: center; gap: 13px;
}
h2 .num {
  flex: none; width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; font-size: 13px; font-weight: 800;
  display: grid; place-items: center;
  box-shadow: 0 10px 22px -10px var(--brand-1);
}
[data-theme="dark"] h2 .num { color: #05121a; }
h2 .hline {
  flex: 1 1 auto; height: 1px; min-width: 20px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}
h3 { font-size: 17px; margin: 26px 0 8px; display: flex; align-items: center; gap: 8px; }
h3 .ic { color: var(--brand-1); }
h4 { font-size: 15px; margin: 16px 0 6px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  padding: 20px 20px 12px;
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .5);
}
[data-theme="dark"] .card { box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, .03); }
.card.tight { padding-bottom: 20px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .grid.c2, .grid.c3 { grid-template-columns: 1fr; } }

/* ---------- 提示块 ---------- */
.note {
  position: relative; border-radius: 13px; padding: 14px 16px 14px 18px;
  margin: 16px 0; font-size: 14.6px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 4px solid var(--brand-4);
}
.note.warn { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.note.ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.note.info { border-left-color: var(--info); background: color-mix(in srgb, var(--info) 6%, var(--surface)); }
@supports not (background: color-mix(in srgb, red 6%, white)) {
  .note.warn { background: #fdf1f1; } .note.ok { background: #eef8f2; } .note.info { background: #eef6fa; }
}
[data-theme="dark"] .note.warn { background: #2a1a1c; }
[data-theme="dark"] .note.ok { background: #16261d; }
[data-theme="dark"] .note.info { background: #14242c; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; line-height: 1.7; padding: 2px 9px;
  border-radius: 999px; background: var(--surface-3); color: var(--ink-2);
  border: 1px solid var(--line); margin: 0 5px 5px 0; white-space: nowrap;
}
.tag.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.tag.est { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.tag.live { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, var(--line)); }
.tag.no { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }

/* ---------- 表格 ---------- */
.tw {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0;
  border: 1px solid var(--line); border-radius: 15px; background: var(--surface);
  box-shadow: var(--shadow-1);
}
table { border-collapse: collapse; width: 100%; min-width: 580px; font-size: 14px; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th {
  background: var(--surface-3); font-weight: 700; white-space: nowrap;
  font-size: 13px; color: var(--ink); letter-spacing: .01em;
  position: sticky; top: 0; backdrop-filter: blur(6px);
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s var(--ease); }
tr.total td { background: var(--surface-3); font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.tight { white-space: nowrap; }

/* ---------- 路线图 ---------- */
.mapcard {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(700px 340px at 15% 0%, rgba(56, 189, 248, .12), transparent 60%),
    radial-gradient(600px 320px at 90% 100%, rgba(74, 222, 128, .1), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow-1);
  padding: 18px;
}
.maplay { display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 860px) {
  .maplay { grid-template-columns: 1fr; }
  #map-box { max-width: 440px; margin: 0 auto; }
}

.map canvas, .map svg { display: block; width: 100%; height: auto; }
.map { position: relative; }
.map .bg-grid { stroke: var(--line); stroke-width: 1; opacity: .55; }
.map .river {
  fill: none; stroke: #0ea5e9; stroke-width: 2; opacity: .38;
  stroke-dasharray: 6 7; stroke-linecap: round;
}
.map .region { font-size: 13px; font-weight: 800; fill: var(--ink-3); opacity: .5; letter-spacing: .3em; }
.map .seg {
  fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset 1s var(--ease-out), opacity .35s var(--ease);
}
.map .seg.drawn { stroke-dashoffset: 0; }
.map .seg-alt {
  fill: none; stroke: var(--alt); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 5 6; opacity: 0; transition: opacity .5s var(--ease);
}
.map[data-show-alt="1"] .seg-alt { opacity: .55; }
.map .node { fill: var(--surface); stroke-width: 2.4; transition: .3s var(--ease); }
.map .halo { fill: var(--brand-1); opacity: 0; }
.map .halo.pulse { animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 0% { opacity: .45; r: 5; } 100% { opacity: 0; r: 18; } }
.map .lbl {
  font-size: 12.5px; font-weight: 700; fill: var(--ink);
  paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round;
}
.map .lbl.sm { font-size: 11px; font-weight: 600; fill: var(--ink-2); }
.map .lbl-sub { font-size: 10.5px; font-weight: 600; fill: var(--ink-3); }
.map .marker-dot { fill: #fff; stroke: var(--brand-1); stroke-width: 2.5; filter: drop-shadow(0 0 8px var(--brand-1)); }
.map.dim .seg:not(.hl) { opacity: .16; }
.map.dim .node:not(.hl) { opacity: .25; }

.mapctl { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0 0; }
.chip {
  cursor: pointer; font: inherit; font-size: 12.6px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; transition: .2s var(--ease);
}
.chip[aria-pressed="true"] { color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px currentColor; }
.chip[data-day="1"][aria-pressed="true"] { background: var(--d1); }
.chip[data-day="2"][aria-pressed="true"] { background: var(--d2); }
.chip[data-day="3"][aria-pressed="true"] { background: var(--d3); }
.chip[data-day="4"][aria-pressed="true"] { background: var(--d4); }
.chip[data-day="5"][aria-pressed="true"] { background: var(--d5); }
[data-theme="dark"] .chip[aria-pressed="true"] { color: #06121a; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip[data-day="1"] .dot { background: var(--d1); }
.chip[data-day="2"] .dot { background: var(--d2); }
.chip[data-day="3"] .dot { background: var(--d3); }
.chip[data-day="4"] .dot { background: var(--d4); }
.chip[data-day="5"] .dot { background: var(--d5); }

.legend { font-size: 13.4px; }
.legend h4 { margin: 0 0 10px; font-size: 14px; }
.legend .row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.legend .row:last-child { border-bottom: 0; }
.legend .swatch {
  flex: none; width: 22px; height: 4px; border-radius: 3px; margin-top: 9px;
}
.legend .row[data-day="1"] .swatch { background: var(--d1); }
.legend .row[data-day="2"] .swatch { background: var(--d2); }
.legend .row[data-day="3"] .swatch { background: var(--d3); }
.legend .row[data-day="4"] .swatch { background: var(--d4); }
.legend .row[data-day="5"] .swatch { background: var(--d5); }
.legend .row b { display: block; font-size: 13.8px; }
.legend .row span { color: var(--ink-2); font-size: 12.6px; }
.legend .row.active { background: color-mix(in srgb, var(--brand-1) 7%, transparent); border-radius: 10px; }
.legend .row { cursor: pointer; border-radius: 10px; padding-left: 8px; padding-right: 8px; }

/* ---------- 逐日卡片 ---------- */
.day {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  margin: 0 0 22px;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.day-hd {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  padding: 15px 20px; color: #fff; position: relative;
  background: linear-gradient(100deg, #12324a, #1d5f7a 58%, #1c7a54);
}
.day::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; z-index: 3;
  background: var(--d1);
}
.day[data-day="2"]::before { background: var(--d2); }
.day[data-day="3"]::before { background: var(--d3); }
.day[data-day="4"]::before { background: var(--d4); }
.day[data-day="5"]::before { background: var(--d5); }
.day[data-day="2"] .day-hd { background: linear-gradient(100deg, #4a2c12, #8a5316 58%, #a97324); }
.day[data-day="3"] .day-hd { background: linear-gradient(100deg, #0e3a3c, #116b63 58%, #159076); }
.day[data-day="4"] .day-hd { background: linear-gradient(100deg, #2b1f4d, #503a86 58%, #6d51a8); }
.day[data-day="5"] .day-hd { background: linear-gradient(100deg, #46121f, #8c2337 58%, #a83247); }
.day-hd .d {
  font-size: 12px; font-weight: 800; letter-spacing: .1em;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .26);
  padding: 4px 11px; border-radius: 9px; white-space: nowrap;
}
.day-hd h3 {
  margin: 0; font-size: 17px; flex: 1 1 260px; color: #fff;
  display: flex; align-items: center; gap: 9px;
}
.day-hd .kms {
  font-size: 12.5px; color: #d5e4f0; white-space: nowrap;
  font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px;
}
.day-bd { padding: 16px 20px 8px; }

.tl { list-style: none; margin: 10px 0 8px; padding: 0; }
.tl li {
  position: relative; padding: 10px 0 10px 94px; font-size: 14.8px;
  border-bottom: 1px dashed var(--line);
}
.tl li:last-child { border-bottom: 0; }
.tl li::before {
  content: ""; position: absolute; left: 72px; top: 18px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-1); opacity: .55;
}
.tl li b.t {
  position: absolute; left: 0; top: 10px; width: 62px;
  font-size: 13px; font-weight: 800; text-align: right;
  color: var(--brand-3); font-variant-numeric: tabular-nums;
}
.tl li em { color: var(--ink-2); }
.tl li .km-hint { color: var(--ink-3); font-size: 13px; }

/* ---------- 逐条浮现动画（时间轴 / 为什么这么排） ---------- */
.js .tl li, .js .rail li { opacity: 0; }
.js .tl li::before, .js .rail li::before { transform: scale(0); }
.js .seen .tl li, .js .seen .rail li {
  opacity: 1;
  animation: tlIn .52s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 68ms);
}
.js .seen .tl li::before, .js .seen .rail li::before {
  animation: dotIn .5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 68ms);
}
@keyframes tlIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes dotIn { 0% { transform: scale(0); } 62% { transform: scale(1.45); } 100% { transform: scale(1); } }

/* ---------- 标签页 ---------- */
.tabs { display: flex; gap: 7px; flex-wrap: wrap; margin: 18px 0 14px; }
.tab {
  cursor: pointer; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 999px; transition: .2s var(--ease);
  display: inline-flex; align-items: center; gap: 7px;
}
.tab[aria-selected="true"] {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 24px -10px var(--brand-1);
}
[data-theme="dark"] .tab[aria-selected="true"] { color: #05121a; }
.panel[hidden] { display: none; }
.panel { animation: fadeup .35s var(--ease-out) both; }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 酒店卡片 ---------- */
.pick {
  position: relative; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface-2); padding: 16px 17px; margin: 14px 0;
  transition: .25s var(--ease);
}
.pick.first {
  border-color: color-mix(in srgb, var(--ok) 42%, var(--line));
  background: color-mix(in srgb, var(--ok) 6%, var(--surface));
}
@supports not (background: color-mix(in srgb, red 6%, white)) { .pick.first { background: #f2faf5; } }
[data-theme="dark"] .pick.first { background: #16261d; }
.pick h4 { margin: 0 0 4px; font-size: 16px; }
.pick .why { color: var(--ink-2); font-size: 14.4px; margin: 7px 0; }
.pick .meta { display: flex; flex-wrap: wrap; gap: 0; margin-top: 9px; }
.pick .addr { font-size: 13.6px; color: var(--ink-2); }
.rank {
  position: absolute; top: 15px; right: 16px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .05em; color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  padding: 2px 9px; border-radius: 999px;
}
.rank.alt { color: var(--ink-3); background: var(--surface-3); }

.btn {
  cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  padding: 6px 13px; border-radius: 10px; transition: .2s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn.primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 22px -12px var(--brand-1);
}
[data-theme="dark"] .btn.primary { color: #05121a; }
.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.links a {
  font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px; transition: .2s var(--ease);
}

/* ---------- 预算计算器 ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 24px; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
.field { margin: 0 0 15px; }
.field label {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 13.6px; color: var(--ink-2); margin-bottom: 7px;
}
.field label b { color: var(--ink); font-variant-numeric: tabular-nums; }
.field input[type="range"] {
  width: 100%; height: 22px; accent-color: var(--brand-1); background: transparent;
}
.field select, .field input[type="number"] {
  width: 100%; padding: 9px 11px; color: var(--ink);
  /* 字号必须 >= 16px：低于这个值时 iOS Safari 聚焦控件会自动放大整页 */
  font-family: inherit; font-size: 16px; line-height: 1.4;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
}
.field input[type="range"] { font-size: 16px; min-height: 26px; }

/* 去掉双击缩放，点按更跟手 */
.btn, .tab, .chip, .iconbtn, .links a, .check label,
.topbar nav a, .drawer-nav a, .tl li b.t, .totop { touch-action: manipulation; }
.summary {
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2);
  padding: 16px; position: sticky; top: calc(var(--nav-h) + 16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
[data-theme="dark"] .summary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03); }
.summary .row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 0; font-size: 14.4px; border-bottom: 1px dashed var(--line);
}
.summary .row:last-of-type { border-bottom: 0; }
.summary .row b { font-variant-numeric: tabular-nums; }
.summary .total { font-size: 21px; font-weight: 800; color: var(--brand-1); }

/* ---------- 清单 ---------- */
.check { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; }
@media (max-width: 760px) { .check { grid-template-columns: 1fr; } }
.check label {
  display: flex; align-items: flex-start; gap: 10px; font-size: 14.4px;
  padding: 7px 9px; border-radius: 10px; cursor: pointer;
  transition: background .18s var(--ease);
}
.check input { margin-top: 4px; accent-color: var(--brand-2); flex: none; width: 17px; height: 17px; font-size: 16px; }
.check input:checked + span { color: var(--ink-3); text-decoration: line-through; }
.bar {
  height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden;
  margin: 12px 0 6px; border: 1px solid var(--line);
}
.bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
  transition: width .3s var(--ease);
}

/* ---------- 时间轴 ---------- */
.rail { list-style: none; margin: 18px 0; padding: 0 0 0 28px; position: relative; }
.rail::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--d1), var(--d3), var(--d5));
  border-radius: 2px; opacity: .45;
}
.rail li { position: relative; padding: 0 0 18px; }
.rail li::before {
  content: ""; position: absolute; left: -25px; top: 9px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--brand-1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 14%, transparent);
}
.rail li b { display: block; font-size: 15px; }

/* ---------- 页脚 / 回到顶部 ---------- */
footer {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 18px 64px;
  color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line);
}
footer a { color: var(--ink-2); }

.totop {
  position: fixed; right: 18px; bottom: 20px; z-index: 65;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-2); display: grid; place-items: center;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: .3s var(--ease-out);
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- 入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tl li, .rail li { opacity: 1 !important; }
  .tl li::before, .rail li::before { transform: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero::before { animation: none; }
  .day:hover, .kpi:hover, .btn:hover, .pick:hover, .tab:hover, .chip:hover { transform: none; }
  .map .seg { transition: none; }
  #nav-ind { transition: none; }
}

/* ---------- 图标微调 ---------- */
h2 > .ic { color: var(--brand-1); margin-left: -6px; }
h2 .hline { min-width: 24px; }
.day-hd h3 .ic { color: rgba(255, 255, 255, .92); }
.day-hd .kms .ic { width: 1em; height: 1em; }
.brand .mark .ic { width: 15px; height: 15px; stroke-width: 2; }
.mapstatus {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.8px; color: var(--ink-3); margin: 12px 0 0;
  min-height: 20px;
}
.mapstatus .ic { color: var(--brand-1); }
.tag .ic, .note .ic, .legend .ic { width: 1em; height: 1em; }
.check .ic { color: var(--ink-3); }
.seg.hl { stroke-width: 4.6; }

/* ==========================================================================
   抽屉栏 + 移动端适配
   ========================================================================== */
.menubtn { display: none; }

@media (max-width: 820px) {
  .topbar nav { display: none; }
  .menubtn { display: grid; }
  .topbar { gap: 8px; padding: 0 calc(14px + env(safe-area-inset-right, 0px)) 0 calc(14px + env(safe-area-inset-left, 0px)); }
  .topbar .brand { font-size: 14px; }
  .topbar .brand .mark { width: 24px; height: 24px; border-radius: 8px; }
  .iconbtn { width: 40px; height: 40px; }
}

/* 抽屉打开时锁滚动 */
body.lock { overflow: hidden; }

/* 遮罩 */
.scrim {
  position: fixed; inset: 0; z-index: 88; cursor: pointer;
  background: rgba(6, 12, 18, .52);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.scrim.show { opacity: 1; pointer-events: auto; }

/* 抽屉 */
.drawer {
  position: fixed; z-index: 92; top: 0; right: 0; bottom: 0;
  width: min(86vw, 350px); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -24px 0 60px -24px rgba(0, 0, 0, .45);
  transform: translateX(103%);
  transition: transform .4s var(--ease-out);
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }

.drawer-hd {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 4px 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.drawer-hd strong { font-size: 14px; letter-spacing: .06em; flex: 1; }
.drawer-nav { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-bottom: 10px; }
.drawer-nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 12px; border-radius: 13px; min-height: 46px;
  color: var(--ink-2); font-size: 15px; font-weight: 600;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.drawer-nav a.active {
  color: #fff; background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 24px -12px var(--brand-1);
}
[data-theme="dark"] .drawer-nav a.active { color: #05121a; }
.drawer-nav a .n {
  font: 800 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em; opacity: .55; width: 18px; flex: none;
}
.drawer-nav a .ic { width: 18px; height: 18px; }
.drawer-nav a span:last-child { flex: 1; }
.drawer-nav a i {
  font-style: normal; font-size: 16px; opacity: .4; transform: translateX(0);
  transition: transform .2s var(--ease);
}

.drawer-ft { border-top: 1px solid var(--line); padding-top: 12px; display: flex; gap: 8px; }
.drawer-ft .btn { flex: 1; justify-content: center; min-height: 42px; }

/* ---------- 移动端细节 ---------- */
@media (max-width: 700px) {
  body { font-size: 15.5px; }
  .wrap { padding: 24px 14px 84px; }
  .hero { padding: 44px 16px 38px; }
  .hero h1 { font-size: clamp(21px, 5.8vw, 27px); }
  .hero .lede { font-size: 14.4px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 24px; }
  .kpi b { font-size: 18px; }
  h2 { font-size: 19.5px; gap: 10px; margin: 36px 0 14px; }
  h2 .num { width: 32px; height: 32px; border-radius: 10px; }
  h3 { font-size: 16px; }
  .card { padding: 16px 15px 10px; border-radius: 16px; }
  .card.tight { padding-bottom: 16px; }
  .note { padding: 13px 14px; font-size: 14.2px; }
  .day-hd { padding: 13px 15px; gap: 9px; }
  .day-hd h3 { font-size: 15.6px; flex-basis: 100%; }
  .day-hd .kms { font-size: 12px; }
  .day-bd { padding: 14px 15px 8px; }
  .tl li { padding: 9px 0 9px 68px; font-size: 14.4px; }
  .tl li::before { left: 53px; top: 17px; width: 5px; height: 5px; }
  .tl li b.t { font-size: 11.6px; top: 10px; width: 47px; }
  .table-hint { display: flex; }
  .pick { padding: 14px 15px; border-radius: 14px; }
  .rank { position: static; display: inline-block; margin: 0 0 7px; }
  .pick h4 { font-size: 15.4px; }
  .tab { padding: 9px 14px; font-size: 13.6px; min-height: 42px; }
  .chip { padding: 8px 13px; min-height: 40px; }
  .btn { min-height: 40px; }
  .links a { min-height: 40px; }
  .summary { position: static; }
  .check { grid-template-columns: 1fr; }
  .mapcard { padding: 14px; }
  .maplay { gap: 16px; }
  #map-box { max-width: 100%; }
  .legend .row { padding: 9px 8px; }
  .mapctl { gap: 6px; }
  .rail { padding-left: 24px; }
  .totop { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 44px; height: 44px; }
  .tl li em, .pick .why, .note { overflow-wrap: anywhere; }
}

/* 手机端路线图：SVG 会整体缩放，所以字号要按比例放大才看得清 */
@media (max-width: 700px) {
  .mapcard { padding: 12px 10px; }
  .map .lbl { font-size: 19px; stroke-width: 5px; }
  .map .lbl.sm { font-size: 16px; stroke-width: 4.5px; }
  .map .lbl-sub { font-size: 14px; }
  .map .region { font-size: 16px; }
  .map .seg { stroke-width: 4.4; }
  .map .seg.hl { stroke-width: 6; }
  .map .node { stroke-width: 3; }
  .map .river { stroke-width: 2.6; }
  .mapctl { gap: 6px; }
  .mapctl .btn { padding: 8px 12px; }
}

/* 表格可横向滑动提示（滚动阴影） */
table.hint-scroll { }
@media (max-width: 760px) {
  table { min-width: 520px; }
  .tl li em, .src, .src a, .src code { word-break: break-word; overflow-wrap: anywhere; }
  .tw {
    background-image:
      linear-gradient(90deg, var(--surface) 30%, transparent),
      linear-gradient(90deg, transparent, var(--surface) 30%) 100% 0,
      radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .16), transparent),
      radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .16), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 42px 100%, 42px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
  }
}

/* ---------- 打印 ---------- */
@media print {
  :root {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #fff;
    --shadow-1: none; --shadow-2: none; --ink: #000;
  }
  .topbar, #progress, .totop, .tabs, .mapctl, .btn, .links, .summary,
  .drawer, .scrim { display: none !important; }
  /* 时间轴/时间线在打印时必须全部可见（否则没滚动到就打印会是空白） */
  .tl li, .rail li { opacity: 1 !important; transform: none !important; animation: none !important; }
  .tl li::before, .rail li::before { transform: none !important; animation: none !important; }
  .panel[hidden] { display: block !important; }
  .hero { color: #000; background: none; padding: 0 0 12px; }
  .hero::before, .hero::after { display: none; }
  .hero h1 small, .hero .lede, .kpi span { color: #333; }
  .kpi { border: 1px solid #ccc; background: none; }
  .map .seg { stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .day, .card, .pick, .mapcard { break-inside: avoid; }
  body { font-size: 12.5px; }
  a { color: #000; }
}


/* ==========================================================================
   触屏适配：去掉系统点击高亮 + 去掉“粘住”的 hover，改成自己的按压反馈
   ========================================================================== */
@media (hover: hover) {
  a:hover { text-decoration: underline; }
  .topbar .brand:hover { text-decoration: none; }
  .topbar nav a:hover { color: var(--ink); text-decoration: none; }
  .iconbtn:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
  .kpi:hover { background: rgba(255, 255, 255, .13); transform: translateY(-3px); border-color: rgba(255, 255, 255, .28); }
  tbody tr:hover td { background: color-mix(in srgb, var(--brand-1) 5%, transparent); }
  .chip:hover { transform: translateY(-1px); border-color: var(--line-2); color: var(--ink); }
  .day:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: var(--line-2); }
  .tab:hover { border-color: var(--line-2); color: var(--ink); transform: translateY(-1px); }
  .pick:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
  .btn:hover { color: var(--ink); border-color: var(--line-2); transform: translateY(-1px); }
  .links a:hover { color: var(--ink); border-color: var(--brand-1); transform: translateY(-1px); text-decoration: none; }
  .check label:hover { background: var(--surface-3); }
  .totop:hover { color: var(--brand-1); }
  .drawer-nav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
  .drawer-nav a:hover i { transform: translateX(3px); }
}

/* --------------------------------------------------------------------------
   触屏点按不要任何系统反馈色块。这是三套不同机制，缺一个都会看到“透明蓝色方块”：
     ① -webkit-tap-highlight-color —— Chrome/安卓默认的淡蓝高亮
     ② :focus 外框 —— 华为/小米/三星自带浏览器点按链接时画的浅蓝圆角框
     ③ 误选中文字的选区 —— 轻微滑动就会选中，选区默认也是蓝的
   -------------------------------------------------------------------------- */
html {
  -webkit-tap-highlight-color: transparent;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
a, button, label, input, select, textarea, [role="tab"] {
  -webkit-tap-highlight-color: transparent;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* ② 点按/鼠标聚焦不画外框；键盘聚焦仍保留清晰焦点环（可达性） */
a:focus, button:focus, label:focus, input:focus, select:focus,
.btn:focus, .tab:focus, .chip:focus, .iconbtn:focus, .links a:focus,
.drawer-nav a:focus, .topbar nav a:focus, .totop:focus, .legend .row:focus,
.check input:focus, .field input:focus {
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .tab:focus-visible,
.chip:focus-visible, .iconbtn:focus-visible, .links a:focus-visible,
.drawer-nav a:focus-visible, .topbar nav a:focus-visible, .totop:focus-visible,
.check input:focus-visible, .field input:focus-visible {
  outline: 2px solid var(--brand-1);
  outline-offset: 2px;
}

/* ③ 纯交互控件禁止被选中（滑一下就选中会留蓝色选区，还容易误触系统菜单） */
.btn, .tab, .chip, .iconbtn, .links a, .drawer-nav a, .topbar nav a, .brand,
.check label, .legend .row, .totop, .day-hd, .kpi, .day-hd .kms {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
/* 正文保持可选中（复制行程文字要用） */
.tl, .pick, .note, .card p, .src { -webkit-user-select: text; user-select: text; }

/* 兜底：把 tap 高亮在每个元素上显式关掉（个别安卓内核只认显式声明） */
* { -webkit-tap-highlight-color: transparent !important; }

/* 非键盘聚焦一律不画外框 */
:focus:not(:focus-visible) { outline: none !important; }

/* 自定义按压反馈：只做「缩一下 + 微调亮度」，绝不换底色。
   之前用 --surface-3 作按下底色，深色主题下那本身就是一块蓝灰色，看着像残留高亮。 */
.btn:active, .links a:active, .iconbtn:active, .check label:active,
.chip:active, .tab:active, .legend .row:active,
.topbar nav a:not(.active):active, .drawer-nav a:not(.active):active {
  transform: scale(.97);
  filter: brightness(.96);
}
[data-theme="dark"] .btn:active, [data-theme="dark"] .links a:active,
[data-theme="dark"] .iconbtn:active, [data-theme="dark"] .check label:active,
[data-theme="dark"] .chip:active, [data-theme="dark"] .tab:active,
[data-theme="dark"] .legend .row:active,
[data-theme="dark"] .topbar nav a:not(.active):active,
[data-theme="dark"] .drawer-nav a:not(.active):active {
  filter: brightness(1.18);
}
.btn.primary:active { filter: brightness(.92); }
[data-theme="dark"] .btn.primary:active { filter: brightness(1.1); }
.drawer-nav a:active i { transform: translateX(0); }
tbody tr:active td { background: color-mix(in srgb, var(--brand-1) 6%, transparent); }

/* 上面恢复的 hover 在文件末尾，这里再压一次“减弱动效”的偏好 */
@media (prefers-reduced-motion: reduce) {
  .day:hover, .kpi:hover, .btn:hover, .pick:hover, .tab:hover,
  .chip:hover, .iconbtn:hover, .links a:hover, .drawer-nav a:hover i { transform: none; }
  .tab:active, .chip:active { transform: none; }
}
