:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  --bg: #f7f9f8;
  --surface: #ffffff;
  --surface-muted: #eef3f2;
  --ink: #1d272d;
  --muted: #64737a;
  --line: #dbe3e1;
  --blue: #144b7d;
  --blue-2: #1f68a8;
  --blue-soft: #e7f1fa;
  --coral: #e65b47;
  --coral-soft: #fcece8;
  --green: #247a5a;
  --green-soft: #e8f4ee;
  --yellow: #8b6500;
  --yellow-soft: #fff4cf;
  --shadow: 0 14px 34px rgba(23, 43, 53, 0.08);
  --sidebar-width: 280px;
}

[hidden] { display: none !important; }
.account-tools {display:flex;gap:8px;flex-wrap:wrap;margin-top:16px;}
.version-row {display:flex;gap:12px;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid var(--line);}
.version-row strong,.version-row small {display:block;}.version-row small {color:var(--muted);margin-top:6px;font-size:11px;}
.route-place-button {border:1px solid var(--line);background:white;padding:9px;border-radius:5px;text-align:left;}
.timeline-item__actions {flex-wrap:wrap;max-width:190px;}
.journey-cover { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:38px; color:#fff; background:linear-gradient(125deg,#163d45,#23666a); border-radius:10px; overflow:hidden; }
.journey-cover span { font-size:11px; color:#c7ded8; }
.journey-cover h2 { margin:16px 0 10px; font-size:32px; }
.journey-cover p { margin:0; color:#d1e3df; line-height:1.8; font-size:14px; }
.cover-number { font-size:96px; font-weight:700; line-height:1; color:#d6c795; }
.cover-number small { display:block; font-size:12px; font-weight:400; margin-top:12px; }
.overview-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:1px solid var(--line); margin:12px 0 22px; }
.overview-stat { padding:20px 12px; }
.overview-stat span,.overview-stat strong,.overview-stat small { display:block; }
.overview-stat span { color:var(--muted); font-size:12px; }
.overview-stat strong { font-size:23px; margin:8px 0; }
.overview-stat small { color:var(--muted); font-size:11px; }
.journey-ribbon { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:16px 0 24px; }
.route-place { display:inline-flex; align-items:center; gap:7px; color:var(--muted); font-size:11px; }
.route-place strong { color:var(--blue); font-size:13px; }
.route-connector { color:#a8b8b3; }
.travel-alerts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0 0 30px; }
.travel-alerts button { text-align:left; padding:16px; border:1px solid #e6d5ae; border-radius:6px; background:#fff8e8; color:#735222; }
.travel-alerts strong,.travel-alerts span { display:block; }
.travel-alerts strong { font-size:13px; }
.travel-alerts span { font-size:12px; line-height:1.6; margin-top:7px; }
.overview-bottom { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:28px; }
.budget-line { display:grid; grid-template-columns:36px 1fr 70px; gap:10px; align-items:center; font-size:12px; margin-top:16px; }
.budget-line strong { text-align:right; }
.budget-bar { height:8px; background:#eef3f2; border-radius:4px; overflow:hidden; }
.budget-bar span { display:block; height:100%; background:#45857c; border-radius:4px; }
.stay-panel .audit-note { color:#8b6500; font-size:12px; }
.route-poster { display:flex; align-items:center; padding:32px; background:linear-gradient(135deg,#173e46,#2d7271); color:white; }
.route-poster small { font-size:10px; color:#bed8d0; }
.route-poster strong { display:block; font-size:36px; line-height:1.5; margin-top:14px; }
.route-poster p { color:#c5ddd6; font-size:12px; }
@media(max-width:1100px) { .overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .overview-bottom {grid-template-columns:1fr;} }
@media(max-width:820px) { .journey-cover {padding:24px;} .journey-cover h2 {font-size:24px;} .cover-number {font-size:62px;} .travel-alerts {grid-template-columns:1fr;} .route-poster {height:auto!important;min-height:215px!important;} .route-poster strong {font-size:27px;} }
@media(max-width:480px) { .journey-cover {padding:22px 18px;} .cover-number {display:none;} .overview-stat {padding:16px 6px;} .overview-stat strong {font-size:20px;} }

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

button,
input,
select,
textarea { font: inherit; letter-spacing: 0; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { cursor: pointer; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 104, 168, 0.25);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.25;
}

h2 {
  margin-bottom: 0;
  font-size: 19px;
  line-height: 1.35;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: #f0f4f3;
  z-index: 20;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.brand-row strong,
.brand-row span { display: block; }

.brand-row strong { font-size: 16px; }
.brand-row span { margin-top: 3px; color: var(--muted); font-size: 12px; }

.trip-progress {
  margin: 24px 0 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trip-progress__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.trip-progress__label strong { color: var(--blue); font-size: 20px; }
.trip-progress small { color: var(--muted); }

.progress-track {
  height: 5px;
  margin: 10px 0 8px;
  overflow: hidden;
  border-radius: 3px;
  background: #d5dfdc;
}

.progress-track span { display: block; height: 100%; background: var(--blue-2); }

.day-list {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  padding-right: 4px;
}

.desktop-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}

.desktop-nav__item {
  min-width: 0;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 2px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
}

.desktop-nav__item svg { width: 17px; height: 17px; }
.desktop-nav__item:hover { background: rgba(255,255,255,0.75); }
.desktop-nav__item.active { color: var(--blue); background: #fff; font-weight: 700; }

.day-button {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.day-button:hover { background: rgba(255,255,255,0.7); }

.day-button.active {
  border-color: #b9cee0;
  background: #fff;
  box-shadow: 0 5px 14px rgba(23, 43, 53, 0.05);
}

.day-button__date {
  display: flex;
  flex-direction: column;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.day-button__date strong { color: var(--blue); font-size: 17px; }

.day-button__route {
  overflow: hidden;
}

.day-button__route strong,
.day-button__route span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-button__route strong { font-size: 13px; }
.day-button__route span { margin-top: 3px; color: var(--muted); font-size: 11px; }

.risk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.risk-dot.watch { background: #d79916; }
.risk-dot.high { background: var(--coral); }

.sidebar-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-bottom: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px clamp(22px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 249, 248, 0.96);
  backdrop-filter: blur(14px);
}

.topbar__title p,
.section-heading p,
.page-band p,
.dialog-heading p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.sync-indicator {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.sync-indicator.dirty .sync-dot { background: #d79916; }

.avatar-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-weight: 700;
}

main { padding: 30px clamp(22px, 4vw, 52px) 48px; }

.view { display: none; }
.view.active { display: block; }

.route-overview {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.route-overview__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
}

.status-label {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.status-label.draft { color: var(--blue); background: var(--blue-soft); }
.status-label.local { color: var(--green); background: var(--green-soft); }
.status-label svg { width: 14px; height: 14px; }

.route-overview h2 { margin-top: 18px; font-size: 30px; }
.route-overview p { max-width: 560px; margin: 12px 0 0; color: var(--muted); line-height: 1.75; }

.route-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 22px;
}

.metric {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.metric svg { width: 17px; height: 17px; color: var(--blue); }
.metric strong { color: var(--ink); }

.route-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.route-map {
  position: relative;
  min-height: 300px;
  margin: 0;
  overflow: hidden;
  background: #eaf0ef;
}

.route-map img { width: 100%; height: 100%; object-fit: cover; }

.route-map figcaption {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 4px;
  color: #fff;
  background: rgba(23, 38, 45, 0.78);
  font-size: 11px;
}

.primary-button,
.icon-text-button,
.text-button,
.icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button,
.icon-text-button,
.text-button { padding: 0 14px; }

.primary-button,
.primary { color: #fff; background: var(--blue); }
.primary-button:hover,
.primary:hover { background: #103e68; }

.secondary { color: var(--ink); border-color: var(--line); background: var(--surface); }
.secondary:hover { border-color: #b8c7c4; background: #f8fbfa; }

.icon-button { width: 40px; padding: 0; }
.icon-button svg,
.icon-text-button svg,
.primary-button svg { width: 18px; height: 18px; flex: 0 0 auto; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 28px;
  margin-top: 34px;
}

.timeline-section,
.day-insights,
.checklist-section,
.reference-section { min-width: 0; }

.section-heading,
.page-band,
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading { margin-bottom: 18px; }
.section-heading.compact { margin-bottom: 12px; }
.section-heading.compact > svg { width: 26px; height: 26px; color: var(--blue); }

.timeline { position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  min-height: 86px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 8px 12px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child { border-bottom: 0; }
.timeline-item.skipped { opacity: 0.56; }
.timeline-item.complete .timeline-item__icon { color: #fff; background: var(--green); border-color: var(--green); }

.timeline-item__icon {
  z-index: 1;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid #b9cee0;
  border-radius: 50%;
  color: var(--blue);
  background: var(--surface);
}

.timeline-item__icon svg { width: 20px; height: 20px; }

.timeline-item__body { min-width: 0; }

.timeline-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-item__body h3 { margin: 6px 0 4px; font-size: 16px; }
.timeline-item__body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.timeline-item__actions { display: flex; gap: 4px; }
.timeline-item__actions .icon-button { width: 34px; min-height: 34px; height: 34px; }
.timeline-item__actions .icon-button svg { width: 16px; height: 16px; }

.day-insights {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.weather-panel,
.stay-panel,
.risk-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.weather-reading { display: flex; flex-direction: column; gap: 5px; margin: 18px 0 14px; }
.weather-reading strong { font-size: 28px; }
.weather-reading span,
.weather-panel small,
.stay-panel p { color: var(--muted); }
.weather-panel small { font-size: 11px; }
.stay-panel p { margin: 12px 0 0; font-size: 13px; line-height: 1.6; }

.risk-panel {
  display: flex;
  gap: 13px;
  color: #754b00;
  border-color: #ead79a;
  background: var(--yellow-soft);
}

.risk-panel.high { color: #872d22; border-color: #f1b9b0; background: var(--coral-soft); }
.risk-panel.ok { color: #1f644b; border-color: #b5dac9; background: var(--green-soft); }
.risk-panel__icon { flex: 0 0 auto; }
.risk-panel__icon svg { width: 21px; height: 21px; }
.risk-panel p { margin: 5px 0 0; font-size: 13px; line-height: 1.55; }

.page-band {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.page-band h2 { font-size: 26px; }

.itinerary-list { display: flex; flex-direction: column; }

.itinerary-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1.2fr) minmax(150px, 0.65fr) minmax(130px, 0.5fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 92px;
  padding: 15px 8px;
  border-bottom: 1px solid var(--line);
}

.itinerary-row:hover { background: rgba(255,255,255,0.7); }
.itinerary-date strong, .itinerary-date span { display: block; }
.itinerary-date strong { color: var(--blue); font-size: 19px; }
.itinerary-date span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.itinerary-route h3 { margin: 0 0 6px; font-size: 16px; }
.itinerary-route p, .itinerary-meta, .itinerary-stay { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.itinerary-actions { display: flex; gap: 6px; }

.documents-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 36px;
}

.checklist { display: flex; flex-direction: column; }

.checklist-item {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.checklist-item input { width: 19px; height: 19px; accent-color: var(--green); }
.checklist-item.done span { color: var(--muted); text-decoration: line-through; }

.reference-section img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #fff;
}

.reference-section > p { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.expense-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summary-cell { padding: 20px; background: var(--surface); }
.summary-cell span, .summary-cell strong { display: block; }
.summary-cell span { color: var(--muted); font-size: 12px; }
.summary-cell strong { margin-top: 8px; font-size: 24px; }

.expense-table-wrap { margin-top: 28px; overflow-x: auto; }
.expense-table { width: 100%; border-collapse: collapse; }
.expense-table th, .expense-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.expense-table th { color: var(--muted); font-size: 12px; font-weight: 600; }
.expense-table td { font-size: 14px; }
.expense-table td:last-child { width: 44px; text-align: right; }

.mobile-day-strip,
.bottom-nav { display: none; }

.app-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 24px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(18, 32, 39, 0.24);
}

.app-dialog::backdrop { background: rgba(21, 33, 40, 0.48); }
.compact-dialog { width: min(430px, calc(100vw - 32px)); }
.dialog-heading { margin-bottom: 22px; }
.dialog-heading h2 { font-size: 22px; }

.app-dialog form,
.app-dialog label { display: flex; flex-direction: column; gap: 7px; }
.app-dialog form { gap: 16px; }
.app-dialog label { color: var(--muted); font-size: 12px; }

.app-dialog input,
.app-dialog select,
.app-dialog textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd7d4;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
}

.app-dialog textarea { resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.account-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.account-row span { color: var(--muted); }
.dialog-note { margin: 18px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.full-width { width: 100%; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 15px;
  border-radius: 6px;
  color: #fff;
  background: #203039;
  box-shadow: var(--shadow);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: 180ms ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .route-overview { grid-template-columns: 1fr; }
  .route-map { height: 250px; min-height: 0; }
  .content-grid { grid-template-columns: 1fr; }
  .day-insights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .itinerary-row { grid-template-columns: 80px minmax(0, 1fr) minmax(120px, 0.55fr) auto; }
  .itinerary-stay { display: none; }
}

@media (max-width: 820px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; padding-bottom: 76px; }
  .topbar { min-height: 66px; padding: 10px 16px; }
  .topbar__title p { margin-bottom: 2px; }
  h1 { font-size: 18px; }
  .sync-indicator { width: 36px; padding: 0; justify-content: center; }
  .sync-indicator span:last-child { display: none; }
  .avatar-button { width: 36px; height: 36px; }
  main { padding: 18px 16px 30px; }
  .mobile-day-strip {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    scrollbar-width: none;
  }
  .mobile-day-strip::-webkit-scrollbar { display: none; }
  .mobile-day-button {
    width: 54px;
    min-width: 54px;
    min-height: 48px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    background: #fff;
    font-size: 11px;
  }
  .mobile-day-button strong { display: block; color: var(--ink); font-size: 15px; }
  .mobile-day-button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
  .mobile-day-button.active strong { color: #fff; }
  .route-overview { display: flex; flex-direction: column; min-height: 0; }
  .route-overview__content { padding: 24px 20px; }
  .route-overview h2 { font-size: 24px; }
  .route-map { order: -1; height: 170px; }
  .route-map figcaption { right: 8px; bottom: 8px; }
  .route-actions > * { flex: 1 1 auto; }
  .content-grid { gap: 28px; margin-top: 28px; }
  .day-insights { display: flex; }
  .timeline-item { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 14px 0; }
  .timeline::before { left: 21px; }
  .timeline-item__icon { width: 43px; height: 43px; }
  .timeline-item__actions { grid-column: 2; justify-content: flex-start; }
  .page-band h2 { font-size: 22px; }
  .itinerary-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; min-height: 84px; }
  .itinerary-meta, .itinerary-stay { display: none; }
  .documents-layout { grid-template-columns: 1fr; gap: 34px; }
  .expense-summary { grid-template-columns: 1fr; }
  .summary-cell { padding: 16px; }
  .summary-cell strong { font-size: 21px; }
  .bottom-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 30;
    height: calc(64px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 5px 10px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
  }
  .bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
  }
  .bottom-nav__item svg { width: 20px; height: 20px; }
  .bottom-nav__item.active { color: var(--blue); font-weight: 700; }
  .toast { bottom: 80px; }
}

@media (max-width: 480px) {
  .topbar__actions { gap: 5px; }
  .route-metrics { gap: 10px 16px; }
  .route-actions { flex-direction: column; }
  .route-actions > * { width: 100%; }
  .weather-panel, .stay-panel, .risk-panel { padding: 17px; }
  .form-row { grid-template-columns: 1fr; }
  .app-dialog { padding: 20px 16px; }
  .page-band { align-items: flex-start; }
  .page-band .icon-text-button span { display: none; }
  .page-band .icon-text-button { width: 40px; padding: 0; }
}

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