@font-face { font-family: 'GenRyu Memorial'; src: url('./fonts/genryu-memorial-v2.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
:root { color-scheme: light; --ink: #655e61; --accent: #a7533e; --body-size: clamp(18px, 2.9892vw, 42.655px); }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: #f6f5f2; color: var(--ink); }
.page { width: 100%; max-width: 1427px; margin: 0 auto; container-type: inline-size; }
.pdf-original { position: relative; }
.pdf-segment { display: block; width: 100%; height: auto; }
.pdf-map-link { position: absolute; left: 16.89%; top: 98.85%; width: 60%; height: .65%; min-height: 24px; }
.pdf-map-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.map-section { padding: 32px 0 120px; background-color: #f4f3f0; background-image: url('./images/map-paper-v5.webp'), url('./images/paper-v5.webp'); background-position: center top; background-size: 100% auto; background-repeat: no-repeat, repeat; }
.map-window { width: 60%; max-width: 560px; height: 250px; margin-left: 16.89%; border: 1px solid #b8ada5; border-radius: 12px; overflow: hidden; background: #f4f3f0; isolation: isolate; }
.map-window iframe { display: block; width: 100%; height: 100%; border: 0; filter: saturate(.4) contrast(.72) brightness(1.30); mix-blend-mode: multiply; }
.gallery-section { padding: 0 0 80px; background: #f4f3f0 url('./images/paper-v5.webp') center top / 100% auto repeat; }
.gallery-heading { display: block; width: 100%; height: auto; clip-path: inset(0 0 2% 0); }
.gallery { width: 66.22%; max-width: 840px; margin: 0 auto; }
.gallery-viewport { display: grid; overflow: hidden; touch-action: pan-y; cursor: grab; }
.gallery-viewport.dragging { cursor: grabbing; user-select: none; }
.gallery-viewport:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }
.gallery-slide { grid-area: 1 / 1; min-width: 0; margin: 0; opacity: 0; visibility: hidden; pointer-events: none; }
.gallery-slide.is-current { opacity: 1; visibility: visible; pointer-events: auto; }
.gallery-slide.is-entering { opacity: 1; visibility: visible; }
.gallery-slide img { display: block; width: 100%; height: auto; max-height: 78svh; aspect-ratio: 708.9146546 / 1034.0220121; object-fit: contain; pointer-events: none; }
.gallery-slide figcaption { margin: 26px 0 0; text-align: center; color: var(--ink); font: 400 2.9892cqw/1.5 'GenRyu Memorial', 'PMingLiU', serif; letter-spacing: .2em; }
.caption-date, .caption-event { display: block; }
.gallery-slide img, .gallery-slide figcaption { backface-visibility: hidden; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 24px auto 0; font: 400 var(--body-size)/1.5 'GenRyu Memorial', 'PMingLiU', serif; letter-spacing: .2em; }
.gallery-controls button { min-height: 44px; min-width: 64px; padding: 8px 0; font: inherit; letter-spacing: inherit; color: var(--ink); background: none; border: 0; border-bottom: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.gallery-controls button:hover, .gallery-controls button:focus-visible { border-bottom-color: currentColor; }
.gallery-controls button:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
.gallery-counter { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .05em; white-space: nowrap; }
@media (max-width: 600px) {
  .map-section { padding: 26px 0 72px; }
  .map-window { width: 74%; margin-left: 13%; height: 205px; border-radius: 10px; }
  .gallery { width: 76%; }
  .gallery-slide figcaption { margin-top: 20px; }
  .gallery-section { padding-bottom: 52px; }
}
@media (prefers-reduced-motion: reduce) { .gallery-viewport { scroll-behavior: auto; } }
