:root {
  --accent: #5A754D;
  --accent-dark: #44583A;
  --text: #222;
  --bg: #ffffff;
  --border: #d8ddd6;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

#masthead {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}
#masthead a {
  color: #fff;
  text-decoration: none;
}
#masthead h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin: 0;
}
.masthead-subtitle {
  margin: 0.5rem 0 0;
  font-style: italic;
  opacity: 0.9;
}

main#content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

main#content h2 {
  font-family: var(--font-heading);
  text-align: center;
  color: var(--accent-dark);
}

#footer {
  text-align: center;
  padding: 1rem;
  border-top: 2px solid var(--accent-dark);
  font-size: 0.85rem;
  color: #555;
}
/* Itinerary table -> responsive cards */
.itinerary-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin: 1rem 0;
}
.itinerary-row {
  display: grid;
  grid-template-columns: 70px 50px 1fr 70px 70px 2fr;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.itinerary-header {
  background: var(--accent);
  color: #fff;
  font-weight: bold;
}
.itinerary-atsea { background: #eef1ec; font-style: italic; color: #555; }
.itinerary-port { background: #fafaf9; }
.itinerary-pre-cruise { background: #f3f1e8; }

@media (max-width: 700px) {
  .itinerary-header { display: none; }
  .itinerary-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "date day"
      "location location"
      "arrive depart"
      "notes notes";
  }
  .itinerary-row span:nth-child(1) { grid-area: date; }
  .itinerary-row span:nth-child(2) { grid-area: day; }
  .itinerary-row span:nth-child(3) { grid-area: location; font-weight: bold; }
  .itinerary-row span:nth-child(4) { grid-area: arrive; }
  .itinerary-row span:nth-child(5) { grid-area: depart; }
  .itinerary-row span:nth-child(6) { grid-area: notes; }
  .itinerary-row span::before {
    content: attr(data-label) ": ";
    font-weight: bold;
    color: var(--accent-dark);
  }
}

/* Post list */
.post-list { list-style: none; padding: 0; }
.post-list-item { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.post-title-pending { color: #888; }
.post-dates { color: #777; font-style: italic; }
/* Trip intro */
.trip-dates { text-align: center; }

/* Post page */
.post-header { text-align: center; }
.post-dates { color: #777; font-style: italic; }
.post-body { margin-top: 1.5rem; }
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}
.post-nav a { color: var(--accent-dark); text-decoration: none; font-weight: bold; }
.post-nav-index { margin: 0 auto; }
/* Photo grids */
.photo-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}
.photo-grid-1 { grid-template-columns: 1fr; }
.photo-grid-2 { grid-template-columns: repeat(2, 1fr); }
.photo-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 700px) {
  .photo-grid-2, .photo-grid-3 { grid-template-columns: 1fr; }
}
.photo img { width: 100%; height: auto; display: block; border-radius: 4px; cursor: zoom-in; }
.photo figcaption { font-size: 0.9rem; color: #555; margin-top: 0.35rem; text-align: center; }
/* Lightbox */
#lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
}
#lightbox-overlay.open { display: flex; }
#lightbox-overlay img {
  max-width: 92vw;
  max-height: 92vh;
}
