.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.gallery-heading { max-width: none; padding-bottom: 32px; }
.gallery-heading h1 { margin-top: 8px; }
.gallery-topline { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 17px 0; border-block: 1px solid var(--line); font-size: 17px; }
.gallery-totals { font-size: 14px; color: var(--muted); }
.gallery-totals span { margin-inline: 8px; }
.gallery-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 12px; }
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.gallery-tabs button, .map-toolbar button, #gallery-reset { border: 1px solid transparent; background: transparent; border-radius: 30px; padding: 7px 15px; font-size: 16px; }
.gallery-tabs button[aria-pressed="true"] { color: var(--paper); background: var(--accent); }
.gallery-tabs button:hover, .map-toolbar button:hover { border-color: var(--accent); }
.gallery-search { display: flex; gap: 10px; align-items: center; font-size: 15px; min-width: 0; }
.gallery-search select, .gallery-search input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-height: 42px; min-width: 0; }
.gallery-search input { width: 200px; }
.gallery-search input::placeholder { color: var(--muted); }
.gallery-layout { padding-bottom: 64px; }
.gallery-result { font-size: 13px; color: var(--muted); min-height: 36px; padding-top: 5px; }
.journal-grid { columns: 3; column-gap: 24px; }
.journal-card { display: inline-block; vertical-align: top; width: 100%; max-width: 360px; break-inside: avoid; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); transition: transform .2s, box-shadow .2s; }
.journal-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px #263d4310; }
.journal-link { display: block; text-decoration: none; color: var(--ink); }
.journal-link:hover { color: var(--ink); }
.journal-cover { position: relative; overflow: hidden; background: var(--cover-surface); }
.journal-cover img { width: auto; height: auto; max-width: 100%; max-height: 480px; margin-inline: auto; }
.photo-count { position: absolute; font-size: 12px; font-family: system-ui, sans-serif; line-height: 1.5; border-radius: 4px; padding: 4px 8px; }
.photo-count { bottom: 12px; right: 12px; background: #233f45bc; color: white; }
.journal-copy { padding: 17px 18px 14px; }
.journal-date { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.journal-copy h2 { font-size: 24px; line-height: 1.45; margin: 8px 0 10px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.journal-summary { font-size: 16px; color: var(--muted); line-height: 1.8; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.journal-place { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 10px; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.journal-place > span { color: var(--accent); font-family: Georgia, serif; font-size: 18px; }
.gallery-empty { padding: 70px 12px; text-align: center; color: var(--muted); }
#gallery-reset { border-color: var(--line); margin-top: 14px; }
.footprint-panel { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 36px; background: var(--surface); overflow: hidden; }
.footprint-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px; padding: 18px 22px; }
.footprint-heading h2 { font-size: 28px; }
.map-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-left: auto; }
.map-toolbar button { padding: 5px 10px; font-size: 13px; }
.map-toolbar label { display: flex; align-items: center; gap: 5px; min-height: 40px; font-size: 13px; cursor: pointer; color: var(--muted); }
.map-toolbar input { accent-color: var(--accent); }
#footprint-map { height: clamp(400px, 45vw, 560px); background: var(--cover-surface); z-index: 0; font-family: var(--font); }
.map-land { fill: var(--surface); fill-opacity: 1; stroke: var(--field-line); stroke-width: .7; }
.map-region { fill: none; stroke: var(--field-line); stroke-width: .8; stroke-opacity: .85; }
.map-grid { stroke: var(--field-line); stroke-opacity: .25; }
.map-route { stroke: var(--accent); }
.footprint-marker { background: none; border: 0; }
.footprint-marker span { display: grid; place-items: center; width: 30px; height: 30px; border: 3px solid var(--surface); border-radius: 50%; background: var(--accent); color: var(--paper); font: 12px/1 system-ui, sans-serif; box-shadow: 0 0 0 1px var(--accent), 0 3px 8px #0002; }
.leaflet-tooltip.footprint-label { background: var(--surface); color: var(--ink); border: 1px solid var(--line); font: 14px/1.6 var(--font); padding: 4px 9px; box-shadow: none; }
#footprint-map .leaflet-control-attribution { background: var(--surface); color: var(--muted); font-size: 9px; }
#footprint-map .leaflet-control a { color: var(--accent); background: var(--surface); }
#footprint-map .leaflet-bar { border-color: var(--line); box-shadow: none; }
.map-status { font-size: 13px; color: var(--muted); padding: 8px 20px; }
.gallery-breadcrumb { padding: 28px 0; font-size: 16px; }
.gallery-breadcrumb a { text-decoration: none; }
.gallery-entry { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; padding-bottom: 52px; }
.entry-photos { width: 100%; min-width: 0; align-self: start; position: sticky; top: 24px; }
.carousel-stage { position: relative; overflow: hidden; border-radius: 8px; background: var(--cover-surface); }
.carousel-viewport { display: flex; height: clamp(320px, 65dvh, 640px); overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
[data-carousel-ready] .carousel-viewport { scrollbar-width: none; }
[data-carousel-ready] .carousel-viewport::-webkit-scrollbar { display: none; }
.entry-photos figure { flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.entry-photos figure > a { display: block; height: 100%; }
.entry-photos img { width: 100%; height: 100%; object-fit: contain; }
.entry-photos figcaption { display: none; }
.carousel-counter { position: absolute; top: 14px; right: 14px; border-radius: 20px; padding: 4px 11px; color: #fff; background: #20383fbf; font: 12px/1.8 system-ui, sans-serif; pointer-events: none; font-variant-numeric: tabular-nums; }
.carousel-prev, .carousel-next { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; padding: 0 0 3px; border: 1px solid #ffffff60; border-radius: 50%; background: #20383fbf; color: #fff; font: 30px/1 system-ui, sans-serif; }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-prev:hover:not(:disabled), .carousel-next:hover:not(:disabled) { background: #20383fed; }
.carousel-prev:disabled, .carousel-next:disabled { opacity: .3; cursor: default; }
.carousel-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; padding: 8px 0 0; }
.carousel-dots button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; background: transparent; }
.carousel-dots button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--field-line); }
.carousel-dots button[aria-pressed="true"]::before { width: 8px; height: 8px; background: var(--accent); }
.entry-copy { min-width: 0; }
.entry-copy h1 { font-size: 36px; line-height: 1.4; margin: 12px 0 20px; }
.entry-copy .journal-date { display: block; }
.entry-coordinates { font-size: 12px; color: var(--muted); margin-top: 5px; font-variant-numeric: tabular-nums; }
.entry-copy .markdown-body { margin-top: 28px; font-size: 18px; line-height: 1.9; overflow-wrap: anywhere; }
.entry-copy .markdown-body p { margin-bottom: 18px; }
.entry-copy .markdown-body h2 { font-size: 25px; margin: 28px 0 14px; }
.entry-copy .markdown-body blockquote { margin: 20px 0; border-left: 2px solid var(--quote-line); padding: 8px 16px; color: var(--quote-ink); background: var(--quote-surface); }
.entry-copy .markdown-body blockquote p { margin: 0; }
.entry-links { display: flex; flex-wrap: wrap; gap: 12px 20px; border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: 13px; }
.journal-dialog { width: min(1080px, calc(100% - 64px)); max-height: 90dvh; border: 1px solid var(--line); border-radius: 12px; padding: 0; color: var(--ink); background: var(--surface); overscroll-behavior: contain; }
.journal-dialog::backdrop { background: #101f28a8; backdrop-filter: blur(4px); }
body:has(.journal-dialog[open]) { overflow: hidden; }
.dialog-close { display: grid; place-items: center; position: sticky; top: 14px; margin: 14px 14px 0 auto; width: 38px; height: 38px; z-index: 2; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-family: system-ui, sans-serif; font-size: 23px; line-height: 1; }
.dialog-content { padding: 0 30px 30px; }
.dialog-content .gallery-entry { gap: 30px; padding-bottom: 0; }
.dialog-content .entry-photos { top: 60px; }
.dialog-content .entry-copy h1 { font-size: 28px; }
.dialog-message { padding: 50px 20px; }
@media (max-width: 1000px) {
  .journal-grid { columns: 2; max-width: 744px; }
}
@media (max-width: 680px) {
  .gallery-heading { padding-block: 36px 26px; }
  .gallery-topline { gap: 4px; }
  .gallery-filters { flex-wrap: wrap; gap: 16px; padding-top: 20px; }
  .gallery-search { width: 100%; }
  .gallery-search input { flex: 1; width: 0; }
  .gallery-search > label:not(.visually-hidden) { display: none; }
  .gallery-tabs button { padding: 6px 14px; }
  .journal-grid { columns: 2; column-gap: 12px; }
  .journal-card { margin-bottom: 12px; border-radius: 7px; }
  .journal-copy { padding: 10px; }
  .journal-copy h2 { font-size: 19px; margin-block: 6px; }
  .journal-summary { font-size: 14px; -webkit-line-clamp: 2; }
  .journal-date, .journal-place { font-size: 11px; }
  .photo-count { bottom: 8px; right: 8px; font-size: 10px; }
  .footprint-panel { margin-bottom: 28px; }
  #footprint-map { height: 380px; }
  .gallery-entry { grid-template-columns: 1fr; gap: 28px; }
  .entry-photos { position: static; }
  .carousel-viewport { height: clamp(260px, 55dvh, 460px); }
  .entry-copy h1 { font-size: 30px; }
  .journal-dialog { width: calc(100% - 20px); max-height: 95dvh; }
  .dialog-content { padding: 0 18px 24px; }
  .dialog-content .gallery-entry { display: flex; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .journal-card, .journal-cover img { transition: none; } }
@media print { .gallery-filters, .map-toolbar, .journal-dialog, #footprint-map { display: none; } .footprint-panel { position: static; } .gallery-layout { display: block; } }
