/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Palace Map — styles
   Uses CSS vars from Palace Ring Layout:
   --bg, --card, --border, --text, --text-mid, --text-faint,
   --gold, --gold-muted, --surface,
   --success, --warning, --error, --info, --info-light
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Root container ── */
.trip-view {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.6;
}

.map-loading,
.map-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.map-error { color: var(--error); }

/* ── Trip index ── */
.trip-index {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 40px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
}
.trip-index-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 24px 0 20px;
}
.trip-index-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trip-card {
  background: var(--card, #fff);
  border: 1px solid var(--border, #e5e0d8);
  border-radius: 10px;
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.trip-card:hover {
  border-color: var(--gold, #b49a6a);
  box-shadow: 0 2px 8px rgba(180, 154, 106, 0.12);
}
.trip-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  text-align: center;
}
.trip-card-subtitle {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 2px;
  text-align: center;
}
.trip-card-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-mid, #8a7e6e);
  margin-top: 8px;
}
.trip-card-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
}
.trip-card-notes {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 6px;
  font-style: italic;
  text-align: center;
}

/* ── Trip header ── */
.trip-back-row {
  padding: 16px 0 0;
  text-align: left;
}
.trip-header {
  text-align: center;
  padding: 8px 0 12px;
}
.trip-back {
  background: none;
  border: 1px solid var(--border, #e5e0d8);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: var(--text-mid, #8a7e6e);
  cursor: pointer;
  transition: border-color 0.15s;
}
.trip-back:hover {
  border-color: var(--gold, #b49a6a);
  color: var(--text);
}
.trip-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--text);
  margin: 0;
}
.trip-subtitle {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin: 4px 0 2px;
  letter-spacing: 0.02em;
}
.trip-header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 2px 0 0;
}
.trip-header-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: 0.5;
}
.trip-header-notes {
  font-size: 0.75rem;
  color: var(--text-faint);
  opacity: 0.7;
  margin: 4px 0 0;
  font-style: italic;
}

/* ── Tab groups ── */
.trip-tab-groups {
  display: flex;
  gap: 0;
  margin: 0 -16px -1px;
  padding: 10px 16px 0;
  border-bottom: 1px solid var(--border);
}
.trip-tab-group {
  flex-shrink: 0;
  padding: 6px 18px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-faint);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.trip-tab-group:hover { color: var(--text); }
.trip-tab-group.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Tab bar ── */
.trip-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0 16px;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}
.trip-tabs::-webkit-scrollbar { display: none; }

.trip-tab {
  flex-shrink: 0;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.04em;
  color: var(--text-mid);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.trip-tab:hover {
  border-color: var(--text-faint);
  color: var(--text);
}
.trip-tab.active {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

.trip-content { position: relative; }

/* ── Section labels ── */
.itin-section-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
  font-weight: 600;
}
.itin-section { margin-bottom: 24px; }

/* ── Itinerary meta ── */
.itin-meta {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.itin-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.82rem;
}
.itin-meta-label {
  color: var(--text-faint);
  flex-shrink: 0;
  width: 80px;
}
.itin-meta-val {
  color: var(--text);
  text-align: right;
  display: flex;
  align-items: center;
  gap: 0.3em;
  justify-content: flex-end;
}
.itin-notes {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.6;
  font-style: italic;
}

/* ── Weather cards ── */
.wx-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.wx-row::-webkit-scrollbar { display: none; }

.wx-card {
  flex: 1;
  min-width: 140px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.wx-day {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.wx-temp {
  font-size: 1.6rem;
  font-weight: 600;
  margin: 4px 0;
}
.wx-hi { color: var(--error); }
.wx-lo { color: var(--info); }
.wx-sep { font-size: 0.85rem; color: var(--text-faint); margin: 0 2px; }
.wx-cond {
  font-size: 0.78rem;
  color: var(--text-mid);
  line-height: 1.5;
}
.wx-sun {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ── Day cards ── */
.day-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.day-card-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.day-card-date {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.day-card-summary {
  font-size: 0.82rem;
  color: var(--text-mid);
  margin-bottom: 10px;
  line-height: 1.5;
}
.day-wx-inline {
  font-size: 0.82rem;
  margin-bottom: 10px;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 6px;
  display: inline-flex;
  gap: 4px;
  align-items: baseline;
}
.wx-cond-inline {
  color: var(--text-faint);
  font-size: 0.75rem;
  margin-left: 4px;
}

/* ── Timeline ── */
.day-timeline {
  border-left: 2px solid color-mix(in srgb, var(--gold) 30%, transparent);
  margin-left: 8px;
  padding-left: 16px;
}
.tl-item {
  position: relative;
  padding: 6px 0;
}
.tl-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--bg);
}
.tl-time {
  font-size: 0.78rem;
  color: var(--text-mid);
  font-weight: 600;
  min-width: 60px;
  display: inline-block;
}
.tl-body { display: inline; }
.tl-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.tl-purpose {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 2px;
  line-height: 1.5;
}

/* ── Drives ── */
.day-drives {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.drive-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.8rem;
}
.drive-route { color: var(--text); }
.drive-info {
  color: var(--text-faint);
  font-size: 0.75rem;
}

/* ── Map tab ── */
.map-tab { display: flex; flex-direction: column; gap: 12px; }
.map-container {
  width: 100%;
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}
.map-container .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
}
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 4px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-mid);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Leaflet popup customization */
.map-popup .leaflet-popup-content-wrapper {
  background: #fff;
  color: #1a1a1a;
  border-radius: 8px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.82rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
  border: 1px solid rgba(0,0,0,0.08);
}
.map-popup .leaflet-popup-tip { background: #fff; }
.map-popup .leaflet-popup-content-wrapper strong { color: #111; }

.standalone-dist-badge {
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(59,130,246,0.12);
  color: #2563eb;
  padding: 2px 7px;
  border-radius: 99px;
}

/* ── Food tab ── */
.food-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.food-count {
  font-size: 0.75rem;
  color: var(--text-faint);
}
.food-meal-section {
  margin-bottom: 24px;
}
.food-meal-header {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.food-meal-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.food-meal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.food-meal-budget {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}
.food-meal-sub {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 1px;
}
.food-meal-pref,
.food-meal-notes {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 2px;
  font-style: italic;
}
.food-candidate.selected {
  position: relative;
}
.food-selected-badge {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.food-cards { display: flex; flex-direction: column; gap: 8px; }

/* ── Place card ── */
.place-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s;
  overflow: hidden;
}
.place-card:hover { border-color: var(--text-faint); }
.place-card:active { opacity: 0.8; }
.place-card-closed {
  opacity: 0.45;
}
.place-card-passed {
  opacity: 0.35;
}
.place-card-passed .place-card-name {
  text-decoration: line-through;
  color: var(--text-faint);
}
.place-card-next {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}
.place-next-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--bg);
  background: var(--gold);
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.place-card-closed .place-card-name {
  color: var(--text-faint);
}
.place-badge-closed {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--error);
  background: color-mix(in srgb, var(--error) 10%, transparent);
  padding: 2px 6px;
  border-radius: 4px;
}

.place-card-photo {
  margin: -14px -16px 12px -16px;
  height: 180px;
  overflow: hidden;
}
.place-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.place-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.place-card-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text);
}
.place-fuel-price {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gold);
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.place-card-desc {
  font-size: 0.78rem;
  color: var(--text-mid);
  margin-top: 4px;
  line-height: 1.5;
}

.place-card-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.place-detail-row {
  display: flex;
  gap: 10px;
  padding: 4px 0;
  font-size: 0.8rem;
}
.place-detail-label {
  color: var(--text-faint);
  flex-shrink: 0;
  width: 60px;
  font-weight: 500;
}
.place-detail-val {
  color: var(--text);
  line-height: 1.5;
}
.place-action-btn {
  display: block;
  margin-top: 10px;
  padding: 10px 16px;
  background: var(--gold);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.place-phone-link,
.place-web-link {
  color: var(--gold);
  text-decoration: none;
}
.place-phone-link:hover,
.place-web-link:hover { text-decoration: underline; }

.place-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.place-tag {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-faint);
  font-weight: 500;
}

/* ── Menu recommendations ── */
.place-recs {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.place-recs-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 6px;
}
.place-rec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.place-rec-row:last-child { border-bottom: none; }
.place-rec-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.place-rec-name {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}
.place-rec-note {
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.4;
  margin-top: 1px;
}
.place-rec-price {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.place-address-copy {
  cursor: pointer;
}
.place-address-copy:active {
  opacity: 0.6;
}
.place-copy-hint {
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-left: 4px;
}

/* ── Category badge ── */
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── On Road tab ── */
.onroad-tab { display: flex; flex-direction: column; gap: 0; }
.onroad-section { margin-bottom: 24px; }
.onroad-cards { display: flex; flex-direction: column; gap: 8px; }

.cell-coverage-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.cell-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.cell-row:last-child { border-bottom: none; }
.cell-segment { color: var(--text); }
.cell-status {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 4px;
}
.cell-full { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.cell-spotty { background: color-mix(in srgb, var(--warning) 15%, transparent); color: var(--warning); }
.cell-none { background: color-mix(in srgb, var(--error) 15%, transparent); color: var(--error); }

.drive-section { margin-bottom: 12px; }
.drive-day-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.drive-segment-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 6px;
}
.drive-segment-route {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.drive-segment-info {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.drive-stat {
  font-size: 0.75rem;
  color: var(--text-faint);
}
.drive-costs {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.drive-cost-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-faint);
  padding: 2px 0;
}

/* ── Pack tab ── */
.pack-tab { max-width: 480px; }
.pack-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pack-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0;
}
.pack-counter {
  font-size: 0.82rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.pack-sub {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.pack-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin-bottom: 16px;
  overflow: hidden;
}
.pack-progress-bar {
  height: 100%;
  border-radius: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.pack-items { display: flex; flex-direction: column; }
.pack-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s;
}
.pack-item:last-child { border-bottom: none; }
.pack-item:active { opacity: 0.7; }
.pack-check {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.pack-item.checked .pack-check {
  background: var(--gold);
  border-color: var(--gold);
}
.pack-check-mark {
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.pack-label {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
  transition: color 0.2s;
}
.pack-item.checked .pack-label {
  color: var(--text-faint);
  text-decoration: line-through;
}

/* ── Safety tab ── */
.safety-tab { display: flex; flex-direction: column; gap: 0; }
.safety-section { margin-bottom: 24px; }
.safety-cards { display: flex; flex-direction: column; gap: 8px; }

.crash-steps {
  counter-reset: crash;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 16px;
}
.crash-step {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.crash-step:last-child { border-bottom: none; }
.crash-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--error) 15%, transparent);
  color: var(--error);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.crash-step-text {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.6;
}

.contact-cards { display: flex; flex-direction: column; gap: 8px; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.contact-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2px;
}
.contact-notes {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.contact-phone {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.contact-phone:hover { text-decoration: underline; }

.safety-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 16px;
}
.safety-checklist li {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.5;
}
.safety-checklist li:last-child { border-bottom: none; }
.safety-checklist li::before {
  content: '\2610';
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: -1px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 40px 0;
  font-size: 0.88rem;
}

/* ── Now banner ── */
.now-banner {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.now-active {
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
  background: color-mix(in srgb, var(--gold) 4%, var(--card));
}
.now-ended { opacity: 0.6; }
.now-label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 2px;
}
.now-current .now-label { color: var(--gold); }
.now-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  color: var(--text);
}
.now-purpose {
  font-size: 0.78rem;
  color: var(--text-mid);
  margin-top: 2px;
}
.now-time {
  font-size: 0.78rem;
  color: var(--text-mid);
  margin-top: 2px;
}
.now-current, .now-next {
  flex: 1;
  min-width: 120px;
}
.now-cell {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.now-cell.cell-full { background: var(--success); }
.now-cell.cell-spotty { background: var(--warning); }
.now-cell.cell-none { background: var(--error); }

/* ── Time-aware itinerary ── */
.day-today {
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
  position: relative;
}
.day-past {
  opacity: 0.5;
}
.day-today-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.tl-current {
  position: relative;
}
.tl-current::before {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent);
}
.tl-current .tl-name {
  color: var(--gold);
  font-weight: 600;
}

.tl-next::before {
  border-color: var(--gold) !important;
  border-width: 2px !important;
  background: color-mix(in srgb, var(--gold) 20%, var(--bg)) !important;
}

.tl-done {
  opacity: 0.45;
}
.tl-done::before {
  background: var(--text-faint) !important;
  border-color: var(--text-faint) !important;
}

.tl-now-badge, .tl-next-badge {
  position: absolute;
  right: 0;
  top: 8px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 3px;
}
.tl-now-badge {
  background: var(--gold);
  color: var(--bg);
}
.tl-next-badge {
  background: color-mix(in srgb, var(--gold) 15%, transparent);
  color: var(--gold);
}

/* ── Map controls ── */
.map-controls {
  display: flex;
  gap: 6px;
  padding: 6px 0;
}
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-mid);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.map-btn:hover {
  border-color: var(--text-faint);
  color: var(--text);
}
.map-btn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--info);
}

/* ── User location pulse ── */
.user-location-marker {
  animation: loc-pulse 2s ease-in-out infinite;
}
@keyframes loc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Place distance badge ── */
.place-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.place-dist {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Offline download ── */
.offline-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.offline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.offline-ready {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
  letter-spacing: 0.04em;
  flex: 1;
}
.offline-btn {
  font-size: 0.72rem;
  font-weight: 500;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.offline-download {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
  width: 100%;
  text-align: center;
  padding: 10px;
  font-weight: 600;
  font-size: 0.82rem;
}
.offline-download:hover { opacity: 0.9; }
.offline-refresh {
  background: var(--card);
  color: var(--text-mid);
}
.offline-refresh:hover { border-color: var(--text-faint); }
.offline-clear {
  background: var(--card);
  color: var(--text-faint);
}
.offline-clear:hover { border-color: var(--error); color: var(--error); }
.offline-progress { width: 100%; }
.offline-progress-label {
  font-size: 0.75rem;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.offline-progress-track {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.offline-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.offline-result {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 6px;
}

/* ── Weather tab ── */
.weather-tab { display: flex; flex-direction: column; gap: 0; }

.wx-day-section {
  margin-bottom: 28px;
}
.wx-day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.wx-day-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.wx-day-date {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* Card wrapping overview + timeline */
.wx-day-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

/* Overview row: high/low + conditions side by side */
.wx-day-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.wx-day-temps {
  font-size: 1.4rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.wx-day-info { flex: 1; min-width: 0; }
.wx-day-cond {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.4;
}
.wx-day-sun {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Timeline inside the card */
.wx-timeline {
  padding: 4px 0;
}

.wx-stop {
  display: flex;
  gap: 0;
  padding: 8px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.wx-stop:last-child { border-bottom: none; }

.wx-stop-left {
  width: 80px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 14px;
  border-right: 2px solid color-mix(in srgb, var(--gold) 30%, transparent);
  position: relative;
}
.wx-stop-left::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--card);
}
.wx-stop-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-mid);
  line-height: 1;
}
.wx-stop-temp {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2px;
}
.wx-stop-feels {
  font-size: 0.62rem;
  line-height: 1;
  margin-top: 1px;
  opacity: 0.7;
}

.wx-stop-right {
  flex: 1;
  padding-left: 14px;
  min-width: 0;
}
.wx-stop-location {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.wx-stop-cond {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 1px;
}
.wx-stop-note {
  font-size: 0.72rem;
  color: var(--gold);
  margin-top: 2px;
  font-style: italic;
}

/* ── Actual tab ── */
.actual-tab { display: flex; flex-direction: column; gap: 0; }
.actual-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.actual-count {
  font-size: 0.75rem;
  color: var(--text-faint);
}
.actual-day-section { margin-bottom: 28px; }
.actual-day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.actual-day-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.actual-day-date {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}
/* ── Day overview strips (temp, UV, cellular) ── */
.day-strips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.strip-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.strip-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  width: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.strip-bar {
  flex: 1;
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  min-height: 28px;
}
.strip-uv-chips {
  display: flex;
  gap: 6px;
}
.strip-uv-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 6px;
  min-height: 28px;
}
.strip-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
  min-width: 0;
}
.strip-segment-text {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.strip-segment-time {
  font-size: 0.55rem;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  white-space: nowrap;
}
.strip-bar-cell {
  overflow: visible;
  gap: 4px;
  flex-wrap: wrap;
}
.strip-cell-segment {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid;
  font-size: 0.68rem;
  font-weight: 600;
}
.strip-cell-range {
  font-size: 0.6rem;
  color: var(--text-faint);
  font-weight: 500;
}
.strip-cell-places {
  font-size: 0.6rem;
  color: var(--text-faint);
  font-weight: 400;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actual-timeline {
  margin-left: 4px;
}
.actual-entry {
  padding: 10px 0 10px 14px;
  border-left: 3px solid var(--border);
}
.actual-cell-badge {
  font-size: 0.72rem;
  flex-shrink: 0;
}
.actual-entry-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.actual-entry-time {
  font-size: 0.78rem;
  color: var(--text-mid);
  font-weight: 600;
}
.actual-entry-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  min-width: 0;
}
.actual-kind-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.actual-entry-detail {
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.actual-entry-body {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 8px;
}
.actual-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.actual-item-chip {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}
.actual-structured-item {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 6px;
}
.actual-item-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.82rem;
}
.actual-item-header strong { color: var(--text); }
.actual-item-duration {
  font-size: 0.7rem;
  color: var(--text-mid);
}
.actual-item-free {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.actual-item-where {
  font-size: 0.7rem;
  color: var(--text-mid);
  margin-top: 3px;
}
.actual-item-note {
  font-size: 0.72rem;
  color: var(--text);
  margin-top: 5px;
  line-height: 1.45;
}
.actual-place-name {
  font-size: 0.75rem;
  color: var(--text-mid);
  margin-bottom: 8px;
  font-weight: 500;
}
.actual-rating {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}
.actual-mood {
  font-size: 0.78rem;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 8px;
}
.actual-entry-temp {
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.actual-entry-detail > :last-child {
  margin-bottom: 0;
}
.entry-weather-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.entry-weather-detail {
  font-size: 0.68rem;
  color: var(--text-faint);
  background: var(--bg-alt, rgba(0,0,0,0.04));
  padding: 2px 7px;
  border-radius: 8px;
  white-space: nowrap;
}
.entry-weather-uv[data-level="high"] {
  color: #D97706;
  background: rgba(217,119,6,0.12);
  font-weight: 600;
}
.entry-weather-note {
  font-size: 0.68rem;
  color: var(--gold, #b49a6a);
  font-style: italic;
  background: var(--bg-alt, rgba(0,0,0,0.04));
  padding: 2px 7px;
  border-radius: 8px;
}
.actual-quick-note {
  margin-top: 20px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.actual-quick-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
  margin-bottom: 8px;
}
.actual-quick-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  min-height: 48px;
  box-sizing: border-box;
}
.actual-quick-input:focus {
  outline: none;
  border-color: var(--gold);
}
.actual-quick-submit {
  margin-top: 8px;
  padding: 8px 18px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}
.actual-quick-submit:hover { opacity: 0.9; }
.actual-quick-submit:disabled { opacity: 0.4; cursor: default; }

/* ── Wrap Up Tab ── */
.wrapup-tab { padding: 4px 0 20px; }
.wrapup-section { margin-bottom: 20px; }
.wrapup-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.wrapup-progress-bar {
  height: 6px;
  background: var(--border, rgba(0,0,0,0.08));
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.wrapup-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.3s;
}
.wrapup-progress-label {
  font-size: 0.75rem;
  color: var(--text-mid);
}
.wrapup-todo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  transition: opacity 0.15s;
}
.wrapup-todo.done { opacity: 0.5; }
.wrapup-todo.done span { text-decoration: line-through; }
.wrapup-todo input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.wrapup-empty {
  font-size: 0.82rem;
  color: var(--text-faint);
  padding: 8px 0;
}
.wrapup-expenses { display: flex; flex-direction: column; gap: 4px; }
.wrapup-expense-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 8px;
  font-size: 0.85rem;
}
.wrapup-expense-item { flex: 1; color: var(--text); }
.wrapup-expense-cat {
  font-size: 0.72rem;
  color: var(--text-faint);
  background: var(--surface, rgba(0,0,0,0.04));
  padding: 2px 8px;
  border-radius: 4px;
}
.wrapup-expense-amount { font-weight: 600; color: var(--text); }
.wrapup-highlight, .wrapup-lesson {
  padding: 10px 12px;
  background: var(--card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 10px;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.45;
}
.wrapup-summary {
  padding: 12px;
  background: var(--card, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.55;
}

/* ── Section switcher ── */
.section-switcher {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px 16px 4px;
  max-width: 820px;
  margin: 0 auto;
}
.section-tab {
  flex-shrink: 0;
  padding: 7px 28px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mid);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.section-tab:hover {
  border-color: var(--text-faint);
  color: var(--text);
}
.section-tab.active {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

/* ── Map index card extras ── */
.map-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

/* ── Standalone map view ── */
.standalone-map-view {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
}

.standalone-map-container {
  width: 100%;
  height: 560px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
}
.standalone-map-container .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
}

/* ── Standalone search bar ── */
.standalone-search-bar {
  margin: 12px 0 8px;
}
.standalone-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  outline: none;
  transition: border-color 0.15s;
}
.standalone-search-input:focus {
  border-color: var(--gold);
}
.standalone-search-input::placeholder {
  color: var(--text-faint);
}

/* ── Standalone place list ── */
.standalone-place-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.standalone-place-card {
  transition: border-color 0.15s, box-shadow 0.15s;
}
.standalone-place-highlighted {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 1px var(--gold);
}

.standalone-place-city {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 2px;
  margin-bottom: 4px;
}

/* ── EBT badge ── */
.standalone-ebt-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bg);
  background: var(--gold);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .trip-view { padding: 0 12px 40px; }
  .trip-index { padding: 0 12px 40px; }
  .trip-title { font-size: 1.3rem; }
  .trip-tab-groups { margin: 0 -12px -1px; padding: 10px 12px 0; }
  .trip-tab-group { padding: 5px 12px 7px; font-size: 0.7rem; }
  .wx-row { flex-direction: column; }
  .map-container { height: 320px; }
  .standalone-map-container { height: 40vh; min-height: 220px; }
  .day-card-header { flex-direction: column; gap: 4px; }
  .itin-meta-row { flex-direction: column; gap: 0; }
  .itin-meta-label { width: auto; }
  .itin-meta-val { text-align: left; justify-content: flex-start; }
  .now-banner { flex-direction: column; gap: 10px; }
  .now-current, .now-next { min-width: 0; }
}
