/* TravelForge SOTA UI — 2026 现代旅行美学 (亮色版)
   设计要点:
   - 米白主背景 + 翡翠绿强调 + 暖橙CTA, 像Airbnb/Wanderlog清爽风
   - 大留白 + 衬线标题 + 无衬线正文
   - 浅色渐变 + 柔和阴影
*/

:root {
  /* 背景层 - 三层微差才有立体感 */
  --bg-base: #eff2f7;          /* 主背景 — 比卡片明显深(slate-100级) */
  --bg-elevate: #ffffff;        /* 卡片(card-section) — 纯白浮起 */
  --bg-card: #f8fafc;           /* 嵌套卡片(date-window) — slate-50 微深, 跟内层white对比 */
  --bg-card-hover: #f1f5f9;     /* hover — slate-100 */
  --bg-glass: rgba(255, 255, 255, 0.82);  /* 玻璃顶栏 */

  /* 文字 - 深色族系 */
  --fg-primary: #0f172a;        /* 主文字 — slate-900 */
  --fg-secondary: #475569;      /* 次要 — slate-600 */
  --fg-muted: #94a3b8;          /* 弱化 — slate-400 */
  --fg-disabled: #cbd5e1;       /* 禁用 — slate-300 */

  /* 强调色 - 亮底版本(更深/更饱和才看得清) */
  --accent-aurora: #10b981;     /* 翡翠绿 - 主品牌 (替代极光绿) */
  --accent-aurora-light: #d1fae5;
  --accent-cta: #f97316;        /* 暖橙 - CTA */
  --accent-cta-light: #ffedd5;
  --accent-deep: #4f46e5;       /* 靛紫 - 链接/info (替代深空蓝) */
  --accent-deep-light: #e0e7ff;
  --accent-warn: #d97706;       /* 暖琥珀 - 警告 */
  --accent-warn-light: #fef3c7;
  --accent-pink: #db2777;       /* 玫红 - tag */

  /* 边框 - 实体slate族系(rgba太弱看不见) */
  --border-subtle: #e2e8f0;     /* slate-200 — 默认边框 */
  --border-stronger: #cbd5e1;   /* slate-300 — 强边框 */

  /* ===== SOTA-R1 设计标尺(全工程必须用 token 不能硬编码) ===== */

  /* 圆角 6 档 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* 字号 9 档 (Tailwind 风) */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
  --fs-2xl: 22px;
  --fs-3xl: 28px;
  --fs-display: 48px;

  /* 间距 8 档 (8 基线) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* 灰度 10 档 (slate 系列, 暗模式时反转) */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* 语义色 */
  --color-success: #10b981;
  --color-success-bg: #d1fae5;
  --color-warning: #d97706;
  --color-warning-bg: #fef3c7;
  --color-danger:  #dc2626;
  --color-danger-bg: #fee2e2;
  --color-info: #4f46e5;
  --color-info-bg: #e0e7ff;
  --color-vip-bg: linear-gradient(135deg, #fbbf24, #d97706);

  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;

  /* 阴影 5 档 */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-card-strong: 0 2px 4px rgba(15, 23, 42, 0.1), 0 14px 36px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 4px 12px rgba(16, 185, 129, 0.18), 0 16px 40px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 0 0 2px var(--accent-aurora), 0 0 20px rgba(16, 185, 129, 0.2);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.5);

  /* 渐变 token */
  --grad-hero: linear-gradient(135deg, #4338ca 0%, #6366f1 45%, #10b981 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-danger: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  --grad-info: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  --grad-warm: linear-gradient(135deg, #fef3c7, #fde68a);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

/* ===== SOTA-R4 暗色模式: 用户/浏览器偏好任一为 dark 都生效; [data-theme] 可手动覆盖 ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-base: #0b0f1a;
    --bg-elevate: #161b2c;
    --bg-card: #1c2236;
    --bg-card-hover: #232a40;
    --bg-glass: rgba(22, 27, 44, 0.82);
    --fg-primary: #f1f5f9;
    --fg-secondary: #cbd5e1;
    --fg-muted: #94a3b8;
    --fg-disabled: #475569;
    --border-subtle: #2a3148;
    --border-stronger: #3a4361;
    --color-success-bg: rgba(16, 185, 129, 0.18);
    --color-warning-bg: rgba(217, 119, 6, 0.18);
    --color-danger-bg: rgba(220, 38, 38, 0.18);
    --color-info-bg: rgba(79, 70, 229, 0.18);
  }
}
[data-theme="dark"] {
  --bg-base: #0b0f1a;
  --bg-elevate: #161b2c;
  --bg-card: #1c2236;
  --bg-card-hover: #232a40;
  --bg-glass: rgba(22, 27, 44, 0.82);
  --fg-primary: #f1f5f9;
  --fg-secondary: #cbd5e1;
  --fg-muted: #94a3b8;
  --fg-disabled: #475569;
  --border-subtle: #2a3148;
  --border-stronger: #3a4361;
  --color-success-bg: rgba(16, 185, 129, 0.18);
  --color-warning-bg: rgba(217, 119, 6, 0.18);
  --color-danger-bg: rgba(220, 38, 38, 0.18);
  --color-info-bg: rgba(79, 70, 229, 0.18);
}

/* ===== SOTA-R3 可复用组件 class (替代 inline style) ===== */

/* hero-gradient: 紫蓝绿渐变 hero (推广: /me, /admin, /history, /settings) */
.hero-gradient {
  margin: var(--space-4) 0 var(--space-6);
  padding: var(--space-8) var(--space-8) var(--space-6);
  background: var(--grad-hero);
  border-radius: var(--radius-xl);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px -8px rgba(67, 56, 202, 0.35);
}
.hero-gradient::before,
.hero-gradient::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.06);
}
.hero-gradient::before { top: -40px; right: -40px; width: 200px; height: 200px; background: rgba(255, 255, 255, 0.08); }
.hero-gradient::after { bottom: -60px; left: -30px; width: 160px; height: 160px; }
.hero-gradient > * { position: relative; z-index: 1; }
.hero-eyebrow { font-size: var(--fs-sm); opacity: 0.85; letter-spacing: 1.5px; margin-bottom: 4px; }
.hero-title { margin: 0; font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.hero-subtitle { margin-top: 6px; font-size: var(--fs-base); opacity: 0.92; }
.hero-badge {
  background: rgba(255, 255, 255, 0.22); backdrop-filter: blur(8px);
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.5px;
  white-space: nowrap;
}
.hero-badge-vip {
  background: var(--color-vip-bg);
  padding: 5px 14px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.5px;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}
.hero-kpi { display: flex; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-2); }
.hero-kpi-label { font-size: var(--fs-xs); opacity: 0.85; letter-spacing: 1px; }
.hero-kpi-value-big { font-size: var(--fs-display); font-weight: 800; letter-spacing: -1.5px; line-height: 1; }
.hero-kpi-value-sm { font-size: var(--fs-2xl); font-weight: 700; }

/* kpi-grid + kpi-card: 大数字 KPI 卡片网格 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
}
.kpi-card { padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); }
.kpi-card .kpi-value { font-size: var(--fs-3xl); font-weight: 800; line-height: 1; }
.kpi-card .kpi-label { font-size: var(--fs-xs); color: var(--fg-secondary); margin-top: 6px; letter-spacing: 0.3px; }
.kpi-card.kpi-info     { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.kpi-card.kpi-success  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.kpi-card.kpi-warning  { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.kpi-card.kpi-danger   { background: linear-gradient(135deg, #fef2f2, #fecaca); }
.kpi-card.kpi-info    .kpi-value { color: var(--color-info); }
.kpi-card.kpi-success .kpi-value { color: var(--color-success); }
.kpi-card.kpi-warning .kpi-value { color: var(--color-warning); }
.kpi-card.kpi-danger  .kpi-value { color: var(--color-danger); }

/* action-grid + action-tile: 大方块快捷操作 */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.action-tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
  padding: var(--space-5);
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--fg-primary);
  transition: var(--transition-fast);
  box-shadow: var(--shadow-xs);
  text-align: center;
}
.action-tile:hover {
  border-color: var(--color-info);
  box-shadow: 0 8px 24px -6px rgba(79, 70, 229, 0.25);
  transform: translateY(-2px);
}
.action-tile .action-icon { font-size: 26px; }
.action-tile .action-title { font-weight: 600; font-size: var(--fs-base); }
.action-tile .action-desc { font-size: var(--fs-xs); color: var(--fg-muted); text-align: center; }
.action-tile.action-danger { border-color: #fecaca; color: var(--color-danger); }
.action-tile.action-danger:hover {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
  box-shadow: 0 8px 24px -6px rgba(220, 38, 38, 0.3);
}
.action-tile.action-danger .action-desc { color: #fca5a5; }
.action-tile.action-success:hover { border-color: var(--color-success); box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.25); }
.action-tile.action-warning:hover { border-color: var(--color-warning); box-shadow: 0 8px 24px -6px rgba(245, 158, 11, 0.25); }

/* 主题切换按钮 (供导航用) */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  cursor: pointer;
  color: var(--fg-secondary);
  font-size: var(--fs-sm);
  transition: var(--transition-fast);
}
.theme-toggle:hover { border-color: var(--color-info); color: var(--color-info); }

/* ===== SOTA-R2 nav dropdown (无 JS, 用 <details>) ===== */
.nav-dropdown {
  position: relative;
}
.nav-dropdown > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown[open] > summary { color: var(--color-info); }

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: var(--space-2);
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-strong);
  z-index: 200;
  animation: dropdown-in 0.15s ease;
}
.nav-dropdown-panel-right { left: auto; right: 0; }
@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-item {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: var(--fg-primary);
  text-decoration: none;
  transition: background 0.15s;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.nav-dropdown-item:hover { background: var(--bg-card-hover); color: var(--color-info); }
.nav-dropdown-item-danger { color: var(--color-danger); }
.nav-dropdown-item-danger:hover { background: var(--color-danger-bg); color: var(--color-danger); }
.nav-dropdown-item-admin { color: var(--color-danger); font-weight: 600; }
.nav-dropdown-header {
  padding: 10px 14px var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-2);
}
.nav-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-2) 0;
}

/* 账户头像 + 名称 */
/* Admin / 用户 dropdown — 已 SOTA 重设计 (跟其他 nav-link 一致, 灰色克制) */
.nav-link-account {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.nav-account-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--gray-100, #f1f5f9);
  color: var(--fg-secondary, #475569);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  border: 1px solid var(--border-subtle, #e2e8f0);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.nav-link-account:hover .nav-account-avatar {
  background: var(--bg-elevate, #fff);
  color: var(--color-info, #4f46e5);
  border-color: var(--color-info, #4f46e5);
}
/* Admin / VIP 用右下角小圆点表示, 不抢主视觉 */
.nav-account-avatar.is-admin::after,
.nav-account-avatar.is-vip::after {
  content: '';
  position: absolute;
  right: -1px; bottom: -1px;
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-elevate, #fff);
}
.nav-account-avatar.is-admin::after { background: var(--color-danger, #dc2626); }
.nav-account-avatar.is-vip::after   { background: var(--color-warning, #f59e0b); }
.nav-account-name {
  font-size: var(--fs-sm, 14px);
  color: inherit;
  font-weight: 500;
}

/* 登录 CTA */
.nav-link-cta {
  background: var(--grad-success);
  color: #fff !important;
  padding: 6px 16px !important;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.nav-link-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px -2px rgba(16, 185, 129, 0.4); }

/* 余额低时的警示条 */
.balance-bar-low {
  background: linear-gradient(90deg, var(--color-danger-bg), #fee2e2);
  padding: 8px var(--space-4);
  font-size: var(--fs-xs);
  color: var(--color-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  border-bottom: 1px solid #fecaca;
}
.balance-bar-low a {
  color: var(--color-danger);
  text-decoration: underline;
  font-weight: 600;
}

/* 移动端 drawer section header */
.mobile-drawer-section {
  padding: var(--space-3) var(--space-4) var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.mobile-drawer-link-admin { color: var(--color-danger) !important; font-weight: 600; }
.mobile-drawer-link-danger { color: var(--color-danger) !important; }

/* SOTA-R5 trip-tabs / trip-tab-pane / trip-tab-placeholder CSS 已整段删除 */
/* trip 页 4-tab 结构改成单页下滚 (扁平化), 小白滚动比点击更直觉 */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-base);
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(at 20% 0%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
    radial-gradient(at 80% 30%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
    radial-gradient(at 50% 100%, rgba(249, 115, 22, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* SOTA-R4: 暗色模式覆盖 — 替换 body 渐变为深色调 */
[data-theme="dark"] body {
  background-image:
    radial-gradient(at 20% 0%, rgba(16, 185, 129, 0.10) 0%, transparent 50%),
    radial-gradient(at 80% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(at 50% 100%, rgba(244, 63, 94, 0.06) 0%, transparent 50%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background-image:
      radial-gradient(at 20% 0%, rgba(16, 185, 129, 0.10) 0%, transparent 50%),
      radial-gradient(at 80% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
      radial-gradient(at 50% 100%, rgba(244, 63, 94, 0.06) 0%, transparent 50%);
  }
}

a { color: var(--accent-deep); text-decoration: none; transition: color var(--transition); }
a:hover { color: #6366f1; }

code, pre { font-family: var(--font-mono); font-size: 0.92em; }

/* ============ 顶栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-primary);
  font-weight: 700;
}

.logo:hover { color: var(--fg-primary); }

.logo-icon {
  font-size: 24px;
  color: var(--accent-aurora);
  filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.35));
}

.logo-text {
  font-size: 20px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a 0%, #10b981 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 11px;
  color: var(--fg-muted);
  padding: 2px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  margin-left: 4px;
}

/* ============ SOTA 重设计: 顶部 nav (小红书 web 风) ============ */
nav { display: flex; gap: 4px; align-items: center; }

.nav-link {
  position: relative;
  color: var(--fg-secondary, #475569);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--color-info, #4f46e5);
  background: var(--bg-card-hover, #f8fafc);
}

/* 当前页激活态 — 下方 2px 紫色横线, 不用色块 */
.nav-link.is-active {
  color: var(--color-info, #4f46e5);
  font-weight: 600;
  background: transparent;
}
.nav-link.is-active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--color-info, #4f46e5);
  border-radius: 2px;
  animation: nav-underline-grow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes nav-underline-grow {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

/* nav-caret: 工具 ▾ 的小箭头 */
.nav-caret {
  font-size: 9px;
  opacity: 0.6;
  margin-left: 3px;
  transition: transform 0.18s;
}
.nav-dropdown[open] .nav-caret { transform: rotate(180deg); opacity: 1; }

/* 账户 dropdown 推到最右 + 左侧加一条细灰分隔 */
.nav-dropdown.nav-dropdown-right {
  margin-left: auto;
  padding-left: 12px;
  position: relative;
}
.nav-dropdown.nav-dropdown-right::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 18px;
  background: var(--border-subtle, #e2e8f0);
}

/* ============ 主容器 ============ */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 32px 80px;
}

/* ============ Hero ============ */
.hero {
  text-align: center;
  margin-bottom: 80px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: var(--fg-primary);
}

.hero-title .hl {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ====== Hero Slogan (punchline + tagline + chips) ====== */
.hero-slogan-wrap {
  margin: 32px auto 28px;
  max-width: 720px;
  text-align: center;
}
/* punchline — 小红书 / ins 暖珊瑚风
   特征: 圆润字 + 暖灰主文 + 珊瑚粉装饰符 + 关键词加粉橙渐变胶囊高亮 (像 ins story 贴纸) */
.hero-punchline {
  font-family: "PingFang SC", "Hiragino Sans GB", var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: #5d5d5d;
  margin: 0 0 16px;
  line-height: 1.8;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-punchline .punch-orn {
  font-size: 14px;
  color: #ff6b7a;
  font-weight: 300;
  opacity: 0.7;
  letter-spacing: 0;
  line-height: 1;
}
.hero-punchline .punch-hl {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b7a 0%, #ff8e72 50%, #ffb6a3 100%);
  box-shadow: 0 3px 10px -2px rgba(255, 107, 122, 0.35);
  letter-spacing: 1px;
  white-space: nowrap;
  font-family: "PingFang SC", var(--font-sans);
  display: inline-block;
  transform: translateY(-1px);
}
[data-theme="dark"] .hero-punchline { color: #d4d4d4; }
@media (max-width: 640px) {
  .hero-punchline { font-size: 12.5px; gap: 6px; }
  .hero-punchline .punch-orn { font-size: 12px; }
  .hero-punchline .punch-hl { font-size: 11.5px; padding: 1px 8px; letter-spacing: 0.5px; }
}

/* ====== SOTA 数字驱动三栏统计卡 ====== */
.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  margin: 2px auto 12px;
  padding: 10px 22px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 6px 18px rgba(16, 185, 129, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 78px;
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-deep);
  letter-spacing: -0.5px;
  display: inline-flex;
  align-items: baseline;
  position: relative;
}
.stat-num .stat-plus {
  font-size: 18px;
  margin-left: 1px;
  opacity: 0.7;
  font-weight: 500;
}
.stat-num .stat-unit {
  font-size: 14px;
  margin-left: 2px;
  color: var(--fg-secondary);
  font-weight: 500;
}
.stat-num-accent {
  background: linear-gradient(120deg, transparent 0 35%, rgba(245, 158, 11, 0.28) 35% 100%);
  padding: 0 4px;
  border-radius: 4px;
}
.stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: 1.5px;
  font-weight: 500;
  text-transform: none;
  white-space: nowrap;
}
.stat-sep {
  width: 1px;
  height: 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(16, 185, 129, 0.25) 50%, transparent 100%);
}
@media (max-width: 640px) {
  .hero-stats { gap: 16px; padding: 14px 18px; }
  .stat { min-width: 70px; }
  .stat-num { font-size: 26px; }
  .stat-label { font-size: 10px; letter-spacing: 1px; }
  .stat-sep { height: 28px; }
}

.hero-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-chips li {
  font-size: 12px;
  font-weight: 500;
  color: #065f46;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  transition: all var(--transition);
}
.hero-chips li:hover {
  background: rgba(16, 185, 129, 0.15);
  transform: translateY(-1px);
}

.hero-sub {
  font-size: 13px;
  color: var(--fg-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  letter-spacing: 0.3px;
}

.hero-sub strong {
  color: var(--accent-deep);
  font-weight: 600;
}

/* ============ 输入卡片 ============ */
.input-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-stronger);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
  max-width: 800px;
  margin: 0 auto;
  transition: box-shadow var(--transition);
}

.input-card:focus-within {
  box-shadow: var(--shadow-glow);
}

#plan-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.5;
  resize: none;
  padding: 8px 4px;
}

#plan-input::placeholder {
  color: var(--fg-muted);
}

.input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.example-label {
  color: var(--fg-muted);
  font-size: 13px;
  margin-right: 4px;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.chip:hover {
  background: var(--bg-card-hover);
  color: var(--fg-primary);
  border-color: var(--accent-aurora);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-cta) 0%, #ea580c 100%);
  color: white;
  border: none;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
}

.btn-primary:active { transform: translateY(0); }

/* 提交后按钮 — "生成方案中…" + 旋转图标 */
.btn-primary.btn-loading {
  opacity: 0.9;
  cursor: progress;
  pointer-events: none;
}
.btn-primary.btn-loading .btn-arrow {
  display: inline-block;
  animation: btn-spin 1.2s linear infinite;
}
@keyframes btn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  transition: transform var(--transition);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* ============ Status / Error ============ */
.status-bar {
  margin-top: 24px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent-deep);
  border-radius: var(--radius-md);
  color: var(--fg-secondary);
  font-size: 14px;
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.error-box {
  margin-top: 24px;
  padding: 16px 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #b91c1c;
  font-size: 14px;
}

/* ============ Features ============ */
.features {
  margin-bottom: 80px;
}

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

.feature-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

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

.feature-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.feature-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-bottom: 0;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  color: var(--fg-primary);
}

.feature-card p {
  font-size: 14px;
  color: var(--fg-secondary);
  line-height: 1.55;
}

.feature-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent-aurora);
  color: var(--bg-base);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
}

.feature-tag.pending {
  background: rgba(255, 255, 255, 0.08);
  color: var(--fg-muted);
}

/* ============ Principles ============ */
.principles {
  background:
    radial-gradient(ellipse at top left, rgba(16, 185, 129, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(245, 158, 11, 0.04) 0%, transparent 50%),
    var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

/* ====== Ins/小红书风 核心承诺卡 (空白收紧 - 用户反馈红圈太空) ====== */
.principles-ins {
  background: linear-gradient(180deg, #ffffff 0%, #fdfaf5 100%);
  border: 1px solid #f3ece2;
  border-radius: 20px;
  padding: 28px 28px 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.principles-head {
  text-align: center;
  margin-bottom: 22px;
}
.principles-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #c4a97d;
  padding: 3px 12px;
  background: #faf6ef;
  border-radius: 99px;
  margin-bottom: 8px;
}
.principles-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #1f2937;
  margin: 0 0 4px;
  line-height: 1.3;
}
.principles-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
  letter-spacing: 0.5px;
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.principle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 32px 28px 28px;
  border-radius: 20px;
  border: 0;
  box-shadow: 0 2px 12px -4px rgba(0,0,0,0.04);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s;
  overflow: hidden;
}
.principle::before {
  content: "";
  position: absolute;
  top: 14px; right: 14px;
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}
.principle:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.10);
}

/* 三色调 ⸻ Ins 经典莫兰迪三色 */
.principle-pink {
  background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
}
.principle-mint {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}
.principle-cream {
  background: linear-gradient(135deg, #fef9f3 0%, #fef3c7 100%);
}

/* emoji 大彩球 */
.principle-emoji {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 12px -2px rgba(0,0,0,0.06), inset 0 0 0 1px rgba(255,255,255,0.8);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.principle-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1f2937;
  margin: 4px 0 2px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.principle-desc {
  font-size: 13.5px;
  line-height: 1.85;
  letter-spacing: 0.3px;
  color: #475569;
  margin: 0;
  position: relative;
  z-index: 1;
}

.principle em {
  font-style: normal;
  font-weight: 600;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.6);
  padding: 1px 6px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
}

/* 底部小 chip 标签 — 强调温柔的承诺感 */
.principle-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  margin-top: auto;
  position: relative;
  z-index: 1;
}
.principle-pink .principle-chip { color: #be185d; }
.principle-mint .principle-chip { color: #047857; }
.principle-cream .principle-chip { color: #92400e; }

/* 移动端微调 */
@media (max-width: 640px) {
  .principles-ins { padding: 32px 20px; }
  .principles-title { font-size: 22px; }
  .principle { padding: 26px 22px 22px; }
  .principle-grid { gap: 14px; }
}

/* ============ Trip Pages ============ */
.trip-hero { margin-bottom: 40px; }

.back-link {
  display: inline-block;
  color: var(--fg-muted);
  font-size: 14px;
  margin-bottom: 16px;
  transition: color var(--transition);
}

.back-link:hover { color: var(--accent-aurora); }

.trip-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
/* 在 flex 容器内, 取消 back-link 自带的 margin 避免错位 */
.trip-meta .back-link { margin-bottom: 0; }

.trip-tag {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--fg-secondary);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 100px;
}

.trip-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.trip-title .city {
  background: linear-gradient(135deg, #0f172a 0%, var(--accent-aurora) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.trip-title .arrow {
  color: var(--accent-cta);
  font-weight: 400;
  font-size: 0.7em;
}

.trip-subline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-secondary);
  font-size: 15px;
  flex-wrap: wrap;
}

/* ============ Card Section ============ */
.card-section {
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-header .section-title {
  margin-bottom: 0;
}

.section-note {
  color: var(--fg-muted);
  font-size: 13px;
  max-width: 480px;
  text-align: right;
}

.source-tag {
  background: var(--bg-card);
  padding: 6px 12px;
  border-radius: 100px;
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ============ Date Window 卡片 ============ */
.date-windows {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.date-window {
  background: var(--bg-card);  /* slate-50,跟外层白对比 */
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
}

.date-window:hover {
  border-color: var(--accent-aurora);
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.window-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.window-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-aurora);
}

.window-dates {
  color: var(--fg-secondary);
  font-size: 14px;
  font-family: var(--font-mono);
}

.window-dates strong {
  color: var(--fg-primary);
}

/* ============ Deeplink Grid ============ */
.deeplink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.deeplink {
  background: #ffffff;  /* 纯白 — 在slate-50的date-window里再次浮起 */
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  transition: all var(--transition);
  color: var(--fg-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.deeplink:hover {
  border-color: var(--accent-cta);
  background: #ffffff;
  transform: translateY(-2px);
  color: var(--fg-primary);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.15), 0 2px 4px rgba(15, 23, 42, 0.06);
}

.dl-platform {
  font-size: 15px;
  font-weight: 600;
}

.dl-desc {
  font-size: 12px;
  color: var(--fg-muted);
}

.dl-arrow {
  position: absolute;
  top: 12px;
  right: 14px;
  color: var(--fg-muted);
  transition: all var(--transition);
}

.deeplink:hover .dl-arrow {
  color: var(--accent-cta);
  transform: translate(2px, -2px);
}

.deeplink.skyscanner { border-left: 3px solid #0770e3; }
.deeplink.google { border-left: 3px solid #4285f4; }
.deeplink.ctrip { border-left: 3px solid #2577e3; }
.deeplink.kayak { border-left: 3px solid #ff690f; }

/* ============ Insight Card ============ */
.insight-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  border-left: 4px solid var(--accent-aurora);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

/* ============ SOTA 价格洞察 ins 风 (白底 + 色彩 accent, 不用大色块) ============ */
.pricepilot {
  --sig: #4f46e5;
  --sig-soft: rgba(79, 70, 229, 0.08);
  --sig-soft2: rgba(79, 70, 229, 0.18);
  background: var(--bg-elevate, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.pricepilot.sig-good   { --sig: #059669; --sig-soft: rgba(16, 185, 129, 0.10); --sig-soft2: rgba(16, 185, 129, 0.22); }
.pricepilot.sig-urgent { --sig: #e11d48; --sig-soft: rgba(244, 63, 94, 0.08);  --sig-soft2: rgba(244, 63, 94, 0.20); }
.pricepilot.sig-wait   { --sig: #d97706; --sig-soft: rgba(245, 158, 11, 0.10); --sig-soft2: rgba(245, 158, 11, 0.22); }

.pricepilot-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 10px; flex-wrap: wrap;
}
.pricepilot-route {
  font-size: 13px; font-weight: 600; color: var(--fg-secondary, #475569);
  letter-spacing: 0.3px;
}
.pricepilot-chip {
  background: var(--sig-soft);
  color: var(--sig);
  padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 2px;
}

.pricepilot-num {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 2px; flex-wrap: wrap;
}
.pricepilot-amount {
  font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1;
  color: var(--sig);
  font-variant-numeric: tabular-nums;
}
.pricepilot-delta {
  font-size: 12px; font-weight: 600; color: var(--sig);
}
.pricepilot-delta small {
  color: var(--fg-muted, #94a3b8); font-weight: 500; margin-left: 3px;
}
.pricepilot-tagline {
  font-size: 13px; color: var(--fg-secondary, #475569);
  margin-bottom: 14px;
}

/* 价格条 — 浅灰底 + 信号色 fill */
.pricepilot-bar {
  position: relative; height: 6px;
  background: var(--gray-100, #f1f5f9);
  border-radius: 99px;
  margin-bottom: 6px;
}
.pricepilot-bar-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--sig-soft2) 0%, var(--sig) 100%);
  border-radius: 99px;
  opacity: 0.55;
}
.pricepilot-bar-median {
  position: absolute; top: -3px; width: 2px; height: 12px;
  background: var(--fg-muted, #94a3b8); opacity: 0.7;
}
.pricepilot-bar-pin {
  position: absolute; top: -4px; width: 14px; height: 14px;
  background: var(--sig);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
}
.pricepilot-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--fg-muted, #94a3b8);
  margin-top: 4px;
}
.pricepilot-bar-labels .mid {
  position: relative; flex: 1; text-align: center;
}
.pricepilot-bar-labels .cur { color: var(--sig); font-weight: 600; }

.pricepilot-advice {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--sig-soft);
  border-left: 3px solid var(--sig);
  border-radius: 8px;
  font-size: 12px; line-height: 1.6;
  color: var(--fg-primary, #0f172a);
}

.pricepilot-footer {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-top: 14px; flex-wrap: wrap;
}
.pricepilot-src {
  font-size: 10px; color: var(--fg-muted, #94a3b8);
}
.pricepilot-cta {
  padding: 8px 16px;
  background: var(--fg-primary, #0f172a);
  color: #fff; border: 0; border-radius: 999px;
  cursor: pointer; font-size: 12px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  display: inline-flex; align-items: center; gap: 4px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.pricepilot-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}
.pricepilot-cta .caret { transition: transform 0.18s; opacity: 0.85; }
.pricepilot.is-detail-open .pricepilot-cta .caret { transform: rotate(180deg); }

/* ============ 杂志式 Markdown 渲染 (SOTA阅读体验) ============ */
.insight-md {
  color: #334155;       /* slate-700, 比之前更深更易读 */
  line-height: 1.8;
  font-size: 15px;
}

/* h1 - 整篇大标题 */
.insight-md h1 {
  font-size: 26px;
  color: var(--fg-primary);
  font-weight: 700;
  margin: 28px 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-aurora);
  line-height: 1.3;
}
.insight-md h1:first-child { margin-top: 0; }

/* h2 - 整篇大章节标题(罗列卡片) */
.insight-md h2 {
  font-size: 20px;
  color: var(--fg-primary);
  font-weight: 700;
  margin: 32px 0 16px;
  padding: 14px 20px;
  background: linear-gradient(90deg, var(--accent-aurora-light) 0%, transparent 100%);
  border-left: 4px solid var(--accent-aurora);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  line-height: 1.4;
}

/* h3 - 三档分类(经济/舒适/豪华) — 重点卡片化 */
.insight-md h3 {
  font-size: 17px;
  color: var(--fg-primary);
  font-weight: 700;
  margin: 28px 0 14px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 50%, transparent 100%);
  border-left: 4px solid var(--accent-warn);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  line-height: 1.4;
}

/* 三档分类自动配色 — 用 :nth-of-type 区分 */
.insight-md h3:nth-of-type(1) {
  background: linear-gradient(90deg, var(--accent-aurora-light) 0%, #f0fdf4 50%, transparent 100%);
  border-left-color: var(--accent-aurora);
}
.insight-md h3:nth-of-type(2) {
  background: linear-gradient(90deg, var(--accent-deep-light) 0%, #f5f3ff 50%, transparent 100%);
  border-left-color: var(--accent-deep);
}
.insight-md h3:nth-of-type(3) {
  background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 50%, transparent 100%);
  border-left-color: var(--accent-warn);
}

/* h4 - 子标题(如"推荐区域与酒店") */
.insight-md h4 {
  font-size: 13px;
  color: var(--accent-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 22px 0 10px;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--accent-deep);
}

/* 段落 */
.insight-md p {
  margin: 0 0 14px 0;
  line-height: 1.85;
}

/* 列表 */
.insight-md ul, .insight-md ol {
  margin: 12px 0 18px 0;
  padding-left: 0;
  list-style: none;
}
.insight-md li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  line-height: 1.7;
}
.insight-md ul > li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-aurora);
  font-size: 12px;
  font-weight: 700;
}
.insight-md ol {
  counter-reset: ol-counter;
}
.insight-md ol > li {
  counter-increment: ol-counter;
}
.insight-md ol > li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-aurora);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 强调色 — 让粗体真正"突出" */
.insight-md strong {
  color: var(--fg-primary);
  font-weight: 700;
  background: linear-gradient(180deg, transparent 60%, var(--accent-aurora-light) 60%);
  padding: 0 2px;
}
.insight-md em {
  color: #a16207;
  font-style: normal;
  font-family: var(--font-serif);
}

/* 表格 — Stripe风 */
.insight-md table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.insight-md th, .insight-md td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.insight-md tr:last-child td { border-bottom: none; }
.insight-md th {
  background: var(--accent-aurora-light);
  color: #065f46;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.insight-md tbody tr:nth-child(even) {
  background: #f8fafc;
}

/* 引用块 */
.insight-md blockquote {
  border-left: 4px solid var(--accent-deep);
  background: var(--accent-deep-light);
  padding: 14px 18px;
  margin: 18px 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: #312e81;
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.7;
}

/* 内联代码 */
.insight-md code {
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #be185d;
  border: 1px solid #e2e8f0;
  font-family: var(--font-mono);
}

/* 分隔线 */
.insight-md hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-stronger), transparent);
  margin: 28px 0;
}

.citations {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 13px;
  color: var(--fg-muted);
}

/* details/summary 折叠版 */
.citations > summary {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-secondary);
  padding: 6px 10px;
  background: var(--bg-card);
  border-radius: 8px;
  display: inline-block;
  transition: all var(--transition);
  list-style: none;
}
.citations > summary::-webkit-details-marker { display: none; }
.citations > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform var(--transition);
  color: var(--accent-aurora);
  font-weight: 700;
}
.citations[open] > summary::before {
  transform: rotate(90deg);
}
.citations > summary:hover {
  background: var(--accent-aurora-light);
  color: var(--fg-primary);
}

.citations ol {
  margin-top: 12px;
  padding-left: 20px;
  max-height: 280px;
  overflow-y: auto;
}
.citations ol li {
  padding: 3px 0;
  line-height: 1.6;
}
.citations ol li a {
  color: var(--accent-deep);
  text-decoration: none;
  word-break: break-all;
}
.citations ol li a:hover {
  text-decoration: underline;
}

/* ============ Placeholder / Coming Soon ============ */
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.placeholder {
  background: var(--bg-card);
  border: 1px dashed var(--border-stronger);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 14px;
}

.coming-soon .section-title {
  color: var(--fg-secondary);
}

/* ============ Meta Section (Debug Details) ============ */
.meta-section {
  margin-top: 32px;
}

.meta-section details {
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.meta-section summary {
  cursor: pointer;
  color: var(--fg-muted);
  font-size: 13px;
}

.meta-section summary:hover { color: var(--fg-secondary); }

.meta-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.parsed-json {
  background: var(--bg-base);
  padding: 16px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 12px;
  color: var(--fg-secondary);
  max-height: 400px;
  overflow-y: auto;
  margin-top: 8px;
}

/* ============ History ============ */
.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.history-card-wrap {
  position: relative;
}

.history-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition);
  color: var(--fg-primary);
  text-decoration: none;
}

.history-card:hover {
  border-color: var(--accent-aurora);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.history-del {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #fecaca;
  background: rgba(255, 255, 255, 0.9);
  color: #b91c1c;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-card-wrap:hover .history-del {
  opacity: 1;
}

.history-del:hover {
  background: #fee2e2;
  border-color: #ef4444;
  transform: scale(1.1);
}

.history-route {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.history-route .arrow {
  color: var(--accent-cta);
  font-size: 0.8em;
}

.history-meta {
  display: flex;
  gap: 8px;
  color: var(--fg-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}

.history-id {
  font-size: 11px;
  color: var(--fg-muted);
}

.history-id code {
  font-family: var(--font-mono);
}

/* ============ Empty State ============ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  margin-bottom: 12px;
}

.empty-state p {
  color: var(--fg-secondary);
  margin-bottom: 24px;
}

.muted { color: var(--fg-muted); }

/* ============ Footer ============ */
.footer {
  text-align: center;
  padding: 32px;
  color: var(--fg-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-subtle);
}

/* ============ 移动端汉堡菜单 + 抽屉 ============ */
/* 桌面默认: 汉堡按钮+移动工具区隐藏 */
.topbar-mobile-tools { display: none; }
.hamburger-btn { display: none; }
.mobile-drawer-backdrop, .mobile-drawer { display: none; }

/* 汉堡按钮 (mobile 显示) */
.hamburger-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all var(--transition);
}
.hamburger-btn:hover { background: var(--bg-card); }
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg-primary);
  border-radius: 2px;
  transition: all 0.2s;
}
.hamburger-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 抽屉背景遮罩 */
.mobile-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s;
}
.mobile-drawer-backdrop.show { opacity: 1; }

/* 抽屉本身 — 从右滑入 */
.mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 84vw;
  max-width: 320px;
  background: #fff;
  z-index: 1000;
  box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  padding: 18px 18px 24px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  overflow-y: auto;
}
.mobile-drawer.show { transform: translateX(0); }
.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-drawer-head strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-primary);
}
.mobile-drawer-close {
  background: var(--bg-card);
  border: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px;
  color: var(--fg-muted);
  cursor: pointer;
}
.mobile-drawer-close:hover { background: #e5e7eb; }
.mobile-drawer-link {
  display: block;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--fg-primary);
  border-radius: 10px;
  margin-bottom: 4px;
  transition: background 0.15s;
}
.mobile-drawer-link:hover { background: var(--bg-card); color: var(--fg-primary); }
.mobile-drawer-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 14px 0;
}
.mobile-drawer-lang {
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lang-switch-mobile { display: flex; gap: 6px; }
.lang-switch-mobile button {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  /* 平板/手机: 隐藏 nav, 露 mobile 工具区 */
  .topbar nav { display: none; }
  .topbar-mobile-tools {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .hamburger-btn { display: inline-flex; }
  .mobile-drawer-backdrop, .mobile-drawer { display: block; }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .logo-sub { display: none; }
  .logo-text { font-size: 18px; }
  .main-container { padding: 32px 16px 60px; }
  .input-card { padding: 18px; border-radius: var(--radius-lg); }
  .input-row { flex-direction: column; align-items: stretch; }
  .btn-primary { justify-content: center; }
  .card-section { padding: 20px; }
  .section-header { flex-direction: column; }
  .section-note { text-align: left; max-width: 100%; }
  .trip-title { font-size: 32px; gap: 12px; }
  .deeplink-grid { grid-template-columns: 1fr 1fr; }
  .hotel-deeplinks { grid-template-columns: 1fr 1fr; }
  .poi-grid { grid-template-columns: 1fr; }
  .hotel-meta { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ============ Phase 2: Hotel ============ */
.hotel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 15px;
  color: #475569;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 12px;
  border: 1px solid #fde68a;
}
.hotel-meta strong { color: #92400e; }

.hotel-deeplinks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.deeplink.booking { border-left: 3px solid #003580; }
.deeplink.agoda { border-left: 3px solid #d63950; }
.deeplink.fliggy { border-left: 3px solid #ff6c00; }
.deeplink.meituan { border-left: 3px solid #ffc300; }
.deeplink.airbnb { border-left: 3px solid #ff5a5f; }

.tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px 0;
}
.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.tier-budget { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.tier-comfort { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.tier-luxury { background: #fef3c7; color: #92400e; border-color: #fde68a; }

/* ============ 酒店推荐卡片网格 ============ */
.hotel-narrative {
  font-family: var(--font-serif);
  color: #475569;
  font-size: 14px;
  line-height: 1.8;
  margin: 12px 0 18px 0;
  padding: 12px 16px;
  background: #f8fafc;
  border-left: 3px solid var(--accent-aurora);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.hotel-tier {
  margin-top: 22px;
}
.hotel-tier-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-primary);
  margin: 0 0 12px 0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-md);
}
.hotel-tier-title .tier-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--fg-muted);
  margin-left: auto;
}
.hotel-tier-budget .hotel-tier-title { background: linear-gradient(90deg, #d1fae5 0%, transparent 100%); border-left: 4px solid #10b981; }
.hotel-tier-comfort .hotel-tier-title { background: linear-gradient(90deg, #dbeafe 0%, transparent 100%); border-left: 4px solid #3b82f6; }
.hotel-tier-luxury .hotel-tier-title { background: linear-gradient(90deg, #fef3c7 0%, transparent 100%); border-left: 4px solid #d97706; }

.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.hotel-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: all var(--transition);
  position: relative;
}
.hotel-card:hover {
  border-color: var(--accent-aurora);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
}
.hotel-card-budget { border-top: 3px solid #10b981; }
.hotel-card-comfort { border-top: 3px solid #3b82f6; }
.hotel-card-luxury { border-top: 3px solid #d97706; }

.hotel-highlight {
  position: absolute;
  top: 10px;
  right: 10px;
  /* 卖点标签 — 靛紫(信息感, 沉稳) */
  background: linear-gradient(135deg, var(--accent-deep) 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}

.hotel-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-primary);
  line-height: 1.4;
  padding-right: 70px;
}

.hotel-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.hotel-price {
  font-size: 13px;
  color: #16a34a;
  font-weight: 600;
}

.hotel-area, .hotel-fit, .hotel-transit {
  font-size: 12px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.hotel-pros {
  font-size: 13px;
  color: #065f46;
  background: #ecfdf5;
  padding: 6px 10px;
  border-radius: 8px;
  margin: 2px 0;
}
.hotel-fit::before { content: ""; }
.hotel-fit { font-size: 12px; color: var(--fg-muted); }

.hotel-reviews {
  margin-top: 4px;
  font-size: 12px;
  background: #fef9e7;
  border-radius: 8px;
  padding: 4px 0;
}
.hotel-reviews > summary {
  cursor: pointer;
  list-style: none;
  padding: 4px 10px;
  color: #92400e;
  font-weight: 600;
}
.hotel-reviews > summary::-webkit-details-marker { display: none; }
.hotel-reviews > summary::before {
  content: "▸ ";
  color: var(--accent-cta);
  transition: transform var(--transition);
  display: inline-block;
}
.hotel-reviews[open] > summary::before { transform: rotate(90deg); }
.hotel-reviews ul {
  margin: 4px 0 4px 0;
  padding: 0 12px 0 26px;
  list-style: none;
}
.hotel-reviews li {
  padding: 4px 0;
  color: #78350f;
  font-family: var(--font-serif);
  line-height: 1.6;
  position: relative;
}
.hotel-reviews li::before {
  content: "❝";
  position: absolute;
  left: -14px;
  color: var(--accent-cta);
  font-size: 14px;
  font-weight: 700;
}

/* ============ Phase 2: POI ============ */
.poi-categories { display: flex; flex-direction: column; gap: 26px; }

.poi-category { }
.poi-cat-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 14px 0;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f1f5f9;
}

.poi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.poi-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.poi-photo {
  margin: -16px -16px 0 -16px;
  height: 160px;
  background: #f1f5f9;
  overflow: hidden;
  position: relative;
}
.poi-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.poi-card:hover .poi-photo img.active {
  transform: scale(1.04);
}
/* Phase 7.x: 多图轮播 */
.poi-carousel .carousel-img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.poi-carousel .carousel-img.active {
  opacity: 1;
  position: relative;
}
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition);
  z-index: 2;
  font-family: inherit;
  font-weight: 700;
}
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.poi-carousel:hover .carousel-nav { opacity: 1; }
.carousel-nav:hover { background: rgba(0, 0, 0, 0.7); }
.carousel-dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}
.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
  transition: all var(--transition);
  cursor: pointer;
}
.carousel-dot.active {
  background: #ffffff;
  width: 16px;
  border-radius: 999px;
}
.carousel-counter {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 8px;
  border-radius: 999px;
  z-index: 2;
}
.poi-card:hover {
  border-color: var(--accent-aurora);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.12), 0 2px 4px rgba(15, 23, 42, 0.06);
  transform: translateY(-2px);
}

.poi-name {
  font-weight: 600;
  font-size: 16px;
  color: #0f172a;
  line-height: 1.4;
}
/* 中文俗称: 衬线体 + 暖烟金色 — 像古籍批注/杂志小字 */
.poi-name-zh {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 13px;
  color: #a16207;          /* amber-700, 暖金色,跟翡翠绿UI暖冷对比 */
  margin-left: 6px;
  letter-spacing: 0.02em;
  font-style: normal;
}

.poi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}
.poi-rating { color: #ca8a04; font-weight: 600; }  /* legacy, 保留备用 */
.poi-price { color: #16a34a; font-weight: 600; }

/* ============ 精确星级条 (Yelp/Conde Nast 风) ============ */
.rating-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.stars-wrap {
  display: inline-block;
  position: relative;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 2px;
}
.stars-bg {
  color: #e2e8f0;        /* slate-200, 灰底星 */
}
.stars-fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #f59e0b;        /* amber-500, 金星 */
  letter-spacing: 2px;
}
.rating-num {
  font-weight: 700;
  font-size: 13px;
  color: #92400e;        /* amber-800 */
  font-variant-numeric: tabular-nums;
}
.rating-count {
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 400;
}
.rating-source {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.rating-source-google {
  background: #dbeafe;
  color: #1d4ed8;
}
.rating-source-amap {
  background: #dcfce7;
  color: #166534;
}
/* 客观数据源(Google/Tripadvisor/Booking 等真实评分) */
.rating-source-objective {
  background: #dbeafe;
  color: #1d4ed8;
}
/* 主观推荐(AI综合估算) */
.rating-source-subjective {
  background: #f3e8ff;
  color: #7c3aed;
}
/* 主观时星形换色:紫色✦ */
.stars-wrap .stars-bg.subj {
  color: #e9d5ff;        /* 浅紫底星 */
}
.stars-wrap .stars-fg.subj {
  color: #a855f7;        /* 紫色填充星 */
}

/* 转移日交通方式 — 星级行 */
.tm-rating {
  margin: 6px 0;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-subtle);
}

/* AI行程time_slot 内自动注入的星级 */
.slot-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  font-size: 12px;
}
.slot-rating .stars-wrap {
  font-size: 13px;
  letter-spacing: 1.5px;
}
.slot-rating .rating-num {
  font-size: 12px;
  color: #92400e;
}
.slot-rating .rating-count,
.slot-rating .rating-source {
  font-size: 10px;
}

/* Markdown 内 Gemini 输出的 "⭐ X.X/5 [数据源]" 标签 — 自动强调 */
.insight-md strong + text,
.insight-md p {
  /* (这部分让 markdown 渲染时 ⭐ 标签自然显示) */
}

.poi-addr {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.poi-hours {
  font-size: 13px;
  color: #475569;
}
.poi-hours summary { cursor: pointer; padding: 4px 0; user-select: none; }
.poi-hours summary:hover { color: #0ea5e9; }
.poi-hours ul {
  margin: 6px 0 0 0;
  padding: 0 0 0 16px;
  list-style: none;
}
.poi-hours li {
  padding: 2px 0;
  font-size: 12px;
  color: #64748b;
}

.poi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.poi-links a {
  font-size: 13px;
  color: #0ea5e9;
  text-decoration: none;
  font-weight: 500;
}
.poi-links a:hover { color: #0284c7; text-decoration: underline; }

.poi-summary { margin-top: 24px; }
.poi-summary .source-tag {
  font-weight: 600;
  color: #7c3aed;
  margin-bottom: 12px;
}

/* ============ 实时进度条 (SSE) ============ */
.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-primary);
}
.progress-info #prog-counter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: 400;
}
.progress-log {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 8px 0 0 0;
  border-top: 1px dashed var(--border-subtle);
  font-size: 12px;
  max-height: 160px;
  overflow-y: auto;
  color: var(--fg-muted);
}
.progress-log li {
  padding: 3px 0 3px 22px;
  position: relative;
  line-height: 1.5;
  transition: color var(--transition);
}
.progress-log li::before {
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 12px;
  font-weight: 700;
}
.progress-log li.active {
  color: var(--accent-aurora);
  font-weight: 600;
}
.progress-log li.active::before {
  content: "⟳";
  color: var(--accent-aurora);
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.progress-log li.done {
  color: var(--fg-secondary);
}
.progress-log li.done::before {
  content: "✓";
  color: var(--accent-aurora);
}
.progress-log li.info {
  color: var(--accent-deep);
  font-size: 11px;
}
.progress-log li.info::before {
  content: "→";
  color: var(--accent-deep);
}

/* ============ Settings 页 ============ */
.api-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
}
.api-card {
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: all var(--transition);
}
.api-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}
.api-ok { border-left: 4px solid var(--accent-aurora); }
.api-missing { border-left: 4px solid #fecaca; background: #fffafa; }

.api-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.api-icon { font-size: 22px; }
.api-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-primary);
  flex: 1;
}
.api-status {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.status-ok { background: var(--accent-aurora-light); color: #065f46; }
.status-missing { background: #fee2e2; color: #b91c1c; }

.api-purpose {
  font-family: var(--font-serif);
  color: #a16207;
  font-size: 13px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-subtle);
}

.api-detail {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.7;
}
.api-row { padding: 2px 0; }
.api-row strong { color: var(--fg-primary); margin-right: 4px; }
.api-row a { color: var(--accent-deep); word-break: break-all; }

.api-note {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--accent-warn-light);
  color: #78350f;
  border-radius: 6px;
  font-size: 12px;
}

.settings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.settings-table th, .settings-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.settings-table tr:last-child td { border-bottom: none; }
.settings-table th {
  background: var(--accent-aurora-light);
  color: #065f46;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.settings-table tbody tr:nth-child(even) { background: #f8fafc; }
.settings-table code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: #be185d;
  font-family: var(--font-mono);
}

.cost-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.cost-card {
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--accent-aurora-light) 0%, #ffffff 100%);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
  text-align: center;
}
.cost-label {
  font-size: 12px;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cost-value {
  font-size: 26px;
  font-weight: 800;
  color: #065f46;
  margin: 6px 0;
  font-family: var(--font-mono);
}
.cost-note {
  font-size: 11px;
  color: var(--fg-muted);
}

/* Error section */
.error-section {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.error-section .section-title { color: #b91c1c; }

/* ============ 多城市: Hero / 路线总览 / 转移卡 ============ */
.trip-title-multi {
  font-size: 38px;
  line-height: 1.3;
  flex-wrap: wrap;
  gap: 8px;
}
.trip-title-multi .arrow-thin {
  font-size: 22px;
  color: var(--fg-muted);
  font-weight: 300;
}
.trip-tag-multi {
  background: var(--accent-aurora-light);
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-weight: 600;
}
.route-name {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 15px;
  color: #a16207;
  letter-spacing: 0.02em;
}

.route-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.route-stop {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.route-stop-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, #047857 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.route-stop-body { flex: 1; }
.route-stop-city {
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-primary);
}
.route-stop-en {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 400;
}
.route-stop-meta {
  font-size: 13px;
  color: var(--fg-secondary);
  margin-top: 3px;
}

.route-transfer {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 18px 10px 36px;
  margin-left: 18px;
  background: var(--accent-deep-light);
  border-left: 3px dashed var(--accent-deep);
  font-size: 13px;
  color: #312e81;
}
.route-transfer-arrow {
  font-size: 20px;
  color: var(--accent-deep);
  font-weight: 700;
}
.route-transfer-info strong { color: #1e1b4b; }
.route-transfer-strategy {
  font-size: 12px;
  margin-top: 2px;
  color: #4338ca;
  line-height: 1.5;
}

/* 城市块 */
.city-block {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-aurora-light) 200%);
  border-left: 4px solid var(--accent-aurora);
}
.city-sub-section {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.city-sub-section > summary {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--fg-primary);
  list-style: none;
}
.city-sub-section > summary::-webkit-details-marker { display: none; }
.city-sub-section > summary::before {
  content: "▸ ";
  color: var(--accent-aurora);
  font-weight: 700;
  display: inline-block;
  transition: transform var(--transition);
}
.city-sub-section[open] > summary::before {
  transform: rotate(90deg);
}

/* 转移日卡 */
.transfer-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--accent-cta);
}
.transit-methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.transit-method-card {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tm-name {
  font-weight: 700;
  font-size: 14px;
  color: #92400e;
}
.tm-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--fg-primary);
  font-weight: 600;
}
.tm-pros {
  font-size: 12px;
  color: #065f46;
}
.tm-cons {
  font-size: 12px;
  color: #b91c1c;
}

/* ============ SOTA 重设计: trip 顶部 (小红书 ins 风) ============ */
/* 主操作行: 4 个 CTA, 1 primary + 3 ghost, 风格统一 */
.trip-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: center;
}

/* Primary pill 按钮 (主 CTA — 紫色填充) */
.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: linear-gradient(135deg, var(--color-info, #4f46e5) 0%, #4338ca 100%);
  color: #ffffff;
  border: 0;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 14px -2px rgba(79, 70, 229, 0.35);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  font-family: inherit;
  list-style: none;
}
.btn-primary-pill::-webkit-details-marker { display: none; }
.btn-primary-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -2px rgba(79, 70, 229, 0.45);
  color: #ffffff;
}

/* Ghost pill 按钮 (次级 CTA — 灰边白底, hover 时凸显) */
.btn-ghost-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: var(--bg-elevate, #ffffff);
  color: var(--fg-primary, #0f172a);
  border: 1.5px solid var(--border-subtle, #e2e8f0);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost-pill:hover {
  border-color: var(--color-info, #4f46e5);
  color: var(--color-info, #4f46e5);
  background: var(--bg-card-hover, #f8fafc);
  transform: translateY(-1px);
}

.btn-icon { font-size: 16px; line-height: 1; }
.btn-caret { font-size: 11px; opacity: 0.85; margin-left: 2px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }

/* Action dropdown (PDF 下拉) */
.action-dropdown {
  position: relative;
  list-style: none;
}
.action-dropdown summary { list-style: none; cursor: pointer; }
.action-dropdown summary::-webkit-details-marker { display: none; }
.action-dropdown[open] .btn-caret { transform: rotate(180deg); transition: transform 0.18s; }
.action-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: var(--bg-elevate, #ffffff);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 12px 36px -6px rgba(15, 23, 42, 0.18), 0 2px 8px -2px rgba(15, 23, 42, 0.08);
  z-index: 100;
  animation: dropdown-pop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dropdown-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.action-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg-primary, #0f172a);
  font-size: 13px;
  transition: background 0.12s;
}
.action-dropdown-menu .dropdown-item:hover {
  background: var(--bg-card-hover, #f1f5f9);
}
.action-dropdown-menu .dropdown-item > span:first-child {
  font-size: 22px;
  flex-shrink: 0;
}
.action-dropdown-menu .dropdown-item small {
  color: var(--fg-muted, #64748b);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

/* 辅助面板行: 3 个细灰 details, 纵向堆叠 (展开时不挤别的内容, 默认收起占用空间小) */
.trip-subtle-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}
.subtle-panel {
  background: var(--bg-card, #fafbfc);
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.subtle-panel:hover {
  border-color: var(--gray-300, #cbd5e1);
}
.subtle-panel[open] {
  background: var(--bg-elevate, #ffffff);
  border-color: var(--gray-300, #cbd5e1);
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
}
.subtle-panel summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary, #475569);
  cursor: pointer;
  list-style: none;
  user-select: none;
  position: relative;
}
.subtle-panel summary::-webkit-details-marker { display: none; }
.subtle-panel summary::after {
  content: '▾';
  margin-left: auto;
  font-size: 10px;
  color: var(--fg-muted, #94a3b8);
  transition: transform 0.18s;
}
.subtle-panel[open] > summary::after { transform: rotate(180deg); }
.subtle-panel summary:hover {
  color: var(--fg-primary, #0f172a);
}
.subtle-icon {
  font-size: 14px;
  line-height: 1;
  opacity: 0.9;
}
.subtle-badge {
  font-size: 10px;
  background: var(--gray-100, #f1f5f9);
  color: var(--fg-muted, #64748b);
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}
.subtle-panel > :not(summary) {
  padding: 0 16px 16px;
}
.subtle-panel .budget-tabs,
.subtle-panel .poi-search-form,
.subtle-panel .edits-list { padding: 0; }

/* trip-subline 编辑次数小灰提示 */
.trip-subline-edits {
  color: var(--fg-muted, #94a3b8);
  font-size: 12px;
}

/* 冲突 banner SOTA 化 (替代之前的内联 style) */
.conflict-banner-sota {
  margin: 16px 0;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fca5a5;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px -2px rgba(220, 38, 38, 0.12);
}
.conflict-banner-head {
  padding: 12px 16px;
  background: rgba(220, 38, 38, 0.06);
  border-bottom: 1px solid rgba(252, 165, 165, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.conflict-banner-title { font-size: 13px; color: #991b1b; font-weight: 600; }
.conflict-banner-sub { font-size: 11px; color: #7f1d1d; margin-top: 3px; }
.conflict-banner-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.conflict-banner-list {
  margin: 0;
  padding: 10px 18px 14px 36px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--gray-900, #0f172a);
  list-style: disc;
}

/* 旧的 .trip-actions 保留以防其他模板还在用 (例如 share 模式), 但视觉降级 */
.trip-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--accent-cta) 0%, #ea580c 100%);
  color: #ffffff;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
  transition: all var(--transition);
}
.btn-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
  color: #ffffff;
}
.btn-pdf {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.btn-pdf:hover {
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

/* Phase 7.7+: 首页 预算 chip (与 trip 页 version-switch 视觉一致) */
.budget-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.budget-label {
  font-size: 13px;
  color: var(--fg-secondary);
  font-weight: 600;
}
.budget-chips {
  display: inline-flex;
  gap: 6px;
  flex: 1;
  flex-wrap: wrap;
}
.budget-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 16px;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
  font-family: inherit;
  transition: all var(--transition);
  line-height: 1.3;
}
.budget-chip:hover {
  border-color: var(--accent-aurora);
  background: var(--accent-aurora-light);
  color: #065f46;
}
.budget-chip.active {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, #047857 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.budget-chip.active .budget-hint {
  color: rgba(255,255,255,0.85);
}
.budget-hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--fg-muted);
  letter-spacing: 0;
}

/* Phase 7.7: 预算切换按钮组 */
.version-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  padding: 4px 12px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
}
.version-label {
  font-size: 12px;
  color: var(--fg-muted);
  margin-right: 4px;
}
.version-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-secondary);
  background: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  transition: all var(--transition);
}
.version-btn:hover {
  background: var(--accent-aurora-light);
  color: #065f46;
}
.version-btn.active {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, #047857 100%);
  color: #ffffff !important;
  cursor: default;
  pointer-events: none;
}

/* ============ Phase 3: Transit / Map ============ */
.transit-banner {
  padding: 12px 16px;
  background: var(--accent-deep-light);
  color: #312e81;
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.transit-banner.transit-warn {
  background: var(--accent-warn-light);
  color: #78350f;
  border-color: #fde68a;
}

.btn-cta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--accent-cta) 0%, #ea580c 100%);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(249, 115, 22, 0.3);
  transition: all var(--transition);
}
.btn-cta-inline:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.45);
  color: #ffffff !important;
}

.btn-link-inline {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: #ffffff;
  color: #78350f !important;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid #fde68a;
  transition: all var(--transition);
}
.btn-link-inline:hover {
  background: var(--accent-warn-light);
  border-color: var(--accent-warn);
  color: var(--accent-warn) !important;
}

/* 加平滑滚动 (anchor link 体验更好) */
html { scroll-behavior: smooth; }

/* ============ Phase 7.6: AI Q&A 浮动顾问 ============ */
.qa-launcher {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  transition: all var(--transition);
}
.qa-launcher:hover { transform: scale(1.08); }

.qa-panel {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 380px;
  max-width: calc(100vw - 40px);
  height: 540px;
  max-height: calc(100vh - 60px);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* 修 hidden 失效 — display:flex 优先级压过 [hidden]={display:none}, 需显式覆盖 */
.qa-panel[hidden] { display: none !important; }
.qa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
}
.qa-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
}
.qa-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.qa-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
}
.qa-msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 10px;
  max-width: 88%;
  word-break: break-word;
}
.qa-msg-bot {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--fg-primary);
  margin-right: auto;
}
.qa-msg-user {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  margin-left: auto;
  margin-right: 0;
}
.qa-msg.loading {
  font-style: italic;
  color: var(--fg-muted);
}
.qa-citations {
  margin-top: 6px;
  font-size: 11px;
  color: var(--fg-muted);
}
.qa-citations a {
  color: var(--accent-deep);
  margin: 0 2px;
}
.qa-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
}
.qa-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  background: #f8fafc;
}
.qa-form input:focus { border-color: var(--accent-aurora); background: #ffffff; }
#qa-send {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition);
}
#qa-send:hover { transform: scale(1.08); }
#qa-send:disabled { opacity: 0.6; cursor: progress; }

/* Phase 7.9: 编辑成功后的操作按钮 */
.qa-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.qa-action-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border-stronger);
  background: #ffffff;
  border-radius: 999px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--fg-primary);
  font-family: inherit;
}
.qa-action-btn:hover {
  background: var(--accent-aurora-light);
  border-color: var(--accent-aurora);
  color: #065f46;
}
.qa-action-btn.qa-action-undo {
  color: #b91c1c;
}
.qa-action-btn.qa-action-undo:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}
.qa-action-btn:disabled { opacity: 0.5; cursor: progress; }

/* time_slot 被 AI 编辑过的视觉标识 */
.time-slot[data-edited="true"] {
  border-left: 3px solid var(--accent-cta);
  background: #fff7ed;
}

.overview-map-wrap {
  margin: 20px 0;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.overview-map {
  width: 100%;
  height: auto;
  display: block;
  background: #e2e8f0;
}
.map-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--fg-secondary);
  background: #ffffff;
  border-top: 1px solid var(--border-subtle);
}
.map-source {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
}

/* ============ Phase 4: Multi-day Itinerary ============ */
.itin-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.itin-meta-card {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent-aurora-light) 0%, #ffffff 100%);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-md);
}
.itin-meta-label {
  font-size: 12px;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.itin-meta-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-primary);
}

.day-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.day-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: all var(--transition);
}
.day-card:hover {
  border-color: var(--accent-aurora);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

/* 路线总览转移段描述 — 允许多行不截断 */
.route-transfer-strategy {
  font-size: 12px;
  margin-top: 4px;
  color: #4338ca;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}

.day-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border-subtle);
}
.day-num {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, #047857 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.day-info {
  flex: 1;
  min-width: 0;
}
.day-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-primary);
  margin: 0 0 4px 0;
  line-height: 1.3;
}
.day-theme {
  font-size: 14px;
  color: var(--accent-aurora);
  font-weight: 500;
  margin-bottom: 6px;
}
.day-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--fg-secondary);
}

.day-desc {
  margin: 0 0 16px 0;
  color: var(--fg-secondary);
  line-height: 1.6;
  font-size: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-aurora);
}

.time-slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}
.time-slot {
  display: flex;
  gap: 14px;
  padding: 12px 14px;
  background: #fafbfc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.time-slot:hover {
  background: #ffffff;
  border-color: #cbd5e1;
}
.slot-time {
  flex-shrink: 0;
  width: 100px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
}
.slot-body {
  flex: 1;
  min-width: 0;
}
.slot-poi {
  font-weight: 600;
  font-size: 15px;
  color: var(--fg-primary);
  margin-bottom: 3px;
}
.slot-activity {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin-bottom: 4px;
}
.slot-tip {
  font-size: 12px;
  color: var(--accent-warn);
  background: var(--accent-warn-light);
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 2px;
}

/* leg-by-leg 精细交通(time_slot 之间) */
.leg-arrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 4px 26px;
  padding: 6px 12px;
  background: linear-gradient(90deg, var(--accent-deep-light) 0%, transparent 100%);
  border-left: 3px dashed var(--accent-deep);
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: #312e81;
}
.leg-icon {
  font-size: 16px;
  color: var(--accent-deep);
  font-weight: 700;
}
.leg-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.leg-summary {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #4338ca;
  font-weight: 600;
}
.leg-deeplink {
  font-size: 11px;
  color: var(--accent-deep);
  text-decoration: none;
  padding: 2px 8px;
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
}
.leg-deeplink:hover {
  background: var(--accent-deep-light);
  border-color: var(--accent-deep);
}

.day-meals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.meal-item {
  flex: 1 1 240px;
  padding: 10px 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.day-transit-tip {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--accent-deep-light);
  color: #312e81;
  border-radius: var(--radius-md);
  font-size: 13px;
  border-left: 3px solid var(--accent-deep);
}

.day-tips {
  margin: 12px 0 0 0;
  padding-left: 22px;
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.7;
}
.day-tips li { padding: 2px 0; }

.small { font-size: 13px; }

@media (max-width: 768px) {
  .itin-meta-grid { grid-template-columns: 1fr; }
  .day-num { width: 44px; height: 44px; font-size: 16px; }
  .day-header { flex-direction: row; }
  .time-slot { flex-direction: column; gap: 6px; }
  .slot-time { width: auto; }
}

/* 编辑历史 — 旧的橙黄色 .edits-history 样式已删, 现在使用统一的 .subtle-panel */
/* (.edits-history 类已弃用, .edits-list 内部样式仍保留) */
.edits-list {
  margin: 12px 0 4px 20px;
  padding: 0;
  font-size: 13px;
  color: var(--fg-secondary);
}
.edits-list li {
  padding: 8px 0;
  border-bottom: 1px dashed #fed7aa;
  line-height: 1.6;
}
.edits-list li:last-child { border-bottom: none; }
.edits-list strong {
  color: var(--fg-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-right: 8px;
}
.edit-op-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 0 4px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.edit-day-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 999px;
  font-size: 11px;
}
.edit-detail {
  margin-top: 4px;
  font-size: 12px;
  color: var(--fg-muted);
}
.edit-detail code {
  font-family: var(--font-mono);
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
}

/* ============ Q&A 清除历史按钮 ============ */
.qa-clear-history {
  display: block;
  margin: 12px auto 4px;
  padding: 6px 14px;
  font-size: 11px;
  border: 1px dashed #cbd5e1;
  background: transparent;
  color: var(--fg-muted);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.qa-clear-history:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
  border-style: solid;
}

/* ============ 错误页 (error.html) ============ */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 20px;
}
.error-card {
  max-width: 540px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl, 20px);
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}
.error-icon {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 16px;
}
.error-status {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-muted);
  letter-spacing: 3px;
  margin-bottom: 12px;
}
.error-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--fg-primary);
  margin: 0 0 16px;
}
.error-message {
  color: var(--fg-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 32px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: var(--radius-md, 8px);
  border-left: 3px solid var(--accent-cta);
  text-align: left;
}
.error-suggestions {
  text-align: left;
  margin-bottom: 32px;
  padding: 16px 20px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md, 8px);
}
.error-suggestions h3 {
  font-size: 14px;
  color: #92400e;
  margin: 0 0 8px;
  font-weight: 600;
}
.error-suggestions ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.9;
}
.error-suggestions a {
  color: var(--accent-aurora);
  text-decoration: none;
  font-weight: 500;
}
.error-suggestions a:hover { text-decoration: underline; }
.error-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ Phase 7.x: 历史页对比勾选 + 对比页 ============ */
.history-compare-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.history-compare-bar .hint {
  font-size: 12px;
  color: var(--fg-muted);
}
.history-cmp-check {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  border: 1px solid var(--border-stronger);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
}
.history-card-wrap:hover .history-cmp-check,
.history-cmp-check input:checked + * ,
.history-card-wrap:has(.cmp-check:checked) .history-cmp-check {
  opacity: 1;
}
.history-cmp-check input { cursor: pointer; }
.history-card-wrap:has(.cmp-check:checked) .history-card {
  border-color: var(--accent-aurora);
  background: var(--accent-aurora-light, #f0fdfa);
}

.compare-controls {
  margin-top: 20px;
}
.compare-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.compare-form > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
}
.compare-form select {
  padding: 8px 12px;
  border: 1px solid var(--border-stronger);
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  font-family: inherit;
  background: #ffffff;
  max-width: 360px;
}
.compare-vs {
  font-weight: 700;
  font-size: 20px;
  color: var(--accent-cta);
  font-family: var(--font-serif);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px auto;
  max-width: 1200px;
  padding: 0 24px;
}
.compare-col { min-width: 0; }
.compare-header {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.compare-col-a .compare-header { border-top: 4px solid #14b8a6; }
.compare-col-b .compare-header { border-top: 4px solid #f59e0b; }
.compare-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.compare-tag-a { background: #ccfbf1; color: #115e59; }
.compare-tag-b { background: #fef3c7; color: #92400e; }
.compare-route {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
}
.compare-route .arrow { color: var(--accent-cta); padding: 0 6px; }
.compare-meta {
  font-size: 13px;
  color: var(--fg-secondary);
  margin-bottom: 14px;
}
.compare-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.stat-box {
  text-align: center;
  background: #f8fafc;
  border-radius: var(--radius-md, 8px);
  padding: 10px 4px;
}
.stat-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-primary);
}
.stat-lbl {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 2px;
}

.compare-days {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 24px;
}
.compare-day-row {
  margin-bottom: 24px;
}
.compare-day-num {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-deep);
  margin-bottom: 10px;
}
.compare-day-row .compare-grid {
  margin: 0;
  padding: 0;
}
.day-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 8px);
  padding: 14px 16px;
  min-height: 100%;
}
.compare-col-a .day-box { border-left: 3px solid #14b8a6; }
.compare-col-b .day-box { border-left: 3px solid #f59e0b; }
.day-box-empty {
  color: var(--fg-muted);
  text-align: center;
  font-style: italic;
}
.day-box-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.day-box-city {
  display: inline-block;
  padding: 2px 8px;
  background: #f3e8ff;
  color: #6b21a8;
  border-radius: 999px;
  font-size: 11px;
  margin-right: 6px;
}
.day-box-weather {
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.day-box-pois {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.poi-chip {
  display: inline-block;
  padding: 3px 8px;
  background: #f0fdfa;
  color: #065f46;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid #5eead4;
}
.compare-col-b .poi-chip { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.day-box-km {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .compare-grid { grid-template-columns: 1fr; }
}

/* POI 搜索 — 旧的浅绿 .poi-search-panel 样式已删 (跟 .edits-history 一起统一到 .subtle-panel) */
/* 内部 .poi-search-body / .poi-search-form 仍保留 */
.poi-search-body { margin-top: 14px; }
.poi-search-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.poi-search-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #5eead4;
  border-radius: var(--radius-md, 8px);
  font-size: 14px;
  font-family: inherit;
  background: #ffffff;
}
.poi-search-form input:focus {
  outline: none;
  border-color: var(--accent-aurora);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.poi-search-form button {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.poi-search-form button:hover:not(:disabled) { transform: translateY(-1px); }
.poi-search-form button:disabled { opacity: 0.6; cursor: progress; }
.poi-search-results {
  display: grid;
  gap: 10px;
}
.poi-search-loading, .poi-search-empty, .poi-search-error {
  padding: 14px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #5eead4;
  border-radius: var(--radius-md, 8px);
  color: var(--fg-secondary);
  font-size: 13px;
}
.poi-search-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.poi-search-card {
  display: flex;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 8px);
  padding: 12px;
}
.poi-search-photo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-md, 8px);
  flex-shrink: 0;
}
.poi-search-info {
  flex: 1;
  min-width: 0;
}
.poi-search-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg-primary);
  margin-bottom: 4px;
}
.poi-search-meta {
  font-size: 12px;
  color: var(--fg-secondary);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.poi-search-addr {
  color: var(--fg-muted);
  font-size: 11px;
}
.poi-search-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.poi-search-actions select, .poi-search-actions input {
  padding: 5px 10px;
  font-size: 12px;
  border: 1px solid var(--border-stronger);
  border-radius: var(--radius-sm, 6px);
  font-family: inherit;
  background: #ffffff;
}
.poi-search-actions input { flex: 1; min-width: 120px; }
.poi-add-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.poi-add-btn:hover:not(:disabled) { transform: translateY(-1px); }
.poi-add-btn:disabled { opacity: 0.5; cursor: progress; }
.poi-add-status {
  margin-top: 6px;
  font-size: 12px;
}
.poi-add-ok { color: #065f46; }
.poi-add-err { color: #991b1b; }

/* ============ Phase 7.x: 行程模板库 ============ */
.templates-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.template-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  text-align: center;
}
.template-card:hover {
  border-color: var(--accent-aurora);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.12);
  transform: translateY(-2px);
}
.template-icon {
  font-size: 1.15em;
  line-height: 1;
  flex-shrink: 0;
}
.template-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.template-subtitle {
  font-size: 13px;
  color: var(--fg-secondary);
  text-align: center;
}
.template-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.template-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: #f0fdfa;
  color: #065f46;
  border: 1px solid #5eead4;
  border-radius: 999px;
}
.template-desc {
  font-size: 12px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin: 4px 0;
  flex-grow: 1;
  text-align: left;
}
.template-meta {
  font-size: 11px;
  color: var(--fg-muted);
  border-top: 1px dashed var(--border-subtle);
  padding-top: 8px;
}
.template-use {
  margin-top: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--accent-aurora);
  background: #ffffff;
  color: #065f46;
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.template-card:hover .template-use {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  border-color: transparent;
}

/* ====== Phase D: 问路卡片 (CSS 3D 翻转 modal) ====== */
.direction-card-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  /* 站内统一: 问路卡按钮 = 暖橙 (CTA 色), 跟酒店卡上的问路卡保持一致 */
  background: linear-gradient(135deg, var(--accent-cta) 0%, #fb923c 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  margin-left: 4px;
}
.direction-card-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
}

/* 酒店卡问路卡按钮 — 放卡片右上角 (chip 风格, 跟 highlight 在同位置区域)
   配色: 暖橙 (CTA 色) 行动感强, 跟 highlight 靛紫拉开冷暖对比 */
.hotel-direction-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  margin: 0;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-cta) 0%, #fb923c 100%);
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.28);
  z-index: 2;  /* 浮在卡片其它元素上方 */
  white-space: nowrap;
}
.hotel-direction-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.5);
}
/* 当卡片有 highlight (如"温泉酒店"/"米其林"/"购物核心") 时, 问路卡按钮下移避让 */
.hotel-card:has(.hotel-highlight) .hotel-direction-btn {
  top: 42px;
}
/* 当问路卡存在时, hotel-name 右侧留出空间避免被覆盖 */
.hotel-card:has(.hotel-direction-btn) .hotel-name {
  padding-right: 76px;
}
.hotel-card:has(.hotel-highlight):has(.hotel-direction-btn) .hotel-name {
  padding-right: 76px;  /* highlight 在 name 上方时也保留 padding 防止 highlight 自身被裁切 */
}

.dc-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1500px;
}
.dc-modal[hidden] { display: none !important; }
.dc-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
}
.dc-card-wrap {
  position: relative;
  max-width: 90vw;
  width: 480px;
  z-index: 1;
}
.dc-close, .dc-bigger {
  position: absolute;
  z-index: 5;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  border-radius: 999px;
  transition: all var(--transition);
}
.dc-close {
  top: -50px; right: 0;
  width: 38px; height: 38px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 22px;
  color: var(--fg-primary);
}
.dc-close:hover { background: #fff; transform: scale(1.1); }
.dc-bigger {
  top: -50px; right: 50px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  color: var(--fg-primary);
}
.dc-bigger:hover { background: #fff; }

.dc-card {
  position: relative;
  width: 100%;
  min-height: 600px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
.dc-card.flipped { transform: rotateY(180deg); }

.dc-card-front, .dc-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.dc-card-front {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.dc-card-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: var(--fg-primary);
  overflow-y: auto;  /* 反面整体可滚, 替代 phrases 单独滚动(避免长酒店名挤压 phrase 区域) */
}

.dc-flag {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
}
.dc-side-label {
  font-size: 11px;
  letter-spacing: 4px;
  color: rgba(120, 53, 15, 0.55);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}
.dc-card-back .dc-side-label {
  color: var(--fg-muted);
  text-align: center;
  width: 100%;
}

.dc-name-zh {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.2;
  letter-spacing: 1px;
}
.dc-addr-zh {
  font-size: 14px;
  color: rgba(120, 53, 15, 0.75);
  line-height: 1.6;
  max-width: 90%;
  margin-bottom: 24px;
}
.dc-flip-hint {
  margin-top: auto;
  padding: 8px 16px;
  background: rgba(120, 53, 15, 0.12);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(120, 53, 15, 0.85);
  animation: dc-pulse 2.4s infinite;
}
@keyframes dc-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.dc-please {
  font-size: 13px;
  color: var(--accent-deep);
  text-align: center;
  margin-bottom: 12px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 999px;
}
.dc-name-local {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
  text-align: center;
  line-height: 1.3;
}
.dc-addr-local {
  font-size: 13px;
  color: var(--fg-secondary);
  text-align: center;
  line-height: 1.6;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid var(--border-subtle);
}
.dc-phrases {
  flex: none;            /* 不参与 flex 收缩, 让内容自然撑开 */
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  /* overflow 由 .dc-card-back 统一处理, 避免单条 phrase 出现裁切+滚动条 */
}
.dc-phrase {
  padding: 8px 12px;
  background: linear-gradient(135deg, #f0fdfa 0%, #fffbeb 100%);
  border-radius: 8px;
  border-left: 3px solid var(--accent-aurora);
  /* 长酒店名场景: 整条 phrase 自己撑高 */
  min-height: auto;
}
.dc-phrase-local {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  line-height: 1.4;
  margin-bottom: 4px;
  /* 关键修复: 长字符串(酒店全名+日文/英文问句)强制换行, 不出横向滚动条 */
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.dc-phrase-zh {
  font-size: 11px;
  color: var(--fg-secondary);
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.dc-phrase-py {
  color: var(--accent-deep);
  margin-left: 4px;
  font-style: italic;
}
.dc-qr-wrap {
  text-align: center;
  margin-top: 8px;
}
.dc-qr {
  width: 90px; height: 90px;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.dc-qr-hint {
  font-size: 10px;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* 大字模式 — 给老人/视力差的路人看 */
.dc-card.bigger .dc-name-zh { font-size: 48px; }
.dc-card.bigger .dc-name-local { font-size: 42px; }
.dc-card.bigger .dc-addr-local { font-size: 18px; padding: 12px 18px; }
.dc-card.bigger .dc-phrase-local { font-size: 18px; }
.dc-card.bigger .dc-phrase-zh { font-size: 13px; }
.dc-card.bigger { min-height: 640px; }

@media (max-width: 640px) {
  .dc-card-wrap { width: calc(100vw - 32px); }
  .dc-card { min-height: 480px; }
  .dc-name-zh { font-size: 28px; }
  .dc-name-local { font-size: 22px; }
  .dc-close { top: -44px; }
  .dc-bigger { top: -44px; right: 46px; }
}

/* ====== Phase D: 多语言切换(顶部 [中|EN|日]) ====== */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  margin-left: 6px;
  padding: 2px;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 999px;
}
.lang-switch button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--fg-muted);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  letter-spacing: 0.5px;
}
.lang-switch button:hover { color: var(--fg-primary); }
.lang-switch button.active {
  background: #ffffff;
  color: var(--accent-deep);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* ====== Phase D: 通知中心(顶部铃铛 + 下拉面板) ====== */
.notif-wrap { position: relative; display: inline-block; }
.notif-bell {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  position: relative;
  font-family: inherit;
  color: var(--fg-secondary);
  transition: all var(--transition);
}
.notif-bell:hover { color: var(--accent-deep); transform: scale(1.1); }
.notif-badge {
  position: absolute;
  top: 0; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  font-family: var(--font-mono);
}

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 20px);
  max-height: 540px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 9998;
}
.notif-panel[hidden] { display: none !important; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.notif-head strong { font-size: 14px; color: var(--fg-primary); }
.notif-mark-all {
  font-size: 11px;
  color: var(--accent-deep);
  background: transparent;
  border: 1px solid var(--border-stronger);
  border-radius: 999px;
  padding: 3px 10px;
  cursor: pointer;
  font-family: inherit;
}
.notif-mark-all:hover { background: var(--accent-aurora-light, #f0fdfa); }

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}
.notif-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--fg-muted);
  font-size: 13px;
}

.notif-item {
  display: block;
  position: relative;
  padding: 10px 14px;
  margin: 4px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  border: 1px solid transparent;
}
.notif-item:hover { background: #f8fafc; border-color: var(--border-subtle); }
.notif-item.unread { background: #f0fdfa; border-left: 3px solid var(--accent-aurora); }
.notif-item.sev-critical.unread { background: #fef2f2; border-left-color: #ef4444; }
.notif-item.sev-warn.unread     { background: #fffbeb; border-left-color: #f59e0b; }

.notif-head-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px;
  margin-bottom: 4px;
}
.notif-sev { font-size: 13px; }
.notif-type {
  color: var(--accent-deep);
  font-weight: 600;
}
.notif-time { margin-left: auto; color: var(--fg-muted); font-family: var(--font-mono); }

.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 2px;
}
.notif-body {
  font-size: 12px;
  color: var(--fg-secondary);
  line-height: 1.5;
}
.notif-dot {
  position: absolute;
  top: 12px; right: 12px;
  width: 8px; height: 8px;
  background: var(--accent-aurora);
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff;
}
.notif-item.sev-critical .notif-dot { background: #ef4444; }
.notif-item.sev-warn .notif-dot { background: #f59e0b; }

/* ====== 运维入口卡 (settings 页) ====== */
.ops-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.ops-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}
.ops-link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.08);
}
.ops-link-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(99, 102, 241, 0.08));
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ops-link-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ops-link-body strong { font-size: 14px; color: var(--fg-primary); }
.ops-link-body span { font-size: 12px; color: var(--fg-muted); line-height: 1.5; }
.ops-link-arrow { font-size: 18px; color: var(--accent-deep); opacity: 0.5; }
.ops-link-card:hover .ops-link-arrow { opacity: 1; transform: translateX(2px); }

/* ============ Phase C: 旅游文案生成器 ============ */
.copywriter-wrap {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cw-step {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px 22px;
}
.cw-step-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.cw-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* 上传区 */
.cw-uploader {
  border: 2px dashed rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
  transition: all 0.25s;
}
.cw-uploader:hover, .cw-uploader.drag-over, .cw-uploader:focus {
  border-color: var(--accent-aurora);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, rgba(99, 102, 241, 0.06) 100%);
  outline: none;
}
.cw-uploader-icon { font-size: 36px; margin-bottom: 8px; }
.cw-uploader-text { font-size: 15px; font-weight: 600; color: var(--fg-primary); margin-bottom: 4px; }
.cw-uploader-sub { font-size: 12px; color: var(--fg-muted); }

.cw-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.cw-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
}
.cw-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cw-thumb-del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.7); color: #fff;
  border: none; cursor: pointer;
  font-size: 11px; line-height: 1;
}
.cw-thumb-del:hover { background: #ef4444; }
.cw-thumb-size {
  position: absolute; bottom: 4px; left: 4px;
  font-size: 9px; padding: 2px 6px;
  background: rgba(0, 0, 0, 0.6); color: #fff;
  border-radius: 999px;
}
.cw-thumb-add {
  aspect-ratio: 1 / 1;
  border: 2px dashed rgba(16, 185, 129, 0.4);
  background: transparent;
  color: var(--accent-deep);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
  font-family: inherit;
}
.cw-thumb-add:hover { background: rgba(16, 185, 129, 0.06); border-color: var(--accent-aurora); }

/* 风格选择 */
.cw-styles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.cw-style {
  cursor: pointer;
  padding: 16px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  text-align: center;
  transition: all 0.25s;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
}
.cw-style input[type=radio] { position: absolute; opacity: 0; }
.cw-style:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08); }
.cw-style-icon { font-size: 28px; line-height: 1; }
.cw-style-name { font-size: 14px; font-weight: 700; color: var(--fg-primary); }
.cw-style-desc { font-size: 11px; color: var(--fg-muted); }
/* active 状态 — 各平台用各自品牌色 */
.cw-style-moments.active     { border-color: #10b981; background: rgba(16, 185, 129, 0.06); }
.cw-style-xiaohongshu.active { border-color: #ff2e4d; background: rgba(255, 46, 77, 0.06); }
.cw-style-douyin.active      { border-color: #161823; background: rgba(22, 24, 35, 0.06); }
.cw-style-weibo.active       { border-color: #ff8200; background: rgba(255, 130, 0, 0.06); }
.cw-style.active { box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12); }

/* 上下文 */
.cw-context { display: flex; flex-direction: column; gap: 10px; }
.cw-day-label { font-size: 12px; color: var(--fg-secondary); font-weight: 600; }
.cw-day-select, .cw-note {
  padding: 12px 16px;
  border: 1px solid var(--border-stronger);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.7;
  background: #ffffff;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s;
}
.cw-day-select:focus, .cw-note:focus {
  outline: none;
  border-color: var(--accent-aurora);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.cw-note {
  resize: vertical;
  min-height: 140px;
  padding: 16px 18px;
  color: #0f172a;
}
.cw-note::placeholder {
  color: #94a3b8;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-line;
}
.cw-note-hint {
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 生成按钮 */
.cw-actions { text-align: center; margin-top: 8px; }
.cw-gen-btn {
  padding: 14px 36px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.25);
  transition: all var(--transition);
  font-family: inherit;
}
.cw-gen-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.35);
}
.cw-gen-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #94a3b8; box-shadow: none; }

/* 结果区 */
.cw-result { margin-top: 8px; }
.cw-loading, .cw-error {
  padding: 32px 20px;
  text-align: center;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 14px;
  color: var(--fg-secondary);
}
.cw-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.cw-result-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.cw-result-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
}
.cw-platform-moments::before     { background: linear-gradient(90deg, #10b981, #059669); }
.cw-platform-xiaohongshu::before { background: linear-gradient(90deg, #ff2e4d, #ff6b81); }
.cw-platform-douyin::before      { background: linear-gradient(90deg, #161823, #25f4ee); }
.cw-platform-weibo::before       { background: linear-gradient(90deg, #ff8200, #fbb034); }

.cw-result-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.cw-result-platform { font-size: 14px; font-weight: 700; color: var(--fg-primary); }
.cw-result-actions { display: flex; gap: 8px; }
.cw-btn-regen, .cw-btn-copy {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-stronger);
  background: #ffffff;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.cw-btn-regen:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.cw-btn-copy:hover { background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%); color: #fff; border-color: transparent; }
.cw-result-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}
.cw-result-body {
  font-size: 14px;
  color: var(--fg-primary);
  line-height: 1.85;
  margin-bottom: 14px;
  white-space: pre-wrap;
}
.cw-result-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cw-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: #f0fdfa;
  color: #065f46;
  border-radius: 999px;
  border: 1px solid #5eead4;
}
.cw-platform-xiaohongshu .cw-tag { background: #fff5f6; color: #b91c44; border-color: #fecaca; }
.cw-platform-douyin .cw-tag      { background: #1e293b; color: #25f4ee; border-color: #334155; }
.cw-platform-weibo .cw-tag       { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.cw-result-meta {
  font-size: 11px;
  color: var(--fg-muted);
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

/* Toast */
.cw-toast {
  position: fixed;
  left: 50%; bottom: 80px;
  transform: translate(-50%, 20px);
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 99999;
  opacity: 0;
  transition: all 0.3s;
}
.cw-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Phase B: budget-tabs (预估/实际) + qa-panel quick actions ============ */
.budget-tabs {
  display: flex;
  gap: 4px;
  margin: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
}
.budget-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.budget-tab:hover { color: var(--fg-primary); background: #f8fafc; }
.budget-tab.active {
  color: #92400e;
  border-bottom-color: #f59e0b;
  background: #fffbeb;
}
.budget-tab-body { padding-top: 8px; }

/* qa-panel 快捷工具栏 */
.qa-quick-actions {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.qa-quick {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #5eead4;
  color: #065f46;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qa-quick:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
}
.qa-quick:disabled { opacity: 0.5; cursor: progress; }
.qa-quick #qa-quick-weather-state {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 10px;
  margin-left: 4px;
  font-weight: 600;
}
.qa-quick #qa-quick-weather-state[data-on="on"] {
  background: #dcfce7;
  color: #166534;
}
.qa-quick:hover #qa-quick-weather-state {
  background: rgba(255,255,255,0.3) !important;
  color: #ffffff !important;
}

/* ============ Phase B: 实际花费 + 预算超支 + 天气警报 + 离线导出 ============ */
/* 离线导出按钮 */
.btn-action.btn-offline {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  margin-left: 8px;
}
.btn-action.btn-offline:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35); }
.btn-action.btn-copywriter {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
  margin-left: 8px;
}
.btn-action.btn-copywriter:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35); }

/* 实际花费面板 */
.expense-panel {
  margin: 16px 0;
  background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
  border: 1px solid #fecaca;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
}
.expense-panel summary {
  cursor: pointer; font-weight: 600; font-size: 15px; color: #991b1b;
  list-style: none;
}
.expense-panel summary::before {
  content: "▶ "; transition: transform var(--transition); font-size: 11px;
}
.expense-panel[open] summary::before { transform: rotate(90deg); }
.expense-body { margin-top: 16px; }
.expense-overview {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #ffffff;
  border-radius: var(--radius-md, 8px);
  margin-bottom: 14px;
}
.expense-overview.budget-warn { border: 1px solid #f59e0b; background: #fffbeb; }
.expense-overview.budget-over { border: 1px solid #ef4444; background: #fee2e2; }
.expense-overview .ov-label { font-size: 11px; color: var(--fg-muted); margin-bottom: 4px; }
.expense-overview .ov-val { font-family: var(--font-serif); font-size: 22px; font-weight: 700; color: var(--fg-primary); }
.expense-overview .ov-pct { font-family: var(--font-mono); font-size: 14px; font-weight: 600; text-align: right; }
.expense-overview .ov-bar { width: 100%; height: 10px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.expense-overview .ov-fill { height: 100%; transition: width 0.3s; }
.expense-overview .ov-ok { background: linear-gradient(90deg, #10b981, #059669); }
.expense-overview .ov-warn { background: linear-gradient(90deg, #f59e0b, #d97706); }
.expense-overview .ov-over { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.expense-overview .ov-budget { text-align: right; }

.expense-alerts {
  margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.expense-alerts .alert {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  border-left: 3px solid;
}
.alert.alert-warn { background: #fffbeb; color: #92400e; border-left-color: #f59e0b; }
.alert.alert-critical { background: #fee2e2; color: #991b1b; border-left-color: #ef4444; }

.expense-breakdown {
  display: grid; gap: 6px;
  margin-bottom: 16px;
}
.budget-cmp-row {
  display: grid;
  grid-template-columns: 26px 100px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: #ffffff;
  border-radius: 6px;
  font-size: 12px;
}
.budget-cmp-row .bg-name { font-weight: 600; color: var(--fg-primary); }
.budget-cmp-row .bg-bar { height: 8px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.budget-cmp-row .bg-fill { height: 100%; transition: width 0.3s; }
.budget-cmp-row .bg-fill.bg-ok { background: #10b981; }
.budget-cmp-row .bg-fill.bg-warn { background: #f59e0b; }
.budget-cmp-row .bg-fill.bg-over { background: #ef4444; }
.budget-cmp-row .bg-text { font-family: var(--font-mono); font-size: 11px; color: var(--fg-secondary); white-space: nowrap; }
.budget-warn { background: #fffbeb !important; }
.budget-over { background: #fee2e2 !important; }

/* 添加花费表单 */
.expense-add {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md, 8px);
  padding: 14px;
  margin-bottom: 14px;
}
.ea-tabs { display: flex; gap: 4px; margin-bottom: 12px; }
.ea-tab {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border-stronger);
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.ea-tab.active { background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%); color: #fff; border-color: transparent; }
.ea-body {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.ea-body input, .ea-body select {
  padding: 6px 10px; font-size: 12px;
  border: 1px solid var(--border-stronger); border-radius: 6px;
  font-family: inherit;
}
.ea-body .btn-action { padding: 6px 14px; font-size: 12px; }
.ocr-extracted {
  margin-top: 12px; padding: 12px 14px;
  background: #f0fdfa; border: 1px solid #5eead4; border-radius: 6px;
  display: flex; flex-direction: column; gap: 6px; font-size: 13px;
}
.ocr-extracted > div { display: flex; align-items: center; gap: 8px; }
.ocr-extracted input, .ocr-extracted select { padding: 4px 8px; font-size: 12px; border: 1px solid #5eead4; border-radius: 4px; }

.expense-list-title { font-size: 13px; margin: 16px 0 8px; color: var(--fg-secondary); }
.expense-list { display: grid; gap: 6px; }
.expense-item {
  display: grid;
  grid-template-columns: 130px 90px 1fr 90px 60px 24px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border-radius: 6px;
  font-size: 12px;
  border-left: 3px solid #94a3b8;
}
.expense-item .ei-amount { font-family: var(--font-mono); font-weight: 700; color: #b91c1c; }
.expense-item .ei-amount small { font-weight: 400; color: var(--fg-muted); font-size: 10px; }
.expense-item .ei-cat { color: var(--fg-secondary); font-size: 11px; }
.expense-item .ei-merchant { color: var(--fg-primary); }
.expense-item .ei-date { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.expense-item .ei-src { font-size: 10px; color: var(--fg-muted); }
.expense-item .ei-del {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #fecaca;
  color: #b91c1c;
  cursor: pointer;
  font-size: 10px;
  line-height: 1;
}
.expense-item .ei-del:hover { background: #fee2e2; }

/* 天气警报 */
.weather-monitor-panel {
  margin: 16px 0;
  padding: 14px 20px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
}
.weather-toggle {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #0c4a6e;
}
.weather-toggle input { width: 18px; height: 18px; cursor: pointer; }
.weather-btn {
  margin-left: 14px;
  padding: 4px 12px;
  font-size: 11px;
  background: #ffffff;
  border: 1px solid #0ea5e9;
  color: #0c4a6e;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.weather-btn:hover:not(:disabled) { background: #e0f2fe; }
.weather-alerts-list { margin-top: 12px; display: grid; gap: 8px; }
.weather-empty {
  padding: 10px; text-align: center; color: #166534; font-size: 12px;
  background: #f0fdf4; border-radius: 6px; border: 1px dashed #86efac;
}
.weather-alert {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
}
.weather-alert.weather-critical { border-left-color: #ef4444; background: #fef2f2; }
.weather-alert .wa-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  font-size: 14px;
}
.weather-alert .wa-where { color: var(--fg-muted); font-size: 11px; margin-left: auto; }
.weather-alert .wa-detail { font-size: 12px; color: var(--fg-secondary); margin-bottom: 6px; }
.weather-alert .wa-advice { font-size: 12px; color: #92400e; background: #fffbeb; padding: 6px 10px; border-radius: 4px; }

/* ============ Phase 7.x: 行李清单 / 真实交通 / 运维监控 ============ */
/* 行李清单面板 */
.packing-panel {
  margin: 16px 0;
  background: linear-gradient(135deg, #f0f9ff 0%, #ecfeff 100%);
  border: 1px solid #67e8f9;
  border-radius: var(--radius-lg);
  padding: 14px 20px;
}
.packing-panel summary {
  cursor: pointer; font-weight: 600; font-size: 15px; color: #0e7490;
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.packing-panel summary::before {
  content: "▶ "; transition: transform var(--transition); font-size: 11px;
}
.packing-panel[open] summary::before { transform: rotate(90deg); }
.packing-body { margin-top: 16px; }
.packing-loading, .packing-error, .packing-empty {
  padding: 20px; text-align: center; color: var(--fg-secondary); font-size: 13px;
}
.packing-error { color: #991b1b; }
.packing-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.packing-cat {
  background: #ffffff;
  border: 1px solid #67e8f9;
  border-radius: var(--radius-md, 8px);
  padding: 12px 14px;
}
.packing-cat-title {
  font-weight: 600; font-size: 14px; margin-bottom: 8px;
  color: #0e7490; display: flex; align-items: center; gap: 4px;
}
.packing-cat-title .cnt { margin-left: auto; font-size: 11px; color: var(--fg-muted); font-weight: 400; }
.packing-items { list-style: none; padding: 0; margin: 0; }
.packing-items li {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; padding: 4px 0; border-bottom: 1px dashed #e0f2fe; line-height: 1.5;
}
.packing-items li:last-child { border-bottom: none; }
.packing-items input[type=checkbox] { margin: 3px 0 0 0; flex-shrink: 0; }
.packing-items .essential { color: #b91c1c; font-weight: 600; }
.packing-items .qty { color: var(--fg-muted); font-size: 11px; margin-left: 4px; }
.packing-items .tip { display: block; font-size: 10px; color: var(--fg-muted); padding-left: 18px; }
.packing-tips {
  margin-top: 14px; padding: 10px 14px;
  background: #ecfeff; border-left: 3px solid #0e7490; border-radius: 6px;
  font-size: 12px; line-height: 1.6; color: var(--fg-secondary);
}
.packing-tips ul { margin: 4px 0 0; padding-left: 18px; }

/* PDF 分章打印 toggle */
.pdf-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.pdf-btn-group .btn-action { border-radius: var(--radius-md, 8px) 0 0 var(--radius-md, 8px); }
.pdf-btn-group .pdf-mode-btn {
  background: #ffffff;
  border: 1px solid var(--border-stronger);
  border-left: none;
  border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--fg-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.pdf-btn-group .pdf-mode-btn:hover { background: #f8fafc; color: var(--accent-deep); }

/* Directions 真实交通卡 */
.day-directions {
  margin-top: 10px;
}
.directions-toggle {
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--border-stronger);
  background: #ffffff;
  color: var(--accent-deep);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.directions-toggle:hover { background: var(--accent-aurora-light, #f0fdfa); }
.directions-result {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.dir-pair {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 3px solid #6366f1;
}
.dir-pair .dir-from { color: var(--fg-primary); font-weight: 500; flex: 1; }
.dir-pair .dir-arrow { color: var(--accent-deep); }
.dir-pair .dir-to { color: var(--fg-primary); font-weight: 500; flex: 1; }
.dir-pair .dir-route {
  flex-basis: 100%;
  margin-top: 4px;
  font-size: 11px;
  color: var(--fg-secondary);
}
.dir-pair .dir-route a { color: #6366f1; text-decoration: none; margin-left: 6px; }

/* 运维监控页 */
.ops-quota .util-bar {
  width: 100px; height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.ops-quota .util-fill { height: 100%; transition: width 0.3s; border-radius: 999px; }
.ops-quota .util-ok { background: #10b981; }
.ops-quota .util-warn { background: #f59e0b; }
.ops-quota .util-critical { background: #ef4444; }
.ops-quota .util-text { font-family: var(--font-mono); font-size: 11px; margin-left: 6px; }
.ops-quota .ops-row-warn td { background: #fef3c7; }
.ops-quota .ops-row-critical td { background: #fee2e2; }
.ops-quota .status-ok { color: #166534; font-size: 11px; }
.ops-quota .status-warn { color: #92400e; font-size: 11px; }
.ops-quota .status-bad { color: #991b1b; font-size: 11px; font-weight: 600; }

.ops-alerts {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md, 8px);
  color: #991b1b;
  font-size: 13px;
}
.ops-alerts ul { margin: 6px 0 0; padding-left: 20px; }

.ops-errors-list {
  display: grid;
  gap: 8px;
}
.ops-error-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid #ef4444;
  border-radius: var(--radius-md, 8px);
  padding: 10px 14px;
  font-size: 13px;
}
.ops-error-card summary {
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  list-style: none;
  flex-wrap: wrap;
}
.ops-error-card .err-ts { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); }
.ops-error-card .err-where { background: #fee2e2; color: #991b1b; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.ops-error-card .err-msg { flex: 1; color: var(--fg-primary); }
.ops-error-card .err-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
  font-size: 11px;
}
.ops-error-card .err-trace {
  margin-top: 6px;
  padding: 8px 12px;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  overflow-x: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ============ Phase 7.x: 交互地图(高德 / Google JS) ============ */
.interactive-map-wrap {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.map-toolbar {
  display: flex;
  gap: 14px;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  align-items: center;
}
.map-day-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.map-day-btn {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-stronger);
  border-left: 3px solid #6b7280;
  background: #ffffff;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  color: var(--fg-primary);
  transition: all var(--transition);
}
.map-day-btn:hover { background: #f1f5f9; transform: translateY(-1px); }
.map-day-btn.active {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, var(--accent-deep) 100%);
  color: #ffffff;
  border-color: transparent;
  border-left-color: #ffffff;
}
.map-category-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
}
.map-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--cat-bg, #ffffff);
  color: var(--cat-color, var(--fg-primary));
  border: 1px solid var(--cat-color, var(--border-subtle));
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition);
}
.map-cat-chip:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}
.map-cat-chip input {
  margin: 0;
  cursor: pointer;
  accent-color: var(--cat-color, var(--accent-aurora));
}
.map-cat-chip .cat-label { color: var(--cat-color, var(--fg-primary)); }
/* 取消勾选时灰化 */
.map-cat-chip:has(input:not(:checked)) {
  opacity: 0.42;
  background: #ffffff;
  border-color: var(--border-subtle);
  color: var(--fg-muted);
}
.map-cat-chip:has(input:not(:checked)) .cat-label { color: var(--fg-muted); }

.interactive-map {
  width: 100%;
  height: 520px;
  background: #e2e8f0;
  position: relative;
}
.interactive-map .map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--fg-secondary);
  font-size: 13px;
  padding: 20px;
  background: #f8fafc;
}
.interactive-map .map-fallback small {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 11px;
}

/* 自定义 marker (高德用) */
.map-marker {
  width: 30px; height: 38px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  color: #ffffff;
  font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  border: 2px solid #ffffff;
}
.map-marker > span { transform: rotate(45deg); }

/* popup */
.map-popup {
  font-family: var(--font-sans, system-ui);
  font-size: 13px;
  line-height: 1.55;
  min-width: 220px;
  max-width: 320px;
}
.map-popup .popup-name { font-size: 14px; margin-bottom: 4px; }
.map-popup .popup-zh { font-size: 11px; color: var(--fg-muted); margin-bottom: 6px; }
.map-popup .popup-meta {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.map-popup .popup-day {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  color: #ffffff; font-size: 10px; font-weight: 600;
}
.map-popup .popup-time, .map-popup .popup-cat {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: #f1f5f9; font-size: 10px; color: var(--fg-secondary);
}
.map-popup .popup-rating { font-size: 12px; color: #f59e0b; margin-bottom: 4px; }
.map-popup .popup-src { font-size: 10px; color: var(--fg-muted); margin-left: 4px; }
.map-popup .popup-addr { font-size: 11px; color: var(--fg-muted); margin: 4px 0; }
.map-popup .popup-hours { margin: 6px 0; font-size: 11px; }
.map-popup .popup-hours summary { cursor: pointer; color: var(--accent-deep); }
.map-popup .popup-hours div { padding-top: 4px; color: var(--fg-secondary); line-height: 1.6; }
.map-popup .popup-summary { font-size: 11px; color: var(--fg-secondary); margin: 6px 0; padding: 4px 8px; background: #f8fafc; border-radius: 6px; border-left: 2px solid var(--accent-aurora); }
.map-popup .popup-link {
  display: inline-block; margin-top: 6px; padding: 5px 12px;
  background: linear-gradient(135deg, #4F46E5 0%, #4338ca 100%);
  color: #ffffff; font-size: 11px; font-weight: 600;
  border-radius: 6px; text-decoration: none;
}
.map-popup .popup-link:hover { transform: translateY(-1px); }

/* Google InfoWindow 内部样式覆盖(去掉默认 padding) */
.gm-style-iw-c { padding: 12px !important; }
.gm-style-iw-d { overflow: auto !important; }

@media (max-width: 768px) {
  .interactive-map { height: 380px; }
  .map-toolbar { padding: 8px 10px; gap: 8px; }
  .map-category-filters { margin-left: 0; }
}

/* 费用预估 — 旧的橙黄渐变 .cost-estimate-panel 样式已删 (统一到 .subtle-panel) */
/* 内部 .budget-tabs / .cost-estimate-body / .expense-body 仍保留 */
.cost-estimate-body { margin-top: 16px; }
.cost-loading, .cost-error {
  padding: 20px;
  text-align: center;
  color: var(--fg-secondary);
  font-size: 13px;
}
.cost-error { color: #991b1b; }

.cost-summary {
  margin-bottom: 18px;
}
.cost-meta {
  font-size: 13px;
  color: var(--fg-secondary);
  margin-bottom: 12px;
  text-align: center;
}
.cost-total-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
}
.cost-total-box {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md, 8px);
  padding: 12px 14px;
  text-align: center;
}
.cost-total-main {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border-color: transparent;
}
.cost-total-lbl {
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.cost-total-main .cost-total-lbl { color: rgba(255,255,255,0.85); }
.cost-total-val {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-primary);
  line-height: 1.2;
}
.cost-total-main .cost-total-val { color: #ffffff; font-size: 19px; }
.cost-dash {
  margin: 0 4px;
  color: var(--fg-muted);
  font-weight: 400;
}
.cost-total-main .cost-dash { color: rgba(255,255,255,0.7); }

.cost-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.cost-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 3px solid #f59e0b;
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px;
}
.cost-item.cost-src-ai_extracted { border-left-color: #16a34a; }
.cost-item-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.cost-item-icon { font-size: 16px; }
.cost-item-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-primary);
  flex: 1;
}
.cost-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 600;
}
.cost-tag-ai { background: #dcfce7; color: #166534; }
.cost-tag-base { background: #fef3c7; color: #92400e; }
.cost-item-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 4px;
}
.cost-item-note {
  font-size: 11px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.cost-notes {
  margin: 12px 0 0;
  padding: 12px 16px 12px 28px;
  background: rgba(255,255,255,0.6);
  border-radius: var(--radius-md, 8px);
  font-size: 11px;
  color: var(--fg-secondary);
  line-height: 1.7;
}
.cost-notes li { padding: 2px 0; }

@media (max-width: 768px) {
  .cost-total-row { grid-template-columns: 1fr; }
}

/* ============ Phase 7.x: AI 主动建议 ============ */
.ai-suggest-panel {
  margin: 16px 0;
}
.btn-suggest {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
  transition: all var(--transition);
}
.btn-suggest:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.35);
}
.btn-suggest:disabled {
  opacity: 0.7;
  cursor: progress;
}
.ai-suggest-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}
.suggest-loading, .suggest-empty, .suggest-error {
  padding: 16px;
  background: #f8fafc;
  border: 1px dashed var(--border-stronger);
  border-radius: var(--radius-md, 8px);
  color: var(--fg-secondary);
  font-size: 13px;
  text-align: center;
  grid-column: 1 / -1;
}
.suggest-empty { background: #f0fdf4; border-color: #86efac; color: #166534; }
.suggest-error { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.suggest-item {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid #a855f7;
  border-radius: var(--radius-md, 8px);
  padding: 14px 16px;
  transition: all var(--transition);
}
.suggest-item:hover {
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.1);
  transform: translateY(-1px);
}
.suggest-item.sev-high { border-left-color: #ef4444; }
.suggest-item.sev-med { border-left-color: #f59e0b; }
.suggest-item.sev-low { border-left-color: #a855f7; }
.suggest-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.suggest-day {
  display: inline-block;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.suggest-day-all { background: #f3e8ff; color: #6b21a8; }
.suggest-action {
  display: inline-block;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: 10px;
  font-family: var(--font-mono);
}
.suggest-detail {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}
.suggest-tip {
  font-size: 11px;
  color: var(--fg-muted);
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

/* ============ Phase 7.x: NLU 解析确认页 ============ */
.nlu-confirm-card {
  margin: 16px 0;
  padding: 20px 24px;
  background: #f0fdfa;
  border: 1px solid #5eead4;
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(20, 184, 166, 0.08);
}
.nlu-confirm-title {
  font-size: 15px;
  font-weight: 600;
  color: #065f46;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nlu-confirm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.nlu-field {
  background: #ffffff;
  border: 1px solid #d1fae5;
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px;
}
.nlu-field label {
  display: block;
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.nlu-field input, .nlu-field select {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-primary);
  font-family: inherit;
  padding: 2px 0;
}
.nlu-field input:focus, .nlu-field select:focus {
  outline: none;
  background: #f0fdfa;
}
.nlu-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.nlu-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-stronger);
  background: #ffffff;
  border-radius: var(--radius-md, 8px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}
.nlu-btn:hover { background: #f1f5f9; }
.nlu-btn-confirm {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #ffffff;
  border-color: transparent;
}
.nlu-btn-confirm:hover {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  transform: translateY(-1px);
}

/* ============ AI 玩法整合 v2 — 结构化卡片 ============ */
.ai-overview {
  padding: 12px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #fef3c7 100%);
  border-left: 4px solid var(--accent-aurora);
  border-radius: 8px;
  font-size: 13px;
  color: #064e3b;
  line-height: 1.7;
  margin: 12px 0 16px;
}
.ai-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-subtle);
}
.ai-tab {
  padding: 8px 14px;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--fg-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}
.ai-tab:hover { color: var(--accent-deep); background: #f8fafc; }
.ai-tab.active {
  color: var(--accent-aurora);
  border-bottom-color: var(--accent-aurora);
  background: #ecfdf5;
}

/* Day 节奏卡片 grid */
.day-pace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.day-pace-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: all 0.2s;
}
.day-pace-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
  border-color: var(--accent-aurora);
}
.day-pace-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.day-pace-num {
  background: linear-gradient(135deg, var(--accent-aurora) 0%, #0d9488 100%);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.day-pace-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-primary);
}
.day-pace-area {
  font-size: 11px;
  color: var(--fg-muted);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 999px;
}
.day-pace-theme {
  font-size: 12px;
  color: var(--fg-secondary);
  margin-bottom: 10px;
  padding: 6px 10px;
  background: #fefce8;
  border-left: 3px solid #facc15;
  border-radius: 4px;
}
.day-slots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day-slot {
  display: grid;
  grid-template-columns: 24px 36px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.6;
}
.slot-icon { font-size: 16px; }
.slot-time {
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 11px;
}
.slot-text {
  color: var(--fg-primary);
}

/* 必吃美食 */
.must-eat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.must-eat-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  border-left: 3px solid #f97316;
}
.me-dish { font-weight: 700; font-size: 13px; color: var(--fg-primary); }
.me-where { font-size: 11px; color: var(--accent-deep); margin: 3px 0; }
.me-why { font-size: 11px; color: var(--fg-muted); line-height: 1.5; }

/* 通用 bullet 列表 (交通/避坑/独家) */
.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bullet-list li {
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.6;
  border-left: 3px solid var(--accent-deep);
}
.bullet-list.bullet-warn li { border-left-color: #f59e0b; background: #fffbeb; }
.bullet-list.bullet-aurora li { border-left-color: var(--accent-aurora); background: #ecfdf5; }

@media (max-width: 640px) {
  .day-pace-grid { grid-template-columns: 1fr; }
  .ai-tab { padding: 6px 10px; font-size: 11.5px; }
}

/* ============ 可访问性 (a11y) ============ */
/* 高对比度模式 — 操作系统启用 'Increase contrast' 时自动激活 */
@media (prefers-contrast: more) {
  :root {
    --fg-primary: #000;
    --fg-secondary: #111;
    --border-subtle: #000;
    --border-stronger: #000;
  }
  body { color: #000; }
  a { text-decoration: underline; }
  button, .btn-action, .qa-quick {
    border: 2px solid currentColor !important;
  }
  .hotel-direction-btn, .direction-card-btn {
    outline: 2px solid #000;
  }
}

/* 减少动效 — 用户系统设置 'Reduce motion' 时关闭过渡动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus trap 视觉 — 键盘 Tab 高亮 (键盘用户必备) */
:focus-visible {
  outline: 3px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 屏幕阅读器 only 文本 */
.sr-only {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============ SOTA-R3 通用组件库 ============ */

/* 卡片内卡 (推送/邀请等 2-栏子卡) */
.sub-card {
  padding: var(--space-5);
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.sub-card-warm {
  background: var(--grad-warm);
  border: 0;
}
.sub-card-title {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--fg-primary);
}
.sub-card-desc {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-xs);
  color: var(--fg-secondary);
  line-height: 1.6;
}

/* 按钮 */
.btn-dark {
  padding: 10px 20px;
  background: var(--gray-900);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: var(--transition-fast);
}
.btn-dark:hover:not(:disabled) { background: var(--gray-800); transform: translateY(-1px); }
.btn-dark:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-ghost {
  padding: 10px 20px;
  background: transparent;
  color: var(--color-info);
  border: 1px solid var(--color-info);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: var(--transition-fast);
}
.btn-ghost:hover:not(:disabled) { background: var(--color-info-bg); }

.btn-pill {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: var(--fs-base);
  font-weight: 600;
  transition: var(--transition-fast);
}
.btn-pill.btn-success { background: var(--grad-success); color: #fff; box-shadow: 0 4px 14px -2px rgba(16,185,129,0.4); }
.btn-pill.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 18px -2px rgba(16,185,129,0.5); }

/* 兑换卡密输入 + 按钮 */
.redeem-input {
  flex: 1;
  padding: 14px var(--space-4);
  border: 1.5px solid var(--border-stronger);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: var(--fs-md);
  font-weight: 600;
  text-align: center;
  background: var(--bg-elevate);
  color: var(--fg-primary);
  transition: border-color 0.2s;
}
.redeem-input:focus { border-color: var(--color-info); outline: none; }
.redeem-btn {
  padding: 14px var(--space-8);
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
  color: #fff;
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.25);
  transition: var(--transition-fast);
}
.redeem-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.35); }
.redeem-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* 旅行档案详情区 */
.profile-detail {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: var(--fg-secondary);
  line-height: 1.9;
}

/* 空状态 — SOTA 升级: SVG illustration + 标题 + 引导文 + CTA */
.empty-state {
  padding: var(--space-10) var(--space-6);
  text-align: center;
  color: var(--fg-muted);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}
.empty-state-icon { font-size: 48px; margin-bottom: var(--space-2); }
.empty-state-text { font-size: var(--fs-md); margin-bottom: var(--space-3); }
.empty-state-title {
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--fg-primary);
  margin: 0;
}
.empty-state-desc {
  font-size: var(--fs-sm);
  color: var(--fg-secondary);
  max-width: 360px;
  line-height: 1.7;
  margin: 0;
}
.empty-state-illustration {
  width: 140px;
  height: 140px;
  opacity: 0.85;
  margin-bottom: var(--space-2);
}
[data-theme="dark"] .empty-state-illustration { opacity: 0.6; }
.empty-state-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: var(--grad-success);
  color: #fff;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: 0 4px 14px -2px rgba(16, 185, 129, 0.4);
  transition: var(--transition-fast);
}
.empty-state-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 18px -2px rgba(16, 185, 129, 0.5); color: #fff; }
.empty-state-cta-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 24px;
  background: transparent;
  color: var(--fg-secondary);
  border: 1px solid var(--border-stronger);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: var(--transition-fast);
}
.empty-state-cta-secondary:hover { border-color: var(--color-info); color: var(--color-info); }
.empty-state-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: center; }

/* #10 history-thumb / history-thumb-gradient CSS 已整段删除 (功能本身是 facade 半落地) */
.history-card-body { display: flex; flex-direction: column; gap: 6px; }

/* ===== #11 DnD 拖拽重排 ===== */
.dnd-item {
  position: relative;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
}
.dnd-item.dnd-dragging { opacity: 0.4; cursor: grabbing; }
.dnd-item.dnd-over { box-shadow: 0 -3px 0 var(--color-info), 0 4px 14px -2px rgba(79,70,229,0.25); transform: translateY(-1px); }
.dnd-handle {
  position: absolute;
  left: -4px; top: 50%;
  transform: translateY(-50%);
  width: 16px;
  font-size: 14px;
  color: var(--gray-300);
  cursor: grab;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  user-select: none;
  letter-spacing: -3px;
  line-height: 1;
}
.dnd-item:hover .dnd-handle { opacity: 1; }
.dnd-handle:hover { color: var(--color-info); }
.dnd-handle:active { cursor: grabbing; }

/* ===== #12 笔记 ===== */
.day-notes {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px dashed var(--border-stronger);
  border-radius: var(--radius-sm);
}
.day-notes-label {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-weight: 600;
}
.day-notes-input {
  width: 100%;
  min-height: 38px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--fg-primary);
  font-family: inherit;
  font-size: var(--fs-sm);
  line-height: 1.7;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}
.day-notes-input::placeholder { color: var(--fg-muted); }
.day-notes-status {
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  margin-top: 4px;
  height: 16px;
}
.day-notes-status.is-saved { color: var(--color-success); }
.day-notes-status.is-error { color: var(--color-danger); }

/* Onboarding 引导的 CSS 已整段删除 (功能已废弃, 不再需要样式) */
/* 保留 fadeIn / slideUp / bounce 关键帧供其他组件复用 */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

/* ===== #2 SOTA 错误恢复卡片 ===== */
.errx-card {
  background: var(--bg-elevate);
  border: 1px solid #fca5a5;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 24px -8px rgba(220, 38, 38, 0.2);
}
.errx-header {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--color-danger-bg), #fff5f5);
  border-bottom: 1px solid #fca5a5;
}
.errx-icon { font-size: 24px; line-height: 1.2; }
.errx-body { flex: 1; }
.errx-title { font-size: var(--fs-lg); font-weight: 700; color: var(--color-danger); margin-bottom: 4px; }
.errx-msg { font-size: var(--fs-sm); color: var(--gray-700); line-height: 1.6; }
.errx-stage {
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  margin-top: var(--space-2);
  font-family: var(--font-mono);
}
.errx-actions {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-card);
  flex-wrap: wrap;
}
.errx-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-fast);
}
.errx-btn.errx-primary {
  background: var(--gray-900);
  color: #fff;
}
.errx-btn.errx-primary:hover { background: var(--gray-800); transform: translateY(-1px); }
.errx-btn.errx-secondary {
  background: transparent;
  color: var(--color-warning);
  border: 1px solid var(--color-warning);
}
.errx-btn.errx-secondary:hover { background: var(--color-warning-bg); }
.errx-btn.errx-ghost {
  background: transparent;
  color: var(--fg-secondary);
  border: 1px solid var(--border-stronger);
}
.errx-btn.errx-ghost:hover { border-color: var(--fg-secondary); color: var(--fg-primary); }

/* ===== #16 PWA install prompt 横条 ===== */
.pwa-install-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 16px 10px 14px;
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.25);
  max-width: 90vw;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwa-install-icon { font-size: 24px; }
.pwa-install-text { font-size: var(--fs-sm); color: var(--fg-primary); font-weight: 500; }
.pwa-install-text small { color: var(--fg-muted); font-size: var(--fs-xs); display: block; }
.pwa-install-btn {
  padding: 6px 14px;
  background: var(--grad-success);
  color: #fff;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.pwa-install-dismiss {
  background: transparent;
  border: 0;
  color: var(--fg-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

/* ===== #8 AI 助手首次气泡 ===== */
.qa-hint-bubble {
  position: fixed;
  bottom: 95px;
  right: 24px;
  z-index: 199;
  max-width: 240px;
  padding: 12px 14px 12px 16px;
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.25);
  font-size: var(--fs-sm);
  color: var(--fg-primary);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.qa-hint-bubble strong {
  display: block;
  font-size: var(--fs-base);
  margin-bottom: 6px;
  color: var(--color-info);
}
.qa-hint-bubble div {
  font-size: var(--fs-xs);
  color: var(--fg-secondary);
  line-height: 1.7;
}
.qa-hint-bubble button {
  position: absolute;
  top: 4px; right: 6px;
  background: transparent; border: 0;
  color: var(--fg-muted);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
/* Cmd+K 命令面板 + 键盘快捷键帮助 的 CSS 已整段删除 (功能已废弃, 不再需要样式) */

/* ===== #6 SOTA 骨架屏 ===== */
@keyframes skeleton-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg,
    var(--gray-100) 0%,
    var(--gray-200) 50%,
    var(--gray-100) 100%);
  background-size: 200px 100%;
  background-repeat: no-repeat;
  border-radius: var(--radius-sm);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
.skeleton-line { height: 12px; width: 100%; margin-bottom: 8px; }
.skeleton-line.sm { width: 60%; }
.skeleton-line.lg { height: 20px; }
.skeleton-card {
  padding: var(--space-4);
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, var(--gray-200) 0%, var(--gray-300) 50%, var(--gray-200) 100%);
}

/* ===== #7 day 锚点导航 ===== */
.day-anchor-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.day-anchor-label {
  font-size: var(--fs-xs);
  color: var(--fg-muted);
  font-weight: 600;
  white-space: nowrap;
}
.day-anchor-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--fg-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  scroll-snap-align: start;
  white-space: nowrap;
}
.day-anchor-link:hover {
  border-color: var(--color-info);
  color: var(--color-info);
  background: var(--color-info-bg);
}
html { scroll-behavior: smooth; scroll-padding-top: 100px; }

.qa-hint-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 28px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--bg-elevate);
  filter: drop-shadow(0 1px 0 var(--border-subtle));
}

/* 邀请链接行 */
.invite-row {
  padding: 10px 14px;
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.invite-link {
  flex: 1; min-width: 200px;
  font-family: var(--font-mono);
  color: var(--color-info);
  word-break: break-all;
}
.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.btn-copy {
  padding: 5px 12px;
  background: var(--gray-100);
  border: 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--fg-primary);
  transition: var(--transition-fast);
}
.btn-copy:hover { background: var(--gray-200); }
.btn-copy.is-copied { background: var(--color-success-bg); color: var(--color-success); }

/* details summary (替代浏览器原生丑三角) */
.details-summary {
  cursor: pointer;
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--fg-primary);
  padding: var(--space-2) 0;
  list-style: none;
}
.details-summary::-webkit-details-marker { display: none; }
.details-summary::before {
  content: "▶";
  display: inline-block;
  margin-right: var(--space-2);
  transition: transform 0.2s;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
details[open] > .details-summary::before { transform: rotate(90deg); }

/* 消费记录行 */
.consumption-row {
  padding: 10px 14px;
  background: var(--bg-elevate);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.consumption-amount {
  font-weight: 700;
  color: var(--color-danger);
}
.consumption-amount.is-refund { color: var(--color-success); }
