/* =========================================================
   Dodecanese 2026 — Sailing Guide
   Modern, mobile-first, app-like.
   White cards on light shell. Strong elevation hierarchy.
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Surfaces */
  --bg: #F4F6FA;          /* page shell — cool off-white */
  --surface: #FFFFFF;     /* card */
  --surface-2: #FAFBFD;   /* subtle alt surface */
  --surface-3: #EEF1F6;   /* deep alt (table headers, key cards) */

  /* Ink */
  --ink: #0F172A;         /* primary text  (slate-900) */
  --ink-soft: #334155;    /* secondary    (slate-700) */
  --ink-mute: #64748B;    /* tertiary     (slate-500) */
  --ink-faint: #94A3B8;   /* hints        (slate-400) */

  /* Lines */
  --line: #E2E8F0;        /* default border (slate-200) */
  --line-soft: #F1F5F9;   /* faint dividers (slate-100) */

  /* Status & accents */
  --primary: #0F172A;
  --planned: #F59E0B;     /* amber-500 */
  --planned-soft: #FEF3C7;
  --arrived: #059669;     /* emerald-600 */
  --arrived-soft: #D1FAE5;
  --skipped: #94A3B8;     /* slate-400 */
  --warn: #DC2626;        /* red-600 */
  --warn-soft: #FEE2E2;
  --info: #2563EB;        /* blue-600 */
  --info-soft: #DBEAFE;
  --good: #059669;
  --good-soft: #D1FAE5;

  /* Per-island accent colors */
  --rhodes: #1E3A8A;          /* blue-900 */
  --rhodes-soft: #DBEAFE;
  --symi: #C84B30;
  --symi-soft: #FBE0D8;
  --nisyros: #5A6F2E;
  --nisyros-soft: #E5EBD3;
  --kos: #0E7490;             /* cyan-700 */
  --kos-soft: #CFFAFE;
  --tilos: #B45309;           /* amber-700 */
  --tilos-soft: #FED7AA;

  /* Typography */
  --font-serif: 'Fraunces', 'Georgia', 'Cambria', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --fs-base: 16px;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-tiny: 0.75rem;
  --fs-lead: 1.125rem;
  --fs-h3: 1.25rem;
  --fs-h2: 1.5rem;
  --fs-h1: 2rem;
  --fs-display: 2.25rem;
  --lh: 1.6;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px;  --s-4: 16px;
  --s-5: 20px; --s-6: 28px; --s-7: 40px;  --s-8: 56px;

  /* Radii / shadows — softer, app-like */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 16px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-3: 0 10px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-4: 0 25px 50px -12px rgba(15, 23, 42, 0.20);

  /* Layout */
  --header-h: 56px;
  --nav-h: 52px;
  --max-content: 980px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms;
  --t-med: 250ms;
  --t-slow: 400ms;
}

/* SUN MODE — pure black-on-white, fatter weights */
[data-theme='sun'] {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-3: #F0F0F0;
  --ink: #000000;
  --ink-soft: #000000;
  --ink-mute: #333333;
  --ink-faint: #555555;
  --line: #000000;
  --line-soft: #888888;
  --shadow-1: 0 0 0 1px #000000;
  --shadow-2: 0 0 0 2px #000000;
  --shadow-3: 0 0 0 2px #000000;
  --fs-base: 17px;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html {
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--nav-h) + 8px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--info); text-decoration: none; word-break: break-word; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-5) 0; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 var(--s-3);
  letter-spacing: -0.015em;
  color: var(--ink);
}
p { margin: 0 0 var(--s-4); overflow-wrap: anywhere; }

/* ---------- 3. ACCESSIBILITY ---------- */
.skip-link {
  position: absolute; top: -100px; left: var(--s-4);
  background: var(--ink); color: #fff;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-1);
  z-index: 1000;
}
.skip-link:focus { top: var(--s-4); }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 4. APP HEADER ---------- */
.app-header {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--s-3);
  padding: 0 var(--s-4);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: var(--s-2); flex: 1 1 auto; min-width: 0; }
.brand-mark { font-size: 1.3rem; line-height: 1; }
.brand-text {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin: 0; font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.menu-btn {
  width: 40px; height: 40px;
  background: none; border: none;
  display: flex; flex-direction: column; gap: 4px;
  align-items: center; justify-content: center;
  border-radius: var(--r-1);
}
.menu-btn span {
  display: block; width: 20px; height: 2px;
  background: var(--ink); border-radius: 2px;
}
.header-actions { display: flex; gap: var(--s-2); align-items: center; flex-shrink: 0; }
.icon-btn {
  width: 40px; height: 40px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn:active { transform: scale(0.96); }
.icon-btn[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- 5. CHAPTER NAV ---------- */
.chapter-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  height: var(--nav-h);
  display: flex; gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chapter-nav::-webkit-scrollbar { display: none; }
.chapter-tab {
  flex: 0 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: var(--fs-small);
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease);
}
.chapter-tab:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.chapter-tab.is-active {
  background: var(--ink); color: #fff; border-color: var(--ink);
  box-shadow: var(--shadow-1);
}
.tab-icon { font-size: 0.8em; }
.chapter-tab[data-color='rhodes'] .tab-icon  { color: var(--rhodes); }
.chapter-tab[data-color='symi'] .tab-icon    { color: var(--symi); }
.chapter-tab[data-color='nisyros'] .tab-icon { color: var(--nisyros); }
.chapter-tab[data-color='kos'] .tab-icon     { color: var(--kos); }
.chapter-tab[data-color='tilos'] .tab-icon   { color: var(--tilos); }
.chapter-tab.is-active[data-color='rhodes']  { background: var(--rhodes);  border-color: var(--rhodes);  }
.chapter-tab.is-active[data-color='symi']    { background: var(--symi);    border-color: var(--symi);    }
.chapter-tab.is-active[data-color='nisyros'] { background: var(--nisyros); border-color: var(--nisyros); }
.chapter-tab.is-active[data-color='kos']     { background: var(--kos);     border-color: var(--kos);     }
.chapter-tab.is-active[data-color='tilos']   { background: var(--tilos);   border-color: var(--tilos);   }
.chapter-tab.is-active .tab-icon { color: inherit; }

/* ---------- 6. MAIN LAYOUT ---------- */
.app-main {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--s-5) var(--s-4) var(--s-7);
}
.loading-screen {
  text-align: center; padding: var(--s-8) var(--s-4);
  color: var(--ink-mute);
}
.loading-anchor { font-size: 3rem; animation: rock 2s var(--ease) infinite; display: inline-block; }
@keyframes rock { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

/* ---------- 7. CHAPTERS (page-style routing) ---------- */
.chapter {
  margin-bottom: var(--s-7);
}
/* Inactive pages are removed from the layout entirely */
.chapter[hidden] { display: none !important; }
/* Active page fades in */
.chapter:not([hidden]) {
  animation: pageIn var(--t-med) var(--ease) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chapter-header {
  display: flex; align-items: flex-start; gap: var(--s-4);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-4);
  border-bottom: 3px solid var(--line);
}
.chapter[data-color='rhodes']  .chapter-header { border-color: var(--rhodes); }
.chapter[data-color='symi']    .chapter-header { border-color: var(--symi); }
.chapter[data-color='nisyros'] .chapter-header { border-color: var(--nisyros); }
.chapter[data-color='kos']     .chapter-header { border-color: var(--kos); }
.chapter[data-color='tilos']   .chapter-header { border-color: var(--tilos); }

.chapter-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
  margin: 0 0 var(--s-1);
}
.chapter h1, .chapter-title {
  font-size: var(--fs-display);
  margin: 0; font-weight: 700;
  letter-spacing: -0.025em;
}
.chapter[data-color='rhodes']  .chapter-title { color: var(--rhodes); }
.chapter[data-color='symi']    .chapter-title { color: var(--symi); }
.chapter[data-color='nisyros'] .chapter-title { color: var(--nisyros); }
.chapter[data-color='kos']     .chapter-title { color: var(--kos); }
.chapter[data-color='tilos']   .chapter-title { color: var(--tilos); }

.chapter-lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  margin-top: var(--s-2);
}

/* ---------- 8. SECTIONS ---------- */
.section { margin-bottom: var(--s-7); }
.section h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--s-2);
  font-weight: 700;
}
.section-sub {
  color: var(--ink-mute);
  font-size: var(--fs-small);
  margin: 0 0 var(--s-4);
}

/* ---------- 9. CARDS ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.card:hover { box-shadow: var(--shadow-2); }
.card + .card { margin-top: var(--s-4); }
.card-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  margin: 0 0 var(--s-2);
  font-weight: 600;
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.card-grid > * { min-width: 0; }   /* critical: prevents grid overflow on long content */

@media (min-width: 720px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 10. KEY CARD (FACTS) ---------- */
.key-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  padding: var(--s-5);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  margin-bottom: var(--s-5);
}
.chapter[data-color='rhodes']  .key-card { border-left-color: var(--rhodes); }
.chapter[data-color='symi']    .key-card { border-left-color: var(--symi); }
.chapter[data-color='nisyros'] .key-card { border-left-color: var(--nisyros); }
.chapter[data-color='kos']     .key-card { border-left-color: var(--kos); }
.chapter[data-color='tilos']   .key-card { border-left-color: var(--tilos); }

.key-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-3);
}
@media (min-width: 600px) {
  .key-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.key-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.key-label {
  font-size: var(--fs-tiny);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
}
.key-value {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  word-break: break-word;
}
.key-value a { color: inherit; }

/* ---------- 11. INFO BOXES ---------- */
.info-box {
  border-radius: var(--r-2);
  padding: var(--s-4);
  margin: var(--s-4) 0;
  border-left: 4px solid var(--info);
  background: var(--info-soft);
  color: var(--ink);
}
.info-box--warn { border-left-color: var(--warn); background: var(--warn-soft); }
.info-box--good { border-left-color: var(--good); background: var(--good-soft); }
.info-box-title {
  font-weight: 700; margin: 0 0 var(--s-2);
  display: flex; align-items: center; gap: var(--s-2);
}
.info-box p:last-child { margin-bottom: 0; }
.info-box p { color: var(--ink-soft); }

/* ---------- 12. EXPANDABLE SECTIONS ---------- */
details.expander {
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  margin-bottom: var(--s-3);
  overflow: hidden;
  transition: box-shadow var(--t-fast) var(--ease);
}
details.expander[open] { box-shadow: var(--shadow-2); }
details.expander summary {
  list-style: none; cursor: pointer;
  padding: var(--s-4) var(--s-5);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  user-select: none;
  min-width: 0;
}
details.expander summary::-webkit-details-marker { display: none; }
details.expander summary::after {
  content: '+';
  font-size: 1.6rem; line-height: 1;
  color: var(--ink-mute);
  transition: transform var(--t-med) var(--ease);
  flex-shrink: 0;
}
details.expander[open] summary::after { transform: rotate(45deg); }
details.expander > *:not(summary) {
  padding: 0 var(--s-5) var(--s-5);
  animation: fadeUp var(--t-med) var(--ease);
}

/* ---------- 13. POI / PLACE PICKER (RESTAURANT CARD) ---------- */
.poi {
  display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-1);
  position: relative;
  min-width: 0;
  overflow: hidden;        /* prevents long URLs from busting layout */
  transition: box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.poi:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.poi[data-status='planned'] { border-left-color: var(--planned); }
.poi[data-status='arrived'] { border-left-color: var(--arrived); background: linear-gradient(90deg, var(--arrived-soft) 0%, var(--surface) 25%); }
.poi[data-status='skipped'] { opacity: 0.55; }

.poi-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-3); min-width: 0;
}
.poi-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
  flex: 1 1 auto; min-width: 0;
  word-break: break-word;
}
.poi-meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: var(--fs-small);
  color: var(--ink-mute);
  align-items: center;
  min-width: 0;
}
.poi-meta a { color: var(--ink-mute); }
.poi-meta-icon { color: var(--ink-faint); }

/* Tags / chips */
.poi-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.poi-tag--veg   { background: var(--good-soft);    border-color: var(--good);    color: var(--good); }
.poi-tag--price { background: #FFF7ED;             border-color: #FED7AA;        color: #B45309; }
.poi-tag--warn  { background: var(--warn-soft);    border-color: var(--warn);    color: var(--warn); }
.poi-tag--time  { background: var(--info-soft);    border-color: #93C5FD;        color: var(--info); }

.poi-desc { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.55; }

/* Dishes — chip cluster */
.dishes {
  display: flex; flex-direction: column; gap: 6px;
  padding: var(--s-3);
  background: var(--surface-2);
  border-radius: var(--r-2);
  border: 1px dashed var(--line);
}
.dishes-label {
  font-size: var(--fs-tiny);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-mute);
}
.dishes-list { display: flex; flex-wrap: wrap; gap: 6px; }
.dish-chip {
  display: inline-flex; align-items: center;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  font-weight: 500;
  max-width: 100%;
  word-break: break-word;
}
.dish-chip[data-veg]::before { content: '🌿 '; color: var(--good); }

/* Action bar */
.poi-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 2px;
}
.action-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: all var(--t-fast) var(--ease);
  min-height: 40px;     /* big touch target */
  white-space: nowrap;
}
.action-btn:hover { background: var(--surface-3); text-decoration: none; }
.action-btn:active { transform: scale(0.97); }
.action-btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.action-btn--primary:hover { background: #1E293B; }
.action-btn--good    { background: var(--arrived); color: #fff; border-color: var(--arrived); }
.action-btn--good:hover    { background: #047857; }
.action-btn--planned { background: var(--planned); color: #fff; border-color: var(--planned); }
.action-btn--planned:hover { background: #D97706; }
.action-btn--ghost   { background: transparent; color: var(--ink-mute); border-color: transparent; }
.action-btn--ghost:hover   { background: var(--surface-3); color: var(--ink); }
.action-btn--icon { padding: 8px 10px; min-width: 40px; }

/* Sources line */
.poi-source {
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
  border-top: 1px dashed var(--line);
  padding-top: var(--s-2);
  margin-top: 2px;
  word-break: break-word;
}
.poi-source a {
  color: var(--ink-mute);
  text-decoration: underline;
  text-decoration-color: var(--ink-faint);
  text-underline-offset: 2px;
}
.poi-stamp {
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
}

/* ---------- 13b. EAT-ON-BOARD CARD ---------- */
.onboard-card {
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 60%);
  border-left-color: #2563EB;
  border-style: solid;
}
.onboard-card .poi-name { color: var(--rhodes); }
.onboard-card[data-status='planned'] { border-left-color: var(--planned); }
.onboard-card[data-status='arrived'] { border-left-color: var(--arrived); }

/* ---------- 14. STATUS CHIPS (header right of poi-name) ---------- */
.status-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--surface-3);
  color: var(--ink-mute);
}
.status-chip--planned { background: var(--planned-soft); border-color: var(--planned); color: #B45309; }
.status-chip--arrived { background: var(--arrived-soft); border-color: var(--arrived); color: var(--arrived); }
.status-chip--skipped { background: var(--surface-3);    border-color: var(--line);    color: var(--ink-mute); text-decoration: line-through; }

/* ---------- 15. ISLAND PROGRESS WIDGET ---------- */
.progress-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  padding: var(--s-3) var(--s-4);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5);
  align-items: center;
  margin-bottom: var(--s-4);
  box-shadow: var(--shadow-1);
}
.progress-item {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-small);
}
.progress-label { color: var(--ink-mute); font-weight: 600; }
.progress-value { font-family: var(--font-serif); font-weight: 700; color: var(--ink); }
.progress-bar {
  display: inline-block; width: 80px; height: 6px;
  background: var(--surface-3); border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--arrived);
  transition: width var(--t-med) var(--ease);
}

/* ---------- 16. MAPS ---------- */
.map-shell {
  position: relative;
  border-radius: var(--r-3);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  margin: var(--s-4) 0;
  background: var(--surface);
}
.map {
  width: 100%;
  height: 55vh;
  min-height: 320px;
  max-height: 520px;
  background: var(--surface-3);
}
.map-legend {
  position: absolute; bottom: var(--s-3); left: var(--s-3);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-radius: var(--r-1);
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-tiny);
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
  z-index: 400;
  max-width: calc(100% - var(--s-5));
  box-shadow: var(--shadow-1);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 18px; height: 4px; border-radius: 2px; }

/* ---- POI emoji pins on island maps ---- */
.poi-pin {
  background: transparent !important;
  border: none !important;
}
.poi-pin-bubble {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--pin-color, #0F172A);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-size: 14px;
}
.poi-pin-bubble > * { transform: rotate(45deg); }
/* Render as plain text (emoji renders inside the bubble) */
.poi-pin-bubble {
  font-size: 16px;
  line-height: 1;
}
.poi-pin-bubble::before { content: ''; }

/* Layer control restyle */
.leaflet-control-layers {
  border-radius: var(--r-2) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-2) !important;
  font-family: var(--font-sans) !important;
  font-size: var(--fs-tiny) !important;
}
.leaflet-control-layers-expanded {
  padding: 8px 10px !important;
}
.leaflet-control-layers label {
  display: flex !important;
  align-items: center;
  gap: 6px;
  margin: 2px 0 !important;
  cursor: pointer;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--r-2);
  box-shadow: var(--shadow-3);
}
.leaflet-popup-content {
  font-family: var(--font-sans);
  font-size: var(--fs-small);
  margin: var(--s-3) var(--s-4);
}

/* ---------- 17. ITINERARY LEG CARD ---------- */
.leg {
  display: grid;
  grid-template-columns: minmax(80px, auto) 1fr;
  gap: var(--s-4);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  margin-bottom: var(--s-2);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.leg-day {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--ink-soft);
}
.leg-route {
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  margin: 0 0 var(--s-1);
  word-break: break-word;
}
.leg-arrow { color: var(--ink-mute); margin: 0 6px; }
.leg-meta { font-size: var(--fs-small); color: var(--ink-mute); }

/* ---------- 18. OPTION TOGGLE (A/B) ---------- */
.option-toggle {
  display: inline-flex;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px;
  margin-bottom: var(--s-3);
  max-width: 100%;
}
.option-toggle button {
  padding: 8px 18px;
  border: none; background: transparent;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--ink-mute);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.option-toggle button.is-active {
  background: var(--ink); color: #fff;
  box-shadow: var(--shadow-1);
}

/* ---------- 19. ADD-PLACE FORM ---------- */
.add-place-expander summary {
  font-family: var(--font-sans) !important;
  font-size: var(--fs-body) !important;
  color: var(--ink-soft) !important;
  font-weight: 600;
}
.add-place-form { display: flex; flex-direction: column; gap: var(--s-3); }
.add-place-row { display: flex; gap: var(--s-2); align-items: stretch; flex-wrap: wrap; }
.add-place-row label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--fs-small); font-weight: 600;
  flex: 1; min-width: 200px;
}
.add-place-row input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}
.add-place-row input:focus { outline-color: var(--info); }
.add-place-msg { font-size: var(--fs-small); align-self: center; }

/* ---------- 20. ACTIVITY LOG ---------- */
.activity-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.activity-list li {
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: var(--fs-small);
  line-height: 1.5;
  word-break: break-word;
}
.activity-list li:last-child { border-bottom: none; }

/* ---------- 21. SYNC INDICATOR + CREW BADGE ---------- */
.sync-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-tiny);
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-mute);
  white-space: nowrap;
}
.sync-indicator::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-mute);
}
.sync-indicator[data-status='online']::before  { background: var(--arrived); }
.sync-indicator[data-status='syncing']::before { background: var(--planned); animation: pulse 1.2s var(--ease) infinite; }
.sync-indicator[data-status='offline']::before { background: var(--warn); }
.sync-indicator[data-status='error']::before   { background: var(--warn); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.4 } }

.crew-name-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden; text-overflow: ellipsis;
}
.crew-name-badge:hover { background: var(--surface-3); }

/* Hide sync/crew text on tiny screens — keep dot only */
@media (max-width: 480px) {
  .sync-indicator { font-size: 0; gap: 0; padding: 8px; width: 32px; height: 32px; justify-content: center; }
  .sync-indicator::before { width: 10px; height: 10px; }
  .crew-name-badge { max-width: 100px; }
}

/* ---------- 22. MODAL ---------- */
.modal-shell {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: var(--s-4);
  animation: fadeIn var(--t-fast) var(--ease);
  backdrop-filter: blur(4px);
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: var(--s-6) var(--s-5);
  max-width: 420px; width: 100%;
  box-shadow: var(--shadow-4);
  animation: popIn var(--t-med) var(--ease);
}
@keyframes popIn {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem; margin: 0 0 var(--s-2);
}
.modal-card form { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-4); }
.modal-card input {
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
}
.modal-actions { display: flex; gap: var(--s-2); justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 22b. ONBOARDING TOUR ---------- */
.onboarding-card {
  max-width: 480px;
  padding: var(--s-5) var(--s-5) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-4);
}
.onboarding-progress {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
}
.onboarding-dots {
  display: flex; gap: 6px;
}
.onboarding-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.onboarding-dot.is-active {
  background: var(--ink);
  transform: scale(1.3);
}
.onboarding-step-counter {
  font-size: var(--fs-tiny);
  color: var(--ink-mute);
  font-weight: 600;
  letter-spacing: 0.05em;
}
.onboarding-body {
  display: flex; flex-direction: column; gap: var(--s-3);
  min-height: 200px;
  transition: opacity var(--t-fast) var(--ease);
}
.onboarding-icon {
  font-size: 3rem;
  line-height: 1;
}
.onboarding-body .modal-title {
  font-size: 1.4rem;
}
.onboarding-body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}
.onboarding-actions {
  border-top: 1px solid var(--line-soft);
  padding-top: var(--s-3);
  margin-top: var(--s-2);
  justify-content: space-between;
  align-items: center;
}
.onboarding-actions [data-skip] { margin-right: auto; }

/* "How it works" footer link */
.footer-link {
  background: none; border: none;
  color: var(--info);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}
.footer-link:hover { text-decoration-color: var(--info); }

/* ---------- 23. UTILITIES ---------- */
.hidden { display: none !important; }
.text-mute { color: var(--ink-mute); }
.text-warn { color: var(--warn); }
.text-good { color: var(--good); }

/* Tables wrapped for horizontal scroll on tiny screens */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  background: var(--surface);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); min-width: 480px; }
.table-wrap th, .table-wrap td { padding: var(--s-3); text-align: left; border-bottom: 1px solid var(--line-soft); }
.table-wrap th { background: var(--surface-3); font-weight: 700; color: var(--ink-soft); }
.table-wrap tr:last-child td { border-bottom: none; }

/* ---------- 23b. SHOPPING LISTS ---------- */
.shopping-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.shopping-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 720px) {
  .shopping-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.shopping-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: var(--r-3);
  padding: var(--s-4);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column; gap: var(--s-3);
  min-width: 0;
  transition: box-shadow var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.shopping-list.is-done {
  border-left-color: var(--arrived);
  background: var(--surface-2);
  opacity: 0.85;
}
.shopping-list.flash {
  animation: flashCard 1.2s var(--ease);
}
@keyframes flashCard {
  0%   { box-shadow: 0 0 0 0 var(--planned); }
  50%  { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.25); }
  100% { box-shadow: var(--shadow-1); }
}

.shopping-list-header {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0;
}
.shopping-list-title-row {
  display: flex; align-items: center; gap: var(--s-2);
  min-width: 0;
}
.shopping-list-title-input {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-1);
  padding: 4px 8px;
  flex: 1; min-width: 0;
  color: var(--ink);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.shopping-list-title-input:hover { background: var(--surface-3); }
.shopping-list-title-input:focus { background: var(--surface); border-color: var(--info); outline: none; }

.shopping-list-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: var(--fs-small);
  color: var(--ink-mute);
}

.shopping-items {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.shopping-empty { padding: var(--s-3) 0; text-align: center; font-style: italic; }

.shopping-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2);
  padding: 8px 4px;
  border-bottom: 1px dashed var(--line-soft);
  min-width: 0;
}
.shopping-item:last-child { border-bottom: none; }
.shopping-item-label {
  display: flex; align-items: center; gap: var(--s-3);
  flex: 1; min-width: 0;
  cursor: pointer;
  word-break: break-word;
}
.shopping-item-label input[type='checkbox'] {
  width: 22px; height: 22px;
  flex-shrink: 0;
  accent-color: var(--arrived);
  cursor: pointer;
}
.shopping-item-text {
  font-size: var(--fs-body);
  word-break: break-word;
  transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}
.shopping-item.is-checked .shopping-item-text {
  color: var(--ink-faint);
  text-decoration: line-through;
  text-decoration-color: var(--ink-faint);
}

.shopping-add {
  display: flex; gap: var(--s-2);
}
.shopping-add input {
  font: inherit;
  flex: 1; min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  background: var(--surface);
}
.shopping-add input:focus { outline-color: var(--info); }

.shopping-list-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: var(--s-3); flex-wrap: wrap;
}
.shopping-list-actions {
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* ---------- 23c. TODAY CARD ---------- */
.today-card {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-4) var(--s-5);
  margin: 0 0 var(--s-5);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-3) 100%);
  border: 1px solid var(--line);
  border-left: 4px solid var(--ink);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-2);
  font-size: var(--fs-small);
}
.today-card[data-island-color='rhodes']  { border-left-color: var(--rhodes); }
.today-card[data-island-color='symi']    { border-left-color: var(--symi); }
.today-card[data-island-color='nisyros'] { border-left-color: var(--nisyros); }
.today-card[data-island-color='kos']     { border-left-color: var(--kos); }
.today-card[data-island-color='tilos']   { border-left-color: var(--tilos); }
.today-card-row {
  display: flex; align-items: baseline; gap: var(--s-3);
  flex-wrap: wrap;
}
.today-card-day {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.today-card-island {
  font-weight: 600;
  font-size: 1.05rem;
}
.today-card-island a { color: inherit; text-decoration: none; }
.today-card-island a:hover { text-decoration: underline; }
.today-card-time {
  margin-left: auto;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.today-card-tag {
  color: var(--ink-mute);
  font-size: var(--fs-small);
}
.today-card-next {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-2) 0;
  border-top: 1px dashed var(--line-soft);
}
.today-card-next-label {
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
}
.today-card-next-name { font-weight: 600; }
.today-card-crew {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-tiny);
  color: var(--ink-mute);
}
.today-card-crew-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--arrived);
  animation: pulse 2s var(--ease) infinite;
}
.today-card--pretrip {
  background: linear-gradient(135deg, var(--info-soft) 0%, var(--surface) 100%);
  border-left-color: var(--info);
}
.today-card--posttrip {
  background: var(--surface-2);
  border-left-color: var(--ink-mute);
  opacity: 0.85;
}

/* ---------- 23d. BOTTOM TAB BAR (mobile) ---------- */
.bottom-tabs {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  padding: 6px 4px env(safe-area-inset-bottom, 6px);
  justify-content: space-around;
  align-items: stretch;
  gap: 2px;
}
.bottom-tab {
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  background: none; border: none;
  color: var(--ink-mute);
  text-decoration: none;
  font-size: var(--fs-tiny);
  border-radius: var(--r-1);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.bottom-tab:hover, .bottom-tab.is-active {
  color: var(--ink);
  background: var(--surface-3);
}
.bottom-tab.is-active {
  color: var(--ink);
}
.bottom-tab-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.bottom-tab-label {
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

/* Show bottom tabs on mobile + hide top chapter strip there */
@media (max-width: 720px) {
  .bottom-tabs { display: flex; }
  .chapter-nav { display: none; }
  .app-main { padding-bottom: 80px; }   /* leave room for fixed bar */
}

/* ---------- 23e. MORE SHEET ---------- */
.more-sheet {
  position: fixed; inset: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn var(--t-fast) var(--ease);
}
.more-sheet-card {
  width: 100%;
  max-width: 600px;
  background: var(--surface);
  border-radius: var(--r-3) var(--r-3) 0 0;
  box-shadow: var(--shadow-4);
  padding: var(--s-4) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom, 0px));
  animation: slideUp var(--t-med) var(--ease);
  max-height: 80vh;
  overflow-y: auto;
}
@keyframes slideUp {
  from { transform: translateY(40%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.more-sheet-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-3);
}
.more-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.more-list li a {
  display: block;
  padding: var(--s-3) var(--s-2);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-body);
  font-weight: 500;
}
.more-list li:last-child a { border-bottom: none; }
.more-list li a:hover { background: var(--surface-3); }
.more-list a[data-color='rhodes']  { color: var(--rhodes); }
.more-list a[data-color='symi']    { color: var(--symi); }
.more-list a[data-color='nisyros'] { color: var(--nisyros); }
.more-list a[data-color='kos']     { color: var(--kos); }
.more-list a[data-color='tilos']   { color: var(--tilos); }

/* ---------- 23f. PHOTO HERO + GALLERY ---------- */
.photo-hero {
  display: block;
  margin: 0 0 var(--s-4);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  position: relative;
  background: var(--surface-3);
}
.photo-hero img {
  width: 100%;
  height: clamp(180px, 35vh, 360px);
  object-fit: cover;
  display: block;
}
.photo-hero[data-portrait='1'] img {
  height: clamp(280px, 50vh, 480px);
  object-fit: cover;
  object-position: center top;
}
.photo-hero-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--s-3) var(--s-4);
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0));
  color: #fff;
  font-size: var(--fs-small);
  display: flex; flex-direction: column; gap: 2px;
}
.photo-hero-credit {
  font-size: var(--fs-tiny);
  opacity: 0.85;
}
.photo-hero-credit a { color: inherit; text-decoration: underline; }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s-3);
}
.photo-tile {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.photo-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.photo-tile img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.photo-tile.is-portrait img { height: 240px; }
.photo-tile-cap {
  padding: var(--s-2) var(--s-3);
  font-size: var(--fs-tiny);
  display: flex; flex-direction: column; gap: 2px;
}
.photo-tile-credit { color: var(--ink-faint); }

/* ---------- 23g. CREW FEED ---------- */
.crew-roster {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  margin-bottom: var(--s-4);
}
.crew-chip {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-small);
  background: var(--surface);
}
.crew-chip.is-me {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.crew-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.crew-feed-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.crew-feed-item {
  display: flex; gap: var(--s-3);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line-soft);
}
.crew-feed-item:last-child { border-bottom: none; }
.crew-feed-body { flex: 1; min-width: 0; }
.crew-feed-line {
  font-size: var(--fs-small);
  line-height: 1.5;
  word-break: break-word;
}
.crew-feed-time {
  font-size: var(--fs-tiny);
  color: var(--ink-faint);
  margin-top: 2px;
}
.crew-feed-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--r-pill);
  font-size: var(--fs-tiny);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.crew-feed-status--planned { background: var(--planned-soft); color: #B45309; }
.crew-feed-status--arrived { background: var(--arrived-soft); color: var(--arrived); }
.crew-feed-status--skipped { background: var(--surface-3); color: var(--ink-mute); text-decoration: line-through; }
.crew-feed-status--pending { background: var(--surface-3); color: var(--ink-mute); }

/* ---------- 24. APP FOOTER ---------- */
.app-footer {
  border-top: 1px solid var(--line);
  padding: var(--s-5) var(--s-4);
  text-align: center;
  font-size: var(--fs-small);
  color: var(--ink-mute);
  background: var(--surface);
}

/* ---------- 25. LARGER VIEWPORTS ---------- */
@media (min-width: 720px) {
  :root { --fs-base: 16px; }
  .app-main { padding: var(--s-6) var(--s-5) var(--s-8); }
  .brand-text { font-size: 1.15rem; }
}
@media (min-width: 1024px) {
  :root { --fs-base: 17px; }
  .chapter-title { font-size: 2.75rem; }
}
