/* ============================================
   港澳行旅 · 样式系统
   高级旅行杂志风格 · Apple Maps + Airbnb
   ============================================ */

/* ---- CSS 变量 ---- */
:root {
  /* 色彩系统 */
  --bg-base: #F8F7F4;
  --bg-card: #FFFFFF;
  --bg-overlay: rgba(0, 0, 0, 0.55);
  --text-primary: #1A1A2E;
  --text-secondary: #5A5A6E;
  --text-muted: #9A9AAB;
  --text-inverse: #FFFFFF;
  --accent: #C9A961;
  --accent-dark: #A88A48;
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 30px 90px rgba(0, 0, 0, 0.22);

  /* 交通色 */
  --c-metro: #2563EB;
  --c-walk: #16A34A;
  --c-ferry: #0891B2;
  --c-taxi: #EA580C;
  --c-flight: #4338CA;
  --c-shuttle: #7C3AED;
  --c-bus: #EA580C;
  --c-cross-border: #0891B2;

  /* 城市色 */
  --c-hk: #DC2626;
  --c-macau: #7C3AED;
  --c-shanghai: #0EA5E9;

  /* 字体 (系统字体，无需外部加载) */
  --font-serif: Georgia, 'Songti SC', 'STSong', 'SimSun', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* 过渡 */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- 基础重置 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================
   顶部导航栏
   ============================================ */
.top-nav {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  background: var(--text-primary);
  color: white;
  flex-shrink: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  transition: all 0.25s;
  text-decoration: none;
}

.nav-link:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

.nav-link.active {
  color: white;
  background: rgba(201,169,97,0.2);
  border: 1px solid rgba(201,169,97,0.4);
}

.nav-link svg {
  width: 16px; height: 16px;
}

.nav-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ============================================
   主布局
   ============================================ */
.main {
  display: grid;
  grid-template-columns: 1fr 500px;
  height: calc(100vh - 56px);
  max-width: 1800px;
  margin: 0 auto;
  padding: 0;
  gap: 0;
}

/* ============================================
   地图区域
   ============================================ */
.map-wrap {
  position: relative;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  background: #E8E6E0;
  z-index: 1;
}

/* Leaflet 覆盖样式 */
.leaflet-container {
  font-family: var(--font-sans);
  background: #E8E6E0;
}

/* 标记容器允许溢出 (让标签可见) */
.marker-wrapper {
  overflow: visible !important;
}

.leaflet-control-attribution {
  background: rgba(255,255,255,0.7) !important;
  font-size: 0.65rem !important;
  padding: 2px 6px !important;
  border-radius: 4px 0 0 0 !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--r-sm) !important;
  overflow: hidden;
  margin: 16px !important;
}

.leaflet-control-zoom a {
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 1.1rem !important;
  color: var(--text-primary) !important;
  background: white !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  transition: background 0.2s;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-base) !important;
  color: var(--accent) !important;
}

/* ---- 自定义标记 ---- */
.custom-marker {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s var(--ease);
}

.custom-marker:hover {
  transform: scale(1.15);
  z-index: 1000;
}

.marker-pin {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border: 2.5px solid white;
  transition: all 0.3s var(--ease);
}

.marker-pin span {
  transform: rotate(45deg);
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  font-family: var(--font-sans);
}

.custom-marker.hk .marker-pin { background: var(--c-hk); }
.custom-marker.macau .marker-pin { background: var(--c-macau); }
.custom-marker.shanghai .marker-pin { background: var(--c-shanghai); }

/* 中转点标记 (出发地/酒店/口岸) */
.custom-marker.is-transit .marker-pin {
  background: var(--text-secondary);
  border-style: dashed;
  opacity: 0.8;
}

.custom-marker.active .marker-pin {
  transform: rotate(-45deg) scale(1.25);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 0 6px rgba(201,169,97,0.25);
  border-color: var(--accent);
}

.marker-pulse {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -10%);
  width: 36px; height: 36px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.custom-marker.active .marker-pulse {
  animation: pulse-ring 2s var(--ease) infinite;
}

@keyframes pulse-ring {
  0% { transform: translate(-50%, -10%) scale(0.8); opacity: 0.6; }
  100% { transform: translate(-50%, -10%) scale(2.5); opacity: 0; }
}

.custom-marker.hk .marker-pulse { border: 2px solid var(--c-hk); }
.custom-marker.macau .marker-pulse { border: 2px solid var(--c-macau); }
.custom-marker.shanghai .marker-pulse { border: 2px solid var(--c-shanghai); }

/* ---- 标记名称标签 ---- */
.marker-label {
  position: absolute;
  top: 38px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  background: rgba(255,255,255,0.96);
  padding: 3px 10px;
  border-radius: 100px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  display: none;
  pointer-events: none;
  border: 1px solid var(--border);
  z-index: 10;
  line-height: 1.3;
}

/* 当天景点的标记：显示名称标签 */
.custom-marker.current-day .marker-label {
  display: block;
}

/* 当天景点的标记：高亮 */
.custom-marker.current-day {
  z-index: 500;
}

/* 非当天的标记：变暗 */
.custom-marker:not(.current-day) {
  opacity: 0.45;
  transition: opacity 0.3s;
}

.custom-marker:not(.current-day):hover {
  opacity: 1;
}

/* 非当天标记不显示脉冲 */
.custom-marker:not(.current-day) .marker-pulse {
  display: none;
}

/* ---- 地图浮层 ---- */
.map-overlay-top {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 500;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.map-day-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.map-day-badge .day-num {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.map-day-badge .day-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-day-badge .day-info-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.map-day-badge .day-info-date {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ---- 交通图例 ---- */
.transport-legend {
  position: absolute;
  bottom: 16px; left: 16px;
  z-index: 500;
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 100px;
  transition: all 0.2s;
}

.legend-item:hover {
  background: var(--bg-base);
}

.legend-line {
  width: 22px;
  height: 3px;
  border-radius: 2px;
}

.legend-item svg {
  width: 14px; height: 14px;
}

/* ============================================
   侧边栏
   ============================================ */
.sidebar {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- 日期选择 ---- */
.day-tabs {
  display: flex;
  padding: 16px 20px;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.day-tab {
  flex: 1;
  padding: 14px 8px;
  border-radius: var(--r-md);
  text-align: center;
  transition: all 0.35s var(--ease);
  border: 1.5px solid var(--border);
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

.day-tab:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.day-tab.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.day-tab .tab-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.day-tab.active .tab-label {
  color: var(--accent);
}

.day-tab .tab-day {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.day-tab.active .tab-day {
  color: var(--text-inverse);
}

.day-tab .tab-city {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.day-tab.active .tab-city {
  color: rgba(255,255,255,0.7);
}

/* ---- 日程标题 ---- */
.day-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.day-header h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.day-header .day-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.day-header .day-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---- 时间轴 ---- */
.timeline {
  flex: 1;
  overflow-y: auto;
  padding: 10px 24px 40px;
  scrollbar-width: auto;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}

.timeline::-webkit-scrollbar { width: 8px; }
.timeline::-webkit-scrollbar-track { background: rgba(0,0,0,0.03); border-radius: 4px; }
.timeline::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 4px; }
.timeline::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.35); }

.timeline-item {
  position: relative;
  padding-left: 0;
  cursor: pointer;
  animation: fadeInUp 0.5s var(--ease) both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.timeline-item.active .tl-card {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(201,169,97,0.18);
  background: linear-gradient(135deg, #FFFDF7 0%, #FFFFFF 100%);
}

.timeline-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.tl-time {
  flex-shrink: 0;
  width: 52px;
  text-align: right;
  padding-top: 16px;
}

.tl-time .time-main {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.tl-time .time-dur {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.tl-line-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 14px;
}

.tl-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--c-hk);
  z-index: 2;
  position: relative;
  transition: all 0.3s var(--ease);
}

.tl-dot.macau { border-color: var(--c-macau); }
.tl-dot.shanghai { border-color: var(--c-shanghai); }
.tl-dot.is-transit { border-style: dashed; border-color: var(--text-muted); }

.timeline-item.active .tl-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(201,169,97,0.2);
}

.tl-connector {
  width: 2px;
  flex: 1;
  min-height: 30px;
  margin: 4px 0;
  position: relative;
}

.tl-connector.has-route {
  background-image: repeating-linear-gradient(
    to bottom,
    var(--text-muted) 0,
    var(--text-muted) 4px,
    transparent 4px,
    transparent 9px
  );
  opacity: 0.3;
}

.tl-connector.last { min-height: 0; }

/* 路线信息条 */
.tl-route {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin: 6px 0 6px 68px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--bg-base);
  color: var(--text-secondary);
  width: fit-content;
  transition: all 0.2s;
}

.tl-route svg {
  width: 14px; height: 14px;
}

.tl-route .route-dur {
  color: var(--text-muted);
  font-size: 0.68rem;
}

.tl-route.metro { color: var(--c-metro); }
.tl-route.walk { color: var(--c-walk); }
.tl-route.ferry { color: var(--c-ferry); }
.tl-route.taxi { color: var(--c-taxi); }
.tl-route.flight { color: var(--c-flight); }
.tl-route.shuttle { color: var(--c-shuttle); }
.tl-route.bus { color: var(--c-bus); }
.tl-route.cross_border { color: var(--c-cross-border); }

/* 时间轴卡片 */
.tl-card {
  flex: 1;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-base);
  border: 1.5px solid transparent;
  transition: all 0.3s var(--ease);
  margin-bottom: 4px;
  overflow: hidden;
}

.tl-card:hover {
  background: white;
  box-shadow: var(--shadow-sm);
}

.tl-card-content {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.tl-card-info {
  flex: 1;
  min-width: 0;
}

.tl-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r-sm);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  background-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.tl-card .tl-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.tl-card .tl-name-en {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}

.tl-card .tl-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.4;
}

.tl-card .tl-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tl-tag {
  font-size: 0.62rem;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(0,0,0,0.04);
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   详情卡片 (弹出层)
   ============================================ */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.detail-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.detail-card {
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  background: var(--bg-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateY(40px) scale(0.95);
  transition: transform 0.5s var(--ease-out);
}

.detail-overlay.show .detail-card {
  transform: translateY(0) scale(1);
}

.detail-image-wrap {
  position: relative;
  height: 300px;
  flex-shrink: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
}

.detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s var(--ease);
}

.detail-overlay.show .detail-image {
  transform: scale(1.08);
}

.detail-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.6) 100%);
}

.detail-city-badge {
  position: absolute;
  top: 20px; left: 20px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
  backdrop-filter: blur(8px);
  z-index: 3;
}

.detail-city-badge.hk { background: rgba(220,38,38,0.5); border: 1px solid rgba(220,38,38,0.6); }
.detail-city-badge.macau { background: rgba(124,58,237,0.5); border: 1px solid rgba(124,58,237,0.6); }
.detail-city-badge.shanghai { background: rgba(14,165,233,0.5); border: 1px solid rgba(14,165,233,0.6); }

.detail-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 3;
  transition: all 0.25s;
}

.detail-close:hover {
  background: rgba(255,255,255,0.35);
  transform: rotate(90deg);
}

.detail-title-wrap {
  position: absolute;
  bottom: 24px; left: 28px;
  right: 28px;
  z-index: 3;
  color: white;
}

.detail-title-wrap h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.detail-title-wrap .detail-name-en {
  font-size: 0.95rem;
  font-weight: 300;
  opacity: 0.85;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

.detail-body {
  overflow-y: auto;
  padding: 24px 32px 32px;
  flex: 1;
  scrollbar-width: thin;
}

.detail-body::-webkit-scrollbar { width: 5px; }
.detail-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.detail-tag {
  font-size: 0.7rem;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--bg-base);
  color: var(--text-secondary);
  font-weight: 500;
  border: 1px solid var(--border);
}

.detail-intro {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 22px;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.info-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--bg-base);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.info-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: white;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.info-icon svg {
  width: 18px; height: 18px;
}

.info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.info-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  word-break: break-word;
}

.detail-notes {
  padding: 18px 20px;
  background: linear-gradient(135deg, #FFFDF7, #FFF9EE);
  border: 1px solid rgba(201,169,97,0.25);
  border-radius: var(--r-md);
  position: relative;
}

.detail-notes::before {
  content: '';
  position: absolute;
  left: 0; top: 20px; bottom: 20px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.notes-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.notes-label svg { width: 14px; height: 14px; }

.notes-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.65;
}

/* 详情导航按钮 */
.detail-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.detail-nav-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--bg-base);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detail-nav-btn:hover:not(:disabled) {
  background: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

.detail-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.detail-nav-btn svg { width: 16px; height: 16px; }

/* ============================================
   侧边栏避坑指南入口
   ============================================ */
.sidebar-tips-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  margin: 0 20px 16px;
  background: linear-gradient(135deg, #FFF9EE, #FFF5E0);
  border: 1px solid rgba(201,169,97,0.3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  flex-shrink: 0;
}

.sidebar-tips-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.tips-cta-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(201,169,97,0.15);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tips-cta-icon svg { width: 18px; height: 18px; }

.tips-cta-text { flex: 1; }

.tips-cta-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.tips-cta-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tips-cta-arrow {
  width: 16px; height: 16px;
  color: var(--accent);
  transition: transform 0.3s;
}

.sidebar-tips-cta:hover .tips-cta-arrow {
  transform: translateX(4px);
}

/* ============================================
   路线概览栏 (Header)
   ============================================ */
.route-overview {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 18px;
  flex-wrap: wrap;
}

.route-ov-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: white;
}

.route-ov-city {
  font-size: 0.85rem;
  font-weight: 600;
}

.route-ov-sub {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-left: 4px;
}

.route-ov-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px;
  color: rgba(255,255,255,0.5);
}

.route-ov-arrow svg {
  width: 18px; height: 18px;
}

.route-ov-arrow .tp-icon {
  width: 16px; height: 16px;
  opacity: 0.8;
  margin-right: 2px;
}

.route-ov-arrow .tp-label {
  font-size: 0.65rem;
  opacity: 0.6;
}

/* ============================================
   自由探索日
   ============================================ */
.free-day-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 8px 24px 12px;
  background: linear-gradient(135deg, #FFF9EE, #FFF5E0);
  border: 1px solid rgba(201,169,97,0.3);
  border-radius: var(--r-md);
  font-size: 0.8rem;
  color: var(--accent-dark);
  font-weight: 500;
}

.free-day-banner svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

.timeline-item.free-stop .tl-card {
  border-style: dashed;
  border-color: var(--border-strong);
}

.timeline-item.free-stop .tl-time .time-main {
  font-size: 0.75rem;
  color: var(--accent-dark);
  font-family: var(--font-sans);
  font-weight: 600;
}

/* ============================================
   Tips 旅行避坑模块
   ============================================ */
.tips-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 56px 48px 72px;
}

.tips-header {
  margin-bottom: 28px;
}

.tips-header .tips-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}

.tips-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.tips-header .tips-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.tip-card {
  padding: 20px 22px;
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.tip-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.tip-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.tip-card:hover::before { opacity: 1; }

.tip-card.hk::before { background: var(--c-hk); }
.tip-card.macau::before { background: var(--c-macau); }

.tip-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tip-icon-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-base);
  color: var(--text-secondary);
}

.tip-card.hk .tip-icon-circle { color: var(--c-hk); background: rgba(220,38,38,0.08); }
.tip-card.macau .tip-icon-circle { color: var(--c-macau); background: rgba(124,58,237,0.08); }

.tip-icon-circle svg { width: 18px; height: 18px; }

.tip-cat-badge {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 100px;
  color: white;
}

.tip-cat-badge.hk { background: var(--c-hk); }
.tip-cat-badge.macau { background: var(--c-macau); }

.tip-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.tip-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   出行准备清单 (可交互打勾)
   ============================================ */
.checklist-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px 56px;
}

.checklist-header {
  margin-bottom: 28px;
}

.checklist-header .cl-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}

.checklist-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.checklist-header .cl-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 总进度条 */
.cl-progress-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cl-progress-track {
  flex: 1;
  height: 8px;
  background: var(--bg-base);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.cl-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #16A34A, #22C55E);
  border-radius: 100px;
  width: 0%;
  transition: width 0.5s var(--ease-out);
}

.cl-progress-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

.cl-progress-text .cl-done {
  color: #16A34A;
}

/* 清单分类网格 */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cl-category {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.cl-category:hover {
  box-shadow: var(--shadow-sm);
}

.cl-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-base);
}

.cl-cat-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cl-cat-icon svg {
  width: 20px; height: 20px;
  color: white;
}

.cl-cat-title-wrap {
  flex: 1;
}

.cl-cat-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.cl-cat-title-en {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}

.cl-cat-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 10px;
  background: white;
  border-radius: 100px;
  border: 1px solid var(--border);
}

.cl-cat-count .cl-cat-done {
  color: #16A34A;
}

/* 清单项列表 */
.cl-items {
  padding: 8px 12px;
}

.cl-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.cl-item:hover {
  background: var(--bg-base);
}

/* 自定义 checkbox */
.cl-checkbox {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
  background: white;
}

.cl-checkbox svg {
  width: 14px; height: 14px;
  color: white;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s var(--ease);
}

.cl-item.checked .cl-checkbox {
  background: #16A34A;
  border-color: #16A34A;
}

.cl-item.checked .cl-checkbox svg {
  opacity: 1;
  transform: scale(1);
}

.cl-item-text-wrap {
  flex: 1;
  min-width: 0;
}

.cl-item-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cl-item.checked .cl-item-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

.cl-required-tag {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(220,38,38,0.1);
  color: #DC2626;
}

.cl-item-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* ============================================
   实用信息模块
   ============================================ */
.info-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 48px 72px;
}

.info-header {
  margin-bottom: 28px;
}

.info-header .if-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 6px;
}

.info-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.info-header .if-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.info-cat-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s var(--ease);
}

.info-cat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.info-cat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.info-cat-icon {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-cat-icon svg {
  width: 20px; height: 20px;
  color: white;
}

.info-cat-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.info-cat-title-en {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}

.info-cat-body {
  padding: 8px 18px 16px;
}

.info-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-entry:last-child {
  border-bottom: none;
}

.info-entry-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-entry-title::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.info-entry-content {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: 12px;
}

/* ============================================
   准备页面 — Tab 切换 + 内容区
   ============================================ */

/* 导航返回链接 */
.nav-back {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-back:hover { color: white; }
.nav-back svg { width: 18px; height: 18px; }

.nav-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: white;
}

/* Tab 切换栏 */
.prep-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 48px;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.prep-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1.5px solid transparent;
  transition: all 0.3s var(--ease);
}

.prep-tab:hover {
  background: white;
  color: var(--text-primary);
}

.prep-tab.active {
  background: var(--text-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.prep-tab svg {
  width: 18px; height: 18px;
}

.tab-badge {
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.68rem;
  background: rgba(0,0,0,0.08);
  color: var(--text-muted);
}

.prep-tab.active .tab-badge {
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

/* 内容区 */
.prep-section {
  display: none;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 48px 24px;
  animation: fadeInUp 0.4s var(--ease) both;
}

.prep-section.active {
  display: block;
}

.prep-section-header {
  margin-bottom: 32px;
}

.prep-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 8px;
}

.prep-section-header h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.prep-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* 准备页面内容区使用更大的网格 */
.prep-section .checklist-grid {
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.prep-section .tips-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.prep-section .info-grid {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

/* 底部返回按钮 */
.prep-footer {
  display: flex;
  justify-content: center;
  padding: 32px 48px 64px;
}

.prep-back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 100px;
  background: var(--text-primary);
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s var(--ease);
}

.prep-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.prep-back-btn svg {
  width: 18px; height: 18px;
}

/* 侧边栏 CTA 链接样式修正 */
a.sidebar-tips-cta {
  text-decoration: none;
  color: inherit;
}

/* ============================================
   响应式
   ============================================ */
@media (max-width: 1024px) {
  .main {
    grid-template-columns: 1fr;
    height: auto;
  }

  .map-wrap {
    height: 55vh;
    min-height: 400px;
  }

  .sidebar {
    border-left: none;
    border-top: 1px solid var(--border);
    height: auto;
    max-height: 70vh;
  }

  .nav-meta { display: none; }
  .nav-brand { font-size: 1rem; }
  .nav-link { padding: 6px 12px; font-size: 0.78rem; }

  .prep-tabs { padding: 12px 24px; overflow-x: auto; }
  .prep-section { padding: 32px 24px 24px; }
  .prep-section .checklist-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .top-nav { padding: 0 16px; }
  .nav-brand { font-size: 0.9rem; }
  .nav-link span { display: none; }
  .nav-link { padding: 8px; }
  .nav-link svg { width: 18px; height: 18px; }

  .main { grid-template-columns: 1fr; }
  .map-wrap { height: 45vh; min-height: 300px; }
  .sidebar { max-height: 60vh; }

  .day-tabs { padding: 12px; gap: 6px; }
  .day-tab { padding: 10px 4px; }
  .day-tab .tab-day { font-size: 1.2rem; }
  .day-header { padding: 16px 16px 12px; }
  .timeline { padding: 8px 16px 32px; }
  .free-day-banner { margin: 8px 16px 12px; }

  .detail-overlay { padding: 16px; }
  .detail-card { border-radius: var(--r-lg); }
  .detail-image-wrap { height: 200px; }
  .detail-title-wrap h2 { font-size: 1.4rem; }
  .detail-body { padding: 18px 20px 24px; }
  .detail-info-grid { grid-template-columns: 1fr; }
  .transport-legend { flex-wrap: wrap; border-radius: var(--r-md); }

  .prep-section { padding: 24px 16px; }
  .prep-section h2 { font-size: 1.5rem; }
  .prep-section .tips-grid { grid-template-columns: 1fr; }
  .prep-section .info-grid { grid-template-columns: 1fr; }
  .prep-tabs { padding: 10px 16px; }
  .prep-tab { padding: 10px 16px; font-size: 0.8rem; }
  .prep-footer { padding: 24px 16px 48px; }
}
