:root {
  color-scheme: dark;
  font-family: system-ui, 'Segoe UI', sans-serif;
  --paper: #101113;
  --ink: #f7f3f0;
  --muted: #b7b1b1;
  --line: #333136;
  --accent: #ff664f;
  background: var(--paper);
  color: var(--ink);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
a { color: inherit; text-underline-offset: .23em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button, input, textarea, select { font: inherit; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.top, .foot { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; }
.top { min-height: 5.25rem; }
.top nav { display: flex; gap: clamp(.85rem, 3vw, 2rem); align-items: center; font-size: .94rem; }
.top nav a, .brand { text-decoration: none; }
.brand { display: inline-flex; gap: 0; align-items: center; font-size: 1.36rem; font-weight: 800; letter-spacing: -.06em; white-space: nowrap; }
.brand span:last-child, h1 > span { color: var(--accent); }
.mark { width: 1.6rem; height: 1.6rem; border-radius: .42rem; background: var(--accent); margin-right: .55rem; display: grid; place-items: center; }
.mark::after { content: ''; width: 0; height: 0; border-top: .32rem solid transparent; border-bottom: .32rem solid transparent; border-left: .5rem solid #141013; transform: translateX(1px); }
.home-main { flex: 1; display: flex; }
.hero { position: relative; isolation: isolate; overflow: hidden; width: 100%; min-height: clamp(32rem, 74svh, 52rem); display: grid; align-items: center; background: #161924; border: 1px solid #352d33; border-radius: 1.1rem; }
.cover, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover { object-fit: cover; object-position: 64% 52%; z-index: -2; }
.hero::after { content: ''; z-index: -1; background: linear-gradient(90deg, #0b0c12f2, #0b0c12ac 41%, #0b0c121c 85%); }
.hero-copy { max-width: 46rem; padding: 3rem clamp(1.5rem, 6vw, 5.5rem); }
.eyebrow { color: var(--accent); text-transform: uppercase; font-weight: 750; letter-spacing: .13em; font-size: .875rem; }
h1 { margin: .2em 0; font-size: clamp(3.2rem, 8.6vw, 7.7rem); letter-spacing: -.075em; line-height: .96; overflow-wrap: anywhere; }
.intro { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 34ch; line-height: 1.55; }
.hero .intro { color: #e6dfe0; }
.button { min-height: 2.85rem; display: inline-flex; align-items: center; justify-content: center; padding: .64rem 1.12rem; font-weight: 750; border: 1px solid transparent; border-radius: .55rem; cursor: pointer; text-decoration: none; }
.primary { color: #160e0d; background: var(--accent); }
.primary:hover { color: #160e0d; background: #ff9a87; }
.hero .button { margin-top: .8rem; }
.foot { margin-top: auto; min-height: 4.65rem; color: var(--muted); font-size: .9rem; }
.main { flex: 1; max-width: 52rem; padding-block: clamp(2.5rem, 7vw, 6rem); }
.main h1 { font-size: clamp(2.85rem, 7vw, 5.75rem); }
.main .post-title { font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.04; }
.main > .intro { max-width: none; }
.entries, .empty { margin: 2.2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.empty { padding: 1.35rem 0; color: var(--muted); }
.entry { list-style: none; padding: 1.2rem 0 1.35rem; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.entry h2 { margin: .35rem 0; font-size: clamp(1.25rem, 3vw, 1.7rem); }
.entry h2 a { text-decoration: none; }
.entry p { margin: .3rem 0 0; color: var(--muted); line-height: 1.55; }
time { color: var(--muted); font-size: .9rem; }
.back { display: block; width: fit-content; margin-bottom: 1.5rem; color: var(--muted); }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.15rem; line-height: 1.75; margin-top: 1.7rem; }
.section-head, .editor-row, .form-actions { display: flex; gap: 1.2rem; align-items: center; justify-content: space-between; }
.section-head, .form-actions { flex-wrap: wrap; }
form { display: grid; gap: 1.25rem; margin-top: 1.75rem; }
label { display: grid; gap: .5rem; font-weight: 600; }
input, textarea, select { color: var(--ink); background: #1b1b20; border: 1px solid var(--line); border-radius: .5rem; padding: .72rem; width: 100%; }
textarea { resize: vertical; font-weight: 400; line-height: 1.55; }
select { max-width: 18rem; }
.form-actions { justify-content: flex-start; }
.danger, .error { color: #ff9587; }
.danger.solid { background: #842e24; color: var(--ink); }
.danger.solid:hover { background: #a63c30; }

[hidden] { display: none !important; }
.map-main { flex: 1; padding-block: 1.65rem 1rem; }
.map-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1.5rem; padding-bottom: 1.4rem; }
.map-heading h1 { font-size: clamp(2.6rem, 5.2vw, 4.8rem); margin-block: 0 .2em; }
.map-heading .intro { max-width: none; margin-block: .2rem 0; }
.city-filters, .point-links, .article-links { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.city-filter, .show-point { border: 1px solid var(--line); background: #1b1b20; color: var(--ink); cursor: pointer; }
.city-filter { min-height: 2.45rem; border-radius: 2rem; padding: .36rem .9rem; font-size: .9rem; }
.city-filter[aria-pressed='true'] { background: var(--accent); color: #160e0d; border-color: var(--accent); font-weight: 750; }
.city-filter:hover, .show-point:hover { border-color: var(--accent); }
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, .45fr); gap: 1rem; }
.map-panel, .map-list { position: relative; border: 1px solid var(--line); border-radius: .9rem; background: #19191d; }
.map-panel { overflow: hidden; min-height: clamp(28rem, 65svh, 42rem); isolation: isolate; }
#video-map { position: absolute; inset: 0; background: #22242b; font-family: inherit; }
#video-map .leaflet-tile-pane { filter: invert(.9) hue-rotate(170deg) brightness(.77) saturate(.72); }
#video-map .leaflet-control-attribution { background: #16161ded; color: #d3cbcb; font-size: .75rem; }
#video-map .leaflet-control-attribution a { color: #e7e0de; }
#video-map .leaflet-control-zoom a { background: #1b1b20; color: var(--ink); border-color: var(--line); }
#video-map .leaflet-control-zoom a:hover { color: var(--accent); }
.map-warning { position: absolute; left: 3.5rem; top: .25rem; right: 1rem; z-index: 450; padding: .6rem .8rem; border-radius: .35rem; background: #19191df5; color: var(--ink); font-size: .88rem; pointer-events: none; }
.map-list { max-height: clamp(28rem, 65svh, 42rem); overflow: auto; }
.map-list-header { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: .65rem; background: #19191d; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
.map-list-header h2, .point-name { margin: 0; font-size: 1.05rem; }
.map-count { color: var(--muted); font-size: .94rem; }
.map-empty { color: var(--muted); margin: 0; padding: 1.1rem; line-height: 1.55; }
.point-group { padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
.point-location, .popup-location { color: var(--muted); margin-block: .2rem .65rem; font-size: .88rem; }
.show-point { padding: .28rem .52rem; border-radius: .35rem; font-size: .88rem; }
.point-records { padding: 0; margin: .7rem 0 0; list-style: none; }
.point-records li { padding: .7rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.point-records li:last-child { padding-bottom: 0; }
.point-records h3 { margin: 0; font-size: 1rem; }
.point-records p { margin: .35rem 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.point-records .point-format, .point-records time { font-size: .82rem; }
.point-links { justify-content: flex-start; font-size: .9rem; gap: .3rem .8rem; }
.point-preview { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: .4rem; }
.video-marker span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; border: 2px solid #fff4ec; background: var(--accent); color: #160e0d; font-size: 1rem; font-weight: 800; box-shadow: 0 2px 9px #08080cd0; }
.video-marker .approximate-marker { background: #20232c; border: 2px dashed var(--accent); color: var(--ink); }
#video-map .leaflet-popup-content-wrapper, #video-map .leaflet-popup-tip { background: #19191d; color: var(--ink); }
#video-map .leaflet-popup-content { margin: .8rem 1.15rem; }
#video-map .leaflet-popup-content p { margin: .35rem 0; }
#video-map .leaflet-popup-content a { color: var(--ink); }
#video-map .leaflet-popup-content a:hover { color: var(--accent); }
#video-map .leaflet-popup-close-button { color: var(--muted); }
.entry-meta { margin-block: .2rem .5rem; color: var(--muted); font-size: .88rem; }
.blog-entry { display: flex; align-items: flex-start; gap: 1rem; }
.blog-thumbnail { flex: 0 0 clamp(6rem, 24%, 10rem); }
.blog-thumbnail img, .gallery img { display: block; width: 100%; border-radius: .55rem; background: #1b1b20; }
.blog-thumbnail img { aspect-ratio: 16 / 10; object-fit: cover; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .8rem; margin-top: 1.5rem; }
.gallery img { aspect-ratio: 16 / 10; object-fit: contain; }
.gallery figure { margin: 0; }
.gallery figcaption { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .1rem; color: var(--muted); font-size: .86rem; }
.article-links { margin-top: 1.5rem; gap: 1rem; }
.video-fields { display: grid; gap: .85rem; border: 1px solid var(--line); border-radius: .5rem; padding: 1rem; min-width: 0; }
.video-fields legend { color: var(--muted); padding-inline: .35rem; }
.form-hint { color: var(--muted); font-size: .875rem; margin: -.55rem 0 0; line-height: 1.45; }

@media (max-width: 38rem) {
  .wrap { width: calc(100% - 1.5rem); }
  .top { min-height: 4.4rem; }
  .top nav { gap: .75rem; }
  .hero { min-height: 32rem; align-items: end; border-radius: .85rem; }
  .hero::after { background: linear-gradient(0deg, #0b0c12 5%, #0b0c12bf 45%, #0b0c121c 95%); }
  .cover { object-position: 64% 34%; }
  .hero-copy { padding: 2rem 1.3rem; }
}

@media (max-width: 54rem) {
  .map-layout { grid-template-columns: 1fr; }
  .map-panel { min-height: clamp(22rem, 58svh, 36rem); }
  .map-list { max-height: none; overflow: visible; }
  .map-list-header { position: static; border-radius: .9rem .9rem 0 0; }
}
