/* ============================================================
   Road Trip Planner — modern theme
   ============================================================ */

:root {
  /* Palette */
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e7ebf0;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  /* Accents — sunset road trip */
  --coral: #ff6b4a;
  --coral-600: #f4502c;
  --amber: #ffb02e;
  --teal: #14b8a6;
  --indigo: #6366f1;
  --violet: #8b5cf6;

  --grad-warm: linear-gradient(135deg, #ff7e5f 0%, #ffb347 100%);
  --grad-night: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);

  /* Type colors */
  --c-place: #6366f1;
  --c-hotel: #ec4899;
  --c-activity: #14b8a6;

  /* UI */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .06);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, .16);
  --sidebar-w: 384px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sora', var(--font);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, button { font-family: inherit; }
a { color: var(--coral-600); }

/* The hidden attribute must always win over custom display values
   (.leg, .day__summary, .item__refuel… set display:flex/inline-flex). */
[hidden] { display: none !important; }

/* ============================================================
   Layout shell
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 600;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.sidebar__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.brand__logo {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--grad-warm);
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 126, 95, .4);
}
.brand__logo svg { width: 22px; height: 22px; }
.brand__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.brand__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  border: none;
  background: transparent;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 6px;
  width: 100%;
  transition: background .15s;
}
.brand__title:hover { background: var(--surface-2); }
.brand__title:focus { outline: none; background: var(--surface-2); box-shadow: 0 0 0 2px rgba(99, 102, 241, .25); }
.brand__subtitle { font-size: .74rem; color: var(--muted); padding-left: 4px; }

/* Stats */
.trip-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat__value { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.stat__label { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }

/* Days list */
.days {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.days::-webkit-scrollbar { width: 10px; }
.days::-webkit-scrollbar-thumb { background: #d8dee6; border-radius: 8px; border: 3px solid var(--surface); }
.days::-webkit-scrollbar-thumb:hover { background: #c2cad4; }

.day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  flex-shrink: 0; /* keep natural height; let .days scroll instead of collapsing cards */
}
.day__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  background: linear-gradient(180deg, #fff, #fcfdfe);
  border-bottom: 1px solid var(--line);
}
.day__grip {
  color: #cbd5e1;
  cursor: grab;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.day__grip:active { cursor: grabbing; }
.day__grip svg { width: 16px; height: 16px; }
.day__badge {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--grad-night);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  display: grid; place-items: center;
  font-family: var(--font-display);
}
.day__title {
  flex: 1;
  font-weight: 600;
  font-size: .95rem;
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 6px;
  min-width: 0;
}
.day__title:hover { background: var(--surface-2); }
.day__title:focus { outline: none; background: var(--surface-2); box-shadow: 0 0 0 2px rgba(99,102,241,.2); }
.day__meta { font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.day__del {
  border: none; background: transparent; color: #cbd5e1;
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0;
  transition: all .15s;
}
.day__del:hover { background: #fee2e2; color: #ef4444; }
.day__del svg { width: 15px; height: 15px; }

.day__items { padding: 8px; display: flex; flex-direction: column; gap: 6px; min-height: 12px; }
.day__items.is-empty { padding: 14px 8px; }
.day__empty {
  font-size: .8rem; color: var(--muted); text-align: center;
  padding: 8px; border: 1px dashed var(--line); border-radius: var(--radius-sm);
}

.day__add {
  margin: 2px 8px 10px;
  border: 1px dashed #cdd5df;
  background: var(--surface-2);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-size: .82rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .15s;
}
.day__add:hover { border-color: var(--coral); color: var(--coral-600); background: #fff7f4; }
.day__add svg { width: 15px; height: 15px; }

/* Item card */
.item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, border-color .15s;
}
.item:hover { box-shadow: var(--shadow-md); border-color: #dbe2ea; }
.item.sortable-ghost { opacity: .4; }
.item.sortable-chosen { box-shadow: var(--shadow-lg); }
.item__grip { color: #cbd5e1; cursor: grab; display: grid; place-items: center; flex-shrink: 0; }
.item__grip:active { cursor: grabbing; }
.item__grip svg { width: 14px; height: 14px; }
.item__index {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .76rem;
  font-family: var(--font-display);
}
.item__body { flex: 1; min-width: 0; }
.item__name { font-weight: 600; font-size: .88rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item__sub { font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.item__type-tag { font-weight: 600; }
.item__missing { color: var(--coral-600); font-weight: 600; }
.item__actions { display: flex; gap: 2px; flex-shrink: 0; }
.item__btn {
  border: none; background: transparent; color: #b3bdca;
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  transition: all .15s;
}
.item__btn:hover { background: var(--surface-2); color: var(--ink); }
.item__btn--del:hover { background: #fee2e2; color: #ef4444; }
.item__btn svg { width: 14px; height: 14px; }

/* Type dots */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot--place { background: var(--c-place); }
.dot--hotel { background: var(--c-hotel); }
.dot--activity { background: var(--c-activity); }

/* Sidebar actions / footer */
.sidebar__actions { padding: 6px 14px 10px; }
.sidebar__footer {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.link-btn {
  border: none; background: transparent; color: var(--muted);
  font-size: .8rem; font-weight: 600; padding: 2px 0;
  transition: color .15s;
}
.link-btn:hover { color: var(--ink); }
.link-btn--danger:hover { color: #ef4444; }
.sidebar__footer .link-btn:last-of-type { margin-left: auto; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: .88rem;
  font-weight: 600;
  transition: all .15s;
}
.btn svg { width: 16px; height: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--coral); color: #fff; box-shadow: 0 4px 12px rgba(255,107,74,.35); }
.btn--primary:hover { background: var(--coral-600); }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink-soft); }
.btn--ghost:hover { background: var(--surface-2); border-color: #d3dae2; color: var(--ink); }

.icon-btn {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
  transition: all .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }

/* ============================================================
   Map
   ============================================================ */
.map-wrap { position: relative; min-width: 0; }
#map { position: absolute; inset: 0; background: #e8edf2; }

.map-toolbar {
  position: absolute;
  top: 16px; left: 16px; right: 16px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  flex-wrap: wrap;
}
.map-toolbar > * { pointer-events: auto; }

.segmented {
  display: inline-flex;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 12px;
  padding: 4px;
  box-shadow: var(--shadow-md);
  gap: 2px;
}
.segmented__btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: .82rem; font-weight: 600;
  color: var(--muted);
  transition: all .15s;
}
.segmented__btn svg { width: 17px; height: 17px; }
.segmented__btn:hover { color: var(--ink); }
.segmented__btn.is-active { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }

.map-toolbar__summary { flex: 1; display: flex; justify-content: center; min-width: 200px; }
.route-pill {
  display: inline-flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 999px;
  padding: 9px 18px;
  box-shadow: var(--shadow-md);
  font-size: .86rem;
  font-weight: 600;
  color: var(--ink);
  max-width: 100%;
}
.route-pill--muted { color: var(--muted); font-weight: 500; }
.route-pill b { font-family: var(--font-display); }
.route-pill .sep { width: 1px; height: 16px; background: var(--line); }
.route-pill .route-pill__mode { color: var(--coral-600); }

.map-toolbar__right { display: flex; gap: 8px; }
.map-fab {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  color: var(--ink-soft);
  display: grid; place-items: center;
  transition: all .15s;
}
.map-fab:hover { color: var(--ink); transform: translateY(-1px); }
.map-fab svg { width: 20px; height: 20px; }
.map-fab.is-active { background: var(--coral); color: #fff; border-color: var(--coral); }

.map-banner {
  position: absolute;
  bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 500;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: .84rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  max-width: calc(100% - 40px);
}
.map-banner a { color: var(--amber); font-weight: 700; }
.map-banner button {
  border: none; background: rgba(255,255,255,.15); color: #fff;
  border-radius: 7px; padding: 4px 8px; font-size: .78rem; font-weight: 600;
}

/* Map markers (Leaflet divIcon) */
.map-marker {
  width: 30px; height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
  border: 2.5px solid #fff;
}
.map-marker span {
  transform: rotate(45deg);
  color: #fff; font-weight: 700; font-size: .8rem;
  font-family: var(--font-display);
}
.map-marker--place { background: var(--c-place); }
.map-marker--hotel { background: var(--c-hotel); }
.map-marker--activity { background: var(--c-activity); }

.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--font); }
.popup__type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.popup__name { font-weight: 700; font-size: .95rem; margin: 2px 0 4px; color: var(--ink); }
.popup__notes { font-size: .8rem; color: var(--muted); }

/* ============================================================
   Modals
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(3px); animation: fade .2s; }
.modal__panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px;
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  animation: pop .22s cubic-bezier(.16,1,.3,1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.modal__header h2 { font-family: var(--font-display); font-size: 1.1rem; margin: 0; }
.modal__body { padding: 18px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal__footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--line); }

/* Type picker */
.type-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-chip {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 9px 6px;
  font-size: .8rem; font-weight: 600; color: var(--ink-soft);
  transition: all .15s;
}
.type-chip:hover { border-color: #cbd5e1; }
.type-chip.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.type-chip.is-active .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.5); }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.field__input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .9rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
.field__input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.field__input::placeholder { color: #aab4c0; }
textarea.field__input { resize: vertical; min-height: 44px; }
.field__hint { font-size: .76rem; color: var(--muted); line-height: 1.5; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.search-box { position: relative; display: flex; align-items: center; }
.search-box__icon { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-box .field__input { padding-left: 36px; }
.search-box__spinner {
  position: absolute; right: 12px; width: 16px; height: 16px;
  border: 2px solid var(--line); border-top-color: var(--indigo);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.search-results {
  list-style: none; margin: 4px 0 0; padding: 4px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-md);
  max-height: 220px; overflow-y: auto;
}
.search-results li {
  padding: 9px 10px; border-radius: 8px; cursor: pointer;
  font-size: .85rem; color: var(--ink-soft);
  display: flex; gap: 8px; align-items: flex-start;
}
.search-results li:hover, .search-results li.is-active { background: var(--surface-2); }
.search-results li svg { width: 15px; height: 15px; color: var(--coral); flex-shrink: 0; margin-top: 2px; }
.search-results__name { font-weight: 600; color: var(--ink); }
.search-results__empty { padding: 12px; text-align: center; color: var(--muted); font-size: .84rem; }

.callout {
  font-size: .82rem; line-height: 1.5; color: var(--ink-soft);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 11px 13px;
}
.callout--ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.callout--warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }

/* ============================================================
   Toasts
   ============================================================ */
.toast-stack {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 1200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 11px 18px; border-radius: 12px;
  font-size: .85rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 9px;
  animation: toastIn .25s cubic-bezier(.16,1,.3,1);
}
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
.toast--ok svg { color: #34d399; }
.toast--err { background: #b91c1c; }
.toast--err svg { color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.toast.is-leaving { animation: toastOut .25s forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ============================================================
   Mobile sidebar toggle
   ============================================================ */
.sidebar-toggle {
  position: absolute;
  display: none;
  z-index: 650;
  top: 16px; left: 16px;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.6);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  place-items: center;
}
.sidebar-toggle svg { width: 22px; height: 22px; }

/* ============================================================
   Transport pill (static — car only)
   ============================================================ */
.map-mode {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--ink); color: #fff;
  border-radius: 12px; padding: 9px 14px;
  font-size: .82rem; font-weight: 600;
  box-shadow: var(--shadow-md);
}
.map-mode svg { width: 17px; height: 17px; }

/* ============================================================
   Leg connector (travel between two items)
   ============================================================ */
.leg {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 12px;
  font-size: .76rem; color: var(--muted);
}
.leg__icon { color: var(--coral); display: grid; place-items: center; flex-shrink: 0; }
.leg__icon svg { width: 15px; height: 15px; }
.leg__text { display: flex; align-items: center; gap: 4px 9px; flex-wrap: wrap; }
.leg__text b { color: var(--ink-soft); font-weight: 700; }
.leg__fuel { color: #9aa5b1; font-weight: 500; }

/* Item duration chip + refuel / warning badges */
.item__dur { color: var(--indigo); font-weight: 600; }
.item__refuel, .item__warn {
  margin-top: 5px; font-size: .73rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px; width: fit-content;
}
.item__refuel { color: #b45309; background: #fffbeb; border: 1px solid #fde68a; }
.item__warn { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }

/* Per-day summary footer */
.day__summary {
  display: flex; flex-wrap: wrap; gap: 5px 14px;
  padding: 9px 13px; margin: 0 8px 9px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .76rem; font-weight: 600; color: var(--ink-soft);
}
.day__summary span { white-space: nowrap; }

/* Map marker — refuel highlight */
.map-marker--refuel { box-shadow: 0 0 0 3px #fbbf24, 0 4px 10px rgba(0,0,0,.35); }
.map-marker__fuel {
  position: absolute; top: -7px; right: -7px;
  font-size: 13px; line-height: 1;
  background: #fff; border-radius: 50%;
  width: 18px; height: 18px; display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   Settings — inline segmented + separators + duration input
   ============================================================ */
.modal__sep { border: none; border-top: 1px solid var(--line); margin: 6px 0 2px; }
.segmented--inline {
  display: flex; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 3px; gap: 3px;
}
.segmented--inline .segmented__btn {
  flex: 1; justify-content: center; border-radius: 8px; padding: 9px 8px; font-size: .82rem;
}
.segmented--inline .segmented__btn.is-active { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }

.dur-input { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dur-input .field__input { width: 110px; flex: none; }
.dur-input__unit { font-size: .85rem; color: var(--muted); font-weight: 600; }
.dur-input__hint { font-size: .82rem; color: var(--indigo); font-weight: 600; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(90vw, var(--sidebar-w));
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-hidden { transform: translateX(-105%); }
  .sidebar-toggle { display: grid; }
  .map-toolbar { top: 16px; left: 72px; }
  .map-toolbar__summary { order: 3; flex-basis: 100%; min-width: 0; justify-content: flex-start; }
}
