/* Journal layout layered on the main site's shared colors, fonts and chrome. */
[data-japan-journal] { scroll-padding-top: 6rem; }
.reader-preview { padding: .45rem 1rem; text-align: center; color: var(--paper); background: var(--surface-soft); font-size: .75rem; }
.photo-journal-main { padding-bottom: 4rem; }
.photo-journal-main h1, .photo-journal-main h2, .photo-journal-main h3 { overflow-wrap: anywhere; }
.photo-journal-intro { padding: 2rem 0 1rem; }
.photo-journal-intro h1 { font-size: clamp(2.5rem, 5vw, 4.8rem); line-height: 1.08; margin: .5rem 0 1rem; }
.photo-journal-intro .eyebrow { margin: 0; }
.photo-journal-main .gallery-view-nav { gap: .7rem 1.4rem; }
.gallery-view-nav a { text-underline-offset: .35em; }
.journal-welcome { display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 3rem; margin: 2.5rem 0 4rem; }
.journal-welcome .photo-journal-intro { padding: 0; }
.journal-welcome > .photo-grid { display: block; padding: 0; }
.journal-welcome .gallery-frame img { max-height: 58svh; }
.reader-intro { max-width: 55ch; color: var(--paper-soft); font-size: 1.05rem; }
.journal-actions { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-top: 1.5rem; font-size: .9rem; }
.calendar { scroll-margin-top: 1.5rem; }
.calendar .section-heading { display: block; margin-bottom: 1.75rem; }
.calendar .section-heading h2 { font-size: clamp(2rem, 3.8vw, 3rem); margin: .6rem 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
.day-card { min-width: 0; text-decoration: none; background: var(--surface); border: 1px solid var(--rule); scroll-margin-top: 1.5rem; }
.card-image { aspect-ratio: 3/2; background: var(--bg-deep); display: grid; place-items: center; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-image > span { padding: 1rem; color: var(--muted); font-size: .8rem; }
.card-copy { padding: 1rem; }
.card-copy time { color: var(--moss); font: .75rem var(--mono); }
.card-copy h3 { font-size: 1.35rem; line-height: 1.25; margin: .65rem 0; }
.card-copy p { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; margin: 0; }
.day-card:hover { border-color: var(--moss); }
.shared-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; margin: 4rem 0; }
.shared-notes article { scroll-margin-top: 2rem; }
.shared-notes h2 { font-size: 2rem; margin-block: .65rem 1.25rem; }
.shared-notes p { max-width: 65ch; color: var(--paper-soft); }
.day-topnav { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1rem 0; background: var(--bg); border-bottom: 1px solid var(--rule); }
.calendar-return { flex-shrink: 0; font-size: .85rem; }
.day-picker { display: flex; gap: .6rem; align-items: center; min-width: 0; margin: 0; }
.day-picker select { width: min(350px, 100%); min-width: 0; padding: .65rem; color: var(--paper); background: var(--surface); border: 1px solid var(--rule); font: .85rem var(--sans); }
.day-picker button, [data-gallery-layout] { flex-shrink: 0; min-height: 44px; padding: .6rem .9rem; color: var(--paper); border: 1px solid var(--rule); background: var(--surface); font: .85rem var(--sans); cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.day-story { max-width: 72ch; margin: .5rem 0 2.5rem; color: var(--paper-soft); }
.day-story p { font: 1.2rem/1.75 var(--serif); }
.day-story .shared-context { font: .95rem/1.65 var(--sans); }
.day-pictures { margin: 1rem 0 2rem; }
.gallery-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.gallery-heading h2 { margin: 0 0 .5rem; font-size: 2rem; }
.gallery-heading p { margin: 0; color: var(--paper-soft); font-size: .9rem; }
.day-pictures .photo-grid { padding-block: 1.25rem 1.5rem; }
.day-pictures .photo-frame { content-visibility: visible; contain-intrinsic-size: auto; }
.day-pictures .gallery-frame img { height: min(52svh, 470px); object-fit: contain; }
[data-layout="strip"] .photo-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78vw, 560px); overflow-x: auto; max-width: 100%; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.strip-hint { display: none; }
[data-layout="strip"] .strip-hint { display: block; margin-top: .35rem; }
[data-layout="strip"] .gallery-frame { scroll-snap-align: start; }
[data-layout="strip"] .photo-grid { scrollbar-width: auto; }
[data-layout="strip"] .photo-grid::-webkit-scrollbar { height: 18px; }
[data-layout="strip"] .photo-grid::-webkit-scrollbar-track { background: var(--bg-deep); border: 1px solid var(--rule); border-radius: 9px; }
[data-layout="strip"] .photo-grid::-webkit-scrollbar-thumb { min-width: 56px; border: 3px solid var(--bg-deep); border-radius: 9px; background: var(--moss); }
[data-layout="strip"] .photo-grid::-webkit-scrollbar-thumb:hover { background: var(--lichen); }
@supports not selector(::-webkit-scrollbar) {
  [data-layout="strip"] .photo-grid { scrollbar-color: var(--moss) var(--bg-deep); }
}
.photo-strip-controls:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .25rem 0 .75rem; }
.photo-strip-controls button { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding: .65rem 1rem; border: 1px solid var(--moss); background: var(--surface); color: var(--paper); font: .95rem var(--sans); cursor: pointer; }
.photo-strip-controls button span { font-size: 1.4rem; line-height: 1; }
.photo-strip-controls button:hover:not(:disabled) { background: var(--surface-soft); border-color: var(--lichen); }
.photo-strip-controls button:disabled { opacity: .4; cursor: default; }
.photo-strip-controls output { color: var(--paper-soft); text-align: center; font: .9rem var(--mono); white-space: nowrap; }
[data-japan-journal] .gallery-frame figcaption { font-size: 1rem; }
[data-japan-journal] .gallery-frame figcaption small { font-size: .85rem; }
[data-layout="grid"] .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-layout="grid"] .gallery-frame img { height: auto; max-height: 350px; }
.day-end { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.next-day { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 140px; padding: 1.5rem; border: 2px solid var(--moss); background: var(--moss); color: var(--bg-deep); text-decoration: none; }
.next-day:hover { background: var(--lichen); border-color: var(--lichen); }
.next-day:focus-visible { outline-color: var(--paper); }
.next-day-copy { display: flex; flex-direction: column; gap: .65rem; min-width: 0; }
.next-day-copy .eyebrow { color: inherit; }
.next-day strong { font: 2rem var(--serif); }
.next-day-copy > span:last-child { color: inherit; }
.next-day-arrow { display: grid; flex-shrink: 0; place-items: center; width: 3.2rem; height: 3.2rem; border: 1px solid currentColor; font: 2.3rem/1 var(--sans); }
.day-end-links { display: flex; justify-content: space-between; gap: 1.5rem; margin-top: 1.75rem; font-size: .9rem; }
.day-end-links a { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .8rem; border: 1px solid var(--rule); background: var(--surface); }
.day-end { scroll-margin-top: 6rem; }
.journal-dates { position: sticky; top: 0; z-index: 5; display: flex; overflow-x: auto; gap: 1.2rem; padding: .8rem 0; background: var(--bg); border-block: 1px solid var(--rule); white-space: nowrap; font-size: .85rem; }
.journal-entry { margin: 2.5rem 0 4rem; scroll-margin-top: 5rem; }
.journal-entry-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; }
.journal-entry-heading h2 { font-size: clamp(1.8rem, 3vw, 3rem); margin: .5rem 0; }
.journal-entry-heading > a { flex-shrink: 0; font-size: .85rem; }
.journey-record { padding: 1.5rem; margin: 3rem 0 0; border: 1px solid var(--rule); background: var(--surface); }
.journey-record > summary { cursor: pointer; font: 1.3rem var(--serif); }
.journey-record[open] > summary { margin-bottom: 1rem; }
.journey-events li + li { margin-top: 1rem; }
.journey-events p { margin: .35rem 0; color: var(--paper-soft); }
@media (max-width: 1000px) {
  .calendar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .journal-welcome { gap: 2rem; }
}
@media (max-width: 680px) {
  .journal-welcome { grid-template-columns: 1fr; gap: 1.5rem; margin: 1.75rem 0 3rem; }
  .photo-journal-intro { padding-top: 1.5rem; }
  .photo-journal-intro h1 { font-size: 2.65rem; }
  .calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem .75rem; }
  .card-copy { padding: .8rem; }
  .card-copy h3 { font-size: 1.15rem; }
  .shared-notes { grid-template-columns: 1fr; gap: 2rem; }
  .day-topnav { gap: .8rem; }
  .day-picker { flex: 1; }
  .day-picker select { width: 100%; font-size: .8rem; }
  .day-picker button { padding-inline: .65rem; }
  .gallery-heading { align-items: flex-start; }
  .gallery-heading button { max-width: 8rem; }
  .photo-strip-controls button { padding-inline: .7rem; font-size: .85rem; gap: .4rem; }
  .photo-strip-controls output { font-size: .8rem; }
  .next-day { gap: 1rem; padding: 1.25rem; }
  .next-day strong { font-size: 1.8rem; }
  .next-day-arrow { width: 2.7rem; height: 2.7rem; font-size: 2rem; }
  [data-layout="grid"] .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .75rem; }
  .journal-entry-heading { align-items: start; }
  .journal-entry-heading > a { max-width: 6rem; }
  .day-story p { font-size: 1.1rem; }
}
