/* Hall Atlas — Hall Design Language (dark chrome, teal identity) */
/* Sol's palette (adopted per German) — warm coral accent, green/amber statuses */
:root {
  --bg-0: #0b0d12;
  --bg-1: #10141c;
  --bg-2: #161b25;
  --bg-3: #1c2230;
  --hairline: rgba(255, 255, 255, 0.09);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f2eb;
  --text-dim: #929aa9;
  --text-faint: #687181;
  --accent: #f2755f;
  --accent-dim: rgba(242, 117, 95, 0.14);
  --been: #68d5a2;
  --want: #f1b869;
  --amber: #f1b869;
  --red: #EF4444;
  --chrome: rgba(11, 13, 18, 0.85);
  --chrome-side: rgba(11, 13, 18, 0.6);
  --body-grad: linear-gradient(160deg, #0b0d12, #141926);
  --card-shadow: none;
  --r-control: 10px;
  --r-card: 16px;
  --r-sheet: 24px;
  --font-ui: 'Inter', system-ui, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
}
:root[data-ui="light"] {
  --bg-0: #f4efe6;
  --bg-1: #fffdf9;
  --bg-2: #f8f3eb;
  --bg-3: #eee6d9;
  --hairline: rgba(36, 32, 25, 0.1);
  --hairline-strong: rgba(36, 32, 25, 0.18);
  --text: #242019;
  --text-dim: #746e64;
  --text-faint: #948c80;
  --accent: #f2755f;
  --accent-dim: rgba(242, 117, 95, 0.12);
  --been: #2f9e6b;
  --want: #b07b28;
  --amber: #b07b28;
  --red: #DC2626;
  --chrome: rgba(255, 253, 249, 0.88);
  --chrome-side: rgba(250, 246, 238, 0.85);
  --body-grad: linear-gradient(160deg, #f4efe6, #eae2d3);
  --card-shadow: 0 18px 50px rgba(48, 38, 25, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text);
  background: var(--body-grad);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
input, select { font-family: inherit; font-size: 16px; }

/* ---------- top bar ---------- */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hairline);
  background: var(--chrome);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-globe { font-size: 22px; }
.sidebar.collapsed { display: none; }
.brand h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  margin: 0;
  letter-spacing: 0.01em;
}

.searchwrap { position: relative; max-width: 560px; }
.searchwrap input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  color: var(--text);
  padding: 8px 12px;
  outline: none;
  transition: border-color 160ms ease-out;
}
.searchwrap input:focus { border-color: var(--accent); }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg-1);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  z-index: 40;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  transition: background 160ms ease-out;
}
.search-result:hover, .search-result.kbd-focus { background: var(--accent-dim); }
.search-result .sr-type {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 52px;
}
.search-result .sr-name { flex: 1; }
.search-result .sr-sub { color: var(--text-dim); font-size: 13px; }
.search-result .sr-pin {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg-2);
  padding: 3px 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.search-result .sr-pin:hover { color: var(--accent); border-color: var(--accent); }

.topbar-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* segmented control */
.seg {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  padding: 2px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: none;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 160ms ease-out;
}
.seg button:active { transform: scale(0.98); }
.seg button.active { background: var(--accent-dim); color: var(--accent); }
.seg-wide { display: flex; width: 100%; margin-top: 10px; }
.seg-wide button { flex: 1; }

.iconbtn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  font-size: 16px;
  transition: all 160ms ease-out;
}
.iconbtn:active { transform: scale(0.98); }
.iconbtn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); }
.iconbtn.off { opacity: 0.45; }

/* ---------- layout ---------- */
.layout { display: flex; flex: 1; min-height: 0; }
.sidebar {
  width: 330px;
  min-width: 330px;
  overflow-y: auto;
  border-right: 1px solid var(--hairline);
  background: var(--chrome-side);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.mapwrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.map-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  background: var(--chrome);
  backdrop-filter: blur(12px);
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 12px;
}
.map-toolbar .searchwrap { flex: 1; }
.map-canvas { flex: 1; position: relative; min-height: 0; }
#map { position: absolute; inset: 0; }

.map-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 13, 18, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--text-dim);
  pointer-events: none;
  transition: opacity 240ms ease-out;
  z-index: 10;
}
.map-hint.hidden { opacity: 0; }
.map-hint.planning { color: var(--accent); border-color: var(--accent); }

/* trip planner — lives in the toolbar, right of search */
.trip-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 5px 10px;
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  text-align: left;
  transition: all 160ms ease-out;
  flex-shrink: 0;
}
.trip-fab:hover { border-color: var(--accent); }
.trip-fab:active { transform: scale(0.98); }
.trip-fab .tf-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--accent-dim);
  font-size: 15px;
}
.trip-fab .tf-copy { flex: 1; }
.trip-fab .tf-copy small {
  display: block;
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.trip-fab .tf-copy strong { display: block; font-size: 12px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.trip-fab .tf-chevron { color: var(--text-faint); font-size: 16px; }
.trip-fab.planning { border-color: var(--accent); }

/* ---------- panels ---------- */
.panel { padding: 18px 20px; border-bottom: 1px solid var(--hairline); }
.panel-grow { flex: 1; }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-title {
  font-family: var(--font-ui);
  font-weight: 650;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 12px;
  color: var(--text-dim);
}

/* intro — the serif identity moment */
.panel-intro { padding: 24px 20px 20px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.intro-headline {
  font-family: var(--font-serif);
  font-weight: 530;
  font-size: clamp(24px, 2vw, 29px);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0;
}
.intro-sub { margin: 9px 0 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.count-chip {
  font-family: var(--font-ui);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  background: var(--bg-2);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--text-dim);
  vertical-align: 2px;
}

/* people */
.people-list { display: flex; flex-direction: column; gap: 6px; }
.person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  transition: all 160ms ease-out;
  cursor: pointer;
  user-select: none;
}
.person-row:hover { background: var(--bg-1); border-color: var(--hairline); }
.person-row:active { transform: scale(0.98); }
.person-row.selected { border-color: var(--p-color, var(--accent)); background: color-mix(in srgb, var(--p-color, var(--accent)) 10%, var(--bg-1)); }
.person-row.dimmed { opacity: 0.45; }
.person-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px;
  background: var(--p-color, var(--accent));
  flex-shrink: 0;
}
.person-name { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-counts {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.person-counts b { color: var(--text); font-weight: 600; }
.person-edit {
  border: 0; background: none;
  color: var(--text-faint);
  font-size: 13px;
  padding: 2px 4px;
  opacity: 0;
  transition: opacity 160ms ease-out;
}
.person-row:hover .person-edit { opacity: 1; }

.btn-quiet {
  margin-top: 8px;
  width: 100%;
  background: none;
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--r-control);
  color: var(--text-dim);
  padding: 8px;
  font-size: 13px;
  transition: all 160ms ease-out;
}
.btn-quiet:hover { color: var(--accent); border-color: var(--accent); }
.btn-small { width: auto; margin-top: 0; padding: 4px 10px; }

/* stats */
.stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat-tile {
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 11px;
  text-align: left;
  box-shadow: var(--card-shadow);
  position: relative;
}
.stat-tile::before {
  content: '';
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--tile-dot, var(--accent));
  margin-bottom: 8px;
}
.stat-tile .st-num {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--text);
}
.stat-tile .st-label { font-size: 10px; color: var(--text-dim); margin-top: 5px; white-space: nowrap; }
.count-scope {
  float: right;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  font-size: 11px;
  color: var(--accent);
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* trips */
.trips-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.trip-card {
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: 10px 12px;
}
.trip-card.active-planning { border-color: var(--accent); }
.trip-head { display: flex; align-items: center; gap: 8px; }
.trip-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.trip-name { flex: 1; font-weight: 600; font-size: 14px; }
.trip-meta { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; margin-top: 2px; }
.trip-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.trip-actions button {
  border: 1px solid var(--hairline);
  background: var(--bg-2);
  border-radius: 8px;
  font-size: 12px;
  padding: 4px 9px;
  color: var(--text-dim);
  transition: all 160ms ease-out;
}
.trip-actions button:hover { color: var(--accent); border-color: var(--accent); }
.trip-actions button.danger:hover { color: var(--red); border-color: var(--red); }
.trip-stops { margin: 8px 0 0; padding: 0; list-style: none; }
.trip-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}
.trip-stop .ts-num {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--bg-2);
  border: 1px solid var(--hairline-strong);
  flex-shrink: 0;
}
.trip-stop .ts-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-stop .ts-dist { color: var(--text-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.trip-stop button {
  border: 0; background: none;
  color: var(--text-faint);
  padding: 0 3px;
  font-size: 12px;
}
.trip-stop button:hover { color: var(--text); }

.planning-banner {
  margin-top: 8px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: var(--r-control);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.planning-banner button {
  margin-left: auto;
  border: 1px solid var(--accent);
  background: none;
  color: var(--accent);
  border-radius: 8px;
  font-size: 12px;
  padding: 3px 8px;
}

/* pins list */
.pins-list { display: flex; flex-direction: column; gap: 6px; }
.pin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  transition: all 160ms ease-out;
  cursor: pointer;
}
.pin-row:hover { background: var(--bg-1); border-color: var(--hairline); }
.pin-row .pr-emoji {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.pin-row .pr-body { flex: 1; min-width: 0; }
.pin-row .pr-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-row .pr-sub { font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pin-row .pr-status { font-size: 11px; flex-shrink: 0; }
.pr-status.been { color: var(--been); }
.pr-status.want { color: var(--want); }

/* pin photos */
.photo-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 6px; }
.photo-thumb {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--hairline-strong);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .pt-x {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  display: grid; place-items: center;
}
.popup-photos { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.popup-photos img {
  width: 52px; height: 52px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--hairline-strong);
  cursor: zoom-in;
}
/* family sign-in gate */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: var(--body-grad);
}
.auth-card {
  text-align: center;
  padding: 40px 36px;
  background: var(--bg-1);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sheet);
  box-shadow: var(--card-shadow);
  max-width: 320px;
}
.auth-globe { font-size: 44px; }
.auth-title {
  font-family: var(--font-serif);
  font-weight: 530;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
}
.auth-msg { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }
.auth-btn { width: 100%; }
.auth-spin {
  width: 26px; height: 26px;
  margin: 0 auto;
  border-radius: 50%;
  border: 3px solid var(--hairline-strong);
  border-top-color: var(--accent);
  animation: auth-rot 800ms linear infinite;
}
@keyframes auth-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-spin { animation: none; } }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.88);
  display: grid;
  place-items: center;
  z-index: 400;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

/* trip stop check-ins */
.ts-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-strong) !important;
  background: none !important;
  color: transparent !important;
  font-size: 11px !important;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  padding: 0 !important;
  transition: all 160ms ease-out;
}
.ts-check.checked {
  background: var(--been) !important;
  border-color: var(--been) !important;
  color: #0b2b1c !important;
}
.trip-stop.checked .ts-name { color: var(--text-dim); }
.trip-stop-marker.checked { font-size: 12px; }

.empty-state {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 18px 10px;
}
.empty-state .es-art { font-size: 28px; display: block; margin-bottom: 6px; }

.panel-footer { display: flex; gap: 8px; border-bottom: 0; }

/* ---------- dialogs ---------- */
.dialog-backdrop[hidden] { display: none; }
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 9, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 100;
  animation: fadeIn 160ms ease-out;
}
@keyframes fadeIn { from { opacity: 0; } }
.dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: linear-gradient(170deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sheet);
  padding: 20px;
  animation: sheetIn 240ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes sheetIn { from { transform: translateY(16px) scale(0.98); opacity: 0; } }
.dialog-small { width: min(360px, calc(100vw - 32px)); }
.dialog-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  margin: 0 0 4px;
}
.dialog-place { font-size: 13px; color: var(--accent); margin-bottom: 14px; min-height: 17px; }
.dialog label { display: block; font-size: 12px; color: var(--text-dim); margin-top: 12px; }
.dialog input, .dialog select {
  width: 100%;
  margin-top: 4px;
  background: var(--bg-0);
  border: 1px solid var(--hairline);
  border-radius: var(--r-control);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  transition: border-color 160ms ease-out;
}
.dialog input:focus, .dialog select:focus { border-color: var(--accent); }
.field-label { font-size: 12px; color: var(--text-dim); margin-top: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.dialog-actions .spacer { flex: 1; }
.dialog-actions .btn-quiet { margin: 0; width: auto; padding: 8px 14px; border-style: solid; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--r-control);
  padding: 9px 18px;
  font-weight: 600;
  font-size: 14px;
  margin-left: auto;
  transition: all 160ms ease-out;
}
.btn-primary:active { transform: scale(0.98); }
.btn-danger-quiet {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: var(--r-control);
  padding: 8px 12px;
  font-size: 13px;
}

.swatches { display: flex; gap: 7px; margin-top: 6px; flex-wrap: wrap; }
.swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  transition: all 160ms ease-out;
}
.swatch.active { border-color: var(--text); transform: scale(1.12); }
.field-hint { color: var(--text-faint); font-weight: 400; font-size: 11px; }
.who-chips { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.who-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--bg-0);
  font-size: 13px;
  color: var(--text-dim);
  transition: all 160ms ease-out;
}
.who-chip:active { transform: scale(0.98); }
.who-chip.active {
  border-color: var(--p-color, var(--accent));
  color: var(--text);
  background: color-mix(in srgb, var(--p-color, var(--accent)) 16%, var(--bg-0));
}
.who-chip .wc-check { font-size: 11px; color: var(--p-color, var(--accent)); display: none; }
.who-chip.active .wc-check { display: inline; }

.emoji-row { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.emoji-opt {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--bg-0);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-size: 16px;
  transition: all 160ms ease-out;
}
.emoji-opt.active { border-color: var(--accent); background: var(--accent-dim); }

/* ---------- map pins ---------- */
.atlas-pin {
  width: 30px; height: 30px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 3px 10px rgba(0,0,0,0.45), 0 0 14px var(--pin-glow, transparent);
  cursor: pointer;
  transition: transform 160ms ease-out;
}
.atlas-pin:hover { transform: rotate(-45deg) scale(1.15); }
.atlas-pin .pin-inner { transform: rotate(45deg); font-size: 13px; line-height: 1; }
.atlas-pin.want { border-style: dashed; opacity: 0.92; }
.trip-stop-marker {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.trip-plane {
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

/* maplibre popup restyle */
.maplibregl-popup-content {
  background: var(--bg-1) !important;
  color: var(--text);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-card) !important;
  padding: 14px !important;
  font-family: var(--font-ui);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5) !important;
  min-width: 210px;
}
.maplibregl-popup-tip { border-top-color: var(--bg-1) !important; border-bottom-color: var(--bg-1) !important; }
.maplibregl-popup-close-button { color: var(--text-dim); font-size: 18px; right: 6px; top: 4px; }
.popup-title { font-family: var(--font-serif); font-weight: 600; font-size: 16px; margin: 0 0 2px; padding-right: 14px; }
.popup-place { font-size: 12px; color: var(--text-dim); }
.popup-person { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-top: 8px; }
.popup-person .pp-dot { width: 8px; height: 8px; border-radius: 50%; }
.popup-notes { font-size: 12px; color: var(--text-dim); margin-top: 6px; font-style: italic; }
.popup-status { font-size: 12px; margin-top: 4px; }
.popup-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.popup-actions button {
  border: 1px solid var(--hairline);
  background: var(--bg-2);
  color: var(--text-dim);
  border-radius: 8px;
  font-size: 12px;
  padding: 4px 9px;
  transition: all 160ms ease-out;
}
.popup-actions button:hover { color: var(--accent); border-color: var(--accent); }
.popup-actions button.flip { color: var(--accent); border-color: var(--accent); }
.popup-actions button.danger:hover { color: var(--red); border-color: var(--red); }

/* ---------- toast & confetti ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: toastIn 240ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes toastIn { from { transform: translate(-50%, 12px); opacity: 0; } }
#confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetto {
  position: absolute;
  width: 8px; height: 12px;
  top: -16px;
  animation: confettiFall var(--dur, 2.4s) ease-in forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(var(--rot, 540deg)); opacity: 0.7; }
}

/* ---------- responsive ---------- */
.mobile-only { display: none; }
@media (max-width: 820px) {
  .mobile-only { display: grid; }
  .brand h1 { display: none; }
  .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; row-gap: 8px; }
  .searchwrap { max-width: none; }
  .trip-fab { min-width: 0; }
  .trip-fab .tf-copy, .trip-fab .tf-chevron { display: none; }
  #theme-seg button { padding: 5px 8px; font-size: 12px; }
  .layout { position: relative; }
  .sidebar {
    position: absolute;
    inset: auto 0 0 0;
    top: 20%;
    width: 100%;
    min-width: 0;
    border-right: 0;
    border-top: 1px solid var(--hairline-strong);
    border-radius: var(--r-sheet) var(--r-sheet) 0 0;
    background: var(--chrome);
    transform: translateY(105%);
    transition: transform 240ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
    z-index: 25;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sidebar.open { transform: translateY(0); }
  /* a desktop-collapsed panel must still work as a sheet on mobile */
  .sidebar.collapsed { display: flex; }
}

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