
/* JENRIKS — Global Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
body.dark-mode *:focus-visible { outline-color: rgba(255,255,255,0.6); }

/* Self-hosted Nunito font */
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/nunito-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito'; font-style: normal; font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Nunito'; font-style: italic; font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nunito-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito'; font-style: italic; font-weight: 400;
  font-display: swap;
  src: url(/static/fonts/nunito-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --black: #111;
  --gray: #767676;
  --light: #f5f5f5;
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --chrome-top: 30px;
  --chrome-h: 30px;
}

html, body {
  height: 100%;
  font-family: var(--font);
  background: #FAFAF8;
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  /* no transition — dark mode toggle is instant */
}

a { color: inherit; text-decoration: none; }

/* ── Film grain ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.dark-mode::after { opacity: 0.11; }
body.map-body::after, body.about-body::after { display: none !important; }
body.map-body { background: #D5DADC !important; }
body.dark-mode.map-body { background: #262626 !important; }

/* ── Dark mode ── */

body.dark-mode { background: #090909; color: #eee; }
body.dark-mode .photo-page { background: #090909; }
body.dark-mode .archive-page { background: #090909; }
body.dark-mode .about-page { background: #090909; }
body.dark-mode .about-page p { color: #bbb; }
body.dark-mode .about-stats { border-color: transparent; }
body.dark-mode .stat-main { color: #eee; }

body.dark-mode .site-logo img { filter: invert(1) brightness(2); }
body.dark-mode .nav-hamburger { color: rgba(255,255,255,0.8); }
body.dark-mode .nav-arrow { color: rgba(255,255,255,0.85); }
body.dark-mode .footer-trigger { color: rgba(255,255,255,0.85); opacity: 0.85; }
body.dark-mode .filter-chip { background: #1a1a1a; border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
body.dark-mode .search-bar { background: #1a1a1a; border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); }
body.dark-mode .filter-chip.active { background: #eee; color: #111; border-color: #eee; }
/* archive filter rows separated by margin only */
body.dark-mode .month-heading { color: #999; }
body.dark-mode .grid-item { background: #222; }
body.dark-mode .year-select { background-color: #1a1a1a; border-color: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); -webkit-text-fill-color: rgba(255,255,255,0.8); }
body.dark-mode .ss-ring-track { stroke: rgba(255,255,255,0.35); }
body.dark-mode .ss-ring-fill { stroke: rgba(255,255,255,0.7); }
body.dark-mode .ss-close-x { color: rgba(255,255,255,0.7); }
body.dark-mode .ss-close-x:hover { color: rgba(255,255,255,0.9); }

/* ── Loading skeletons ── */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--light) 25%, #e8e8e8 37%, var(--light) 63%);
  background-size: 200px 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 6px;
}
body.dark-mode .skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 37%, #1a1a1a 63%);
  background-size: 200px 100%;
}
.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; padding: 0 8px; }
.skeleton-card { aspect-ratio: 1; border-radius: 2px; }
.skeleton-map { width: 100%; height: 100%; }
body.dark-mode .site-nav { background: rgba(20,20,20,0.5); border-color: rgba(255,255,255,0.1); }
body.dark-mode .menu-popup { background: rgba(20,20,20,0.5); border-color: rgba(255,255,255,0.1); }
body.dark-mode .menu-row { color: rgba(255,255,255,0.85); }
body.dark-mode .menu-row:hover { background: rgba(255,255,255,0.06); border-radius: 5px; }
body.dark-mode .menu-info-row { color: rgba(255,255,255,0.6); }
body.dark-mode .menu-label { color: rgba(255,255,255,0.85); }
body.dark-mode .menu-toggle { border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.6); }
body.dark-mode .menu-toggle.active { background: rgba(235,235,235,0.9); color: #111; border-color: rgba(235,235,235,0.9); }
body.dark-mode .menu-toggle:hover:not(.active) { border-color: rgba(255,255,255,0.75); color: rgba(255,255,255,0.85); }
body.dark-mode .menu-play-btn { background: rgba(235,235,235,0.9); color: #111; border-color: rgba(235,235,235,0.9); }
body.dark-mode .menu-divider { border-top-color: rgba(255,255,255,0.08); }
body.dark-mode .menu-photo-title { color: rgba(255,255,255,0.9); }
body.dark-mode:has(.slideshow-page.dark-bg) .ss-close-btn .ss-ring-track { stroke: rgba(255,255,255,0.35); }
body.dark-mode:has(.slideshow-page.dark-bg) .ss-close-btn .ss-ring-fill { stroke: rgba(255,255,255,0.7); }
body.dark-mode:has(.slideshow-page.dark-bg) .ss-close-btn .ss-close-x { color: rgba(255,255,255,0.7); }

/* ── Photo layout ── */

@keyframes photoFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.photo-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--chrome-top) 20px var(--chrome-h);
  background: #FAFAF8;
  overflow: hidden;
}

.photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}

.photo-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - var(--chrome-top) - var(--chrome-h) - 52px);
  display: block;
  border-radius: 3px;
  animation: photoFadeIn 0.5s ease;
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── Footer trigger (photo title, bottom-left) ── */

.footer-trigger {
  position: fixed;
  bottom: 0;
  left: 6px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  opacity: 0.65;
  background: none;
  border: none;
  cursor: pointer;
  padding: 28px 14px 20px;
  z-index: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  max-width: calc(100vw - 160px);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s;
}
.footer-trigger:hover,
.footer-trigger.active { opacity: 1; }
.footer-info {
  width: 16px; height: 16px; display: inline-block;
  vertical-align: -3px; margin-left: 4px;
  opacity: 0.65; transition: opacity 0.15s;
  flex-shrink: 0;
}
.footer-trigger:hover .footer-info { opacity: 1; }
.footer-trigger.active .footer-info { opacity: 0.8; }

/* Down arrow inside metadata popup title */
.popup-info {
  width: 16px; height: 16px; display: inline-block;
  vertical-align: -3px; margin-left: 4px;
  opacity: 0.65;
  flex-shrink: 0;
}

/* First-visit pulse */
@keyframes footer-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}
.footer-trigger.pulse {
  animation: footer-pulse 1.2s ease-in-out 2;
}

/* Hint tooltips — shared base */
.hint-tooltip {
  position: fixed;
  background: rgba(252,252,250,0.8);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  font-size: 12px;
  color: #555;
  letter-spacing: 0.02em;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hint-tooltip.visible { opacity: 1; }
.hint-tooltip .hint-icon { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }
.hint-tooltip .hint-icon svg { width: 100%; height: 100%; display: block; }
.hint-tooltip strong { font-weight: 700; }
body.dark-mode .hint-tooltip {
  background: rgba(20,20,20,0.8);
  border-color: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.75);
}

/* Footer hint — bottom-left, above photo title */
.footer-hint { left: 15px; bottom: 50px; }

/* Nav hints — bottom-right, above arrows */
.nav-hint { right: 15px; bottom: 50px; }

/* ── Top logo ── */

.site-logo-wrap {
  position: fixed;
  top: 7px;
  left: 12px;
  z-index: 1000;
  pointer-events: all;
}

.site-logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 13px 8px;
}

.site-logo img {
  width: 105px;
  height: 18px;
  display: block;
}

/* ── Top-right hamburger menu ── */

.nav-hamburger {
  position: fixed;
  top: 5px;
  right: 5px;
  z-index: 1001;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--black);
  opacity: 0.5;
  padding: 10px;
  min-width: 48px;
  min-height: 48px;
  line-height: 1;
  transition: opacity 0.15s;
}
.nav-hamburger:hover { opacity: 1; }


.site-nav {
  position: fixed;
  top: 10px;
  right: 10px;
  transform-origin: top right;
  background: rgba(252,252,250,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.04);
  z-index: 2001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  width: max-content;
  max-width: calc(100vw - 20px);
}
.site-nav.open { opacity: 1; pointer-events: all; }

/* ── Bottom-right navigation corner ── */

.nav-corner {
  position: fixed;
  bottom: 0;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 1000;
}

.nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  opacity: 0.45;
  transition: opacity 0.15s;
  cursor: pointer;
  font-size: 16px;
  padding: 14px;
  padding-bottom: 20px;
  margin: -14px 0;
  margin-bottom: 0;
  background: none;
  border: none;
  text-decoration: none;
  line-height: 1;
}
.nav-arrow:hover { opacity: 1; }
.nav-arrow.disabled { opacity: 0.15; pointer-events: none; }

/* Navigation hints — positioned via .nav-hint in hint-tooltip block above */

/* ── Archive page ── */

.archive-page {
  min-height: 100vh;
  padding: calc(var(--chrome-top) + 28px) 20px calc(var(--chrome-h) + 28px);
}

.archive-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 20px;
}

.archive-count {
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

.search-bar {
  width: auto;
  padding: 0 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  outline: none;
  background: #fff;
  text-align: left;
  color: var(--black);
  transition: border-color 0.15s;
  height: 36px;
  box-sizing: border-box;
}
.search-bar::placeholder { color: var(--gray); opacity: 1; }

.search-bar:focus { border-color: var(--black); }

.filter-chip {
  padding: 7px 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: #fff;
  color: var(--black);
  transition: all 0.12s;
  font-family: var(--font);
  -webkit-appearance: none;
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--black); }
.filter-chip.active { background: var(--black); color: #fff; border-color: var(--black); }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--light);
  border-radius: 3px;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-item-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff;
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s;
}

.grid-item:hover .grid-item-meta { opacity: 1; }
.grid-item-title { font-weight: 500; letter-spacing: 0.03em; }
.grid-item-date { opacity: 0.75; font-size: 10px; margin-top: 2px; }

.month-heading {
  grid-column: 1 / -1;
  margin-top: 24px;
  padding: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gray);
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: var(--gray);
  font-size: 13px;
}

/* Dropdowns (archive page) */
.year-select {
  padding: 0 26px 0 14px;
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 8px;
  appearance: none;
  -webkit-appearance: none;
  width: auto;
  -webkit-text-fill-color: var(--black);
  font-family: var(--font);
  transition: border-color 0.15s;
  outline: none;
  white-space: nowrap;
  color: var(--black);
  height: 34px;
  box-sizing: border-box;
}
.year-select:focus { border-color: var(--black); }
.year-select.has-value { background-color: var(--black); color: #fff; -webkit-text-fill-color: #fff; border-color: var(--black); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E"); }

/* ── Map page ── */

.map-page { height: 100vh; height: 100dvh; position: relative; z-index: 0; background: #D5DADC; }
#map { height: 100%; background: #D5DADC; }
body.dark-mode .map-page { background: #262626; }
body.dark-mode #map { background: #262626; }
body.dark-mode .leaflet-control-zoom a { background: #222; color: #eee; border-color: #444; }
body.dark-mode .leaflet-control-zoom a:hover { background: #333; }
.leaflet-container { background: #D5DADC; }
.leaflet-container.leaflet-touch-drag, .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { touch-action: manipulation !important; }
.leaflet-tile { will-change: auto !important; }
.leaflet-tile-pane { will-change: auto; }
.leaflet-marker-icon { cursor: pointer !important; touch-action: manipulation !important; -webkit-tap-highlight-color: transparent; }
.leaflet-marker-icon.marker-cluster { cursor: pointer !important; touch-action: manipulation !important; }
body.dark-mode .leaflet-container { background: #262626; }

/* ── Slideshow ── */

/* ── Icon system ── */

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: currentColor;
}
.icon svg { width: 100%; height: 100%; }

/* ── Menu popup base ── */

.menu-popup {
  position: fixed;
  background: rgba(252,252,250,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.04);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  width: max-content;
  max-width: calc(100vw - 40px);
}
.menu-popup.open {
  opacity: 1;
  pointer-events: all;
}

/* Metadata popup — bottom-left, wraps around title */
#metadata-popup {
  bottom: 10px;
  left: 9px;
  padding: 4px;
}

/* Slideshow popup — centered */
#ss-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
#ss-popup.open { transform: translate(-50%, -50%); }
.ss-popup-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.35);
  text-decoration: none;
  transition: color 0.15s;
}
.ss-popup-close:hover { color: var(--black); }
.ss-popup-close .icon { width: 16px; height: 16px; }
body.dark-mode .ss-popup-close { color: rgba(255,255,255,0.35); }
body.dark-mode .ss-popup-close:hover { color: rgba(255,255,255,0.75); }

/* ── Menu rows (clickable) ── */

.menu-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 15px 10px 6px;
  color: var(--black);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
  font-size: 15px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s;
}
.menu-row:hover { background: rgba(0,0,0,0.04); border-radius: 5px; }
.menu-row.active { font-weight: 600; }

/* ── Info rows (non-clickable metadata) ── */

.menu-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 15px 10px 6px;
  color: var(--black);
  font-family: var(--font);
  font-size: 14px;
  opacity: 0.65;
  text-decoration: none;
}
a.menu-info-row:hover { opacity: 1; background: rgba(0,0,0,0.04); border-radius: 5px; }

/* ── Section headers (Interval, Order, Appearance) ── */

.menu-label {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  padding: 14px 20px 6px;
}


/* ── Toggle buttons (selected state) ── */

.menu-toggle-group {
  display: flex;
  gap: 6px;
  padding: 4px 20px 12px;
  flex-wrap: wrap;
}

.menu-toggle {
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.18);
  background: transparent;
  color: rgba(0,0,0,0.55);
  cursor: pointer;
  transition: all 0.15s;
}
.menu-toggle.active {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}
.menu-toggle:hover:not(.active) {
  border-color: var(--black);
  color: var(--black);
}

/* ── Primary action button (Start Slideshow) ── */

.menu-play-btn {
  display: block;
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 11px 0;
  margin: 6px 20px 12px;
  border: 1px solid var(--black);
  border-radius: 4px;
  background: var(--black);
  color: #fff;
  cursor: pointer;
  width: calc(100% - 40px);
  transition: opacity 0.15s;
}
.menu-play-btn:hover { opacity: 0.75; }
.ss-exit-x {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2002;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: rgba(0,0,0,0.45);
  transition: color 0.15s;
  text-decoration: none;
}
.ss-exit-x:hover { color: var(--black); }
.ss-exit-x .icon { width: 22px; height: 22px; }
body.dark-mode .ss-exit-x { color: rgba(255,255,255,0.45); }
body.dark-mode .ss-exit-x:hover { color: rgba(255,255,255,0.75); }

/* ── Divider line ── */

.menu-divider {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin: 4px 6px;
}

/* ── Photo title at bottom of metadata popup ── */

.menu-photo-title {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  padding: 10px 6px 6px 6px;
  display: flex;
  align-items: center;
}

/* Circular close button with ring progress */
.ss-close-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.ss-close-btn.visible { opacity: 1; pointer-events: all; }

.ss-ring {
  position: absolute;
  top: 0; left: 0;
  width: 44px; height: 44px;
  transform: rotate(-90deg);
}

.ss-ring-track {
  fill: none;
  stroke: rgba(0,0,0,0.15);
  stroke-width: 2;
}

.ss-ring-fill {
  fill: none;
  stroke: rgba(0,0,0,0.45);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transition: stroke-dashoffset linear;
}

.ss-close-x {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: rgba(0,0,0,0.55);
  z-index: 1;
}
.ss-close-x .icon { width: 18px; height: 18px; }

/* ── Slideshow page ── */

.slideshow-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #FAFAF8;
  transition: background-color 0.5s;
}
.ss-photo-wrap {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--chrome-top) 20px var(--chrome-h);
  overflow: hidden;
}
.ss-photo-wrap img {
  max-width: 100%;
  max-height: calc(100dvh - var(--chrome-top) - var(--chrome-h) - 52px);
  object-fit: contain;
  border-radius: 3px;
  transition: opacity 0.35s ease;
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
body.slideshow-body .ss-exit-x,
body.slideshow-playing .nav-hamburger,
body.slideshow-playing .nav-corner,
body.slideshow-playing .footer-trigger,
body.slideshow-playing .page-dropdown-wrap { display: none; }
.slideshow-page.dark-bg { background: #090909 !important; }
body:has(.slideshow-page.dark-bg) .ss-close-btn .ss-ring-track { stroke: rgba(255,255,255,0.35); }
body:has(.slideshow-page.dark-bg) .ss-close-btn .ss-ring-fill { stroke: rgba(255,255,255,0.7); }
body:has(.slideshow-page.dark-bg) .ss-close-btn .ss-close-x { color: rgba(255,255,255,0.7); }
body:has(.slideshow-page.dark-bg) .ss-close-btn .ss-close-x:hover { color: rgba(255,255,255,0.9); }
body.dark-mode.slideshow-body .site-logo img { opacity: 0.5; }
body.slideshow-body:has(.slideshow-page.dark-bg) .site-logo img { filter: invert(1) brightness(2); opacity: 0.5; }

/* ── About page ── */

.about-page {
  max-width: 640px;
  margin: 0 auto;
  padding: calc(var(--chrome-top) + 24px) 32px calc(var(--chrome-h) + 48px);
}

.about-page h1 {
  font-family: var(--font);
  font-size: 28px;
  letter-spacing: 0.01em;
  font-weight: 700;
  margin-bottom: 24px;
}
.about-page h2 { font-size: 16px; font-weight: 600; margin-top: 28px; margin-bottom: 8px; }

.about-photo {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 3px;
  margin-top: 32px;
  margin-bottom: 40px;
  display: block;
}

.about-page p {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 20px;
}
.about-page a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.about-page a:hover { opacity: 0.7; }

.about-stats {
  margin-top: 24px;
  padding: 14px 20px;
  text-align: center;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 3px;
}

.stat-main {
  font-size: 14px;
  line-height: 1.8;
  color: var(--black);
  letter-spacing: 0.03em;
}

/* ── Responsive ── */

.ss-fullscreen-btn { display: inline-flex; }
@media (max-width: 640px) { .ss-fullscreen-btn { display: none !important; } }
@media (max-width: 640px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
  .archive-page { padding: calc(var(--chrome-top) + 28px) 16px calc(var(--chrome-h) + 20px); }

  .archive-filters {
    gap: 6px;
    padding-bottom: 16px;
  }
  .search-bar {
    width: 100%;
    max-width: none;
    order: -1;
  }
  .year-select {
    flex: 1;
    min-width: 0;
    padding-left: 10px;
    padding-right: 22px;
    background-position: right 7px center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .archive-count {
    width: 100%;
    text-align: center;
  }
}

/* ── Utilities ── */

.hidden { display: none !important; }

/* ── Accessibility ── */

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10001;
}
.skip-link:focus {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: 8px 16px;
  background: var(--black);
  color: #fff;
  font-size: 14px;
  border-radius: 4px;
  z-index: 10001;
}

*:focus-visible {
  outline: 2px solid #4A90D9;
  outline-offset: 2px;
}
.search-bar:focus-visible {
  outline: 2px solid #4A90D9;
  outline-offset: 2px;
  border-color: var(--black);
}
.year-select:focus-visible {
  outline: 2px solid #4A90D9;
  outline-offset: 2px;
  border-color: var(--black);
}
.nav-arrow:focus-visible,
.nav-hamburger:focus-visible,
.filter-chip:focus-visible,
.menu-row:focus-visible,
.menu-toggle:focus-visible,
.footer-trigger:focus-visible,
.ss-close-btn:focus-visible {
  outline: 2px solid #4A90D9;
  outline-offset: 2px;
}
body.dark-mode *:focus-visible {
  outline-color: #6DB3F2;
}

/* Touch targets — 44px minimum */
.nav-hamburger {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-arrow {
  min-width: 44px;
  min-height: 44px;
}
.filter-chip {
  min-height: 36px;
  padding: 8px 14px;
}
.footer-trigger {
  min-height: 44px;
}
.year-select {
  min-height: 36px;
  padding: 8px 28px 8px 12px;
}

/* ── Category & Location landing pages ── */

.landing-page {
  min-height: 100vh;
  padding: calc(var(--chrome-top) + 28px) 32px calc(var(--chrome-h) + 28px);
  max-width: 1200px;
  margin: 0 auto;
}
.landing-page h1 {
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
  text-align: center;
}
.landing-intro a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.landing-intro a:hover { opacity: 0.7; }
.landing-intro {
  font-size: 14px;
  color: var(--gray);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.6;
}
.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
}
.landing-grid .grid-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--light);
  border-radius: 3px;
}
.landing-grid .grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.landing-view-all {
  display: block;
  text-align: center;
  font-size: 14px;
  color: var(--gray);
  padding: 20px;
  transition: color 0.15s;
}
.landing-view-all:hover { color: var(--black); }
.landing-cta {
  display: block;
  width: fit-content;
  margin: 24px auto 0;
  padding: 12px 32px;
  background: var(--black);
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
  text-align: center;
}
.landing-cta:hover { opacity: 0.8; }
body.dark-mode .landing-cta { background: #eee; color: #111; }
body.dark-mode .landing-page h1 { color: #eee; }
body.dark-mode .landing-intro { color: #888; }
body.dark-mode .landing-grid .grid-item { background: #222; }
body.dark-mode .landing-view-all { color: #888; }
body.dark-mode .landing-view-all:hover { color: #eee; }
/* Landing pages reuse .grid-item-meta from archive */
.landing-map {
  width: 100%;
  height: 300px;
  border-radius: 6px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .landing-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
  .landing-page { padding: calc(var(--chrome-top) + 28px) 16px calc(var(--chrome-h) + 20px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
