/* ========== 对跖点 · 视觉系统 ==========
   基础：高级白 / 雾白 / 墨蓝；辅助：低饱和蓝绿；强调：明亮蓝
   灵感：Apple 的克制精致 + Material 的清晰层级 */

:root {
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --ink: #16233F;
  --ink-2: #3A4A66;
  --text-2: #5B6B85;
  --text-3: #8A94A6;
  --line: #E6EAF0;
  --blue: #2E6BE6;
  --blue-soft: #EAF1FD;
  --teal: #17A398;
  --teal-bright: #17C3B2;
  --amber: #E8913A;
  --red: #D9534F;
  --coral: #E4572E;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 3px rgba(22, 35, 63, 0.06), 0 4px 14px rgba(22, 35, 63, 0.06);
  --shadow-2: 0 4px 10px rgba(22, 35, 63, 0.08), 0 12px 32px rgba(22, 35, 63, 0.12);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "Noto Sans JP", "Noto Sans CJK JP", "Noto Sans KR", "Noto Sans CJK KR", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
}
/* 日语 / 韩语界面：优先本地字形，避免汉字沿用中文字形或出现方框 */
html[lang="ja"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, "Noto Sans JP", "Noto Sans CJK JP", "Helvetica Neue", Arial, sans-serif;
}
html[lang="ko"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", "Helvetica Neue", Arial, sans-serif;
}
html[lang="ja"] input, html[lang="ja"] textarea,
html[lang="ko"] input, html[lang="ko"] textarea { font-family: inherit; }
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
svg { width: 1.25em; height: 1.25em; fill: currentColor; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
svg[fill="none"], svg *[fill="none"] { fill: none; }
svg [stroke-width] { stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

#app { max-width: 520px; margin: 0 auto; height: 100dvh; position: relative; background: var(--bg); box-shadow: 0 0 40px rgba(22,35,63,.08); }

/* ========== 视图切换 ========== */
.view { position: absolute; inset: 0; display: none; flex-direction: column; }
.view.active { display: flex; animation: viewIn .32s cubic-bezier(.22,.8,.32,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ========== 首页头部 ========== */
.app-header {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 4px;
}
.title-block h1 {
  white-space: nowrap; font-size: 24px; font-weight: 700;
  letter-spacing: .5px; line-height: 1.12;
}
.brand-pinyin {
  margin: 0 1px; font-size: 12px; font-weight: 600;
  letter-spacing: -.1px; color: var(--text-3);
}
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 0;
}
.brand-mark {
  display: block; width: 36px; height: 36px; flex: none;
}
.subtitle { font-size: 10.5px; color: var(--text-3); letter-spacing: 1.5px; line-height: 1.2; margin-top: 2px; }
.header-actions { display: flex; gap: 4px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  color: var(--ink-2); transition: background .18s, transform .15s;
}
.icon-btn:hover { background: rgba(22,35,63,.06); }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 21px; height: 21px; }
@media (max-width: 380px) {
  .app-header { padding-left: 12px; padding-right: 12px; gap: 4px; }
  .brand { gap: 7px; padding: 0; }
  .brand-mark { width: 32px; height: 32px; }
  .title-block h1 { font-size: 21px; }
  .brand-pinyin { margin: 0; font-size: 11px; }
  .subtitle { font-size: 9.5px; letter-spacing: 1px; }
  .header-actions { gap: 0; }
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn svg { width: 19px; height: 19px; }
}

/* ========== 模式切换 ========== */
.mode-tabs {
  display: flex; gap: 4px; margin: 4px 16px 10px;
  background: #E9EDF3; border-radius: 14px; padding: 4px;
}
.tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 4px; border-radius: 11px; font-size: 13.5px; font-weight: 500;
  color: var(--text-2); transition: all .22s cubic-bezier(.22,.8,.32,1);
}
.tab svg { width: 16px; height: 16px; }
.tab.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(22,35,63,.12); }

/* ========== 坐标输入面板 ========== */
.input-panel {
  margin: 0 16px 10px; background: var(--card); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-1);
  animation: slideDown .25s cubic-bezier(.22,.8,.32,1);
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.input-row input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--ink); background: #FAFBFD; outline: none; transition: border-color .18s, box-shadow .18s;
}
.input-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,107,230,.12); background: #fff; }
.input-row input.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217,83,79,.1); }
.input-feedback { min-height: 20px; font-size: 12.5px; margin: 6px 2px 2px; color: var(--red); }
.input-feedback.ok { color: var(--teal); }
.input-actions { display: flex; gap: 8px; margin-top: 6px; }
.input-actions .primary-btn { flex: 1; }
.panel-hint { font-size: 11.5px; color: var(--text-3); margin-top: 10px; line-height: 1.5; }

/* ========== 通用按钮 ========== */
.primary-btn {
  background: var(--blue); color: #fff; font-weight: 600; font-size: 14.5px;
  padding: 11px 20px; border-radius: 13px; box-shadow: 0 4px 14px rgba(46,107,230,.32);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.primary-btn:hover { background: #275FD0; }
.primary-btn:active { transform: scale(.96); }
.primary-btn.big { flex: 1; padding: 14px; font-size: 16px; border-radius: 15px; }
.primary-btn:disabled { opacity: .5; box-shadow: none; }
.ghost-btn {
  padding: 10px 16px; border-radius: 12px; background: #EFF2F7; color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; transition: background .18s, transform .15s;
}
.ghost-btn:hover { background: #E4E9F1; }
.ghost-btn:active { transform: scale(.95); }
.ghost-btn.danger { color: var(--red); }
.link-btn { color: var(--blue); font-size: 13px; font-weight: 500; padding: 4px 8px; border-radius: 8px; }
.link-btn:hover { background: var(--blue-soft); }

/* ========== 定位状态条 ========== */
.locate-bar {
  margin: 0 16px 10px; padding: 9px 12px; border-radius: 12px;
  background: var(--blue-soft); color: var(--ink-2);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12.5px; line-height: 1.45; animation: slideDown .25s;
}
#locate-text {
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.locate-bar .link-btn { flex: 0 0 auto; white-space: nowrap; font-size: 12.5px; }
.locate-bar.error { background: #FDEEED; color: var(--red); }

/* ========== 地图区 ========== */
.map-wrap {
  position: relative; flex: 1; margin: 0 16px; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-2); min-height: 180px;
  border: 1px solid rgba(22,35,63,.06);
}
#map { position: absolute; inset: 0; background: #DCE6F2; }
.maplibregl-map { font-family: inherit; }
/* 版权信息置于左下，避免与主操作按钮重叠 */
.map-wrap .maplibregl-ctrl-bottom-right { left: 0; right: auto; }
.map-wrap .maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0 0 4px 6px; }
.map-wrap .maplibregl-ctrl-attrib { font-size: 10px; border-radius: 4px; background: rgba(255,255,255,.78); }

.crosshair {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; z-index: 500; pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(22,35,63,.3));
  transition: opacity .2s;
}
.map-hint {
  position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  background: rgba(22,35,63,.72); color: #fff; backdrop-filter: blur(8px);
  font-size: 11.5px; padding: 5px 12px; border-radius: 20px; z-index: 480;
  white-space: nowrap; max-width: calc(100% - 28px); overflow: hidden; text-overflow: ellipsis;
  transition: opacity .3s; pointer-events: none;
}
.map-hint.gone { opacity: 0; }
.map-status {
  position: absolute; bottom: 62px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  padding: 7px 14px; border-radius: 20px; z-index: 500; font-size: 12.5px;
  color: var(--ink-2); box-shadow: var(--shadow-1); display: flex; align-items: center; gap: 7px;
  white-space: nowrap; pointer-events: none;
}
.spinner {
  width: 13px; height: 13px; border: 2px solid rgba(46,107,230,.25); border-top-color: var(--blue);
  border-radius: 50%; animation: spin .8s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.view-fabs {
  position: absolute; left: 50%; transform: translateX(-50%); top: 10px; z-index: 500;
  display: flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(22,35,63,.14); border: 1px solid rgba(22,35,63,.05);
}
.view-fabs .fab-chip { padding: 6px 15px; border-radius: 999px; background: transparent; box-shadow: none; }
.fab-chip {
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  padding: 8px 13px; border-radius: 20px; font-size: 12.5px; font-weight: 500;
  color: var(--ink-2); box-shadow: var(--shadow-1); transition: all .18s;
  white-space: nowrap;
}
.fab-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.fab-chip:active { transform: scale(.94); }
.fab-chip.accent { background: var(--ink); color: #fff; }
.fab-chip.on { background: var(--ink); color: #fff; box-shadow: none; }

/* 主操作：地图右下角常驻悬浮按钮 */
.explore-fab {
  position: absolute; right: 12px; bottom: 12px; z-index: 620;
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px 12px 14px; border-radius: 999px;
  background: linear-gradient(135deg, #3570E8 0%, #1F4FBF 100%);
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .3px;
  box-shadow: 0 10px 24px rgba(31,79,191,.36), 0 2px 6px rgba(22,35,63,.18),
              inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .18s cubic-bezier(.22,.8,.32,1), box-shadow .18s;
  animation: fabIn .42s cubic-bezier(.22,.8,.32,1) both;
  max-width: calc(100% - 24px);
}
.explore-fab::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(53,112,232,.5); animation: fabHalo 3.2s ease-out infinite;
  pointer-events: none;
}
.explore-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(31,79,191,.42), 0 2px 6px rgba(22,35,63,.18); }
.explore-fab:active { transform: scale(.96); }
.ef-dot { width: 7px; height: 7px; border-radius: 50%; background: #5FF2DF; box-shadow: 0 0 0 3px rgba(95,242,223,.22); flex: none; }
.ef-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-arrow { width: 17px; height: 17px; stroke: currentColor; flex: none; opacity: .9; }
@keyframes fabIn { from { opacity: 0; transform: translateY(10px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fabHalo {
  0% { box-shadow: 0 0 0 0 rgba(53,112,232,.42); }
  55% { box-shadow: 0 0 0 12px rgba(53,112,232,0); }
  100% { box-shadow: 0 0 0 12px rgba(53,112,232,0); }
}
@media (prefers-reduced-motion: reduce) { .explore-fab, .explore-fab::after { animation: none; } }

/* 地图标记 */
.mk-wrap { background: none; border: none; transition: opacity .35s ease; }
.mk-wrap.mk-pending { opacity: 0; }
.mk { display: grid; place-items: center; width: 100%; height: 100%; }
.mk span { display: block; border-radius: 50%; }
.mk-origin span {
  width: 18px; height: 18px; background: var(--blue); border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(22,35,63,.35), 0 0 0 5px rgba(46,107,230,.18);
}
.mk-anti span {
  width: 20px; height: 20px; background: var(--teal-bright); border: 3.5px solid #fff;
  box-shadow: 0 2px 10px rgba(22,35,63,.4), 0 0 0 6px rgba(23,195,178,.2);
  animation: antiPulse 2.4s ease-out infinite;
}
@keyframes antiPulse {
  0% { box-shadow: 0 2px 10px rgba(22,35,63,.4), 0 0 0 4px rgba(23,195,178,.35); }
  70% { box-shadow: 0 2px 10px rgba(22,35,63,.4), 0 0 0 14px rgba(23,195,178,0); }
  100% { box-shadow: 0 2px 10px rgba(22,35,63,.4), 0 0 0 14px rgba(23,195,178,0); }
}

/* ========== 底部结果面板 ========== */
.sheet {
  margin: 10px 16px 0; background: var(--card); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -4px 24px rgba(22,35,63,.1); padding: 0 18px calc(14px + var(--safe-b));
  max-height: 46%; display: flex; flex-direction: column; transition: max-height .3s cubic-bezier(.22,.8,.32,1);
}
.sheet.expanded { max-height: 62%; }
.sheet.expanded .sheet-more { display: block !important; }
.sheet-handle { padding: 10px 0 8px; display: grid; place-items: center; cursor: pointer; flex: none; }
.sheet-handle span { width: 38px; height: 4.5px; border-radius: 3px; background: #D5DBE5; }

#sheet-empty { padding: 8px 4px 16px; text-align: center; }
.empty-title { font-size: 16px; font-weight: 600; }
.empty-desc { font-size: 13px; color: var(--text-2); margin-top: 6px; }

#sheet-result { overflow-y: auto; min-height: 0; }
.pair { padding: 2px 0 10px; }
.pair-row { display: flex; align-items: center; gap: 11px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-left: 3px; }
.dot-origin { background: var(--blue); box-shadow: 0 0 0 3.5px rgba(46,107,230,.16); }
.dot-anti { background: var(--teal-bright); box-shadow: 0 0 0 3.5px rgba(23,195,178,.16); }
.pair-line { width: 2px; height: 13px; background: var(--line); margin-left: 8px; border-radius: 1px; }
.pair-text { display: flex; flex-direction: column; min-width: 0; }
.pair-label { font-size: 11px; color: var(--text-3); }
.pair-name { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair-name.loading { color: var(--text-3); font-weight: 400; }

.sheet-coords { margin: 2px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.coord-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  background: #F2F5F9; border-radius: 10px; padding: 7px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink-2);
  transition: background .18s;
}
.coord-chip:hover { background: #E9EEF5; }
.coord-chip svg { width: 14px; height: 14px; color: var(--text-3); flex: none; }

/* 目标地点「此刻」：昼夜沉浸条 */
.now-strip {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  border-radius: 14px; padding: 11px 14px; margin-bottom: 10px;
  background: linear-gradient(135deg, #101B33 0%, #1B2E50 58%, #0C1526 100%);
  color: #E9F0FB;
  transition: background .6s ease, color .6s ease, box-shadow .6s ease;
  box-shadow: 0 6px 18px rgba(13, 24, 45, .16);
}
.now-strip[data-phase="day"] {
  background: linear-gradient(135deg, #EAF6FF 0%, #D2E9FF 55%, #E8F8F2 100%);
  color: var(--ink); box-shadow: 0 6px 18px rgba(88, 132, 180, .14);
}
.now-strip[data-phase="golden"] {
  background: linear-gradient(135deg, #FFF4E4 0%, #FFDFC4 55%, #FBE4D8 100%);
  color: #43291B; box-shadow: 0 6px 18px rgba(180, 120, 70, .14);
}
.now-strip[data-phase="dusk"] {
  background: linear-gradient(135deg, #2A2444 0%, #4B3A66 55%, #2B2340 100%);
  color: #F3EDFF; box-shadow: 0 6px 18px rgba(28, 22, 48, .22);
}
.now-strip::before {
  content: ''; position: absolute; right: -46px; top: -78px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(186, 208, 255, .34), transparent 68%);
  transition: background .6s ease;
}
.now-strip[data-phase="day"]::before { background: radial-gradient(circle, rgba(255, 200, 96, .62), transparent 68%); }
.now-strip[data-phase="golden"]::before { background: radial-gradient(circle, rgba(255, 176, 110, .60), transparent 68%); }
.now-strip[data-phase="dusk"]::before { background: radial-gradient(circle, rgba(255, 156, 128, .38), transparent 68%); }
.now-stars {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  background-image:
    radial-gradient(1.2px 1.2px at 14% 32%, #fff, transparent),
    radial-gradient(1px 1px at 28% 68%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 42% 24%, #fff, transparent),
    radial-gradient(1px 1px at 57% 56%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 71% 30%, #fff, transparent),
    radial-gradient(1px 1px at 83% 62%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 92% 26%, #fff, transparent);
}
.now-strip[data-phase="night"] .now-stars { opacity: .55; }
.now-strip[data-phase="dusk"] .now-stars { opacity: .3; }
.now-half { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.now-right { justify-content: flex-end; text-align: right; }
.now-divider { position: relative; z-index: 1; width: 1px; height: 30px; background: currentColor; opacity: .16; flex: none; }
.now-glyph, .now-weather-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; }
.now-glyph svg, .now-weather-icon svg { width: 26px; height: 26px; }
.now-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.now-text b { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.now-text span { font-size: 11px; opacity: .66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-right .now-text { align-items: flex-end; }

/* 详情页当地时间：昼夜场景卡 */
.time-badge {
  position: relative; overflow: hidden; margin-top: 12px; border-radius: 16px;
  padding: 13px 15px 12px;
  background: linear-gradient(150deg, #111D36 0%, #1B3054 55%, #0B1424 100%);
  color: #EDF3FF;
  box-shadow: 0 8px 24px rgba(13, 24, 45, .18);
  transition: background .6s ease, color .6s ease, box-shadow .6s ease;
}
.time-badge[data-phase="day"] {
  background: linear-gradient(150deg, #EFF8FF 0%, #D8ECFF 48%, #EAF7F2 100%);
  color: #14233A; box-shadow: 0 8px 24px rgba(88, 132, 180, .16);
}
.time-badge[data-phase="golden"] {
  background: linear-gradient(150deg, #FFF4E5 0%, #FFD9B8 50%, #F7D8CD 100%);
  color: #42291A; box-shadow: 0 8px 24px rgba(180, 120, 70, .16);
}
.time-badge[data-phase="dusk"] {
  background: linear-gradient(150deg, #241F3E 0%, #4A3966 50%, #6B3F52 100%);
  color: #F6EEFF; box-shadow: 0 8px 24px rgba(28, 22, 48, .22);
}
.tb-sky {
  position: absolute; right: -62px; top: -112px; width: 224px; height: 224px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 176, .50), transparent 68%);
  transition: background .6s ease;
}
.time-badge[data-phase="night"] .tb-sky { background: radial-gradient(circle, rgba(196, 216, 255, .32), transparent 68%); }
.time-badge[data-phase="day"] .tb-sky { background: radial-gradient(circle, rgba(255, 206, 110, .70), transparent 68%); }
.time-badge[data-phase="golden"] .tb-sky { background: radial-gradient(circle, rgba(255, 168, 96, .62), transparent 68%); }
.time-badge[data-phase="dusk"] .tb-sky { background: radial-gradient(circle, rgba(255, 152, 126, .40), transparent 68%); }
.tb-stars {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none;
  background-image:
    radial-gradient(1.3px 1.3px at 10% 24%, #fff, transparent),
    radial-gradient(1px 1px at 22% 62%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 33% 18%, #fff, transparent),
    radial-gradient(1px 1px at 45% 48%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 58% 74%, #fff, transparent),
    radial-gradient(1px 1px at 66% 14%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 76% 56%, #fff, transparent),
    radial-gradient(1px 1px at 86% 30%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 94% 68%, #fff, transparent);
}
.time-badge[data-phase="night"] .tb-stars { opacity: .72; }
.time-badge[data-phase="dusk"] .tb-stars { opacity: .32; }
.tb-top {
  position: relative; z-index: 1; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 8px;
}
.tb-clock-wrap { min-width: 0; }
.tb-clock { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tb-glyph { display: inline-flex; flex: none; width: 27px; height: 27px; }
.tb-glyph svg { width: 27px; height: 27px; }
.tb-clock b { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.tb-date {
  display: block; margin: 4px 0 0 36px;
  font-size: 10.5px; opacity: .68; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-diff {
  flex: none; margin-top: 5px; padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500; letter-spacing: .1px;
  background: rgba(255, 255, 255, .30);
  border: 1px solid rgba(255, 255, 255, .50);
  white-space: nowrap;
}
.time-badge[data-phase="day"] .tb-diff,
.time-badge[data-phase="golden"] .tb-diff {
  background: rgba(20, 35, 58, .055);
  border-color: rgba(20, 35, 58, .07);
}
.tb-diff:empty { display: none; }
.tb-date .tb-phase-sep { opacity: .55; margin: 0 4px; }
.tb-date .tb-phase-text { font-weight: 600; }
.tb-weather {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 9px;
  margin-top: 11px; padding: 10px 0 0; min-width: 0;
  border-top: 1px solid rgba(20, 35, 58, .07);
}
.time-badge[data-phase="night"] .tb-weather,
.time-badge[data-phase="dusk"] .tb-weather {
  border-top-color: rgba(255, 255, 255, .14);
}
.tb-wicon { display: inline-flex; width: 27px; height: 27px; flex: none; }
.tb-wicon svg { width: 27px; height: 27px; }
.tb-wtemp-wrap {
  flex: none; display: flex; flex-direction: column;
  align-items: flex-start; gap: 3px;
}
.tb-wtemp {
  flex: none; font-size: 26px; line-height: 1; font-weight: 700;
  letter-spacing: -.5px; font-variant-numeric: tabular-nums;
}
.tb-wtemp:empty { display: none; }
.tb-winfo { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.tb-winfo b {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tb-winfo span { margin-top: 2px; font-size: 10.5px; opacity: .72; white-space: nowrap; }
.tb-winfo span:empty { display: none; }
.tb-wside { flex: none; margin-left: auto; display: flex; align-items: center; }
.tb-whumid {
  font-size: 10.5px; opacity: .72;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.tb-whumid:empty { display: none; }
.tb-wdiff {
  padding: 2.5px 7px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: .1px;
  background: rgba(255, 255, 255, .30); white-space: nowrap;
}
.tb-wdiff.warm { color: #A9641B; background: rgba(232, 145, 58, .16); }
.tb-wdiff.cool { color: #2E5FB8; background: rgba(46, 107, 230, .12); }
.tb-wdiff.same { color: var(--text-2); background: rgba(20, 35, 58, .06); }
.time-badge[data-phase="night"] .tb-wdiff.warm,
.time-badge[data-phase="dusk"] .tb-wdiff.warm { color: #FFC98A; background: rgba(232, 145, 58, .18); }
.time-badge[data-phase="night"] .tb-wdiff.cool,
.time-badge[data-phase="dusk"] .tb-wdiff.cool { color: #A8C8FF; background: rgba(46, 107, 230, .20); }
.time-badge[data-phase="night"] .tb-wdiff.same,
.time-badge[data-phase="dusk"] .tb-wdiff.same { color: inherit; background: rgba(255, 255, 255, .12); }
.tb-wdiff:empty { display: none; }
.tb-bottom {
  position: relative; z-index: 1; margin-top: 9px;
}
.tb-row { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.tb-row:empty { display: none; }
.tb-item {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  padding: 2px 7px; border-radius: 7px;
  font-size: 10.5px; line-height: 1.35; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .10); opacity: .92;
}
.tb-item svg { width: 11px; height: 11px; flex: none; opacity: .85; }
.tb-item:empty { display: none; }
.time-badge[data-phase="day"] .tb-item,
.time-badge[data-phase="golden"] .tb-item { background: rgba(20, 35, 58, .05); }
@media (max-width: 380px) {
  .tb-clock b { font-size: 31px; }
  .tb-glyph, .tb-glyph svg { width: 24px; height: 24px; }
  .tb-wicon, .tb-wicon svg { width: 24px; height: 24px; }
  .tb-date { margin-left: 33px; }
  .tb-diff { font-size: 10px; padding: 3.5px 7px; }
}
@media (max-width: 340px) {
  .tb-clock b { font-size: 29px; }
  .tb-diff { font-size: 9.5px; padding: 3px 6px; }
  .route-mode { padding: 12px; }
  .route-mode .rm-t { font-size: 11px; }
}

.sheet-distance {
  background: linear-gradient(135deg, #F0F6FF 0%, #EDFBF9 100%);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
}
.dist-main { display: flex; justify-content: space-between; align-items: baseline; }
.dist-label { font-size: 12.5px; color: var(--text-2); }
.dist-value { font-size: 22px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.dist-note { font-size: 11px; color: var(--text-3); }

.explore-line { font-size: 13px; color: var(--text-2); margin: 0 2px 12px; min-height: 1.4em; }

.sheet-cta { display: flex; gap: 10px; align-items: center; }
.sheet-more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; animation: slideDown .25s; }
.more-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 2px; color: var(--text-2); }
.more-row b { color: var(--ink); font-variant-numeric: tabular-nums; }
.data-source { font-size: 10.5px; color: var(--text-3); margin-top: 10px; }

/* ========== 详情页 ========== */
.detail-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 10px;
}
.detail-header h2 { font-size: 17px; font-weight: 600; }
#btn-back {
  width: auto; height: 36px; padding: 0 13px 0 9px; gap: 3px;
  display: inline-flex; align-items: center; background: rgba(22,35,63,.055);
  color: var(--ink); font-size: 13px; font-weight: 600; border-radius: 11px;
}
#btn-back:hover { background: rgba(22,35,63,.1); }
#btn-back svg { width: 19px; height: 19px; }
.detail-scroll { flex: 1; overflow-y: auto; padding: 2px 16px calc(24px + var(--safe-b)); scroll-behavior: smooth; }

/* 首次进入新地点：资料仍在加载时的提示 */
.detail-wait-tip {
  position: sticky; top: 6px; z-index: 20;
  display: flex; align-items: flex-start; gap: 10px;
  margin: 10px 0 12px; padding: 11px 13px; border-radius: 14px;
  background: #FBF7EF; border: 1px solid rgba(166,101,24,.16);
  box-shadow: 0 6px 18px rgba(90,64,20,.08);
  animation: fadeIn .26s;
}
.dwt-spinner {
  width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 50%;
  border: 2px solid rgba(166,101,24,.22); border-top-color: #B3762A;
  animation: dwtSpin .9s linear infinite;
}
@keyframes dwtSpin { to { transform: rotate(360deg); } }
.dwt-main { min-width: 0; }
.dwt-main b { display: block; font-size: 12.5px; color: #7A5A26; font-weight: 650; line-height: 1.5; }
.dwt-main span { display: block; margin-top: 3px; font-size: 11.5px; color: #8A6A32; line-height: 1.55; }
@media (prefers-reduced-motion: reduce) { .dwt-spinner { animation: none; } }

.card {
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  padding: 18px; margin-bottom: 14px; animation: slideDown .3s cubic-bezier(.22,.8,.32,1);
}
.card h4 { font-size: 15px; font-weight: 650; margin-bottom: 12px; }

.class-chip-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.class-chip {
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 14px;
  background: var(--blue-soft); color: var(--blue);
}
.class-chip.ocean { background: #E3F6F4; color: var(--teal); }
.class-chip.unknown { background: #F0F1F4; color: var(--text-3); }
.class-chip.wilderness { background: #FBF1E4; color: var(--amber); }
.confidence { font-size: 11px; color: var(--text-3); }
.confidence-wrap { display: inline-flex; align-items: center; gap: 1px; min-width: 0; }
.info-tip {
  position: relative; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-3); opacity: .85;
  transition: color .15s, background .15s, opacity .15s;
}
.info-tip::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
.info-tip svg { width: 15px; height: 15px; }
.info-tip:hover { color: var(--blue); background: var(--blue-soft); opacity: 1; }
.confidence-body { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.cf-intro { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }
.cf-level {
  display: flex; gap: 11px; padding: 11px 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: 13px;
  transition: border-color .15s, box-shadow .15s;
}
.cf-level > div { min-width: 0; }
.cf-level > b {
  flex: none; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.cf-level strong { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 3px; }
.cf-level p { font-size: 11.5px; color: var(--text-2); line-height: 1.65; }
.cf-level.high > b { background: #E6F6EC; color: #1F8A4C; }
.cf-level.mid > b { background: #FBF2E4; color: #A66518; }
.cf-level.low > b { background: #F0F1F4; color: var(--text-2); }
.cf-now {
  display: none; margin-left: 5px; padding: 1px 5px; border-radius: 5px;
  font-size: 9.5px; font-style: normal; font-weight: 600;
  color: var(--blue); background: var(--blue-soft);
}
.cf-level.is-current { border-color: rgba(46,107,230,.45); box-shadow: 0 0 0 2px rgba(46,107,230,.1); }
.cf-level.is-current .cf-now { display: inline-block; }
.cf-note {
  font-size: 11px; color: var(--text-3); line-height: 1.65;
  background: #F7F9FC; border-radius: 11px; padding: 10px 12px;
}
.d-title { font-size: 20px; font-weight: 700; line-height: 1.35; }
.d-hierarchy { font-size: 13px; color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.coord-line {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-family: ui-monospace, monospace; font-size: 13.5px; color: var(--ink-2);
  background: #F2F5F9; padding: 8px 13px; border-radius: 10px;
}
.coord-line svg { width: 15px; height: 15px; color: var(--text-3); }

/* ===== 详情页首屏：天气卡 + 通栏影像带 ===== */
#view-detail #sec-overview {
  position: relative; z-index: 2;
  background: transparent; box-shadow: none;
  padding: 2px 16px 0; margin-bottom: 0;
}
#d-hero {
  position: relative; height: 300px;
  margin: 14px -16px 14px;
}
#d-hero .mini-map-wrap {
  position: absolute; inset: 0; margin: 0;
  border: 0; border-radius: 0; background: transparent; overflow: hidden;
}
/* 影像：顶部 26px 溶入页面，底部 92px 深度消散，两侧 20px 轻羽化 */
#map-detail {
  position: absolute; inset: 0;
  /* 羽化曲线统一用 smoothstep 密集采样，避免出现肉眼可见的"渐变带"边界 */
  -webkit-mask-image:
    linear-gradient(to bottom,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,.043) 4px,
      rgba(0,0,0,.156) 8px,
      rgba(0,0,0,.316) 12px,
      rgba(0,0,0,.500) 16px,
      rgba(0,0,0,.684) 20px,
      rgba(0,0,0,.844) 24px,
      rgba(0,0,0,.957) 28px,
      #000 32px,
      #000 calc(100% - 100px),
      rgba(0,0,0,.972) calc(100% - 90px),
      rgba(0,0,0,.896) calc(100% - 80px),
      rgba(0,0,0,.784) calc(100% - 70px),
      rgba(0,0,0,.648) calc(100% - 60px),
      rgba(0,0,0,.500) calc(100% - 50px),
      rgba(0,0,0,.352) calc(100% - 40px),
      rgba(0,0,0,.216) calc(100% - 30px),
      rgba(0,0,0,.104) calc(100% - 20px),
      rgba(0,0,0,.028) calc(100% - 10px),
      rgba(0,0,0,0) 100%),
    linear-gradient(to right,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,.028) 4px,
      rgba(0,0,0,.104) 8px,
      rgba(0,0,0,.216) 12px,
      rgba(0,0,0,.352) 16px,
      rgba(0,0,0,.500) 20px,
      rgba(0,0,0,.648) 24px,
      rgba(0,0,0,.784) 28px,
      rgba(0,0,0,.896) 32px,
      rgba(0,0,0,.972) 36px,
      #000 40px,
      #000 calc(100% - 40px),
      rgba(0,0,0,.972) calc(100% - 36px),
      rgba(0,0,0,.896) calc(100% - 32px),
      rgba(0,0,0,.784) calc(100% - 28px),
      rgba(0,0,0,.648) calc(100% - 24px),
      rgba(0,0,0,.500) calc(100% - 20px),
      rgba(0,0,0,.352) calc(100% - 16px),
      rgba(0,0,0,.216) calc(100% - 12px),
      rgba(0,0,0,.104) calc(100% - 8px),
      rgba(0,0,0,.028) calc(100% - 4px),
      rgba(0,0,0,0) 100%);
  mask-image:
    linear-gradient(to bottom,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,.043) 4px,
      rgba(0,0,0,.156) 8px,
      rgba(0,0,0,.316) 12px,
      rgba(0,0,0,.500) 16px,
      rgba(0,0,0,.684) 20px,
      rgba(0,0,0,.844) 24px,
      rgba(0,0,0,.957) 28px,
      #000 32px,
      #000 calc(100% - 100px),
      rgba(0,0,0,.972) calc(100% - 90px),
      rgba(0,0,0,.896) calc(100% - 80px),
      rgba(0,0,0,.784) calc(100% - 70px),
      rgba(0,0,0,.648) calc(100% - 60px),
      rgba(0,0,0,.500) calc(100% - 50px),
      rgba(0,0,0,.352) calc(100% - 40px),
      rgba(0,0,0,.216) calc(100% - 30px),
      rgba(0,0,0,.104) calc(100% - 20px),
      rgba(0,0,0,.028) calc(100% - 10px),
      rgba(0,0,0,0) 100%),
    linear-gradient(to right,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,.028) 4px,
      rgba(0,0,0,.104) 8px,
      rgba(0,0,0,.216) 12px,
      rgba(0,0,0,.352) 16px,
      rgba(0,0,0,.500) 20px,
      rgba(0,0,0,.648) 24px,
      rgba(0,0,0,.784) 28px,
      rgba(0,0,0,.896) 32px,
      rgba(0,0,0,.972) 36px,
      #000 40px,
      #000 calc(100% - 40px),
      rgba(0,0,0,.972) calc(100% - 36px),
      rgba(0,0,0,.896) calc(100% - 32px),
      rgba(0,0,0,.784) calc(100% - 28px),
      rgba(0,0,0,.648) calc(100% - 24px),
      rgba(0,0,0,.500) calc(100% - 20px),
      rgba(0,0,0,.352) calc(100% - 16px),
      rgba(0,0,0,.216) calc(100% - 12px),
      rgba(0,0,0,.104) calc(100% - 8px),
      rgba(0,0,0,.028) calc(100% - 4px),
      rgba(0,0,0,0) 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
.map-attrib {
  position: absolute; left: 16px; bottom: 36px; z-index: 500; pointer-events: none;
  padding: 2px 6px; border-radius: 4px; font-size: 10px; line-height: 1.4;
  color: #5A6478; background: rgba(255,255,255,.72);
}
/* 首屏加载态：瓦片就绪前覆盖，避免看到半加载的地图与未归位的标记 */
.map-veil {
  position: absolute; inset: 0; z-index: 400; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 11.5px; letter-spacing: .02em; color: #6B748A;
  background: rgba(247, 249, 252, .82);
  transition: opacity .5s ease;
}
.map-veil.gone { opacity: 0; }
.map-veil-spin {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1.5px solid rgba(107, 116, 138, .22);
  border-top-color: #6B748A;
  animation: veilSpin .8s linear infinite;
}
@keyframes veilSpin { to { transform: rotate(360deg); } }
.mini-map-fabs {
  position: absolute; right: 14px; top: 14px; z-index: 500;
  display: flex; gap: 5px;
}
.mini-map-fabs .fab-chip { padding: 5px 11px; font-size: 11.5px; border-radius: 999px; }
.mini-map-fabs .fab-chip.on { background: var(--ink); color: #fff; box-shadow: 0 3px 10px rgba(22,35,63,.26); }
.mini-map-fabs .fab-chip.on:hover { transform: none; box-shadow: 0 3px 10px rgba(22,35,63,.26); }
.mini-map-locate {
  position: absolute; right: 14px; bottom: 36px; z-index: 500;
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  color: var(--ink-2); background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px); border: 1px solid rgba(22, 35, 63, .06);
  box-shadow: 0 2px 8px rgba(22, 35, 63, .18);
  transition: transform .15s, box-shadow .18s;
}
.mini-map-locate:hover { box-shadow: 0 3px 12px rgba(22, 35, 63, .24); }
.mini-map-locate:active { transform: scale(.92); }
.mini-map-locate svg { width: 19px; height: 19px; }
.mini-map-sat {
  position: absolute; right: 56px; bottom: 36px; z-index: 500;
  height: 36px; padding: 0 12px 0 9px; border-radius: 11px;
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink); background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px); border: 1px solid rgba(22, 35, 63, .06);
  box-shadow: 0 2px 8px rgba(22, 35, 63, .18);
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  transition: transform .15s, box-shadow .18s;
}
.mini-map-sat:hover { box-shadow: 0 3px 12px rgba(22, 35, 63, .24); }
.mini-map-sat:active { transform: scale(.94); }
.mini-map-sat svg { width: 15px; height: 15px; flex: none; }
.mini-map-sat .sat-ico-img { color: var(--ink-2); }
.mini-map-sat.on .sat-ico-img { color: #1B5FD9; }
.mini-map-sat .sat-ico-map, .mini-map-sat .sat-lbl-map { display: none; }
.mini-map-sat:not(.on) .sat-ico-img, .mini-map-sat:not(.on) .sat-lbl-sat { display: none; }
.mini-map-sat:not(.on) .sat-ico-map { display: block; }
.mini-map-sat:not(.on) .sat-lbl-map { display: inline; }

/* 距离对比 */
.dist-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dist-head h4 { margin: 0; }
.dist-compare { display: flex; gap: 10px; }
.dist-item {
  flex: 1; background: #F7F9FC; border-radius: 14px; padding: 13px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.dist-k { font-size: 12px; color: var(--text-2); }
.dist-v { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dist-v.teal { color: var(--teal); }
.dist-v.amber { color: var(--amber); }
.dist-tip-body { overflow-y: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.dist-tip-item {
  padding: 11px 12px 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: 13px; background: #F9FBFD;
}
.dist-tip-item.teal { border-left-color: var(--teal); }
.dist-tip-item.amber { border-left-color: var(--amber); }
.dist-tip-item b { display: block; font-size: 13px; color: var(--ink); }
.dist-tip-item p { margin-top: 4px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.dist-tip-note { font-size: 11.5px; color: var(--text-3); line-height: 1.65; }
#btn-unit-toggle { margin-top: 8px; }

/* 导航 */
.route-modes { display: flex; gap: 10px; margin-bottom: 10px; }
.route-mode { flex: 1; background: #F0F6FF; border-radius: 14px; padding: 13px 14px; }
.route-mode .rm-k { font-size: 12px; color: var(--text-2); }
.route-mode .rm-v { font-size: 18px; font-weight: 700; color: var(--ink); display: block; margin-top: 2px; }
.route-mode .rm-t { display: block; font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rm-extra { display: block; margin-top: 4px; font-size: 10px; color: var(--blue); line-height: 1.45; }
.rm-extra.warn { color: var(--amber); }
.route-mode.is-detail { cursor: pointer; transition: transform .15s, box-shadow .15s; }
.route-mode.is-detail:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.route-mode.is-detail:active { transform: scale(.985); }
.route-mode.is-detail:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.rm-cue { display: block; margin-top: 4px; font-size: 10px; color: var(--blue); font-weight: 600; }
.route-unavailable {
  background: #FBF7EF; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #7A5A26; line-height: 1.6;
}
.muted { color: var(--text-3); font-size: 13px; }

/* 签证要求 */
.visa-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.visa-head h4 { margin: 0; }
.visa-dest { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.visa-card {
  width: 100%; display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 12px; border-radius: 14px; background: #F7F9FC; border: 1px solid var(--line);
  font: inherit; color: inherit; transition: transform .15s, box-shadow .15s;
}
.visa-card:hover { box-shadow: var(--shadow-1); }
.visa-card:active { transform: scale(.99); }
.visa-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.visa-badge {
  flex: none; min-width: 58px; padding: 5px 9px; border-radius: 9px;
  text-align: center; font-size: 12px; font-weight: 700; line-height: 1.35;
  background: #F0F1F4; color: var(--text-2);
}
.visa-badge.free, .visa-badge.domestic { background: #E3F6F4; color: #0E7C74; }
.visa-badge.required { background: #FDEEED; color: #B33A32; }
.visa-badge.evisa { background: var(--blue-soft); color: var(--blue); }
.visa-badge.voa, .visa-badge.permit { background: #FBF1E4; color: #9A6217; }
.visa-badge.eta { background: #F0EDFB; color: #5B49A8; }
.visa-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.visa-main b { font-size: 14px; color: var(--ink); }
.visa-main span { font-size: 11.5px; color: var(--text-2); line-height: 1.45; }
.visa-chevron { flex: none; font-size: 21px; color: var(--text-3); line-height: 1; }
.visa-fee-row {
  display: flex; align-items: baseline; gap: 8px; margin-top: 10px;
  padding: 8px 11px; border-radius: 10px; background: #FAFBFC;
}
.visa-fee-row > span { flex: none; font-size: 12px; color: var(--text-3); }
.visa-fee-row b { flex: 1; min-width: 0; font-size: 13px; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.visa-source { margin-top: 8px; font-size: 10px; color: var(--text-3); line-height: 1.55; }

.visa-detail-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.vd-head { display: flex; align-items: center; gap: 10px; }
.vd-head .visa-badge { min-width: 64px; }
.vd-head b { display: block; font-size: 16px; color: var(--ink); }
.vd-head span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-3); }
.vd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vd-cell { padding: 9px 11px; border-radius: 11px; background: #F7F9FC; min-width: 0; }
.vd-cell span { display: block; font-size: 10.5px; color: var(--text-3); }
.vd-cell b { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.vd-section h5 { margin: 0 0 7px; font-size: 13px; color: var(--ink); }
.vd-list { display: flex; flex-direction: column; gap: 5px; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }
.vd-note { padding: 10px 12px; border-radius: 11px; background: #FBF7EF; }
.vd-note b { font-size: 12px; color: #7A5A26; }
.vd-note p { margin-top: 3px; font-size: 12px; color: #7A5A26; line-height: 1.65; }
.vd-source { font-size: 10px; color: var(--text-3); line-height: 1.6; }

/* 交通与费用 */
.travel-airports { display: flex; flex-direction: column; gap: 2px; }
.travel-airport {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
}
.ta-icon {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--blue-soft); color: var(--blue); font-size: 15px;
}
.ta-icon.dest { background: #E3F6F4; color: var(--teal); }
.ta-main { flex: 1; min-width: 0; }
.ta-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.ta-dist { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; flex: none; }

.travel-metrics {
  margin-top: 10px; background: #F7F9FC; border-radius: 14px; overflow: hidden;
}
.tm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 14px; border-top: 1px solid rgba(22,35,63,.055);
}
.tm-row:first-child { border-top: 0; }
.tm-label { font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tm-s { font-size: 10.5px; color: var(--text-3); line-height: 1.45; }
.tm-v {
  font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right; flex: none; letter-spacing: -.01em;
}
.tm-v.cost { color: var(--blue); font-size: 15px; }
.tm-v.tax { color: var(--text-2); font-size: 13px; font-weight: 600; }
.transit-block {
  margin-top: 11px; border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 12px; background: var(--card);
}
.transit-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px;
}
.transit-head span { font-size: 10px; font-weight: 400; color: var(--text-3); flex: none; }
.transit-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.transit-list li { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tl-iata {
  flex: none; width: 42px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.tl-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.tl-main b { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.tl-main span { font-size: 10.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-detour {
  flex: none; font-size: 10.5px; color: var(--text-2);
  background: #F4F6F9; padding: 3px 7px; border-radius: 7px; font-variant-numeric: tabular-nums;
}
.transit-note { margin-top: 9px; font-size: 10.5px; color: var(--text-3); line-height: 1.55; }
.travel-note {
  margin-top: 11px; background: #FBF7EF; border-radius: 11px; padding: 10px 12px;
  font-size: 11.5px; color: #7A5A26; line-height: 1.6;
}
.travel-source { font-size: 10.5px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }

/* 地点详情 */
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; }
.info-list dt { color: var(--text-3); white-space: nowrap; }
.info-list dd { color: var(--ink); word-break: break-all; }
.info-list dd.estimate::after { content: "（估算）"; color: var(--text-3); font-size: 11px; }
.info-list .pop-src { color: var(--text-3); font-size: 11px; }

/* ========== 风物与人文 ========== */
.culture-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.culture-src { font-size: 11px; color: var(--text-3); letter-spacing: .3px; }
.culture-block { margin-top: 14px; }
.cb-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px;
}
.cb-title span { font-size: 11px; font-weight: 400; color: var(--text-3); }
.culture-list { display: flex; flex-direction: column; gap: 8px; }
.culture-item {
  display: flex; gap: 10px; padding: 10px 11px; border-radius: 13px;
  background: #F7F9FC; border: 1px solid rgba(22,35,63,.05);
}
.ci-icon {
  width: 30px; height: 30px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 15px;
  background: #fff; box-shadow: 0 1px 3px rgba(22,35,63,.08);
}
.ci-main { min-width: 0; flex: 1; }
.ci-main .sk { height: 10px; }
.sk {
  background: linear-gradient(90deg, #EBF0F7 25%, #F6F9FD 37%, #EBF0F7 63%);
  background-size: 400% 100%; border-radius: 6px;
  animation: skShimmer 1.4s ease-in-out infinite;
}
.ci-icon.sk, .culture-item .ci-icon:empty {
  background: linear-gradient(90deg, #EBF0F7 25%, #F6F9FD 37%, #EBF0F7 63%);
  background-size: 400% 100%; animation: skShimmer 1.4s ease-in-out infinite;
  box-shadow: none;
}
@keyframes skShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk, .culture-item .ci-icon:empty { animation: none; } }
.ci-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ci-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ci-tag {
  font-size: 10.5px; color: var(--teal-deep, #1C7A70); background: rgba(28,122,112,.09);
  padding: 1.5px 6px; border-radius: 6px; flex: none;
}
.ci-desc { font-size: 12px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.ci-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.culture-foot { font-size: 11px; color: var(--text-3); margin-top: 14px; line-height: 1.55; }

/* ========== 世界之眼（周边 100 km 直播） ========== */
.live-sub { font-size: 11.5px; color: var(--text-3); margin: -4px 0 12px; letter-spacing: .2px; }
.live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.live-card {
  display: flex; flex-direction: column; min-width: 0; text-align: left;
  background: #fff; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(22,35,63,.07);
  box-shadow: 0 1px 3px rgba(22,35,63,.07);
  transition: transform .16s ease, box-shadow .16s ease;
}
.live-card:active { transform: scale(.985); box-shadow: 0 1px 2px rgba(22,35,63,.06); }
.live-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: linear-gradient(135deg, #1B2740, #2E4468);
}
.live-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-badge {
  position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 999px;
  background: rgba(214, 48, 60, .94); color: #fff;
  font-size: 8.5px; font-weight: 700; letter-spacing: .6px; line-height: 1.5;
}
.live-badge i { width: 4.5px; height: 4.5px; border-radius: 50%; background: #fff; animation: livePulse 1.6s ease-out infinite; }
@keyframes livePulse {
  0% { opacity: 1; transform: scale(1); }
  70% { opacity: .25; transform: scale(1.7); }
  100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .live-badge i { animation: none; } }
.live-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(10,18,32,0) 40%, rgba(10,18,32,.34));
}
.live-play svg { width: 30px; height: 30px; fill: #fff; opacity: .92; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.live-info { display: block; padding: 7px 8px 9px; min-width: 0; }
.live-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 11.5px; font-weight: 600; color: var(--ink);
  line-height: 1.4; min-height: 2.8em; word-break: break-word;
}
.live-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 5px; min-width: 0; }
.live-dist { flex: none; font-size: 10px; color: var(--blue); font-weight: 600; white-space: nowrap; }
.live-cat {
  font-size: 9.5px; color: var(--text-3); background: #F2F5F9;
  border-radius: 6px; padding: 1.5px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.live-foot { font-size: 10.5px; color: var(--text-3); margin-top: 12px; line-height: 1.55; }
.live-panel { max-height: 88%; }
.live-player {
  position: relative; width: 100%; aspect-ratio: 16 / 9; flex: none;
  border-radius: 14px; overflow: hidden; background: #0C1420;
}
.live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-modal-meta { padding: 12px 2px 2px; }
.live-modal-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.live-modal-cat {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue); font-weight: 600;
}
.live-modal-dist { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.live-note { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin: 0 0 10px; }
.live-yt {
  display: block; text-align: center; padding: 10px; border-radius: 12px;
  background: #F2F5F9; color: var(--blue); font-size: 13px; font-weight: 600;
}
.live-yt:hover { background: var(--blue-soft); }

/* ========== 他乡光影（周边 50 km 公域影像） ========== */
.gallery-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.gallery-lang-btn {
  padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 600;
  color: var(--blue); background: var(--blue-soft); white-space: nowrap;
  transition: transform .12s, background .16s;
}
.gallery-lang-btn:active { transform: scale(.94); }
.gallery-tr-note { font-size: 10.5px; color: var(--text-3); margin: -3px 0 9px; line-height: 1.5; }
.gallery-sub { font-size: 11.5px; color: var(--text-3); margin: -4px 0 12px; letter-spacing: .2px; }
.gallery-list { display: flex; flex-direction: column; gap: 9px; }
.gal-item {
  display: flex; align-items: stretch; gap: 10px; padding: 9px; min-width: 0;
  text-align: left; border-radius: 14px;
  background: #F7F9FC; border: 1px solid rgba(22,35,63,.05);
  transition: background .15s;
}
.gal-item:active { background: #EFF4FB; }
.gal-thumb {
  width: 98px; height: 76px; flex: none; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #E8EDF5, #D6E0EE);
}
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gal-name {
  font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word;
}
.gal-desc {
  font-size: 11px; color: var(--text-2); line-height: 1.5; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.gal-meta { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 5px; min-width: 0; }
.gal-dist { flex: none; font-size: 10.5px; color: var(--blue); font-weight: 600; white-space: nowrap; }
.gal-credit { font-size: 9.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-cue { flex: none; align-self: center; font-size: 10.5px; color: var(--text-3); }
.gallery-foot { font-size: 10.5px; color: var(--text-3); margin-top: 12px; line-height: 1.55; }
.gallery-panel { max-height: 90%; }
.gallery-view {
  flex: none; display: flex; align-items: center; justify-content: center;
  border-radius: 14px; overflow: hidden; background: #0C1420; min-height: 120px;
}
.gallery-view img { display: block; max-width: 100%; max-height: 52vh; width: auto; height: auto; object-fit: contain; }
.gallery-view img.broken { display: none; }
.gallery-caption { padding: 12px 2px 2px; overflow-y: auto; }
.gallery-desc { font-size: 12.5px; color: var(--text-2); line-height: 1.6; margin: 0 0 8px; }
.gallery-meta-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 11px; color: var(--text-3); }
.gallery-credit { font-size: 11px; color: var(--text-3); line-height: 1.5; margin: 0 0 10px; }
.gallery-src {
  display: block; text-align: center; padding: 10px; border-radius: 12px;
  background: #F2F5F9; color: var(--blue); font-size: 13px; font-weight: 600;
}
.gallery-src:hover { background: var(--blue-soft); }
@media (max-width: 360px) {
  .gal-thumb { width: 84px; height: 68px; }
  .gal-cue { display: none; }
}


.info-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.info-head h4 { margin: 0; }
.class-tag {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 4px 10px 4px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
  background: var(--blue-soft); color: var(--blue);
}
.class-tag svg { width: 13px; height: 13px; flex: none; }
.class-tag.urban { background: rgba(46,107,230,.11); color: #2456BF; }
.class-tag.suburban { background: rgba(46,107,230,.08); color: #3A66C4; }
.class-tag.rural { background: rgba(28,122,112,.1); color: #1C7A70; }
.class-tag.wilderness { background: #FBF1E4; color: #A66518; }
.class-tag.ocean { background: #E3F6F4; color: #0F7C74; }
.class-tag.unknown { background: #F0F1F4; color: var(--text-3); }

/* 地点详情 · 当地著名景点 */
.attr-block { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 13px; }
.attr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.attr-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.attr-scope { font-size: 11px; color: var(--text-3); }
.attr-list { display: flex; flex-direction: column; gap: 8px; }
.attr-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 10px 11px; border-radius: 13px; background: #F7F9FC;
  border: 1px solid rgba(22,35,63,.05); transition: background .15s;
}
button.attr-item:active { background: #EFF4FB; }
.attr-icon {
  width: 30px; height: 30px; border-radius: 10px; flex: none;
  display: grid; place-items: center; font-size: 15px;
  background: #fff; box-shadow: 0 1px 3px rgba(22,35,63,.08);
}
.attr-sk { width: 30px; height: 30px; border-radius: 10px; flex: none; }
.attr-main { min-width: 0; flex: 1; display: block; }
.attr-top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.attr-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.attr-cat {
  font-size: 10.5px; color: #1C7A70; background: rgba(28,122,112,.09);
  padding: 1.5px 6px; border-radius: 6px; flex: none;
}
.attr-orig { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.attr-meta { display: block; font-size: 11px; color: var(--text-3); margin-top: 3px; }
.attr-cue { margin-left: auto; flex: none; font-size: 11px; color: var(--text-3); padding-left: 8px; }
.attr-foot { font-size: 11px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }
.attr-avatar { font-size: 22px; }

/* ========== 地点详情 · 经济情况 ========== */
.econ-block { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 13px; }
.econ-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.econ-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.econ-scope { font-size: 11px; color: var(--text-3); text-align: right; min-width: 0; max-width: 68%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.econ-list { display: flex; flex-direction: column; }
.econ-split {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 10px 0 2px; padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px; color: var(--text-3);
}
.econ-split span:first-child { font-weight: 600; color: var(--text-2); }
.econ-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed rgba(22,35,63,.07);
}
.econ-row:last-child { border-bottom: none; padding-bottom: 2px; }
.econ-label { flex: none; font-size: 12px; color: var(--text-3); }
.econ-values { min-width: 0; text-align: right; }
.econ-values b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.45; overflow-wrap: anywhere; }
.econ-values span { display: block; margin-top: 1px; font-size: 11px; color: var(--text-3); line-height: 1.4; }
.econ-values b.muted { font-weight: 400; font-size: 12px; color: var(--text-3); }
.econ-foot { font-size: 10px; color: var(--text-3); margin-top: 8px; line-height: 1.55; white-space: pre-line; }

/* 经济情况折叠头（button 重置） */
button.econ-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0; padding: 2px 0 6px; background: none; text-align: left; cursor: pointer;
}
button.econ-head:active { opacity: .72; }
.econ-head-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; flex: 1; }
.econ-head-right .econ-scope { max-width: 100%; }
.econ-chev { width: 15px; height: 15px; flex: none; color: var(--text-3); transition: transform .2s ease; }
.econ-chev path { stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
button.econ-head.open .econ-chev { transform: rotate(180deg); }
.econ-body { padding-top: 2px; }

/* 地区简介与当地图片 */
.story-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.story-head h4 { margin: 0; }
.story-src { font-size: 11px; color: var(--text-3); text-align: right; }
.story-body { display: flex; flex-direction: column; gap: 11px; }
.story-text { margin: 0; font-size: 13.5px; line-height: 1.8; color: var(--text-2); }
.story-gallery {
  display: flex; gap: 9px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory; padding-bottom: 2px;
}
.story-gallery figure {
  flex: 0 0 68%; margin: 0; position: relative; overflow: hidden;
  border-radius: 13px; background: #EDF1F7; scroll-snap-align: start;
}
.story-gallery figure img { display: block; width: 100%; height: 118px; object-fit: cover; }
.story-gallery figcaption {
  font-size: 10.5px; color: var(--text-3); padding: 6px 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.story-gallery figure.broken { display: none; }
.story-note { margin: 0; font-size: 10.5px; color: var(--text-3); line-height: 1.55; }
.story-note a { color: var(--blue); text-decoration: none; }
.story-sk-img { height: 104px; border-radius: 12px; margin-top: 2px; }
img.broken { display: none !important; }

/* 操作 */
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-btn {
  background: #F2F5F9; border-radius: 13px; padding: 13px 10px; font-size: 14px; font-weight: 500;
  color: var(--ink-2); transition: all .18s;
}
.action-btn:hover { background: var(--blue-soft); color: var(--blue); }
.action-btn:active { transform: scale(.95); }

/* 科普 */
.science-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.science-toggle h4 { margin: 0; }
.science-toggle svg { transition: transform .25s; color: var(--text-3); }
.science-toggle.open svg { transform: rotate(180deg); }
.science-body { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.science-body b { color: var(--ink); }

.footer-note { text-align: center; font-size: 11px; color: var(--text-3); line-height: 1.8; padding: 4px 0 10px; }

/* ========== 弹层 ========== */
.modal { position: absolute; inset: 0; z-index: 1000; }
.modal-mask { position: absolute; inset: 0; background: rgba(22,35,63,.42); backdrop-filter: blur(3px); animation: fadeIn .22s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 78%;
  background: var(--card); border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + var(--safe-b));
  animation: sheetUp .3s cubic-bezier(.22,.8,.32,1); display: flex; flex-direction: column;
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: .5; } to { transform: none; opacity: 1; } }
.modal-tabs { display: flex; align-items: center; gap: 6px; padding: 10px 0 12px; }
.mtab { padding: 7px 14px; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.mtab.active { background: var(--ink); color: #fff; }
.modal-close { margin-left: auto; font-size: 26px; color: var(--text-3); width: 36px; height: 36px; line-height: 1; }
.record-list { overflow-y: auto; min-height: 120px; }
.record-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; border-radius: 8px;
}
.record-item:hover { background: #F7F9FC; }
.record-main { flex: 1; min-width: 0; }
.record-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; font-family: ui-monospace, monospace; }
.record-del { color: var(--text-3); font-size: 18px; padding: 6px 10px; border-radius: 8px; flex: none; }
.record-del:hover { color: var(--red); background: #FDEEED; }
.record-empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 34px 0; }
.modal-footer { padding-top: 12px; display: flex; justify-content: flex-end; }
.fav-add { display: flex; gap: 8px; padding: 10px 0 4px; }
.fav-add input {
  flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 12px; font-size: 14px; outline: none;
}
.fav-add input:focus { border-color: var(--blue); }

/* 首次定位引导：居中、克制、三秒能读完 */
.geo-panel {
  align-items: center; text-align: center;
  padding-top: 26px; overflow: hidden;
}
.geo-glow {
  position: absolute; top: -74px; left: 50%; transform: translateX(-50%);
  width: 230px; height: 150px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(46,107,230,.16), transparent);
}
.geo-icon {
  position: relative;
  width: 54px; height: 54px; border-radius: 50%; margin-bottom: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #EAF1FF, #F5F8FF);
  color: var(--blue);
  box-shadow: 0 0 0 1px rgba(46,107,230,.14), 0 10px 24px rgba(46,107,230,.16);
  animation: geoPulse 3s ease-in-out infinite;
}
@keyframes geoPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(46,107,230,.14), 0 10px 24px rgba(46,107,230,.16); }
  50% { box-shadow: 0 0 0 7px rgba(46,107,230,.08), 0 10px 24px rgba(46,107,230,.16); }
}
@media (prefers-reduced-motion: reduce) { .geo-icon { animation: none; } }
.geo-icon svg { width: 26px; height: 26px; }
.geo-title { font-size: 19px; font-weight: 650; color: var(--ink); margin: 0 0 7px; }
.geo-desc { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 0 0 13px; max-width: 30ch; }
.geo-chips { display: flex; gap: 6px; margin-bottom: 18px; }
.geo-chips span {
  font-size: 11px; color: var(--text-2); background: #F2F5F9;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.geo-allow { width: 100%; padding: 13px; border-radius: 14px; font-size: 15px; box-shadow: 0 8px 20px rgba(46,107,230,.28); }
.geo-skip {
  margin-top: 4px; padding: 11px; width: 100%;
  font-size: 13px; color: var(--text-3); background: none;
}
.geo-skip:active { color: var(--text-2); }

.help-body { overflow-y: auto; font-size: 13.5px; color: var(--text-2); line-height: 1.7; display: flex; flex-direction: column; gap: 10px; }
.help-body b { color: var(--ink); }
.unit-switch button.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(22,35,63,.14); }
/* ========== Toast ========== */
.toast {
  position: absolute; left: 50%; bottom: calc(90px + var(--safe-b)); transform: translateX(-50%);
  background: rgba(22,35,63,.92); color: #fff; padding: 11px 20px; border-radius: 14px;
  font-size: 13.5px; z-index: 2000; box-shadow: var(--shadow-2);
  animation: toastIn .28s cubic-bezier(.22,.8,.32,1); max-width: 86%; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 滚动条 */
::-webkit-scrollbar { width: 0; height: 0; }

/* 桌面端适配 */
@media (min-width: 700px) {
  #app { border-radius: 0; }
  .map-wrap { min-height: 300px; }
}

/* ========== 详情页整页氛围：背景随目标地点的昼夜与天气变化 ========== */
#view-detail {
  --sky-1: #DCEAFA; --sky-2: #EFF5FC; --glow: rgba(255, 206, 112, .55); --wash: transparent;
  background-image:
    linear-gradient(180deg, var(--wash) 0%, transparent 34%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 25%, #F4F6FA 54%);
  background-repeat: no-repeat; background-size: 100% 100%;
  overflow: hidden;
}
#view-detail[data-phase="golden"] { --sky-1: #FFE2BB; --sky-2: #FDF1E4; --glow: rgba(255, 168, 88, .55); }
#view-detail[data-phase="dusk"] { --sky-1: #2C3858; --sky-2: #6C5B79; --glow: rgba(255, 138, 116, .42); }
#view-detail[data-phase="night"] { --sky-1: #0A1120; --sky-2: #1C2C46; --glow: rgba(198, 216, 255, .30); }

#view-detail[data-sky="cloud"] { --wash: rgba(118, 130, 148, .16); }
#view-detail[data-sky="rain"] { --wash: rgba(70, 92, 124, .30); }
#view-detail[data-sky="fog"] { --wash: rgba(188, 197, 208, .45); }
#view-detail[data-sky="snow"] { --wash: rgba(198, 222, 255, .34); }

#view-detail::before {
  content: ''; position: absolute; top: -130px; left: 50%; transform: translateX(-50%);
  width: min(600px, 140%); height: 420px; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 50% 46%, var(--glow), transparent 66%);
}
#view-detail::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 46%;
  pointer-events: none; z-index: 0; opacity: 0; transition: opacity 1.1s ease;
  background-image:
    radial-gradient(1.6px 1.6px at 11% 16%, rgba(255,255,255,.95), transparent 55%),
    radial-gradient(1.3px 1.3px at 24% 34%, rgba(255,255,255,.8), transparent 55%),
    radial-gradient(1.8px 1.8px at 38% 12%, rgba(255,255,255,.9), transparent 55%),
    radial-gradient(1.2px 1.2px at 52% 27%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1.7px 1.7px at 66% 15%, rgba(255,255,255,.92), transparent 55%),
    radial-gradient(1.3px 1.3px at 79% 31%, rgba(255,255,255,.8), transparent 55%),
    radial-gradient(1.5px 1.5px at 90% 20%, rgba(255,255,255,.86), transparent 55%),
    radial-gradient(1.2px 1.2px at 45% 41%, rgba(255,255,255,.6), transparent 55%);
  background-repeat: no-repeat;
}
#view-detail[data-phase="night"]::after { opacity: .9; }
#view-detail[data-phase="dusk"]::after { opacity: .3; }

#view-detail .detail-header, #view-detail .detail-scroll { position: relative; z-index: 1; }

/* 深色天幕下的页头与首屏文字 */
#view-detail[data-phase="night"] .detail-header h2,
#view-detail[data-phase="dusk"] .detail-header h2 { color: #F2F7FF; }
#view-detail[data-phase="night"] .detail-header .icon-btn,
#view-detail[data-phase="dusk"] .detail-header .icon-btn { color: #EAF1FB; }
#view-detail[data-phase="night"] #btn-back,
#view-detail[data-phase="dusk"] #btn-back { background: rgba(255,255,255,.15); color: #fff; }

/* 首屏概览卡改为“贴在天幕上”，让背景成为主视觉 */
#sec-overview { background: transparent; box-shadow: none; padding: 16px 18px 8px; }
#view-detail[data-phase="night"] #sec-overview .d-title,
#view-detail[data-phase="dusk"] #sec-overview .d-title { color: #FFFFFF; }
#view-detail[data-phase="night"] #sec-overview .d-hierarchy,
#view-detail[data-phase="dusk"] #sec-overview .d-hierarchy { color: rgba(255,255,255,.74); }
#view-detail[data-phase="night"] #sec-overview .class-chip,
#view-detail[data-phase="dusk"] #sec-overview .class-chip { background: rgba(255,255,255,.18); color: #F4F8FF; }
#view-detail[data-phase="night"] #sec-overview .info-tip,
#view-detail[data-phase="dusk"] #sec-overview .info-tip { color: rgba(255,255,255,.68); }
#view-detail[data-phase="night"] #sec-overview .info-tip:hover,
#view-detail[data-phase="dusk"] #sec-overview .info-tip:hover { color: #FFFFFF; background: rgba(255,255,255,.16); }
#view-detail[data-phase="night"] #sec-overview .confidence,
#view-detail[data-phase="dusk"] #sec-overview .confidence,
#view-detail[data-phase="night"] #sec-overview .muted,
#view-detail[data-phase="dusk"] #sec-overview .muted { color: rgba(255,255,255,.6); }
#view-detail[data-phase="night"] #sec-overview .coord-line,
#view-detail[data-phase="dusk"] #sec-overview .coord-line { background: rgba(255,255,255,.13); color: #EAF1FB; }
#view-detail[data-phase="night"] #sec-overview .coord-line svg,
#view-detail[data-phase="dusk"] #sec-overview .coord-line svg { color: rgba(255,255,255,.6); }

/* ========== 人物介绍弹窗 ========== */
.culture-item.clickable { cursor: pointer; }
.culture-item.clickable:active { background: #F1F5FB; }
.ci-cue {
  margin-left: auto; flex: none; font-size: 11px; color: var(--text-3);
  display: inline-flex; align-items: center; gap: 2px; padding-left: 8px;
}
.person-body {
  overflow-y: auto; min-height: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.78;
  display: flex; flex-direction: column; gap: 13px;
}
.person-hero { display: flex; align-items: center; gap: 12px; }
.person-avatar {
  width: 52px; height: 52px; border-radius: 17px; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 19px; font-weight: 700;
  background: linear-gradient(135deg, #2E6BE6, #1C7A70);
  box-shadow: 0 4px 14px rgba(46,107,230,.25);
}
.person-name { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.person-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.person-fact {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 11px; border-radius: 10px; background: #F4F7FB;
  font-size: 12.5px; line-height: 1.5;
}
.person-fact .pf-label { flex: none; color: var(--text-3); }
.person-fact .pf-value { min-width: 0; color: var(--ink-2); font-weight: 600; overflow-wrap: anywhere; }
.person-fact .pf-dist {
  flex: none; margin-left: auto; align-self: center;
  padding: 2px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .1px;
  color: var(--blue); background: var(--blue-soft); white-space: nowrap;
}
.person-text { white-space: pre-wrap; letter-spacing: .002em; }
.person-note {
  font-size: 11px; color: var(--text-3); line-height: 1.65;
  background: #F7F9FC; border-radius: 11px; padding: 10px 12px;
}
.person-chip {
  display: inline-block; padding: 3px 8px; border-radius: 7px;
  background: #EEF3FA; color: var(--blue); font-size: 11px; margin: 0 6px 6px 0;
}
.person-link {
  display: block; text-align: center; padding: 12px; border-radius: 13px;
  background: #F0F4FA; color: var(--blue); font-weight: 600; font-size: 13.5px;
  text-decoration: none;
}
.person-link:active { background: #E5ECF7; }

/* 列表头像：有真实照片时用照片，加载失败回退首字 */
.culture-item.clickable {
  width: 100%; text-align: left; font: inherit; color: inherit;
  appearance: none; -webkit-appearance: none;
}
button.culture-item { border: 1px solid rgba(22,35,63,.05); }
.ci-icon.ci-photo { position: relative; overflow: hidden; }
.ci-icon.ci-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ci-icon .ci-initial {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 14px; font-weight: 600; color: var(--text-3);
}
.ci-icon.ci-species, .ci-icon.ci-company { font-size: 17px; }
.ci-icon.ci-species .ci-initial, .ci-icon.ci-company .ci-initial { font-size: 16px; }

/* 弹窗封面：有图用宽幅封面，无图用渐变头像 */
.hero-media {
  position: relative; margin: 0; flex: none; overflow: hidden;
  border-radius: 16px; background: #EDF1F7; aspect-ratio: 16 / 9;
}
.hero-media img {
  position: relative; z-index: 1; display: block;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-media .hm-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 38px; color: var(--text-3);
}
.hero-line { display: flex; align-items: center; gap: 12px; }
.hero-id { min-width: 0; }
.hero-line .person-name { font-size: 18px; }
.dish-summary {
  margin: 0; background: #FBF7EF; color: #7A5A26;
  border-radius: 12px; padding: 10px 12px;
  font-size: 12.5px; line-height: 1.7;
}

/* 驾车途经国家 / 城市 */
.route-detail-body {
  overflow-y: auto; min-height: 0; padding-bottom: 4px;
  display: flex; flex-direction: column; gap: 12px;
}
.rd-summary { display: flex; gap: 8px; }
.rd-summary > div {
  flex: 1; background: #F7F9FC; border-radius: 12px; padding: 9px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.rd-summary b { font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.rd-summary span { font-size: 10px; color: var(--text-3); }
.rd-note { font-size: 10.5px; color: var(--text-3); line-height: 1.55; }
.rd-h { font-size: 13px; color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
.rd-h span { font-size: 10.5px; color: var(--text-3); font-weight: 400; }
.rc-list { display: flex; flex-direction: column; gap: 8px; }
.rc-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; }
.rc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rc-head b { font-size: 13.5px; color: var(--ink); }
.rc-head span { font-size: 10px; color: var(--text-3); }
.rc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.rc-tags span { font-size: 10px; color: var(--text-2); background: #F4F6F9; border-radius: 6px; padding: 2px 6px; }
.route-city-list { list-style: none; display: flex; flex-direction: column; }
.route-city-list li {
  display: flex; align-items: center; gap: 8px; padding: 7px 2px;
  border-top: 1px solid var(--line); font-size: 12px;
}
.route-city-list li:first-child { border-top: 0; }
.rl-idx {
  flex: none; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); font-size: 10px; font-weight: 600;
}
.rl-name {
  min-width: 0; flex: 1; color: var(--ink);
  display: flex; flex-direction: column; gap: 1px;
  overflow: hidden;
}
.rl-zh { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-en {
  font-style: normal; font-size: 9.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rl-cc { flex: none; font-size: 10.5px; color: var(--text-3); }
.rl-pop { flex: none; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.route-city-list li.rl-sea {
  justify-content: center; gap: 6px; margin: 3px 0; padding: 6px 8px;
  border: 1px dashed rgba(46, 107, 230, 0.32); border-radius: 9px;
  background: #F3F8FF; color: var(--blue); font-size: 10.5px; font-weight: 600;
}
.rl-sea-ico { display: inline-flex; flex: none; }
.rl-sea-ico svg { width: 14px; height: 14px; }

/* 跨海接驳说明 */
.rd-bridge {
  border: 1px solid rgba(46, 107, 230, 0.22); background: #F3F8FF;
  border-radius: 12px; padding: 10px 11px;
}
.rd-bridge-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 5px;
}
.rd-bridge-head b {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--blue);
}
.rd-sea-icon {
  display: inline-grid; place-items: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: #E3EEFF; color: var(--blue);
}
.rd-sea-icon svg { width: 14px; height: 14px; }
.rd-bridge-head span { font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rd-bridge p { margin: 0; font-size: 11px; color: var(--text-2); line-height: 1.65; }
.rd-bridge p + p { margin-top: 4px; }
.rd-bridge.flight { border-color: rgba(23, 163, 152, 0.28); background: #F1FBFA; }
.rd-bridge.flight .rd-bridge-head b { color: var(--teal); }
.rd-bridge.flight .rd-sea-icon { background: #DFF5F2; color: var(--teal); }
.rd-bridge.warn { border-color: rgba(190, 132, 30, 0.28); background: #FBF7EF; }
.rd-bridge.warn p { color: #7A5A26; }

/* ========== 界面语言切换 ========== */
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 34px; padding: 0 9px; flex: none;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(22, 35, 63, .04);
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
}
.lang-btn:hover { background: #F7F9FC; border-color: #DCE3ED; }
.lang-btn:active { transform: scale(.95); }
.lang-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.lang-code { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; line-height: 1; }
@media (max-width: 359px) { .lang-code { display: none; } .lang-btn { padding: 0 8px; } }

.lang-backdrop {
  position: fixed; inset: 0; z-index: 3999;
  background: rgba(10, 14, 22, .06);
  animation: langFade .18s ease both;
}
.lang-menu {
  position: fixed; z-index: 4000;
  padding: 6px; border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(22, 35, 63, .08);
  box-shadow: 0 6px 16px rgba(22, 35, 63, .1), 0 18px 48px rgba(22, 35, 63, .16);
  max-height: min(72vh, 560px); overflow: auto;
  -webkit-overflow-scrolling: touch;
  animation: langIn .2s cubic-bezier(.22, .8, .32, 1) both;
}
@keyframes langIn { from { opacity: 0; transform: translateY(-6px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes langFade { from { opacity: 0; } to { opacity: 1; } }
.lang-menu-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 8px 10px 7px; color: var(--text-3);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
}
.lang-menu-hint { font-size: 10px; font-weight: 400; opacity: .82; }
.lang-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 8px 10px; border-radius: 10px;
  text-align: left; transition: background .15s ease;
}
.lang-row:hover { background: rgba(22, 35, 63, .045); }
.lang-row:active { background: rgba(22, 35, 63, .075); }
.lang-row-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.lang-row-main b { font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.lang-row-main i { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.lang-check { width: 16px; height: 16px; flex: none; opacity: 0; color: var(--blue); }
.lang-row.on .lang-check { opacity: 1; }
.lang-row.on .lang-row-main b { color: var(--blue); }
.lang-row.on { background: rgba(46, 107, 230, .06); }
@media (prefers-reduced-motion: reduce) {
  .lang-menu, .lang-backdrop { animation: none; }
}
