:root {
  --canvas: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #edf3ff;
  --accent: #2463eb;
  --accent-strong: #1749b8;
  --accent-weak: #e8efff;
  --ink: #15223b;
  --ink-2: #53627a;
  --line: #dfe6f0;
  --ok: #16794d;
  --warn: #b45309;
  --err: #c92a2a;
  --info: #2463eb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-float: 0 20px 50px -24px rgba(24, 45, 84, 0.32);
  font-family: Geist, "Noto Sans TC", "PingFang TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(36, 99, 235, 0.35); outline-offset: 2px; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; background: var(--ink); color: white; border-radius: var(--radius-sm); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 24px 16px 20px; background: #10213f; color: #d8e2f4; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 28px; color: white; font-size: 20px; font-weight: 750; text-decoration: none; letter-spacing: -0.03em; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; width: 29px; height: 29px; padding: 5px; border-radius: 9px; background: var(--accent); }
.brand-mark span { display: block; width: 5px; border-radius: 3px 3px 1px 1px; background: white; transform: rotate(18deg); }
.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 17px; }
.brand-mark span:nth-child(3) { height: 12px; }
.brand-mark.small { width: 26px; height: 26px; }
.side-nav { display: grid; gap: 4px; }
.nav-button { width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: var(--radius-sm); background: transparent; color: #aebbd0; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.nav-button i { font-size: 20px; }
.nav-button:hover { color: white; background: rgba(255, 255, 255, 0.06); }
.nav-button.active { color: white; background: rgba(88, 139, 255, 0.18); box-shadow: inset 3px 0 var(--accent); }
.sidebar-foot { margin-top: auto; padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-foot p { margin: 0 0 5px; color: white; font-weight: 650; font-size: 13px; }
.sidebar-foot span { font-size: 12px; color: #8fa0ba; }

.app-column { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 72px; padding: 0 28px; background: rgba(243, 246, 251, 0.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(208, 218, 233, 0.8); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.mobile-brand { display: none; align-items: center; gap: 8px; font-weight: 750; }
.trip-switcher { min-width: 0; padding: 9px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 650; }
.trip-switcher span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-switcher:hover { background: var(--surface); border-color: var(--line); }
.top-actions { display: flex; align-items: center; gap: 8px; }

#main-content { width: min(1280px, 100%); margin: 0 auto; padding: 32px 32px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -0.04em; text-wrap: balance; }
.page-head p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.65; max-width: 62ch; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.eyebrow { margin: 0 0 8px !important; color: var(--accent-strong) !important; font-size: 12px !important; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }

.primary-button, .secondary-button, .quiet-button, .icon-button { min-height: 44px; border-radius: var(--radius-sm); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transition: transform .16s ease, background .16s ease, border-color .16s ease; white-space: nowrap; text-decoration: none; }
.primary-button { padding: 0 17px; background: var(--accent); color: white; font-weight: 700; box-shadow: 0 8px 18px -12px rgba(36, 99, 235, .8); }
.primary-button:hover { background: var(--accent-strong); }
.secondary-button { padding: 0 16px; background: var(--surface); border-color: var(--line); color: var(--ink); font-weight: 650; }
.secondary-button:hover, .quiet-button:hover { background: var(--accent-weak); border-color: #b9caf2; }
.quiet-button { padding: 0 12px; min-height: 38px; background: transparent; color: var(--accent-strong); font-weight: 650; }
.icon-button { width: 44px; padding: 0; background: var(--surface); border-color: var(--line); font-size: 19px; }
.icon-button:hover { background: var(--accent-weak); border-color: #b9caf2; }
.primary-button:active, .secondary-button:active, .quiet-button:active, .icon-button:active { transform: scale(.98); }
.compact { min-height: 42px; }
button:disabled { opacity: .52; cursor: not-allowed; transform: none; }

.grid { display: grid; gap: 20px; }
.overview-grid { grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); align-items: start; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-head { min-height: 64px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.panel-body { padding: 20px; }
.stat { padding: 18px; }
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 13px; font-weight: 650; }
.stat strong { display: block; margin-top: 10px; font-size: 27px; letter-spacing: -.04em; }
.stat small { display: block; margin-top: 4px; color: var(--ink-2); }

.trip-hero { position: relative; min-height: 258px; padding: 30px; overflow: hidden; background: #173563; color: white; border-radius: var(--radius-lg); display: flex; flex-direction: column; justify-content: space-between; }
.trip-hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -85px; top: -120px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(100,154,255,.85), rgba(36,99,235,.08) 68%); pointer-events: none; }
.trip-hero > * { position: relative; z-index: 1; }
.trip-hero .meta { display: flex; gap: 10px; flex-wrap: wrap; color: #c8d7ee; font-size: 13px; }
.trip-hero h2 { max-width: 620px; margin: 28px 0 8px; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; letter-spacing: -.05em; }
.trip-hero p { margin: 0; color: #c8d7ee; }
.hero-bottom { margin-top: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.avatar-stack { display: flex; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 2px solid white; background: #dfe8fa; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; margin-left: -8px; }
.avatar:first-child { margin-left: 0; }
.avatar.blue { background: #7cc6ff; }
.avatar.rose { background: #ffc0c7; }
.avatar.gold { background: #f8d78a; }

.progress-list { display: grid; gap: 16px; }
.check-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; }
.check-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); }
.check-icon.done { background: #e7f6ee; color: var(--ok); }
.check-row strong { display: block; font-size: 14px; }
.check-row span { display: block; margin-top: 3px; color: var(--ink-2); font-size: 12px; }
.mini-progress { height: 6px; overflow: hidden; border-radius: 99px; background: #e6ebf3; }
.mini-progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.alert-list { display: grid; gap: 10px; }
.alert { padding: 13px 14px; border-radius: var(--radius-md); display: grid; grid-template-columns: 30px 1fr; gap: 10px; line-height: 1.45; }
.alert i { font-size: 20px; margin-top: 1px; }
.alert strong { display: block; font-size: 14px; }
.alert p { margin: 3px 0 0; font-size: 13px; color: inherit; opacity: .82; }
.alert.orange { background: #fff2df; color: #823b08; }
.alert.blue { background: var(--accent-weak); color: var(--accent-strong); }
.alert.red { background: #ffebeb; color: #9c2323; }

.date-strip { display: flex; gap: 8px; padding: 4px 0 20px; overflow-x: auto; scrollbar-width: thin; }
.date-tab { flex: 0 0 auto; min-width: 78px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink-2); cursor: pointer; text-align: center; }
.date-tab strong { display: block; margin-top: 3px; color: var(--ink); font-size: 16px; }
.date-tab.active { background: var(--accent); border-color: var(--accent); color: #dce7ff; }
.date-tab.active strong { color: white; }
.timeline-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: start; }
.timeline { position: relative; padding: 12px 0; }
.timeline::before { content: ""; position: absolute; left: 76px; top: 24px; bottom: 24px; width: 2px; background: #d9e3f2; }
.timeline-item { position: relative; display: grid; grid-template-columns: 62px 18px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 0; }
.timeline-time { padding-top: 15px; color: var(--ink-2); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.timeline-node { position: relative; z-index: 2; width: 14px; height: 14px; margin-top: 17px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #a9bfea; }
.timeline-card { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.timeline-card.dragging { opacity: .5; }
.item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.item-top h3 { margin: 0; font-size: 16px; }
.item-meta { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.item-actions { display: flex; gap: 4px; }
.tiny-button { width: 34px; height: 34px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-2); cursor: pointer; }
.tiny-button:hover { background: var(--accent-weak); color: var(--accent-strong); }
.leg { margin: 2px 0 2px 104px; min-height: 34px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 99px; background: var(--accent-weak); color: var(--accent-strong); font-size: 12px; font-weight: 700; }
.status-badge.lock { background: #fff2df; color: #8b420a; }
.status-badge.ok { background: #e7f6ee; color: #12663f; }

.wishlist-list, .member-list, .expense-list, .booking-list { display: grid; }
.list-row { min-height: 76px; padding: 14px 4px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.list-row:last-child { border-bottom: 0; }
.place-main { min-width: 0; display: flex; align-items: center; gap: 13px; }
.place-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: var(--radius-md); background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-size: 20px; }
.place-copy { min-width: 0; }
.place-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-copy span { display: block; margin-top: 5px; color: var(--ink-2); font-size: 13px; }
.row-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.preference-group { display: flex; gap: 4px; }
.preference-button { min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 99px; background: white; color: var(--ink-2); font-size: 12px; cursor: pointer; }
.preference-button.active { border-color: #9bb5ee; background: var(--accent-weak); color: var(--accent-strong); font-weight: 750; }
.sync-status { padding: 6px 9px; border-radius: 99px; background: #edf1f7; color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.sync-status.ok { background: #e4f4eb; color: #17603d; }
.sync-status.pending { background: #fff2d9; color: #77510a; }
.sync-status.error { background: #ffebeb; color: #8e2020; }
.auth-button img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.presence-line { margin: 0 0 14px; color: var(--ink-2); font-size: 13px; }
.presence-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #22a35a; box-shadow: 0 0 0 3px #e4f4eb; }
.place-search-box { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #f7f9fc; }
.place-search-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.place-search-results { display: grid; gap: 6px; max-height: 230px; overflow-y: auto; }
.place-result { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: white; color: var(--ink); text-align: left; cursor: pointer; }
.place-result:hover, .place-result:focus-visible { border-color: var(--accent); background: var(--accent-weak); }
.place-result strong, .place-result span { display: block; }
.place-result span, .search-note { margin: 3px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.45; }
.search-note.selected { color: #17603d; font-weight: 700; }

.map-panel { position: relative; min-height: 590px; overflow: hidden; background-color: #e7edf4; background-image: linear-gradient(rgba(255,255,255,.75) 2px, transparent 2px), linear-gradient(90deg, rgba(255,255,255,.75) 2px, transparent 2px), linear-gradient(rgba(119,139,168,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(119,139,168,.12) 1px, transparent 1px); background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.map-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 70% 35%, rgba(118, 184, 150, .24), transparent 25%), radial-gradient(ellipse at 30% 75%, rgba(105, 158, 209, .2), transparent 28%); pointer-events: none; }
.map-route { position: absolute; height: 4px; transform-origin: left center; background: var(--accent); border-radius: 99px; opacity: .75; }
.map-pin { position: absolute; z-index: 2; width: 40px; height: 40px; border: 4px solid white; border-radius: 50% 50% 50% 10%; background: var(--accent); color: white; box-shadow: 0 8px 16px rgba(31, 57, 99, .25); display: grid; place-items: center; font-weight: 800; transform: translate(-50%, -50%) rotate(-45deg); cursor: pointer; }
.map-pin span { transform: rotate(45deg); }
.map-pin:hover { background: var(--accent-strong); }
.map-legend { position: absolute; z-index: 3; left: 16px; bottom: 16px; max-width: calc(100% - 32px); padding: 12px 14px; border-radius: var(--radius-md); background: rgba(255,255,255,.94); box-shadow: var(--shadow-float); font-size: 13px; }

.empty-state { min-height: 300px; padding: 40px 24px; text-align: center; display: grid; place-items: center; }
.empty-state i { font-size: 42px; color: var(--accent); }
.empty-state h2 { margin: 14px 0 8px; font-size: 22px; }
.empty-state p { max-width: 42ch; margin: 0 auto 20px; color: var(--ink-2); line-height: 1.6; }

.today-card { max-width: 760px; margin: 0 auto; overflow: hidden; }
.today-top { padding: 24px; background: #173563; color: white; }
.today-top p { margin: 0 0 7px; color: #c8d7ee; }
.today-top h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.next-stop { padding: 26px; }
.next-stop .time-kicker { color: var(--accent-strong); font-weight: 750; }
.next-stop h3 { margin: 8px 0; font-size: 28px; }
.next-stop p { color: var(--ink-2); line-height: 1.6; }
.today-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }

.budget-meter { margin: 8px 0 24px; }
.budget-summary { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.budget-summary strong { font-size: 24px; }
.meter-track { height: 12px; overflow: hidden; border-radius: 99px; background: #e7ecf4; }
.meter-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.category-bars { display: grid; gap: 14px; }
.category-row { display: grid; grid-template-columns: 70px 1fr 88px; gap: 12px; align-items: center; font-size: 13px; }
.category-row .bar { height: 7px; border-radius: 99px; background: #e7ecf4; overflow: hidden; }
.category-row .bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.category-row strong { text-align: right; font-variant-numeric: tabular-nums; }

.safety-hero { padding: 26px; background: #eaf5f0; border: 1px solid #cde6da; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.safety-hero h2 { margin: 0 0 8px; font-size: 24px; }
.safety-hero p { margin: 0; color: #3c6654; line-height: 1.55; }
.safety-number { font-size: 30px; font-weight: 800; color: #12663f; white-space: nowrap; }
.resource-link { min-height: 72px; padding: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; text-decoration: none; }
.resource-link:last-child { border-bottom: 0; }
.resource-link:hover { background: var(--accent-weak); }

.dialog { width: min(100% - 32px, 720px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--radius-lg); background: transparent; color: var(--ink); }
.dialog::backdrop { background: rgba(13, 27, 51, .55); backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-float); }
.dialog-card.narrow { max-width: 560px; margin: auto; }
.dialog-card.wide { width: 100%; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.dialog-head h2 { margin: 0; font-size: 24px; letter-spacing: -.035em; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; color: var(--ink); font-size: 14px; font-weight: 650; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #bdc9da; border-radius: var(--radius-sm); background: white; color: var(--ink); font-size: 16px; font-weight: 450; }
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #65758d; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid rgba(36, 99, 235, .18); }
.form-error { padding: 10px 12px; border-radius: var(--radius-sm); background: #ffebeb; color: #8e2020; }
.dialog-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 10px; }
.plan-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan-option { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.plan-option.recommended { border-color: #9bb5ee; background: var(--accent-weak); }
.plan-option h3 { margin: 0 0 8px; }
.plan-option p { color: var(--ink-2); line-height: 1.55; }
.plan-metrics { display: flex; gap: 18px; margin: 14px 0; font-size: 13px; }
.plan-order { margin: 0; padding-left: 20px; color: var(--ink-2); line-height: 1.8; }

.toast-region { position: fixed; z-index: 80; right: 20px; bottom: 24px; display: grid; gap: 8px; }
.toast { min-width: 240px; max-width: 360px; padding: 13px 15px; border-radius: var(--radius-md); background: #10213f; color: white; box-shadow: var(--shadow-float); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.mobile-nav { display: none; }

.legal-shell { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 80px; }
.legal-shell .brand { color: var(--ink); padding-left: 0; }
.legal-shell article { padding: 36px; background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); line-height: 1.8; }
.legal-shell h1 { margin-top: 0; font-size: 34px; letter-spacing: -.04em; }
.legal-shell h2 { margin-top: 34px; font-size: 20px; }
.legal-shell p, .legal-shell li { color: var(--ink-2); }
.legal-meta { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.site-footer { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px 22px; color: var(--ink-2); font-size: 13px; }

@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .timeline-layout { grid-template-columns: 1fr; }
  .timeline-layout > aside { order: -1; }
}

@media (max-width: 767px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 64px; padding: 0 16px; padding-top: env(safe-area-inset-top); }
  .mobile-brand { display: flex; }
  .trip-switcher { display: none; }
  .top-actions .icon-button { display: none; }
  .sync-status { display: none; }
  .auth-button span { display: none; }
  .auth-button { width: 44px; padding: 0; }
  .top-actions .compact span { display: none; }
  .top-actions .compact { width: 44px; padding: 0; }
  #main-content { padding: 24px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-head { display: grid; gap: 18px; }
  .page-head h1 { font-size: 30px; }
  .page-actions { justify-content: flex-start; }
  .stats-grid, .two-column, .three-column, .plan-options { grid-template-columns: 1fr; }
  .trip-hero { min-height: 300px; padding: 24px; }
  .trip-hero h2 { font-size: 34px; }
  .hero-bottom { align-items: flex-start; flex-direction: column; }
  .hero-bottom .primary-button { width: 100%; }
  .panel-head { padding: 16px; }
  .panel-body { padding: 16px; }
  .timeline::before { left: 62px; }
  .timeline-item { grid-template-columns: 48px 16px minmax(0, 1fr); gap: 7px; }
  .leg { margin-left: 78px; }
  .timeline-card { padding: 14px; }
  .item-top { display: block; }
  .item-actions { margin-top: 10px; }
  .list-row { align-items: flex-start; flex-direction: column; }
  .row-actions { width: 100%; justify-content: flex-end; }
  .preference-group { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .map-panel { min-height: 520px; }
  .today-actions { grid-template-columns: 1fr; }
  .safety-hero { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .place-search-controls { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .dialog-card { padding: 20px; }
  .dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mobile-nav { position: fixed; z-index: 30; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); min-height: 64px; padding: 6px; border: 1px solid rgba(197,209,225,.9); border-radius: var(--radius-lg); background: rgba(255,255,255,.95); box-shadow: var(--shadow-float); display: grid; grid-template-columns: repeat(5, 1fr); backdrop-filter: blur(14px); }
  .mobile-nav .nav-button { min-height: 52px; padding: 5px 2px; border-radius: var(--radius-md); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 10px; text-align: center; color: var(--ink-2); }
  .mobile-nav .nav-button i { font-size: 20px; }
  .mobile-nav .nav-button.active { color: var(--accent-strong); background: var(--accent-weak); box-shadow: none; }
  .toast-region { left: 14px; right: 14px; bottom: 92px; }
  .toast { width: 100%; min-width: 0; max-width: none; }
  .legal-shell article { padding: 24px 20px; }
}

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