:root {
  color-scheme: light;
  --ink: #14231f;
  --muted: #66736f;
  --forest: #0b241f;
  --forest-2: #153b33;
  --teal: #2a9d8f;
  --gold: #e6b765;
  --paper: #f5f7f3;
  --card: #ffffff;
  --line: #dfe6e1;
  --shadow: 0 18px 50px rgba(21, 44, 37, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.topbar {
  height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  color: #f9fffc;
  background: var(--forest);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  color: var(--forest); background: var(--gold); border-radius: 50%; font-size: 15px;
}
nav { display: flex; gap: 28px; color: rgba(255,255,255,.68); font-size: 14px; }
nav a { padding: 24px 0 19px; border-bottom: 3px solid transparent; }
nav a:hover, nav a.active { color: white; border-color: var(--gold); }
.outline-button { justify-self: end; color: white; border: 1px solid rgba(255,255,255,.32); background: transparent; border-radius: 10px; padding: 8px 16px; cursor: pointer; }

.hero { position: relative; min-height: 480px; overflow: hidden; color: white; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,24,20,.88) 0%, rgba(5,24,20,.56) 42%, rgba(5,24,20,.08) 76%), linear-gradient(0deg, rgba(5,24,20,.62), transparent 42%); }
.hero-content { position: relative; z-index: 1; width: min(1180px, calc(100% - 40px)); margin: auto; padding-top: 92px; }
.eyebrow { margin: 0 0 10px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow.dark { color: #458075; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 14px; font-family: Georgia, "STSong", serif; font-size: clamp(44px, 6vw, 76px); line-height: 1.08; letter-spacing: -.035em; }
h1 span { color: var(--gold); font-family: system-ui, sans-serif; font-size: .62em; }
.hero-copy { max-width: 620px; margin-bottom: 28px; color: rgba(255,255,255,.82); font-size: 18px; }
.hero-actions { display: flex; gap: 12px; }
.primary-button, .glass-button { border: 0; border-radius: 10px; padding: 12px 18px; font-weight: 750; cursor: pointer; }
.primary-button { color: var(--forest); background: var(--gold); }
.glass-button { color: white; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); }
.trip-facts {
  position: absolute; z-index: 2; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1180px, calc(100% - 40px)); display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(8,33,28,.84); border: 1px solid rgba(255,255,255,.14); border-bottom: 0; border-radius: 18px 18px 0 0; backdrop-filter: blur(18px);
}
.trip-facts div { padding: 16px 24px; border-right: 1px solid rgba(255,255,255,.12); }
.trip-facts div:last-child { border-right: 0; }
.trip-facts span, .trip-facts strong { display: block; }
.trip-facts span { color: rgba(255,255,255,.58); font-size: 12px; }
.trip-facts strong { margin-top: 2px; font-size: 17px; }

.dashboard { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 80px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 22px; }
.section-heading h2, .progress-panel h2 { margin-bottom: 0; font-size: 28px; line-height: 1.2; }
.section-heading > p { max-width: 440px; margin-bottom: 0; color: var(--muted); text-align: right; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 24px; align-items: start; }
.timeline { display: grid; gap: 12px; }
.day-card {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 20px; align-items: center;
  min-height: 132px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; transition: .18s ease; box-shadow: 0 5px 20px rgba(18,46,38,.04);
}
.day-card:hover, .day-card.selected { transform: translateY(-1px); border-color: #a9c8c0; box-shadow: var(--shadow); }
.date-block { display: grid; justify-items: center; padding-right: 20px; border-right: 1px solid var(--line); }
.date-block strong { font: 700 40px/1 Georgia, serif; color: var(--forest-2); }
.date-block span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.day-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.day-title h3 { margin-bottom: 0; font-size: 20px; }
.day-body > p { margin: 7px 0 10px; color: var(--muted); font-size: 14px; }
.status { padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 750; }
.status.amber { color: #795014; background: #fff3d7; }
.status.teal { color: #17675d; background: #dff4ef; }
.status.gray { color: #58635f; background: #edf0ee; }
.route-line, .meta-row { display: flex; align-items: center; gap: 10px; color: #34564e; font-size: 13px; }
.route-line i { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, #78a59b 0 5px, transparent 5px 10px); }
.meta-row span { padding-right: 12px; border-right: 1px solid var(--line); }
.meta-row span:last-child { border: 0; }
.saved-day-note { margin-top: 8px; padding: 7px 10px; color: #35685d; background: #e9f4f1; border-radius: 8px; font-size: 13px; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--forest-2); background: #f7faf8; font-size: 20px; cursor: pointer; }

.progress-panel { padding: 24px; background: var(--forest); color: white; border-radius: 20px; box-shadow: var(--shadow); }
.progress-panel .eyebrow { color: #7fc9bb; }
.panel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.progress-panel h2 { color: white; }
.progress-ring { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--gold) 0%, rgba(255,255,255,.12) 0); position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--forest); }
.progress-ring span { position: relative; z-index: 1; font-size: 13px; font-weight: 800; }
.task-list { display: grid; gap: 8px; }
.task-list button { width: 100%; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 12px; padding: 12px; color: white; text-align: left; border: 1px solid rgba(255,255,255,.10); border-radius: 12px; background: rgba(255,255,255,.055); cursor: pointer; }
.task-list button:hover { background: rgba(255,255,255,.10); }
.task-list button.task-done { border-color: rgba(230,183,101,.55); background: rgba(230,183,101,.10); }
.task-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--forest); background: var(--gold); font-size: 13px; font-weight: 900; }
.task-icon.bed { background: #82c7bb; }
.task-icon.car { background: #d7e7e2; }
.task-icon.weather { background: #c9deef; }
.task-icon.bag { background: #ecd9b3; }
.task-list strong, .task-list small { display: block; }
.task-list strong { font-size: 14px; }
.task-list small { color: rgba(255,255,255,.55); font-size: 12px; }
.task-list b { color: rgba(255,255,255,.5); font-size: 20px; }
.weather-note { display: flex; gap: 12px; margin-top: 20px; padding: 16px; color: #2e4a43; background: #e8eee9; border-radius: 14px; }
.weather-note > span { font-size: 24px; }
.weather-note strong { font-size: 14px; }
.weather-note p { margin: 3px 0 0; font-size: 12px; line-height: 1.55; }

.content-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 20px 0 74px; scroll-margin-top: 30px; }
.secondary-button { padding: 10px 16px; color: var(--forest-2); background: white; border: 1px solid #bad0ca; border-radius: 10px; font-weight: 750; cursor: pointer; }
.secondary-button:hover { border-color: var(--teal); background: #f0f8f5; }
.booking-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.booking-card { min-height: 230px; padding: 22px; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 6px 24px rgba(18,46,38,.045); }
.booking-card .booking-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.booking-card h3 { margin-bottom: 3px; font-size: 19px; }
.booking-card .record-label { color: var(--muted); font-size: 12px; }
.booking-card .record-status { padding: 4px 9px; border-radius: 99px; color: #795014; background: #fff3d7; font-size: 12px; font-weight: 800; white-space: nowrap; }
.booking-card .record-status.confirmed { color: #17675d; background: #dff4ef; }
.booking-card .record-status.reserved { color: #355f88; background: #e5f1fb; }
.booking-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.booking-meta div { min-width: 0; }
.booking-meta span, .booking-meta strong { display: block; }
.booking-meta span { color: var(--muted); font-size: 12px; }
.booking-meta strong { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; font-size: 14px; white-space: nowrap; }
.booking-actions { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.booking-actions button { padding: 7px 11px; color: var(--forest-2); background: #f3f7f5; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.booking-actions small { color: var(--muted); }
.official-links { display: flex; align-items: center; gap: 18px; margin-top: 16px; padding: 16px 18px; border: 1px solid #d8e6e1; border-radius: 14px; background: #eaf3f0; }
.official-links div { margin-right: auto; }
.official-links strong, .official-links span { display: block; }
.official-links span { color: var(--muted); font-size: 13px; }
.official-links a { color: #17675d; font-size: 14px; font-weight: 750; white-space: nowrap; }

.budget-section { padding-top: 54px; border-top: 1px solid var(--line); }
.budget-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
.budget-total { display: flex; flex-direction: column; justify-content: center; min-height: 230px; padding: 28px; color: white; background: linear-gradient(145deg, var(--forest), #205449); border-radius: 19px; }
.budget-total span { color: #9bc8be; font-size: 14px; }
.budget-total strong { margin: 10px 0 8px; color: var(--gold); font: 700 38px/1 Georgia, serif; }
.budget-total small { color: rgba(255,255,255,.6); }
.expense-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.expense-item { display: flex; flex-direction: column; justify-content: space-between; min-height: 106px; padding: 15px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.expense-item label { color: var(--muted); font-size: 13px; }
.expense-input { display: flex; align-items: center; gap: 8px; }
.expense-input span { color: #688077; font-weight: 800; }
.expense-input input { width: 100%; padding: 6px 0; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid #cbd7d3; outline: 0; font-size: 20px; font-weight: 750; }
.expense-input input:focus { border-color: var(--teal); }

.checklist-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check-item { display: flex; align-items: flex-start; gap: 11px; min-height: 82px; padding: 15px; background: white; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.check-item:hover { border-color: #a9c8c0; }
.check-item input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal); flex: 0 0 auto; }
.check-item strong, .check-item small { display: block; }
.check-item strong { font-size: 14px; }
.check-item small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.check-item:has(input:checked) { background: #edf7f4; }
.check-item:has(input:checked) strong { color: #668078; text-decoration: line-through; }
.notes-card { margin-top: 16px; padding: 18px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.notes-card label { display: block; margin-bottom: 8px; font-weight: 750; }
.notes-card textarea { width: 100%; resize: vertical; padding: 12px; color: var(--ink); background: #f7f9f7; border: 1px solid var(--line); border-radius: 10px; outline: 0; }
.notes-card textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,157,143,.1); }
.notes-card span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; text-align: right; }

.edit-dialog { width: min(700px, calc(100% - 24px)); max-height: 90vh; padding: 0; color: var(--ink); background: white; border: 0; border-radius: 20px; box-shadow: 0 32px 100px rgba(0,0,0,.26); }
.edit-dialog::backdrop { background: rgba(4,22,18,.68); backdrop-filter: blur(4px); }
.edit-dialog form { padding: 26px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.dialog-head h2 { margin-bottom: 0; }
.close-button { width: 38px; height: 38px; display: grid; place-items: center; color: #50645e; background: #eef2f0; border: 0; border-radius: 50%; font-size: 25px; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: grid; gap: 6px; color: #4e625c; font-size: 13px; font-weight: 700; }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; padding: 10px 11px; color: var(--ink); background: #f8faf9; border: 1px solid #d7e0dc; border-radius: 9px; outline: 0; font-size: 15px; font-weight: 500; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(42,157,143,.1); }
.form-grid textarea { resize: vertical; }
.complete-toggle { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px; background: #edf7f4; border-radius: 10px; cursor: pointer; }
.complete-toggle input { width: 19px; height: 19px; accent-color: var(--teal); }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.text-button { padding: 9px 12px; color: #4e625c; background: transparent; border: 0; cursor: pointer; }
.text-button.danger { color: #ad4138; }
.hidden { display: none !important; }
.toast { position: fixed; z-index: 10; right: 24px; bottom: 24px; padding: 12px 16px; color: white; background: var(--forest); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media print {
  .topbar, .hero-actions, .icon-button, .secondary-button, .booking-actions button, .official-links, .notes-card span { display: none !important; }
  body { background: white; }
  .hero { min-height: 330px; break-after: avoid; }
  .dashboard, .content-section { width: 100%; padding: 30px 24px; }
  .day-card, .booking-card, .expense-item, .check-item { break-inside: avoid; box-shadow: none; }
}

@media (max-width: 860px) {
  .topbar { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { min-height: 560px; }
  .trip-facts { grid-template-columns: 1fr 1fr; }
  .trip-facts div:nth-child(2) { border-right: 0; }
  .trip-facts div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.12); }
  .workspace-grid { grid-template-columns: 1fr; }
  .progress-panel { order: -1; }
  .booking-grid { grid-template-columns: 1fr 1fr; }
  .budget-layout { grid-template-columns: 1fr; }
  .expense-grid, .checklist-grid { grid-template-columns: 1fr 1fr; }
  .official-links { align-items: flex-start; flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .topbar { height: 64px; padding: 0 16px; }
  .outline-button { padding: 7px 10px; font-size: 13px; }
  .hero-content { width: calc(100% - 32px); padding-top: 58px; }
  h1 { font-size: 44px; }
  .hero-copy { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; width: min(100%, 280px); }
  .trip-facts { width: calc(100% - 24px); }
  .trip-facts div { padding: 11px 14px; }
  .trip-facts strong { font-size: 14px; }
  .dashboard { width: calc(100% - 24px); padding-top: 38px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 8px; text-align: left; }
  .day-card { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; padding: 16px 14px; }
  .date-block { padding-right: 12px; }
  .date-block strong { font-size: 32px; }
  .day-title h3 { font-size: 17px; }
  .icon-button { display: none; }
  .meta-row { flex-wrap: wrap; gap: 4px 8px; }
  .content-section { width: calc(100% - 24px); padding-bottom: 54px; }
  .booking-grid, .expense-grid, .checklist-grid { grid-template-columns: 1fr; }
  .official-links { display: grid; gap: 8px; }
  .budget-total { min-height: 180px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.wide { grid-column: auto; }
  .edit-dialog form { padding: 20px 16px; }
  .dialog-actions { grid-template-columns: auto 1fr auto; }
  .dialog-actions span { display: none; }
  .dialog-actions .danger { grid-column: 1 / -1; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
