.tl-photo-strip {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  height: 110px;
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
}
.tl-photo-strip img {
  flex: 1;
  min-width: 0;
  max-width: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
}
.tl-photo-strip img:hover {
  transform: scale(1.03);
}
.tl-photo-strip.single {
  height: 160px;
}
.tl-photo-strip.single img {
  max-width: 100%;
  border-radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --accent: #3d6b5e;
  --accent2: #5a8f7f;
  --accent3: #7fb3a4;
  --warm: #c07a4f;
  --warm-lt: #d9966e;
  --slate: #1c2431;
  --slate2: #242f40;
  --slate3: #2e3b50;
  --panel: #1a2235;
  --panel2: #1f2a3c;
  --cream: #f4f1eb;
  --soft: #d4cfc6;
  --muted: #7a8899;
  --border: rgba(61, 107, 94, 0.22);
  --border2: rgba(255, 255, 255, 0.08);
  --glass: rgba(26, 34, 53, 0.94);
  --shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
  --r: 12px;
  --r-sm: 8px;
  --r-lg: 18px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --bg: #0d1117;
  --card: rgba(255, 255, 255, 0.04);
  --gold: #f0c040;
  --gold2: #e8b84b;
  --faint: rgba(244, 241, 235, 0.25);
  --tab-bar-h: 60px;
}
html,
body {
  height: 100%;
  width: 100%;
  font-family: "Inter", sans-serif;
  background: #1a2235;
  overflow: hidden;
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
/* Safe area — dark color matches header buttons and tab bar */
html {
  background: #1a2235;
  height: 100%;
}
html:has(body.light-mode) {
  background: #f2ede4;
}

/* ── SPLASH SCREEN ── */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #050a0e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 40px 30px;
  text-align: center;
  overflow: hidden;
}
#splash.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

/* Photo mosaic */
#splash-mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#splash-mosaic.loaded {
  opacity: 1;
}
#splash-mosaic .mosaic-cell {
  overflow: hidden;
  position: relative;
}
#splash-mosaic .mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.55) saturate(0.8);
  transform: scale(1.05);
  transition: transform 8s ease;
}
#splash-mosaic .mosaic-cell img.pan {
  transform: scale(1.12) translateY(-3%);
}
/* Feature cell — spans 2 cols */
#splash-mosaic .mosaic-cell.feature {
  grid-column: span 2;
  grid-row: span 2;
}
#splash-mosaic .mosaic-cell.feature img {
  filter: brightness(0.45) saturate(0.75);
}

#splash-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.65) 100%
  );
}

/* Content sits above mosaic */
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.splash-eyebrow {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent3);
  opacity: 0.85;
  margin-bottom: 14px;
}
.splash-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 8px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}
.splash-title em {
  color: var(--accent3);
  font-style: italic;
}

/* Quote */
.splash-quote {
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  max-width: 280px;
  line-height: 1.5;
  margin: 10px 0 0;
  min-height: 36px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.splash-stats {
  display: flex;
  gap: 32px;
  margin: 28px 0 36px;
  justify-content: center;
  flex-wrap: wrap;
}
.splash-stat {
  text-align: center;
}
.splash-stat-num {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--accent3);
  line-height: 1;
}
.splash-stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.splash-trips-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  max-width: 360px;
}
.splash-trip-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.72rem;
  color: var(--soft);
}
.splash-trip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.splash-enter {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px 40px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 24px rgba(61, 107, 94, 0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.splash-enter:hover {
  background: var(--accent2);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(61, 107, 94, 0.6);
}
.splash-enter:active {
  transform: scale(0.97);
}
.splash-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 14px;
}

/* ── MAP ── */
#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: manipulation;
}
#map.placing {
  cursor: crosshair;
}

/* ── GLOBAL SEARCH ── */
#globalSearch {
  position: fixed;
  top: calc(60px + var(--sat));
  left: 50%;
  transform: translateX(-50%);
  z-index: 600;
  width: min(480px, 90vw);
  display: none;
}
#globalSearch.show {
  display: block;
}
.gs-input-wrap {
  background: rgba(26, 34, 53, 0.96);
  border: 1px solid rgba(61, 107, 94, 0.4);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
}
.gs-input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  padding: 14px 18px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--cream);
}
.gs-input::placeholder {
  color: var(--muted);
}
.gs-results {
  max-height: 340px;
  overflow-y: auto;
  border-top: 1px solid var(--border2);
}
.gs-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.12s;
}
.gs-result:hover {
  background: rgba(255, 255, 255, 0.06);
}
.gs-result-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.gs-result-info {
  flex: 1;
  min-width: 0;
}
.gs-result-name {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-result-sub {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1px;
}
.gs-result-type {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent3);
  flex-shrink: 0;
}
.gs-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ── DESKTOP PANEL ── */
#desktopPanel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 310px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
  transition: width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
#desktopPanel.collapsed {
  width: 0;
  border-right: none;
  overflow: hidden;
}
#desktopPanel.collapsed * {
  opacity: 0;
  pointer-events: none;
}
.brand {
  padding: 20px 20px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.brand h1 {
  font-family: "Playfair Display", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.1;
}
.brand h1 em {
  color: var(--accent3);
  font-style: italic;
  font-weight: 400;
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 4px;
}
.sync-status {
  font-size: 0.68rem;
  margin-top: 4px;
  letter-spacing: 0.04em;
  transition: color 0.3s;
  min-height: 1em;
}
.ptab-wrap {
  padding: 10px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.ptabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.ptab {
  flex: 1;
  padding: 6px 3px;
  text-align: center;
  border: none;
  background: none;
  border-radius: 8px;
  font-family: "Inter", sans-serif;
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ptab.active {
  background: var(--panel2);
  color: var(--cream);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.ptab:hover:not(.active) {
  color: var(--soft);
}
.panel-view {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}
.panel-view.active {
  display: flex;
}

/* Sidebar toggle */
#sidebarToggle {
  position: fixed;
  top: 50%;
  left: 310px;
  transform: translateY(-50%);
  z-index: 300;
  width: 20px;
  height: 52px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition:
    left 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.15s,
    color 0.15s;
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.3);
}
#sidebarToggle:hover {
  background: var(--panel2);
  color: var(--cream);
}
#sidebarToggle.collapsed {
  left: 0;
}
#mapHeader {
  transition: left 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── TRIPS LIST ── */
.trips-toolbar {
  padding: 10px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.btn-new-trip {
  width: 100%;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 10px;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 44px;
}
.btn-new-trip:hover {
  background: #60a5fa;
}
.show-all-row {
  display: none;
} /* moved to title row */
.btn-show-all {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 11px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  min-height: 0;
}
.btn-show-all:hover,
.btn-show-all.on {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(61, 107, 94, 0.1);
}
.trips-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 107, 94, 0.2) transparent;
}

/* Trip card with cover photo */
.trip-card {
  border-radius: var(--r);
  margin-bottom: 8px;
  transition: box-shadow 0.18s;
  position: relative;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  min-height: 72px;
}
.trip-card.active-trip {
  box-shadow:
    0 0 0 2px var(--accent),
    0 6px 20px rgba(0, 0, 0, 0.4);
}
.trip-card-bg {
  position: absolute;
  inset: -20% 0;
  background: var(--panel2);
  background-size: cover;
  background-position: center 30%;
  transition: background-position 0.3s ease;
  will-change: background-position;
}
.trip-card:hover .trip-card-bg {
  background-position: center 45%;
}
.trip-card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(15, 20, 35, 0.8) 0%,
    rgba(15, 20, 35, 0.45) 100%
  );
}
.trip-card-body {
  position: relative;
  z-index: 1;
  padding: 12px 13px;
}
.trip-card-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
  padding-right: 76px;
  line-height: 1.3;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.trip-card-meta {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.trip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  flex-shrink: 0;
  vertical-align: middle;
}
.trip-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.trip-card:hover .trip-card-actions,
.trip-card:focus-within .trip-card-actions {
  opacity: 1;
}
@media (hover: none) {
  .trip-card-actions {
    opacity: 1;
  }
}
.tca {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  min-width: 30px;
  min-height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
  backdrop-filter: blur(4px);
}
.tca:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
}

.export-bar {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.export-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 4px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 40px;
}
.export-btn:hover {
  border-color: var(--accent);
  color: var(--accent3);
  background: rgba(61, 107, 94, 0.08);
}

/* ── PLACES ── */
.search-bar {
  padding: 8px 10px 8px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}
.search-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--cream);
  font-family: "Inter", sans-serif;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
  min-height: 44px;
}
.search-input::placeholder {
  color: var(--muted);
}
.search-input:focus {
  border-color: var(--accent);
}
.filter-sel {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 9px 10px 9px 8px;
  color: var(--cream);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  min-height: 44px;
  width: 90px;
  flex-shrink: 0;
}
.filter-sel option {
  background: #1a2235;
}
.places-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 107, 94, 0.2) transparent;
  -webkit-overflow-scrolling: touch;
}
.place-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.12s;
  min-height: 50px;
}
.place-row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.place-row:active {
  background: rgba(255, 255, 255, 0.08);
}
.place-row-emoji {
  font-size: 1.05rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.place-row-info {
  flex: 1;
  min-width: 0;
}
.place-row-name {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.place-row-meta {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 1px;
}
.place-row-stars {
  font-size: 0.7rem;
  color: var(--accent3);
  flex-shrink: 0;
  letter-spacing: -1px;
}

/* ── STATS ── */
.stats-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 107, 94, 0.2) transparent;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 12px;
  text-align: center;
}
.stat-num {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent3);
  line-height: 1;
}
.stat-label {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-top: 4px;
}
.stat-section {
  margin-bottom: 14px;
}
.stat-section h3 {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
  opacity: 0.8;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.stat-row:last-child {
  border: none;
}
.stat-row-label {
  font-size: 0.78rem;
  color: var(--cream);
  display: flex;
  align-items: center;
  gap: 7px;
}
.stat-row-val {
  font-size: 0.78rem;
  color: var(--accent3);
  font-weight: 600;
}
.bar-row {
  margin-bottom: 8px;
}
.bar-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 3px;
  color: var(--soft);
}
.bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent3));
  border-radius: 3px;
  width: 0;
  transition: width 0.7s cubic-bezier(0.34, 1, 0.64, 1);
}

/* ── TIMELINE ── */
.timeline-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 107, 94, 0.2) transparent;
}
.timeline-trip {
  margin-bottom: 0;
  overflow: hidden;
}
.tl-trip-divider {
  height: 10px;
  background: var(--bg);
}

/* Trip header — hero banner matching trip card style */
.tl-trip-header {
  position: relative;
  height: 120px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 0;
}
.tl-trip-header-img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  display: block;
  filter: brightness(0.5);
  transition: filter 0.3s;
}
.tl-trip-header:hover .tl-trip-header-img {
  filter: brightness(0.65);
}
.tl-trip-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.15) 100%
  );
}
.tl-trip-header-no-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.25),
    rgba(26, 34, 53, 0.8)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0.4;
}
.tl-trip-header-body {
  position: absolute;
  bottom: 10px;
  left: 14px;
  right: 14px;
}
.tl-trip-color-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.tl-trip-name {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.tl-trip-meta {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* Trip description quote */
.tl-journal-quote {
  margin: 0;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(244, 241, 235, 0.45);
  line-height: 1.6;
  font-style: italic;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
}
.tl-journal-quote:hover {
  color: rgba(244, 241, 235, 0.65);
}

/* Place entries */
.tl-entries {
  padding: 0 0 8px;
  overflow: hidden;
  max-width: 100%;
}
.tl-place {
  display: block;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.12s;
  touch-action: manipulation;
  overflow: hidden;
}
.tl-place:hover {
  background: rgba(255, 255, 255, 0.03);
}
.tl-place:last-child {
  border-bottom: none;
}
.tl-place-inner {
  padding: 12px 14px 10px;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

/* Photo strip — constrained height */
.tl-photo-strip {
  display: flex;
  gap: 3px;
  margin-bottom: 10px;
  border-radius: 8px;
  overflow: hidden;
  height: 100px;
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
}
.tl-photo-strip img {
  flex: 1;
  min-width: 0;
  max-width: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
}
.tl-photo-strip img:hover {
  transform: scale(1.03);
}
.tl-photo-strip.single {
  height: 150px;
}
.tl-photo-strip.single img {
  max-width: 100%;
  border-radius: 8px;
}

/* Place header */
.tl-place-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.tl-place-dot-wrap {
  width: 8px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 5px;
}
.tl-place-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tl-place-info {
  flex: 1;
  min-width: 0;
}
.tl-place-name {
  font-family: "Playfair Display", serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 2px;
}
.tl-place-meta {
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tl-place-weather {
  font-size: 0.82rem;
}
.tl-place-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}
.tl-place-date {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tl-place-stars {
  font-size: 0.7rem;
  color: var(--gold2);
  letter-spacing: -1px;
}

/* Journal entry */
.tl-entry {
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(244, 241, 235, 0.68);
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  padding-left: 10px;
  margin: 6px 0 4px 16px;
}
.tl-entry-text b,
.tl-entry-text strong {
  font-weight: 600;
  color: var(--cream);
}
.tl-entry-text i,
.tl-entry-text em {
  font-style: italic;
}
.tl-read-more {
  font-size: 0.68rem;
  color: var(--accent3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0 0 16px;
  font-family: "Inter", sans-serif;
  display: block;
}
.tl-vibes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
  padding-left: 16px;
}

/* Old classes kept for compatibility */
.tl-trip-cover {
  display: none;
}
.tl-trip-info {
  display: none;
}
.tl-line {
  display: none;
}
.tl-place-body {
  display: none;
}

/* Mobile overrides */
@media (max-width: 767px) {
  .tl-photo-strip {
    height: 85px !important;
  }
  .tl-photo-strip.single {
    height: 130px !important;
  }
  .tl-photo-strip img {
    flex: 1 !important;
    min-width: 0 !important;
  }
  .timeline-scroll {
    overflow-x: hidden !important;
  }
  .tl-place-inner {
    overflow: hidden !important;
    max-width: 100% !important;
  }
}

/* ── FLOATING MAP HEADER ── */
#mapHeader {
  position: fixed;
  top: calc(0px + var(--sat));
  right: 0;
  left: 310px;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  pointer-events: none;
}
#mapHeader > * {
  pointer-events: all;
}
.layer-toggle {
  display: flex;
  background: rgba(26, 34, 53, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.layer-btn {
  background: none;
  border: none;
  border-radius: 16px;
  padding: 6px 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  cursor: pointer;
  color: rgba(244, 241, 235, 0.4);
  transition: all 0.2s;
  white-space: nowrap;
}
.layer-btn.active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--cream);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.layer-btn:hover:not(.active) {
  color: var(--soft);
}
.btn-search {
  background: rgba(26, 34, 53, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--soft);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-search:hover {
  border-color: var(--accent);
  color: var(--accent3);
}
.btn-search.active {
  border-color: var(--accent);
  background: rgba(61, 107, 94, 0.2);
  color: var(--accent3);
}
.btn-add {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 22px;
  padding: 9px 18px;
  font-family: "Inter", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 3px 16px rgba(61, 107, 94, 0.55);
  white-space: nowrap;
}
.btn-add:hover {
  background: var(--accent2);
  transform: translateY(-1px) scale(1.02);
}
.btn-add:active {
  transform: scale(0.97);
}
.btn-add.active {
  background: rgba(26, 34, 53, 0.92);
  border: 1px solid var(--accent3);
  color: var(--accent3);
}
.trip-chip {
  display: none;
  align-items: center;
  gap: 7px;
  background: rgba(61, 107, 94, 0.75);
  border: 1px solid var(--accent2);
  border-radius: 20px;
  padding: 6px 13px;
  font-size: 0.7rem;
  font-weight: 500;
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.trip-chip.show {
  display: flex;
}
.chip-x {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: -12px -13px -12px 0;
  border-radius: 0 20px 20px 0;
}
.chip-x:hover {
  color: #fff;
}

/* ── MARKERS ── */
.wfm {
  position: relative;
  width: 36px;
  height: 44px;
  cursor: pointer;
}
.wfm-body {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.wfm:hover .wfm-body {
  transform: rotate(-45deg) scale(1.2);
}
.wfm-emoji {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 14px;
  pointer-events: none;
  line-height: 1;
}
.wfm-gold {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: 8px;
  border-radius: 50%;
  border: 2px solid #f0c040;
  pointer-events: none;
  border-bottom: none;
  transform: rotate(-45deg);
  opacity: 0.9;
  animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
  0%,
  100% {
    opacity: 0.9;
  }
  50% {
    opacity: 0.3;
  }
}

/* ── POPUP ── */
.leaflet-popup-content-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.leaflet-popup-content {
  margin: 0;
}
.leaflet-popup-tip-container {
  display: none;
}
.leaflet-popup-close-button {
  display: none !important;
}
.pop {
  width: 360px;
  font-family: "Inter", sans-serif;
  color: var(--cream);
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  max-height: min(520px, 75vh);
}
.pop-img-wrap {
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  height: 160px;
  max-height: 160px;
  min-height: 160px;
}
.pop-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pop-no {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.2),
    rgba(26, 34, 53, 0.6)
  );
}
.pop-bar {
  height: 4px;
  flex-shrink: 0;
}
.pop-body {
  padding: 13px 14px 14px;
  overflow-y: auto;
  flex: 1;
}
.pop-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.pop-region {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
  margin-bottom: 4px;
}
.pop-name {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}
.pop-stars-badge {
  font-size: 0.78rem;
  color: var(--gold2);
  letter-spacing: -1px;
  flex-shrink: 0;
  margin-top: 2px;
}
.pop-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pop-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 6px;
}
.pop-tag {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(61, 107, 94, 0.18);
  border: 1px solid rgba(61, 107, 94, 0.35);
  color: var(--accent3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pop-tag-trip {
  background: rgba(192, 122, 79, 0.12);
  border-color: rgba(192, 122, 79, 0.35);
  color: var(--warm-lt);
}
.pop-weather {
  font-size: 0.9rem;
}
.pop-date {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.pop-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}
.pop-notes {
  font-size: 0.76rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(244, 241, 235, 0.7);
  margin-bottom: 10px;
  font-style: italic;
}
.pop-journal {
  font-size: 0.76rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(244, 241, 235, 0.7);
  margin-bottom: 8px;
}
.pop-read-more {
  font-size: 0.68rem;
  color: var(--accent3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 8px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  display: block;
}
.pop-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.pop-photo-strip img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
.pop-vibes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.pop-stars {
  font-size: 0.85rem;
  color: var(--accent3);
  margin-bottom: 5px;
}
.pop-actions {
  display: flex;
  gap: 6px;
  padding-top: 4px;
}
.pop-btn {
  flex: 1;
  padding: 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}
.pop-edit {
  background: var(--accent);
  color: #fff;
}
.pop-edit:hover {
  opacity: 0.88;
}
.pop-del {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 241, 235, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pop-del:hover {
  background: rgba(180, 40, 40, 0.25);
  color: #ff6b6b;
  border-color: rgba(180, 40, 40, 0.4);
}

/* ── MOBILE ── */
#bottomTabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: #1a2235;
  border-top: 1px solid var(--border2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-bottom: var(--sab);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4);
}
.tab-bar {
  display: flex;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 9px 4px 7px;
  border: none;
  background: none;
  cursor: pointer;
  min-height: 52px;
  color: var(--muted);
  font-family: "Inter", sans-serif;
  transition: color 0.15s;
  gap: 2px;
  -webkit-tap-highlight-color: transparent;
}
.tab-item.active {
  color: var(--accent3);
}
.tab-item:active {
  opacity: 0.7;
}
.tab-icon {
  width: 22px;
  height: 22px;
  display: block;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.tab-item.active .tab-icon {
  transform: scale(1.12);
}
.tab-item.active svg {
  stroke-width: 2;
}
.tab-label {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
#mobileFab {
  display: none;
  position: fixed;
  bottom: calc(68px + var(--sab));
  right: 18px;
  z-index: 400;
  width: 54px;
  height: 54px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(61, 107, 94, 0.6);
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
  -webkit-tap-highlight-color: transparent;
}
#mobileFab.active {
  background: var(--slate2);
  border: 2px solid var(--accent3);
  font-size: 1rem;
  color: var(--accent3);
}
#mobileFab:active {
  transform: scale(0.92);
}

/* ── BOTTOM SHEET ── */
#bottomSheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 400;
  background: var(--panel);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border2);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
  height: 90vh;
  touch-action: pan-y;
}
#bottomSheet.peek {
  transform: translateY(calc(100% - 120px));
}
#bottomSheet.half {
  transform: translateY(45%);
}
#bottomSheet.full {
  transform: translateY(0);
}
.sheet-handle-area {
  padding: 12px 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: grab;
  flex-shrink: 0;
  min-height: 48px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.sheet-handle-area:active {
  cursor: grabbing;
}
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.sheet-title-row:active {
  cursor: grabbing;
}
.sheet-title {
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
}
.sheet-subtitle {
  font-size: 0.68rem;
  color: var(--muted);
}
.sheet-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── PLACE SHEET (mobile) ── */
#placeSheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100; /* Above map controls (1002) and bottom tabs (500) */
  background: var(--panel);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border2);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.44s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding-bottom: var(--sab);
  max-height: 72vh;
  touch-action: none;
  overflow: hidden;
  display: none;
  will-change: transform;
}
#placeSheet.open {
  transform: translateY(0);
  display: flex;
  flex-direction: column;
}
/* Hide bottom-left map controls when mobile place sheet is open */
body.place-sheet-open .map-controls-bl {
  display: none;
}

.ps-drag {
  padding: 10px 0 4px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  cursor: grab;
}
.ps-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
}
.ps-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.ps-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.ps-img-wrap {
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.ps-noimg {
  width: 100%;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.3),
    rgba(192, 122, 79, 0.15)
  );
  flex-shrink: 0;
}
.ps-bar {
  height: 3px;
  flex-shrink: 0;
}
.ps-body {
  padding: 12px 14px 14px;
}
.ps-region {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
  margin-bottom: 3px;
}
.ps-name {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}
.ps-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}
.ps-tag {
  font-size: 0.63rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(61, 107, 94, 0.2);
  border: 1px solid rgba(61, 107, 94, 0.4);
  color: var(--accent3);
}
.ps-tag-trip {
  background: rgba(192, 122, 79, 0.15);
  border-color: rgba(192, 122, 79, 0.4);
  color: var(--warm-lt);
}
.ps-weather {
  font-size: 1rem;
  margin-bottom: 7px;
}
.ps-stars {
  font-size: 1.05rem;
  color: var(--accent3);
  margin-bottom: 7px;
}
.ps-date {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.ps-notes {
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(244, 241, 235, 0.75);
  margin-bottom: 16px;
}
.ps-actions {
  display: flex;
  gap: 10px;
}
.ps-btn {
  flex: 1;
  padding: 13px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  min-height: 48px;
}
.ps-edit {
  background: var(--accent);
  color: #fff;
}
.ps-del {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(244, 241, 235, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.ps-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--soft);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

/* ── SIDEBAR FORM ── */
#sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  z-index: 1000;
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.44s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}
#sidebar.open {
  transform: translateX(0);
}
.sb-head {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.sb-head h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
}
.sb-coord {
  font-size: 0.64rem;
  color: var(--accent3);
  opacity: 0.7;
  font-style: italic;
}
.sb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--soft);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.sb-close:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}
.sb-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 107, 94, 0.2) transparent;
}
.sb-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-bottom: calc(12px + var(--sab));
}
.fg {
  margin-bottom: 16px;
}
.fg label {
  display: block;
  font-size: 0.63rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent3);
  opacity: 0.8;
  margin-bottom: 5px;
}
.fg input,
.fg textarea,
.fg select {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--cream);
  outline: none;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
  min-height: 46px;
}
.fg input:focus,
.fg textarea:focus,
.fg select:focus {
  border-color: var(--accent);
  background: rgba(61, 107, 94, 0.08);
  box-shadow: 0 0 0 3px rgba(61, 107, 94, 0.18);
}
.fg input::placeholder,
.fg textarea::placeholder {
  color: rgba(244, 241, 235, 0.22);
}
.fg textarea {
  min-height: 80px;
  resize: vertical;
  font-size: 15px;
}
.fg select option {
  background: #1a2235;
}
.fg input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.5) sepia(1) hue-rotate(100deg);
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.star-row {
  display: flex;
  gap: 5px;
}
.sb-star {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.2;
  transition:
    opacity 0.12s,
    transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1);
  line-height: 1;
  padding: 3px;
  color: var(--accent3);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User Profile Badge in Header */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: all 0.2s;
  pointer-events: all;
}
.user-badge:hover {
  border-color: var(--accent3);
  background: rgba(61, 107, 94, 0.2);
}
.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Consolidated User Menu */
.user-menu-wrap {
  position: relative;
}
.user-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 160px;
  overflow: hidden;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.user-menu.open {
  display: block;
}
.user-menu button {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--cream);
  text-align: left;
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.1s;
}
.user-menu button:hover {
  background: rgba(255, 255, 255, 0.05);
}
.user-menu button:not(:last-child) {
  border-bottom: 1px solid var(--border2);
}

/* Profile Section Styles */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

/* Filter Toggle Button */
.btn-toggle-mine {
  margin-top: 6px;
  width: 100%;
  border-color: var(--border);
}

/* Collapsible Settings Sections */
.settings-section {
  margin-bottom: 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.settings-section summary {
  padding: 16px;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
}
.settings-section summary h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--cream);
}
.settings-panel {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Collapsible Settings Sections */
.settings-section {
  margin-bottom: 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.settings-section summary {
  padding: 16px;
  cursor: pointer;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
}
.settings-section summary h3 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--cream);
}
.settings-panel {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.desktop-only {
  display: block;
}
.mobile-only {
  display: none;
}

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: block !important;
  }
  #mapHeader .user-menu-wrap {
    pointer-events: all;
  }

  /* Compact Header for Mobile */
  #mapHeader {
    justify-content: space-between !important;
    gap: 4px !important;
    padding: 8px 10px !important;
  }
  #mapHeader .btn-lbl {
    display: none;
  }
  #mapHeader .header-edit-btns {
    display: none !important;
  }
  #mapHeader .layer-btn {
    padding: 6px 8px;
  }
  #geoSearchOverlay > div {
    width: 94vw !important;
    top: 10% !important;
  }
}

/* Advanced Marker Styles */
.custom-pin {
  position: relative;
  width: 36px;
  height: 44px;
  cursor: pointer;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.custom-pin:hover {
  transform: scale(1.15);
  z-index: 1000;
}
.pin-body {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid rgba(255, 255, 255, 0.8);
}
.pin-emoji {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-size: 16px;
  line-height: 1;
}
@keyframes googleBounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}
.pin-bounce {
  animation: googleBounce 0.8s ease;
}

.sb-star.lit {
  opacity: 1;
  transform: scale(1.15);
}
.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Bottom Left Map Controls */
.map-controls-bl {
  position: fixed;
  bottom: 30px;
  left: 330px; /* Sidebar width (310) + gap (20) */
  z-index: 1002; /* Sit above zoom controls and map panes */
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  transition: left 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

#desktopPanel.collapsed ~ .map-controls-bl {
  left: 20px;
}

.map-controls-bl > * {
  pointer-events: all;
}
.map-controls-bl .btn-add {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.btn-drop-manual {
  background: rgba(26, 34, 53, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--soft) !important;
}

@media (max-width: 767px) {
  .map-controls-bl {
    bottom: calc(75px + var(--sab)); /* Positioned above mobile tab bar */
    left: 12px !important;
    z-index: 1002;
  }
  .map-controls-bl .btn-lbl {
    display: none;
  }
}
.emoji-opt {
  font-size: 1.25rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.15s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.emoji-opt:active {
  transform: scale(0.9);
}
.emoji-opt.sel {
  background: rgba(61, 107, 94, 0.3);
  border-color: var(--accent);
  transform: scale(1.1);
}
/* Weather picker */
.weather-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.weather-opt {
  font-size: 1.4rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.15s cubic-bezier(0.34, 1.4, 0.64, 1);
  position: relative;
}
.weather-opt.sel {
  background: rgba(61, 107, 94, 0.3);
  border-color: var(--accent);
  transform: scale(1.12);
}
.weather-opt:active {
  transform: scale(0.9);
}
/* Photo upload */
.photo-drop {
  border: 1.5px dashed rgba(61, 107, 94, 0.4);
  border-radius: var(--r);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.18s;
  background: rgba(0, 0, 0, 0.12);
  min-height: 76px;
}
.photo-drop:hover,
.photo-drop.drag {
  border-color: var(--accent);
  background: rgba(61, 107, 94, 0.08);
}
.photo-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.photo-drop-icon {
  font-size: 1.7rem;
  margin-bottom: 5px;
}
.photo-drop-text {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.photo-drop-text b {
  color: var(--accent3);
  font-weight: 500;
}
.photo-prev {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: var(--r-sm);
  margin-top: 9px;
  display: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.photo-prev.show {
  display: block;
}
.photo-clear {
  background: none;
  border: none;
  color: rgba(180, 40, 40, 0.7);
  font-size: 0.72rem;
  cursor: pointer;
  margin-top: 6px;
  font-family: "Inter", sans-serif;
  padding: 3px 0;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
}
.photo-clear:hover {
  color: #ff7070;
}
.url-toggle {
  font-size: 0.68rem;
  color: var(--muted);
  cursor: pointer;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
  padding: 3px 0;
}
.url-toggle:hover {
  color: var(--accent3);
}
.url-wrap {
  margin-top: 7px;
  display: none;
}
.url-wrap.show {
  display: block;
}
.btn-save {
  flex: 1;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: var(--r-sm);
  padding: 13px;
  font-family: "Inter", sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.35);
  min-height: 48px;
}
.btn-save:hover {
  background: #60a5fa;
}
.btn-save:active {
  transform: scale(0.98);
}
.btn-cancel {
  background: rgba(255, 255, 255, 0.07);
  color: var(--soft);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-family: "Inter", sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 48px;
}
.btn-cancel:hover {
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* ── TRIP MODAL ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.85);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-bg.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: #1a2235;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px 20px 0 0;
  padding: 22px 22px calc(22px + var(--sab));
  width: 100%;
  max-width: 520px;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.44s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-height: 92vh;
  overflow-y: auto;
}
.modal-bg.open .modal {
  transform: translateY(0);
}
.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto 18px;
}
.modal h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 18px;
}
.modal-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}
.color-pick {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.cp-sw {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all 0.18s cubic-bezier(0.34, 1.4, 0.64, 1);
  min-width: 42px;
  min-height: 42px;
}
.cp-sw.sel {
  border-color: #fff;
  transform: scale(1.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.journal-ta {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: var(--cream);
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  line-height: 1.65;
}
.journal-ta::placeholder {
  color: rgba(244, 241, 235, 0.2);
}
.journal-ta:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 107, 94, 0.18);
}

/* ── HINT / TOAST ── */
.hint,
.toast-el {
  position: fixed;
  bottom: calc(90px + var(--sab));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 9px 20px;
  border-radius: 30px;
  font-family: "Inter", sans-serif;
  font-size: 0.73rem;
  font-weight: 500;
  z-index: 9000;
  opacity: 0;
  transition:
    opacity 0.22s,
    transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
  white-space: nowrap;
}
.hint {
  background: rgba(26, 34, 53, 0.92);
  border: 1px solid rgba(61, 107, 94, 0.4);
  color: var(--accent3);
  backdrop-filter: blur(16px);
}
.toast-el {
  background: rgba(61, 107, 94, 0.92);
  border: 1px solid var(--accent2);
  color: #fff;
  backdrop-filter: blur(16px);
}
.hint.show,
.toast-el.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 32px 18px;
  color: var(--muted);
}
.empty-state .esi {
  font-size: 2.2rem;
  margin-bottom: 10px;
  opacity: 0.45;
}
.empty-state p {
  font-size: 0.8rem;
  line-height: 1.7;
}

/* ── LEAFLET ── */
.leaflet-control-zoom {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
}
.leaflet-control-zoom a {
  background: rgba(26, 34, 53, 0.92) !important;
  color: var(--soft) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 16px !important;
}
.leaflet-control-zoom a:hover {
  background: var(--accent) !important;
  color: #fff !important;
}
.leaflet-control-attribution {
  background: rgba(26, 34, 53, 0.75) !important;
  color: rgba(244, 241, 235, 0.3) !important;
  font-size: 9px !important;
  backdrop-filter: blur(6px);
  border-radius: 4px !important;
}
@media (max-width: 767px) {
  .leaflet-bottom.leaflet-right {
    bottom: calc(68px + var(--sab)) !important;
  }
}

/* ── READ-ONLY ── */
.edit-only {
  display: none;
}
body.edit-mode .edit-only {
  display: flex;
}
body.edit-mode .edit-only-block {
  display: block;
}
.edit-only-block {
  display: none;
}

/* ── PASSWORD LOCK ── */
#lockScreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(160deg, #0e1620 0%, #1a2235 50%, #0d1a14 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 30px;
  text-align: center;
}
.lock-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.lock-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 8px;
}
.lock-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 28px;
}
.lock-input {
  width: 100%;
  max-width: 280px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 18px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--cream);
  outline: none;
  text-align: center;
  letter-spacing: 0.1em;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  margin-bottom: 14px;
}
.lock-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 107, 94, 0.2);
}
.lock-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 13px 36px;
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(61, 107, 94, 0.4);
}
.lock-btn:hover {
  background: var(--accent2);
  transform: translateY(-1px);
}
.lock-err {
  font-size: 0.75rem;
  color: #ff8080;
  margin-top: 10px;
  min-height: 18px;
}

/* ── THIS DAY CARD ── */
.this-day-card {
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.3),
    rgba(192, 122, 79, 0.15)
  );
  border: 1px solid rgba(61, 107, 94, 0.4);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.this-day-card:hover {
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.4),
    rgba(192, 122, 79, 0.22)
  );
}
.this-day-eyebrow {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
  margin-bottom: 4px;
}
.this-day-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
}
.this-day-meta {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── SHARE BUTTON ── */
.btn-share {
  background: rgba(26, 34, 53, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 7px 13px;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--soft);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: all 0.15s;
  white-space: nowrap;
  display: none;
}
.btn-share.visible {
  display: block;
}
.btn-share:hover {
  border-color: var(--accent);
  color: var(--accent3);
}

/* ── CLUSTER OVERRIDES ── */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(61, 107, 94, 0.6) !important;
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: rgba(61, 107, 94, 0.9) !important;
  color: #fff !important;
  font-family: "Inter", sans-serif !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

/* ── SKELETON LOADERS ── */
@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}
.skeleton-card {
  border-radius: var(--r);
  margin-bottom: 8px;
  padding: 13px 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  min-height: 72px;
  overflow: hidden;
}
.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}
.skeleton-line.short {
  width: 55%;
}
.skeleton-line.xshort {
  width: 35%;
}
.skel-place {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  min-height: 50px;
}
.skel-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}
.skel-info {
  flex: 1;
}
.skel-row {
  height: 10px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.skel-row.short {
  width: 60%;
}

/* ── FAVORITES STRIP ── */
.favs-strip {
  padding: 10px 12px 6px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.favs-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
  opacity: 0.7;
  margin-bottom: 7px;
}
.favs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.favs-scroll::-webkit-scrollbar {
  display: none;
}
.fav-pill {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 11px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--soft);
}
.fav-pill:hover {
  background: rgba(61, 107, 94, 0.18);
  border-color: var(--accent);
  color: var(--accent3);
}
.fav-pill:active {
  transform: scale(0.96);
}
.fav-emoji {
  font-size: 0.9rem;
}

/* ── TRIP STATS SUMMARY ── */
.trip-summary {
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.15),
    rgba(192, 122, 79, 0.08)
  );
  border: 1px solid rgba(61, 107, 94, 0.25);
  border-radius: var(--r);
  padding: 13px 14px;
  margin-bottom: 8px;
}
.trip-summary-title {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
  opacity: 0.7;
  margin-bottom: 10px;
}
.trip-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.trip-summary-stat {
  text-align: center;
}
.trip-summary-num {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent3);
  line-height: 1;
}
.trip-summary-lbl {
  font-size: 0.55rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ── PIN DROP ANIMATION ── */
@keyframes pinDrop {
  0% {
    transform: translateY(-40px) rotate(-45deg) scale(0.6);
    opacity: 0;
  }
  60% {
    transform: translateY(4px) rotate(-45deg) scale(1.15);
    opacity: 1;
  }
  80% {
    transform: translateY(-3px) rotate(-45deg) scale(0.95);
  }
  100% {
    transform: rotate(-45deg) scale(1);
    opacity: 1;
  }
}
.wfm-body.dropping {
  animation: pinDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ── TAB SLIDE TRANSITIONS ── */
.panel-view {
  animation: none;
}
.panel-view.slide-in {
  animation: slideIn 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── MOBILE TRIP CHIP ── */
#mobileTripChip {
  display: none;
  position: fixed;
  bottom: calc(var(--tab-bar-h) + var(--sab) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 499;
  align-items: center;
  gap: 8px;
  background: rgba(61, 107, 94, 0.92);
  border: 1px solid var(--accent2);
  border-radius: 24px;
  padding: 8px 8px 8px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  pointer-events: all;
}
#mobileTripChip.show {
  display: flex;
}
#mobileTripChip .chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
#mobileTripChip .chip-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mobileTripChip .chip-share {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  transition: background 0.15s;
  white-space: nowrap;
  min-height: 32px;
  display: flex;
  align-items: center;
}
#mobileTripChip .chip-share:active {
  background: rgba(255, 255, 255, 0.25);
}
#mobileTripChip .chip-clear {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
#mobileTripChip .chip-clear:active {
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

/* ══════════════════════════════════════════
   LIGHT MODE — vintage parchment journal
══════════════════════════════════════════ */
body.light-mode {
  --accent: #2d5a4e;
  --accent2: #3d7a6a;
  --accent3: #4a9585;
  --warm: #a05c2e;
  --warm-lt: #c07a4f;
  --slate: #f2ede4;
  --slate2: #e8e1d6;
  --slate3: #ddd5c8;
  --panel: #faf7f2;
  --panel2: #f2ede4;
  --cream: #1a1a1a;
  --soft: #3a3530;
  --muted: #7a6e62;
  --border: rgba(45, 90, 78, 0.18);
  --border2: rgba(0, 0, 0, 0.08);
  --glass: rgba(250, 247, 242, 0.96);
  --shadow: 0 16px 60px rgba(0, 0, 0, 0.12);
  color-scheme: light;
}

/* Body background */
body.light-mode {
  background: var(--slate);
}
html:has(body.light-mode) {
  background: #f2ede4;
}

/* Map header buttons in light mode */
body.light-mode .layer-toggle {
  background: rgba(250, 247, 242, 0.95);
  border-color: rgba(0, 0, 0, 0.12);
}
body.light-mode .layer-btn {
  color: rgba(26, 26, 26, 0.45);
}
body.light-mode .layer-btn.active {
  background: rgba(0, 0, 0, 0.1);
  color: var(--cream);
}
body.light-mode .btn-search {
  background: rgba(250, 247, 242, 0.95);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--soft);
}
body.light-mode #mobileTripChip {
  background: rgba(45, 90, 78, 0.9);
}

/* Desktop panel */
body.light-mode #desktopPanel {
  border-right-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .ptabs {
  background: rgba(0, 0, 0, 0.06);
}
body.light-mode .ptab.active {
  background: var(--panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
body.light-mode #sidebarToggle {
  background: var(--panel);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 3px 0 12px rgba(0, 0, 0, 0.08);
}

/* Trip cards */
body.light-mode .trip-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
body.light-mode .trip-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
body.light-mode .trip-card-bg {
  background: #e8e1d6;
}
body.light-mode .trip-card-bg::after {
  background: linear-gradient(
    160deg,
    rgba(240, 235, 225, 0.7) 0%,
    rgba(240, 235, 225, 0.3) 100%
  );
}
body.light-mode .trip-card-name {
  color: var(--cream);
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.6);
}
body.light-mode .trip-card-meta {
  color: rgba(26, 26, 26, 0.6);
}
body.light-mode .tca {
  background: rgba(255, 255, 255, 0.7);
  color: rgba(26, 26, 26, 0.6);
}
body.light-mode .tca:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--cream);
}

/* Stat cards */
body.light-mode .stat-card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
body.light-mode .stat-num {
  color: var(--accent2);
}

/* Place rows */
body.light-mode .place-row:hover {
  background: rgba(0, 0, 0, 0.04);
}
body.light-mode .place-row-name {
  color: var(--cream);
}

/* Buttons */
body.light-mode .btn-show-all {
  border-color: rgba(0, 0, 0, 0.15);
}
body.light-mode .export-btn {
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .export-btn:hover {
  background: rgba(45, 90, 78, 0.08);
}

/* Sidebar form */
body.light-mode .sb-close {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--muted);
}
body.light-mode .sb-close:hover {
  background: rgba(0, 0, 0, 0.12);
  color: var(--cream);
}
body.light-mode .fg input,
body.light-mode .fg textarea,
body.light-mode .fg select {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--cream);
}
body.light-mode .fg input:focus,
body.light-mode .fg textarea:focus,
body.light-mode .fg select:focus {
  background: rgba(45, 90, 78, 0.06);
  border-color: var(--accent);
}
body.light-mode .fg select option {
  background: var(--panel);
  color: var(--cream);
}
body.light-mode .emoji-opt,
body.light-mode .weather-opt {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}
body.light-mode .emoji-opt.sel,
body.light-mode .weather-opt.sel {
  background: rgba(45, 90, 78, 0.15);
}
body.light-mode .sb-star {
  color: var(--accent2);
}

/* Modal */
body.light-mode .modal-bg {
  background: rgba(80, 70, 60, 0.55);
}
body.light-mode .modal {
  border-color: rgba(0, 0, 0, 0.12);
  background: #f4f1eb;
}
body.light-mode .modal-handle {
  background: rgba(0, 0, 0, 0.15);
}
body.light-mode .journal-ta {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

/* Bottom sheets (mobile) */
body.light-mode #bottomSheet,
body.light-mode #placeSheet,
body.light-mode #sidebar {
  border-top-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
}
body.light-mode .sheet-handle {
  background: rgba(0, 0, 0, 0.18);
}
body.light-mode #bottomTabs {
  background: #faf7f2;
  border-top-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}
body.light-mode .tab-item {
  color: var(--muted);
}
body.light-mode .tab-item.active {
  color: var(--accent2);
}
body.light-mode #mobileFab {
  box-shadow: 0 4px 20px rgba(45, 90, 78, 0.4);
}

/* Popups */
body.light-mode .pop {
  background: rgba(250, 247, 242, 0.98);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}
body.light-mode .pop-no {
  background: linear-gradient(
    135deg,
    rgba(45, 90, 78, 0.12),
    rgba(160, 92, 46, 0.08)
  );
}
body.light-mode .pop-name {
  color: var(--cream);
}
body.light-mode .pop-notes {
  color: rgba(26, 26, 26, 0.65);
}

/* Place detail sheet */
body.light-mode .ps-close-btn {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--muted);
}
body.light-mode .ps-name {
  color: var(--cream);
}
body.light-mode .ps-notes {
  color: rgba(26, 26, 26, 0.7);
}
body.light-mode .ps-tag {
  background: rgba(45, 90, 78, 0.1);
  border-color: rgba(45, 90, 78, 0.3);
}

/* Leaflet tiles — switch to a lighter map in light mode */
body.light-mode .leaflet-control-zoom a {
  background: rgba(250, 247, 242, 0.95) !important;
  color: var(--soft) !important;
}
body.light-mode .leaflet-control-zoom a:hover {
  background: var(--accent) !important;
  color: #fff !important;
}
body.light-mode .leaflet-control-attribution {
  background: rgba(250, 247, 242, 0.8) !important;
  color: rgba(26, 26, 26, 0.4) !important;
}

/* Search overlay */
body.light-mode .gs-input-wrap {
  background: rgba(250, 247, 242, 0.98);
  border-color: rgba(45, 90, 78, 0.3);
}
body.light-mode .gs-input {
  color: var(--cream);
}
body.light-mode .gs-result:hover {
  background: rgba(0, 0, 0, 0.04);
}
body.light-mode .gs-result-name {
  color: var(--cream);
}

/* Hints and toasts */
body.light-mode .hint {
  background: rgba(250, 247, 242, 0.95);
  color: var(--accent);
}
body.light-mode .toast-el {
  background: rgba(45, 90, 78, 0.95);
}

/* Splash */
body.light-mode #splash {
  background: linear-gradient(160deg, #f2ede4 0%, #faf7f2 50%, #e8f0ec 100%);
}
body.light-mode .splash-eyebrow {
  color: var(--accent2);
}
body.light-mode .splash-title {
  color: var(--cream);
}
body.light-mode .splash-title em {
  color: var(--accent2);
}
body.light-mode .splash-stat-num {
  color: var(--accent2);
}
body.light-mode .splash-stat-label {
  color: var(--muted);
}
body.light-mode .splash-trip-pill {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--soft);
}
body.light-mode .splash-sub {
  color: var(--muted);
}

/* Lock screen */
body.light-mode #lockScreen {
  background: linear-gradient(160deg, #f2ede4 0%, #faf7f2 50%, #e8f0ec 100%);
}
body.light-mode .lock-title {
  color: var(--cream);
}
body.light-mode .lock-sub {
  color: var(--muted);
}
body.light-mode .lock-input {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
  color: var(--cream);
}
body.light-mode .lock-err {
  color: #c0392b;
}

/* This-day card */
body.light-mode .this-day-card {
  background: linear-gradient(
    135deg,
    rgba(45, 90, 78, 0.1),
    rgba(160, 92, 46, 0.06)
  );
  border-color: rgba(45, 90, 78, 0.25);
}
body.light-mode .this-day-name {
  color: var(--cream);
}

/* Favs strip */
body.light-mode .fav-pill {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--soft);
}
body.light-mode .fav-pill:hover {
  background: rgba(45, 90, 78, 0.1);
  border-color: var(--accent);
}

/* Trip summary */
body.light-mode .trip-summary {
  background: linear-gradient(
    135deg,
    rgba(45, 90, 78, 0.08),
    rgba(160, 92, 46, 0.05)
  );
  border-color: rgba(45, 90, 78, 0.2);
}

/* Timeline */
body.light-mode .tl-trip-header:hover {
  background: rgba(0, 0, 0, 0.03);
}
body.light-mode .tl-trip-name {
  color: var(--cream);
}
body.light-mode .tl-trip-meta {
  color: var(--muted);
}
body.light-mode .tl-place-name {
  color: var(--cream);
}

/* Scrollbar */
body.light-mode * {
  scrollbar-color: rgba(45, 90, 78, 0.2) transparent;
}

/* Transition all color changes smoothly */
body,
body * {
  transition-property:
    background-color, border-color, color, box-shadow, fill, stroke;
  transition-duration: 0.25s;
  transition-timing-function: ease;
}
/* But don't slow down animations that are already handled */
body.light-mode .splash-enter,
body *[style*="transition"],
body .wfm-body,
body .bar-fill {
  transition-duration: inherit;
}

/* Theme toggle button */
.btn-theme {
  background: rgba(26, 34, 53, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 7px 12px;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: all 0.15s;
  white-space: nowrap;
  color: var(--soft);
}
body.light-mode .btn-theme {
  background: rgba(250, 247, 242, 0.95);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--soft);
}
.btn-theme:hover {
  border-color: var(--accent);
  color: var(--accent3);
}

/* ── JOURNAL ENTRY (per-place) ── */
.je-editor-wrap {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.je-editor-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 107, 94, 0.18);
}
.je-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}
.je-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-family: "Inter", sans-serif;
  transition: all 0.12s;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.je-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}
.je-btn.active {
  background: rgba(61, 107, 94, 0.3);
  color: var(--accent3);
}
.je-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 4px 3px;
  align-self: stretch;
}
.je-content {
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px 13px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--cream);
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}
.je-content:empty::before {
  content: attr(data-placeholder);
  color: rgba(244, 241, 235, 0.22);
  pointer-events: none;
}
.je-content b,
.je-content strong {
  font-weight: 600;
}
.je-content i,
.je-content em {
  font-style: italic;
  color: rgba(244, 241, 235, 0.85);
}
.je-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 8px 0;
  padding: 6px 12px;
  color: rgba(244, 241, 235, 0.7);
  font-style: italic;
  background: rgba(61, 107, 94, 0.08);
  border-radius: 0 6px 6px 0;
}
.je-content ul,
.je-content ol {
  padding-left: 20px;
  margin: 6px 0;
}
.je-content li {
  margin: 3px 0;
}
.je-word-count {
  font-size: 0.62rem;
  color: var(--muted);
  padding: 4px 12px 6px;
  text-align: right;
}

/* ── PHOTO GRID (multiple photos) ── */
.photo-urls-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.photo-url-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--cream);
  outline: none;
  transition: border-color 0.15s;
  min-height: 44px;
}
.photo-url-row input:focus {
  border-color: var(--accent);
}
.photo-url-row .rm-photo {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 8px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.12s;
  flex-shrink: 0;
}
.photo-url-row .rm-photo:hover {
  background: rgba(180, 40, 40, 0.2);
  color: #ff8080;
}
.add-photo-btn {
  background: none;
  border: 1.5px dashed rgba(61, 107, 94, 0.4);
  border-radius: var(--r-sm);
  padding: 9px;
  width: 100%;
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  min-height: 40px;
}
.add-photo-btn:hover {
  border-color: var(--accent);
  color: var(--accent3);
  background: rgba(61, 107, 94, 0.06);
}
.photo-grid {
  display: grid;
  gap: 4px;
  margin-top: 0;
}
.photo-grid.n1 {
  grid-template-columns: 1fr;
}
.photo-grid.n2 {
  grid-template-columns: 1fr 1fr;
}
.photo-grid.n3,
.photo-grid.n4,
.photo-grid.n5,
.photo-grid.n6,
.photo-grid.n7,
.photo-grid.n8,
.photo-grid.n9 {
  grid-template-columns: 1fr 1fr 1fr;
}
.photo-grid img {
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
  display: block;
}
.photo-grid.n1 img {
  height: 200px;
  border-radius: var(--r-sm);
}
.photo-grid.n2 img {
  height: 140px;
}
.photo-grid.n3 img,
.photo-grid.n4 img,
.photo-grid.n5 img,
.photo-grid.n6 img,
.photo-grid.n7 img,
.photo-grid.n8 img,
.photo-grid.n9 img {
  height: 100px;
}
.photo-grid img:hover {
  transform: scale(1.03);
}

/* ── TAGS/VIBES ── */
.vibe-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.vibe-opt {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: "Inter", sans-serif;
}
.vibe-opt:hover {
  border-color: var(--accent);
  color: var(--accent3);
  background: rgba(61, 107, 94, 0.1);
}
.vibe-opt.sel {
  background: rgba(61, 107, 94, 0.25);
  border-color: var(--accent);
  color: var(--accent3);
}
.vibe-tag {
  font-size: 0.6rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(61, 107, 94, 0.15);
  border: 1px solid rgba(61, 107, 94, 0.3);
  color: var(--accent3);
  display: inline-flex;
  align-items: center;
}

/* ── JOURNAL ENTRY in timeline ── */
.tl-entry {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--accent);
  box-sizing: border-box;
}
.tl-entry-text {
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(244, 241, 235, 0.72);
  word-break: break-word;
  overflow-wrap: break-word;
}
.tl-entry-text b,
.tl-entry-text strong {
  font-weight: 600;
  color: var(--cream);
}
.tl-entry-text i,
.tl-entry-text em {
  font-style: italic;
}
.tl-entry-text blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 8px;
  margin: 4px 0;
  font-style: italic;
  color: rgba(244, 241, 235, 0.55);
}
.tl-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 8px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
}
.tl-photo-grid img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
}
.tl-photo-grid img:hover {
  transform: scale(1.04);
}
.tl-photo-grid:has(img:only-child) {
  grid-template-columns: 1fr;
}
.tl-photo-grid:has(img:only-child) img {
  height: 160px;
}
.tl-vibes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

/* ── ON THIS DAY MEMORY CARD ── */
.memory-card {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.memory-card-header {
  padding: 10px 14px 8px;
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.3),
    rgba(192, 122, 79, 0.15)
  );
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.memory-card-icon {
  font-size: 1.1rem;
}
.memory-card-eyebrow {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent3);
}
.memory-card-ago {
  font-size: 0.68rem;
  color: var(--muted);
}
.memory-card-body {
  padding: 10px 14px 12px;
  cursor: pointer;
}
.memory-card-name {
  font-family: "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 4px;
}
.memory-card-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.memory-card-entry {
  font-size: 0.78rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(244, 241, 235, 0.65);
  margin-bottom: 8px;
}
.memory-card-photos {
  display: flex;
  gap: 4px;
}
.memory-card-photos img {
  height: 60px;
  flex: 1;
  object-fit: cover;
  border-radius: 6px;
  min-width: 0;
}

/* light mode journal */
body.light-mode .je-editor-wrap {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}
body.light-mode .je-toolbar {
  background: rgba(0, 0, 0, 0.04);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
body.light-mode .je-btn {
  color: var(--muted);
}
body.light-mode .je-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--cream);
}
body.light-mode .je-content {
  color: var(--cream);
}
body.light-mode .je-content:empty::before {
  color: rgba(26, 26, 26, 0.25);
}
body.light-mode .vibe-opt {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--muted);
}
body.light-mode .photo-url-row input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: var(--cream);
}
body.light-mode .tl-entry {
  background: rgba(0, 0, 0, 0.03);
}
body.light-mode .memory-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── YEAR TIMELINE ── */
.yt-year-section {
  margin-bottom: 32px;
}
.yt-year-label {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: -1px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: baseline;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel);
}
.yt-year-count {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.yt-trips-container {
  padding: 0 12px;
}
.yt-trip-card {
  margin-bottom: 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--card);
}
.yt-trip-hero {
  position: relative;
  height: 140px;
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
  will-change: transform;
}
.yt-trip-hero-img {
  width: 100%;
  height: 108%;
  object-fit: cover;
  display: block;
  will-change: transform;
  transition: transform 0.05s linear;
}
.yt-trip-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.1) 60%
  );
}
.yt-trip-hero-title {
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}
.yt-trip-hero-dates {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  padding: 3px 8px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(4px);
}
.yt-trip-no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.3;
}
.yt-trip-body {
  padding: 12px 14px;
}
.yt-trip-stats {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.yt-trip-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}
.yt-trip-stat span {
  color: var(--cream);
  font-weight: 500;
}
.yt-places-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.yt-places-scroll::-webkit-scrollbar {
  display: none;
}
.yt-place-chip {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.yt-place-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}
.yt-place-chip .yt-chip-emoji {
  font-size: 0.8rem;
}
.yt-trip-journal {
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(244, 241, 235, 0.55);
  line-height: 1.6;
  font-style: italic;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 10px;
  cursor: pointer;
}
.yt-trip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.yt-view-btn {
  font-size: 0.72rem;
  color: var(--accent3);
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  padding: 0;
  letter-spacing: 0.02em;
}
.yt-view-btn:hover {
  opacity: 0.7;
}
.yt-highlights {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.yt-highlight {
  font-size: 0.65rem;
  color: rgba(244, 241, 235, 0.4);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 2px 7px;
}
.yt-on-this-day {
  margin: 0 12px 20px;
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.15),
    rgba(127, 179, 164, 0.08)
  );
  border: 1px solid rgba(61, 107, 94, 0.3);
  border-radius: 14px;
  padding: 14px 16px;
}
.yt-otd-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent3);
  margin-bottom: 6px;
}
.yt-otd-text {
  font-size: 0.82rem;
  color: var(--cream);
  line-height: 1.4;
}
.yt-otd-sub {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 3px;
}

@keyframes pinDrop {
  0% {
    transform: translateY(-60px) scale(0.7);
    opacity: 0;
  }
  60% {
    transform: translateY(8px) scale(1.15);
    opacity: 1;
  }
  80% {
    transform: translateY(-4px) scale(0.95);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
.leaflet-marker-icon.pin-dropping {
  animation: pinDrop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.transport-opt {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: "Inter", sans-serif;
}
.transport-opt:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}
.transport-opt.sel {
  background: rgba(61, 107, 94, 0.2);
  border-color: var(--accent);
  color: var(--accent3);
}

/* ── ENHANCED TRIP CARD ── */
.tc-hero {
  height: 120px;
  position: relative;
  overflow: hidden;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}
.tc-hero-img {
  width: 100%;
  height: 115%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.tc-hero:hover .tc-hero-img {
  transform: scale(1.04);
}
.tc-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0.1) 100%
  );
}
.tc-hero-name {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 44px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}
.tc-hero-title {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.tc-hero-year {
  font-family: "Playfair Display", serif;
  font-size: 0.82rem;
  font-weight: 300;
  opacity: 0.8;
  margin-left: 6px;
  display: inline;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.tc-hero-no-cover {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.25;
}
.tc-body {
  padding: 10px 12px 12px;
}
.tc-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tc-meta-item {
  font-size: 0.68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.tc-meta-item span {
  color: var(--cream);
  font-weight: 500;
}
.tc-chips {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.tc-chips::-webkit-scrollbar {
  display: none;
}
.tc-chip {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 0.65rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}
.tc-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
}
.tc-journal {
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(244, 241, 235, 0.5);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}
.tc-description {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.tc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.tc-link {
  font-size: 0.7rem;
  color: var(--accent3);
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  padding: 0;
  letter-spacing: 0.02em;
  transition: opacity 0.15s;
}
.tc-link:hover {
  opacity: 0.65;
}
body.light-mode .tc-hero-name {
  color: #fff;
}
body.light-mode .tc-chip {
  color: var(--muted);
}
body.light-mode .tc-journal {
  color: rgba(26, 26, 26, 0.5);
}

/* ── PLACES PHOTO CARDS ── */
.pc-trip-group {
  margin-bottom: 8px;
}
.pc-trip-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cream);
  cursor: pointer;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.09);
  margin: 0 6px 4px;
  transition: all 0.15s;
  user-select: none;
  touch-action: manipulation;
}
.pc-trip-header:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}
.pc-trip-header.nope {
  background: rgba(255, 255, 255, 0.07);
}
.pc-trip-header:active {
  background: rgba(255, 255, 255, 0.1);
}
.pc-trip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pc-trip-count {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: auto;
  margin-right: 6px;
}
.pc-chevron {
  font-size: 0.7rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  display: inline-block;
}
.pc-trip-group.open .pc-chevron {
  transform: rotate(90deg);
}
.pc-grid-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.pc-trip-group.open .pc-grid-wrap {
  max-height: 9999px;
}
.pc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 8px 12px;
}
.pc-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  transition: transform 0.15s cubic-bezier(0.34, 1.3, 0.64, 1);
  aspect-ratio: 1/1;
}
.pc-card:hover {
  transform: scale(1.02);
}
.pc-card:active {
  transform: scale(0.97);
}
.pc-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.pc-card:hover .pc-card-img {
  transform: scale(1.06);
}
.pc-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.1) 55%,
    transparent 100%
  );
}
.pc-card-no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  opacity: 0.3;
  background: rgba(255, 255, 255, 0.03);
}
.pc-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 10px 8px;
}
.pc-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 3px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pc-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.pc-card-region {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.pc-card-stars {
  font-size: 0.65rem;
  color: var(--gold2);
  flex-shrink: 0;
  letter-spacing: -1px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.pc-card-weather {
  position: absolute;
  top: 7px;
  right: 8px;
  font-size: 1.1rem;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
}
/* wide card — spans both columns for 5-star highlights */
.pc-card.pc-wide {
  grid-column: 1/-1;
  aspect-ratio: 2/1;
}
.pc-card.pc-wide .pc-card-name {
  font-size: 0.95rem;
}
/* light mode */
body.light-mode .pc-trip-header {
  background: var(--panel);
}

/* ── STATS OVERHAUL ── */
.stats-hero {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.stats-hero-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stats-hero-num {
  font-family: "Playfair Display", serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--accent3);
  line-height: 1;
  letter-spacing: -1px;
}
.stats-hero-lbl {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.stats-section {
  margin-bottom: 22px;
}
.stats-section-title {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  padding: 0 2px;
}
/* Month heatmap */
.month-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
}
.month-cell {
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.15s;
}
.month-cell:hover {
  transform: scale(1.08);
}
.month-name {
  font-size: 0.6rem;
  color: var(--muted);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.month-count {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cream);
}
/* Vibe cloud */
.vibe-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vibe-cloud-tag {
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: default;
  border: 1px solid transparent;
  transition: transform 0.15s;
}
.vibe-cloud-tag:hover {
  transform: scale(1.06);
}
/* Top places */
.top-place-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--card);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.12s;
}
.top-place-row:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(2px);
}
.top-place-rank {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  color: var(--gold);
  width: 20px;
  flex-shrink: 0;
  text-align: center;
}
.top-place-photo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.top-place-no-photo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.top-place-info {
  flex: 1;
  min-width: 0;
}
.top-place-name {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--cream);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-place-meta {
  font-size: 0.66rem;
  color: var(--muted);
  margin-top: 1px;
}
.top-place-stars {
  font-size: 0.72rem;
  color: var(--gold2);
  flex-shrink: 0;
  letter-spacing: -1px;
}
/* Milestones */
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.milestone-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.milestone-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.milestone-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--cream);
  line-height: 1.3;
}
.milestone-sub {
  font-size: 0.65rem;
  color: var(--muted);
}
.milestone-card.achieved {
  border-color: rgba(201, 168, 76, 0.3);
  background: rgba(201, 168, 76, 0.07);
}
.milestone-card.next {
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.6;
}
/* Surprise button */
.surprise-btn {
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.3),
    rgba(61, 107, 94, 0.1)
  );
  border: 1px solid rgba(61, 107, 94, 0.4);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent3);
  font-family: "Inter", sans-serif;
  transition: all 0.2s cubic-bezier(0.34, 1.3, 0.64, 1);
  margin-bottom: 20px;
}
.surprise-btn:hover {
  transform: scale(1.02);
  background: rgba(61, 107, 94, 0.2);
}
.surprise-btn:active {
  transform: scale(0.97);
}
/* Share card modal */
.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.share-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.share-modal {
  background: #0e1117;
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}
.share-overlay.open .share-modal {
  transform: scale(1);
}
.share-card-preview {
  width: 100%;
  aspect-ratio: 4/5;
  position: relative;
  background: #0e1117;
  overflow: hidden;
}
.share-card-bg {
  width: 100%;
  height: 55%;
  object-fit: cover;
  display: block;
}
.share-card-body {
  padding: 20px;
}
.share-card-trip {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  color: var(--cream);
  margin-bottom: 6px;
  line-height: 1.2;
}
.share-card-dates {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.share-card-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.share-card-stat {
  text-align: center;
}
.share-card-stat-num {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  color: var(--accent3);
}
.share-card-stat-lbl {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.share-card-footer {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
}
.share-actions {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.share-action-btn {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  border: none;
  transition: opacity 0.15s;
}
.share-action-btn:hover {
  opacity: 0.82;
}
.share-action-close {
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
}
.share-action-copy {
  background: var(--accent);
  color: #fff;
}
body.light-mode .stats-hero-num {
  color: var(--accent2);
}
body.light-mode .top-place-row:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ── DAY ACCORDION ── */
.tc-days-wrap {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 8px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tc-days-wrap.open {
  max-height: 9999px;
}
.tc-day-group {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.tc-day-group:last-child {
  border-bottom: none;
}
.tc-day-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.tc-day-header:hover {
  background: rgba(255, 255, 255, 0.04);
}
.tc-day-chevron {
  font-size: 0.65rem;
  color: var(--muted);
  transition: transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
  margin-left: auto;
  flex-shrink: 0;
}
.tc-day-group.open .tc-day-chevron {
  transform: rotate(90deg);
}
.tc-day-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: -0.2px;
}
.tc-day-count {
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1px 7px;
}
.tc-day-places {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 12px;
}
.tc-day-group.open .tc-day-places {
  max-height: 9999px;
  padding-bottom: 6px;
}
.tc-day-place {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.tc-day-place:hover {
  background: rgba(255, 255, 255, 0.05);
}
.tc-day-place-emoji {
  font-size: 0.95rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.tc-day-place-name {
  flex: 1;
  font-size: 0.8rem;
  color: var(--cream);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tc-day-place-time {
  font-size: 0.68rem;
  color: var(--muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.tc-day-place-stars {
  font-size: 0.62rem;
  color: var(--gold2);
  flex-shrink: 0;
  letter-spacing: -1px;
}
/* days toggle button in meta row */
.tc-days-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 6px 11px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cream);
  cursor: pointer;
  transition: background 0.1s;
  font-family: "Inter", sans-serif;
  min-height: 36px;
  min-width: 70px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.15);
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  z-index: 10;
}
.tc-days-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.tc-days-btn:active {
  background: rgba(255, 255, 255, 0.18);
}
.tc-days-btn-chevron {
  font-size: 0.6rem;
  color: var(--muted);
  transition: transform 0.2s;
}
.tc-days-btn.open .tc-days-btn-chevron {
  transform: rotate(90deg);
}
body.light-mode .tc-day-header:hover {
  background: rgba(0, 0, 0, 0.03);
}
body.light-mode .tc-day-place:hover {
  background: rgba(0, 0, 0, 0.03);
}

.share-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 12px;
  padding: 10px 4px;
  cursor: pointer;
  transition: background 0.15s;
  font-family: "Inter", sans-serif;
}
.share-opt-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.share-opt-btn:active {
  background: rgba(255, 255, 255, 0.15);
}
.share-opt-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.share-opt-label {
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
  #desktopPanel {
    display: none;
  }
  #sidebarToggle {
    display: none !important;
  }
  #mapHeader {
    left: 0;
    padding: calc(4px + var(--sat)) 14px 8px;
    justify-content: flex-start;
  }
  #mobileFab {
    display: flex;
  }
  #bottomTabs {
    display: block;
  }
  #bottomSheet {
    display: flex;
    flex-direction: column;
  }
  .hint {
    bottom: calc(78px + var(--sab));
  }
  .toast-el {
    bottom: calc(78px + var(--sab));
  }
  #sidebar {
    width: 100%;
    top: auto;
    border-left: none;
    border-top: 1px solid var(--border2);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    max-height: 94vh;
  }
  #sidebar.open {
    transform: translateY(0);
  }
  #placeSheet {
    display: flex !important;
    flex-direction: column;
  }
  #globalSearch {
    top: calc(52px + var(--sat));
    width: calc(100vw - 28px);
  }

  /* Timeline mobile */
  .timeline-scroll {
    padding: 10px 8px;
  }
  .tl-line {
    margin-left: 12px;
    padding-left: 10px;
  }
  .tl-place {
    display: block;
    padding: 5px 0;
  }
  .tl-place-dot {
    margin-left: -15px;
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 3px;
  }
  .tl-place-body {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .tl-place-name {
    font-size: 0.85rem;
    display: block;
    width: 100%;
  }
  .tl-place-meta {
    margin-bottom: 4px;
  }
  .tl-entry {
    padding: 8px 10px;
    box-sizing: border-box;
    width: 100%;
    display: block;
  }
  .tl-entry-text {
    font-size: 0.78rem;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    display: block;
    width: 100%;
  }
  .tl-photo-grid img {
    height: 75px;
  }
  .tl-trip-cover {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .tl-journal-quote {
    margin-left: 0;
    margin-top: 4px;
  }
}
@media (min-width: 768px) {
  #bottomTabs {
    display: none !important;
  }
  #bottomSheet {
    display: none !important;
  }
  #placeSheet {
    display: none !important;
  }
  #mobileFab {
    display: none !important;
  }
  .hint,
  .toast-el {
    bottom: 28px;
  }
}
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
* {
  -webkit-tap-highlight-color: transparent;
}

/* Owner badge on trip cards */
.tc-owner-badge,
.tg-owner-badge,
.otc-owner-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.65rem;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  z-index: 2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.light-mode .tc-owner-badge,
body.light-mode .tg-owner-badge,
body.light-mode .otc-owner-badge {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.6);
}

.ps-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.ps-stars-badge {
  font-size: 0.78rem;
  color: var(--gold2);
  letter-spacing: -1px;
  flex-shrink: 0;
  margin-top: 2px;
}
.ps-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ps-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 8px 0;
}
.ps-journal {
  font-size: 0.76rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(244, 241, 235, 0.7);
  margin-bottom: 8px;
  font-style: italic;
}
.ps-photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}
.ps-photo-strip img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
.ps-date {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Mobile press states */
@media (hover: none) {
  .tl-place:active {
    background: rgba(255, 255, 255, 0.05);
  }
  .pc-card:active {
    transform: scale(0.97);
  }
  .trip-card:active {
    opacity: 0.92;
  }
  .tc-hero:active {
    filter: brightness(0.85);
  }
  .place-row:active {
    background: rgba(255, 255, 255, 0.07);
  }
  .tc-day-place:active {
    background: rgba(255, 255, 255, 0.07);
  }
  .tc-day-header:active {
    background: rgba(255, 255, 255, 0.07);
  }
  .pc-trip-header:active {
    background: rgba(255, 255, 255, 0.08);
  }
  .tab-item:active .tab-icon {
    transform: scale(0.92);
  }
}

@media (max-width: 767px) {
  .tl-photo-strip {
    height: 85px;
    width: 100% !important;
    max-width: 100% !important;
  }
  .tl-photo-strip.single {
    height: 130px;
  }
  .tl-photo-strip img {
    flex: 1 !important;
    width: 0 !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  .tl-place-inner {
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .tl-entries {
    overflow: hidden !important;
    max-width: 100% !important;
  }
  .timeline-scroll {
    overflow-x: hidden !important;
  }
  .timeline-trip {
    overflow: hidden !important;
    max-width: 100% !important;
  }
}

.pc-trip-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.pc-trip-thumb-color {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
}

/* ── ROUTE ROW IN DAY ACCORDION ── */
.tc-day-route {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin: 2px 8px 4px;
  background: rgba(192, 122, 79, 0.1);
  border: 1px solid rgba(192, 122, 79, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
  touch-action: manipulation;
}
.tc-day-route:hover {
  background: rgba(192, 122, 79, 0.2);
}
.tc-day-route.active {
  background: rgba(192, 122, 79, 0.3);
  border-color: rgba(192, 122, 79, 0.5);
}
.tc-day-route-icon {
  font-size: 0.9rem;
}
.tc-day-route-miles {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--warm-lt);
}
/* Route tooltip on mini-map */
.route-tooltip {
  background: rgba(26, 34, 53, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.68rem;
  font-family: "Inter", sans-serif;
  padding: 3px 7px;
  border-radius: 6px;
}

.geocode-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.1s;
  touch-action: manipulation;
}
.geocode-item:last-child {
  border-bottom: none;
}
.geocode-item:hover,
.geocode-item.focused {
  background: rgba(61, 107, 94, 0.2);
}
.geocode-item-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 2px;
}
.geocode-item-addr {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.geocode-item-type {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent3);
  margin-bottom: 2px;
}

/* ── ON THIS DAY PILL ── */
.otd-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 8px 8px;
  padding: 9px 12px;
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.15),
    rgba(26, 34, 53, 0.4)
  );
  border: 1px solid rgba(61, 107, 94, 0.3);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  touch-action: manipulation;
}
.otd-pill:hover {
  background: linear-gradient(
    135deg,
    rgba(61, 107, 94, 0.25),
    rgba(26, 34, 53, 0.5)
  );
  border-color: rgba(61, 107, 94, 0.5);
}
.otd-pill-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.otd-pill-cal {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1;
  width: 36px;
  text-align: center;
}
.otd-pill-body {
  flex: 1;
  min-width: 0;
}
.otd-pill-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cream);
  line-height: 1.2;
}
.otd-pill-sub {
  font-size: 0.65rem;
  color: var(--accent-lt, var(--accent3));
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.otd-pill-arrow {
  font-size: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

/* ── OTD PANEL ── */
.otd-panel {
  margin: 0 8px 10px;
  background: var(--card, rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
}
.otd-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.otd-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.12s;
  touch-action: manipulation;
}
.otd-item:last-child {
  border-bottom: none;
}
.otd-item:hover {
  background: rgba(255, 255, 255, 0.04);
}
.otd-item-img {
  width: 48px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}
.otd-item-body {
  flex: 1;
  min-width: 0;
}
.otd-item-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 2px;
}
.otd-item-meta {
  font-size: 0.65rem;
  color: var(--muted);
}
.otd-item-snippet {
  font-size: 0.68rem;
  font-style: italic;
  color: rgba(244, 241, 235, 0.45);
  margin-top: 3px;
  line-height: 1.4;
}

/* ── Trip Preview: mobile stacked layout ── */
@media (max-width: 767px) {
  #tripPreviewLayout {
    flex-direction: column !important;
  }
  #tripPreviewMapWrap {
    height: 35vh !important;
    flex: none !important;
  }
  #tripPreviewPanel {
    width: 100% !important;
    flex: 1 !important;
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}
