:root {
  --bg: #FFF9F2;
  --bg-2: #FFF3E8;
  --card: #FFFFFF;
  --ink: #3F3A4E;
  --muted: #8B8394;
  --line: #F2E6DA;
  --coral: #FF8B7B;
  --coral-dark: #F07060;
  --coral-soft: #FFE4DC;
  --peach: #FFD9C7;
  --mint: #9FE3C8;
  --mint-soft: #E4F8F0;
  --sky: #A9D6F5;
  --lilac: #D9CFFB;
  --yellow: #FFD166;
  --ok: #2F9E75;
  --warn: #C77A1E;
  --bad: #D9534F;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 2px 0 rgba(63, 58, 78, 0.04), 0 12px 30px rgba(63, 58, 78, 0.07);
  --tabbar: 76px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 209, 199, 0.45), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(159, 227, 200, 0.35), transparent 22rem),
    radial-gradient(circle at 50% 100%, rgba(169, 214, 245, 0.22), transparent 26rem),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--coral-dark); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; display: block; }
::selection { background: var(--peach); }

.app-shell { max-width: 780px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 249, 242, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(242, 230, 218, 0.8);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); }
.brand-mark { flex: none; filter: drop-shadow(0 6px 12px rgba(255, 139, 123, 0.28)); }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 17px; font-weight: 750; letter-spacing: 0.3px; }
.brand-text small { font-size: 11px; color: var(--muted); margin-top: -1px; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 13px; border: 1px solid var(--line);
  background: #fff; color: #6E6578; display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; box-shadow: 0 2px 0 rgba(63, 58, 78, 0.04);
}
.icon-btn:active { transform: translateY(1px); background: var(--bg-2); }

/* ---------- 视图 ---------- */
.view { padding: 18px 16px calc(var(--tabbar) + 44px); }
@media (min-width: 760px) {
  .view { padding-left: 26px; padding-right: 26px; }
}
.page-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.page-head h2 { font-size: 22px; font-weight: 760; letter-spacing: 0.2px; }
.page-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.page-head .spacer { flex: 1; }
.back {
  width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-size: 24px; line-height: 1; padding-bottom: 3px;
}

.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; font-size: 15px; font-weight: 750; }
.section-title .more { margin-left: auto; font-size: 12px; color: var(--coral-dark); font-weight: 600; }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.small { font-size: 12.5px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px;
}
.card + .card { margin-top: 12px; }
.card-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.card-head h3 { font-size: 16px; font-weight: 750; }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-soft { background: linear-gradient(180deg, #fff, #FFFBF7); }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 22px 20px 18px;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, 0.55), transparent 8rem),
    linear-gradient(145deg, #FFB39F 0%, #FF8B7B 48%, #F07060 100%);
  color: #fff; box-shadow: 0 18px 40px rgba(240, 112, 96, 0.26);
}
.hero::after {
  content: ""; position: absolute; right: -26px; bottom: -34px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.13);
}
.hero-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.hero-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; opacity: 0.82; }
.hero h1 { font-size: clamp(18px, 4.9vw, 24px); line-height: 1.3; font-weight: 800; margin: 8px 0 4px; position: relative; z-index: 1; padding-right: 60px; overflow-wrap: anywhere; word-break: break-word; }
.hero .hero-sub { font-size: 13px; opacity: 0.9; position: relative; z-index: 1; }
.hero-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 1; }
.hero-route .route-chip { background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.24); color: #fff; }
.hero-route .route-arrow { opacity: 0.7; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; position: relative; z-index: 1; }
.hero-pill { background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.2); padding: 5px 10px; border-radius: 999px; font-size: 11.5px; }
.hero-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.hero-actions .btn { flex: 1; }
.hero .btn-primary { background: #fff; color: var(--coral-dark); box-shadow: 0 4px 0 rgba(183, 70, 58, 0.18); }
.hero .btn-ghost { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.hero-mascot {
  position: absolute; right: 6px; top: 4px; width: 74px; height: 74px; opacity: 0.92;
  animation: floaty 5s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }

.route-chip { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 11.5px; color: #6E6578; }
.route-arrow { color: var(--muted); font-size: 12px; }

/* ---------- 统计 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 13px 12px;
  box-shadow: 0 2px 0 rgba(63, 58, 78, 0.03);
}
.stat-value { font-size: 20px; font-weight: 800; letter-spacing: 0.2px; }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.stat-note { font-size: 10.5px; color: var(--coral-dark); margin-top: 3px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 9px 16px; border-radius: 14px; border: 1px solid transparent;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 13.5px;
  box-shadow: 0 3px 0 rgba(63, 58, 78, 0.06);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(63, 58, 78, 0.06); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 4px 0 #D85F4F; }
.btn-primary:active { box-shadow: 0 1px 0 #D85F4F; }
.btn-soft { background: var(--coral-soft); color: #B94E40; border-color: #FFD1C5; }
.btn-mint { background: var(--mint-soft); color: #22785B; border-color: #C9F0E1; }
.btn-ghost { background: #fff; border-color: var(--line); color: #6E6578; box-shadow: none; }
.btn-danger { background: #FFF0EF; color: var(--bad); border-color: #FFD5D2; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 12px; border-radius: 11px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.fab {
  position: fixed; right: max(18px, calc((100vw - 780px) / 2 + 18px)); bottom: calc(var(--tabbar) + 16px);
  width: 54px; height: 54px; border-radius: 20px; border: 0; background: var(--coral); color: #fff;
  font-size: 28px; line-height: 1; box-shadow: 0 10px 24px rgba(240, 112, 96, 0.35), 0 4px 0 #D85F4F;
  z-index: 35; display: flex; align-items: center; justify-content: center;
}
.fab:active { transform: translateY(2px); box-shadow: 0 4px 10px rgba(240, 112, 96, 0.35); }

/* ---------- 徽章/chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; background: var(--bg-2); color: #7A6F66; border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.warn { background: #FFF3DE; color: var(--warn); border-color: #FFE3B3; }
.badge.ok { background: var(--mint-soft); color: var(--ok); border-color: #C9F0E1; }
.badge.risk-low { background: var(--mint-soft); color: var(--ok); border-color: #C9F0E1; }
.badge.risk-medium { background: #FFF3DE; color: var(--warn); border-color: #FFE3B3; }
.badge.risk-high { background: #FFF0EF; color: var(--bad); border-color: #FFD5D2; }
.badge.price { background: var(--coral-soft); color: #B94E40; border-color: #FFD1C5; }
.badge.estimate { background: #EEF2FF; color: #5566B8; border-color: #DDE4FF; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 7px 13px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; color: #6E6578;
  font-size: 12.5px; font-weight: 650; box-shadow: 0 2px 0 rgba(63, 58, 78, 0.03);
}
.chip small { font-size: 9.5px; color: var(--muted); font-weight: 500; }
.chip.active { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: 0 3px 0 #D85F4F; }
.chip.active small { color: rgba(255, 255, 255, 0.82); }
.chip:active { transform: translateY(1px); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12px; font-weight: 750; color: #6E6578; margin: 0 2px 6px; }
.hint { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; padding: 10px 13px; outline: none; font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(63, 58, 78, 0.03);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 139, 123, 0.12); }
.textarea { min-height: 84px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button {
  width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  font-size: 18px; line-height: 1; color: var(--coral-dark); box-shadow: 0 2px 0 rgba(63, 58, 78, 0.04);
}
.stepper .num { min-width: 34px; text-align: center; font-weight: 800; font-size: 16px; }
.switch { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.switch input { width: 42px; height: 24px; accent-color: var(--coral); }
.checkline { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; }
.checkline input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--coral); flex: none; }

/* ---------- 向导 ---------- */
.wizard-steps { display: flex; gap: 6px; margin: 0 0 16px; }
.wizard-steps span { height: 6px; flex: 1; border-radius: 999px; background: var(--line); }
.wizard-steps span.on { background: var(--coral); }
.wizard-title { font-size: 22px; font-weight: 800; margin: 2px 0 4px; }
.wizard-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.wizard-nav { display: flex; gap: 10px; margin-top: 18px; }
.wizard-nav .btn { flex: 1; }
.summary-box { background: var(--bg-2); border: 1px dashed #EBD7C8; border-radius: 18px; padding: 13px 14px; margin-top: 14px; }
.summary-box .line { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; padding: 3px 0; }
.summary-box .line b { font-weight: 750; }
.city-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.city-option {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 15px; padding: 10px 12px;
  box-shadow: 0 2px 0 rgba(63, 58, 78, 0.03);
}
.city-option.on { border-color: var(--coral); background: var(--coral-soft); }
.city-option strong { display: block; font-size: 13.5px; }
.city-option small { color: var(--muted); font-size: 10.5px; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 15px; padding: 10px 12px; }
.preset.on { border-color: var(--coral); background: var(--coral-soft); }
.preset strong { display: block; font-size: 13px; }
.preset small { color: var(--muted); font-size: 10.5px; }

/* ---------- 候选路线 ---------- */
.sort-tabs { display: flex; gap: 6px; margin: 0 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.sort-tabs button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 8px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sort-tabs button.on { background: var(--coral-soft); color: #B94E40; }
.candidate { position: relative; overflow: hidden; }
.candidate.best { border-color: #FFC2B3; box-shadow: 0 10px 28px rgba(255, 139, 123, 0.16); }
.candidate-head { display: flex; align-items: flex-start; gap: 10px; }
.candidate-head h3 { font-size: 16px; font-weight: 800; line-height: 1.35; }
.candidate-head .sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.candidate-price { text-align: right; white-space: nowrap; }
.candidate-price b { display: block; font-size: 20px; color: var(--coral-dark); letter-spacing: -0.4px; }
.candidate-price small { font-size: 10.5px; color: var(--muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.candidate-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: #6E6578; }
.candidate-meta span { display: inline-flex; align-items: center; gap: 4px; }
.legs { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.leg-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 11.5px; }
.leg-row .leg-date { width: 48px; flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.leg-row .leg-route { flex: 1; min-width: 0; }
.leg-row .leg-route b { font-weight: 750; }
.leg-row .leg-route small { color: var(--muted); display: block; font-size: 10.5px; margin-top: 1px; }
.leg-row .leg-price { text-align: right; font-weight: 800; white-space: nowrap; }
.leg-row .leg-price small { display: block; font-weight: 500; color: var(--muted); font-size: 9.5px; }
.leg-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.leg-link { font-size: 10.5px; color: #6E6578; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; }
.leg-link:active { background: var(--coral-soft); }
details.legs-detail { margin-top: 10px; }
details.legs-detail summary { cursor: pointer; font-size: 12px; color: var(--coral-dark); font-weight: 700; list-style: none; }
details.legs-detail summary::-webkit-details-marker { display: none; }
.candidate-actions { display: flex; gap: 8px; margin-top: 12px; }
.candidate-actions .btn { flex: 1; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; }
.day-card { position: relative; margin-bottom: 14px; }
.day-head { display: flex; align-items: flex-start; gap: 10px; padding: 0 2px 8px; }
.day-date { flex: none; width: 52px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 3px; box-shadow: 0 2px 0 rgba(63, 58, 78, 0.03); }
.day-date b { display: block; font-size: 17px; line-height: 1.1; }
.day-date small { font-size: 9.5px; color: var(--muted); }
.day-title { flex: 1; min-width: 0; padding-top: 2px; }
.day-title h3 { font-size: 15px; font-weight: 800; }
.day-title .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.day-card .card { padding: 12px 13px; }
.item-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.item-row:last-child { border-bottom: 0; }
.item-time { flex: none; width: 44px; font-size: 10.5px; color: var(--muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.item-thumb { flex: none; width: 54px; height: 54px; border-radius: 13px; object-fit: cover; background: var(--bg-2); border: 1px solid var(--line); }
.item-thumb.ico { display: flex; align-items: center; justify-content: center; font-size: 22px; color: #8B7E70; }
.item-body { flex: 1; min-width: 0; }
.item-body h4 { font-size: 13.5px; font-weight: 750; line-height: 1.35; }
.item-body .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.item-body .meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.item-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.item-actions button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 3px 7px; font-size: 10px; color: #6E6578; }
.item-actions button.on { background: var(--coral-soft); border-color: #FFC2B3; color: #B94E40; }
.transport-row { display: flex; align-items: center; gap: 6px; padding: 4px 0 4px 52px; color: var(--muted); font-size: 10.5px; }
.transport-row .dash { flex: 1; border-top: 1px dashed var(--line); }
.day-summary { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 8px; }
.lodging-row { display: flex; align-items: center; gap: 9px; background: var(--bg-2); border: 1px dashed #EBD7C8; border-radius: 13px; padding: 8px 10px; margin-top: 8px; }
.lodging-row img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.lodging-row b { font-size: 12px; display: block; }
.lodging-row small { font-size: 10px; color: var(--muted); }

/* ---------- 吃住玩 ---------- */
.tabs-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs-scroll .chip { flex: none; }
.poi-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .poi-grid { grid-template-columns: 1fr 1fr; } }
.poi-card { overflow: hidden; padding: 0; cursor: pointer; }
.poi-card:active { transform: translateY(1px); }
.poi-img { width: 100%; height: 150px; object-fit: cover; background: var(--bg-2); }
.poi-body { padding: 12px 13px 13px; }
.poi-body h3 { font-size: 14.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.poi-body .sub { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; }
.poi-body .summary { font-size: 11.5px; color: #6E6578; margin-top: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poi-body .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.heat { color: #F5A623; letter-spacing: 1px; font-size: 11px; white-space: nowrap; }
.heat small { color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.poi-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.poi-toolbar .input { flex: 1; min-height: 38px; font-size: 13px; }
.filter-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.filter-toggle input { accent-color: var(--coral); }

/* ---------- 图片画廊 ---------- */
.gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 0 6px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 86%; height: 230px; object-fit: cover; border-radius: 18px; scroll-snap-align: center; background: var(--bg-2); border: 1px solid var(--line); }
.detail-hero { display: flex; flex-direction: column; gap: 8px; }
.detail-hero h3 { font-size: 20px; font-weight: 800; }
.detail-hero .sub { font-size: 12px; color: var(--muted); }
.info-list { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.info-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.info-row:last-child { border-bottom: 0; }
.info-row .k { flex: none; width: 64px; color: var(--muted); font-size: 11px; padding-top: 1px; }
.info-row .v { flex: 1; min-width: 0; }
.info-row .v b { font-weight: 750; }
.tip-list { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: #6E6578; line-height: 1.65; }
.tip-list li { margin-bottom: 3px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.detail-actions .btn { flex: 1; }
.source-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.source-links a { font-size: 10.5px; color: #6E6578; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; }

/* ---------- 预算 ---------- */
.budget-hero { background: linear-gradient(145deg, #FFF3E0, #FFE4DC); border: 1px solid #FFD1C5; }
.budget-total { font-size: 34px; font-weight: 850; letter-spacing: -1px; color: #B94E40; line-height: 1.1; }
.budget-per { font-size: 12px; color: #8B6A60; margin-top: 4px; }
.budget-bars { margin-top: 14px; }
.budget-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 12px; }
.budget-row .b-label { width: 78px; flex: none; color: #6E6578; }
.budget-row .b-track { flex: 1; display: block; height: 9px; border-radius: 999px; background: #F7EADF; overflow: hidden; }
.budget-row .b-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--coral), #FFB39F); }
.budget-row .b-amount { width: 76px; text-align: right; font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tip-card { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.tip-card:last-child { border-bottom: 0; }
.tip-card .tip-ico { flex: none; width: 34px; height: 34px; border-radius: 12px; background: var(--mint-soft); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.tip-card b { font-size: 12.5px; }
.tip-card p { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tip-card .save { margin-left: auto; font-size: 11px; color: var(--ok); font-weight: 800; white-space: nowrap; }

/* ---------- 设置/注意事项 ---------- */
.settings-group { margin-bottom: 14px; }
.settings-group h3 { font-size: 13px; font-weight: 800; color: #6E6578; margin: 14px 2px 8px; }
.setting-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.setting-row:last-child { border-bottom: 0; }
.setting-row .s-label { flex: 1; }
.setting-row .s-label small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 1px; }
.setting-row .s-value { color: var(--muted); font-size: 11.5px; }
.token-box { display: flex; gap: 8px; }
.token-box .input { flex: 1; }
.credits-list { max-height: 220px; overflow: auto; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.credits-list a { color: #6E6578; }
.tips-section { margin-bottom: 14px; }
.tips-section h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.tips-item { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.tips-item:last-child { border-bottom: 0; }
.tips-item b { font-size: 12.5px; }
.tips-item p { font-size: 11.5px; color: #6E6578; margin-top: 2px; line-height: 1.6; }
.checklist-card .checkline { border-bottom: 1px dashed var(--line); }
.checklist-card .checkline:last-child { border-bottom: 0; }
.checkline span { font-size: 12.5px; }
.checkline.done span { color: var(--muted); text-decoration: line-through; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 34px 18px; background: #fff; border: 1px dashed #EBD7C8; border-radius: 24px; }
.empty-ico { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.empty h3 { font-size: 17px; font-weight: 800; }
.empty p { font-size: 12px; color: var(--muted); margin: 6px auto 14px; max-width: 280px; line-height: 1.6; }
.empty .btn { margin: 0 auto; }

/* ---------- 底栏 ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 780px; height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; z-index: 32;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: #A79F9A; font-size: 10.5px; font-weight: 650; position: relative;
}
.tabbar a .tab-ico { font-size: 20px; line-height: 1; }
.tabbar a.active { color: var(--coral-dark); }
.tabbar a.active::before {
  content: ""; position: absolute; top: 8px; width: 30px; height: 26px; border-radius: 999px;
  background: var(--coral-soft); z-index: -1;
}
.tabbar a:active { background: #FFF9F2; }

/* ---------- 弹层 ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(63, 58, 78, 0.38); backdrop-filter: blur(3px); }
.sheet {
  position: relative; width: 100%; max-width: 780px; max-height: 88vh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: 0 -18px 60px rgba(63, 58, 78, 0.22);
  animation: sheetUp 0.22s ease-out;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; font-size: 17px; font-weight: 800; }
.sheet-body { overflow: auto; padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 24px); transform: translateX(-50%) translateY(10px);
  background: rgba(63, 58, 78, 0.94); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 12px; opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 80; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: rgba(185, 78, 64, 0.96); }

/* ---------- 其他 ---------- */
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.loading-line { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, #F7EEE6, #FFF9F2, #F7EEE6); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 14px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.fade-up { animation: fadeUp 0.28s ease-out both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.print-only { display: none; }

/* ---------- v1.1 编辑 / 城市搜索 / 平台比价 / 航班时间线 / 交通 ---------- */
.hero-edit { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; padding: 0; text-align: left; cursor: pointer; }
.hero-edit:active { opacity: 0.8; }
.hero-edit-mini { margin-left: auto; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: 3px 9px; font-size: 10.5px; }
.hero-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 1; }
.edit-pencil { font-size: 10px; opacity: 0.65; margin-left: 3px; }
.hero-edit .route-chip { color: #fff; background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.24); }
.hero-edit .route-arrow { color: rgba(255,255,255,.7); }

.city-picker { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.city-input-row { display: flex; gap: 8px; }
.city-input-row .input { flex: 1; min-height: 40px; }
.city-selected-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.city-selected { border: 1px solid #FFD1C5; background: var(--coral-soft); color: #B94E40; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.city-selected span { opacity: 0.65; font-size: 10px; margin-left: 2px; }
.city-hot-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.chip-small { min-height: 28px; padding: 3px 9px; font-size: 11px; }
.city-input-row .btn { min-height: 40px; }

.editor-section { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin-bottom: 12px; }
.editor-section-title { font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.editor-section-title small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.trip-editor .label { margin-top: 8px; }
.trip-editor .preset-grid { grid-template-columns: 1fr 1fr; }

.platform-head { display: flex; align-items: baseline; gap: 8px; }
.platform-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.platform-row { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px dashed var(--line); background: #fff; }
.platform-row:last-child { border-bottom: 0; }
.platform-row.has-quote { background: #FFFAF7; }
.platform-name { width: 72px; flex: none; font-size: 12px; font-weight: 750; line-height: 1.5; }
.platform-name .badge { font-size: 8.5px; padding: 1px 4px; vertical-align: middle; }
.platform-price { flex: 1; min-width: 0; text-align: right; font-size: 13px; font-weight: 800; }
.platform-price small { display: block; color: var(--muted); font-size: 9.5px; font-weight: 500; }
.platform-actions { flex: none; display: flex; gap: 4px; }
.platform-actions .btn { min-height: 28px; padding: 3px 7px; font-size: 10px; }

.flight-timeline { margin-top: 8px; border: 1px dashed #EBD7C8; background: #FFFBF7; border-radius: 12px; padding: 8px 9px; }
.ft-seg { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.ft-point { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ft-point b { font-size: 11.5px; }
.ft-point span { color: var(--muted); font-size: 10.5px; }
.ft-arrow { color: var(--coral-dark); }
.ft-dur { color: var(--muted); font-size: 10px; white-space: nowrap; }
.ft-transfer { margin: 3px 0; padding-left: 8px; border-left: 2px solid var(--peach); color: var(--warn); font-size: 10.5px; }
.ft-total { margin-top: 5px; font-size: 10.5px; color: #6E6578; font-weight: 700; }
.ft-note { font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.leg-badges { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.leg-badges .btn { min-height: 26px; padding: 2px 7px; font-size: 10px; }

.transport-list { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.transport-head { font-size: 10.5px; color: var(--muted); font-weight: 750; margin-bottom: 4px; }
.transport-row { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px dashed #F5EAE1; }
.transport-row:last-child { border-bottom: 0; }
.t-mode { flex: none; width: 22px; text-align: center; }
.t-main { flex: 1; min-width: 0; }
.t-main b { display: block; font-size: 11px; font-weight: 700; }
.t-main small { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }
.t-alt { flex: none; max-width: 35%; text-align: right; font-size: 9px; color: var(--muted); line-height: 1.4; }
.candidate-meta .lowest { color: var(--coral-dark); font-weight: 750; }

@media (max-width: 420px) {
  .platform-name { width: 52px; font-size: 11px; }
  .platform-actions .btn { font-size: 9.5px; }
  .t-alt { display: none; }
}

@media print {
  .topbar, .tabbar, .fab, .toast, .sheet-root { display: none !important; }
  body { background: #fff; }
  .view { padding: 0; }
  .card, .day-card { break-inside: avoid; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}