/* ==========================================================================
   Samurai Hotel Narai-so — stylesheet
   Shared by index.html (EN), fr.html (FR), de.html (DE).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS variables
   -------------------------------------------------------------------------- */
:root {
  /* Colors — Bengara 弁柄: the reddish-brown iron-oxide pigment traditionally
     used to stain the wood facades along the Kiso Road, paired with sumi ink. */
  --color-bg: #F6F1E7;
  --color-text: #2B2724;
  --color-text-muted: #6E655C;
  --color-accent: #9E3B2A;
  --color-border: #E3D6C6;

  /* Typography
     NOTE: swap --font-base for the local webfont (.woff2) once chosen.
     Keep to 2 weights max, total font files under 200 KB. */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.75rem;
  --fs-hero: clamp(2.25rem, 6vw, 4rem);
  --lh-base: 1.6;
  --lh-tight: 1.2;

  /* Spacing scale (8px base) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;

  /* Layout */
  --header-height: 64px;
  --max-width: 1100px;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1, h2, h3,
p,
ul,
figure {
  margin: 0;
}

img {
  max-width: 100%;
  display: block;
}

/* Belt-and-suspenders for the native `hidden` attribute (used e.g. on
   #reservation-lookup in reservation.html): without this, any later rule
   that sets `display` on the same element (like .form-field's `display:
   flex`) wins over the browser's default `[hidden] { display: none }` and
   the "hidden" element shows anyway. Added 2026-09-17 after exactly that
   bug kept the "Look up & edit an existing reservation" button visible on
   Xserver despite `hidden` being present in the deployed HTML. */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   3. Base typography & colors
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
}

h1, h2, h3 {
  line-height: var(--lh-tight);
  font-weight: 700;
}

h1 {
  font-size: var(--fs-hero);
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-lg);
}

/* --------------------------------------------------------------------------
   4. Layout helpers
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* Required so anchor jumps land below the sticky header instead of under it. */
section {
  scroll-margin-top: var(--header-height);
  padding-block: var(--space-6);
}

/* --------------------------------------------------------------------------
   5. Site header / sticky nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  /* Mobile-first: on narrow screens the row is wider than the viewport,
     so it scrolls sideways instead of wrapping or needing a burger menu. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.site-name {
  flex-shrink: 0;
  font-weight: 700;
  font-size: var(--fs-base);
}

.main-nav ul {
  display: flex;
  gap: var(--space-3);
}

.lang-switch {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.lang-switch a[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 700;
}

/* Desktop: invisible wrapper, main-nav/lang-switch stay direct flex children
   of .header-inner exactly as before. Mobile turns this into the dropdown
   panel — see §11. */
.nav-group {
  display: contents;
}

/* Hamburger toggle, mobile-only (shown in §11). */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  margin-inline-start: auto;
  padding: 0;
  border: none;
  background: none;
  flex-shrink: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background-color: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: 0;
  color: #fff;
  text-align: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Oversized + translated by assets/js/main.js (data-parallax) so it can move
   without exposing empty edges. Falls back to a static cover image if JS
   doesn't run. */
.hero-img {
  position: absolute;
  top: -10%;
  left: 0;
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-inline: var(--space-3);
}

.hero-eyebrow {
  font-size: var(--fs-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.hero-title {
  font-size: var(--fs-hero);
  margin-bottom: var(--space-2);
}

/* Stacked on its own centered line below the Latin name, same weight as the
   heading — a companion line, not a smaller/lighter footnote. */
.hero-title-ja {
  display: block;
  font-weight: 700;
  font-size: 0.45em;
  margin-top: var(--space-1);
}

/* All hero text is white/light on the dark photo, kanji included. Scoped via
   .hero-content so it beats the base .ja rule (color: var(--color-text-muted))
   on specificity alone — a single-class .ja override further down the
   stylesheet would otherwise win by source order and go dark and unreadable. */
.hero-content .ja {
  color: rgba(255, 255, 255, 0.85);
}

.site-name .ja,
.footer-name .ja {
  font-weight: 700;
  font-size: 0.9em;
  margin-inline-start: var(--space-1);
}

.hero-tagline {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.9);
}

/* --------------------------------------------------------------------------
   7. Content sections (About / Stay / Experiences / Access / Day Trip / Contact)
   Shared module: photo + text block, alternating sides. Sections with more
   than one topic (About, Stay, Experiences) repeat this row multiple times
   via .feature-row rather than cramming everything under one image.
   -------------------------------------------------------------------------- */
.content-section {
  border-bottom: 1px solid var(--color-border);
}

.content-section:last-of-type {
  border-bottom: none;
}

.section-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}

/* Alternates media/text sides per section for rhythm, set per-section in the markup. */
.section-inner.reverse {
  flex-direction: row-reverse;
}

.section-media,
.section-body {
  flex: 1 1 380px;
  min-width: 0;
}

.section-img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.section-eyebrow {
  font-size: var(--fs-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.section-heading {
  margin-bottom: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--color-border);
  display: inline-block;
}

.section-lede {
  color: var(--color-text-muted);
  max-width: 46ch;
}

/* Repeated photo+text row within a multi-topic section (reuses .section-inner
   for the row layout itself) — this just adds the gap between one row and
   the next, since the outer <section> now holds several. */
.feature-row {
  margin-top: var(--space-6);
}

.feature-title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-1);
}

.feature-meta {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}

.feature-discount {
  font-weight: 400;
  color: var(--color-text-muted);
}

.feature-desc {
  color: var(--color-text-muted);
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   7b. Detail list — stacked, border-separated text items with no image
   (e.g. About's check-in/guest-services trio, Stay's dinner pricing).
   -------------------------------------------------------------------------- */
.detail-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 46ch;
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}

.detail-item {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}

.detail-item:first-child {
  padding-top: 0;
  border-top: none;
}

.detail-name {
  font-size: var(--fs-base);
  margin-bottom: 0.2rem;
}

.detail-item > * + * {
  margin-top: var(--space-2);
}

.pickup-directions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pickup-directions li {
  color: var(--color-text-muted);
  max-width: 46ch;
}

/* Service Details / Price Comparison lists under Special Transfer Service
   (index.html #transfer) — a visible bulleted list with tighter line
   spacing and normal-weight labels, added 2026-09-09 per the owner's
   request. Scoped to this modifier class (used alongside
   .pickup-directions) so the Shiojiri/Nagiso pick-up directions list
   above it, which keeps the flex layout with bold labels and no bullets,
   is unaffected. */
.service-detail-list {
  display: block;
  list-style: disc;
  padding-left: 1.2rem;
}

.service-detail-list li {
  margin-bottom: 0.2rem;
}

/* Video embed within a feature-row (e.g. Shogun's Matcha's YouTube video) —
   reuses the .access-map 16:9 aspect-ratio pattern (§7c) but capped at the
   same 46ch measure as .feature-desc, since it sits in the text column
   rather than spanning the full section width. */
.video-embed {
  margin-top: var(--space-3);
  max-width: 46ch;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

.video-embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-embed-poster {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.video-embed-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-embed-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background-color: rgba(30, 26, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.video-embed-play::before {
  content: "";
  margin-left: 0.2rem;
  border-style: solid;
  border-width: 0.6rem 0 0.6rem 1rem;
  border-color: transparent transparent transparent #fff;
}

.video-embed-poster:hover .video-embed-play,
.video-embed-poster:focus-visible .video-embed-play {
  background-color: var(--color-accent);
}

.video-embed-caption {
  margin-top: 0.4rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.section-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-weight: 700;
  color: var(--color-accent);
}

.section-link:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   7c. Access map — real, interactive Google Maps embed (keyless iframe),
   spanning the full section width beneath the photo + text row. Left in
   Google's native colors — a CSS filter recolor was tried and dropped, it
   read poorly. Precise per-feature recoloring would need the Maps
   JavaScript API + a style JSON, which needs a Google Cloud API key/billing
   account only the site owner can create.
   -------------------------------------------------------------------------- */
.access-map {
  margin: var(--space-5) 0 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

.access-map-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --------------------------------------------------------------------------
   7d. Mini grid — short label + paragraph(s), side by side. Used for Access
   (by train / bus / car) and Day Trip (the two itineraries).
   -------------------------------------------------------------------------- */
.mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.mini-grid-item {
  flex: 1 1 220px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.mini-grid-title {
  font-size: var(--fs-base);
  margin-bottom: 0.4rem;
}

.mini-grid-item p {
  color: var(--color-text-muted);
}

.mini-grid-item p + p {
  margin-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   8. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  margin-top: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background-color: var(--color-accent);
  color: #fff;
  font-weight: 700;
  border-radius: 2px;
}

.btn:hover {
  opacity: 0.9;
}

/* Two CTAs side by side (Contact's "Book online" + "Reserve by email"). */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.btn-group .btn {
  margin-top: var(--space-2);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-outline:hover {
  background-color: var(--color-accent);
  color: #fff;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   9. Scroll reveal
   Elements fade/rise in on entry via IntersectionObserver (assets/js/main.js).
   .no-js (set on <html> in a head-inline script, removed if JS runs) keeps
   everything visible when JS fails, instead of stuck at opacity: 0.
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible,
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-5);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

.footer-name {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.footer-address {
  margin-bottom: var(--space-1);
}

.footer-ja {
  margin-bottom: var(--space-2);
}

/* --------------------------------------------------------------------------
   Kanji accents on place names — a quiet second reading alongside the
   romanized text, not a translation label. Kept small/muted so it reads as
   texture, not a UI element; letter-spacing reset since CJK doesn't take
   the Latin tracking used on uppercase labels like .hero-eyebrow.
   -------------------------------------------------------------------------- */
.ja {
  font-weight: 400;
  letter-spacing: normal;
  color: var(--color-text-muted);
  /* Keeps multi-character kanji clusters (e.g. 中山道) from breaking
     mid-word onto the next line. */
  white-space: nowrap;
}

.hero-eyebrow .ja {
  opacity: 0.85;
}

.section-heading .ja {
  font-size: 0.55em;
  margin-inline-start: var(--space-1);
  vertical-align: middle;
}

/* Keeps a romanized name and its kanji/hiragana companion together as one
   unit in headings/titles, so a line break can't land between them (it can
   still land between separate .ja-pair units, e.g. at the " · " dividers). */
.ja-pair {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   11. Reservation form (reservation.html)
   Standalone booking page: name/email/dates/guests plus an experience
   picker, pre-selectable via ?experience=slug from the per-experience
   "Reserve this experience" links in the Experiences section. No backend —
   submission builds a mailto: link (assets/js/main.js), same convention as
   Contact's "Reserve by email" button.
   -------------------------------------------------------------------------- */
.reservation-section {
  padding-block: var(--space-6);
}

.reservation-form {
  margin-top: var(--space-5);
  max-width: 760px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3) var(--space-4);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: var(--fs-sm);
  font-weight: 700;
}

label[for="res-message"] {
  font-size: var(--fs-lg);
}

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--color-text);
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: var(--space-1) var(--space-2);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-note {
  margin-top: var(--space-3);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  max-width: 56ch;
}

.form-note a {
  color: var(--color-accent);
  font-weight: 700;
}

.form-actions {
  margin-top: var(--space-2);
}

/* Status messages for the reservation API calls (submit + lookup) — same
   restrained palette as .form-error, since the site has no dedicated
   success/green color. Pending and success both read calmly; only an
   actual problem uses the accent (Bengara) color, same as validation
   errors elsewhere on this form. */
.form-status {
  margin-top: var(--space-2);
  font-size: var(--fs-sm);
  max-width: 56ch;
}

.form-status-pending {
  color: var(--color-text-muted);
  font-style: italic;
}

.form-status-success {
  color: var(--color-text);
  font-weight: 700;
}

.form-status-error {
  color: var(--color-accent);
  font-weight: 700;
}

/* Checkbox group replacing the old single-select experience picker — a
   guest can now request more than one program per stay. */
.checkbox-group {
  min-width: 0;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.checkbox-group legend {
  padding: 0;
  margin-bottom: 0.4rem;
  font-size: var(--fs-lg);
  font-weight: 700;
}

.checkbox-group-hint {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--color-text-muted);
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: var(--fs-base);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: auto;
  margin-top: 0.3em;
  accent-color: var(--color-accent);
}

.checkbox-item span {
  flex: 1;
}

/* Wraps one checkbox + its date/time-slot fields, so the detail row can be
   shown/hidden as a unit (assets/js/main.js toggles .is-visible). */
.experience-option {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.experience-detail {
  display: none;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin: 0.2rem 0 0.4rem 1.6rem;
  padding-left: var(--space-2);
  border-left: 2px solid var(--color-border);
}

.experience-detail.is-visible {
  display: flex;
}

.experience-detail .form-field {
  flex: 1 1 160px;
  gap: 0.3rem;
}

.experience-detail label {
  font-size: var(--fs-sm);
}

/* Validation message for the "guests per experience exceeds total guests"
   check in assets/js/main.js, plus the matching invalid-field state. */
.form-error {
  margin-top: var(--space-2);
  color: var(--color-accent);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.form-field input.has-error,
.form-field select.has-error {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

/* Hour + minute dropdown pair for the luggage pick-up time fields — same
   .form-field label sits above both selects, spaced with a ":" between. */
.time-select-group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.time-select-group select {
  flex: 1 1 68px;
  min-width: 0;
}

.time-select-sep {
  color: var(--color-text-muted);
  font-weight: 700;
}

/* Your Itinerary: each day-row pairs a spot <select> with a "for N
   night(s)" count, plus a free-text field revealed only once "Other" is
   picked from the select. */
.itinerary-day-row {
  gap: 0.3rem;
}

.itinerary-row-inputs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.itinerary-spot-select {
  flex: 2 1 160px;
  min-width: 0;
}

.itinerary-nights-input {
  flex: 0 1 4.5em;
  min-width: 3.5em;
}

.itinerary-nights-label {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.itinerary-other-input {
  flex: 1 1 100%;
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .header-inner {
    /* The scroll-sideways fallback is no longer needed: nav + lang-switch
       move into the .nav-toggle dropdown below, so the visible row is just
       the site name and the hamburger button. */
    overflow-x: visible;
    white-space: normal;
  }

  .nav-toggle {
    display: flex;
  }

  /* Becomes the dropdown panel: hidden until .site-header.menu-open,
     translucent so a hint of the page shows through underneath. */
  .nav-group {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3);
    background-color: rgba(246, 241, 231, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
  }

  .site-header.menu-open .nav-group {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }

  .lang-switch {
    justify-content: center;
    gap: var(--space-3);
  }

  .section-inner,
  .section-inner.reverse {
    flex-direction: column;
    /* align-items: center (set for the desktop row layout, to vertically
       center media+body) becomes the CROSS axis in column mode — i.e.
       horizontal. That shrink-wraps each flex item to its content's
       intrinsic width instead of stretching full width, which is invisible
       with a 1600px-wide placeholder (still bigger than the column, so it
       still fills) but shrinks a real photo smaller than the column (e.g. a
       200×200 source) down to its native size, centered. Stretch overrides
       that back to full width regardless of the image's intrinsic size. */
    align-items: stretch;
  }

  /* flex-basis: 380px targets the main axis, which is now vertical (column
     direction) instead of horizontal — left as-is it forces each media/body
     block to a 380px-tall box regardless of content, leaving a blank gap
     under shorter images. flex: 0 0 auto (rather than 1 1 auto) opts fully
     out of flex grow/shrink recalculation: with a percentage-width image
     inside, flex-basis: auto can resolve to the image's pre-stretch
     intrinsic height (e.g. 200px for a 200×200 source) instead of its
     rendered height post width: 100%, leaving the parent box shorter than
     the image actually painted and overlapping the next block. Turning off
     grow/shrink makes the box follow normal content flow instead. */
  .section-media,
  .section-body {
    flex: 0 0 auto;
    width: 100%;
  }
}


/* --------------------------------------------------------------------------
   13. Day Trip itinerary cards + itinerary detail pages
   index.html's Day Trip section links out to one dedicated page per model
   course (itinerary-<slug>.html — same "index page + detail page" split as
   reservation.html), so new courses only mean a new card + a new page built
   from this same template, not a redesign. .itinerary-grid/.itinerary-card
   are deliberately separate from Access's .mini-grid so the two don't couple.
   -------------------------------------------------------------------------- */
.itinerary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.itinerary-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.itinerary-card-media img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  margin-bottom: 0.3rem;
}

/* Stand-in for .itinerary-card-media img / .itinerary-hero's photo when a
   course doesn't have its photography yet (e.g. Day Tour's first course,
   added 2026-09-07, launched before photos were available) — same spot in
   the layout, same rounded corners, so swapping in the real photo later is
   a one-line change and nothing needs to be redesigned around it. */
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background-color: var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  text-align: center;
  padding: var(--space-2);
  border-radius: 2px;
  margin-bottom: 0.3rem;
}

.itinerary-card-title {
  font-size: var(--fs-lg);
  margin: 0;
}

.itinerary-card-route {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* Detail page (itinerary-<slug>.html): hero photo, intro, a vertical
   timeline of timed steps, a map photo, then an important-notes box. */
.itinerary-hero {
  margin-bottom: var(--space-4);
}

/* Modifier for a small reference-map graphic (e.g. a tourist-map screenshot
   too low-resolution to stretch to the section's full width) — caps the
   image at close to its native size instead of blowing it up and blurring
   the text. Combine with .itinerary-hero or .itinerary-map. */
.itinerary-map-small {
  max-width: 220px;
}

.itinerary-timeline {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  max-width: 640px;
}

.itinerary-step {
  position: relative;
  padding: 0 0 var(--space-4) var(--space-4);
  border-left: 2px solid var(--color-border);
}

.itinerary-step:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.itinerary-step::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.3em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-accent);
  border: 2px solid var(--color-bg);
}

.itinerary-step-time {
  display: block;
  font-weight: 700;
  color: var(--color-accent);
  font-size: var(--fs-sm);
  margin-bottom: 0.2rem;
}

.itinerary-step-title {
  font-size: var(--fs-base);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.itinerary-step-desc {
  color: var(--color-text-muted);
  max-width: 56ch;
}

.itinerary-step-desc + .itinerary-step-desc {
  margin-top: 0.6rem;
}

.itinerary-step-list {
  color: var(--color-text-muted);
  max-width: 56ch;
  list-style: disc;
  padding-left: 1.2rem;
  margin-top: 0.4rem;
}

.itinerary-step-list li {
  margin-bottom: 0.2rem;
}

.itinerary-map {
  margin-top: var(--space-5);
  max-width: 640px;
}

.itinerary-map img {
  width: 100%;
  height: auto;
  border-radius: 2px;
}

.itinerary-map-caption {
  margin-top: 0.4rem;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* Two-photo gallery below the timeline (e.g. one photo per end town of a
   walking route) — shares .itinerary-map-caption for the caption style. */
.itinerary-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-5);
  max-width: 640px;
}


.itinerary-notes {
  margin-top: var(--space-5);
  max-width: 640px;
  padding: var(--space-3) var(--space-4);
  background-color: #fff;
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

.itinerary-notes h3 {
  font-size: var(--fs-base);
  margin-bottom: 0.6rem;
}

.itinerary-notes ul {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
}

.itinerary-notes li {
  margin-bottom: 0.4rem;
}

.itinerary-notes li:last-child {
  margin-bottom: 0;
}

/* Branch heading for a course with more than one variant on a single detail
   page (e.g. two lunch-stop options sharing a common start) — visually
   separates each variant's own timeline. Not needed when a course has only
   one path (see itinerary-magome-tsumago.html, itinerary-matsumoto.html). */
.itinerary-branch-heading {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-border);
  font-size: var(--fs-xl);
}

.itinerary-branch-note {
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-top: 0.4rem;
}


/* --------------------------------------------------------------------------
   14. Lightbox (click-to-enlarge images)
   General-purpose, not itinerary-specific: wrap any <img> in a
   <button class="lightbox-trigger"> and assets/js/main.js wires it up to
   open that image full-size in an overlay. Used first for the route-map
   images on itinerary-kiso-fukushima.html. Progressive enhancement — the
   button is unstyled-but-clickless without JS (no-js removes cursor:zoom-in
   via the [data-lightbox-ready] gate below), so the image is always visible
   even if the script fails to load.
   -------------------------------------------------------------------------- */
.lightbox-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
}

[data-lightbox-ready] .lightbox-trigger {
  cursor: zoom-in;
}

.lightbox-trigger img {
  display: block;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background-color: rgba(30, 26, 20, 0.9);
}

.lightbox[hidden] {
  display: none;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 2px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-4);
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background-color: rgba(255, 255, 255, 0.3);
}
