/* CDMX Trip — May 2–8, 2026 */
:root {
  --bg: #1a1410;
  --panel: #241b15;
  --panel-2: #2e231a;
  --text: #f4ebe0;
  --muted: #b39e87;
  --terracotta: #d97757;
  --ochre: #e8b34a;
  --deep-blue: #2d5a87;
  --cream: #f4ebe0;
  --leaf: #6b8e5a;
  --border: #3d2f23;
  --border-bright: #5a4632;
  --booked: #6b8e5a;
  --tbd: #b39e87;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbf6ef;
    --panel: #ffffff;
    --panel-2: #f5ede0;
    --text: #2a1f17;
    --muted: #6b5a48;
    --border: #e8dcc8;
    --border-bright: #d4c4a8;
    --cream: #fffaf0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding-bottom: 80px;
}
h1, h2, h3, h4 { letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; }
h2 { font-size: clamp(22px, 4.5vw, 30px); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ochre); }
p { margin: 0 0 12px; }
a { color: var(--terracotta); text-decoration: none; transition: opacity 0.18s; }
a:hover { text-decoration: underline; opacity: 0.85; }

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* HERO — editorial / magazine cover treatment */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(217, 119, 87, 0.22) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 0% 100%, rgba(45, 90, 135, 0.22) 0%, transparent 50%),
    linear-gradient(170deg, var(--bg) 0%, var(--panel) 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 44px;
  isolation: isolate;
}
.hero-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle 600px at 50% -10%, rgba(232, 179, 74, 0.10), transparent 60%),
    radial-gradient(circle 500px at 90% 100%, rgba(217, 119, 87, 0.08), transparent 60%);
  filter: blur(40px);
  opacity: 0.9;
}
.hero-inner { position: relative; }

.hero .eyebrow {
  display: inline-block;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
  background: rgba(232, 179, 74, 0.08);
  border: 1px solid rgba(232, 179, 74, 0.32);
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero-title {
  /* Editorial display treatment — system serif, dramatic scale */
  font-family: ui-serif, "New York", Charter, "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: clamp(72px, 18vw, 168px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--cream);
  margin: 0 0 8px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, var(--cream) 0%, #d8c4a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@media (prefers-color-scheme: light) {
  .hero-title {
    /* In light mode, the cream-to-gold gradient washes out. Use a rich
       terracotta-to-deep-warm-brown gradient that has dramatic contrast. */
    color: #2a1f17;
    background: linear-gradient(160deg, #2a1f17 0%, #8a4a32 60%, #d97757 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 20px rgba(217, 119, 87, 0.18);
  }
  .hero-tagline { color: #8a5018; }
  .hero .subtitle { color: #5a4632; }
  .section-head h2 { color: #2a1f17; }
  .section-head { border-bottom-color: rgba(108, 80, 60, 0.2); }
  .dive-hero h2.dive-title { color: #2a1f17; }
  .day-card .day-title { color: #2a1f17; }
  .food-card h4 { color: #2a1f17; }
}
.hero-tagline {
  font-family: ui-serif, "New York", Charter, "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 3.6vw, 30px);
  letter-spacing: -0.01em;
  color: var(--ochre);
  margin: 0 0 18px;
  line-height: 1.2;
}
.hero .subtitle {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 0 16px;
}
.hero-divider {
  width: 100%;
  max-width: 460px;
  height: 1px;
  background: linear-gradient(90deg, var(--border-bright) 0%, transparent 100%);
  margin: 28px 0 22px;
}
.hero-meta { max-width: 560px; }

/* COUNTDOWN */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 22px;
  max-width: 460px;
}
.countdown-cell {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
}
.countdown-cell .num {
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 800;
  color: var(--terracotta);
  font-variant-numeric: tabular-nums;
}
.countdown-cell .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 2px;
}
.countdown-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

/* SECTIONS */
section { padding: 48px 0; border-bottom: 1px solid var(--border); }
section:last-of-type { border-bottom: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.section-head h2 {
  margin: 0;
  color: var(--cream);
  font-family: ui-serif, "New York", Charter, "Iowan Old Style", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.025em;
}
.section-head .meta {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* CARDS */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 14px;
  transition: border-color 0.18s, transform 0.18s;
}
.card.compact { padding: 14px 16px; }

/* DAYS */
.day-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-bright);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.day-card:hover { border-color: var(--border-bright); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.day-card.open { border-left-color: var(--terracotta); }
.day-card.today { border-left-color: var(--ochre); }
.day-card .day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  min-height: 64px;
}
.day-card .day-head:hover { background: var(--panel-2); }
.day-card .day-date {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.day-card .day-title { font-size: 18px; font-weight: 700; margin-top: 4px; color: var(--cream); letter-spacing: -0.01em; }
.day-card .day-toggle { color: var(--muted); font-size: 20px; transition: transform 0.2s; }
.day-card.open .day-toggle { transform: rotate(180deg); }
.day-card .day-body {
  padding: 0 18px 18px;
  border-top: 1px dashed var(--border);
  display: none;
}
.day-card.open .day-body { display: block; padding-top: 14px; }
.day-card.today .day-date::after {
  content: " · TODAY";
  color: var(--ochre);
}

/* EVENT ROWS */
.event {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  align-items: start;
}
.event:last-child { border-bottom: 0; }
.event .when {
  font-size: 13px;
  font-weight: 600;
  color: var(--ochre);
  font-variant-numeric: tabular-nums;
}
.event .what { font-size: 14px; }
.event .what .title { font-weight: 600; color: var(--text); }
.event .what .detail { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* BADGES */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge.booked { background: rgba(107, 142, 90, 0.16); color: #9cc28c; border: 1px solid rgba(107, 142, 90, 0.4); }
.badge.tbd { background: rgba(179, 158, 135, 0.12); color: var(--muted); border: 1px solid rgba(179, 158, 135, 0.3); }
.badge.flex { background: rgba(45, 90, 135, 0.16); color: #8db5db; border: 1px solid rgba(45, 90, 135, 0.4); }

/* MAP */
#map {
  height: 460px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  z-index: 0;
}
.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  min-height: 36px;
}
.filter-chip:hover { background: var(--panel); color: var(--text); }
.filter-chip.active { color: var(--cream); border-color: var(--terracotta); background: rgba(217, 119, 87, 0.12); }
.filter-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* BOOKED LIST */
.booked-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.booked-item:last-child { border-bottom: 0; }
.booked-item .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.booked-item .name { font-weight: 700; font-size: 15px; }
.booked-item .when { font-size: 12px; color: var(--ochre); font-weight: 600; }
.booked-item .detail { font-size: 13px; color: var(--muted); }
.booked-item .conf {
  display: inline-block;
  padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: var(--panel-2);
  color: var(--ochre);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.booked-item .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* LINKS / BUTTONS */
.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  min-height: 36px;
  white-space: nowrap;
}
.link-btn:hover { background: var(--panel); border-color: var(--border-bright); text-decoration: none; }
.link-btn.primary { background: rgba(217, 119, 87, 0.1); color: var(--terracotta); border-color: rgba(217, 119, 87, 0.35); }
.link-btn.primary:hover { background: rgba(217, 119, 87, 0.18); }

/* WEATHER */
.weather-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.weather-day {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: center;
}
.weather-day .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.weather-day .temps { font-size: 15px; font-weight: 700; margin-top: 4px; color: var(--text); }
.weather-day .uv { font-size: 11px; color: var(--ochre); margin-top: 2px; }
.weather-day .rain { font-size: 11px; color: var(--deep-blue); }

.weather-hourly {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}
.weather-hourly-track {
  display: flex;
  gap: 6px;
  padding-bottom: 8px;
  min-width: min-content;
}
.hour-cell {
  flex: 0 0 auto;
  width: 64px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
}
.hour-cell .h { color: var(--muted); font-weight: 600; }
.hour-cell .t { color: var(--text); font-weight: 700; font-size: 14px; margin: 2px 0; }
.hour-cell .uv { color: var(--ochre); font-size: 10px; }
.hour-cell .uv.med { color: #f0b04a; }
.hour-cell .uv.high { color: var(--terracotta); }
.hour-cell .uv.vhigh { color: #c43d3d; }
.hour-cell.day-divider { border-left: 2px solid var(--terracotta); }

/* READING */
.reading-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.reading-item:last-child { border-bottom: 0; }
.reading-item .title { font-weight: 600; font-size: 14px; }
.reading-item .src { font-size: 12px; color: var(--muted); margin-top: 2px; }
.reading-item .note { font-size: 13px; color: var(--text); margin-top: 6px; }

/* MOBILE BOTTOM NAV */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 20, 16, 0.78);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid rgba(91, 70, 50, 0.5);
  display: flex;
  z-index: 1000;
  padding: 4px 0 max(4px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  min-height: 44px;
  transition: color 0.18s;
}
.bottom-nav a:hover, .bottom-nav a:active { color: var(--cream); text-decoration: none; }
.bottom-nav a .icon { font-size: 17px; transition: transform 0.18s; }
.bottom-nav a:hover .icon { transform: translateY(-1px); }
@media (min-width: 768px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

/* MISC */
.note-box {
  background: rgba(232, 179, 74, 0.07);
  border: 1px solid rgba(232, 179, 74, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--cream);
  margin-bottom: 12px;
}
.note-box.info { background: rgba(45, 90, 135, 0.08); border-color: rgba(45, 90, 135, 0.3); color: #cfe0ee; }
.note-box.warn { background: rgba(217, 119, 87, 0.08); border-color: rgba(217, 119, 87, 0.3); color: #f1cdba; }

.errand-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 700px) {
  .errand-grid { grid-template-columns: 1fr 1fr; }
}
.errand-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.errand-card h4 { font-size: 14px; font-weight: 700; margin: 0 0 6px; color: var(--terracotta); text-transform: uppercase; letter-spacing: 0.06em; }
.errand-card p { font-size: 13px; color: var(--text); margin: 0 0 6px; }
.errand-card .meta { font-size: 12px; color: var(--muted); }

.travelers {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.travelers .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.2);
  flex-shrink: 0;
}

/* LEAFLET POPUP */
.leaflet-popup-content-wrapper {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border);
}
.leaflet-popup-tip { background: var(--panel) !important; }
.leaflet-popup-content { font-size: 13px !important; line-height: 1.4 !important; margin: 12px 14px !important; }
.leaflet-popup-content b { color: var(--cream); }
.leaflet-popup-content a { color: var(--terracotta); }

/* POST-TRIP PLACEHOLDER */
.placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-style: italic;
  border: 1px dashed var(--border-bright);
  border-radius: var(--radius-md);
  background: var(--panel-2);
}

/* UTILITIES */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt-2 { margin-top: 12px; }
.mb-2 { margin-bottom: 12px; }
.flex-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* SCROLLBAR (webkit) */
.weather-hourly::-webkit-scrollbar { height: 6px; }
.weather-hourly::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }
.weather-hourly::-webkit-scrollbar-track { background: transparent; }

/* DEEP DIVES — TAB BAR */
.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 22px;
  padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  border-bottom: 1px solid var(--border);
}
.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
.tab {
  position: relative;
  flex-shrink: 0;
  padding: 12px 18px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.18s;
  font-family: inherit;
  white-space: nowrap;
  min-height: 44px;
}
.tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--terracotta), var(--ochre));
  border-radius: 2px;
  transition: width 0.22s ease, left 0.22s ease;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--cream); }
.tab.active::after {
  width: calc(100% - 24px);
  left: 12px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* DEEP DIVE CONTENT */
.dive-hero {
  position: relative;
  background:
    radial-gradient(ellipse at top right, rgba(217, 119, 87, 0.10) 0%, transparent 60%),
    linear-gradient(155deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 18px;
  overflow: hidden;
}
.dive-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--terracotta) 0%, var(--ochre) 100%);
}
.dive-hero h3 {
  color: var(--ochre);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 12px;
}
.dive-hero h2.dive-title {
  font-family: ui-serif, "New York", Charter, "Iowan Old Style", Georgia, serif;
  font-size: clamp(28px, 5.5vw, 42px);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.dive-hero .lede {
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  max-width: 70ch;
}

.dive-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.dive-section:hover { border-color: var(--border-bright); }
.dive-section h3 {
  color: var(--ochre);
  font-size: 10px;
  letter-spacing: 0.18em;
  margin-bottom: 14px;
}
.dive-section p { color: var(--text); font-size: 14px; line-height: 1.65; }
.dive-section p:last-child { margin-bottom: 0; }

.fact-list { list-style: none; padding: 0; margin: 0; }
.fact-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}
.fact-list li:last-child { border-bottom: none; padding-bottom: 0; }
.fact-list li:first-child { padding-top: 0; }
.fact-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15);
}

/* IMAGE GALLERY */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.gallery figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--border);
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}
.gallery figure:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
  box-shadow: var(--shadow-md);
}
.gallery img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
}
.gallery .credit { color: var(--muted); font-size: 10px; margin-top: 4px; opacity: 0.8; }
.gallery .credit a { color: inherit; }

/* VIDEO EMBED */
.video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 12px;
  background: #000;
  border: 1px solid var(--border);
}
.video-frame iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* READING / LINK LIST */
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.link-list li:last-child { border-bottom: none; padding-bottom: 0; }
.link-list li:first-child { padding-top: 0; }
.link-list a { font-weight: 600; }
.link-list .src { font-size: 12px; color: var(--muted); margin-top: 2px; }
.link-list .note { font-size: 13px; color: var(--text); margin-top: 4px; line-height: 1.5; }

/* FOOD CARDS */
.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.food-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.food-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.food-card .cat-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border-radius: 999px;
  background: rgba(232, 179, 74, 0.12);
  color: var(--ochre);
  align-self: flex-start;
  border: 1px solid rgba(232, 179, 74, 0.3);
}
.food-card .cat-tag.coffee { background: rgba(217, 119, 87, 0.12); color: var(--terracotta); border-color: rgba(217, 119, 87, 0.3); }
.food-card .cat-tag.pastry { background: rgba(232, 179, 74, 0.12); color: var(--ochre); border-color: rgba(232, 179, 74, 0.3); }
.food-card .cat-tag.dinner { background: rgba(45, 90, 135, 0.14); color: #8db5db; border-color: rgba(45, 90, 135, 0.4); }
.food-card .cat-tag.street { background: rgba(107, 142, 90, 0.14); color: #9cc28c; border-color: rgba(107, 142, 90, 0.4); }
.food-card h4 {
  font-family: ui-serif, "New York", Charter, "Iowan Old Style", Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  margin: 2px 0;
  color: var(--cream);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.food-card .why { font-size: 13px; color: var(--text); line-height: 1.55; margin: 0; }
.food-card .addr { font-size: 11px; color: var(--muted); margin: 0; letter-spacing: 0.01em; }
.food-card .actions { margin-top: auto; padding-top: 6px; }
.food-card .actions .link-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-bright);
  border-radius: 999px;
  color: var(--terracotta);
  background: transparent;
  text-decoration: none;
  min-height: 32px;
  transition: background 0.18s, border-color 0.18s;
}
.food-card .actions .link-btn:hover { background: rgba(217, 119, 87, 0.1); border-color: var(--terracotta); text-decoration: none; }

/* PRACTICAL INFO PANEL */
.practical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.practical-cell {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.practical-cell .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.practical-cell .value { font-size: 14px; color: var(--text); font-weight: 500; line-height: 1.4; }

/* ============================================================
   LIGHT-MODE OVERRIDES — placed at END so they win the cascade.
   The base styles set color: var(--cream) on many headings, which
   maps to a near-white in light mode and renders invisibly on the
   light cream background. Force dark text where contrast matters.
   ============================================================ */
@media (prefers-color-scheme: light) {
  .hero-title {
    color: #2a1f17;
    background: linear-gradient(160deg, #2a1f17 0%, #8a4a32 60%, #d97757 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 20px rgba(217, 119, 87, 0.15);
  }
  .hero-tagline { color: #8a5018; }
  .hero .subtitle { color: #5a4632; }
  .section-head h2 { color: #2a1f17; }
  .section-head { border-bottom-color: rgba(108, 80, 60, 0.18); }
  .dive-hero { background: linear-gradient(155deg, #ffffff 0%, #faf2e6 100%); border-color: rgba(108, 80, 60, 0.18); }
  .dive-hero h2.dive-title { color: #2a1f17; }
  .dive-hero .lede { color: #3d2f23; }
  .day-card .day-title { color: #2a1f17; }
  .day-card { background: #ffffff; }
  .day-card:hover { box-shadow: 0 4px 16px rgba(108, 80, 60, 0.12); }
  .food-card { background: #faf2e6; }
  .food-card h4 { color: #2a1f17; }
  .food-card .why { color: #3d2f23; }
  .booked-item .name { color: #2a1f17; }
  .countdown-cell { background: #ffffff; }
  .countdown-cell .num { color: var(--terracotta); }
  .practical-cell { background: #faf2e6; }
  .practical-cell .value { color: #2a1f17; }
  .dive-section { background: #ffffff; }
  .tab.active { color: #2a1f17; }
  .tab:hover { color: #2a1f17; }
  .bottom-nav {
    background: rgba(255, 255, 255, 0.85);
    border-top-color: rgba(108, 80, 60, 0.2);
  }
  .bottom-nav a:hover, .bottom-nav a:active { color: #2a1f17; }
}
