:root { color-scheme: light dark; --hd-surface:light-dark(#fffdf8,#202724); --hd-text:light-dark(#232b27,#f1f0e9); --hd-muted:light-dark(#616861,#b7beb6); --hd-line:light-dark(#dddcd1,#454c45); --hd-soft:light-dark(#f1f0e8,#303831); --hd-ink:#e6c77d; --hd-past:#d5d9d4; --hd-future:#d9b8ea; }
[hidden] { display:none !important; }
.visually-hidden { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.historical-aerial { filter:contrast(.94) brightness(.82); }
.toolbar { position:absolute; z-index:1200; left:14px; top:14px; right:auto; display:flex; align-items:center; gap:6px; max-width:calc(100% - 110px); flex-wrap:nowrap; color:var(--hd-text); }
.toolbar .years, .toolbar .toolbar-icon, .search-menu, .layer-menu, .leaflet-control-zoom { background:var(--hd-surface); color:var(--hd-text); box-shadow:0 3px 18px #0004; border:1px solid var(--hd-line); border-radius:9px; }
.toolbar .years { display:flex; align-items:stretch; gap:0; height:42px; min-height:42px; padding:0; overflow:hidden; }
/* Year: arrows either side of the number. Span: a button naming the years of photographs on screen, with a menu. */
.toolbar .year-field { display:flex; align-items:stretch; gap:0; height:100%; padding:0; }
.toolbar .year-step { flex:none; display:grid; place-items:center; width:30px; min-width:0; min-height:0; height:100%; margin:0; padding:0; border:0; border-radius:0; background:transparent; color:var(--hd-muted); cursor:pointer; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; transition:background-color .12s, color .12s; }
.toolbar .year-step svg { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; transition:transform .08s; }
.toolbar .year-step:hover:not(:disabled) { background:var(--hd-soft); color:var(--hd-text); }
.toolbar .year-step.is-pressed, .toolbar .year-step:active:not(:disabled) { background:light-dark(#d9d7ca,#171d1a); color:var(--hd-text); box-shadow:inset 0 2px 4px light-dark(#0002,#0007); }
.toolbar .year-step.is-pressed svg, .toolbar .year-step:active:not(:disabled) svg { transform:scale(.9); }
.toolbar .year-step:disabled { cursor:default; opacity:.35; }
.toolbar .year-value { display:flex; align-items:center; cursor:text; }
.toolbar .years input { padding:5px 0; border:0; background:transparent; color:var(--hd-text); text-align:center; font:600 15px system-ui,sans-serif; font-variant-numeric:tabular-nums; }
.toolbar #target-year { width:46px; }
.toolbar .years input::-webkit-inner-spin-button,.toolbar .years input::-webkit-outer-spin-button { appearance:none; margin:0; }
.toolbar .years input[type=number] { -moz-appearance:textfield; appearance:textfield; }
.toolbar .year-span { flex:none; display:flex; align-items:center; gap:6px; min-width:0; min-height:0; height:100%; margin:0; padding:0 10px 0 11px; border:0; border-left:1px solid var(--hd-line); border-radius:0; background:transparent; color:var(--hd-text); font:500 13px system-ui,sans-serif; font-variant-numeric:tabular-nums; white-space:nowrap; cursor:pointer; }
.toolbar .year-span svg { width:10px; height:10px; fill:none; stroke:var(--hd-muted); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; transition:transform .15s; }
.toolbar .year-span:hover, .toolbar .year-span[aria-expanded="true"] { background:var(--hd-soft); }
.toolbar .year-span[aria-expanded="true"] svg { transform:rotate(180deg); }
.year-span-menu { position:fixed; z-index:1300; width:min(250px,calc(100vw - 16px)); padding:7px; background:var(--hd-surface); color:var(--hd-text); border:1px solid var(--hd-line); border-radius:9px; box-shadow:0 3px 18px #0004; font:12px/1.4 system-ui,sans-serif; }
.year-span-heading { margin:3px 7px 5px; color:var(--hd-muted); font:600 11px system-ui,sans-serif; letter-spacing:.03em; }
.year-span-menu .year-span-option { position:relative; display:flex; align-items:baseline; justify-content:space-between; gap:10px; width:100%; min-height:38px; margin:0; padding:7px 8px 7px 30px; border:0; border-radius:6px; background:transparent; color:var(--hd-text); text-align:left; font:inherit; cursor:pointer; }
.year-span-option::before { content:''; position:absolute; left:9px; top:50%; width:11px; height:11px; margin-top:-7px; border:1.5px solid var(--hd-muted); border-radius:50%; box-sizing:border-box; }
.year-span-option[aria-checked="true"]::before { border-color:var(--hd-text); background:var(--hd-text); box-shadow:inset 0 0 0 2px var(--hd-surface); }
.year-span-menu .year-span-option:hover, .year-span-menu .year-span-option:focus-visible { background:var(--hd-soft); outline:none; }
.year-span-years { font:600 13px system-ui,sans-serif; font-variant-numeric:tabular-nums; white-space:nowrap; }
.year-span-detail { color:var(--hd-muted); font-size:11px; text-align:right; }
.year-span-note { margin:6px 7px 3px; padding-top:7px; border-top:1px solid var(--hd-line); color:var(--hd-muted); font-size:11px; }
/* The number rolls the way it moved, like a counter. */
@keyframes stepper-roll-up { from { transform:translateY(45%); opacity:.3; } }
@keyframes stepper-roll-down { from { transform:translateY(-45%); opacity:.3; } }
.toolbar .years input.is-rolling-up { animation:stepper-roll-up .14s ease-out; }
.toolbar .years input.is-rolling-down { animation:stepper-roll-down .14s ease-out; }
@media (prefers-reduced-motion:reduce) { .toolbar .years input { animation:none !important; } .toolbar .year-step, .toolbar .year-step svg, .toolbar .year-span svg { transition:none; } }
.toolbar .places-search, .toolbar .layers { position:relative; flex:none; margin:0; }
.toolbar .toolbar-icon { width:42px; height:42px; min-height:42px; padding:0; display:grid; place-items:center; cursor:pointer; list-style:none; }
.toolbar .toolbar-icon::-webkit-details-marker { display:none; }
.toolbar .toolbar-icon::after { content:none; }
.toolbar .toolbar-icon svg { display:block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.toolbar details[open] > .toolbar-icon, .toolbar .toolbar-icon:hover { background:var(--hd-soft); }
.search-menu,.layer-menu { position:fixed; z-index:8; left:14px; right:auto; top:64px; width:min(280px,calc(100vw - 28px)); max-height:calc(100vh - 80px); max-height:calc(100dvh - 80px); overflow-y:auto; padding:13px; font:12px/1.4 system-ui,sans-serif; }
.search-menu { display:block; }
.layer-menu { display:grid; gap:13px; }
.layer-section { display:grid; gap:8px; }
.layer-section + .layer-section { border-top:1px solid var(--hd-line); padding-top:10px; }
.layer-heading, .jump-area { display:block; color:var(--hd-muted); font:600 11px system-ui,sans-serif; letter-spacing:.03em; }
.search-menu #historic-places-search { display:block; width:100%; min-height:40px; padding:9px 10px; border:1px solid var(--hd-line); background:var(--hd-surface); color:var(--hd-text); border-radius:6px; font:16px system-ui,sans-serif; }
#historic-places-controls:not([hidden]) { display:block; }
#historic-places-status { margin:8px 0 0; color:var(--hd-muted); font:11px/1.3 system-ui,sans-serif; }
.search-menu #historic-places-results { list-style:none; padding:0; margin:7px 0 8px; max-height:min(33vh,240px); overflow-y:auto; }
#historic-places-results button { display:flex; align-items:center; gap:11px; width:100%; min-height:41px; padding:7px 8px; border:0; border-radius:5px; background:transparent; color:var(--hd-text); text-align:left; font:13px system-ui,sans-serif; }
#historic-places-results button:hover,#historic-places-results button:focus-visible { background:var(--hd-soft); }
.search-menu .jump-area { padding:9px 0 5px; border-top:1px solid var(--hd-line); }
.search-menu #places { display:block; width:100%; max-width:none; min-height:38px; padding:7px 8px; color:var(--hd-text); border:1px solid var(--hd-line); border-radius:6px; background:var(--hd-surface); font:13px system-ui,sans-serif; }
.layer-menu .place-legend { display:grid; grid-template-columns:1fr; gap:13px; padding:0; color:var(--hd-muted); font-size:12px; }
.layer-menu .place-legend > span { display:flex; gap:12px; align-items:center; }
.layer-menu .place-legend .historic-place-marker { margin:0 5px; flex:none; }
.layer-menu .toggle { display:flex; align-items:center; gap:10px; min-height:30px; color:var(--hd-text); font-size:12px; }
.layer-menu .toggle input { width:17px; height:17px; margin:0; accent-color:var(--hd-ink); }
.layer-menu select { width:100%; min-height:38px; padding:7px; border:1px solid var(--hd-line); border-radius:6px; background:var(--hd-surface); color:var(--hd-text); }
.layer-menu p { margin:0; color:var(--hd-muted); font:12px/1.4 system-ui,sans-serif; }
.layer-menu p:empty { display:none; }
.layer-menu a { color:var(--hd-text); }
/* A compact, scrollable single-line attribution keeps every source link. */
.map-footer { position:absolute; z-index:500; left:0; right:0; bottom:0; width:100%; max-width:none; min-height:0; padding:3px 10px; display:block; background:#17241de8; color:#e4e8dd; pointer-events:auto; }
.map-footer .footer-attribution { display:block; max-width:100%; overflow-x:auto; overflow-y:hidden; white-space:nowrap; scrollbar-width:thin; scrollbar-color:#a9b3a9 transparent; overscroll-behavior-x:contain; color:#e4e8dd; }
.map-footer .footer-attribution::-webkit-scrollbar { height:3px; }
.map-footer .footer-attribution::-webkit-scrollbar-thumb { background:#a9b3a9; border-radius:3px; }
.map-footer .leaflet-control-attribution { float:none; display:inline-block; margin:0; padding:0; background:transparent; color:#e4e8dd; font:11px/1.3 system-ui,sans-serif !important; white-space:nowrap; }
.map-footer .leaflet-control-attribution a { color:#e4e8dd; }
.map-notices { position:absolute; z-index:1150; top:63px; left:14px; display:flex; flex-direction:column; align-items:flex-start; gap:5px; max-width:min(360px,calc(100% - 28px)); pointer-events:none; }
.map-notices .map-status, .map-notices .marina-reference-status { max-width:100%; padding:6px 9px; border:1px solid var(--hd-line); border-radius:6px; background:var(--hd-surface); color:var(--hd-text); box-shadow:0 3px 18px #0004; font:11px/1.35 system-ui,sans-serif; }
.map-notices .map-status:not(.is-visible) { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; box-shadow:none; }
.layer-menu .map-help summary { display:flex; justify-content:space-between; width:100%; min-height:34px; padding:4px 0; border:0; background:transparent; color:var(--hd-text); font:12px/1.4 system-ui,sans-serif; }
.layer-menu .map-help summary::after { content:'▾'; color:var(--hd-muted); }
.layer-menu .map-help summary:hover, .layer-menu .map-help summary:focus-visible { color:var(--hd-text); background:var(--hd-soft); }
.layer-menu .map-help-text { position:static; width:auto; padding:5px 0 0; border:0; border-radius:0; background:transparent; box-shadow:none; color:var(--hd-muted); font:12px/1.4 system-ui,sans-serif; }
.layer-menu .map-help-text p + p { margin-top:8px; }
.leaflet-bottom.leaflet-right { bottom:calc(var(--map-footer-height,32px) + 14px); right:14px; }
.leaflet-bottom.leaflet-right .leaflet-control { margin:0; }
.leaflet-control-zoom { overflow:hidden; }
.leaflet-container .leaflet-control-zoom a { display:grid; place-items:center; width:38px; height:37px; line-height:1; border:0; color:var(--hd-text); background:var(--hd-surface); font:23px/1 system-ui,sans-serif; }
.leaflet-container .leaflet-control-zoom a + a { border-top:1px solid var(--hd-line); }
.leaflet-container .leaflet-control-zoom a:hover,.leaflet-container .leaflet-control-zoom a:focus-visible { background:var(--hd-soft); }
.leaflet-container .leaflet-control-zoom a svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
@media(max-width:540px) {
 .toolbar { left:10px; top:10px; right:auto; gap:5px; max-width:calc(100% - 95px); }
 .toolbar .toolbar-icon,.toolbar .years { min-height:42px; height:42px; }
 .toolbar .layers { margin:0; }
 .search-menu,.layer-menu { left:10px; right:auto; top:59px; max-height:calc(100dvh - 90px); width:min(280px,calc(100vw - 20px)); }
 .map-footer { padding:3px 8px; }
 .map-footer .leaflet-control-attribution { font-size:10px !important; }
 .map-notices { left:10px; top:59px; max-width:calc(100% - 20px); }
 .leaflet-bottom.leaflet-right { right:10px; bottom:calc(var(--map-footer-height,32px) + 12px); }
}
@media(pointer:coarse) {
 .toolbar .toolbar-icon,.toolbar .years { min-height:44px; height:44px; }
 .toolbar .year-step { width:34px; }
 .leaflet-container .leaflet-control-zoom a { width:44px; height:44px; }
 .layer-menu .toggle,#historic-places-results button { min-height:44px; }
}
/* Phones: the year, the span and the four toolbar buttons share one row. */
@media(max-width:540px) {
 .toolbar .year-step { width:24px; }
 .toolbar #target-year { width:40px; font-size:14px; }
 .toolbar .year-span { gap:3px; padding:0 7px 0 8px; font-size:12px; }
}
