:root {
  --paper: #f3eee4;
  --paper-deep: #e9e0d1;
  --ink: #17221d;
  --muted: #667068;
  --coral: #e54b35;
  --coral-dark: #b92f20;
  --moss: #355a46;
  --sky: #5a96a5;
  --line: rgba(23, 34, 29, 0.17);
  --white: #fffdf8;
  --radius-sm: 10px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow: 0 24px 70px rgba(51, 44, 32, 0.12);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.55; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 12px 18px; border-radius: 8px; background: var(--ink); color: white; transform: translateY(-140%); transition: transform .2s; }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }

.site-header { width: min(100% - 40px, 1320px); height: 88px; margin: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -.04em; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); }
.brand-mark svg { width: 21px; height: 21px; }
.site-header nav { display: flex; gap: 36px; color: var(--muted); font-size: 14px; font-weight: 700; }
.site-header nav a { padding: 12px 4px; transition: color .2s; }
.site-header nav a:hover { color: var(--coral); }
.header-cta { justify-self: end; min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); background: transparent; font-weight: 800; transition: .2s var(--ease); }
.header-cta:hover { color: var(--paper); background: var(--ink); }

.hero { min-height: calc(100svh - 88px); width: min(100% - 40px, 1320px); margin: auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(48px, 8vw, 120px); align-items: center; padding: 72px 0 96px; position: relative; }
.eyebrow, .section-index { display: flex; align-items: center; gap: 12px; color: var(--coral-dark); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.eyebrow span { width: 42px; height: 2px; background: var(--coral); }
.hero h1 { margin: 28px 0 30px; max-width: 700px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(64px, 8vw, 128px); font-weight: 500; line-height: .88; letter-spacing: -.085em; }
.hero h1 em { color: var(--coral); font-weight: inherit; }
.hero-intro { max-width: 570px; margin: 0; font-size: clamp(17px, 1.6vw, 22px); color: #4f5b54; }
.hero-proof { margin-top: 58px; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 610px; border-top: 1px solid var(--line); }
.hero-proof div { padding: 22px 16px 0 0; display: flex; gap: 12px; }
.hero-proof strong { color: var(--coral); font: 900 13px/1 monospace; }
.hero-proof span { font-size: 13px; font-weight: 800; line-height: 1.45; }

.poster { justify-self: end; width: min(100%, 540px); aspect-ratio: 4/5; padding: 24px; position: relative; overflow: hidden; color: #f8f1e7; background: var(--moss); border-radius: 3px 44px 3px 3px; box-shadow: var(--shadow); transform: rotate(1.4deg); }
.poster::before { content: ""; position: absolute; width: 90%; aspect-ratio: 1; right: -26%; top: 10%; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.025); }
.poster-top, .poster-bottom { display: flex; justify-content: space-between; position: relative; z-index: 2; font: 700 11px/1.2 monospace; letter-spacing: .16em; text-transform: uppercase; }
.poster-route { position: absolute; inset: 25% -5% 8% -5%; }
.poster-route svg { width: 100%; height: 100%; stroke: #e8d7af; }
.poster-route .route-dash { fill: none; stroke-width: 2; stroke-dasharray: 8 10; }
.poster-route circle { fill: var(--coral); stroke: #f8f1e7; stroke-width: 3; }
.poster-stamp { position: absolute; top: 18%; right: 6%; width: 94px; aspect-ratio: 1; display: grid; place-content: center; text-align: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font: 12px/1.5 monospace; transform: rotate(10deg); }
.poster-stamp b { color: #f2bb47; }
.poster-title { position: absolute; left: 6%; right: 6%; bottom: 13%; display: grid; }
.poster-title span { color: #f2bb47; font: 900 clamp(58px, 6.3vw, 100px)/.8 Arial Black, sans-serif; letter-spacing: -.08em; }
.poster-title strong { margin-top: 14px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(28px, 3vw, 48px); font-weight: 500; letter-spacing: .18em; }
.poster-bottom { position: absolute; left: 6%; right: 6%; bottom: 4%; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.25); }
.scroll-note { position: absolute; bottom: 30px; left: 0; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.scroll-note span { width: 52px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-note span::after { content: ""; position: absolute; inset: 0; background: var(--coral); transform: translateX(-100%); animation: scan 2.2s infinite var(--ease); }
@keyframes scan { 50%,100% { transform: translateX(100%); } }

.planner-section, .result-section { width: min(100% - 40px, 1180px); margin: auto; padding: 120px 0; }
.section-heading { margin-bottom: 40px; display: grid; grid-template-columns: 180px 1fr; align-items: end; }
.section-heading > div p { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
.section-heading h2 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(42px, 6vw, 74px); font-weight: 500; line-height: 1; letter-spacing: -.06em; }
.planner-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow); }
.form-main { padding: clamp(28px, 5vw, 62px); display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.field, fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span:first-child, fieldset > legend { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; font-weight: 800; }
.field small, fieldset small { margin-left: 7px; color: #929990; font-weight: 500; }
.field-wide { grid-column: 1 / -1; }
.input-shell { min-height: 58px; padding: 0 18px; display: flex; align-items: center; gap: 12px; border: 1px solid #d8d5cd; border-radius: var(--radius-sm); background: #fbf9f4; color: var(--moss); transition: border .2s, box-shadow .2s; }
.input-shell:focus-within { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(90, 150, 165, .15); }
.input-shell input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 17px; font-weight: 750; }
.input-number b, .input-budget > b { flex: 0 0 auto; }
.input-budget input { font-size: 24px; }
.input-budget output { margin-left: auto; color: var(--coral-dark); font-size: 13px; font-weight: 800; white-space: nowrap; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-weight: 750; transition: .2s; }
.chip:hover, .chip.is-active { border-color: var(--moss); color: white; background: var(--moss); }
.preferences { padding-top: 10px; }
.preference-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.preference-grid input { position: absolute; opacity: 0; pointer-events: none; }
.preference-grid span { min-height: 72px; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: transparent; font-weight: 750; transition: .2s; cursor: pointer; }
.preference-grid span svg { width: 22px; }
.preference-grid input:checked + span { border-color: var(--sky); color: #245969; background: rgba(90,150,165,.1); box-shadow: inset 0 0 0 1px var(--sky); }
.preference-grid input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 3px; }
.form-action { min-height: 104px; padding: 18px clamp(28px, 5vw, 62px); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: white; background: var(--ink); }
.form-action > div { display: grid; }
.form-action > div span { color: #aeb7b1; font-size: 12px; }
.form-action > div strong { font-size: 18px; }
.primary-btn, .secondary-btn { min-height: 54px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 14px; border-radius: 999px; font-weight: 850; transition: transform .2s var(--ease), background .2s, color .2s; }
.primary-btn { border: 0; color: white; background: var(--coral); }
.primary-btn:hover { background: var(--coral-dark); transform: translateY(-2px); }
.primary-btn:active, .secondary-btn:active { transform: translateY(0) scale(.98); }
.secondary-btn { border: 1px solid var(--ink); color: var(--ink); background: transparent; }
.secondary-btn:hover { color: white; background: var(--ink); }

.how-section { padding: 120px max(20px, calc((100% - 1180px) / 2)); color: white; background: var(--moss); }
.section-heading.light .section-index { color: #efc556; }
.section-heading.light > div p { color: #b9c9c0; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.2); }
.how-grid article { min-height: 260px; padding: 34px 34px 20px 0; border-right: 1px solid rgba(255,255,255,.2); }
.how-grid article + article { padding-left: 34px; }
.how-grid article:last-child { border-right: 0; }
.how-grid span { display: inline-block; padding: 5px 10px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; color: #d7e0da; font-size: 11px; font-weight: 800; }
.how-grid strong { display: block; margin: 56px 0 16px; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(26px, 3vw, 38px); font-weight: 500; }
.how-grid p { max-width: 280px; margin: 0; color: #bdc8c1; font-size: 14px; }

.result-section[hidden] { display: none; }
.result-section { animation: reveal .7s var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: translateY(32px); } }
.result-masthead { padding-bottom: 50px; display: flex; justify-content: space-between; align-items: end; gap: 40px; border-bottom: 1px solid var(--line); }
.trip-kicker { margin: 30px 0 10px; color: var(--muted); font: 800 13px monospace; letter-spacing: .12em; }
.result-masthead h2 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: clamp(58px, 9vw, 126px); font-weight: 500; line-height: .82; letter-spacing: -.08em; }
.result-masthead h2 em { color: var(--coral); font-size: .48em; font-weight: inherit; letter-spacing: -.02em; }
.trip-ticket { flex: 0 0 190px; aspect-ratio: 1.65/1; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; color: #f7efe4; background: var(--ink); border-radius: 3px 18px 3px 3px; transform: rotate(2deg); }
.trip-ticket span { font: 700 10px monospace; letter-spacing: .15em; }
.trip-ticket strong { color: #efc556; font: 900 25px monospace; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin: 30px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.metrics > div { min-height: 130px; padding: 26px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.metrics > div:last-child { border-right: 0; }
.metrics span { color: var(--muted); font-size: 12px; font-weight: 800; }
.metrics strong { font-family: Georgia, serif; font-size: clamp(24px, 3vw, 38px); font-weight: 500; }
.metrics strong b { font-weight: inherit; }
.metrics .accent { color: white; background: var(--coral); }
.metrics .accent span { color: #ffe6e0; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); gap: 28px; align-items: start; }
.itinerary-panel, .side-panel > section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.itinerary-panel { overflow: hidden; }
.panel-heading { padding: 30px; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.panel-heading span, .side-heading span { color: var(--coral-dark); font: 800 10px monospace; letter-spacing: .15em; }
.panel-heading h3, .side-heading h3 { margin: 5px 0 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 26px; font-weight: 500; }
.day-tabs { display: flex; align-items: center; gap: 6px; }
.day-tabs button { min-width: 64px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font: 800 11px monospace; }
.day-tabs button[aria-selected="true"] { border-color: var(--ink); color: white; background: var(--ink); }
.day-summary { padding: 30px 30px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #edf3ef; }
.day-summary span { color: var(--moss); font: 900 11px monospace; letter-spacing: .1em; }
.day-summary strong { font-family: Georgia, "Noto Serif SC", serif; font-size: 19px; font-weight: 500; }
.timeline { margin: 0; padding: 10px 30px 24px; list-style: none; }
.timeline li { min-height: 120px; display: grid; grid-template-columns: 70px 1fr auto; gap: 20px; align-items: start; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline time { color: var(--coral-dark); font: 900 13px monospace; }
.timeline div { display: grid; gap: 4px; }
.timeline div > span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.timeline div strong { font-size: 17px; }
.timeline div p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.timeline li > b { padding: 4px 9px; border-radius: 999px; color: #286072; background: #e2eff2; font-size: 10px; white-space: nowrap; }
.side-panel { display: grid; gap: 20px; }
.side-panel > section { padding: 28px; }
.budget-card { color: white; background: var(--ink) !important; }
.budget-card .side-heading span { color: #efc556; }
.budget-card .side-heading h3 { color: white; }
.budget-total { margin: 28px 0; padding: 24px 0; display: grid; border-top: 1px solid rgba(255,255,255,.17); border-bottom: 1px solid rgba(255,255,255,.17); }
.budget-total span, .budget-total small { color: #aeb7b1; font-size: 11px; }
.budget-total strong { margin: 6px 0; font: 500 37px Georgia, serif; }
.budget-list { display: grid; gap: 16px; }
.budget-list > div { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; }
.budget-list > div span { position: relative; flex: 1; padding-bottom: 8px; color: #bdc6c0; }
.budget-list > div span::after, .budget-list i { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 2px; }
.budget-list > div span::after { right: 0; background: #3c4942; }
.budget-list i { z-index: 1; width: var(--w); background: var(--coral); }
.stay-item { padding: 20px 0; border-top: 1px solid var(--line); }
.stay-item:first-of-type { margin-top: 22px; }
.stay-item span { color: var(--sky); font: 900 10px monospace; }
.stay-item strong { display: block; margin: 5px 0; }
.stay-item p { margin: 0; color: var(--muted); font-size: 12px; }
.owner-card ul { margin: 18px 0 0; padding: 0; list-style: none; }
.owner-card li { padding: 13px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); font-size: 12px; }
.owner-card li b { color: var(--coral-dark); }
.result-actions { margin-top: 30px; display: flex; justify-content: flex-end; gap: 12px; }

.loading-overlay { position: fixed; z-index: 100; inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(23,34,29,.72); backdrop-filter: blur(10px); }
.loading-overlay[hidden] { display: none; }
.loader-card { width: min(100%, 440px); padding: 42px; text-align: center; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.loader-route { height: 42px; display: flex; align-items: center; justify-content: center; }
.loader-route span { width: 10px; height: 10px; border: 2px solid var(--coral); border-radius: 50%; }
.loader-route i { width: 90px; border-top: 2px dashed var(--coral); }
.loader-card strong { display: block; margin-top: 20px; font-family: Georgia, "Noto Serif SC", serif; font-size: 25px; }
.loader-card p { color: var(--muted); font-size: 13px; }
.loader-bar { height: 4px; margin-top: 24px; overflow: hidden; border-radius: 4px; background: var(--paper-deep); }
.loader-bar i { display: block; height: 100%; background: var(--coral); animation: load 1.7s var(--ease) forwards; }
@keyframes load { from { width: 0; } to { width: 100%; } }

footer { min-height: 210px; padding: 60px max(20px, calc((100% - 1180px) / 2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; color: #d7dfda; background: #101814; }
.footer-brand { color: white; }
footer p { margin: 0; color: #89968f; font-family: Georgia, "Noto Serif SC", serif; text-align: center; }
footer > span { justify-self: end; color: #89968f; font: 700 10px monospace; letter-spacing: .15em; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 50px; }
  .poster { justify-self: center; width: min(92%, 560px); }
  .scroll-note { display: none; }
  .section-heading { grid-template-columns: 1fr; gap: 20px; }
  .preference-grid { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .how-grid article, .how-grid article + article { min-height: auto; padding: 30px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  .how-grid article:last-child { border-bottom: 0; }
  .how-grid strong { margin-top: 24px; }
  .result-layout { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics > div:nth-child(2) { border-right: 0; }
  .metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand, footer > span { justify-self: center; }
}

@media (max-width: 600px) {
  .site-header, .hero, .planner-section, .result-section { width: min(100% - 28px, 1180px); }
  .site-header { height: 72px; }
  .header-cta { padding: 0 15px; }
  .hero { min-height: auto; padding: 54px 0 78px; gap: 56px; }
  .hero h1 { font-size: clamp(60px, 20vw, 82px); }
  .hero-proof { margin-top: 42px; grid-template-columns: 1fr; }
  .hero-proof div { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .poster { width: 100%; }
  .planner-section, .result-section { padding: 80px 0; }
  .form-main { grid-template-columns: 1fr; padding: 26px 20px; }
  .field-wide { grid-column: auto; }
  .form-action { padding: 22px 20px; align-items: stretch; flex-direction: column; }
  .primary-btn, .secondary-btn { width: 100%; }
  .preference-grid { grid-template-columns: 1fr 1fr; }
  .preference-grid span { min-height: 64px; flex-direction: column; font-size: 12px; }
  .input-budget { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .input-budget output { width: 100%; margin-left: 28px; }
  .how-section { padding-top: 80px; padding-bottom: 80px; }
  .result-masthead { align-items: start; flex-direction: column; }
  .trip-ticket { align-self: flex-end; }
  .metrics { grid-template-columns: 1fr; }
  .metrics > div { min-height: 105px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics > div:last-child { border-bottom: 0; }
  .panel-heading { padding: 24px 20px; flex-direction: column; }
  .day-tabs { width: 100%; }
  .day-tabs button { flex: 1; }
  .day-summary { padding: 24px 20px; align-items: start; flex-direction: column; }
  .timeline { padding: 0 20px 16px; }
  .timeline li { grid-template-columns: 56px 1fr; gap: 12px; }
  .timeline li > b { grid-column: 2; justify-self: start; }
  .side-panel > section { padding: 24px 20px; }
  .result-actions { flex-direction: column-reverse; }
  .loader-card { padding: 34px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .hero, .planner-section, .how-section, footer, .result-actions { display: none !important; }
  body { background: white; }
  .result-section { display: block !important; width: 100%; padding: 0; }
  .result-layout { grid-template-columns: 1.5fr .7fr; }
  .day-panel[hidden] { display: block !important; }
  .day-tabs { display: none; }
  .itinerary-panel, .side-panel > section, .metrics { break-inside: avoid; box-shadow: none; }
}
