:root {
  color-scheme: light;
  --fog: #edf2f4;
  --chalk: #f9faf9;
  --line: #bfcfd4;
  --ink: #1b303a;
  --soft: #45606b;
  --rust: #953218;
  --photo: #1b232c;
  color: var(--ink);
  background: var(--fog);
  font: 1rem/1.55 "Avenir Next", Avenir, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(1190px, 100% - 4rem); margin-inline: auto; }
.masthead { padding: 2.9rem 0 1.65rem; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2.65rem, 7vw, 5.25rem); line-height: .98; letter-spacing: -.072em; font-weight: 750; }
.workspace { display: grid; grid-template-columns: minmax(16rem, .85fr) minmax(0, 1.55fr); gap: 1.1rem; align-items: start; }
.map-panel, .frame-panel { background: var(--chalk); border: 1px solid var(--line); }
.panel-heading { min-height: 4.45rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.panel-heading h2 { font-size: 1.18rem; line-height: 1.2; letter-spacing: -.025em; }
.map-caption { font-size: .83rem; color: var(--soft); }
.area-picker { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .65rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.area-picker label { color: var(--soft); font-size: .83rem; font-weight: 650; }
.area-picker select { width: 100%; min-height: 42px; color: var(--ink); background: var(--chalk); border: 1px solid var(--line); border-radius: 4px; font: inherit; padding: .25rem .5rem; }
.map { display: grid; place-items: center; min-height: 320px; background: #e2edef; }
.map svg { width: 100%; display: block; max-height: 480px; }
.map-caption { padding: .7rem 1rem; }
.map-caption a { color: inherit; text-underline-offset: .16em; }
.photo-controls { min-height: auto; }
.photo-navigation { display: flex; gap: .45rem; }
.photo-navigation button { min-width: 44px; font-size: 1.05rem; }
.photo-navigation button:disabled { opacity: .4; cursor: default; }
.photo { background: var(--photo); min-height: 10rem; overflow: hidden; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; }
.photo img:not([src]) { visibility: hidden; }
button { color: var(--ink); border: 1px solid var(--line); cursor: pointer; font: inherit; font-size: .86rem; font-weight: 650; min-height: 42px; background: transparent; border-radius: 4px; padding: .3rem .75rem; }
button[aria-pressed="true"] { color: white; background: var(--rust); border-color: var(--rust); }
button:focus-visible, select:focus-visible { outline: 2px solid var(--rust); outline-offset: 3px; }
.map-pin { cursor: pointer; }
.pin-core { fill: var(--rust); stroke: var(--chalk); stroke-width: 1.5; }
.area-pin .pin-core { fill: var(--chalk); stroke: var(--rust); stroke-width: 3.5; }
.pin-ring { fill: none; stroke: var(--rust); stroke-width: 2; visibility: hidden; pointer-events: none; }
.map-pin[aria-pressed="true"] .pin-ring, .map-pin:focus-visible .pin-ring { visibility: visible; }
.map-pin:focus-visible .pin-ring { stroke: var(--ink); }
.map-pin:focus-visible { outline: none; }
.map-thumbnail { cursor: pointer; }
.thumbnail-background { fill: var(--photo); }
.thumbnail-outline { fill: none; stroke: var(--chalk); stroke-width: 2.25; pointer-events: none; }
.thumbnail-leader { stroke: var(--rust); stroke-width: 1.5; pointer-events: none; }
.map-thumbnail[aria-pressed="true"] .thumbnail-outline { stroke: var(--rust); stroke-width: 3.25; }
.map-thumbnail:focus-visible { outline: none; }
.map-thumbnail:focus-visible .thumbnail-outline { stroke: var(--ink); stroke-width: 4; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#load-error { margin-block: 1rem; }
@media (max-width: 690px) {
  main { width: calc(100% - 1.5rem); }
  .masthead { padding-top: 1.5rem; }
  .workspace { grid-template-columns: 1fr; gap: .65rem; }
  .map { min-height: auto; }
  .map svg { max-height: 300px; }
}
