/* =========================================================================
   Shanghai Bespoke — modern metropolitan design system
   Bright, high-contrast, electric blue. Full-bleed map as the stage,
   floating glass panels over it. No serif, no sepia, no nostalgia.
   ========================================================================= */

:root {
  /* surfaces */
  --bg:         #FFFFFF;
  --bg-soft:    #F6F7F9;
  --surface:    #FFFFFF;
  --surface-2:  #F2F4F7;
  --surface-3:  #E9EDF2;

  /* ink */
  --ink:        #0B1220;
  --ink-2:      #475467;
  --muted:      #98A2B3;
  --muted-2:    #C3CAD4;

  /* lines */
  --line:       #EAECF0;
  --line-2:     #D8DEE7;

  /* brand */
  --brand:      #0A5CFF;
  --brand-d:    #0846C4;
  --brand-soft: #EFF5FF;
  --cyan:       #06B6D4;
  --orange:     #FF6B35;
  --green:      #12B76A;
  --pink:       #E31B54;

  /* type */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

  /* metrics */
  --header-h: 58px;
  --panel-w: 380px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* elevation */
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 4px 8px -2px rgba(16,24,40,.08), 0 2px 4px -2px rgba(16,24,40,.06);
  --sh-3: 0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.04);
  --sh-4: 0 20px 24px -4px rgba(16,24,40,.10), 0 8px 8px -4px rgba(16,24,40,.04);
  --sh-5: 0 32px 64px -12px rgba(16,24,40,.22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
}
::selection { background: rgba(10,92,255,.16); }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: #D0D5DD; border-radius: 99px;
  border: 3px solid transparent; background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: #B4BCC8; background-clip: padding-box; }

/* ================= HEADER ================= */
header.site {
  position: relative;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  margin-right: auto; min-width: 0;
}
/* 品牌区 —— 规格逐项照抄主站 website/assets/styles.css 的 .nav-logo：
     logo-mark  32×32、border-radius 6px、background #0A2540、
                Inter 700 / 0.875rem、白字、grid 居中
     品牌名     Playfair Display serif 700 / 1.375rem、color #0A2540、
                letter-spacing -0.01em
     gap        0.625rem
   ⚠️ 上一版我自己设计了一套（SVG 圆弧 + Inter sans + 双行），
      与主站差异明显。现在只保留一处偏离：副标题（城市名）——
      顶栏必须能看出当前城市，主站没有这个需求。 */
.brand .logo-mark {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  background: #0A2540;
  color: #fff;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0;
}
/* 品牌名与副标题竖排；主行的字号/字体与主站一致，副标题是子站独有 */
.brand .brand-text {
  display: flex; flex-direction: column;
  justify-content: center;
  min-width: 0;
  line-height: 1.15;
}
.brand .name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #0A2540;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand .name i { font-style: normal; color: var(--brand); }
.brand .sub {
  font-size: 11px; color: var(--muted); font-weight: 500;
  white-space: nowrap; letter-spacing: -.005em;
  margin-top: 1px;
}

@media (max-width: 640px) {
  /* 手机上主站字号会挤掉行程按钮与语言切换，缩一档并隐藏副标题
     —— 城市名在切换器按钮上仍然看得到，不丢信息。 */
  .brand .name { font-size: 1.0625rem; }
  .brand .sub { display: none; }
  .brand .logo-mark { width: 28px; height: 28px; font-size: 0.8125rem; }
}

/* ---------------- 城市切换器 ----------------
   目的：让用户知道还有别的城市，且不干扰当前操作。
   所以它是一个收起的下拉，不是常驻的城市列表 —— 顶栏在移动端
   已经有品牌 + 行程按钮 + 语言切换，再排 6 个城市名必然换行。 */
.city-pick { position: relative; flex: none; }
.city-btn {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 46vw;
}
.city-btn > svg:first-child { width: 15px; height: 15px; flex: none; opacity: .75; }
.city-btn #cityBtnName {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.city-btn .caret {
  width: 13px; height: 13px; flex: none; opacity: .55;
  transition: transform .18s;
}
.city-pick.open .city-btn .caret { transform: rotate(180deg); }
.city-pick.open .city-btn { background: var(--surface-2); }

.city-menu {
  position: absolute; top: calc(100% + 7px); right: 0;
  min-width: 210px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-4);
  padding: 6px;
  z-index: 600;
  /* 默认不可见也不可点。用 visibility 而非 display:none，
     这样有过渡动画，且菜单内容始终在 DOM 里可被读屏索引。 */
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .16s, visibility .16s, transform .16s;
}
.city-pick.open .city-menu { opacity: 1; visibility: visible; transform: none; }

.city-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 9px; border-radius: 8px;
  text-decoration: none; color: var(--ink);
  font-size: 13px; font-weight: 600; letter-spacing: -.01em;
}
a.city-item:hover { background: var(--surface-2); }
.city-item .ck {
  width: 15px; height: 15px; flex: none;
  display: grid; place-items: center; color: var(--brand);
}
.city-item .ck svg { width: 14px; height: 14px; }
.city-item .nm { min-width: 0; }
/* 副语言城市名：中文界面显示英文名，反之亦然 —— 帮外国用户对上号 */
.city-item .nm em {
  font-style: normal; font-weight: 500; color: var(--muted);
  margin-left: 6px; font-size: 11.5px;
}
.city-item.on { color: var(--brand); cursor: default; }

.city-more {
  margin: 5px 3px 2px;
  padding: 7px 6px 4px;
  border-top: 1px solid var(--line);
  font-size: 11px; font-weight: 500; color: var(--muted);
  letter-spacing: -.005em;
}

@media (max-width: 640px) {
  /* 手机上顶栏空间紧张：只留图钉图标 + 箭头，城市名靠品牌区已经表达了。
     菜单改为贴右侧、留出安全边距。 */
  .city-btn #cityBtnName { display: none; }
  .city-btn { padding-left: 9px; padding-right: 7px; }
  .city-menu { min-width: 188px; right: -4px; }
}

.seg-toggle {
  display: flex; background: var(--surface-2);
  border-radius: 99px; padding: 3px; flex: none;
}
.seg-toggle button {
  appearance: none; border: 0; background: transparent;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  color: var(--ink-2); padding: 5px 13px; border-radius: 99px;
  cursor: pointer; transition: background .18s, color .18s, box-shadow .18s;
  white-space: nowrap; letter-spacing: -.01em;
}
.seg-toggle button.on {
  background: var(--surface); color: var(--brand); box-shadow: var(--sh-1);
}

.btn {
  appearance: none; cursor: pointer;
  font-family: var(--sans); font-weight: 600; letter-spacing: -.01em;
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .12s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-primary {
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  font-size: 13px; padding: 9px 16px; box-shadow: 0 1px 2px rgba(10,92,255,.24);
}
.btn-primary:hover { background: var(--brand-d); border-color: var(--brand-d); }
.btn-primary:disabled {
  background: var(--surface-3); border-color: var(--surface-3);
  color: var(--muted); cursor: not-allowed; box-shadow: none;
}
.btn-ghost {
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2);
  font-size: 13px; padding: 9px 14px;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--muted-2); }
.btn-sm { font-size: 12px; padding: 7px 12px; }
.btn-block { width: 100%; }

.pill-count {
  background: rgba(255,255,255,.24); border-radius: 99px;
  min-width: 19px; height: 19px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 700;
}

/* ================= APP SHELL ================= */
.app {
  position: relative;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  overflow: hidden;
  background: var(--surface-3);
}

/* --- the map is the stage, edge to edge --- */
.stage { position: absolute; inset: 0; }
.tilemap {
  position: absolute; inset: 0;
  overflow: hidden; cursor: grab;
  touch-action: none;
  background: #E9EDF2;
}
.tilemap.dragging { cursor: grabbing; }
.tile-layer { position: absolute; left: 0; top: 0; will-change: transform; }
.tile-layer img {
  position: absolute; width: 256px; height: 256px;
  transition: opacity .3s;
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
}
.marker-layer { position: absolute; inset: 0; pointer-events: none; }

/* --- markers --- */
.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto; cursor: pointer;
  will-change: transform;
  z-index: 1;
}
.pin .dot {
  width: 15px; height: 15px; border-radius: 99px;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(16,24,40,.32);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  display: grid; place-items: center;
}
.pin:hover { z-index: 30; }
.pin:hover .dot { transform: scale(1.5); }
.pin.saved { z-index: 20; }
.pin.saved .dot {
  width: 24px; height: 24px;
  background: var(--brand) !important;
  border-color: #fff;
  box-shadow: 0 4px 12px rgba(10,92,255,.45);
}
.pin.saved .ord {
  font-size: 11px; font-weight: 700; color: #fff;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.pin.is-active { z-index: 40; }
.pin.is-active .dot { transform: scale(1.42); }
.pin.is-active::before {
  content: ''; position: absolute;
  left: 50%; top: 50%;
  width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px;
  border-radius: 99px; border: 2px solid var(--brand);
  animation: ping 1.5s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping { 0% { transform: scale(1); opacity: .8 } 100% { transform: scale(3.4); opacity: 0 } }

.pin .tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: -.01em;
  padding: 5px 9px; border-radius: 7px;
  white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .16s, transform .16s;
  box-shadow: var(--sh-3);
}
.pin .tip::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--ink);
}
.pin:hover .tip, .pin.is-active .tip { opacity: 1; }

.route-svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
/* 自由行路线：点线太淡，改为粗虚线 + 白色描边。
   白描边让线在卫星底图和深色路段上都能看清，又不必把线加粗到抢眼。 */
.route-svg path {
  fill: none; stroke: var(--brand); stroke-width: 3.25;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 10 8;
  opacity: .9;
  filter:
    drop-shadow(0 0 1.5px rgba(255,255,255,.95))
    drop-shadow(0 0 3px rgba(255,255,255,.75))
    drop-shadow(0 1px 4px rgba(10,92,255,.5));
}

/* ================= FLOATING PANEL (explore) ================= */
.panel {
  position: absolute;
  left: 14px; top: 14px; bottom: 14px;
  /* shrinks with the viewport so the map always keeps a usable strip */
  width: min(var(--panel-w), calc(100vw - 230px));
  min-width: 258px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-4);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform .34s cubic-bezier(.32,.72,0,1), opacity .24s;
}
.panel.collapsed {
  transform: translateX(calc(-100% - 22px));
  opacity: 0; pointer-events: none;
}
.panel-head {
  flex: none; padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.panel-head .row { display: flex; align-items: center; gap: 8px; }
.panel-head h2 {
  margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.03em;
}
.panel-head .cnt {
  font-size: 12px; color: var(--muted); font-weight: 500;
  margin-left: auto; font-variant-numeric: tabular-nums;
}
.icon-btn {
  appearance: none; border: 1px solid var(--line-2); background: var(--surface);
  width: 30px; height: 30px; border-radius: var(--r-sm);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  transition: background .16s, color .16s, border-color .16s; flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }

/* resize grip */
.panel-resize {
  position: absolute; top: 0; right: -4px; bottom: 0; width: 10px;
  cursor: col-resize; z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.panel-resize::after {
  content: ''; width: 3px; height: 40px; border-radius: 99px;
  background: var(--muted-2); opacity: 0; transition: opacity .18s, background .18s;
}
.panel-resize:hover::after, .panel-resize.active::after { opacity: 1; background: var(--brand); }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing .panel { transition: none; }

.panel-toggle {
  position: absolute; left: 14px; top: 14px; z-index: 99;
  appearance: none; border: 1px solid rgba(255,255,255,.7);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-radius: var(--r);
  height: 40px; padding: 0 14px;
  display: none; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--ink); cursor: pointer; box-shadow: var(--sh-3);
  letter-spacing: -.01em;
}
.panel.collapsed ~ .panel-toggle { display: flex; }
.panel-toggle svg { width: 15px; height: 15px; }

/* attention dot on the collapsed Explore button */
.panel-toggle .nudge {
  position: absolute; top: -5px; right: -5px;
  width: 12px; height: 12px; border-radius: 99px;
  background: #F04438; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(240,68,56,.5);
}
.panel-toggle .nudge::after {
  content: ''; position: absolute; inset: -2px;
  border-radius: 99px; border: 2px solid #F04438;
  animation: nudgePing 1.8s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes nudgePing {
  0%   { transform: scale(.7); opacity: .85 }
  100% { transform: scale(2.3); opacity: 0 }
}
.panel-toggle.seen .nudge { display: none; }

/* ---- search + chips ---- */
.tools { flex: none; padding: 12px 16px 13px; border-bottom: 1px solid var(--line); }
.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 0 12px; height: 38px;
  transition: background .18s, border-color .18s, box-shadow .18s;
  margin-bottom: 11px;
}
.search:focus-within {
  background: var(--surface); border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10,92,255,.12);
}
.search svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.search input {
  appearance: none; border: 0; outline: 0; background: transparent;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink);
  width: 100%; min-width: 0; font-weight: 500;
}
.search input::placeholder { color: var(--muted); font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  appearance: none; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 99px; padding: 5px 11px;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: -.01em; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .16s, color .16s, border-color .16s, box-shadow .16s;
  line-height: 1.4;
}
.chip i {
  width: 7px; height: 7px; border-radius: 99px;
  background: currentColor; flex: none;
}
.chip:hover { border-color: var(--muted-2); background: var(--surface-2); }
.chip.on { color: #fff; border-color: transparent; box-shadow: var(--sh-1); }
.chip.on i { background: rgba(255,255,255,.85); }
.chip.reset { border-style: dashed; color: var(--muted); }
.chip.reset:hover { color: var(--pink); border-color: var(--pink); background: #FEF3F2; }

/* ---- place list ---- */
.list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; }

.card {
  position: relative;
  display: grid; grid-template-columns: 104px minmax(0,1fr) auto;
  gap: 12px; align-items: center;
  padding: 9px; border-radius: var(--r);
  cursor: grab; background: transparent;
  transition: background .16s, box-shadow .16s;
  touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
}
.card:hover { background: var(--surface-2); }
.card.is-active { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--brand); }

.card .shot {
  width: 104px; height: 74px; border-radius: 10px;
  overflow: hidden; flex: none; position: relative;
  background: linear-gradient(135deg, #DCE3EC, #C2CCDA);
}
.card .shot::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(11,18,32,.5) 100%);
  opacity: 0; transition: opacity .3s;
}
.card .shot img.ready ~ .badge { opacity: 1; }
.card:hover .shot::after { opacity: 1; }
.card .shot img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .45s, transform .5s;
}
.card .shot img.ready { opacity: 1; }
/* aerial tiles read dark and flat at thumbnail size — lift them */
.card .shot img[data-kind="satellite"] {
  filter: brightness(1.14) saturate(1.22) contrast(1.06);
}
.hero-shot img[data-kind="satellite"] {
  filter: brightness(1.1) saturate(1.18) contrast(1.04);
}
.card:hover .shot img.ready { transform: scale(1.06); }
.card .shot .badge {
  position: absolute; left: 5px; bottom: 5px; z-index: 2;
  background: rgba(11,18,32,.74);
  backdrop-filter: blur(4px);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 5px;
  letter-spacing: .01em; opacity: 0; transition: opacity .3s;
}

/* honest label when the image is not a photograph of the place */
.card .shot .kind {
  position: absolute; right: 5px; top: 5px; z-index: 2;
  background: rgba(11,18,32,.62);
  backdrop-filter: blur(4px);
  color: #fff; font-size: 9px; font-weight: 650;
  padding: 2px 5px; border-radius: 4px;
  letter-spacing: .01em;
}
.card .shot .kind:empty { display: none; }
.hero-shot .kind {
  position: absolute; right: 12px; top: 12px; z-index: 5;
  background: rgba(11,18,32,.58);
  backdrop-filter: blur(6px);
  color: #fff; font-size: 10.5px; font-weight: 650;
  padding: 4px 9px; border-radius: 6px;
}
.hero-shot .kind:empty { display: none; }

/* 图片署名行。维基共享资源的图全是 CC BY / CC BY-SA，
   标注作者与许可证是许可条件，不是可选装饰，所以它必须始终可见 ——
   不做成 hover 才出现，也不靠透明度藏起来。
   放在右下角、压在渐变遮罩上，避开左下角的标题区。 */
.hero-shot .credit {
  position: absolute; right: 10px; bottom: 8px; z-index: 6;
  max-width: 62%;
  font-size: 9.5px; line-height: 1.35;
  color: rgba(255,255,255,.74);
  text-align: right;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  pointer-events: auto;
}
.hero-shot .credit a { color: rgba(255,255,255,.86); text-decoration: underline; }
.hero-shot .credit a:hover { color: #fff; }
.hero-shot .credit[hidden] { display: none; }
@media (max-width: 640px) {
  /* 手机上标题占更多宽度，署名收窄并让字号再小一档，但不隐藏 */
  .hero-shot .credit { max-width: 52%; font-size: 9px; bottom: 6px; right: 8px; }
}

.card .meta { min-width: 0; }
.card .nm {
  font-size: 14px; font-weight: 650; letter-spacing: -.022em;
  line-height: 1.3; margin: 0 0 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .ln {
  font-size: 11.5px; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 5px;
}
.card .ln s { width: 3px; height: 3px; border-radius: 99px; background: var(--muted-2); }
.tagrow { display: flex; flex-wrap: wrap; gap: 4px; }
.tg {
  font-size: 10px; font-weight: 650; letter-spacing: -.005em;
  padding: 2px 6px; border-radius: 5px; white-space: nowrap;
}

.card .add {
  /* -webkit-appearance 必须与 appearance 并存：iOS Safari 15.4 之前只认
     带前缀的那个，不写就保留原生按钮外观，会带上平台自己的内边距。 */
  -webkit-appearance: none; appearance: none;
  border: 1px solid var(--line-2); background: var(--surface);
  width: 30px; height: 30px; border-radius: 99px;
  cursor: pointer; color: var(--ink-2); flex: none;
  /* padding 必须显式归零。不写就吃浏览器默认值——实测 Chromium 给的是
     1px 6px，WebKit 给的又是另一套，图标于是在不同引擎里落在不同位置。 */
  padding: 0;
  /* line-height:0 消掉按钮里的基线盒。这是关键一步：一旦下面的 flex 布局
     在某个引擎里不生效（WebKit 长期对 <button> 上的 flex/grid 支持不全，
     会把内容塞进匿名盒），svg 就会退回行内流坐在文字基线上，视觉上被推向
     右下。归零基线后即使布局降级，图标也不会偏。 */
  line-height: 0;
  /* 用 flex 而不是 grid：WebKit 对 button 上的 flex 支持早于 grid。 */
  display: flex; align-items: center; justify-content: center;
  transition: background .16s, color .16s, border-color .16s, transform .16s;
}
/* display:block + margin:auto 是第三层兜底——布局属性全部失效时仍然居中。 */
.card .add svg { display: block; width: 14px; height: 14px; margin: auto; }
.card .add:hover {
  background: var(--brand); border-color: var(--brand); color: #fff;
  transform: scale(1.1);
}
.card.saved .add { background: var(--brand); border-color: var(--brand); color: #fff; }
.card.saved .nm { color: var(--ink-2); }

.blank { padding: 44px 24px; text-align: center; }
.blank svg { width: 34px; height: 34px; color: var(--muted-2); margin-bottom: 10px; }
.blank p { margin: 0; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.blank span { font-size: 12px; color: var(--muted); }

/* ================= MAP CHROME ================= */
.map-ctl {
  position: absolute; right: 14px; top: 14px; z-index: 90;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.ctl-group {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-3);
  display: flex; flex-direction: column;
}
.ctl-group.row { flex-direction: row; }
.ctl-group button {
  appearance: none; border: 0; background: transparent;
  width: 38px; height: 38px; cursor: pointer;
  display: grid; place-items: center; color: var(--ink-2);
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  transition: background .16s, color .16s;
}
.ctl-group.row button { width: auto; padding: 0 13px; }
.ctl-group button + button { border-top: 1px solid var(--line); }
.ctl-group.row button + button { border-top: 0; border-left: 1px solid var(--line); }
.ctl-group button:hover { background: var(--surface-2); color: var(--ink); }
.ctl-group button.on { background: var(--brand); color: #fff; }
.ctl-group button svg { width: 16px; height: 16px; }

.attrib {
  position: absolute; right: 0; bottom: 0; z-index: 60;
  font-size: 10px; color: var(--ink-2);
  background: rgba(255,255,255,.82);
  padding: 3px 8px; border-top-left-radius: 6px;
  font-weight: 500;
}

/* ================= SAVED: FAB + DRAWER ================= */
.fab {
  position: absolute; right: 16px; bottom: 20px; z-index: 110;
  appearance: none; border: 0; cursor: pointer;
  height: 50px; padding: 0 20px 0 17px; border-radius: 99px;
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 13.5px; font-weight: 650;
  letter-spacing: -.015em;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 10px 24px -6px rgba(11,18,32,.5), 0 2px 6px rgba(11,18,32,.2);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), background .2s, box-shadow .2s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -8px rgba(11,18,32,.55); }
.fab svg { width: 17px; height: 17px; }
.fab .n {
  background: var(--brand); border-radius: 99px;
  min-width: 22px; height: 22px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.fab.hot { background: var(--brand); animation: fabPulse .5s ease; }
@keyframes fabPulse { 0%,100% { transform: scale(1) } 45% { transform: scale(1.09) } }
.fab.drop-target {
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(10,92,255,.24), 0 16px 32px -8px rgba(10,92,255,.5);
  transform: scale(1.06);
}

.drawer {
  position: absolute; right: 14px; top: 14px; bottom: 14px; z-index: 120;
  width: 356px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-5);
  display: flex; flex-direction: column;
  transform: translateX(calc(100% + 24px));
  opacity: 0; pointer-events: none;
  transition: transform .34s cubic-bezier(.32,.72,0,1), opacity .2s;
}
.drawer.open { transform: none; opacity: 1; pointer-events: auto; }
.drawer-head {
  flex: none; padding: 15px 16px 13px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.drawer-head h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.03em; }
.drawer-head .cnt { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: auto; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px; }

.dropzone {
  margin: 6px; padding: 22px 16px;
  border: 1.5px dashed var(--line-2); border-radius: var(--r);
  text-align: center; transition: background .2s, border-color .2s;
}
.dropzone svg { width: 26px; height: 26px; color: var(--muted-2); margin-bottom: 6px; }
.dropzone p { margin: 0; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.dropzone.hot { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.hot svg { color: var(--brand); }
/* 移动端没有拖拽：dropzone 压成一行细提示（去掉大 + 图标），
   让已收藏的地点直接露出在首屏，而不是被推到折叠线以下 */
@media (max-width: 720px) {
  .dropzone {
    margin: 4px 6px; padding: 9px 12px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .dropzone svg { display: none; }
  .dropzone p { font-size: 12px; color: var(--muted); }
  .dropzone.hot p { color: var(--brand); }
}

.sv {
  display: grid; grid-template-columns: 26px minmax(0,1fr) auto;
  gap: 10px; align-items: center;
  padding: 9px 8px; border-radius: var(--r-sm);
  cursor: grab; touch-action: pan-y;
  -webkit-user-select: none; user-select: none;
  transition: background .16s, box-shadow .16s;
}
.sv:hover { background: var(--surface-2); }
.sv.drag-over { box-shadow: inset 0 2.5px 0 var(--brand); }
.sv .ord {
  width: 24px; height: 24px; border-radius: 99px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  flex: none;
}
.sv .nm { font-size: 13px; font-weight: 600; letter-spacing: -.018em; line-height: 1.3; }
.sv .mt { font-size: 11px; color: var(--muted); margin-top: 1px; font-weight: 500; }
.sv .rm {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); padding: 5px; border-radius: 6px; display: grid; place-items: center;
}
.sv .rm:hover { color: var(--pink); background: #FEF3F2; }
.sv .rm svg { width: 13px; height: 13px; }

.drawer-foot { flex: none; border-top: 1px solid var(--line); padding: 13px 16px; }
.fld { margin-bottom: 11px; }
.fld > label {
  display: block; font-size: 11px; font-weight: 650; color: var(--ink-2);
  margin-bottom: 6px; letter-spacing: -.005em;
}
.seg {
  display: flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px;
}
.seg button {
  appearance: none; border: 0; background: transparent; flex: 1;
  padding: 6px 4px; border-radius: 6px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--ink-2);
  cursor: pointer; transition: background .16s, color .16s, box-shadow .16s;
  white-space: nowrap; letter-spacing: -.01em;
}
.seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--sh-1); }

/* one line under a control saying what the current choice actually changes */
.fld-hint {
  margin: 6px 1px 0; font-size: 11px; line-height: 1.5; color: var(--muted);
}

.sw-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 0 12px; cursor: pointer;
}
.sw {
  width: 36px; height: 20px; border-radius: 99px; flex: none;
  background: var(--surface-3); position: relative;
  transition: background .2s; margin-top: 1px;
}
.sw::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; border-radius: 99px; background: #fff;
  box-shadow: var(--sh-1); transition: transform .2s cubic-bezier(.34,1.4,.64,1);
}
.sw-row.on .sw { background: var(--brand); }
.sw-row.on .sw::after { transform: translateX(16px); }
.sw-row .tx b { display: block; font-size: 12.5px; font-weight: 650; letter-spacing: -.015em; }
.sw-row .tx span { font-size: 11.5px; color: var(--muted); line-height: 1.45; }

/* ================= INTRO OVERLAY ================= */
.intro {
  position: absolute; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: radial-gradient(120% 90% at 20% 10%, rgba(10,92,255,.14), transparent 60%),
              radial-gradient(100% 80% at 90% 90%, rgba(6,182,212,.12), transparent 55%),
              rgba(246,247,249,.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: opacity .4s, visibility .4s;
}
.intro.gone { opacity: 0; visibility: hidden; }

/* 首屏防闪（2026-09-10）
   ------------------------------------------------------------------
   问题：intro 在 HTML 里默认可见，要等 body 底部 5 个脚本全部加载完、
   init() 跑到「if (seen) 加 .gone」才隐藏。回访用户于是看到弹窗完整显示
   一段时间，再走 .4s 淡出 —— 就是「一闪而过」。

   修复：<head> 里的内联脚本在 body 渲染前读 localStorage，若判定不该弹，
   就给 <html> 加 .intro-off，让 intro 从第一帧起就 display:none。

   必须用 display:none 而不是 opacity:0 —— 后者会触发上面那条
   transition，照样闪一下。此规则也不能写进 .intro.gone，因为正常关闭
   弹窗时我们要保留淡出动画。 */
html.intro-off .intro { display: none; }
.intro-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-5);
  border: 1px solid var(--line);
  max-width: 620px; width: 100%;
  /* Never taller than the overlay. The content scrolls inside instead of being
     clipped by .app{overflow:hidden}, which used to hide the CTA entirely on
     short viewports. */
  max-height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
  text-align: center;
  /* 关闭按钮的定位基准 */
  position: relative;
}

/* 首屏卡片的关闭按钮。
   反馈是「弹出来觉得有点吓人，又不想贸然点 explore」——
   缺的是一个明确的退出口，不是把弹窗去掉。
   定位在卡片内右上角：不占内容流，也不会被 .intro-scroll 的滚动带走。 */
.intro-x {
  position: absolute; top: 12px; right: 12px;
  z-index: 3;
  appearance: none; border: 0; cursor: pointer;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: transparent;
  color: var(--muted);
  transition: background .16s, color .16s;
}
.intro-x svg { width: 17px; height: 17px; }
.intro-x:hover { background: var(--surface-2); color: var(--ink); }
.intro-x:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
/* 标题区顶部留出空间，避免内容顶到右上角的 X 底下。
   ⚠️ 不要另写一条 .intro-scroll{padding-top} —— 会和下面那条
      四值 padding 冲突，谁生效取决于顺序。直接改下面那条的第一个值。 */
@media (max-width: 640px) {
  .intro-x { top: 8px; right: 8px; width: 32px; height: 32px; }
}
.intro-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* 顶部比左右多留一些，给右上角的关闭按钮腾出空间 */
  padding: clamp(34px, 5vw, 48px) clamp(20px, 4vw, 42px) 0;
}
/* Pinned action row — the button is reachable at any viewport height. */
.intro-foot {
  flex: none;
  padding: clamp(14px, 2.4vw, 22px) clamp(20px, 4vw, 42px) clamp(18px, 3vw, 30px);
  background: var(--surface);
}
.intro-card.scrolls .intro-foot { border-top: 1px solid var(--line); }
.intro .eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11.5px; font-weight: 700; letter-spacing: -.005em;
  padding: 5px 12px; border-radius: 99px; margin-bottom: 18px;
}
.intro .eyebrow svg { width: 13px; height: 13px; }
.intro h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 750; letter-spacing: -.042em; line-height: 1.05;
}
.intro h1 i {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand), #3B82F6 40%, var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.intro p {
  margin: 0 auto 24px; max-width: 460px;
  font-size: 14.5px; color: var(--ink-2); line-height: 1.65;
}
.intro-steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 26px; text-align: left;
}
.intro-steps .st {
  background: var(--surface-2); border-radius: var(--r);
  padding: 13px 13px 14px;
}
.intro-steps .st .ic {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--surface); box-shadow: var(--sh-1);
  display: grid; place-items: center; color: var(--brand);
  margin-bottom: 9px;
}
.intro-steps .st .ic svg { width: 15px; height: 15px; }
.intro-steps .st b {
  display: block; font-size: 12.5px; font-weight: 650;
  letter-spacing: -.018em; margin-bottom: 2px;
}
.intro-steps .st span { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.intro .btn-primary { font-size: 14px; padding: 12px 26px; }

/* Short viewports (a laptop with devtools open, or a phone inside the WeChat
   webview once its chrome is subtracted): tighten the type so the card usually
   still fits without scrolling. */
@media (max-height: 780px) {
  .intro-scroll { padding-top: clamp(18px, 3vw, 28px); }
  .intro .eyebrow { margin-bottom: 11px; }
  .intro h1 { font-size: clamp(24px, 4.4vw, 32px); margin-bottom: 10px; }
  .intro p { font-size: 13.5px; line-height: 1.55; margin-bottom: 16px; }
  .intro-steps { gap: 8px; margin-bottom: 2px; }
  .intro-steps .st { padding: 10px 12px 11px; }
}

/* ================= MODAL ================= */
.scrim {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(11,18,32,.5);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .26s;
}
.scrim.show { opacity: 1; pointer-events: auto; }

.modal {
  position: fixed; z-index: 601;
  left: 50%; top: 50%;
  transform: translate(-50%, -48%) scale(.98);
  width: min(760px, calc(100vw - 32px));
  max-height: min(90vh, 900px);
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-5);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity .26s, transform .3s cubic-bezier(.32,.72,0,1);
}
.modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-x {
  position: absolute; right: 14px; top: 14px; z-index: 6;
  appearance: none; border: 0; cursor: pointer;
  width: 34px; height: 34px; border-radius: 99px;
  background: rgba(11,18,32,.5); color: #fff;
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  transition: background .16s;
}
.modal-x:hover { background: rgba(11,18,32,.78); }
.modal-x svg { width: 14px; height: 14px; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; }

.hero-shot {
  position: relative; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #C8D2DE, #A9B6C6);
  overflow: hidden; flex: none;
}
.hero-shot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .5s;
}
.hero-shot img.ready { opacity: 1; }
.hero-shot .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,18,32,.35) 0%, transparent 32%, rgba(11,18,32,.12) 60%, rgba(11,18,32,.72) 100%);
}
.hero-shot .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px clamp(18px, 3vw, 28px);
  color: #fff;
}
.hero-shot h2 {
  margin: 0 0 4px; font-size: clamp(21px, 3.4vw, 31px);
  font-weight: 750; letter-spacing: -.035em; line-height: 1.1;
  text-shadow: 0 1px 12px rgba(0,0,0,.3);
}
.hero-shot .loc {
  font-size: 12.5px; font-weight: 550; opacity: .92;
  display: flex; align-items: center; gap: 6px;
}
.hero-shot .loc svg { width: 13px; height: 13px; }
.hero-shot .src {
  position: absolute; right: 10px; top: 10px;
  background: rgba(11,18,32,.55); backdrop-filter: blur(6px);
  color: #fff; font-size: 9.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 5px;
}

.detail { padding: clamp(18px, 3vw, 26px); }
.detail .tagrow { margin-bottom: 16px; gap: 5px; }
.detail .desc {
  font-size: 14.5px; line-height: 1.7; color: var(--ink-2);
  margin: 0 0 20px;
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px; margin-bottom: 18px;
}
/* 开放信息时效：收成一个小点，点开才出说明。
   已核实=实心蓝点（安静），过期=琥珀点，未核实=空心灰点。
   这样大部分条目不占视觉，但"这条核实过没有"始终可查。 */
.fresh-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; }
.fresh-dot {
  width: 15px; height: 15px; padding: 0; border: 0; background: none;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.fresh-dot::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; display: block;
  transition: transform .15s ease;
}
.fresh-dot:hover::before { transform: scale(1.25); }
.dot-ok::before    { background: #2f6fd0; }
/* 开放式公共空间：24 小时、无门票 —— 用绿色与"已核实"区分开 */
.dot-open::before  { background: #1f8a4c; }
.fact-open { outline: 1px solid rgba(31, 138, 76, .35); }
.fact-open .v { color: #1f8a4c; font-weight: 600; }
.dot-stale::before { background: #d99a1c; }
.dot-none::before  { background: transparent; border: 1.5px solid #9ca3af; }
.fresh-pop {
  margin-top: 6px; max-width: 22rem; padding: 6px 10px;
  background: var(--surface-2, #f3f4f6); border-radius: 8px;
  font-size: 0.75rem; line-height: 1.45; color: var(--text, #374151);
}
.fact {
  background: var(--surface-2); border-radius: var(--r);
  padding: 11px 13px;
}
.fact .k {
  font-size: 10.5px; font-weight: 650; color: var(--muted);
  margin-bottom: 3px; letter-spacing: -.005em;
}
.fact .v { font-size: 14.5px; font-weight: 700; letter-spacing: -.025em; }

.aerial {
  display: grid; grid-template-columns: 128px 1fr; gap: 14px;
  align-items: center;
  background: var(--surface-2); border-radius: var(--r);
  padding: 12px; margin-bottom: 18px;
}
.aerial .pic {
  aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  position: relative;
}
.aerial .pic img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .5s; }
.aerial .pic img.ready { opacity: 1; }
.aerial .pic .spin {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.aerial .pic .spin i {
  width: 18px; height: 18px; border-radius: 99px;
  border: 2px solid rgba(255,255,255,.25); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.aerial .txt b {
  display: block; font-size: 12.5px; font-weight: 650;
  letter-spacing: -.015em; margin-bottom: 3px;
}
.aerial .txt span { font-size: 12px; color: var(--muted); line-height: 1.5; }

.tipbox {
  background: var(--brand-soft); border-radius: var(--r);
  padding: 14px 16px; margin-bottom: 18px;
  display: flex; gap: 11px;
}
.tipbox .ic { color: var(--brand); flex: none; }
.tipbox .ic svg { width: 17px; height: 17px; }
.tipbox b {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--brand-d); margin-bottom: 3px;
}
.tipbox p { margin: 0; font-size: 13.5px; line-height: 1.62; color: var(--ink-2); }

.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.acts .btn { flex: 1; min-width: 140px; }

/* ================= 精选路线（编辑 City Walk，仅中文） ================= */
/* 入口是第 4 栏；英文下隐藏，所以列数用 auto-fit 自适应 3 或 4 栏 */
.intro-steps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.st-walk {
  appearance: none; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
  border: 1px solid transparent; transition: border-color .16s, transform .16s;
}
.st-walk:hover { border-color: var(--brand); transform: translateY(-1px); }
.st-walk .ic { color: var(--brand); }

.walk {
  position: fixed; z-index: 701;
  left: 50%; top: 50%; transform: translate(-50%, -48%);
  width: min(720px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--sh-5);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity .26s, transform .3s cubic-bezier(.32,.72,0,1);
}
.walk.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.walk-head {
  position: relative; flex: none;
  padding: 15px 56px 15px 20px; border-bottom: 1px solid var(--line, rgba(0,0,0,.08));
}
.walk-head b { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.walk-body { overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 22px; }

.walk-lede { margin: 0 0 14px; font-size: 13px; line-height: 1.65; color: var(--muted); }

.walk-card {
  appearance: none; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit; background: var(--surface-2);
  border: 1px solid transparent; border-radius: var(--r, 12px);
  padding: 12px 14px; margin-bottom: 9px;
  display: flex; gap: 12px; align-items: flex-start;
  transition: border-color .16s, transform .16s;
}
.walk-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.walk-card .bar { flex: none; width: 4px; align-self: stretch; border-radius: 99px; }
.wk-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wk-nm { font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.wk-tag { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.wk-meta { font-size: 11.5px; color: var(--muted); }

/* 模式切换条（推荐路线 / 自由行），仅中文显示 */
.walk-modes { display: flex; gap: 6px; margin-top: 10px; }
/* hidden 属性会被任何 display 声明覆盖 —— EN 界面必须隐藏路线切换条（以及 intro 第 4 栏
   「精选 City Walk 路线」），这里用 !important 保证 [hidden] 永远生效。
   2026-09-25 修 bug：此前漏了 !important，手机端 @media(max-width:720px) 里的
   `.intro-steps .st { display: grid }` 排在后面把 [hidden] 顶掉了，
   于是英文界面在手机上仍会显示这张中文卡片。 */
.walk-modes[hidden] { display: none !important; }
.st-walk[hidden] { display: none !important; }
.walk-modes button {
  flex: 1; appearance: none; cursor: pointer; font: inherit;
  border: 1px solid var(--line, rgba(0,0,0,.1)); background: var(--surface-2);
  border-radius: 99px; padding: 7px 0;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  transition: background .16s, color .16s, border-color .16s;
}
.walk-modes button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* curated 模式：隐藏探索工具与列表，显示路线视图 */
#panel.curated .tools, #panel.curated #placeList { display: none; }
#panel.curated #walkView { display: block; }
#panel:not(.curated) #walkView { display: none; }
.walk-view { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 22px; }

/* 地图上的交通方式标签（过渡节点带坐标时渲染） */
.wk-mode span {
  display: inline-block; transform: translateX(-50%); white-space: nowrap;
  font-size: 11px; font-weight: 600; color: #fff;
  background: rgba(11,18,32,.75); padding: 2px 9px; border-radius: 99px;
}

/* 精选路线模式下折线加强：实线，比规划器的点状线更醒目，但不抢过点位 */
#tilemap.walk-route .route-svg path {
  stroke-width: 3.5; stroke-dasharray: none; opacity: .9;
}

.walk-back {
  appearance: none; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12.5px; color: var(--brand); padding: 0 0 12px;
}
.walk-hero { border-left: 3px solid var(--brand); padding: 2px 0 2px 12px; margin-bottom: 16px; }
.walk-hero b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.025em; }
.walk-hero span { font-size: 11.5px; color: var(--muted); }
.walk-hero p { margin: 8px 0 0; font-size: 13px; line-height: 1.68; color: var(--ink-2); }

.walk-stops { list-style: none; margin: 0; padding: 0; }
.walk-stops li { margin-bottom: 2px; }
.ws {
  appearance: none; width: 100%; text-align: left; cursor: pointer;
  font: inherit; color: inherit; background: none; border: 0;
  padding: 9px 8px; border-radius: 10px;
  display: flex; gap: 11px; align-items: center; transition: background .14s;
}
.ws:hover { background: var(--surface-2); }
.ws-i {
  flex: none; width: 22px; height: 22px; border-radius: 99px;
  color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.ws-t b { font-size: 13.5px; font-weight: 600; }
.ws-t em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; }
.ws-note { display: flex; gap: 11px; align-items: center; padding: 7px 8px; }
.ws-note i { flex: none; width: 22px; height: 1px; background: var(--line, rgba(0,0,0,.15)); }
.ws-note span { font-size: 11.5px; color: var(--muted); }

.wk-detail { padding: 4px 6px 0; }
.wk-dot { display: block; width: 8px; height: 8px; border-radius: 99px; margin-bottom: 9px; }
.wk-detail b { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.wk-detail p { margin: 9px 0 0; font-size: 13.5px; line-height: 1.78; color: var(--ink-2); }
.wk-tip {
  margin-top: 14px; padding: 11px 13px; border-radius: 10px;
  background: var(--surface-2); font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
}
.wk-tip i { font-style: normal; font-weight: 700; color: var(--brand); margin-right: 6px; }

.wk-pin {
  width: 16px; height: 16px; border-radius: 99px;
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35);
  position: relative; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.wk-pin span {
  position: absolute; left: 20px; top: -2px; white-space: nowrap;
  font-size: 11px; font-weight: 600; color: #0b1220;
  background: rgba(255,255,255,.9); padding: 1px 6px; border-radius: 5px;
}
/* 打开站点详情时点亮地图上对应点位 */
.wk-pin.is-active {
  transform: scale(1.45);
  box-shadow: 0 0 0 4px rgba(255,255,255,.55), 0 2px 10px rgba(0,0,0,.45);
}
.wk-pin.is-active span {
  background: #0b1220; color: #fff;
}

/* ================= ITINERARY ================= */
.itin {
  position: fixed; z-index: 701;
  left: 50%; top: 50%; transform: translate(-50%, -48%);
  width: min(820px, calc(100vw - 32px));
  max-height: min(92vh, 960px);
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-5);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity .26s, transform .3s cubic-bezier(.32,.72,0,1);
}
.itin.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.itin-head {
  flex: none; padding: clamp(20px,3vw,28px) clamp(20px,3vw,28px) 18px;
  border-bottom: 1px solid var(--line); position: relative;
  background: linear-gradient(135deg, var(--brand-soft), rgba(6,182,212,.07));
}
.itin-head h2 { margin: 0 0 5px; font-size: clamp(22px,3.4vw,30px); font-weight: 750; letter-spacing: -.038em; }
.itin-head .sum { font-size: 13px; color: var(--ink-2); font-weight: 550; }
.itin-head .modal-x { background: rgba(11,18,32,.12); color: var(--ink); }
.itin-head .modal-x:hover { background: rgba(11,18,32,.24); }
.itin-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 clamp(20px,3vw,28px) 24px; }

.warn {
  display: flex; gap: 11px;
  background: #FFFAEB; border: 1px solid #FEDF89;
  border-radius: var(--r); padding: 13px 15px; margin: 18px 0 4px;
}
.warn .ic { color: #DC6803; flex: none; }
.warn .ic svg { width: 17px; height: 17px; }
.warn b { display: block; font-size: 12.5px; font-weight: 700; color: #93370D; margin-bottom: 5px; }
.warn ul { margin: 0; padding-left: 17px; font-size: 12.5px; line-height: 1.6; color: #7A2E0E; }
.warn li + li { margin-top: 4px; }
/* 天区块内的按天提示：比顶部的全局提示更紧凑，贴在天标题下 */
.warn.warn-day { margin: 10px 0 2px; }

.day { margin-top: 24px; }
.day-h {
  display: flex; align-items: center; gap: 11px;
  padding-bottom: 11px; border-bottom: 2px solid var(--ink);
}
.day-h .n {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-size: 13.5px; font-weight: 700; flex: none;
}
.day-h .t { font-size: 16px; font-weight: 700; letter-spacing: -.028em; }
.day-h .m { font-size: 11.5px; color: var(--muted); margin-left: auto; font-weight: 550; text-align: right; }

.leg { display: grid; grid-template-columns: 58px 1fr; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.leg .tm {
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: -.02em; padding-top: 1px;
}
.leg .tm span { display: block; font-size: 10.5px; color: var(--muted); font-weight: 550; letter-spacing: 0; }
.leg .nm { font-size: 14px; font-weight: 650; letter-spacing: -.02em; margin-bottom: 3px; }
.leg .nm em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12.5px; }
.leg .wy { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.leg .tagrow { margin-top: 6px; }

/* Per-stop transport instruction. Reads as a note to the driver rather than
   as travel copy, so it is set tighter and in a cooler colour. */
.acc {
  margin-top: 7px; padding: 8px 10px;
  border-radius: 7px; border-left: 2px solid;
  font-size: 11.5px; line-height: 1.62; color: var(--ink-2);
}
.acc b {
  font-weight: 700; letter-spacing: -.01em; margin-right: 5px;
}
.acc-car   { background: rgba(10,92,255,.055);  border-left-color: rgba(10,92,255,.42); }
.acc-car b { color: var(--brand); }
.acc-taxi  { background: rgba(154,123,63,.07); border-left-color: rgba(154,123,63,.45); }
.acc-taxi b{ color: #8A6A2F; }

/* peak-hour flag on a moving leg */
.leg.mv .pk { font-style: normal; color: #B4552E; font-weight: 650; }

.leg.mv { border-bottom-style: dashed; }
.leg.mv .tm { font-size: 12px; font-weight: 600; color: var(--muted); }
.leg.mv .bd {
  font-size: 12.5px; color: var(--muted); font-weight: 550;
  display: flex; align-items: center; gap: 7px;
}
.leg.mv .bd svg { width: 14px; height: 14px; }
/* 段内补充说明（无地铁提示 / 上下车点）：小字换行排在主行下 */
.leg.mv .bd { flex-wrap: wrap; }
.leg.mv .bd .mv-sub {
  flex-basis: 100%; margin-top: 3px;
  font-size: 11.5px; line-height: 1.55; color: var(--muted); font-weight: 480;
}
.leg.br .bd { font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.leg.br .bd i { font-style: normal; color: var(--muted); }

.itin-foot {
  flex: none; border-top: 1px solid var(--line);
  padding: 13px clamp(20px,3vw,28px); background: var(--surface-2);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.itin-foot .btn { flex: 1; min-width: 140px; }

/* ================= TOAST ================= */
.toast {
  position: fixed; z-index: 950;
  left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 550; letter-spacing: -.01em;
  padding: 11px 20px; border-radius: 99px;
  opacity: 0; pointer-events: none;
  transition: opacity .24s, transform .24s cubic-bezier(.32,.72,0,1);
  box-shadow: var(--sh-4);
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.drag-ghost {
  position: fixed; z-index: 900; pointer-events: none;
  background: var(--surface); border-radius: var(--r);
  box-shadow: var(--sh-4); border: 1px solid var(--line-2);
  padding: 9px 14px; font-size: 13px; font-weight: 650;
  letter-spacing: -.02em;
  transform: translate(-50%, -50%) rotate(-2deg) scale(1.02);
  white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}

/* ================= RESPONSIVE ================= */
.mbar { display: none; }

/* laptops: keep the panel from eating the map */
@media (max-width: 1180px) {
  .card { grid-template-columns: 92px minmax(0,1fr) auto; }
  .card .shot { width: 92px; height: 68px; }
}

@media (max-width: 1000px) {
  .panel { width: min(var(--panel-w), calc(100vw - 190px)); }
  .drawer { width: min(340px, calc(100vw - 150px)); }
  .card { grid-template-columns: 80px minmax(0,1fr) auto; gap: 10px; }
  .card .shot { width: 80px; height: 60px; }
  .card .nm { font-size: 13.5px; }
  .card .tagrow { display: none; }
}

/* tablets: panel becomes an overlay sheet on the left, map stays visible */
@media (max-width: 860px) {
  .panel {
    width: min(360px, calc(100vw - 96px));
    min-width: 0;
  }
  .panel-resize { display: none; }
  .drawer { width: min(330px, calc(100vw - 96px)); }
  .card { grid-template-columns: 92px minmax(0,1fr) auto; }
  .card .shot { width: 92px; height: 68px; }
  .card .tagrow { display: flex; }
}

@media (max-width: 720px) {
  .brand .sub { display: none; }
  .app { height: calc(100vh - var(--header-h) - 56px); height: calc(100dvh - var(--header-h) - 56px); }

  .panel, .drawer {
    left: 0; right: 0; bottom: 0; top: auto;
    width: auto; min-width: 0; max-width: none;
    height: 72vh; max-height: 72vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-bottom: 0;
  }
  .panel { transform: translateY(100%); opacity: 1; }
  .panel.open { transform: none; }
  .panel.collapsed { transform: translateY(100%); opacity: 1; }
  .panel-toggle { display: none !important; }
  .drawer { transform: translateY(100%); opacity: 1; }
  .drawer.open { transform: none; opacity: 1; }
  .grip { display: flex; }

  .card { grid-template-columns: 108px minmax(0,1fr) auto; }
  .card .shot { width: 108px; height: 78px; }

  .fab { bottom: 14px; right: 12px; height: 46px; }
  .map-ctl { top: auto; bottom: 74px; right: 12px; }

  .mbar {
    display: flex; position: relative; z-index: 500;
    height: 56px; background: var(--surface);
    border-top: 1px solid var(--line);
  }
  .mbar button {
    appearance: none; border: 0; background: transparent; flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-family: var(--sans); font-size: 10.5px; font-weight: 600;
    color: var(--muted); cursor: pointer; position: relative;
    letter-spacing: -.01em;
  }
  .mbar button svg { width: 19px; height: 19px; }
  .mbar button.on { color: var(--brand); }
  .mbar .bdg {
    position: absolute; top: 6px; left: 50%; margin-left: 6px;
    background: var(--brand); color: #fff;
    font-size: 9.5px; font-weight: 700; min-width: 16px; height: 16px;
    border-radius: 99px; display: grid; place-items: center; padding: 0 4px;
  }

  .modal, .itin {
    width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
    left: 0; top: 0; transform: none; border-radius: 0;
  }
  .modal.show, .itin.show { transform: none; }
  .acts .btn, .itin-foot .btn { min-width: 100%; }

  /* One step per line, but laid out icon-beside-text rather than icon-above-text:
     ~44px per step instead of ~85px, which is where most of the card's excess
     height came from on a phone. */
  .intro-steps { grid-template-columns: 1fr; gap: 8px; }
  .intro-steps .st {
    display: grid; grid-template-columns: 30px minmax(0, 1fr);
    column-gap: 11px; align-items: start;
    padding: 11px 12px;
  }
  .intro-steps .st .ic { grid-row: 1 / span 2; margin-bottom: 0; }
  /* Title on the icon's first line, description under it. `.ic` is itself a
     <span>, so it must be excluded or it fights for the same grid cell. */
  .intro-steps .st b { grid-column: 2; margin-bottom: 2px; }
  .intro-steps .st span:not(.ic) { grid-column: 2; }
  .intro .btn-primary { width: 100%; }
  .aerial { grid-template-columns: 96px 1fr; }
  .toast { bottom: 72px; }
  .hero-shot { aspect-ratio: 4 / 3; }
}

@media (max-width: 400px) {
  .card { grid-template-columns: 88px minmax(0,1fr) auto; gap: 10px; }
  .card .shot { width: 88px; height: 64px; }
  .leg { grid-template-columns: 50px 1fr; gap: 10px; }
}

.grip { display: none; flex: none; padding: 8px 0 2px; justify-content: center; cursor: grab; touch-action: none; }
.grip i { width: 36px; height: 4px; border-radius: 99px; background: var(--line-2); }

@media print {
  header.site, .app, .mbar, .scrim, .modal, .toast, .itin-foot, .itin .modal-x { display: none !important; }
  body { overflow: visible; background: #fff; }
  .itin {
    position: static; opacity: 1; pointer-events: auto; transform: none;
    box-shadow: none; width: auto; max-height: none; height: auto; border-radius: 0;
  }
  .itin-head { background: none; }
  .day { break-inside: avoid; }
}

/* =========================================================================
   iOS Safari 图标按钮居中兜底
   -------------------------------------------------------------------------
   起因：移动端列表卡片上的「+」在 iOS Safari 里偏向右下，PC 正常。
   Chromium（含移动视口模拟）复现不出来，DOM 几何是精确居中的，
   所以问题出在引擎差异，不在布局数值上。

   三个叠加的成因：
   1. 只写了 appearance:none，没写 -webkit-appearance:none。
      iOS Safari 15.4 之前只认带前缀的属性，不写则保留原生按钮外观，
      连带平台自己的非对称内边距。
   2. 没有显式 padding:0，于是吃 UA 默认值。实测 Chromium 给 1px 6px，
      WebKit 给的是另一套，图标因此在不同引擎落在不同位置。
   3. 在 <button> 上用 display:grid + place-items:center。WebKit 长期
      对表单控件的 flex/grid 支持不完整，会把内容包进匿名盒并忽略这些
      属性；一旦忽略，svg 退回行内流坐在文字基线上——视觉上正是"偏下"，
      再叠加第 2 条的非对称 padding 就成了"偏右下"。

   已用最小复现页验证：模拟 grid 失效时确实产生 3px 偏移；
   本方案在 grid 与 flex 同时失效的最坏情况下仍然居中。

   注意这里只补齐防御性属性，不改任何尺寸、颜色或圆角，
   所以对现有视觉没有影响。
   ========================================================================= */
.icon-btn,
.modal-x,
.ctl-group button,
.seg-toggle button,
.mbar .bdg,
.card .add {
  -webkit-appearance: none;
  appearance: none;
}

/* 图标类按钮：内容是单个 svg，没有文字，可以安全地把基线盒归零。
   排除 .ctl-group.row button —— 那两个是地图样式切换，由 JS 填入文字，
   line-height:0 会把文字压塌。带文字的 .seg / .seg-toggle 同样不在此列。 */
.icon-btn,
.modal-x,
.ctl-group:not(.row) button,
.card .add {
  padding: 0;
  line-height: 0;
}

/* 只有 svg 直接子元素时才生效，避免影响带文字的按钮 */
.icon-btn > svg,
.modal-x > svg,
.ctl-group:not(.row) button > svg,
.card .add > svg {
  display: block;
  margin: auto;
}

/* ===== 品牌块作为回工具箱的链接（2026-09-15）=====
   citywalk 此前没有任何回主站的入口，用户进来就是死路。
   把顶栏品牌块变成链接，指向 /toolkit/ 而不是首页 ——
   citywalk 是工具箱第 4 步，回到工具箱能看到另外三个工具。
   /citywalk/ 这个 URL 本身不变（已对外发出过）。 */
.brand-link {
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  padding: 4px 8px;
  margin: -4px -8px;
  transition: background .18s ease;
}
.brand-link:hover { background: rgba(15, 23, 42, .045); }
.brand-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.brand-back {
  width: 15px;
  height: 15px;
  margin-left: 2px;
  color: var(--muted, #64748B);
  opacity: 0;
  transform: translateX(3px);
  transition: opacity .18s ease, transform .18s ease;
  flex: none;
}
.brand-link:hover .brand-back,
.brand-link:focus-visible .brand-back { opacity: 1; transform: translateX(0); }
@media (max-width: 640px) { .brand-back { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .brand-link, .brand-back { transition: none; }
}
