/* =========================================
   AI 智能攻略 · 响应式样式（全设备自适应）
   2025-2026 流行色盘：Burnt Terracotta + Deep Forest + Warm Amber
   视觉语言：Glassmorphism 2.0 · Soft Gradients · Micro Motion
   基准: 1rem = 视口自适应（见 index.html head 脚本）
   ========================================= */

/* ---------- 2025 流行色盘（专家决策） ---------- */
:root {
  /* 品牌主色：Terracotta 烧陶土 — 温暖、旅行、生活感 */
  --brand: #E85D26;
  --brand-dark: #C94516;
  --brand-light: #F28B60;
  --brand-glow: rgba(232, 93, 38, 0.25);

  /* 次色：Deep Forest 深森林 — 自然、探索、高级感 */
  --forest: #2D6A4F;
  --forest-light: #52B788;
  --forest-glow: rgba(45, 106, 79, 0.2);

  /* 点缀：Warm Amber 暖琥珀 — 品质感 */
  --amber: #E9C46A;
  --amber-dark: #B8860B;

  /* 纸感背景：暖米白（不是纯白，耐看不刺眼） */
  --paper: #FBF7F2;
  --paper-2: #F5EFE6;
  --paper-dark: #EDE4D6;

  /* 文字梯度 */
  --ink: #1C1917;
  --ink-80: #292524;
  --ink-60: #44403C;
  --ink-40: #78716C;
  --ink-20: #A8A29E;

  /* 边框 + 分割线 */
  --line: #D6D3D1;
  --line-soft: #E7E5E4;
  --line-faint: rgba(28, 25, 23, 0.08);

  /* 阴影系统（流行的 soft elevation） */
  --shadow-xs: 0 1px 2px rgba(28,25,23,0.05);
  --shadow-sm: 0 2px 8px rgba(28,25,23,0.06);
  --shadow-md: 0 4px 16px rgba(28,25,23,0.08);
  --shadow-lg: 0 8px 32px rgba(28,25,23,0.1);
  --shadow-xl: 0 16px 48px rgba(28,25,23,0.15);
  --shadow-brand: 0 8px 24px var(--brand-glow);

  /* 玻璃态（Glassmorphism 2.0） */
  --glass-bg: rgba(251, 247, 242, 0.72);
  --glass-bg-dark: rgba(28, 25, 23, 0.6);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-border-dark: rgba(255, 255, 255, 0.12);

  /* 底部导航高度（唯一权威，JS 读取这个） */
  --tabbar-h: 4.5rem;
  --tabbar-bottom: env(safe-area-inset-bottom, 0px);

  /* 圆角梯度 */
  --r-sm: 0.375rem;
  --r-md: 0.75rem;
  --r-lg: 1rem;
  --r-xl: 1.25rem;
  --r-full: 9999px;

  /* 间距 */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-6: 3rem;

  /* =========================================
     旧变量名 → 新变量名 向后兼容映射
     所有散落的旧引用自动生效，无需逐个修改
     ========================================= */
  --accent: var(--brand);
  --accent-soft: var(--brand-dark);
  --ink-soft: var(--ink-60);
  --ink-light: var(--ink-40);
  --gold: var(--amber);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
*::selection { background: var(--brand-glow); color: var(--brand-dark); }

html { scroll-behavior: smooth; background: var(--paper); overflow-x: hidden; }
body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "HarmonyOS Sans",
               "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(232,93,38,0.06), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(45,106,79,0.05), transparent 50%),
    var(--paper);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--tabbar-bottom));
  /* 滚动性能优化（鸿蒙/iOS/Android 都受益） */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  text-rendering: optimizeLegibility;
}

/* 鸿蒙/暗黑模式适配（尊重系统设置） */
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #F28B60;
    --brand-dark: #E85D26;
    --brand-glow: rgba(242, 139, 96, 0.3);
    --paper: #1C1917;
    --paper-2: #292524;
    --paper-dark: #44403C;
    --ink: #FBF7F2;
    --ink-80: #E7E5E4;
    --ink-60: #D6D3D1;
    --ink-40: #A8A29E;
    --ink-20: #78716C;
    --line: #44403C;
    --line-soft: #292524;
    --glass-bg: rgba(28, 25, 23, 0.78);
    --glass-border: rgba(255, 255, 255, 0.1);
  }
  body {
    background:
      radial-gradient(ellipse at 20% 0%, rgba(242,139,96,0.08), transparent 50%),
      radial-gradient(ellipse at 80% 100%, rgba(82,183,136,0.06), transparent 50%),
      var(--paper);
  }
}

img { max-width: 100%; display: block; }
button, input, textarea { font-family: inherit; -webkit-appearance: none; appearance: none; }

/* ---------- 背景装饰 ---------- */
.paper-texture {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(232,93,38,0.012) 2px, rgba(232,93,38,0.012) 3px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(232,93,38,0.012) 2px, rgba(232,93,38,0.012) 3px);
}
.ink-splash {
  position: fixed; border-radius: 50%; filter: blur(4rem); opacity: 0.1;
  pointer-events: none; z-index: 0;
}
.ink-1 { width: 30rem; height: 30rem; background: var(--brand); top: -10rem; right: -15rem; }
.ink-2 { width: 25rem; height: 25rem; background: var(--forest); bottom: 10%; left: -10rem; }
.ink-3 { width: 18rem; height: 18rem; background: var(--amber); top: 40%; right: 20%; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: baseline; gap: 0.6rem; }
.brand-mark { color: var(--brand); font-size: 1.25rem; }
.brand-name { font-family: "Noto Serif SC", serif; font-weight: 900; font-size: 1.3rem; letter-spacing: -0.02em; }
.brand-tagline {
  color: var(--ink-40); font-size: 0.9rem; font-family: "Caveat", cursive;
}
.nav { display: flex; gap: 2rem; }
.nav a {
  color: var(--ink-60); text-decoration: none; font-size: 0.875rem; font-weight: 500;
  position: relative; transition: color 0.2s; padding: 0.25rem 0;
}
.nav a:hover { color: var(--brand); }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -0.15rem;
  width: 0; height: 0.12rem; background: var(--brand); transition: width 0.3s;
}
.nav a:hover::after { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  padding: 4rem 3rem 6rem;
  max-width: 87.5rem; margin: 0 auto; align-items: center;
}
.eyebrow {
  display: inline-block; font-family: "Caveat", cursive; font-size: 1.4rem;
  color: var(--brand); letter-spacing: 0.03em; margin-bottom: 1rem;
  padding: 0 0.5rem; border-left: 0.2rem solid var(--brand);
}
.hero-title {
  font-family: "Noto Serif SC", serif; font-size: clamp(2.2rem, 5.5vw, 4.3rem);
  font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 1.5rem;
}
.hero-title em {
  font-style: normal; color: var(--brand); position: relative;
}
.hero-title em::after {
  content: ""; position: absolute; bottom: 0.25rem; left: 0;
  width: 100%; height: 0.75rem; background: rgba(232,93,38,0.15); z-index: -1;
}
.hero-sub { color: var(--ink-60); font-size: 1rem; max-width: 34rem; margin-bottom: 2.5rem; line-height: 1.7; }
.hero-meta { display: block; margin-top: 0.5rem; color: var(--ink-40); font-size: 0.82rem; }

/* 输入卡 */
.input-zone { max-width: 37.5rem; position: relative; }
.input-card {
  position: relative; background: white; border: 0.125rem solid var(--ink);
  border-radius: 1rem; padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  display: flex; align-items: center; gap: 0.5rem;
  box-shadow: 0.5rem 0.5rem 0 0 var(--ink);
  transition: transform 0.2s, box-shadow 0.2s;
}
.input-card:focus-within { transform: translate(-0.125rem, -0.125rem); box-shadow: 0.75rem 0.75rem 0 0 var(--brand); border-color: var(--brand); }
.input-card textarea {
  flex: 1; border: none; outline: none; resize: none; font-family: inherit;
  font-size: 1rem; color: var(--ink); padding: 0.75rem 0; max-height: 7.5rem; min-height: 3rem;
  background: transparent;
}
.mic-btn {
  position: relative; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: none; background: var(--paper-dark); cursor: pointer; display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.2s;
}
.mic-btn:hover { background: #e7d9c2; }
.mic-btn.active { background: var(--brand); color: white; }
.mic-icon { font-size: 1.25rem; }
.mic-pulse {
  position: absolute; inset: -0.25rem; border-radius: 50%;
  border: 0.125rem solid var(--brand); opacity: 0;
}
.mic-btn.active .mic-pulse { animation: micPulse 1.5s infinite; }
@keyframes micPulse { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.6); } }

.submit-btn {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.5rem;
  background: var(--ink); color: var(--paper); border: none; border-radius: 0.75rem;
  font-family: "Noto Serif SC", serif; font-weight: 600; font-size: 0.9375rem;
  cursor: pointer; transition: background 0.2s, transform 0.1s; flex-shrink: 0;
}
.submit-btn:hover { background: var(--brand); transform: translateY(-0.125rem); }
.submit-btn:active { transform: scale(0.97); }
.submit-btn:disabled { background: var(--ink-40); cursor: not-allowed; transform: none; }

.quick-chips { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; }
.chip-hint { color: var(--ink-40); font-size: 0.8rem; font-style: italic; }
.chip {
  padding: 0.375rem 1rem; background: white; border: 0.0625rem solid var(--line);
  border-radius: 999px; font-family: inherit; font-size: 0.8rem; color: var(--ink-60);
  cursor: pointer; transition: all 0.2s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: rgba(232,93,38,0.05); }

/* Hero 地图装饰 */
.hero-visual { display: flex; justify-content: center; }
.map-card {
  background: white; border: 0.125rem solid var(--ink); border-radius: 0.75rem;
  padding: 1.25rem; box-shadow: 1.25rem 1.25rem 0 0 var(--forest);
  transform: rotate(-2deg); transition: transform 0.5s; max-width: 26.25rem; width: 100%;
}
.map-card:hover { transform: rotate(0deg) scale(1.02); }
.map-svg { width: 100%; height: auto; color: var(--ink); }
.route-path { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawRoute 3s ease-out forwards; }
@keyframes drawRoute { to { stroke-dashoffset: 0; } }
.poi-dot circle:first-child { animation: poiPulse 2s infinite; }
@keyframes poiPulse { 0%,100% { r: 0.375rem; } 50% { r: 0.625rem; } }
.poi-label { font-family: "Noto Serif SC", serif; font-size: 0.75rem; fill: var(--ink); }
.map-legend { margin-top: 0.75rem; font-size: 0.75rem; color: var(--ink-40); display: flex; align-items: center; gap: 0.5rem; font-family: "Caveat", cursive; font-size: 1rem; }
.legend-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--brand); }

/* ---------- AI 智能建议弹出面板 ---------- */
.suggest-panel {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 0.5rem;
  background: white; border: 0.125rem solid var(--ink); border-radius: 0.875rem;
  box-shadow: 1.25rem 1.25rem 0 0 var(--brand); overflow: hidden; z-index: 50;
  max-height: 30rem; overflow-y: auto; animation: panelIn 0.2s ease-out;
}
@keyframes panelIn { from { opacity: 0; transform: translateY(-0.375rem); } to { opacity: 1; transform: none; } }
.suggest-section { padding: 0.75rem 1rem 0.25rem; }
.suggest-label {
  font-size: 0.6875rem; font-weight: 600; color: var(--ink-40);
  text-transform: uppercase; letter-spacing: 0.09375rem; margin-bottom: 0.625rem;
  display: flex; align-items: center; gap: 0.375rem;
}
.ai-badge { background: linear-gradient(135deg, var(--brand), #ea580c); color: white; font-size: 0.625rem; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-weight: 700; letter-spacing: 0; }
.hot-icon { font-size: 0.875rem; }
.suggest-divider { height: 0.0625rem; background: var(--line-soft); margin: 0.5rem 1rem; }
.suggest-list { display: flex; flex-direction: column; }
.suggest-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem;
  border-radius: 0.5rem; cursor: pointer; transition: background 0.15s;
}
.suggest-item:hover { background: rgba(232,93,38,0.06); }
.suggest-item .si-query { flex: 1; font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.suggest-item .si-query mark { background: rgba(232,93,38,0.2); color: var(--brand); padding: 0 0.125rem; border-radius: 0.125rem; }
.suggest-item .si-hint { font-size: 0.6875rem; color: var(--ink-40); flex-shrink: 0; }
.suggest-item .si-source { font-size: 0.625rem; padding: 0.0625rem 0.375rem; border-radius: 0.1875rem; flex-shrink: 0; }
.suggest-item[data-source="template"] .si-source, .suggest-item[data-source="city_match"] .si-source { background: rgba(63,98,18,0.1); color: var(--forest); }
.suggest-item[data-source="history"] .si-source { background: rgba(1,119,115,0.1); color: #0f766e; }
.suggest-item[data-source="llm"] .si-source { background: linear-gradient(135deg, var(--brand), #ea580c); color: white; }
.suggest-item[data-source="hot"] .si-source { background: rgba(161,98,7,0.1); color: var(--amber); }
.trending-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 0.5rem; padding-bottom: 0.75rem; }
.trending-card {
  padding: 0.625rem 0.75rem; border: 0.0625rem solid var(--line-soft); border-radius: 0.625rem;
  cursor: pointer; transition: all 0.2s; display: flex; flex-direction: column; gap: 0.125rem;
}
.trending-card:hover { border-color: var(--brand); background: rgba(232,93,38,0.04); transform: translateY(-0.125rem); }
.trending-card .tc-title { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
.trending-card .tc-hint { font-size: 0.75rem; color: var(--ink-40); }
.trending-card.tc-combo .tc-title::before { content: "✨ "; }

/* ---------- 语音面板 ---------- */
.voice-panel {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(28,25,23,0.92); display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: white; animation: fadeIn 0.3s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.voice-ring { position: relative; width: 12.5rem; height: 12.5rem; display: flex; align-items: center; justify-content: center; margin-bottom: 2rem; }
.ring { position: absolute; border: 0.125rem solid var(--brand); border-radius: 50%; animation: ringWave 2s infinite; }
.ring-1 { width: 100%; height: 100%; animation-delay: 0s; }
.ring-2 { width: 80%; height: 80%; animation-delay: 0.5s; }
.ring-3 { width: 60%; height: 60%; animation-delay: 1s; }
@keyframes ringWave { 0% { opacity: 1; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.4); } }
.ring-center { width: 5rem; height: 5rem; background: var(--brand); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.25rem; }
.voice-text { font-family: "Noto Serif SC", serif; font-size: 1.5rem; max-width: 37.5rem; text-align: center; margin-bottom: 0.75rem; min-height: 2.25rem; }
.voice-hint { color: rgba(255,255,255,0.5); font-size: 0.8rem; }

/* ---------- 加载态 ---------- */
.loading { position: relative; z-index: 1; max-width: 50rem; margin: 0 auto; padding: 2.5rem 2rem; animation: fadeInUp 0.5s; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
.loading-card { background: white; border: 0.125rem solid var(--ink); border-radius: 1rem; padding: 2.5rem; box-shadow: var(--shadow); }
.loading-title { font-family: "Noto Serif SC", serif; font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }
.loading-sub { color: var(--ink-40); font-size: 0.875rem; margin-bottom: 2rem; }
.steps { display: flex; flex-direction: column; gap: 1rem; }
.step { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; background: var(--paper); border-radius: 0.625rem; border-left: 0.1875rem solid var(--line); transition: border-color 0.3s, background 0.3s; }
.step.active { border-left-color: var(--brand); background: rgba(232,93,38,0.05); }
.step.done { border-left-color: var(--forest); }
.step-num { font-family: "Caveat", cursive; font-size: 1.5rem; color: var(--ink-40); width: 2rem; }
.step.active .step-num { color: var(--brand); }
.step.done .step-num { color: var(--forest); }
.step-label { flex: 1; font-weight: 500; }
.step-status { font-size: 0.75rem; padding: 0.1875rem 0.625rem; border-radius: 0.3125rem; background: var(--paper-dark); color: var(--ink-40); }
.step.active .step-status { background: var(--brand); color: white; animation: blink 1.2s infinite; }
.step.done .step-status { background: var(--forest); color: white; }
@keyframes blink { 50% { opacity: 0.6; } }

/* ---------- 攻略展示 ---------- */
.result { position: relative; z-index: 1; max-width: 68.75rem; margin: 0 auto; padding: 2.5rem 2.5rem 5rem; animation: fadeInUp 0.6s; }
.strategy-header { background: white; border: 0.125rem solid var(--ink); border-radius: 1rem; padding: 3rem; box-shadow: 1rem 1rem 0 0 var(--brand); margin-bottom: 3rem; position: relative; overflow: hidden; }
.strategy-header::before { content: ""; position: absolute; top: 0; left: 0; width: 0.5rem; height: 100%; background: var(--brand); }
.strategy-tag { font-family: "Caveat", cursive; font-size: 1.125rem; color: var(--ink-40); letter-spacing: 0.125rem; margin-bottom: 0.5rem; }
.strategy-title { font-family: "Noto Serif SC", serif; font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 900; line-height: 1.2; margin-bottom: 1.5rem; letter-spacing: -0.01em; }
.strategy-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.strategy-meta span { padding: 0.375rem 0.875rem; background: var(--paper); border: 0.0625rem solid var(--line); border-radius: 0.5rem; font-size: 0.8rem; color: var(--ink-60); }
.strategy-summary { color: var(--ink-60); font-size: 1rem; line-height: 1.8; padding: 1rem 1.25rem; background: var(--paper); border-left: 0.1875rem solid var(--forest); border-radius: 0 0.625rem 0.625rem 0; white-space: pre-wrap; }
.voice-actions { margin-top: 1.5rem; display: flex; gap: 0.75rem; flex-wrap: wrap; }
.voice-play-btn, .voice-stop-btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1.25rem; border-radius: 999px; border: none; cursor: pointer; font-size: 0.875rem; font-weight: 500; transition: all 0.2s; }
.voice-play-btn { background: var(--ink); color: var(--paper); }
.voice-play-btn:hover { background: var(--brand); }
.voice-stop-btn { background: var(--paper-dark); color: var(--ink); }
.voice-stop-btn:hover { background: #e7d9c2; }

/* 天数卡片 */
.days-container { display: flex; flex-direction: column; gap: 1.75rem; }
.day-card { background: white; border: 0.125rem solid var(--ink); border-radius: 1rem; overflow: hidden; box-shadow: 0 0.5rem 1.875rem -0.625rem rgba(28,25,23,0.1); animation: fadeInUp 0.5s both; }
.day-card:nth-child(1) { animation-delay: 0.1s; }
.day-card:nth-child(2) { animation-delay: 0.2s; }
.day-card:nth-child(3) { animation-delay: 0.3s; }
.day-head { padding: 1.5rem 2rem; background: linear-gradient(135deg, var(--ink) 0%, #2c2824 100%); color: var(--paper); display: flex; align-items: center; gap: 1.25rem; }
.day-num { font-family: "Caveat", cursive; font-size: 3.5rem; color: var(--brand); line-height: 1; min-width: 5rem; }
.day-title { font-family: "Noto Serif SC", serif; font-size: 1.375rem; font-weight: 600; }
.day-body { padding: 1.75rem 2rem; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.slot { display: grid; grid-template-columns: 5rem 1fr; gap: 1.25rem; padding: 1rem 0; border-bottom: 0.0625rem dashed var(--line); }
.slot:last-child { border-bottom: none; }
.slot-name { font-family: "Caveat", cursive; font-size: 1.25rem; color: var(--brand); font-weight: 700; padding-top: 0.25rem; }
.slot-items { display: flex; flex-direction: column; gap: 0.75rem; }
.poi-item { padding: 0.75rem 1rem; background: var(--paper); border-radius: 0.625rem; border-left: 0.1875rem solid var(--brand-dark); transition: transform 0.2s; }
.poi-item:hover { transform: translateX(0.25rem); }
.poi-name { font-weight: 600; color: var(--ink); font-size: 0.9375rem; margin-bottom: 0.25rem; }
.poi-desc { font-size: 0.8125rem; color: var(--ink-60); line-height: 1.6; }
.poi-tip { font-size: 0.75rem; color: var(--forest); margin-top: 0.25rem; font-style: italic; }
.day-transport { grid-column: 1 / -1; margin-top: 0.5rem; padding: 0.75rem 1.25rem; background: rgba(63,98,18,0.08); border-radius: 0.625rem; font-size: 0.8125rem; color: var(--forest); display: flex; align-items: center; gap: 0.625rem; }
.day-transport::before { content: "🚗"; }

/* 贴士区 */
.tips-section { margin-top: 3rem; background: white; border: 0.125rem solid var(--ink); border-radius: 1rem; padding: 2rem 2.5rem; box-shadow: 0.75rem 0.75rem 0 0 var(--forest); }
.tips-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 0.125rem dashed var(--line); }
.tips-num { font-family: "Caveat", cursive; font-size: 1.75rem; color: var(--amber); }
.tips-head h3 { font-family: "Noto Serif SC", serif; font-size: 1.375rem; }
.tips-content { color: var(--ink-60); white-space: pre-wrap; line-height: 1.9; font-size: 0.9375rem; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 1; background: var(--ink); color: var(--paper); padding: 3.75rem 3rem 1.5rem; margin-top: 5rem; }
.footer-inner { max-width: 75rem; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2.5rem; }
.footer-brand { font-family: "Noto Serif SC", serif; font-size: 1.375rem; font-weight: 900; margin-bottom: 0.75rem; }
.footer-about { color: rgba(250,246,240,0.6); font-size: 0.875rem; line-height: 1.7; max-width: 20rem; }
.footer-title { font-family: "Noto Serif SC", serif; font-size: 0.9375rem; color: var(--brand); margin-bottom: 0.75rem; }
.footer-col ul { list-style: none; }
.footer-col li { font-size: 0.875rem; color: rgba(250,246,240,0.7); padding: 0.25rem 0; }
.api-hint code { display: block; font-family: ui-monospace, monospace; font-size: 0.75rem; color: var(--forest-soft); padding: 0.25rem 0; }
.copyright { margin-top: 3rem; padding-top: 1.5rem; border-top: 0.0625rem solid rgba(250,246,240,0.15); text-align: center; font-size: 0.75rem; color: rgba(250,246,240,0.4); }

/* =========================================
   响应式断点 —— 覆盖所有设备
   ========================================= */

/* 平板：≤ 1024px */
@media (max-width: 64rem) {
  .hero { grid-template-columns: 1fr; padding: 2.5rem 2rem 4rem; gap: 2rem; }
  .hero-visual { order: -1; max-width: 18.75rem; margin: 0 auto; }
  .nav { gap: 1.25rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* 手机大：≤ 640px */
@media (max-width: 40rem) {
  .topbar { padding: 0.75rem 1.25rem; }
  .nav { display: none; }  /* 移动端不显示导航（App 体验） */
  .hero { padding: 1.5rem 1.25rem 3rem; gap: 1.5rem; }
  .hero-title { font-size: clamp(2rem, 9vw, 2.75rem); }
  .hero-sub { font-size: 0.875rem; margin-bottom: 1.5rem; }
  .input-card { box-shadow: 0.375rem 0.375rem 0 0 var(--ink); }
  .input-card:focus-within { box-shadow: 0.5rem 0.5rem 0 0 var(--brand); }
  .submit-btn { padding: 0.625rem 1rem; font-size: 0.8125rem; }
  .submit-btn span { display: none; }  /* 手机只显示箭头图标 */
  .quick-chips { gap: 0.5rem; margin-top: 1rem; }
  .chip { padding: 0.3125rem 0.75rem; font-size: 0.75rem; }

  .strategy-header { padding: 1.5rem; box-shadow: 0.5rem 0.5rem 0 0 var(--brand); }
  .strategy-title { font-size: 1.75rem; }
  .strategy-meta span { font-size: 0.75rem; padding: 0.25rem 0.625rem; }

  .day-head { padding: 1.25rem 1.5rem; }
  .day-num { font-size: 2.75rem; min-width: 4rem; }
  .day-title { font-size: 1.125rem; }
  .day-body { padding: 1.25rem 1.5rem; }
  .slot { grid-template-columns: 3.5rem 1fr; gap: 0.75rem; padding: 0.75rem 0; }
  .slot-name { font-size: 1rem; }
  .poi-name { font-size: 0.875rem; }

  .tips-section { padding: 1.5rem; box-shadow: 0.5rem 0.5rem 0 0 var(--forest); }

  .footer { padding: 2.5rem 1.5rem 1rem; margin-top: 3rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* 小屏手机：≤ 375px */
@media (max-width: 23.4375rem) {
  .hero-title { font-size: 1.75rem; }
  .submit-btn { padding: 0.625rem; border-radius: 0.625rem; }
  .mic-btn { width: 2.25rem; height: 2.25rem; }
  .mic-icon { font-size: 1rem; }
  .poi-name { font-size: 0.8125rem; }
  .poi-desc { font-size: 0.75rem; }
}

/* 全面屏 / 曲面屏安全区 */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .topbar { padding-top: calc(0.75rem + env(safe-area-inset-top)); }
}

/* 横屏手机优化 */
@media (orientation: landscape) and (max-height: 31.25rem) {
  .hero { padding: 1rem 1.5rem 2rem; gap: 1rem; grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 1.75rem; }
  .hero-visual { max-width: 15rem; }
}

/* 平板横屏 / 桌面大屏 */
@media (min-width: 80rem) {
  .hero { padding: 5rem 4rem 7rem; gap: 5rem; }
  .hero-title { font-size: 4.5rem; }
  .hero-sub { font-size: 1.0625rem; }
  .strategy-title { font-size: 3.75rem; }
}

/* 鸿蒙折叠屏适配（展开态） */
@media (min-width: 60rem) and (min-aspect-ratio: 2/1) {
  .hero { grid-template-columns: 1fr 1fr 1fr; }
  .hero-visual { grid-column: span 1; }
  .input-zone { grid-column: span 2; }
}

/* =========================================
   顶栏：玻璃态升级（Glassmorphism 2.0）
   ========================================= */
.topbar {
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.brand-mark {
  color: var(--brand);
  font-size: 1.375rem;
  animation: brandPulse 3s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 12px var(--brand-glow)); }
}
.nav a::after {
  height: 0.15rem;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 0.125rem;
}

/* =========================================
   底部悬浮导航（唯一权威实现）
   位置：移动端固定在视口底部
   滚动容器：body 不滚，内容区滚
   高度：由 --tabbar-h 变量统一管理
   ========================================= */
.bottom-nav {
  /* 唯一权威定位：fixed 在视口底部，不随内容滚动 */
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tabbar-bottom) + 0.75rem);
  width: min(92vw, 30rem);
  height: var(--tabbar-h);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0.5rem;
  z-index: 60;

  /* Glassmorphism 2.0 */
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: 1.75rem;
  box-shadow: var(--shadow-lg), var(--shadow-brand);

  /* 动画：从底部滑入 */
  animation: bottomNavIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bottomNavIn {
  from { transform: translateX(-50%) translateY(100%); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* 桌面隐藏，移动端显示 */
@media (min-width: 40.0625rem) {  /* ≥ 641px */
  .bottom-nav { display: none; }
}

/* 导航项 */
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1875rem;
  padding: 0.375rem 0.25rem;
  border-radius: var(--r-md);
  color: var(--ink-40);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  border: none;
}
.bnav-item .bnav-icon {
  width: 1.5rem; height: 1.5rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bnav-item .bnav-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.bnav-item:hover {
  color: var(--ink);
}
.bnav-item.active {
  color: var(--brand);
  background: var(--brand-glow);
}
.bnav-item.active .bnav-icon {
  transform: translateY(-2px) scale(1.1);
}
/* 中间主按钮（更突出） */
.bnav-item.primary {
  transform: translateY(-0.5rem);
}
.bnav-item.primary .bnav-icon {
  width: 2rem; height: 2rem;
}
.bnav-item.primary.active {
  color: var(--paper);
  background: var(--brand);
  box-shadow: var(--shadow-brand);
}
.bnav-item.primary.active .bnav-icon {
  transform: scale(1.15);
}

/* =========================================
   浮动动作按钮 FAB
   悬浮在右下角，一键生成攻略
   ========================================= */
.fab {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--tabbar-h) + var(--tabbar-bottom) + 1rem);
  width: 3.5rem; height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand), 0 0 0 0 var(--brand-glow);
  z-index: 55;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: fabAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.fab:hover {
  transform: scale(1.08) rotate(90deg);
  box-shadow: 0 0 0 12px var(--brand-glow);
}
.fab:active { transform: scale(0.95); }
.fab svg { width: 1.5rem; height: 1.5rem; }
@keyframes fabAppear {
  from { opacity: 0; transform: scale(0.5) translateY(20px); }
  to { opacity: 1; transform: scale(1); }
}
/* 桌面隐藏 FAB（有顶栏导航就够了） */
@media (min-width: 40.0625rem) {
  .fab { display: none; }
}

/* =========================================
   骨架屏（Skeleton Loading）
   比传统 spinner 更高级、更有预期
   ========================================= */
.skeleton {
  background: linear-gradient(90deg,
    var(--paper-dark) 25%,
    var(--line-soft) 50%,
    var(--paper-dark) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text { height: 0.875rem; margin-bottom: 0.5rem; width: 80%; }
.skeleton-text.short { width: 40%; }
.skeleton-text.tall { height: 1.5rem; width: 60%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card {
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
}

/* =========================================
   滚动进入视口动画（IntersectionObserver 触发）
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* =========================================
   微交互动画库
   ========================================= */
.press-effect {
  transition: transform 0.15s ease;
}
.press-effect:active {
  transform: scale(0.96);
}
.float-hover {
  transition: transform 0.3s ease;
}
.float-hover:hover {
  transform: translateY(-4px);
}
.shimmer-text {
  background: linear-gradient(90deg,
    var(--brand) 0%,
    var(--brand-light) 50%,
    var(--brand) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerMove 3s linear infinite;
}
@keyframes shimmerMove {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =========================================
   卡片悬浮效果（通用）
   ========================================= */
.card-hover {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* =========================================
   安全区最终适配（放在最后确保优先级）
   ========================================= */
@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 0.75rem);
  }
  .bottom-nav {
    bottom: calc(env(safe-area-inset-bottom) + 0.5rem);
  }
  .fab {
    bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 1rem);
  }
}

/* =========================================
   天气卡片（攻略页头嵌入）
   ========================================= */
.weather-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(232,93,38,0.06), rgba(45,106,79,0.06));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  margin: 1rem 0;
  flex-wrap: wrap;
  animation: fadeInUp 0.5s;
}
.weather-card .wc-loading { color: var(--ink-40); font-size: 0.8125rem; }
.wc-main { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.wc-icon { font-size: 2rem; }
.wc-temp { font-size: 2.25rem; font-weight: 900; font-family: "Noto Serif SC", serif; color: var(--brand); line-height: 1; }
.wc-text { font-size: 0.875rem; color: var(--ink-60); }
.wc-detail { display: flex; gap: 1rem; flex-wrap: wrap; }
.wc-d-item { display: flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--ink-40); }
.wc-d-item b { color: var(--ink-60); font-weight: 600; }
.wc-divider { width: 1px; height: 2rem; background: var(--line-soft); }
.wc-forecast {
  display: flex; gap: 0.5rem; margin-left: auto;
  padding-left: 1rem; border-left: 1px solid var(--line-soft);
}
.wc-fc-item { text-align: center; padding: 0.5rem 0.75rem; background: var(--paper); border-radius: var(--r-sm); min-width: 4.5rem; }
.wc-fc-day { font-size: 0.6875rem; color: var(--ink-40); margin-bottom: 0.125rem; }
.wc-fc-temp { font-size: 0.8125rem; font-weight: 700; color: var(--brand); }
.wc-fc-text { font-size: 0.625rem; color: var(--ink-40); margin-top: 0.125rem; }

/* =========================================
   Leaflet 行程地图
   ========================================= */
.map-wrap {
  margin: 1rem 0;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-2);
}
.map-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 1rem; background: var(--paper-2);
  border-bottom: 1px solid var(--line-soft);
}
.map-title { font-weight: 600; font-size: 0.875rem; }
.map-toggle {
  background: none; border: 1px solid var(--line); padding: 0.25rem 0.75rem;
  border-radius: var(--r-full); font-size: 0.75rem; cursor: pointer; color: var(--ink-60);
}
.map-toggle:hover { background: var(--paper-dark); }
.leaflet-container { height: 22rem; width: 100%; background: var(--paper-2); }

/* =========================================
   操作按钮组（攻略页头）
   ========================================= */
.action-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px dashed var(--line-soft);
}
.action-btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5rem 1rem; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--paper);
  font-size: 0.8125rem; color: var(--ink-60); cursor: pointer;
  transition: all 0.2s;
}
.action-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-glow); }
.action-btn.secondary { background: transparent; }
.action-btn.faved { background: var(--brand); color: white; border-color: var(--brand); }

/* 旧 voice-actions 兼容 */
.voice-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }

/* =========================================
   POI 导航 / 酒店预订按钮
   ========================================= */
.poi-actions { display: flex; gap: 0.375rem; flex-wrap: wrap; margin-top: 0.5rem; }
.poi-nav {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.25rem 0.625rem; border-radius: var(--r-sm);
  background: var(--paper-2); color: var(--ink-60);
  font-size: 0.6875rem; text-decoration: none;
  border: 1px solid var(--line-soft);
  transition: all 0.2s;
}
.poi-nav:hover { background: var(--brand); color: white; border-color: var(--brand); }
.poi-nav.hotel { background: rgba(45,106,79,0.08); color: var(--forest); border-color: rgba(45,106,79,0.2); }
.poi-nav.hotel:hover { background: var(--forest); color: white; }
.poi-nav.food { background: rgba(233,196,106,0.15); color: var(--amber-dark); border-color: rgba(233,196,106,0.35); }
.poi-nav.food:hover { background: var(--amber-dark, #c89b1e); color: white; }
.poi-nav.spot { background: rgba(232,93,38,0.08); color: var(--brand); border-color: rgba(232,93,38,0.25); }
.poi-nav.spot:hover { background: var(--brand); color: white; }
.poi-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }

/* =========================================
   Chip 分类样式
   ========================================= */
.chip-style { border-color: rgba(232,93,38,0.3); }
.chip-day { border-color: rgba(45,106,79,0.3); }
.chip-budget { border-color: rgba(233,196,106,0.4); }
.chip-sep { color: var(--ink-20); padding: 0 0.25rem; }
.chip-style:hover { border-color: var(--brand); background: var(--brand-glow); }
.chip-day:hover { border-color: var(--forest); color: var(--forest); background: rgba(45,106,79,0.08); }
.chip-budget:hover { border-color: var(--amber-dark); color: var(--amber-dark); background: rgba(233,196,106,0.12); }

/* =========================================
   移动端适配（攻略页头紧凑化）
   ========================================= */
@media (max-width: 40rem) {
  .weather-card {
    padding: 0.75rem 1rem; gap: 0.75rem;
  }
  .wc-temp { font-size: 1.75rem; }
  .wc-icon { font-size: 1.5rem; }
  .wc-forecast { padding-left: 0.75rem; gap: 0.375rem; }
  .wc-fc-item { min-width: 3.75rem; padding: 0.375rem 0.5rem; }
  .action-btn { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
  .leaflet-container { height: 16rem; }
}

/* 横屏手机更紧凑 */
@media (orientation: landscape) and (max-height: 31.25rem) {
  .weather-card { padding: 0.5rem 0.75rem; }
  .wc-fc-item { display: none; }  /* 横屏隐藏 3 天预报，只留当前天气 */
}


