:root {
  --parchment: #F5F0E8;
  --ivory: #FAF9F5;
  --border-cream: #E8E6DC;
  --border-warm: #D1CFC5;
  --terracotta: #C96442;
  --terracotta-soft: rgba(201, 100, 66, 0.11);
  --route-blue: #4A7C8A;
  --route-blue-soft: rgba(74, 124, 138, 0.12);
  --food-amber: #B8860B;
  --food-amber-soft: rgba(184, 134, 11, 0.12);
  --stay-olive: #6B7C5E;
  --stay-olive-soft: rgba(107, 124, 94, 0.13);
  --alert-rust: #A0522D;
  --warm-stone: #8A7E6B;
  --ink: #2C2C2C;
  --ink-muted: #57534E;
  --done-green: #1F6E43;
  --done-green-bg: #E6F4EC;

  --font-serif: "Playfair Display", "Noto Serif SC", "PingFang TC", "Songti SC", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Noto Serif SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-card: 0 4px 20px rgba(68, 56, 40, 0.06);
  --shadow-float: 0 12px 36px rgba(44, 36, 28, 0.14);
  --radius-lg: 14px;
  --radius-md: 10px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  background-color: var(--parchment);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(201, 100, 66, 0.06), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(74, 124, 138, 0.06), transparent 45%),
    repeating-linear-gradient(
      -45deg,
      rgba(138, 126, 107, 0.022) 0px,
      rgba(138, 126, 107, 0.022) 2px,
      transparent 2px,
      transparent 8px
    );
  min-height: 100dvh;
}

button, input, select, textarea {
  font-family: inherit;
  touch-action: manipulation;
}

a {
  color: var(--route-blue);
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* ==========================================
   1. 私密口令解锁屏
   ========================================== */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 20%, rgba(201, 100, 66, 0.09), transparent 55%),
    var(--parchment);
  overflow-y: auto;
}

.lock-card {
  width: 100%;
  max-width: 410px;
  background: var(--ivory);
  border: 1px solid var(--border-warm);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow-float);
}

.lock-double-frame {
  border: 2px solid var(--terracotta);
  outline: 1px solid rgba(201, 100, 66, 0.35);
  outline-offset: -6px;
  border-radius: 12px;
  padding: 24px 20px 20px;
  text-align: center;
}

.compass-svg {
  color: var(--warm-stone);
  display: block;
  margin: 0 auto;
}

.lock-compass {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
}

.lock-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--warm-stone);
  margin-bottom: 6px;
}

.lock-title {
  font-family: var(--font-serif);
  font-size: 23px;
  margin: 0 0 8px;
  color: var(--ink);
}

.lock-subtitle {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
}

.lock-subtitle span {
  font-size: 12px;
  color: var(--warm-stone);
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}

.pin-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--terracotta);
  background: transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.pin-dot.filled {
  background: var(--terracotta);
  transform: scale(1.12);
}

.pin-dots.shake {
  animation: shakeAnim 0.36s ease;
}

@keyframes shakeAnim {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(8px); }
  75% { transform: translateX(-5px); }
}

.lock-error {
  font-size: 12.5px;
  color: #B91C1C;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 12px;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 280px;
  margin: 0 auto 16px;
}

.pin-key {
  height: 50px;
  border-radius: 12px;
  border: 1px solid var(--border-warm);
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.pin-key:active {
  transform: scale(0.95);
  background: var(--terracotta-soft);
}

.pin-key-muted {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--warm-stone);
  background: var(--parchment);
}

.lock-nickname-row {
  border-top: 1px dashed var(--border-warm);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.lock-nickname-row label {
  font-size: 12px;
  color: var(--warm-stone);
}

.lock-nickname-row input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  background: #FFF;
  font-size: 14px;
}

/* ==========================================
   2. 顶部悬浮控制台 & 按天胶囊栏
   ========================================== */
.interactive-toolbar {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: rgba(250, 249, 245, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-warm);
  box-shadow: 0 2px 14px rgba(44, 36, 28, 0.05);
}

.toolbar-top-row {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #FFF;
  background: var(--terracotta);
  padding: 3px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink);
  white-space: nowrap;
}

.view-switcher {
  display: flex;
  background: var(--parchment);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-cream);
  gap: 2px;
}

.view-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.view-tab.active {
  background: var(--ivory);
  color: var(--terracotta);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-warm);
  background: #FFF;
  font-size: 12px;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9CA3AF;
}

.sync-dot.synced { background: #16A34A; }
.sync-dot.syncing { background: #D97706; animation: pulseDot 1s infinite; }
.sync-dot.offline { background: #DC2626; }

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.icon-action-btn {
  border: 1px solid var(--border-warm);
  background: #FFF;
  color: var(--ink);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.icon-action-btn:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

.day-pill-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 16px 8px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.day-pill-bar::-webkit-scrollbar {
  display: none;
}

.day-pill {
  flex: 0 0 auto;
  border: 1px solid var(--border-warm);
  background: var(--ivory);
  color: var(--ink-muted);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.day-pill small {
  font-weight: 400;
  opacity: 0.8;
  margin-left: 3px;
}

.day-pill.active {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: #FFF;
}

/* ==========================================
   3. 主容器 & 封面
   ========================================== */
.main-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 16px 96px;
}

.editorial-cover {
  background: var(--ivory);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-warm);
  margin-bottom: 24px;
}

.cover-outer-border {
  border: 2px solid var(--terracotta);
  padding: 5px;
  border-radius: 10px;
}

.cover-inner-border {
  border: 1px solid rgba(201, 100, 66, 0.42);
  border-radius: 7px;
  padding: 24px 22px;
  text-align: center;
}

.cover-header-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--warm-stone);
  border-bottom: 1px solid var(--border-cream);
  padding-bottom: 10px;
  margin-bottom: 18px;
  gap: 8px;
  flex-wrap: wrap;
}

.cover-compass {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

.cover-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}

.cover-subtitle {
  font-size: 14.5px;
  color: var(--warm-stone);
  letter-spacing: 0.08em;
  margin: 0 0 18px;
}

/* 同行实时公告栏 */
.shared-bulletin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: #FFFDF7;
  border: 1px dashed var(--food-amber);
  border-left: 4px solid var(--food-amber);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 auto 20px;
  max-width: 880px;
  font-size: 13.5px;
}

.shared-bulletin-text {
  flex: 1;
  color: var(--ink);
}

/* 虚线打孔登机牌 */
.boarding-pass {
  position: relative;
  max-width: 880px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F7F4EC 100%);
  border: 1px solid var(--border-warm);
  border-radius: 12px;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(44, 36, 28, 0.05);
}

.bp-top {
  background: var(--route-blue);
  color: #FFF;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.bp-body {
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.bp-code {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.bp-city {
  font-size: 12.5px;
  color: var(--warm-stone);
}

.bp-arrow {
  font-family: var(--font-mono);
  color: var(--terracotta);
  font-size: 13px;
  text-align: center;
}

.bp-stub {
  border-left: 2px dashed var(--border-warm);
  padding-left: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
}

.bp-stub strong {
  display: block;
  color: var(--done-green);
  font-size: 12.5px;
  margin-bottom: 3px;
}

/* 核心指标网格 */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
}

.metric-card {
  background: var(--parchment);
  border: 1px solid var(--border-cream);
  border-radius: 10px;
  padding: 12px 14px;
}

.metric-card.luggage-alert {
  grid-column: span 4;
  background: rgba(201, 100, 66, 0.08);
  border-color: rgba(201, 100, 66, 0.35);
  border-left: 4px solid var(--terracotta);
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--warm-stone);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-value {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  margin-top: 2px;
}

/* ==========================================
   4. 通用章节卡片 & 双模交互地图
   ========================================== */
.section-card {
  background: var(--ivory);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-card);
}

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  font-weight: 600;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 21px;
  margin: 2px 0 0;
  color: var(--ink);
}

.map-engine-tabs {
  display: flex;
  gap: 4px;
  background: var(--parchment);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border-cream);
}

.map-mode-btn {
  border: none;
  background: transparent;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
}

.map-mode-btn.active {
  background: #FFF;
  color: var(--route-blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.map-day-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.map-day-chips::-webkit-scrollbar { display: none; }

.map-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border-warm);
  background: #FFF;
  color: var(--ink-muted);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.map-chip.active {
  background: var(--route-blue);
  border-color: var(--route-blue);
  color: #FFF;
}

.map-stage-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-warm);
  background: #EAE4D7;
}

.leaflet-stage {
  width: 100%;
  height: 430px;
  z-index: 1;
}

.vector-stage {
  width: 100%;
  min-height: 430px;
  background: #F3EDE0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.map-caption {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--warm-stone);
}

/* 自定义地图编号标记 */
.tw-pin-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #FFF;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  border: 2px solid #FFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
}

.tw-pin-marker.transport-pin {
  background: var(--route-blue);
}

.tw-pin-marker.food-pin {
  background: var(--food-amber);
}

.tw-pin-marker.hotel-pin {
  background: var(--stay-olive);
}

/* ==========================================
   5. 行前提醒 & 夜市对齐双栏
   ========================================== */
.overview-two-col {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 20px;
}

.reminders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reminder-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-cream);
  background: #FFF;
  transition: opacity 0.15s;
}

.reminder-item.done {
  background: var(--parchment);
  opacity: 0.72;
}

.reminder-item.done .rem-title {
  text-decoration: line-through;
  color: var(--warm-stone);
}

.reminder-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--done-green);
  cursor: pointer;
  flex-shrink: 0;
}

.rem-content {
  flex: 1;
  min-width: 0;
}

.rem-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.rem-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 3px;
}

.rem-deadline {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
  margin-right: 6px;
}

.night-market-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nm-row {
  padding: 9px 12px;
  border-radius: 9px;
  background: #FFF;
  border: 1px solid var(--border-cream);
  border-left: 3.5px solid var(--food-amber);
  font-size: 13px;
}

.nm-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
}

.nm-status {
  font-size: 11.5px;
  color: var(--done-green);
  font-weight: 600;
}

.nm-sub {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* ==========================================
   6. 每日章节 (Day Chapters)
   ========================================== */
.day-chapter {
  background: var(--ivory);
  border: 1px solid var(--border-warm);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.day-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--border-cream);
  padding-bottom: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.day-stamp-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.day-stamp {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 2px solid var(--terracotta);
  background: var(--terracotta-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--terracotta);
  font-family: var(--font-mono);
}

.day-stamp span {
  font-size: 10px;
  letter-spacing: 0.1em;
}

.day-stamp strong {
  font-size: 22px;
  line-height: 1.05;
}

.day-title-wrap h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 4px;
  color: var(--ink);
}

.day-subline {
  font-size: 13.5px;
  color: var(--ink-muted);
}

.day-stay-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--stay-olive-soft);
  color: var(--stay-olive);
  font-size: 12px;
  font-weight: 600;
}

.day-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  background: var(--parchment);
  border: 1px solid var(--border-cream);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.day-stat-cell span {
  display: block;
  font-size: 11px;
  color: var(--warm-stone);
  font-family: var(--font-mono);
}

.day-stat-cell strong {
  color: var(--ink);
  font-weight: 600;
}

/* 首字下沉文学叙事 */
.day-narrative {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.8;
  margin: 0 0 20px;
  padding: 0 4px;
}

.day-narrative::first-letter {
  float: left;
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 0.92;
  font-weight: 900;
  color: var(--terracotta);
  padding-right: 10px;
  padding-top: 4px;
}

/* 分时段交互时间轴 */
.timeline-list {
  position: relative;
  padding-left: 20px;
  margin-bottom: 18px;
}

.timeline-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--route-blue) 0px,
    var(--route-blue) 5px,
    transparent 5px,
    transparent 10px
  );
}

.stop-card {
  position: relative;
  background: #FFFFFF;
  border: 1px solid var(--border-cream);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.stop-card:hover {
  border-color: var(--border-warm);
  box-shadow: 0 4px 14px rgba(44, 36, 28, 0.06);
}

.stop-card::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ivory);
  border: 2.5px solid var(--route-blue);
}

.stop-top-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  padding-right: 68px;
}

.stop-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--parchment);
  padding: 2px 8px;
  border-radius: 6px;
}

.cat-badge {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.cat-大交通 { background: #DBEAFE; color: #1E40AF; }
.cat-市内交通 { background: #E0E7FF; color: #3730A3; }
.cat-早餐 { background: #FEF3C7; color: #92400E; }
.cat-餐饮\/夜市 { background: #FFEDD5; color: #9A3412; }
.cat-景点游玩 { background: #DCFCE7; color: #166534; }
.cat-酒店\/休整 { background: #F3E8FF; color: #6B21A8; }
.cat-购物\/伴手礼 { background: #FCE7F3; color: #9D174D; }

/* 对角线角标 */
.stop-corner-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.stop-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 5px;
}

.stop-detail {
  font-size: 13.8px;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

.stop-note {
  font-size: 12.8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #F8FAFC;
  border-left: 3px solid var(--route-blue);
  color: #334155;
  margin-bottom: 10px;
}

.stop-note.is-done {
  background: var(--done-green-bg);
  border-left-color: var(--done-green);
  color: #14532D;
  font-weight: 500;
}

.stop-note.is-warn {
  background: #FFFBEB;
  border-left-color: #D97706;
  color: #92400E;
  font-weight: 600;
}

.stop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.stop-nav-links, .stop-edit-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-warm);
  background: var(--ivory);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.chip-btn:hover {
  border-color: var(--route-blue);
  color: var(--route-blue);
}

.chip-btn.nav-primary {
  background: var(--route-blue-soft);
  border-color: rgba(74, 124, 138, 0.35);
  color: var(--route-blue);
  font-weight: 600;
}

.mini-edit-btn {
  border: 1px solid rgba(201, 100, 66, 0.38);
  background: var(--terracotta-soft);
  color: var(--terracotta);
  border-radius: 7px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.mini-edit-btn:hover {
  background: var(--terracotta);
  color: #FFF;
}

/* 每日美食与贴士与同行实时手记 */
.day-extras-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.food-box {
  background: #FFFDF9;
  border: 1px solid var(--border-cream);
  border-left: 4px solid var(--food-amber);
  border-radius: 10px;
  padding: 12px 14px;
}

.food-box h4, .tips-box h4, .day-memo-box h4 {
  margin: 0 0 8px;
  font-size: 13.5px;
  color: var(--ink);
}

.food-item {
  font-size: 12.8px;
  margin-bottom: 6px;
  color: var(--ink-muted);
}

.food-item strong {
  color: var(--ink);
}

.tips-box {
  background: #FDF8F5;
  border: 1px solid rgba(160, 82, 45, 0.25);
  border-left: 4px solid var(--alert-rust);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.8px;
  color: var(--ink-muted);
}

.day-memo-box {
  margin-top: 14px;
  background: #FFF;
  border: 1.5px dashed var(--border-warm);
  border-radius: 10px;
  padding: 12px 14px;
}

.day-memo-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.day-memo-input {
  flex: 1;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--border-cream);
  border-radius: 8px;
  font-size: 13.5px;
  background: var(--ivory);
  resize: vertical;
}

/* ==========================================
   7. 紧凑速查表视图（桌面宽表 / 手机卡片流零横滑）
   ========================================== */
.table-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFF;
  border: 1px solid var(--border-warm);
  border-radius: 10px;
  padding: 8px 12px;
}

.search-input-wrap input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  background: transparent;
}

.category-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-filter-bar::-webkit-scrollbar { display: none; }

.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #FFF;
  border-radius: 10px;
  overflow: hidden;
}

.compact-table th {
  background: #2C5282;
  color: #FFF;
  padding: 10px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 12.5px;
}

.compact-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-cream);
  vertical-align: top;
}

.compact-table tr:hover td {
  background: #FAF8F3;
}

/* ==========================================
   8. 酒店 & 票夹视图
   ========================================== */
.vault-hotels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.hotel-vault-card {
  background: #FFF;
  border: 1px solid var(--border-cream);
  border-left: 4px solid var(--stay-olive);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hv-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.hv-dates {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--stay-olive);
}

.hv-status {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--done-green-bg);
  color: var(--done-green);
  padding: 2px 8px;
  border-radius: 999px;
}

.hv-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.hv-addr {
  font-size: 13px;
  color: var(--ink);
  background: var(--parchment);
  padding: 6px 10px;
  border-radius: 7px;
  font-weight: 500;
}

.hv-meta {
  font-size: 12.8px;
  color: var(--ink-muted);
}

.vault-tip {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0 0 14px;
}

.vault-tickets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-vault-card {
  background: #FFF;
  border: 1px solid var(--border-cream);
  border-left: 4px solid var(--route-blue);
  border-radius: 12px;
  padding: 14px 16px;
}

.tv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.tv-date {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--route-blue);
}

.tv-title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 4px;
}

.tv-detail {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--terracotta);
  margin-bottom: 6px;
}

.tv-how {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

/* 深度文化与附录 */
.deep-dives-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.deep-card {
  background: #FFF;
  border: 1px solid var(--border-cream);
  border-radius: 10px;
  padding: 16px;
}

.deep-card small {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--terracotta);
  letter-spacing: 0.08em;
}

.deep-card h3 {
  font-family: var(--font-serif);
  font-size: 16.5px;
  margin: 4px 0 8px;
}

.deep-card p {
  font-size: 13px;
  color: var(--ink-muted);
  margin: 0;
}

.emergency-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 12px 0 16px;
}

.emerg-box {
  background: #FFF;
  border: 1px solid var(--border-cream);
  border-radius: 9px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.emerg-box strong {
  font-family: var(--font-mono);
  color: var(--terracotta);
  font-size: 14px;
}

.japan-customs-alert {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-left: 4px solid #DC2626;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #7F1D1D;
}

.back-cover {
  text-align: center;
  padding: 28px 16px 12px;
  color: var(--warm-stone);
}

.back-cover-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.back-cover-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* ==========================================
   9. 弹窗 Modal & 司机问路大字卡 & Toast
   ========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(28, 24, 20, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overscroll-behavior: contain;
}

.modal-panel {
  width: 100%;
  max-width: 540px;
  max-height: 90dvh;
  background: var(--ivory);
  border-radius: 16px;
  border: 1px solid var(--border-warm);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-cream);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #FFF;
}

.modal-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
}

.modal-close-btn {
  border: none;
  background: var(--parchment);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
}

.modal-body {
  padding: 18px;
  overflow-y: auto;
}

.form-field {
  margin-bottom: 12px;
}

.form-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-warm);
  border-radius: 8px;
  background: #FFF;
  font-size: 14px;
  color: var(--ink);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-footer-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-cream);
}

.btn-primary {
  background: var(--terracotta);
  color: #FFF;
  border: none;
  padding: 9px 18px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: #FFF;
  color: var(--ink);
  border: 1px solid var(--border-warm);
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  cursor: pointer;
}

.btn-danger {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* 出租车司机繁体大字卡 */
.driver-card-big {
  background: #FFF;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
}

.driver-card-big .dc-tag {
  font-size: 13px;
  color: var(--terracotta);
  font-weight: 700;
  margin-bottom: 8px;
}

.driver-card-big .dc-name {
  font-size: 28px;
  font-weight: 900;
  color: #000;
  line-height: 1.25;
  margin-bottom: 10px;
}

.driver-card-big .dc-addr {
  font-size: 22px;
  font-weight: 700;
  color: #1E3A8A;
  background: #EFF6FF;
  padding: 12px;
  border-radius: 10px;
  line-height: 1.4;
}

.toast-bar {
  position: fixed;
  bottom: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  background: rgba(30, 27, 24, 0.92);
  color: #FFF;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

/* ==========================================
   10. 手机端自适应优化 (< 820px)
   ========================================== */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 820px) {
  .hide-sm {
    display: none !important;
  }

  .view-switcher {
    display: none;
  }

  .main-container {
    padding: 12px 10px 88px;
  }

  .section-card, .day-chapter {
    padding: 16px 14px;
  }

  .cover-inner-border {
    padding: 18px 12px;
  }

  .bp-body {
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
  }

  .bp-stub {
    grid-column: span 3;
    border-left: none;
    border-top: 1.5px dashed var(--border-warm);
    padding-left: 0;
    padding-top: 10px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-card.luggage-alert {
    grid-column: span 2;
  }

  .overview-two-col,
  .day-extras-grid,
  .vault-hotels-grid,
  .deep-dives-grid,
  .emergency-grid {
    grid-template-columns: 1fr;
  }

  .day-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .leaflet-stage, .vector-stage {
    height: 310px;
    min-height: 310px;
  }

  .stop-top-row {
    padding-right: 0;
  }

  .stop-corner-ribbon {
    position: static;
    display: inline-block;
  }

  /* 手机端紧凑表格自动转为无横滑竖排流式卡片 */
  .compact-table thead {
    display: none;
  }

  .compact-table, .compact-table tbody, .compact-table tr, .compact-table td {
    display: block;
    width: 100%;
  }

  .compact-table tr {
    border: 1px solid var(--border-warm);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #FFF;
  }

  .compact-table td {
    padding: 3px 0;
    border: none;
  }

  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1300;
    background: rgba(250, 249, 245, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-warm);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(44, 36, 28, 0.07);
  }

  .mob-nav-btn {
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 600;
    color: var(--warm-stone);
    padding: 4px 0;
    cursor: pointer;
  }

  .mob-nav-btn.active {
    color: var(--terracotta);
  }

  .mob-icon {
    font-size: 18px;
    line-height: 1.1;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-panel {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
  }
}

/* ==========================================
   11. A4 杂志级打印与 PDF 导出样式
   ========================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 13mm;
  }

  body {
    background: #FFFFFF !important;
    font-size: 10.5pt;
  }

  .no-print,
  #lock-screen,
  .interactive-toolbar,
  .mobile-bottom-bar,
  .stop-actions {
    display: none !important;
  }

  #app-shell,
  #view-magazine {
    display: block !important;
  }

  #view-table,
  #view-vault {
    display: none !important;
  }

  .main-container {
    max-width: 100%;
    padding: 0;
  }

  .day-chapter {
    break-before: page;
    box-shadow: none;
    border: 1px solid #D1CFC5;
  }

  .stop-card, .section-card, .boarding-pass {
    break-inside: avoid;
    box-shadow: none;
  }
}
