/* ============================================================
   Portnoy Eurotrip 2026 — Stylesheet
   Design tokens from designTokens.md
   ============================================================ */

/* === CUSTOM PROPERTIES === */
:root {
  --bg:            #F5F0E8;
  --surface:       #FFFFFF;
  --dark:          #241F18;
  --navy:          #1E2A33;
  --ink:           #2A2620;
  --muted:         #9A9078;
  --border:        #E7E1D4;
  --gold:          #C9A85F;
  --amber:         #C2831A;
  --amber-bg:      #FEF6E7;
  --amber-border:  #E8A02E;
  --green:         #3E7A52;
  --green-border:  #B7D6BF;
  --orange:        #B5731F;
  --orange-border: #E3C58E;
  --code-bg:       #F1EEE5;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;
  --font-body:    'Archivo', system-ui, -apple-system, sans-serif;

  --page-x:    16px;
  --max-w:     480px;
  --card-r:    12px;
  --card-shadow: 0 1px 6px rgba(40,30,15,.08);
  --nav-h:     56px;
  --header-h:  52px;

  /* Current city — updated by JS when navigating */
  --city-accent: #3C5A73;
  --city-tint:   #EAF1F4;
  --city-ink:    #243440;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: #D9D3C8;
  color: var(--ink);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }

/* === PASSWORD SCREEN === */
#pw-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px var(--page-x);
  background: var(--bg);
}
.pw-card {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
}
.pw-hero {
  background: var(--navy);
  padding: 36px 28px 32px;
  text-align: center;
}
.pw-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.pw-title {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 10px;
}
.pw-dates {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #9BADB8;
  letter-spacing: 0.1em;
}
.pw-form {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pw-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 16px; /* 16px prevents iOS zoom on focus */
  color: var(--ink);
  background: #FAFAF8;
  outline: none;
  transition: border-color 0.18s;
  letter-spacing: 0.08em;
}
.pw-input:focus { border-color: var(--navy); }
.pw-input.err   { border-color: #B0492A; animation: shake 0.35s; }
.pw-btn {
  width: 100%;
  padding: 14px;
  background: var(--dark);
  color: #F3ECDD;
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: opacity 0.15s;
}
.pw-btn:active { opacity: 0.75; }
.gate-msg {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  padding: 0 28px 32px;
  margin: 0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}

/* === APP SHELL === */
#app {
  min-height: 100dvh;
}
/* === GLOBAL APP HEADER === */
#app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: var(--header-h);
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-x);
  z-index: 201;
}
/* Full-bleed navy bar on desktop */
#app-header::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--navy);
  z-index: -1;
}
#app-header-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
}
#app-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.app-header-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.app-header-clock {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em;
}

#content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 20px);
  background: var(--bg);
  min-height: 100dvh;
}

/* === BOTTOM NAV === */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: stretch;
  z-index: 200;
}
/* Full-bleed white behind nav on desktop */
#bottom-nav::before {
  content: '';
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: -1;
}
.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #B8B0A0;
  transition: color 0.15s;
}
.nav-icon { display: flex; align-items: center; justify-content: center; line-height: 1; }
.nav-icon svg { display: block; }
.nav-label { line-height: 1; }
.nav-tab.active { color: var(--navy); }

/* === SHARED CONTENT STYLES === */
.section-pad {
  padding: 0 var(--page-x);
}

/* Section hero header — used by Travel & Photos tabs (dark navy content-area header) */
.page-header {
  background: var(--navy);
  padding: 26px 20px 22px;
  position: relative;
}
.photos-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.page-header-title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 30px;
  font-weight: 600;
  color: #F3ECDD;
  line-height: 1.1;
  letter-spacing: 0.3px;
}
.page-header-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7A8E98;
  margin-top: 6px;
  line-height: 1.4;
}
.photos-upload-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(201,168,95,0.4);
  background: rgba(201,168,95,0.1);
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photos-upload-btn:active { background: rgba(201,168,95,0.2); }
.photos-preview-toggle {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.75);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photos-preview-toggle:active { background: rgba(255,255,255,0.12); }
.photos-preview-toggle.active {
  border-color: var(--gold);
  background: rgba(201,168,95,0.18);
  color: var(--gold);
}

/* === TODAY VIEW === */
.today-state-card {
  margin: 20px var(--page-x) 0;
  background: var(--surface);
  border-radius: var(--card-r);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.today-card-header {
  background: var(--city-accent);
  padding: 22px 22px 26px;
}
.today-card-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.today-card-headline {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  color: #FBF8F1;
  line-height: 1.1;
}
.today-card-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C7C1AE;
  margin-top: 8px;
}
.today-card-headline-final { font-style: italic; }

/* Last-day-only cards — today's flight home + a recap of the whole trip */
.flight-home-card {
  margin-top: 14px;
  background: var(--navy);
  border-radius: var(--card-r);
  padding: 18px 18px 16px;
}
.flight-home-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #7A8E98;
  margin-bottom: 10px;
}
.flight-home-route {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.flight-home-plane { color: var(--gold); font-size: 18px; }
.flight-home-route-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #F3ECDD;
}
.flight-home-flight {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}
.flight-home-arrival {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #7A8E98;
  margin-top: 3px;
}

.trip-recap-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-r);
  padding: 18px;
}
.trip-recap-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.trip-recap-headline {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}
.trip-recap-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.trip-recap-row:first-child { border-top: none; padding-top: 0; }
.trip-recap-flag { font-size: 15px; }
.trip-recap-city {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
  flex: 1;
}
.trip-recap-dates {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.today-card-progress {
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin-top: 18px;
  overflow: hidden;
}
.today-card-progress-fill {
  height: 100%;
  background: var(--gold);
}
.today-card-body {
  padding: 18px 20px 20px;
}
.today-card-day {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--city-accent);
  margin-bottom: 12px;
}
.today-section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.today-alerts { margin-bottom: 14px; }
.today-see-day {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--city-accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 4px;
}
.today-see-day:active { opacity: 0.8; }
.today-card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.today-phrases-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 20px;
  background: transparent;
  color: var(--color-text-secondary, #6b6355);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}
.today-phrases-link:active { opacity: 0.7; }

/* Countdown / before-trip card */
.countdown-card {
  margin: 16px var(--page-x) 0;
  background: var(--surface);
  border-radius: var(--card-r);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  padding: 28px 20px 22px;
  text-align: center;
}
.countdown-num {
  font-family: var(--font-display);
  font-size: 82px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  padding-bottom: 8px;
}
.countdown-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}
.countdown-divider {
  width: 36px;
  height: 1px;
  background: var(--border);
  margin: 16px auto;
}
.countdown-flight {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
}
.countdown-flight-icon { color: var(--gold); font-size: 16px; }
.countdown-flight-text {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--city-accent);
}
.countdown-route {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

/* Post-trip card */
.recap-card {
  margin: 20px var(--page-x) 0;
  background: var(--dark);
  border-radius: var(--card-r);
  padding: 28px 24px;
  text-align: center;
}
.recap-card-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}
.recap-card-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: #D9CFB8;
  margin-bottom: 16px;
}
.recap-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
}
.recap-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--gold);
}
.recap-stat-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

/* === VIEW TOGGLE (Map / List) === */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 14px var(--page-x) 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  width: fit-content;
}
.view-toggle-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-radius: 5px;
  padding: 5px 14px;
  transition: background 0.15s, color 0.15s;
}
.view-toggle-btn.active {
  background: var(--city-accent);
  color: #fff;
}

/* === ROUTE MAP CARD === */
.route-map-card {
  margin: 10px var(--page-x) 0;
  background: #080E14;
  border-radius: var(--card-r);
  overflow: hidden;
}
.route-map-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(201,168,95,0.12);
}
.route-map-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: #F3ECDD;
}
.route-map-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C9A85F;
}

/* Route overview on today view */
.route-overview {
  margin: 10px var(--page-x) 0;
  background: var(--surface);
  border-radius: var(--card-r);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.route-overview-title {
  padding: 14px 18px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.route-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.route-row:last-child { border-bottom: none; }
.route-row.today-row { background: var(--city-tint); }
.route-cc {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--city-accent);
  width: 28px;
  flex-shrink: 0;
}
.route-row.today-row .route-cc { color: var(--city-accent); }
.route-city {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}
.route-row.today-row .route-city { color: var(--city-accent); font-weight: 700; }
.route-here {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--city-accent);
  margin-left: 4px;
}
.route-dates {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* === ALERT PILLS === */
.alert-pill {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 14px;
  background: var(--amber-bg);
  border-left: 3px solid var(--amber-border);
  border-radius: 0 4px 4px 0;
  margin-bottom: 6px;
}
.alert-pill:last-child { margin-bottom: 0; }
.alert-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
  white-space: nowrap;
  flex-shrink: 0;
}
.alert-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: #5A4A2A;
  line-height: 1.4;
}

/* === NOTE BOX (amber warning) === */
.note-box {
  margin: 0 var(--page-x);
  padding: 12px 16px;
  background: var(--amber-bg);
  border-left: 3px solid var(--amber-border);
  border-radius: 0 4px 4px 0;
}
.note-box p {
  font-family: var(--font-body);
  font-size: 13px;
  color: #5A4A2A;
  line-height: 1.5;
}

/* === DAY INDEX VIEW === */
.days-city-header {
  padding: 10px var(--page-x);
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: var(--header-h);
  z-index: 10;
}
.days-city-flag { font-size: 20px; line-height: 1; }
.days-city-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}
.days-city-dates {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin-left: auto;
}
.day-index-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--page-x);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.day-index-row:active { background: #F5F2ED; }
.day-index-row.is-today {
  background: var(--city-tint);
}
/* Circle day-number badge */
.day-num-col { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.day-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--city-tint);
  border: 1.5px solid var(--city-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  color: var(--city-accent);
}
.day-index-row.is-today .day-circle {
  background: var(--city-accent);
  color: #fff;
}
.day-dow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.day-index-body { flex: 1; min-width: 0; }
.day-index-headline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 3px;
}
.day-index-oneliner {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.day-index-stay {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 5px;
}
.today-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--city-accent);
  color: #fff;
  border-radius: 10px;
  padding: 2px 7px;
  display: inline-block;
  margin-bottom: 4px;
}
.day-index-chevron {
  color: var(--border);
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* === DAY DETAIL VIEW — solid navy hero band === */
.day-detail-back-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  padding: 0;
  margin-bottom: 12px;
  display: block;
}
.day-detail-back-btn:active { opacity: 0.7; }

/* Key times strip — flat, no card chrome, vertical divider between cells */
.key-times-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.key-time-cell {
  padding: 14px 20px 13px;
  min-width: 0;
}
.key-time-cell:first-child { border-right: 1px solid var(--border); }
.key-time-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.key-time-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.key-time-detail {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-header {
  background: var(--navy);
  padding: 18px 22px 22px;
}
.day-header-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.day-header-city {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: #FBF8F1;
  line-height: 1.15;
}
.day-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.day-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  border-radius: 20px;
  padding: 3px 9px;
}
.day-badge-today {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.day-oneliner {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #C7C1AE;
  margin-top: 8px;
}

/* Section headings inside day detail */
.day-section {
  padding: 20px var(--page-x) 0;
}
.day-section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  /* color set inline = city accent */
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Transit legs */
.transit-leg {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.transit-leg:last-child { border-bottom: none; margin-bottom: 0; }
.transit-mode-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.transit-label {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.2;
}
.transit-detail {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Split day grid — flat, single vertical divider between columns instead
   of two separate boxed/tinted cards */
.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.split-card {
  padding: 0 14px 0 0;
}
.split-card + .split-card {
  padding: 0 0 0 14px;
  border-left: 1px solid var(--border);
}
.split-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.split-items { list-style: none; }
.split-items li {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.split-items li:last-child { border-bottom: none; }

/* Day blocks (timeline) */
.block-group {
  margin-bottom: 14px;
}
.block-group:last-child { margin-bottom: 0; }
.block-part {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.block-time {
  font-family: var(--font-mono);
  font-size: 13px;
  /* color set inline = city accent */
  margin-bottom: 6px;
  font-weight: 700;
}
.block-items { list-style: none; }
.block-items li {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: #3A352B;
  line-height: 1.55;
  padding: 3px 0 3px 14px;
  position: relative;
}
.block-items li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1.5px solid var(--city-accent);
  background: #fff;
}

/* Meals — flat row, thin bottom divider instead of a bordered card */
.meal-card {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.meal-card:last-child { border-bottom: none; margin-bottom: 0; }
.meal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.meal-kind-time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.meal-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.15;
  margin-top: 5px;
}
.meal-desc {
  font-family: var(--font-body);
  font-size: 13px;
  color: #5C5547;
  line-height: 1.55;
  margin-top: 4px;
}
.meal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.meal-meta-chip {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #F5F2EC;
  border-radius: 20px;
  padding: 3px 9px;
}

/* Featured meal (Findlerhof) — left accent bar instead of a full border box */
.meal-card.featured {
  border-left: 3px solid var(--city-accent);
  padding-left: 14px;
}
.featured-header-bar {
  background: var(--city-accent);
  padding: 7px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
}

/* Booking badges */
.badge {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 20px;
  padding: 3px 9px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-booked { color: var(--green); border-color: var(--green-border); }
.badge-arrange { color: var(--orange); border-color: var(--orange-border); }

/* Stay footer — navy, matching the hero band it bookends */
.stay-footer {
  background: var(--navy);
  padding: 22px var(--page-x) 24px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.stay-footer-icon { font-size: 22px; line-height: 1; }
.stay-footer-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.stay-footer-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: #F3ECDD;
}

/* Day prev/next navigation */
.day-nav-btns {
  display: flex;
  gap: 10px;
  padding: 16px var(--page-x);
  background: var(--bg);
}
.day-nav-btn {
  flex: 1;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 0.15s, color 0.15s;
}
.day-nav-btn:not(:disabled):active { background: #F5F2ED; }
.day-nav-btn:disabled { opacity: 0.35; cursor: default; }
.day-nav-btn.next { color: var(--city-accent); border-color: var(--city-accent); }

/* === TRAVEL VIEW === */
.travel-section-title {
  padding: 24px var(--page-x) 12px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.travel-leg {
  margin: 0 var(--page-x);
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border);
}
.travel-leg:last-child { border-bottom: none; }
.travel-leg-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 0 0;
}
.travel-leg-icon-col { flex-shrink: 0; }
.travel-mode-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--row-icon-bg, #F4EFE3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.travel-leg-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 6px;
}
.travel-leg-body { flex: 1; min-width: 0; }
.travel-route {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 4px;
}
.travel-detail {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.travel-leg-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 0;
  margin-top: 8px;
  gap: 8px;
  flex-wrap: wrap;
}
.travel-time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.travel-ref {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--orange);
  letter-spacing: 0.05em;
}
.travel-leg-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.travel-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--code-bg);
  border-radius: 20px;
  padding: 2px 8px;
}

/* Stays grid */
.stays-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 var(--page-x);
}
.stay-card {
  background: var(--surface);
  border-radius: var(--card-r);
  box-shadow: 0 2px 8px rgba(40,30,15,.07);
  padding: 14px 15px;
}
.stay-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 5px;
  line-height: 1.2;
}
.stay-city {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.3;
}
.stay-dates {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.stay-conf {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.03em;
}

/* Code pills */
.passes-list { padding: 0 var(--page-x); }
.pass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.pass-row:last-child { border-bottom: none; }
.pass-what {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--dark);
  font-weight: 500;
  flex: 1;
  min-width: 140px;
}
.pass-when {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.code-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #46566A;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 6px 11px;
  cursor: pointer;
  letter-spacing: 0.03em;
  border: none;
  transition: background 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.code-pill:active { background: #E0DBCF; }

/* === PHOTOS SECTION === */
.photos-section {
  padding: 24px var(--page-x) 0;
}
.photos-title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.photos-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.photos-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  text-decoration: none;
  transition: opacity 0.15s;
}
.photo-btn:active { opacity: 0.75; }
.photo-btn-primary {
  background: var(--dark);
  color: #F3ECDD;
}
.photo-btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}


/* Embed container */
.embed-container {
  border-radius: var(--card-r);
  overflow: hidden;
}

/* Strip publicalbum's black chrome — let images float on the page background */
.pa-carousel-widget {
  background: transparent !important;
}
.pa-gallery-container,
.pa-gallery,
.pa-gallery-image,
.pa-gallery-image-container,
[class*="pa-gallery"] {
  background: transparent !important;
}
/* Hide the title/description bar publicalbum renders above the image */
.pa-gallery-header,
.pa-gallery-footer,
[class*="pa-gallery-header"],
[class*="pa-gallery-footer"] {
  display: none !important;
}
.embed-placeholder {
  text-align: center;
  padding: 40px 24px;
}
.embed-placeholder-icon { font-size: 40px; margin-bottom: 12px; }
.embed-placeholder-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.embed-placeholder-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.embed-placeholder-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  background: var(--code-bg);
  border-radius: 4px;
  padding: 4px 8px;
  margin-top: 8px;
  display: inline-block;
}

/* Actual embed — when pasted, fill the container */
.embed-container iframe,
.embed-container > div {
  width: 100%;
}

/* === TOAST === */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: #F3ECDD;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 10px 18px;
  border-radius: 20px;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
}
#toast.show { opacity: 1; }

/* === UTILITY === */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px var(--page-x);
}

/* Desktop centering */
@media (min-width: 520px) {
  #pw-screen { background: #D6CEBC; }
  .page-header,
  .day-detail-back,
  #content > * { /* centered naturally by max-width on #content */ }
  #bottom-nav { border-radius: 12px 12px 0 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   ADMIN SECTION (home screen, only when unlocked)
   ============================================================ */
.admin-section {
  margin: 28px var(--page-x) 0;
  padding: 16px;
  border-radius: var(--card-r);
  background: var(--surface);
  border: 1px dashed var(--border);
}
.admin-section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.admin-action-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.admin-action-btn + .admin-action-btn { margin-top: 10px; }
.admin-settings-panel + .admin-action-btn { margin-top: 16px; }
.admin-signout-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
}
.admin-signing {
  text-align: center;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.admin-settings-panel {
  margin-top: 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.admin-settings-summary {
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.admin-settings-body { padding: 0 14px 14px; }
.admin-inspector {
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.admin-inspector-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.admin-inspector-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.admin-inspector-row:last-child {
  border-bottom: none;
}
.admin-inspector-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.admin-inspector-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dark);
  text-align: right;
}
.admin-rule-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  opacity: 0.38;
}
.admin-rule-row:last-child { border-bottom: none; }
.admin-rule-firing { opacity: 1; }
.admin-rule-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  margin-top: 4px;
}
.admin-rule-firing .admin-rule-dot {
  background: #2D9E5F;
}
.admin-rule-body { flex: 1; }
.admin-rule-desc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dark);
  margin-bottom: 2px;
}
.admin-rule-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
}
.admin-share-links {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 10px;
}
.admin-share-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  width: 46px;
}
.admin-share-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dark);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-copy-btn {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 7px;
  border: none;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

/* ============================================================
   PHOTOS STREAM TAB
   ============================================================ */
.photos-stream {
  padding: 16px var(--page-x) 0;
}
.stream-loading,
.stream-empty {
  padding: 48px 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
}
.stream-load-more {
  padding: 24px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
/* — Feed item header row (title left, date right) — */
.feed-item-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 var(--page-x);
  margin-bottom: 10px;
}
.feed-item-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}
.feed-item-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #A89E84;
  flex-shrink: 0;
  margin-left: 10px;
}
.feed-item-uploader {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #A89E84;
  margin-left: 10px;
  flex-shrink: 0;
}
/* ===================================================
   PHOTOS — masonry (group by day/moment, not uploader)
   =================================================== */
.photo-moment {
  position: relative;
  padding: 16px 5px 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photo-moment-header {
  padding: 4px 10px 10px;
}
.photo-moment-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.photo-moment-caption {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.15;
}
.photo-moment-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.photo-tile {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}
.photo-tile-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-tile-lead { margin: 0 5px 4px; }
.photo-grid-1 { margin: 0 5px 4px; }
.photo-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 5px 4px;
}
.photo-grid-3 {
  display: grid;
  grid-template-columns: 58% 1fr;
  gap: 4px;
  margin: 0 5px 4px;
}
.photo-grid-3-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
/* "See all N photos" tile — shown in place of further thumbnails once a
   group exceeds the preview cap. Ghost markers carry zero visual footprint
   (no image) — they only exist so the lightbox's swipe sequence still
   includes every photo in the group. */
.photo-see-all {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 10px);
  height: 56px;
  margin: 0 5px 4px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 4px;
  color: var(--navy);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.photo-ghost-marker { display: none; }
/* Consolidated attribution — one stacked-avatar byline per moment, below
   the whole photo block, instead of per-photo overlays. */
.photo-moment-byline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.photo-avatar-group { display: flex; }
.photo-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.photo-avatar-stack { border: 1.5px solid var(--bg); }
.photo-byline-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
/* — Standalone singles — gold-bordered featured card — */
.feed-single {
  margin: 16px 5px 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feed-single-frame {
  position: relative;
  border: 2px solid var(--gold);
  border-radius: 2px;
  padding: 6px;
  margin: 0 10px;
}
.feed-single-media {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 1px;
}
/* — Shared date label — */
.feed-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 2px 0;
  text-transform: uppercase;
}
/* — Feed item header inner layout — */
.feed-item-header-text {
  display: flex;
  align-items: baseline;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  gap: 2px 8px;
}
/* — Admin buttons row in feed headers — */
.feed-admin-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 8px;
}
.feed-admin-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(201,168,95,0.35);
  background: rgba(201,168,95,0.08);
  color: rgba(201,168,95,0.85);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.feed-admin-btn-add {
  font-size: 18px;
  font-weight: 300;
  color: rgba(120,200,120,0.85);
  border-color: rgba(120,200,120,0.35);
  background: rgba(120,200,120,0.07);
}
.feed-admin-btn-del {
  color: rgba(220,100,80,0.85);
  border-color: rgba(220,100,80,0.35);
  background: rgba(220,100,80,0.07);
}
/* — Inline edit form — */
.feed-edit-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.feed-edit-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,168,95,0.35);
  border-radius: 6px;
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 6px 8px;
  outline: none;
}
.feed-edit-input:focus { border-color: rgba(201,168,95,0.7); }
.feed-edit-input-sm { font-size: 12px; }
.feed-edit-actions {
  display: flex;
  gap: 6px;
}
.feed-edit-save,
.feed-edit-cancel {
  padding: 5px 12px;
  border-radius: 6px;
  border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}
.feed-edit-save {
  background: rgba(201,168,95,0.85);
  color: #0d1117;
  font-weight: 700;
}
.feed-edit-cancel {
  background: rgba(255,255,255,0.08);
  color: var(--muted);
}
/* — Per-photo admin controls inside group slides — */
.feed-slide-admin {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 4px;
  background: rgba(8,14,20,0.72);
}
.feed-slide-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.feed-slide-del {
  background: rgba(220,80,60,0.4);
  color: #fff;
}
/* — Delete button — */
.feed-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   UPLOAD PANEL
   ============================================================ */
.upload-panel {
  padding: 20px var(--page-x) 24px;
}
.upload-pick-label {
  display: block;
  cursor: pointer;
}
.upload-pick-label input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.upload-pick-btn {
  display: block;
  text-align: center;
  padding: 14px 24px;
  border-radius: 12px;
  border: 2px dashed var(--border);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--city-accent, var(--dark));
  background: var(--surface);
  transition: background 0.15s;
}
.upload-pick-btn:active { background: var(--tint); }
.upload-previews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}
.upload-preview-item {
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}
.upload-preview-media {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}
.upload-item-info {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 3px;
  flex-wrap: wrap;
}
.upload-item-size {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.upload-size-warning {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #B5731F;
  background: #F6EEE0;
  padding: 2px 5px;
  border-radius: 4px;
}
.upload-item-bar-wrap {
  height: 4px;
  background: var(--border);
  margin: 2px 8px 0;
  border-radius: 2px;
  overflow: hidden;
}
.upload-item-bar {
  height: 100%;
  width: 0%;
  background: var(--dark);
  border-radius: 2px;
  transition: width 0.15s ease;
}
.upload-item-status {
  padding: 3px 8px 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}
.upload-submit-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.upload-submit-btn:disabled { opacity: 0.5; }
.upload-progress-area {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  min-height: 20px;
}
/* Upload decision tree */
.upload-step {
  margin-bottom: 16px;
}
.upload-choice-btn {
  display: block;
  width: 100%;
  padding: 16px;
  margin-bottom: 10px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.upload-choice-btn:active { background: var(--tint); border-color: var(--city-accent, var(--dark)); }
.upload-group-title-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--dark);
  margin-bottom: 12px;
  outline: none;
}
.upload-group-title-input:focus { border-color: var(--city-accent, var(--dark)); }
.upload-next-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
/* Upload date row */
.upload-date-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.upload-date-select {
  flex: 1;
  padding: 12px 10px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--dark);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.upload-date-select:focus { border-color: var(--city-accent, var(--dark)); }
/* feed-group-date now handled by .feed-item-date */
/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#lightbox[hidden] { display: none; }
#lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 2001;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lightbox-inner {
  width: 100vw;
  height: 100dvh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-overflow-scrolling: touch;
}
#lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 100dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
}
#lightbox-img[hidden] { display: none; }
/* Lightbox prev / next nav buttons */
.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2001;
  width: 44px;
  height: 72px;
  border: none;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 0.2s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-prev { left: 0;  border-radius: 0 8px 8px 0; }
.lightbox-next { right: 0; border-radius: 8px 0 0 8px; }
.lightbox-nav:active { background: rgba(255,255,255,0.18); }

/* Lightbox group title card — a bounded, rounded card (not full-bleed) so it
   reads as an interstitial rather than a broken/cropped photo. */
#lb-group-card {
  position: relative;
  width: min(88vw, 440px);
  max-height: min(76dvh, 600px);
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  background-size: cover;
  background-position: center top;
  display: flex;
  align-items: flex-end;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}
#lb-group-card[hidden] { display: none; }
#lb-group-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 55%, rgba(0,0,0,0.08) 100%);
}
.lb-gc-content {
  position: relative;
  z-index: 1;
  padding: 0 22px 28px;
  width: 100%;
}
.lb-gc-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}
.lb-gc-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  margin-bottom: 14px;
}
.lb-gc-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

/* ===================================================
   MEAL ACTION BUTTONS (v10)
   =================================================== */
.meal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.meal-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.12s;
}
.meal-action-btn:active { opacity: 0.7; }
.meal-action-map {
  background: rgba(201,168,95,0.12);
  border: 1px solid rgba(201,168,95,0.35);
  color: var(--gold);
}
.meal-action-menu {
  background: rgba(100,180,130,0.1);
  border: 1px solid rgba(100,180,130,0.3);
  color: rgba(100,200,140,0.9);
}

/* ===================================================
   CONDUCTOR OVERLAY (v10)
   =================================================== */
.conductor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 8px 0 0;
  padding: 13px var(--page-x);
  border-top: 1px solid var(--border);
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.conductor-row-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.conductor-row-label {
  flex: 1;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}
.conductor-row-chevron { color: var(--border); font-size: 16px; flex-shrink: 0; }
.conductor-row:active { background: var(--amber-bg); }

#conductor-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #0d1420;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s;
  overflow: hidden;
}
#conductor-overlay[hidden] { display: none; }
#conductor-overlay.conductor-ov-visible { opacity: 1; }

.conductor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.conductor-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.conductor-close-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.conductor-close-btn:active { background: rgba(255,255,255,0.2); }

#conductor-inner {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.conductor-pass {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 20px;
}
.conductor-pass-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}
.conductor-pass-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}
.conductor-pass-code {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  font-family: 'Space Mono', monospace;
  line-height: 1.3;
  word-break: break-word;
  margin-bottom: 16px;
}
.conductor-pdf-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  background: rgba(201,168,95,0.15);
  border: 1px solid rgba(201,168,95,0.4);
  border-radius: 8px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.conductor-pdf-btn:active { background: rgba(201,168,95,0.25); }
.conductor-pdf-btn:disabled { opacity: 0.6; cursor: default; }
.conductor-pdf-stub {
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.25);
  font-size: 13px;
  text-align: center;
}

/* ===================================================
   PHRASES PAGE (v9)
   =================================================== */
.phrases-page { padding: 0 0 16px; }

.phrases-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 8px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.phrases-back-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  white-space: nowrap;
}
.phrases-header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  flex: 1;
}

/* Language tab bar */
.phrases-tab-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.phrases-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  flex-shrink: 0;
}
.phrases-tab-active {
  background: rgba(201,168,95,0.12);
  border-color: var(--gold);
  color: var(--navy);
}
.phrases-tab-flag { font-size: 16px; }
.phrases-tab-label { font-size: 13px; }
.phrases-here-badge {
  font-size: 9px;
  font-weight: 700;
  background: var(--gold);
  color: #0d1117;
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.phrases-lang-cities-sub {
  font-size: 11px;
  color: var(--muted);
  padding: 6px 16px 0;
  letter-spacing: 0.03em;
}

.phrases-category { padding: 0 16px; }
.phrases-cat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 0 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 4px;
}
.phrases-category:first-of-type .phrases-cat-label { border-top: none; }

/* Phrase card */
.phrase-card {
  padding: 12px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.phrase-card:active { background: rgba(201,168,95,0.1); border-color: rgba(201,168,95,0.3); }
.phrase-card-en {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.phrase-card-local {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  font-family: 'Space Mono', monospace;
  word-break: break-word;
  margin-bottom: 6px;
}
.phrase-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.phrase-card-phonetic {
  font-size: 15px;
  color: var(--gold);
  font-style: italic;
  line-height: 1.3;
  flex: 1;
}
.phrase-speak-btn {
  background: none;
  border: 1px solid rgba(201,168,95,0.25);
  border-radius: 8px;
  color: var(--gold);
  font-size: 16px;
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.phrase-speak-btn:active { background: rgba(201,168,95,0.15); }

/* Situation compact card (in phrases tab) */
/* Section dividers */
.phrases-section { padding: 0 16px; margin-top: 4px; }
.phrases-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 0 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* Situation accordion */
.sit-accordion {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.sit-accordion-open { border-color: rgba(201,168,95,0.25); }
.sit-accordion-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: none;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.sit-accordion-open .sit-accordion-hd { background: rgba(201,168,95,0.06); }
.sit-accordion-hd:active { background: rgba(201,168,95,0.1); }
.sit-accordion-hd-body { flex: 1; }
.sit-accordion-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.sit-accordion-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sit-accordion-icon {
  font-size: 20px;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}
.sit-accordion-body { padding: 0 16px 16px; }
.sit-tip {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  border-left: 2px solid var(--gold);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  margin: 12px 0 16px;
}
.sit-step {
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sit-step:last-of-type { border-bottom: none; }
.sit-you-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sit-local {
  font-size: clamp(18px, 4.5vw, 24px);
  font-weight: 700;
  color: var(--navy);
  font-family: 'Space Mono', monospace;
  word-break: break-word;
  line-height: 1.3;
  margin-bottom: 8px;
}
.sit-phonetic {
  font-size: clamp(14px, 3.5vw, 17px);
  color: var(--gold);
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 5px;
}
.sit-en { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.sit-speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201,168,95,0.08);
  border: 1px solid rgba(201,168,95,0.25);
  border-radius: 20px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.sit-speak-btn:active { background: rgba(201,168,95,0.2); }
.sit-context {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sit-context:last-child { border-bottom: none; }

/* Phrases tile on Today tab */
.phrases-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 16px 0;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,95,0.2);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.phrases-tile:active { background: rgba(201,168,95,0.08); }
.phrases-tile-icon { font-size: 22px; }
.phrases-tile-body { flex: 1; }
.phrases-tile-label { font-size: 15px; font-weight: 700; color: var(--navy); }
.phrases-tile-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.phrases-tile-arrow { font-size: 18px; color: var(--gold); opacity: 0.7; }

/* Phrases row on Travel tab */
.travel-phrases-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 16px 0;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,95,0.2);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.travel-phrases-row:active { background: rgba(201,168,95,0.08); }
.travel-phrases-icon { font-size: 22px; }
.travel-phrases-body { flex: 1; }
.travel-phrases-label { font-size: 15px; font-weight: 700; color: var(--navy); }
.travel-phrases-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.travel-phrases-arrow { font-size: 18px; color: var(--gold); opacity: 0.7; }

/* Phrases link on day detail */
.day-phrases-link {
  margin: 16px 16px 0;
  padding: 11px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,95,0.15);
  border-radius: 10px;
  font-size: 14px;
  color: var(--gold);
  cursor: pointer;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.day-phrases-link:active { background: rgba(201,168,95,0.08); }

/* ============================================================
   TRIP BUILDER — desktop admin authoring UI

   Mobile (<768px): sidebar (day list) and pane (editor) are separate
   full-width "pages" — CSS hides whichever isn't active, keyed off
   #content[data-page]. Same markup renders both regardless of viewport;
   only visibility/layout changes.

   Desktop (>=768px): #content widens past the app's normal 480px mobile
   shell and the two become a real side-by-side sidebar + detail pane,
   like a dedicated admin tool.
   ============================================================ */
#content[data-page="builder"] .builder-pane,
#content[data-page="builder-day"] .builder-sidebar {
  display: none;
}
@media (min-width: 768px) {
  #content[data-page="builder"],
  #content[data-page="builder-day"] {
    max-width: 1100px;
  }
  .builder-shell { display: flex; align-items: flex-start; }
  .builder-sidebar {
    display: block !important;
    width: 340px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    min-height: calc(100dvh - var(--header-h));
  }
  .builder-pane {
    display: block !important;
    flex: 1;
    min-width: 0;
    padding-left: 28px;
  }
  .builder-back-btn { display: none; } /* sidebar is always visible on desktop */
}
.builder-list-row-active {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}
.builder-warning {
  margin: 0 var(--page-x) 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  color: var(--amber);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
}
.builder-warning-muted {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
}
.builder-warning code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(0,0,0,0.06);
  padding: 1px 5px;
  border-radius: 4px;
}
.builder-section-divider {
  margin: 28px var(--page-x) 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
.builder-list, .builder-simple-list { margin: 0 var(--page-x); }
.builder-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--card-r);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}
.builder-list-n {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
  width: 52px;
}
.builder-list-body { flex: 1; min-width: 0; }
.builder-list-headline {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
}
.builder-list-sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.builder-edit-btn, .builder-back-btn, .builder-add-btn, .builder-save-btn, .builder-cancel-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.builder-back-btn {
  border: none;
  background: none;
  padding: 0 0 8px;
  color: var(--muted);
}
.builder-add-btn {
  display: block;
  margin: 10px var(--page-x) 0;
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}
.builder-save-btn {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}
.builder-simple-row {
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: var(--card-r);
  background: var(--surface);
  border: 1px solid var(--border);
}
.builder-simple-view {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink);
}
.builder-simple-field b { color: var(--muted); font-weight: 600; }
.builder-day-fields {
  margin: 0 var(--page-x) 8px;
  padding: 16px;
  border-radius: var(--card-r);
  background: var(--surface);
  border: 1px solid var(--border);
}
.builder-field-label {
  display: block;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.builder-field-input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: normal;
}
textarea.builder-field-input { min-height: 64px; resize: vertical; }
.builder-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
  letter-spacing: normal;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
}
.builder-form-actions { display: flex; gap: 8px; margin-top: 4px; }
.builder-item-list { margin: 0 var(--page-x); }
.builder-item-row {
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: var(--card-r);
  background: var(--surface);
  border: 1px solid var(--border);
}
.builder-item-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink);
}
.builder-item-summary > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.builder-item-actions { display: flex; gap: 4px; flex-shrink: 0; }
.builder-item-actions button {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.builder-item-del { color: #B5473A; border-color: rgba(181,71,58,0.3); }
.builder-item-form { display: flex; flex-direction: column; }
.builder-status-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 5px;
  letter-spacing: 0.03em;
}
.builder-status-changed { background: var(--amber-bg); color: var(--amber); }
.builder-status-skipped { background: rgba(181,71,58,0.1); color: #B5473A; }

/* — Item status tags shown to every viewer on the normal day-detail view — */
.item-status-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.item-status-changed { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.item-status-skipped { background: rgba(181,71,58,0.08); color: #B5473A; border: 1px solid rgba(181,71,58,0.25); }
.item-skipped { opacity: 0.55; }
.item-skipped .block-items, .item-skipped .meal-name, .item-skipped .meal-desc { text-decoration: line-through; }

/* — Mobile Quick Edit panel, appended to the normal day-detail view — */
.quick-edit-panel {
  margin: 24px var(--page-x) 0;
  border-radius: var(--card-r);
  border: 1px dashed var(--border);
  background: var(--surface);
  overflow: hidden;
}
.quick-edit-summary {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.quick-edit-body { padding: 4px 0 16px; }
.quick-edit-body .builder-section-divider,
.quick-edit-body .builder-item-list,
.quick-edit-body .builder-add-btn { margin-left: 16px; margin-right: 16px; }

/* Flag icons — Twemoji SVGs, sized relative to the surrounding text via
   1em so they drop into existing font-size-based layouts unchanged. */
.flag-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  display: inline-block;
}

/* ============================================================
   DAY PHOTOS — "From this day" thumb strip on Day Detail
   ============================================================ */
.day-photos-wrap {
  position: relative;
}
.day-photos-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.day-photos-strip::-webkit-scrollbar { display: none; }
.day-photo-thumb {
  height: 110px;
  width: auto;
  flex: 0 0 auto;
  border-radius: var(--card-r);
  object-fit: cover;
  cursor: pointer;
}

/* Prev/next arrows — pointer devices only. On touch, swiping the strip
   already works, and there's no hover to discover a tap-only arrow. */
.day-photos-nav { display: none; }
@media (hover: hover) and (pointer: fine) {
  .day-photos-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.15s ease, opacity 0.15s ease;
  }
  .day-photos-nav:hover { background: rgba(0, 0, 0, 0.75); }
  .day-photos-nav:disabled { opacity: 0; pointer-events: none; }
  .day-photos-nav[data-day-photos-nav="prev"] { left: -4px; }
  .day-photos-nav[data-day-photos-nav="next"] { right: -4px; }
}
