:root {
  --ink: #2E2A24;
  --ink2: #6B6259;
  --ink3: #9A9086;
  --paper: #F5F0E6;
  --paper2: #FFFDF8;
  --line: rgba(46, 42, 36, .12);
  --qing: #3C7E92;
  --gold: #9A6B23;
  --zhu: #C8402E;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --rail-w: 0px;
  --panel-w: 0px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

body { position: relative; display: flex; flex-direction: column; height: 100dvh; }

/* 手机端把 .rail 摊平，让顶栏/公告/抽屉直接当 body 的子项；
   电脑端（≥1024px）才把它变成左侧资料栏 */
.rail { display: contents; }
/* 这几个只在电脑端出现 */
.rail-search, .rail-stats, .rail-chips { display: none; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--paper2);
  border-bottom: 1px solid var(--line);
  z-index: 25;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.topbar-ops { display: flex; align-items: center; gap: 8px; }
.brand-name { font-family: var(--serif); font-size: 20px; letter-spacing: 3px; }
.brand-sub { font-size: 11.5px; color: var(--ink3); letter-spacing: .5px; }
.ghost-btn {
  border: 1px solid var(--line);
  background: none;
  color: var(--ink2);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--sans);
}

/* ---------------- 地图 ---------------- */
.mapwrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #EFE8DA;
  touch-action: none;
  user-select: none;
  /* 腾讯地图内部控件 z-index 高达 1000，必须隔离，
     否则比例尺会浮到抽屉上面 */
  isolation: isolate;
}
#map { position: absolute; inset: 0; z-index: 0; }

.sch-stage {
  position: absolute;
  left: 0; top: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.sch-stage svg { display: block; }
.sch-markers { position: absolute; inset: 0; pointer-events: none; }

.marker {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
}
.marker i {
  position: absolute;
  left: -7px; top: -7px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: currentColor;
  border: 2px solid #FFFDF8;
  box-shadow: 0 1px 4px rgba(46, 42, 36, .35);
}
.marker span {
  position: absolute;
  left: 11px; top: -9px;
  white-space: nowrap;
  font-size: 11px;
  line-height: 16px;
  color: var(--ink);
  background: rgba(255, 253, 248, .92);
  padding: 0 5px;
  border-radius: 4px;
}
.marker-ling { color: var(--gold); }
.marker-sight { color: var(--qing); }
.marker-food { color: var(--zhu); }
.marker-food span { display: none; }
.marker-sight span { display: none; }
.sch-markers.food-focus .marker-food span,
.sch-markers.zoom-in .marker-food span,
.sch-markers.zoom-in .marker-sight span { display: block; }
.marker-food i { left: -5px; top: -5px; width: 10px; height: 10px; }

.marker b {
  position: absolute;
  left: -9px; top: -30px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 18px;
  text-align: center;
  font-family: var(--sans);
}
.marker.on-route i { box-shadow: 0 0 0 5px rgba(169, 118, 47, .22); }
.marker.pulse i { animation: pulse .9s ease-out; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(169, 118, 47, .55); }
  100% { box-shadow: 0 0 0 20px rgba(169, 118, 47, 0); }
}

.me-dot {
  position: absolute; left: 0; top: 0;
  width: 0; height: 0;
}
.me-dot::after {
  content: '';
  position: absolute;
  left: -8px; top: -8px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #2E6FD9;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(46, 111, 217, .18);
}

/* ---------------- 地图浮层 ---------------- */
.chips {
  position: absolute;
  top: 12px; left: 0; right: 0;
  display: flex;
  gap: 8px;
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 1002;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .94);
  color: var(--ink2);
  font-size: 13px;
  padding: 7px 15px;
  border-radius: 999px;
  font-family: var(--sans);
  transition: background .2s, color .2s;
}
.chip.active { background: var(--ink); color: #FFFDF8; border-color: var(--ink); }
.chip.active .dot { box-shadow: 0 0 0 2px rgba(255, 253, 248, .22); }

.map-legend {
  position: absolute;
  left: 14px;
  bottom: calc(var(--sheet-h, 52vh) + 16px);
  display: flex;
  gap: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 248, .9);
  font-size: 11.5px;
  color: var(--ink2);
  z-index: 1002;
}
.map-legend span { display: flex; align-items: center; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-ling { background: var(--gold); }
.dot-sight { background: var(--qing); }
.dot-food { background: var(--zhu); }

.map-note {
  position: absolute;
  left: 14px;
  bottom: calc(var(--sheet-h, 52vh) + 16px);
  font-size: 10.5px;
  color: var(--ink3);
  background: rgba(255, 253, 248, .85);
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 1002;
}

.locate-btn {
  position: absolute;
  right: 14px;
  /* 让开右上角的腾讯缩放控件，落到抽屉上方的右下角 */
  bottom: calc(var(--sheet-h, 52vh) + 14px);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, .95);
  color: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
}

/* ---------------- 底部抽屉 ---------------- */
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--h, 52vh);
  min-height: 120px;
  background: var(--paper2);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -6px 24px rgba(46, 42, 36, .13);
  display: flex;
  flex-direction: column;
  transition: height .3s cubic-bezier(.3, .8, .3, 1);
  z-index: 20;
}
.sheet-grip {
  flex: none;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.sheet-grip span { width: 36px; height: 4px; border-radius: 2px; background: #DCD5C6; }
.sheet-head { flex: none; padding: 0 18px 10px; }
.sheet-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
}
.sheet-head p { margin: 3px 0 0; font-size: 12px; color: var(--ink3); }
.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 18px 24px;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.sheet-body::-webkit-scrollbar { width: 0; height: 0; }
.sheet-body::-webkit-scrollbar-thumb { background: transparent; }
.group-label {
  margin: 14px 0 4px;
  font-size: 11.5px;
  color: var(--ink3);
  letter-spacing: 1px;
}
.group-label span { color: #C4BBAB; margin-left: 4px; }
.empty { color: var(--ink3); font-size: 13px; text-align: center; padding: 40px 0; }

.card {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font-family: var(--sans);
  color: inherit;
}
.card:last-child { border-bottom: 0; }
.card:active { background: rgba(46, 42, 36, .03); }
.thumb {
  flex: none;
  width: 50px; height: 50px;
  border-radius: 10px;
  color: #FFFDF8;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-main { display: flex; flex-direction: column; min-width: 0; }
.card-title { font-size: 14.5px; font-weight: 500; display: flex; align-items: center; }
.card-title em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 6px;
  line-height: 15px;
}
.card-sub {
  font-size: 12.5px;
  color: var(--ink2);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card-meta { font-size: 11px; color: var(--ink3); margin-top: 4px; }

.step { align-items: center; }
.step-no {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #FFFDF8;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
}
.route-head { padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.route-name { margin: 0; font-size: 15px; font-weight: 500; }
.route-note { margin: 6px 0 8px; font-size: 12.5px; color: var(--ink2); line-height: 1.65; }

.text-btn {
  border: 0;
  background: none;
  color: var(--qing);
  font-size: 12.5px;
  padding: 4px 0;
  font-family: var(--sans);
}

/* ---------------- 详情页 ---------------- */
.detail {
  position: fixed;
  inset: 0;
  background: var(--paper);
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.3, .8, .3, 1);
  z-index: 50;
  display: flex;
  flex-direction: column;
}
.detail.open { transform: none; }
.detail-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 88px; }

.hero { position: relative; padding: 58px 20px 24px; color: #FFFDF8; }
.back-btn {
  position: absolute;
  top: 12px; left: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 253, 248, .16);
  color: #FFFDF8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-type {
  font-size: 11.5px;
  letter-spacing: 1px;
  opacity: .72;
}
.hero-name {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 3px;
}
.hero-alias { margin: 6px 0 0; font-size: 13px; opacity: .8; }

.detail-body { padding: 20px 20px 0; background: var(--paper); }
.lead { margin: 0 0 14px; font-size: 15px; font-weight: 500; line-height: 1.6; }
.desc { margin: 0; font-size: 14px; line-height: 1.85; color: #4A443B; text-align: justify; }
.sec {
  margin: 26px 0 10px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink3);
  letter-spacing: 2px;
}
.sec::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: #D6CDBC;
  vertical-align: 4px;
  margin-left: 8px;
}
.hl { margin: 0; padding-left: 18px; }
.hl li { font-size: 13.5px; line-height: 1.85; color: #4A443B; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags.soft { margin-top: 16px; }
.tag {
  font-size: 12px;
  color: var(--ink2);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper2);
}

.info { margin: 0; }
.info div {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.info dt { flex: none; width: 42px; font-size: 12.5px; color: var(--ink3); }
.info dd { margin: 0; font-size: 13.5px; color: #3C372F; line-height: 1.6; }
.info dd a { color: var(--qing); text-decoration: none; }
.info dd.muted { color: var(--ink3); }

.near { display: flex; flex-direction: column; gap: 8px; }
.near-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper2);
  font-family: var(--sans);
  text-align: left;
}
.near-name { font-size: 13.5px; }
.near-meta { font-size: 11.5px; color: var(--ink3); flex: none; }

.disclaim {
  margin: 26px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: #A29785;
}

.detail-actions {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper2);
  border-top: 1px solid var(--line);
}
.act {
  flex: 1;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper2);
  color: var(--ink);
  font-size: 14.5px;
  font-family: var(--sans);
}
.act.primary { background: var(--ink); color: #FFFDF8; border-color: var(--ink); }
.act[disabled] { color: #B9B0A1; }

/* ---------------- 弹层 ---------------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 24, 18, .5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 60;
}
.modal.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--paper2);
  border-radius: 16px;
  padding: 20px;
}
.modal-card.wide { max-height: 78vh; overflow-y: auto; }
.modal-title { margin: 0 0 12px; font-family: var(--serif); font-size: 17px; letter-spacing: 1px; }
.modal-desc { margin: 0 0 10px; font-size: 13px; line-height: 1.75; color: #4A443B; }
.modal-desc b { color: var(--ink); }

/* 转发卡片预览：仿微信里的一条分享条目 */
.share-prev {
  display: flex;
  gap: 10px;
  padding: 10px;
  margin: 4px 0 14px;
  background: var(--paper);
  border: 1px solid rgba(46, 42, 36, .08);
  border-radius: 10px;
}
.share-thumb {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #8C2F1E, #6E2416);
  display: flex;
  align-items: center;
  justify-content: center;
}
.share-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-thumb span { font-family: var(--serif); font-size: 22px; color: #FBF1DE; letter-spacing: 1px; }
.share-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.share-t {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-d {
  margin: 0;
  font-size: 11.5px;
  color: #8A8272;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.share-k { margin: 0; font-size: 10.5px; color: #B4AA96; }
.modal-addr {
  margin: 12px 0;
  padding: 10px 12px;
  background: var(--paper);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.6;
}
.modal-list { margin: 0 0 12px; padding-left: 18px; }
.modal-list li { font-size: 12.5px; line-height: 1.8; color: #4A443B; }
.modal-btns { display: flex; gap: 10px; margin-top: 6px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 26%;
  transform: translate(-50%, 12px);
  max-width: 76vw;
  padding: 10px 16px;
  background: rgba(38, 34, 28, .92);
  color: #FFFDF8;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  z-index: 70;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  body { max-width: 460px; margin: 0 auto; box-shadow: 0 0 60px rgba(46, 42, 36, .12); }
  /* 弹层遮罩始终铺满窗口，只收窄卡片，否则会整体偏到右边 */
  .modal { left: 0; right: 0; width: auto; max-width: none; }
  .detail, .toast { max-width: 460px; left: 50%; right: auto; width: 100%; }
  .detail { transform: translate(-50%, 100%); }
  .detail.open { transform: translate(-50%, 0); }
  .toast { transform: translate(-50%, 12px); }
  .toast.show { transform: translate(-50%, 0); }
}

body.has-realmap .mapwrap { touch-action: auto; }

/* ============================================================
   开屏动画
   ============================================================ */
:root {
  --ink-dark: #1A1714;
  --seal: #A63A2E;
  --rice: #F2EADA;
}

body.preload .topbar,
body.preload .mapwrap,
body.preload .sheet,
body.preload .notice { opacity: 0; }

.topbar, .mapwrap, .sheet {
  transition: opacity .55s ease .05s;
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--ink-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.splash.out {
  animation: splashOut .55s cubic-bezier(.4, 0, .8, .4) forwards;
}
@keyframes splashOut {
  to { opacity: 0; transform: scale(1.04); }
}

.splash-glow {
  position: absolute;
  width: 150vw;
  height: 150vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 142, 74, .30) 0%, rgba(166, 58, 46, .10) 38%, rgba(26, 23, 20, 0) 68%);
  opacity: 0;
  animation: glowIn 1.6s ease-out .1s forwards;
}
@keyframes glowIn {
  0% { opacity: 0; transform: scale(.55); }
  55% { opacity: 1; }
  100% { opacity: .85; transform: scale(1); }
}

.splash-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 26px;
}

.splash-seal {
  width: 92px;
  height: 92px;
  background: var(--seal);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 34px rgba(166, 58, 46, .38);
  opacity: 0;
  animation: sealDrop .85s cubic-bezier(.22, 1.2, .36, 1) .34s forwards;
}
.splash-seal span {
  font-family: var(--serif);
  font-size: 40px;
  letter-spacing: 4px;
  color: #FBF3E4;
  text-indent: 4px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .18);
}
@keyframes sealDrop {
  0%   { opacity: 0; transform: translateY(-72px) scale(1.65) rotate(-12deg); }
  55%  { opacity: 1; transform: translateY(5px) scale(.96) rotate(1.5deg); }
  74%  { transform: translateY(-4px) scale(1.02) rotate(-.6deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

.splash-rule {
  width: 132px;
  height: 1px;
  margin: 26px 0 0;
  background: linear-gradient(90deg, transparent, rgba(226, 205, 172, .75), transparent);
  transform: scaleX(0);
  animation: ruleGrow .8s ease-out 1.02s forwards;
}
@keyframes ruleGrow { to { transform: scaleX(1); } }

.splash-sub {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 5px;
  color: #E6D9C2;
  opacity: 0;
  animation: upFade .8s ease-out 1.22s forwards;
}
.splash-foot {
  margin: 12px 0 0;
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(230, 217, 194, .44);
  opacity: 0;
  animation: upFade .8s ease-out 1.52s forwards;
}
@keyframes upFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.splash-field {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 150px;
  z-index: 1;
}
.splash-field .wave { transform: translateY(40px); opacity: 0; }
.splash-field .w1 { animation: waveIn .9s ease-out .95s forwards, waveSway 5s ease-in-out 1.9s infinite; }
.splash-field .w2 { animation: waveIn .9s ease-out 1.12s forwards, waveSway 5s ease-in-out 2.2s infinite; }
.splash-field .w3 { animation: waveIn .9s ease-out 1.30s forwards, waveSway 5s ease-in-out 2.5s infinite; }
@keyframes waveIn {
  from { transform: translateY(46px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes waveSway {
  0%, 100% { transform: translateY(0) }
  50% { transform: translateY(-5px) }
}

.splash-skip {
  position: absolute;
  right: 16px;
  top: calc(14px + env(safe-area-inset-top));
  padding: 5px 13px;
  font-size: 12px;
  color: rgba(242, 234, 218, .62);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(242, 234, 218, .16);
  border-radius: 999px;
  z-index: 3;
  opacity: 0;
  animation: upFade .6s ease-out 1.1s forwards;
}

/* ============================================================
   公告条 / 页脚
   ============================================================ */
.notice {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: #FBF1DD;
  border-bottom: 1px solid rgba(169, 118, 47, .16);
  font-size: 12px;
  color: #8A6531;
}
.notice[hidden] { display: none; }
.notice-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}
.notice span:not(.notice-dot) { flex: 1; }
.notice-x {
  border: 0;
  background: none;
  color: #B49A70;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}

.credit {
  flex: none;
  margin: 0;
  padding: 10px 18px calc(12px + env(safe-area-inset-bottom));
  font-size: 10.5px;
  color: #B4AA9A;
  text-align: center;
  letter-spacing: .5px;
  border-top: 1px solid rgba(46, 42, 36, .06);
}

/* ============================================================
   内容入场动效
   ============================================================ */
.marker i {
  animation: dotIn .5s cubic-bezier(.2, 1.3, .4, 1) both;
  animation-delay: calc(var(--i, 0) * 26ms + .15s);
}
@keyframes dotIn {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.card {
  animation: cardIn .44s cubic-bezier(.2, .8, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 34ms);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero-name { animation: upFade .55s ease-out .06s both; }
.hero-alias { animation: upFade .55s ease-out .14s both; }
.hero-type { animation: upFade .5s ease-out both; }
.detail-body > * {
  animation: upFade .5s ease-out both;
}
.detail-body > *:nth-child(1) { animation-delay: .1s; }
.detail-body > *:nth-child(2) { animation-delay: .16s; }
.detail-body > *:nth-child(3) { animation-delay: .22s; }
.detail-body > *:nth-child(4) { animation-delay: .26s; }
.detail-body > *:nth-child(n+5) { animation-delay: .3s; }

.detail-actions { animation: upFade .4s ease-out .2s both; }

.step { animation-delay: calc(var(--i, 0) * 60ms + .1s); }
.step-no { animation: dotIn .4s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(var(--i, 0) * 60ms + .25s); }

.chip { transition: background .2s, color .2s, transform .15s; }
.chip:active { transform: scale(.95); }

.act:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  .splash-seal, .splash-rule, .splash-sub, .splash-foot,
  .splash-field .wave, .splash-glow { animation-duration: .01ms !important; animation-delay: 0ms !important; }
  .marker i, .card, .hero-name, .hero-alias, .detail-body > *, .detail-actions, .step, .step-no {
    animation: none !important;
  }
}


/* 窄屏上腾讯自带的缩放按钮会压住点位，手机上双指缩放就够 */
@media (max-width: 560px) {
  #map .tmap-zoom-control { display: none !important; }
}

/* ============================================================
   电脑端（≥1024px）
   布局：左侧资料栏（品牌 / 搜索 / 筛选 / 列表） + 右侧全屏地图
   详情不再是全屏页，而是从地图右侧滑出的面板
   ============================================================ */
@media (min-width: 1024px) {
  :root { --rail-w: 400px; --panel-w: 440px; }

  /* 720px 那条「居中手机栏」的规则在电脑上要全部失效 */
  body {
    flex-direction: row;
    max-width: none;
    margin: 0;
    box-shadow: none;
    background: #E9E2D5;
  }

  /* ---------------- 左侧资料栏 ---------------- */
  .rail {
    display: flex;
    flex-direction: column;
    flex: none;
    width: var(--rail-w);
    height: 100dvh;
    background: var(--paper2);
    border-right: 1px solid var(--line);
    z-index: 30;
  }

  .topbar {
    padding: 22px 24px 14px;
    background: transparent;
    border-bottom: 0;
  }
  .brand { flex-direction: column; align-items: flex-start; gap: 5px; }
  .brand-name { font-size: 27px; letter-spacing: 7px; line-height: 1.1; }
  .brand-sub { font-size: 12px; }
  .ghost-btn { font-size: 12.5px; padding: 6px 14px; transition: background .2s, color .2s, border-color .2s; }
  .ghost-btn:hover { background: var(--ink); color: #FFFDF8; border-color: var(--ink); }

  .notice { margin: 0 24px 6px; padding: 7px 11px; border-radius: 8px; border: 1px solid rgba(169, 118, 47, .18); }

  .sheet {
    position: static;
    flex: 1;
    height: auto;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transition: none;
  }
  .sheet-grip { display: none; }
  .sheet-head { padding: 4px 24px 0; }
  .sheet-head h1 { display: none; }
  .sheet-head > p { margin: 0; font-size: 12.5px; color: var(--ink3); line-height: 1.65; }
  .sheet-body { padding: 2px 24px 16px; }
  .sheet-body::-webkit-scrollbar { width: 6px; }
  .sheet-body::-webkit-scrollbar-thumb { background: rgba(46, 42, 36, .14); border-radius: 3px; }
  .credit { padding: 10px 24px 14px; border-top: 1px solid var(--line); }

  /* 搜索框 */
  .rail-search {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 14px 0 0;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    cursor: text;
    transition: border-color .2s, background .2s;
  }
  .rail-search:focus-within { border-color: rgba(46, 42, 36, .3); background: #FFFDF8; }
  .rail-search svg { flex: none; color: var(--ink3); }
  .rail-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: none;
    outline: none;
    font-size: 13.5px;
    font-family: var(--sans);
    color: var(--ink);
  }
  .rail-search input::placeholder { color: #B7AD9D; }
  .rail-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
  .search-clear {
    border: 0;
    background: none;
    color: var(--ink3);
    font-size: 17px;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
  }
  .search-clear[hidden] { display: none; }

  /* 统计行 */
  .rail-stats {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin: 12px 0 0;
    font-size: 11.5px;
    color: var(--ink3);
  }
  .rail-stats b {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    margin-right: 4px;
  }
  .rail-stats .stat-hint { margin-left: auto; font-size: 11px; color: #B7AD9D; letter-spacing: .3px; }

  /* 筛选胶囊从地图上搬到侧栏 */
  .rail-chips { display: block; }
  .sheet-head .chips {
    position: static;
    margin: 14px 0 2px;
    padding: 0;
    gap: 5px;
    flex-wrap: wrap;
    overflow: visible;
    z-index: auto;
  }
  .sheet-head .chips .chip { font-size: 12px; padding: 5px 11px; gap: 4px; cursor: pointer; }
  .sheet-head .chips .chip:hover { background: rgba(46, 42, 36, .06); }
  .sheet-head .chips .chip.active:hover { background: var(--ink); }

  /* 列表 */
  .group-label { margin: 18px 0 2px; }
  .card {
    width: auto;
    margin: 0 -10px;
    padding: 12px 10px;
    border-radius: 9px;
    transition: background .16s;
  }
  .card:hover { background: rgba(46, 42, 36, .045); }
  .card:active { background: rgba(46, 42, 36, .07); }
  .thumb { width: 46px; height: 46px; }

  /* ---------------- 地图区 ---------------- */
  .locate-btn { right: 18px; bottom: 18px; width: 40px; height: 40px; cursor: pointer; }
  .locate-btn:hover { background: #FFFDF8; }
  .map-note { left: 18px; bottom: 18px; }
  body.detail-open .locate-btn { right: calc(var(--panel-w) + 18px); }

  /* ---------------- 详情面板 ---------------- */
  .detail {
    width: var(--panel-w);
    max-width: none;
    left: auto;
    right: 0;
    transform: translateX(102%);
    box-shadow: -10px 0 40px rgba(46, 42, 36, .14);
  }
  .detail.open { transform: none; }
  .hero { padding: 44px 28px 26px; }
  .hero-name { font-size: 31px; letter-spacing: 4px; }
  .detail-body { padding: 22px 28px 0; }
  .detail-scroll { padding-bottom: 100px; }
  .detail-actions { padding: 12px 28px 18px; }
  .lead { font-size: 15.5px; }
  .desc { font-size: 14.5px; }
  .near-item { cursor: pointer; transition: border-color .2s, background .2s; }
  .near-item:hover { border-color: rgba(46, 42, 36, .26); background: #fff; }

  /* ---------------- 弹层 / 提示 ---------------- */
  .modal { left: 0; right: 0; width: auto; max-width: none; }
  .modal-card { max-width: 400px; }
  .modal-card.wide { max-width: 500px; }
  .modal-card .text-btn { cursor: pointer; padding: 6px 0; }
  .modal-card .text-btn + .text-btn { margin-left: 20px; }
  .modal-card .text-btn:hover { color: var(--ink); }
  .toast {
    left: calc(50% + var(--rail-w) / 2);
    width: auto;
    max-width: 380px;
    bottom: 12%;
  }

  /* ---------------- 开屏放大 ---------------- */
  .splash-inner { padding-bottom: 42px; }
  .splash-seal { width: 116px; height: 116px; border-radius: 8px; }
  .splash-seal span { font-size: 50px; letter-spacing: 8px; text-indent: 8px; }
  .splash-rule { width: 190px; margin-top: 30px; }
  .splash-sub { font-size: 17px; letter-spacing: 7px; margin-top: 24px; }
  .splash-foot { font-size: 11.5px; letter-spacing: 5px; }
  .splash-field { height: 220px; }
  .splash-skip { right: 26px; top: 22px; }
}

/* 超宽屏把侧栏再放宽一点，列表更好读 */
@media (min-width: 1500px) {
  :root { --rail-w: 440px; }
}
