/* V16: small additions to the original forest / cream / gold design. */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
[id] { scroll-margin-top: 105px; }
.timeline { max-width: none; }
.timeline-period, .timeline-context { margin: 0 0 30px; padding-left: 20px; border-left: 2px solid var(--period-color, #8b8171); }
.timeline-period > h3, .timeline-context > h3 { margin: 0 0 14px; color: var(--forest); font-size: 23px; }
.period-armada { --period-color: #8c4c3d; }
.period-zajeti { --period-color: #9b7340; }
.period-legie { --period-color: #315e50; }
.period-navrat { --period-color: #384f8b; }
.period-mobilizace { --period-color: #796044; }
.timeline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.timeline .event { min-width: 0; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 20px; background: var(--cream); border: 1px solid var(--line); border-top: 3px solid var(--period-color, #8b8171); }
.timeline .event-year { font-size: 29px; }
.timeline .event h3 { font-size: 21px; }
.timeline .event p { font-size: 14px; color: #545a53; margin: 12px 0; }
.timeline .event.key-event { border-left: 4px solid var(--gold); }
.event-map-link, .journey-entry > a { font-size: 13px; text-underline-offset: 4px; color: #28503f; }
.key-chapter { border-left: 4px solid var(--gold); }
.diary-evidence { margin-top: 20px; padding: 18px; background: #f3eee5; border-left: 3px solid var(--gold); }
.diary-evidence h4 { font: 22px/1.3 Georgia, serif; margin: 10px 0; }
.diary-evidence blockquote { margin: 18px 0; }
.chapter .diary-evidence blockquote p { font: italic 23px/1.5 Georgia, serif; color: var(--forest); }
.chapter .diary-evidence p { margin: 12px 0; }
.document-source, .chapter .document-source { font-size: 12px; color: #62665e; }
.award-evidence { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(180px, .6fr); gap: 24px; padding: 24px; margin: 28px 0; background: var(--cream); }
.award-evidence p { font-size: 15px; }
.award-evidence figure { margin: 0; }
.document-preview { border: 1px solid var(--line); background: #e4ded2; padding: 8px; width: 100%; }
.document-preview img { display: block; width: 100%; height: 240px; object-fit: contain; }
.award-evidence figcaption { font-size: 12px; margin-top: 8px; }
.source-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 36px; }
.source-groups h3 { color: #dfc59a; font-size: 25px; }
.source-groups ul { padding-left: 22px; }
footer p { max-width: 800px; margin: 10px auto 0; }
.journey-entry { min-width: 0; }
.journey-entry > .journey-stop { width: 100%; }
.journey-entry > a { display: inline-block; padding: 6px 10px; }
.journey-stop { scroll-margin: 10px; }
.journey-group span { width: 30px; height: 30px; font: bold 13px/1 system-ui, sans-serif; color: white; border-color: white; }
.journey-group.selected span { width: 34px; height: 34px; }
.journey-popup { min-width: 190px; max-width: 260px; }
.journey-popup ol { padding-left: 20px; margin: 6px 0; }
.journey-popup li { border-left: 3px solid var(--stop-color); padding-left: 8px; margin: 10px 0; }
.journey-popup button { border: 0; padding: 4px; background: #f3eee5; color: var(--forest); text-align: left; }
.journey-popup small { display: block; }
.journey-popup a { display: block; padding: 7px 0; color: #28503f; }
/* Keep the V10 tile layout fallback and V11 custom markers in index.html. */
.leaflet-container .leaflet-popup-content { overflow-wrap: anywhere; }
.leaflet-container .leaflet-marker-icon:focus-visible { outline: 3px solid #25372f; }
.journey-map-fallback[data-error], .map-hint[data-error] { color: #793e2f; font-weight: 600; }
#viewer { width: min(95vw, 1200px); height: 94vh; padding: 16px; overflow: hidden; }
#viewer[open] { display: flex; flex-direction: column; }
.dialog-head { flex: 0 0 auto; align-items: start; margin-bottom: 10px; }
#viewer-caption { font: 20px/1.3 Georgia, serif; overflow-wrap: anywhere; }
.viewer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
#viewer button { min-height: 44px; padding: 8px 12px; color: white; background: #263b30; border: 1px solid #b9b3a3; }
#viewer button:disabled { opacity: .5; cursor: default; }
#viewer-position { font-size: 13px; }
#viewer-stage { overflow: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
#viewer-img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; margin: auto; }
#viewer-stage.zoomed #viewer-img { width: auto; height: auto; max-width: none; max-height: none; margin: 0; }
#viewer-source { flex: 0 0 auto; font-size: 12px; color: #d2d8d0; max-height: 10vh; overflow: auto; margin: 12px 0 0; }
#viewer-error { margin: 8px 0; }
@media (max-width: 900px) {
  .timeline-grid { grid-template-columns: 1fr; }
  .nav-inner { flex-wrap: wrap; padding-block: 12px; gap: 12px; }
  .links { gap: 8px 16px; }
}
@media (max-width: 600px) {
  .source-groups, .award-evidence { grid-template-columns: 1fr; }
  .timeline-period { padding-left: 12px; }
  .timeline .event { grid-template-columns: 62px minmax(0, 1fr); padding: 14px; gap: 10px; }
  .timeline .event-year { font-size: 25px; }
  .timeline .event h3 { font-size: 20px; }
  .chapter { padding: 18px; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; }
  .diary-evidence { padding: 12px; }
  .map-controls { gap: 6px; }
  .map-controls button { padding-inline: 8px; }
  .nav-inner { padding-inline: 24px; }
  [id] { scroll-margin-top: 180px; }
  #viewer { padding: 12px; }
  #viewer-caption { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: var(--nav-offset, 180px); }

/* V16.1: the revised attribution stays within the existing footer style. */
.project-credit { max-width: 800px; margin: auto; font-size: 14px; line-height: 1.7; }
.project-credit h2 { font-size: 24px; margin: 16px 0 12px; }
.project-credit p { margin-top: 12px; }
.project-author { margin-top: 18px; }

/* Two unmodified diary originals, using the existing document viewer. */
.diary-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 20px 0 12px; }
.diary-gallery figure { min-width: 0; margin: 0; }
.diary-gallery .document-preview img { height: 240px; object-fit: contain; }
.diary-gallery figcaption { margin-top: 8px; font-size: 12px; line-height: 1.6; color: #545a53; }
@media (max-width: 600px) { .diary-gallery { grid-template-columns: 1fr; } }

/* V16.3: compact capture chapter only; other quotations and cards stay unchanged. */
.chapter .diary-evidence p { margin: 8px 0; }
.chapter .diary-evidence blockquote { margin: 10px 0; padding-top: 0; padding-bottom: 0; }
.chapter .diary-evidence blockquote p { font-size: 15px; line-height: 1.5; }
.diary-evidence .diary-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; }
.diary-evidence .diary-gallery .document-preview img { height: 160px; object-fit: contain; }
.diary-evidence .diary-gallery figcaption { margin-top: 5px; line-height: 1.4; }
@media (max-width: 600px) {
  .chapter .diary-evidence blockquote p { font-size: 14px; }
  .diary-evidence .diary-gallery .document-preview img { height: 130px; }
}

/* Keep the original navigation line box while enlarging only its title. */
.nav .brand { font-size: 21.85px; line-height: 31.35px; }


/* Contact: reuse the site's forest, paper and gold palette. */
#zdroje { padding-bottom: 64px; }
.contact-section { display: flow-root; padding: 36px 0 56px; background: var(--cream); border-top: 1px solid var(--line); }
.contact-inner { display: block; text-align: left; }
.contact-copy { min-width: 0; max-width: 780px; }
.contact-copy h2 { font-size: clamp(1.25rem, 2.25vw, 1.6rem); margin: 0 0 14px; color: var(--forest); }
.contact-copy p { margin: 0; color: #545a53; }
.contact-copy .contact-email { margin-top: 14px; }
.contact-email a { overflow-wrap: anywhere; text-underline-offset: 3px; }
.contact-button { display: inline-block; position: static; max-width: 100%; margin: 22px 0 0; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.contact-button:hover { background: #b99664; }

@media (max-width: 560px) {
  #zdroje { padding-bottom: 48px; }
}
