:root {
  --bg:        #050505;
  --bg-deep:   #0a0a0c;
  --surface:   rgba(255,255,255,0.03);
  --surface2:  rgba(255,255,255,0.06);
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.16);
  --ink:       #f5f5f7;
  --ink-dim:   rgba(245,245,247,0.62);
  --ink-faint: rgba(245,245,247,0.36);
  /* --gold is this page's accent — kept the historical name, now a pine green */
  --gold:      #6fbe93;
  --gold-dim:  #2e7d5b;
  --gold-wash: rgba(111,190,147,0.12);
  --accent-soft: #123626;
  --red:       #e0715f;
  --red-wash:  rgba(224,113,95,0.12);
  --green:     #3ddc97;
  --green-wash:rgba(61,220,151,0.12);
  --warn:      #f0b959;
  --warn-wash: rgba(240,185,89,0.12);
  --radius:    1.5rem;
  --radius-sm: 1rem;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-head: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
  position: relative;
  overflow-x: hidden;
}

/* ── Ambient mesh (pure CSS, no markup needed) ────────────────────────────────── */

body::before, body::after {
  content: '';
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
}
body::before {
  width: 42rem; height: 42rem;
  background: radial-gradient(circle, var(--gold-dim), transparent 70%);
  top: -16rem; left: -14rem;
  opacity: 0.24;
}
body::after {
  width: 34rem; height: 34rem;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  bottom: -14rem; right: -12rem;
  opacity: 0.22;
}
:root[data-theme="light"] body::before,
:root[data-theme="light"] body::after {
  display: none;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */

.page {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5,5,5,0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title-input {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--gold);
  outline: none;
  padding: 0;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-dim);
  font-size: 13px;
  padding: 6px 0;
  flex-shrink: 0;
  transition: color 0.4s cubic-bezier(0.32,0.72,0,1);
}
.back-btn:hover { color: var(--ink); }

/* ── Section tabs ────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 4px;
  padding: 12px 16px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  background: transparent;
  border: none;
  white-space: nowrap;
  transition: color 0.4s cubic-bezier(0.32,0.72,0,1), background 0.4s cubic-bezier(0.32,0.72,0,1);
}
.tab:hover { color: var(--ink-dim); }
.tab.active {
  color: var(--gold);
  background: var(--gold-wash);
}

/* ── Cards ───────────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.card-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--ink-faint);
  margin: 0 0 12px;
}

/* ── Home hub (list page) glass-bento system ──────────────────────────────────── */

.nav-wrap { display: flex; justify-content: center; padding: 1.5rem 1.25rem 0; position: relative; z-index: 1; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: 100%; max-width: 64rem; padding: 0.6rem 1rem 0.6rem 0.6rem; border-radius: 999px;
  background: rgba(255,255,255,0.045); border: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 20px 40px -20px rgba(0,0,0,0.6);
}
.back-link { display: flex; align-items: center; gap: 0.6rem; font-size: 13px; color: var(--ink-dim); padding: 0.35rem 0.9rem 0.35rem 0.5rem; border-radius: 999px; transition: background 0.4s cubic-bezier(0.32,0.72,0,1), color 0.4s cubic-bezier(0.32,0.72,0,1); }
.back-link:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.icon-circ { width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-mini { font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--ink-dim); }

.page-head { position: relative; z-index: 1; max-width: 64rem; margin: 0 auto; padding: 3.5rem 1.5rem 2rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-dim); margin-bottom: 1rem;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
h1.title { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1.05; letter-spacing: -0.02em; margin: 0; }

.wrap { position: relative; z-index: 1; max-width: 64rem; margin: 0 auto; padding: 0 1.5rem 6rem; display: flex; flex-direction: column; gap: 1.5rem; }

.shell { position: relative; padding: 0.4rem; border-radius: var(--radius); background: linear-gradient(155deg, rgba(255,255,255,0.07), rgba(255,255,255,0.015)); border: 1px solid var(--border); }
.core { border-radius: calc(var(--radius) - 0.4rem); background: rgba(255,255,255,0.028); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: inset 0 1px 1px rgba(255,255,255,0.09); padding: 1.5rem; }

.section-label { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 1.1rem; }
.section-label .line { flex: 1; height: 1px; background: var(--border); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.stat-tile { border-radius: 0.9rem; border: 1px solid var(--border); background: rgba(255,255,255,0.02); padding: 1rem; }
.stat-tile .v { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.stat-tile .k { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); margin-top: 0.4rem; }

.trip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.trip-card {
  border-radius: 1.1rem; border: 1px solid var(--border); background: rgba(255,255,255,0.02); padding: 1.25rem;
  cursor: pointer; transition: transform 0.4s cubic-bezier(0.32,0.72,0,1), border-color 0.4s cubic-bezier(0.32,0.72,0,1);
  display: flex; flex-direction: column; gap: 0.85rem; text-decoration: none; color: inherit;
}
.trip-card:hover { transform: translateY(-3px); border-color: var(--border2); }
.trip-card-top { display: flex; align-items: center; justify-content: space-between; }
.trip-icon { width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0; }
.trip-icon svg { width: 1.1rem; height: 1.1rem; }
.trip-legs { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); padding: 0.25rem 0.6rem; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.trip-name { font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--ink); }
.trip-dates { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-top: 0.2rem; }

.new-trip-card {
  border-radius: 1.1rem; border: 1px dashed var(--border2); background: rgba(255,255,255,0.01); padding: 1.25rem;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
  text-align: center; min-height: 8.5rem; transition: border-color 0.4s cubic-bezier(0.32,0.72,0,1), background 0.4s cubic-bezier(0.32,0.72,0,1);
}
.new-trip-card:hover { border-color: rgba(111,190,147,0.5); background: var(--gold-wash); }
.new-trip-icon { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--gold-wash); border: 1px solid rgba(111,190,147,0.3); display: flex; align-items: center; justify-content: center; color: var(--gold); }
.new-trip-icon svg { width: 1.1rem; height: 1.1rem; }
.new-trip-card span { color: var(--ink-dim); font-weight: 500; font-size: 13px; }

/* Centered glass dialog — scoped to .modal-overlay so trip.html's bottom-sheet
   .modal-backdrop modals (Add Leg, Costs, Vehicle, etc.) are untouched. */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity 0.4s cubic-bezier(0.32,0.72,0,1);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-overlay .modal {
  width: 100%; max-width: 28rem; border-radius: 1.5rem; padding: 0.4rem;
  background: linear-gradient(155deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02)); border: 1px solid var(--border);
  transform: translateY(16px) scale(0.98); transition: transform 0.4s cubic-bezier(0.32,0.72,0,1);
  max-height: none; overflow: visible;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-overlay .modal-core { border-radius: 1.3rem; background: var(--bg-deep); padding: 1.75rem; box-shadow: inset 0 1px 1px rgba(255,255,255,0.09); }
.modal-overlay .modal-title { font-size: 1.15rem; margin-bottom: 1.25rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.field label { font-size: 12px; color: var(--ink-dim); }
.field input, .field textarea {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 0.75rem;
  padding: 0.7rem 0.85rem; color: var(--ink); font-family: var(--font-body); font-size: 14px; outline: none;
  transition: border-color 0.4s cubic-bezier(0.32,0.72,0,1);
}
.field input:focus, .field textarea:focus { border-color: rgba(111,190,147,0.5); }
.field textarea { resize: vertical; min-height: 4rem; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  transition: opacity 0.4s cubic-bezier(0.32,0.72,0,1), transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }

.btn-primary {
  background: var(--gold);
  color: #04120b;
}
.btn-primary:hover { opacity: 0.88; }

.btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border2); color: var(--ink); }

.btn-danger {
  background: var(--red-wash);
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-danger:hover { opacity: 0.8; }

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.fab {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold);
  color: #04120b;
  border: none;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(111,190,147,0.35);
  z-index: 200;
  transition: transform 0.4s cubic-bezier(0.32,0.72,0,1), opacity 0.4s cubic-bezier(0.32,0.72,0,1);
}
.fab:hover { opacity: 0.9; transform: scale(1.05); }
.fab:active { transform: scale(0.95); }

/* ── Forms ───────────────────────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.4s cubic-bezier(0.32,0.72,0,1), background 0.4s cubic-bezier(0.32,0.72,0,1);
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(111,190,147,0.5);
  background: rgba(255,255,255,0.05);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 400px) { .form-row { grid-template-columns: 1fr; } }

.form-hint {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 2px;
}

/* ── Modal ───────────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.open {
  pointer-events: auto;
}
.modal-backdrop.open { opacity: 1; }

.modal {
  background: rgba(10,10,12,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 1.75rem 1.75rem 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 720px;
  max-height: 90svh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.modal-backdrop.open .modal { transform: translateY(0); }

/* Centered dialog variant (used for complex multi-step modals like the planner) */
.modal-backdrop.modal-center {
  align-items: center;
  padding: 20px;
  z-index: 2000;
}
#planner-confirm-modal {
  z-index: 3000;
}
.modal-backdrop.modal-center .modal {
  border-radius: 1.25rem;
  max-width: 560px;
  max-height: 88svh;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s;
}
.modal-backdrop.modal-center.open .modal {
  transform: scale(1) translateY(0);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.modal-actions .btn { flex: 1; }

/* ── Leg cards ───────────────────────────────────────────────────────────────── */

.leg-card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}

.leg-route {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.leg-place {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leg-arrow {
  color: var(--gold);
  font-size: 16px;
  flex-shrink: 0;
}

.leg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.leg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--surface2);
  color: var(--ink-dim);
}

.leg-badge.fuel { background: var(--green-wash); color: var(--green); }

.leg-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Stats row ───────────────────────────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.stat-cell {
  background: var(--bg-deep);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-val {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-val.gold { color: var(--gold); }
.stat-val.green { color: var(--green); }

/* ── Timeline (new flat layout) ─────────────────────────────────────────────── */

.timeline-list { display: flex; flex-direction: column; gap: 0; }

.timeline-leg-block {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.timeline-leg-block:last-child { border-bottom: none; }

.timeline-time-col { display: flex; flex-direction: column; align-items: flex-end; min-width: 68px; flex-shrink: 0; padding-top: 2px; }
.timeline-date-small { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.timeline-time { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--ink); }

.timeline-leg-info { flex: 1; min-width: 0; }
.timeline-leg-route { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-leg-meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-top: 2px; }
.timeline-arrival { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 2px; }

.timeline-stay {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
}
.timeline-stay-line { flex: 1; height: 1px; background: var(--border); }
.timeline-stay-label { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; flex-shrink: 0; }

.timeline-unscheduled {
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--ink-faint);
}

/* ── Planner ─────────────────────────────────────────────────────────────────── */

.planner-stop-row {
  display: flex; align-items: center; gap: 6px; padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.planner-stop-grip { color: var(--ink-faint); font-size: 16px; cursor: grab; flex-shrink: 0; user-select: none; }
.planner-stop-row.drag-over { border-color: var(--gold); background: var(--gold-wash); border-radius: var(--radius-sm); }
.planner-stop-del { background: none; border: none; color: var(--ink-faint); cursor: pointer; font-size: 14px; padding: 4px; flex-shrink: 0; }
.planner-stop-del:hover { color: var(--red); }
.planner-nights-btn {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 4px;
  width: 24px; height: 24px; font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--ink); flex-shrink: 0;
}
.planner-nights-val { font-family: var(--font-head); font-weight: 700; font-size: 15px; min-width: 18px; text-align: center; }

.planner-leg-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.planner-leg-date { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); min-width: 72px; flex-shrink: 0; padding-top: 3px; }
.planner-leg-info { flex: 1; min-width: 0; }
.planner-leg-route { font-weight: 600; font-size: 13px; }
.planner-leg-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); margin-top: 2px; }

.planner-stay {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); padding: 4px 0 4px 82px; border-bottom: 1px dashed var(--border);
}

.suggestion-card {
  border-radius: var(--radius); padding: 10px 12px; font-size: 13px; margin-bottom: 8px;
}
.suggestion-card.warn { background: var(--warn-wash); border: 1px solid rgba(240,185,89,0.4); }
.suggestion-card.ok   { background: var(--green-wash); border: 1px solid rgba(61,220,151,0.4); }
.suggestion-tag {
  display: inline-block; border-radius: 4px; padding: 1px 7px; font-family: var(--font-mono); font-size: 11px;
  margin: 2px 3px 0 0; font-weight: 500;
}
.suggestion-tag.remove { background: var(--red-wash); color: var(--red); }

/* ── Notes ───────────────────────────────────────────────────────────────────── */

.note-card {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
}

.note-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-wash);
  border: 1px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.note-body { flex: 1; min-width: 0; }

.note-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.note-author {
  font-weight: 700;
  font-size: 12px;
  color: var(--gold);
}

.note-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
}

.note-content {
  font-size: 13px;
  color: var(--ink-dim);
  word-break: break-word;
  white-space: pre-wrap;
}

.note-delete {
  background: none;
  border: none;
  color: var(--ink-faint);
  padding: 4px;
  font-size: 14px;
  line-height: 1;
  transition: color 0.4s cubic-bezier(0.32,0.72,0,1);
  flex-shrink: 0;
}
.note-delete:hover { color: var(--red); }

/* ── Costs ───────────────────────────────────────────────────────────────────── */

.cost-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.cost-row:last-child { border-bottom: none; }

.cost-type {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.cost-type.fuel     { background: var(--green-wash); color: var(--green); }
.cost-type.toll     { background: var(--warn-wash);  color: var(--warn); }
.cost-type.ferry    { background: rgba(127,166,214,0.15); color: #7fa6d6; }
.cost-type.parking  { background: var(--surface2); color: var(--ink-dim); }
.cost-type.misc     { background: var(--surface2); color: var(--ink-dim); }

.cost-notes { flex: 1; font-size: 12px; color: var(--ink-faint); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-amount { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cost-delete { background: none; border: none; color: var(--ink-faint); padding: 4px 6px; font-size: 14px; transition: color 0.4s cubic-bezier(0.32,0.72,0,1); flex-shrink: 0; }
.cost-delete:hover { color: var(--red); }

/* ── Map ─────────────────────────────────────────────────────────────────────── */

#map {
  height: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--bg-deep);
}

/* ── POI list ────────────────────────────────────────────────────────────────── */

.poi-list { display: flex; flex-direction: column; gap: 6px; }

.poi-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.poi-icon { font-size: 16px; flex-shrink: 0; }
.poi-name { font-weight: 600; color: var(--ink-dim); flex: 1; min-width: 0; }
.poi-type { font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-faint);
  font-size: 13px;
}
.empty-icon { font-size: 36px; margin-bottom: 10px; }
.empty-text { color: var(--ink-dim); margin-bottom: 4px; }

/* ── Misc ────────────────────────────────────────────────────────────────────── */

.section { padding: 16px 0 4px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: var(--ink-faint);
  margin: 0;
}

.divider { height: 1px; background: var(--border); margin: 16px 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: var(--surface2);
  color: var(--ink-faint);
}

.toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20,20,22,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  z-index: 400;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--red); color: var(--red); }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.routing-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--warn-wash);
  color: var(--warn);
  font-weight: 500;
}
.routing-badge.ok { background: var(--green-wash); color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
