:root {
  --bg: #FFF8F1;
  --bg2: #FDEFE2;
  --primary: #2E8B83;     /* 懒 natural teal */
  --primary-d: #1F6B64;
  --accent: #F2935A;      /* 暖橙 */
  --ink: #3D342B;
  --ink-soft: #7A6A58;
  --card: #FFFFFF;
  --line: #F0E4D6;
  --shadow: 0 10px 30px rgba(120, 90, 60, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg2) 100%);
  min-height: 100vh;
  line-height: 1.6;
}

/* 顶部 */
.hero {
  background: linear-gradient(120deg, #2E8B83 0%, #3FA98E 55%, #F2935A 130%);
  color: #fff;
  padding: 18px 0 26px;
  box-shadow: var(--shadow);
}
.hero-inner {
  max-width: 960px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); }
.brand-text h1 { margin: 0; font-size: 26px; letter-spacing: 2px; }
.brand-text p { margin: 2px 0 0; font-size: 13px; opacity: .92; }
.mode-switch { display: flex; background: rgba(255,255,255,.18); border-radius: 999px; padding: 4px; }
.mode-btn {
  border: 0; background: transparent; color: #fff; padding: 8px 14px; border-radius: 999px;
  cursor: pointer; font-size: 13px; transition: .2s; white-space: nowrap;
}
.mode-btn.active { background: #fff; color: var(--primary-d); font-weight: 700; }

/* 布局 */
.container { max-width: 960px; margin: 22px auto; padding: 0 20px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.card-title { margin: 0 0 16px; font-size: 18px; }
.card-title::before { content: "🧭 "; }

/* 表单 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.field.span2 { grid-column: span 2; }
.field input, .field select {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-size: 15px; color: var(--ink); background: #fff; outline: none; transition: .15s;
}
.field input:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46,139,131,.12); }

.chips { margin: 16px 0 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.chips-label { font-size: 13px; color: var(--ink-soft); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 13px; transition: .15s;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

.btn-primary {
  margin-top: 18px; width: 100%; border: 0; border-radius: 14px; padding: 14px;
  background: linear-gradient(120deg, var(--primary), var(--accent)); color: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 18px rgba(46,139,131,.3);
  transition: transform .1s;
}
.btn-primary:active { transform: translateY(1px); }
.mode-hint { text-align: center; font-size: 12px; color: var(--ink-soft); margin: 10px 0 0; }

/* 结果 */
.result { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

.summary-banner {
  background: linear-gradient(120deg, #2E8B83, #3FA98E); color: #fff; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.summary-banner h2 { margin: 0 0 6px; font-size: 20px; }
.summary-banner .route { font-size: 14px; opacity: .95; }

.budget-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center;
}
.stat .num { font-size: 22px; font-weight: 800; color: var(--primary-d); }
.stat .lbl { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.stat.warn .num { color: #D9534F; }

.section-h { font-size: 16px; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-h::before { content: ""; width: 6px; height: 18px; background: var(--accent); border-radius: 3px; display: inline-block; }

/* 时间轴 */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.day { position: relative; margin-bottom: 18px; }
.day::before {
  content: ""; position: absolute; left: -22px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--primary);
}
.day-tag { display: inline-block; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; }
.spot {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
  display: flex; gap: 12px; align-items: flex-start;
}
.spot .ic { font-size: 20px; line-height: 1.2; }
.spot .body { flex: 1; min-width: 0; }
.spot .name { font-weight: 700; font-size: 15px; }
.spot .meta { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.spot .link { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--primary-d); text-decoration: none; font-weight: 600; }
.spot .link:hover { text-decoration: underline; }
.spot img.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.spot.real { border-color: #BFE3DC; background: #FBFFFE; }

/* 预算表 */
.budget-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.budget-table th, .budget-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.budget-table th { color: var(--ink-soft); font-weight: 600; font-size: 13px; }
.budget-table td.amt { text-align: right; font-variant-numeric: tabular-nums; }
.budget-table tr.total td { font-weight: 800; font-size: 15px; border-top: 2px solid var(--primary); }
.budget-table .over { color: #D9534F; }

/* 清单 */
.packing { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pack-group { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.pack-group h4 { margin: 0 0 8px; font-size: 14px; color: var(--primary-d); }
.pack-group label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; cursor: pointer; }
.pack-group input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 地图 */
.map-wrap { background: #EAF4F1; border: 1px solid var(--line); border-radius: 16px; padding: 10px; overflow: hidden; }
.map-wrap svg { width: 100%; height: auto; display: block; }
.map-note { font-size: 12px; color: var(--ink-soft); margin-top: 6px; text-align: center; }

.badge-real { display: inline-block; background: #2E8B83; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px; margin-left: 8px; }

/* loading */
.loading {
  position: fixed; inset: 0; background: rgba(255,248,241,.82); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; z-index: 50; backdrop-filter: blur(2px);
}
.spinner { width: 44px; height: 44px; border: 4px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#loadingText { color: var(--ink-soft); font-size: 14px; }

.foot { text-align: center; color: var(--ink-soft); font-size: 12px; padding: 10px 20px 30px; }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .field.span2 { grid-column: span 1; }
  .budget-cards { grid-template-columns: repeat(2, 1fr); }
  .packing { grid-template-columns: 1fr; }
  .brand-text h1 { font-size: 22px; }
}
