/* ============================================================
   国道环线 · 中国边境自驾
   纸白 / 墨色 / 朱红 —— 大留白编辑排版
   ============================================================ */

:root {
  --paper: #FBFAF6;
  --cream: #F4F1EA;
  --ink: #1B1A17;
  --ink-soft: #3A382F;
  --grey: #8B8578;
  --grey-light: #B9B3A6;
  --line: #E6E2D8;
  --accent: #C23B2A;
  --g219: #3E7C4F;
  --g331: #B5482F;
  --g228: #2F6E8C;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --container: 1160px;
  --pad-x: clamp(20px, 6vw, 72px);
  --sec-y: clamp(76px, 12vw, 168px);
  --gap: clamp(28px, 4vw, 56px);
  --ease: cubic-bezier(.5, 0, 0, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ink); color: var(--paper); }

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- 骨架屏 ---------- */
#skeleton {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--paper);
  transition: opacity .7s var(--ease), visibility .7s;
  overflow: hidden;
}
#skeleton.done { opacity: 0; visibility: hidden; pointer-events: none; }

.sk-wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(28px, 5vw, 56px) var(--pad-x);
}

.sk {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  border-radius: 4px;
}
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.sk-nav { height: 18px; width: 42%; margin-bottom: clamp(60px, 10vw, 120px); }
.sk-kicker { height: 14px; width: 120px; margin-bottom: 28px; }
.sk-title { height: clamp(40px, 7vw, 76px); width: 88%; margin-bottom: 18px; }
.sk-title.s2 { width: 62%; margin-bottom: 40px; }
.sk-hero { height: clamp(240px, 42vw, 460px); width: 100%; margin-bottom: clamp(60px, 9vw, 110px); }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.sk-card { height: 190px; }
@media (max-width: 760px) { .sk-grid { grid-template-columns: 1fr; } }

/* 图片位骨架 */
.img-box { position: relative; overflow: hidden; background: var(--cream); }
.img-box img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1s var(--ease), transform 1.4s var(--ease);
}
.img-box img.loaded { opacity: 1; transform: scale(1); }
.img-box::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--cream) 30%, #efece4 50%, var(--cream) 70%);
  background-size: 200% 100%;
  animation: imgshimmer 1.5s infinite linear;
  transition: opacity .6s;
}
.img-box.loaded::before { opacity: 0; animation: none; }
@keyframes imgshimmer { 0% { background-position: 120% 0; } 100% { background-position: -80% 0; } }

/* ---------- 导航 ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--pad-x);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .12em;
  white-space: nowrap;
}
.nav-logo em { font-style: normal; color: var(--accent); }
.nav-links { display: flex; gap: clamp(16px, 3vw, 40px); align-items: center; }
.nav-links a {
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: bottom left;
  transition: transform .35s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-progress {
  position: absolute;
  left: 0; bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
@media (max-width: 760px) {
  .nav-links a:not(:last-child) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 110px;
  padding-bottom: 60px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: var(--gap);
  align-items: end;
}
.kicker {
  font-size: 12px;
  letter-spacing: .42em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.kicker::before { content: ""; width: 42px; height: 1px; background: var(--accent); }
.hero h1 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.22;
  letter-spacing: .02em;
}
.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln span {
  display: inline-block;
  transform: translate3d(0, 110%, 0);
  opacity: 0;
}
body.ready .hero h1 .ln span {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  transition: transform .9s var(--ease), opacity .9s var(--ease);
}
.hero h1 .ln:nth-child(2) span { transition-delay: .12s; }
.hero h1 .ln:nth-child(3) span { transition-delay: .24s; }
.hero h1 .q { color: var(--accent); }
.hero-sub {
  margin-top: 34px;
  max-width: 34em;
  color: var(--grey);
  font-size: 15px;
  line-height: 2;
}
.hero-img {
  aspect-ratio: 4 / 4.6;
  border-radius: 4px;
}
.hero-stats {
  margin-top: clamp(48px, 7vw, 88px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stat {
  padding: 30px 8px 4px 0;
}
.stat + .stat { padding-left: clamp(14px, 2.5vw, 32px); }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.1;
}
.stat b i { font-style: normal; font-size: .45em; color: var(--grey); margin-left: 4px; letter-spacing: .1em; }
.stat span { font-size: 12px; letter-spacing: .22em; color: var(--grey); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img { aspect-ratio: 16 / 10; order: 2; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
}

/* ---------- 跑马灯 ---------- */
.marquee {
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--cream);
}
.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee-track span {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .3em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.marquee-track span::after { content: "·"; margin-left: 64px; color: var(--grey-light); }
@keyframes marquee { 100% { transform: translateX(-50%); } }

/* ---------- 通用节 ---------- */
.section { padding-block: var(--sec-y); }
.section + .section { border-top: 1px solid var(--line); }

.sec-head { margin-bottom: clamp(48px, 7vw, 96px); }
.sec-head .kicker { margin-bottom: 22px; }
.sec-title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.3;
  max-width: 16em;
}
.sec-desc {
  margin-top: 26px;
  max-width: 38em;
  color: var(--grey);
  font-size: 15px;
  line-height: 2;
}

/* ---------- 滚动渐显 ---------- */
.reveal { opacity: 0; transform: translate3d(0, 34px, 0); }
.reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0s);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}

/* ---------- 路线总览卡 ---------- */
.route-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.route-card {
  border-top: 2px solid var(--rc, var(--ink));
  padding-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.route-card .no {
  font-family: var(--serif);
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 900;
  color: var(--rc, var(--ink));
  line-height: 1;
  letter-spacing: .02em;
}
.route-card h3 { font-family: var(--serif); font-size: 20px; font-weight: 700; }
.route-card p { font-size: 14px; color: var(--grey); line-height: 1.95; flex: 1; }
.route-card .meta {
  display: flex;
  gap: 26px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.route-card .meta b { font-family: var(--serif); font-size: 17px; display: block; letter-spacing: 0; }
.route-card .go {
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--rc, var(--ink));
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.route-card .go::after { content: "→"; transition: transform .3s var(--ease); }
.route-card .go:hover::after { transform: translateX(6px); }
@media (max-width: 900px) { .route-cards { grid-template-columns: 1fr; } }

/* ---------- 路线章节 ---------- */
.route-sec { --rc: var(--ink); }
.route-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.route-banner .big {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(72px, 13vw, 168px);
  line-height: .95;
  color: var(--rc);
  letter-spacing: -.01em;
}
.route-banner .info { padding-bottom: clamp(6px, 1.4vw, 18px); }
.route-banner .info h2 { font-family: var(--serif); font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; margin-bottom: 14px; }
.route-banner .info p { color: var(--grey); font-size: 14px; max-width: 36em; line-height: 1.95; }
.route-banner .tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.route-banner .tags span {
  font-size: 12px;
  letter-spacing: .12em;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--ink-soft);
  background: #fff;
}
@media (max-width: 700px) { .route-banner { grid-template-columns: 1fr; align-items: start; } }

/* 路段 */
.segment { margin-bottom: clamp(56px, 8vw, 110px); }
.seg-head {
  display: flex;
  align-items: baseline;
  gap: 22px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: clamp(30px, 4vw, 48px);
}
.seg-head .idx {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--rc);
  font-weight: 700;
  letter-spacing: .1em;
  white-space: nowrap;
}
.seg-head h3 { font-family: var(--serif); font-size: clamp(19px, 2.4vw, 26px); font-weight: 700; }
.seg-head .range { margin-left: auto; font-size: 12px; letter-spacing: .16em; color: var(--grey); white-space: nowrap; }

/* 日程栅格 —— 大间距 */
.day-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  row-gap: calc(var(--gap) * 1.15);
}
@media (max-width: 980px) { .day-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .day-grid { grid-template-columns: 1fr; } }

.day-card {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .4s;
}
.day-card:hover { border-top-color: var(--rc); }
.day-card .d {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--rc);
}
.day-card h4 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}
.day-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12px;
  color: var(--grey);
  letter-spacing: .06em;
}
.day-card .meta b { color: var(--ink-soft); font-weight: 500; }
.day-card p { font-size: 13.5px; color: var(--grey); line-height: 1.9; }
.day-card .tip {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--cream);
  padding: 10px 14px;
  border-radius: 3px;
  line-height: 1.8;
}
.day-card .tip::before { content: "提示 · "; color: var(--accent); font-weight: 500; }

/* ---------- 精选地点（图文编辑排版） ---------- */
.spot {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  align-items: center;
  margin-bottom: clamp(72px, 10vw, 150px);
}
.spot:last-child { margin-bottom: 0; }
.spot .img-box { grid-column: 1 / 8; aspect-ratio: 3 / 2; border-radius: 4px; }
.spot .txt { grid-column: 8 / 13; }
.spot.flip .img-box { grid-column: 6 / 13; order: 2; }
.spot.flip .txt { grid-column: 1 / 6; order: 1; }
.spot .txt .alt {
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 900;
  line-height: 1;
  color: var(--rc, var(--accent));
}
.spot .txt .alt i { font-style: normal; font-size: .34em; color: var(--grey); letter-spacing: .1em; margin-left: 6px; }
.spot .txt h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  margin: 18px 0 6px;
}
.spot .txt .en { font-size: 12px; letter-spacing: .3em; color: var(--grey-light); text-transform: uppercase; }
.spot .txt p { margin-top: 20px; font-size: 14.5px; color: var(--ink-soft); line-height: 2; }
.spot .facts {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.spot .facts div span { display: block; font-size: 11px; letter-spacing: .2em; color: var(--grey); margin-bottom: 5px; }
.spot .facts div b { font-size: 13.5px; font-weight: 500; line-height: 1.7; }
@media (max-width: 860px) {
  .spot .img-box, .spot.flip .img-box { grid-column: 1 / 13; order: 1; }
  .spot .txt, .spot.flip .txt { grid-column: 1 / 13; order: 2; }
}

/* ---------- 实用攻略 ---------- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  row-gap: calc(var(--gap) * 1.4);
}
.guide-item { border-top: 2px solid var(--ink); padding-top: 24px; }
.guide-item .no { font-family: var(--serif); font-size: 14px; color: var(--accent); letter-spacing: .2em; font-weight: 700; }
.guide-item h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; margin: 12px 0 14px; }
.guide-item p, .guide-item li { font-size: 13.5px; color: var(--grey); line-height: 1.95; }
.guide-item ul { list-style: none; }
.guide-item li { padding-left: 18px; position: relative; margin-bottom: 6px; }
.guide-item li::before { content: ""; position: absolute; left: 0; top: .85em; width: 8px; height: 1px; background: var(--accent); }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } }

/* ---------- 结尾 CTA ---------- */
.finale {
  text-align: left;
  padding-block: calc(var(--sec-y) * 1.1);
  background: var(--ink);
  color: var(--paper);
}
.finale .kicker { color: var(--grey-light); }
.finale .kicker::before { background: var(--grey-light); }
.finale h2 {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(34px, 6.4vw, 88px);
  line-height: 1.3;
}
.finale h2 .q { color: var(--accent); }
.finale p { margin-top: 30px; color: var(--grey-light); font-size: 14px; max-width: 34em; line-height: 2; }
.finale .back {
  display: inline-flex;
  margin-top: 44px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: .24em;
  border: 1px solid color-mix(in srgb, var(--paper) 32%, transparent);
  border-radius: 999px;
  padding: 15px 34px;
  transition: background .35s, color .35s;
  cursor: pointer;
  background: none;
  color: var(--paper);
  font-family: var(--sans);
}
.finale .back:hover { background: var(--paper); color: var(--ink); }

.footer {
  background: var(--ink);
  color: var(--grey-light);
  border-top: 1px solid color-mix(in srgb, var(--paper) 12%, transparent);
  padding: 34px 0;
  font-size: 12px;
  letter-spacing: .12em;
}
.footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* 回到顶部 */
#toTop {
  position: fixed;
  right: clamp(18px, 3vw, 36px);
  bottom: clamp(18px, 3vw, 36px);
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .4s var(--ease);
  z-index: 800;
}
#toTop.show { opacity: 1; visibility: visible; transform: translateY(0); }
#toTop:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 引导按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: .22em;
  padding: 16px 34px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-family: var(--sans);
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { padding: 11px 24px; font-size: 12px; }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(5px); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

/* ---------- 地图探索 ---------- */
.map-sec { background: var(--cream); border-block: 1px solid var(--line); }
.map-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 40px);
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  letter-spacing: .14em;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}
.chip i { width: 22px; height: 3px; border-radius: 2px; background: var(--rc); }
.chip:hover { transform: translateY(-2px); border-color: var(--rc); }
.chip.active { border-color: var(--rc); box-shadow: 0 4px 14px rgba(27,26,23,.08); }
.map-hint { font-size: 12px; color: var(--grey); letter-spacing: .1em; margin-left: auto; }
@media (max-width: 700px) { .map-hint { display: none; } }

.map-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(12px, 2.5vw, 32px);
}
.map-box svg { width: 100%; height: auto; display: block; }

.province { fill: var(--paper); stroke: var(--line); stroke-width: 1; transition: fill .3s; }
.province:hover { fill: #F0EDE5; }
.inset-box { fill: none; stroke: var(--line); stroke-width: 1; }
.inset-path { fill: var(--paper); stroke: var(--grey-light); stroke-width: .5; }

.route-line {
  fill: none;
  stroke: var(--rc);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .42;
  cursor: pointer;
  transition: opacity .4s, stroke-width .4s;
}
.route-line.hit { stroke: transparent; stroke-width: 14; opacity: 1; }
.map-svg.focus-g219 .route-line[data-route="g219"],
.map-svg.focus-g331 .route-line[data-route="g331"],
.map-svg.focus-g228 .route-line[data-route="g228"] { opacity: .95; stroke-width: 3.2; }
.route-line.draw { stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: drawline 3.2s var(--ease) forwards; }
@keyframes drawline { to { stroke-dashoffset: 0; } }

.marker { cursor: pointer; }
.marker .halo { fill: #fff; opacity: .9; }
.marker .dot { fill: var(--rc); transition: r .3s; }
.marker .pulse {
  fill: none;
  stroke: var(--rc);
  stroke-width: 1.5;
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
}
.marker:hover .pulse, .marker.active .pulse { animation: pulse 2s var(--ease) infinite; }
@keyframes pulse {
  0% { transform: scale(.5); opacity: .8; }
  100% { transform: scale(2.6); opacity: 0; }
}
.marker text {
  font-family: var(--serif);
  font-size: 12.5px;
  fill: var(--ink-soft);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3.5px;
  stroke-linejoin: round;
  transition: font-weight .2s;
}
.marker:hover text, .marker.active text { font-weight: 700; fill: var(--ink); }
.marker.active .dot { r: 7; }
.map-svg.has-active .marker:not(.active) { opacity: .45; }
.map-svg.has-active .route-line:not(.hit):not([data-route].on) { opacity: .12; }

/* ---------- 地点详情抽屉 ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility .4s;
}
.backdrop.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 960;
  width: min(520px, 100vw);
  background: var(--paper);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform .55s var(--ease);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer-top .crumb { font-size: 12px; letter-spacing: .24em; color: var(--grey); }
.drawer-top .crumb b { color: var(--rc, var(--accent)); font-weight: 500; }
.drawer-close {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 16px;
  cursor: pointer;
  color: var(--ink);
  transition: background .3s, color .3s;
  flex: none;
}
.drawer-close:hover { background: var(--ink); color: var(--paper); }
.drawer-body { overflow-y: auto; flex: 1; padding: 0 26px 26px; }
.drawer-body .img-box { aspect-ratio: 16 / 10; border-radius: 4px; margin-top: 24px; }
.drawer-body .alt {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 900;
  color: var(--rc, var(--accent));
  line-height: 1;
  margin-top: 28px;
}
.drawer-body .alt i { font-style: normal; font-size: .36em; color: var(--grey); margin-left: 6px; letter-spacing: .1em; }
.drawer-body h3 { font-family: var(--serif); font-size: 27px; font-weight: 700; margin-top: 14px; }
.drawer-body .en { font-size: 11px; letter-spacing: .3em; color: var(--grey-light); text-transform: uppercase; margin-top: 4px; }
.drawer-body > p { font-size: 14px; color: var(--ink-soft); line-height: 2; margin-top: 18px; }
.drawer-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 20px;
}
.drawer-facts span { display: block; font-size: 11px; letter-spacing: .2em; color: var(--grey); margin-bottom: 4px; }
.drawer-facts b { font-size: 13px; font-weight: 500; line-height: 1.7; }
.drawer-days { margin-top: 28px; }
.drawer-days > span { font-size: 11px; letter-spacing: .24em; color: var(--grey); }
.drawer-day {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.drawer-day .dd { font-family: var(--serif); font-size: 12.5px; font-weight: 700; letter-spacing: .16em; color: var(--rc, var(--accent)); }
.drawer-day h5 { font-family: var(--serif); font-size: 15.5px; font-weight: 700; margin-top: 6px; line-height: 1.6; }
.drawer-day .ds { font-size: 12px; color: var(--grey); margin-top: 4px; letter-spacing: .08em; }
.drawer-foot {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 16px 26px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--paper);
}
.drawer-foot .navbtn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  color: var(--ink);
  transition: background .3s, color .3s;
  flex: none;
}
.drawer-foot .navbtn:hover { background: var(--ink); color: var(--paper); }
.drawer-foot .go-route {
  flex: 1;
  justify-content: center;
}
@media (max-width: 640px) {
  .drawer { width: 100vw; border-left: none; }
}

/* 路线横幅里的地图按钮 */
.route-banner .mapbtn { margin-top: 24px; }

/* 目的地卡片可点击提示 */
.spot .img-box { cursor: pointer; }
.spot .txt .open-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font-size: 12.5px;
  letter-spacing: .2em;
  color: var(--rc, var(--accent));
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
}
.spot .txt .open-link::after { content: "→"; transition: transform .3s var(--ease); }
.spot .txt .open-link:hover::after { transform: translateX(6px); }

/* ---------- 收藏 / 想去 ---------- */
.wish-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--paper);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  font-family: var(--sans);
  transition: transform .3s var(--ease), opacity .3s;
  white-space: nowrap;
}
.wish-nav:hover { transform: translateY(-1px); opacity: .92; }
.wish-nav b { font-family: var(--serif); font-size: 14px; }

#wishToggle.on { color: var(--accent); border-color: var(--accent); }

.wish-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.wish-item .wi-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rc, var(--accent)); flex: none; }
.wish-item .wi-txt { flex: 1; min-width: 0; }
.wish-item .wi-txt b { display: block; font-family: var(--serif); font-size: 15px; font-weight: 700; line-height: 1.5; }
.wish-item .wi-txt span { font-size: 12px; color: var(--grey); letter-spacing: .08em; }
.wish-item .wi-open {
  flex: none;
  font-size: 12px;
  letter-spacing: .14em;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--sans);
  transition: background .3s, color .3s;
}
.wish-item .wi-open:hover { background: var(--ink); color: var(--paper); }
.wish-item .wi-del {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--grey-light);
  cursor: pointer;
  font-size: 14px;
  transition: color .3s;
}
.wish-item .wi-del:hover { color: var(--accent); }
.wish-empty { padding: 48px 0; text-align: center; color: var(--grey); font-size: 13.5px; line-height: 2; }

/* ---------- 日程卡片可点击 ---------- */
.day-card { cursor: pointer; position: relative; }
.day-card .more {
  font-size: 11.5px;
  letter-spacing: .18em;
  color: var(--grey-light);
  margin-top: auto;
  transition: color .3s;
}
.day-card:hover .more { color: var(--rc); }
.day-card .more::after { content: " →"; }

/* ---------- 路段展开 / 收起 ---------- */
.seg-toggle {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 18px;
  cursor: pointer;
  font-family: var(--sans);
  white-space: nowrap;
  transition: border-color .3s, color .3s;
}
.seg-toggle:hover { border-color: var(--rc); color: var(--rc); }
.seg-head .range { margin-left: auto; }
.segment.collapsed .day-grid { display: none; }
.segment.collapsed { margin-bottom: clamp(28px, 4vw, 48px); }

/* ---------- 日详情抽屉 ---------- */
.day-detail .bigday {
  font-family: var(--serif);
  font-size: clamp(56px, 8vw, 84px);
  font-weight: 900;
  color: var(--rc, var(--accent));
  line-height: 1;
  margin-top: 26px;
}
.day-detail h3 { font-family: var(--serif); font-size: 24px; font-weight: 700; line-height: 1.5; margin-top: 16px; }
.day-detail .meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}
.day-detail .meta-grid span { display: block; font-size: 11px; letter-spacing: .2em; color: var(--grey); margin-bottom: 4px; }
.day-detail .meta-grid b { font-size: 13px; font-weight: 500; }
.day-detail > p { font-size: 14px; color: var(--ink-soft); line-height: 2; margin-top: 20px; }
.road-block {
  margin-top: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--rc, var(--accent));
  border-radius: 3px;
  padding: 15px 18px;
}
.road-block .rb-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--rc, var(--accent));
  margin-bottom: 8px;
}
.road-block .rb-label::before { content: ""; width: 16px; height: 2px; background: var(--rc, var(--accent)); }
.road-block p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.9; }
.tip-block {
  margin-top: 16px;
  background: var(--cream);
  border-radius: 3px;
  padding: 13px 18px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.9;
}
.tip-block::before { content: "提示 · "; color: var(--accent); font-weight: 500; }

/* ================= 搜索栏 ================= */
.search { position: relative; display: flex; align-items: center; }
.search input {
  width: 200px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: width .25s ease, border-color .2s ease, box-shadow .2s ease;
}
.search input::placeholder { color: var(--grey); }
.search input:focus {
  width: 260px;
  border-color: var(--ink);
  box-shadow: 0 4px 18px rgba(27,26,23,.08);
}
.search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(27,26,23,.14);
  padding: 6px;
  display: none;
  z-index: 300;
}
.search-results.open { display: block; }
.sr-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background .15s ease;
}
.sr-item:hover, .sr-item.active { background: var(--cream); }
.sr-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.sr-main { flex: 1; min-width: 0; }
.sr-label {
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-sub {
  font-size: 12px;
  color: var(--grey);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.sr-kind {
  flex: none;
  font-size: 11px;
  color: var(--grey);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
}
.sr-empty {
  padding: 18px 14px;
  font-size: 13px;
  color: var(--grey);
  text-align: center;
}
.sr-group {
  padding: 8px 12px 4px;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--grey);
}
@media (max-width: 900px) {
  .search input { width: 140px; }
  .search input:focus { width: 180px; }
  .search-results { width: min(340px, calc(100vw - 32px)); }
}
