* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.55 var(--body); }
h1, h2, p, figure, blockquote { margin: 0; }
h1, h2 { font-family: var(--display); line-height: 1; }
a { color: inherit; text-underline-offset: .23em; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
button, input, textarea, select { font: inherit; color: inherit; }
button, .action { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button, .action { border: 1px solid currentColor; padding: .48rem .8rem; background: transparent; text-decoration: none; }
.action { display: inline-flex; justify-content: center; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.brand { font: 700 1.35rem/1.1 var(--display); text-decoration: none; }
.masthead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem max(5vw, 1rem); border-bottom: 1px solid var(--rule); }
.studio-actions, .post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.site-footer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .8rem 1.5rem; padding: 1.8rem max(5vw, 1rem); border-top: 1px solid var(--rule); }
.site-footer nav { display: flex; gap: .4rem 1rem; flex-wrap: wrap; }
.permission, .hint, figcaption, .post-meta { font-size: .875rem; color: var(--muted); }
.load-panel, .legal { max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
.legal p, .legal h1, .legal h2 { margin: 1rem 0; }
.settings label, .day-editor label { display: grid; gap: .3rem; font-size: .875rem; font-weight: 700; min-width: 0; }
input, textarea, select { display: block; width: 100%; min-width: 0; padding: .55rem .65rem; border: 1px solid var(--rule); background: var(--paper); }
textarea { resize: vertical; }
.edition-cover, .chapter, .memory, .closing { min-width: 0; overflow-wrap: anywhere; }
.cover-feature img, .post-photos img { display: block; width: 100%; object-fit: cover; }
.edition-date, .post-meta { font-weight: 700; }
.post-place::before { content: ' · '; }
.post-text, .closing p { white-space: pre-wrap; }
.memory.excluded { border-style: dashed; }
.memory.excluded .post-text, .memory.excluded .post-photos { opacity: .55; }
.post-actions { font-size: .83rem; }
.chapter { scroll-margin-top: 1.25rem; }
@media screen {
  .search-hidden { display: none !important; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; color: #171717 !important; }
  .masthead, .site-footer, .load-panel, .editor-only, .settings, .journey-controls,
  .month-index, .reflection-editor, .excluded, .empty-in-print { display: none !important; }
  #studio, #edition, .chapter, .chapter-entries, .edition-cover { display: block; padding: 0; margin: 0; width: 100%; border: 0; box-shadow: none; }
  #edition { background: #fff; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .edition-cover { break-after: page; }
  .edition-cover h1 { font-size: 36pt !important; }
  .edition-cover .cover-feature img { height: auto; max-height: 125mm; object-fit: contain; }
  .chapter-head { break-after: avoid; }
  .memory { break-inside: auto; }
  .post-photos { display: block !important; }
  .post-photos img { display: inline-block; width: 31%; height: auto; max-height: 60mm; object-fit: contain; break-inside: avoid; vertical-align: top; margin: 0 1% .2rem 0; }
  .travel-journal .chapter-head, .year-in-review .chapter-head { margin-top: 1rem; }
  .cover-quote, .closing { break-inside: avoid; }
}
