/* Schriften aus dem Bombelli-Auftritt (beide SIL Open Font License): Schibsted Grotesk für die Bedienung,
   Literata für Titel, Jahreszahlen und Wahrzeichen. */
@font-face { font-family: "Schibsted Grotesk"; src: url("../public/fonts/SchibstedGrotesk-normal-latin.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../public/fonts/SchibstedGrotesk-normal-latin-ext.woff2") format("woff2"); font-weight: 400 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; src: url("../public/fonts/Literata-latin.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; src: url("../public/fonts/Literata-latin-ext.woff2") format("woff2"); font-weight: 200 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; src: url("../public/fonts/Literata-italic-latin.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }
:root {
  --panel: rgba(247, 249, 246, 0.88);
  --panel-solid: #f7f9f6;
  --field: #ffffff;
  --ink: #17211c;
  --ink-2: #44524a;
  --ink-3: #5f6d65;
  --rule: rgba(23, 33, 28, 0.12);
  --chip: rgba(23, 33, 28, 0.06);
  --accent: #b8252b;
  --accent-ink: #ffffff;
  --accent-soft: rgba(184, 37, 43, 0.12);
  --c1: #b8252b; --c2: #2f6db0; --c3: #c08a1a;
  --shadow: 0 1px 1px rgba(16, 30, 22, .05), 0 14px 34px -10px rgba(16, 30, 22, .28);
  --f-display: "Literata", Georgia, "Times New Roman", serif;
  --f-ui: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-data: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;   /* Zahlen mit Tabellenziffern (.num), keine Schreibmaschinenschrift */
  --r-panel: 12px; --r-ctl: 6px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --panel: rgba(16, 22, 30, 0.84); --panel-solid: #121923; --field: #0c121a;
  --ink: #e9eef1; --ink-2: #b3bec6; --ink-3: #8f9ca6;
  --rule: rgba(233, 238, 241, 0.14); --chip: rgba(233, 238, 241, 0.08);
  --accent: #ee6a62; --accent-ink: #1d0d0b; --accent-soft: rgba(238, 106, 98, 0.18);
  --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 14px 34px -10px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
[hidden] { display: none !important; }
body { background: #b6d3e8; color: var(--ink); font: 14px/1.45 var(--f-ui); overflow: hidden; -webkit-font-smoothing: antialiased; }
input, button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-family: var(--f-data); font-variant-numeric: tabular-nums; }
.note { font-size: 12px; color: var(--ink-3); margin: 6px 0 0; }
.label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; display: block; margin: 8px 0 4px; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 10px 0 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

#app { position: fixed; inset: 0; overflow: hidden; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; cursor: grab; }
#scene:active { cursor: grabbing; }
#labels, #weather-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 3; }
#scene-transition { position: absolute; inset: 0; z-index: 4; background: var(--panel-solid); opacity: 0; pointer-events: none; transition: opacity .55s ease; }
#scene-transition.is-covering { opacity: 1; transition: none; }
#navigation-hint { position: absolute; inset: 0; z-index: 19; display: grid; place-items: end center; padding: 16px 16px 120px; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
#navigation-hint.is-visible { opacity: 1; }
#navigation-hint.is-leaving { opacity: 0; transition-duration: .8s; }
.navigation-hint-card { width: min(270px, calc(100vw - 32px)); padding: 12px 16px 14px; border: 1px solid rgba(226, 235, 241, .2); border-radius: 12px; background: rgba(17, 25, 32, .78); color: #f5f8fa; text-align: center; box-shadow: 0 12px 36px rgba(0, 0, 0, .26); backdrop-filter: blur(12px) saturate(130%); -webkit-backdrop-filter: blur(12px) saturate(130%); opacity: 0; transform: scale(.96); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
#navigation-hint.is-visible .navigation-hint-card { opacity: 1; transform: scale(1); }
#navigation-hint.is-leaving .navigation-hint-card { opacity: 0; transform: scale(.98); }
.navigation-hint-card h2 { margin: 0; font: 650 15px/1.3 var(--f-display); }
.navigation-hint-card p { min-height: 18px; margin: 3px 0 0; color: #c6d4dc; font-size: 12px; transition: opacity .14s ease, transform .14s ease; }
.navigation-hint-card p.is-changing { opacity: 0; transform: translateY(3px); }
.hint-gesture { display: block; width: 100%; height: 100px; margin: 0 auto 3px; overflow: visible; color: #91c6c4; }
.hint-grid { opacity: .18; }
.hint-cue { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .08; transition: opacity .28s ease; }
.hint-gesture[data-phase="pan"] .hint-pan-cue, .hint-gesture[data-phase="orbit"] .hint-orbit-cue, .hint-gesture[data-phase="zoom"] .hint-zoom-cue { opacity: 1; }
.hint-mouse { transform-box: view-box; transform-origin: center; }
.hint-mouse-body { fill: rgba(255,255,255,.08); stroke: rgba(245,248,250,.88); stroke-width: 2; }
.hint-mouse-button { fill: rgba(255,255,255,.04); stroke: rgba(245,248,250,.5); stroke-width: 1.2; transition: fill .2s ease; }
.hint-mouse-seam { stroke: rgba(245,248,250,.56); stroke-width: 1.2; }
.hint-mouse-wheel { fill: #d6e6e8; transform-box: fill-box; transform-origin: center; }
.hint-gesture[data-phase="pan"] .hint-mouse-left, .hint-gesture[data-phase="orbit"] .hint-mouse-right, .hint-gesture[data-phase="zoom"] .hint-mouse-wheel { fill: var(--accent); }
.hint-gesture[data-phase="pan"] .hint-mouse { animation: hint-pan 1.2s ease-in-out both; }
.hint-gesture[data-phase="orbit"] .hint-mouse { animation: hint-orbit 1.2s ease-in-out both; }
.hint-gesture[data-phase="zoom"] .hint-mouse { animation: hint-zoom 1.2s ease-in-out both; }
.hint-touch { display: none; }
#navigation-hint[data-input="touch"] .hint-mouse { display: none; }
#navigation-hint[data-input="touch"] .hint-touch { display: block; }
#navigation-hint[data-input="touch"] .hint-gesture[data-phase="pan"] .hint-touch { animation: hint-touch-pan 1.2s ease-in-out both; }
#navigation-hint[data-input="touch"] .hint-gesture[data-phase="orbit"] .hint-touch { animation: hint-touch-orbit 1.2s ease-in-out both; }
#navigation-hint[data-input="touch"] .hint-gesture[data-phase="zoom"] .hint-touch { animation: hint-touch-zoom 1.2s ease-in-out both; }
#navigation-hint[data-reduced="true"] .hint-cue { opacity: .72; }
@keyframes hint-pan { 0%,100% { transform: translateX(0); } 24% { transform: translateX(-28px); } 72% { transform: translateX(28px); } }
@keyframes hint-orbit { 0%,100% { transform: translate(0,0) rotate(0); } 35% { transform: translate(20px,-8px) rotate(8deg); } 72% { transform: translate(-15px,-18px) rotate(-7deg); } }
@keyframes hint-zoom { 0%,100% { transform: translateY(0) scale(1); } 35% { transform: translateY(-4px) scale(1.08); } 70% { transform: translateY(4px) scale(.96); } }
@keyframes hint-touch-pan { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-24px); } 70% { transform: translateX(24px); } }
@keyframes hint-touch-orbit { 0%,100% { transform: rotate(0); } 50% { transform: rotate(18deg); } }
@keyframes hint-touch-zoom { 0%,100% { transform: scale(1); } 50% { transform: scale(1.32); } }
.plabel { position: absolute; left: 0; top: 0; font: 600 11.5px var(--f-ui); color: #16201b; white-space: nowrap; letter-spacing: .01em;
  text-shadow: 0 0 2px #fff, 0 0 4px #fff, 0 0 8px rgba(255,255,255,.8); will-change: transform; }
.plabel.big { font: 700 17px var(--f-display); }
.plabel.landmark { font: 700 13px var(--f-display); color: #3a1d14; }
:root[data-theme="dark"] .plabel.landmark { color: #ffe7d6; }
:root[data-theme="dark"] .plabel { color: #f1f4f2; text-shadow: 0 0 3px #0b1220, 0 0 6px #0b1220; }

.panel { position: absolute; background: var(--panel); border: 0; border-radius: var(--r-panel); box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); transition: background-color .6s, color .6s; }
@media (prefers-reduced-transparency: reduce) { .panel { background: var(--panel-solid); backdrop-filter: none; } }

.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink-2); font-size: 17px; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--chip); color: var(--ink); }
.icon-btn.on { background: var(--accent); color: var(--accent-ink); }
.btn { border: 1px solid var(--rule); background: var(--field); border-radius: 999px; padding: 5px 13px; font-size: 13px; font-weight: 500; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg button, .chips button { border: 1px solid var(--rule); background: var(--field); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; color: var(--ink-2); }
.seg button:hover, .chips button:hover { color: var(--ink); border-color: var(--ink-3); }
.seg button.on, .chips button[aria-checked="true"] { background: var(--ink); color: var(--panel-solid); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
select, input[type="date"], input[type="search"] { background: var(--field); border: 1px solid var(--rule); border-radius: var(--r-ctl); padding: 6px 9px; }
select.wide { width: 100%; }

#brand, #clock-btn, #view-panel { height: 48px; }
#brand { top: 14px; left: 14px; width: 320px; padding: 5px 7px; z-index: 5; }
#mobile-tools-toggle { display: none; }
#mobile-tools-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search { position: relative; }
.search input { display: block; width: 100%; height: 36px; }
.search.can-share input { padding-right: 38px; }
#search-share { position: absolute; top: 50%; right: 3px; transform: translateY(-50%); width: 30px; height: 30px; color: var(--accent); }
#search-share svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
#share-menu { position: absolute; right: 0; top: calc(100% + 4px); display: grid; min-width: 180px; padding: 4px; background: var(--panel-solid); border: 1px solid var(--rule); border-radius: var(--r-ctl); box-shadow: var(--shadow); z-index: 9; }
#search-share[hidden], #share-menu[hidden], #share-menu button[hidden] { display: none; }
#share-menu button { border: 0; background: none; color: var(--ink); text-align: left; padding: 8px 10px; border-radius: 6px; font: inherit; cursor: pointer; }
#share-menu button:hover, #share-menu button:focus-visible { background: var(--accent-soft); }
#search-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; max-height: 320px; overflow: auto;
  background: var(--panel-solid); border: 1px solid var(--rule); border-radius: var(--r-ctl); box-shadow: var(--shadow); z-index: 8; }
#search-results li { padding: 6px 8px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
#search-results li:hover, #search-results li.active { background: var(--accent-soft); }
#search-results li.search-notice { cursor: default; display: block; color: var(--ink-2); font-size: 13px; }
#search-results li.search-notice:hover { background: none; }
#search-results small { color: var(--ink-3); white-space: nowrap; }

#clock-btn { top: 14px; left: calc(50% - 18px); transform: translateX(-50%); width: 340px; padding: 7px 10px; display: grid; grid-template-columns: 136px minmax(0, 1fr) 24px; align-items: center; gap: 8px; z-index: 5; cursor: pointer; }
#clock-btn:hover, #clock-btn[aria-expanded="true"] { border-color: var(--ink-3); }
#clock-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#clock-time { display: block; width: 136px; overflow: hidden; font-size: 20px; font-weight: 500; white-space: nowrap; }
#clock-wx { display: block; min-width: 0; overflow: hidden; font-size: 12.5px; color: var(--ink-2); text-overflow: ellipsis; white-space: nowrap; }
.clock-chevron { display: block; width: 21px; height: 21px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease, color .18s ease, background-color .18s ease; }
#clock-btn:hover .clock-chevron, #clock-btn[aria-expanded="true"] .clock-chevron { color: var(--ink); background: var(--chip); }
#clock-btn[aria-expanded="true"] .clock-chevron { transform: rotate(180deg); }
#sky-panel { top: 62px; left: 50%; transform: translateX(-50%); width: min(400px, calc(100% - 28px)); padding: 14px 16px; z-index: 6; }
#sky-panel { display: flex; flex-direction: column; max-height: min(84vh, 740px); overflow: hidden; padding: 0; }
.sky-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; padding: 12px 14px 9px; border-bottom: 1px solid var(--rule); }
.sky-head .profile-eyebrow { display: block; margin: 0 0 2px; font-size: 9px; }
.sky-head h2 { font: 700 17px var(--f-display); }
#sky-panel-content { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 2px 14px 12px; }
.sky-section { padding: 9px 0 11px; border-bottom: 1px solid var(--rule); }
.sky-section:last-child { border-bottom: 0; }
.sky-section > h3 { margin: 0 0 7px; font-size: 13px; }
.mode-segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.mode-segmented button { min-width: 0; padding: 6px 4px; font-size: 11px; }
.mode-segmented button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sky-summary { margin: 0; color: var(--ink-2); font-size: 12px; }
.sky-controls { min-width: 0; margin: 0; padding: 0; border: 0; }
.sky-controls legend { padding: 0; margin: 0 0 3px; }
.sky-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.sky-row input[type="range"] { min-width: 0; flex: 1; accent-color: var(--accent); }
.sky-row input[type="date"] { min-width: 0; padding: 4px 7px; border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--field); }
.sky-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
.sky-metrics > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; padding: 2px 0; }
.sky-metrics > div > span { color: var(--ink-3); font-size: 11px; }
.sky-metrics > div > strong { min-width: 0; color: var(--ink); font-size: 12px; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.weather-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px 10px; }
.weather-metrics > div { display: block; }
.weather-metrics > div > span, .weather-metrics > div > strong { display: block; text-align: left; }
.weather-metrics > div > strong { margin-top: 1px; }
.sky-attribution { margin: 5px 0 0; font-size: 10px; }
.pollen-metrics { margin-top: 5px; }
#sky-panel fieldset:disabled { opacity: .72; }
#sky-panel fieldset:disabled button, #sky-panel fieldset:disabled summary { cursor: not-allowed; }
.sky-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.sky-row input[type="range"] { flex: 1; accent-color: var(--accent); }
#sun-info { display: block; margin: 4px 0 0; }
#sun-info { margin-left: auto; margin-top: 0; }
#weather-mode { margin: 6px 0; }
#weather-mode button { min-width: 90px; }
#weather-effects { padding: 4px 0 2px; }
#weather-effects > summary { text-transform: none; letter-spacing: 0; font-size: 12px; }
#weather-effect-chips { padding-top: 6px; }

#view-panel { top: 14px; right: 14px; display: flex; align-items: center; gap: 4px; padding: 5px 7px; z-index: 5; }
#view-panel .toolbar-button { position: relative; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 6px; }
.toolbar-icon { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toolbar-pin { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.toolbar-button:hover { background: var(--chip); color: var(--ink); }
.toolbar-button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.toolbar-button:focus-visible, .toolbar-position:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.toolbar-divider { display: block; flex: 0 0 1px; width: 1px; height: 22px; margin: 0 2px; background: var(--rule); }
.toolbar-position { position: relative; display: flex; align-items: center; gap: 5px; min-width: 0; padding: 3px 6px; border: 1px solid var(--rule); border-radius: var(--r-ctl); background: var(--field); color: var(--ink-2); }
.toolbar-position:focus-within { border-color: var(--accent); }
#preset-select { max-width: 150px; min-width: 0; padding: 3px 3px; border: 0; background: transparent; color: var(--ink); font-size: 12px; }
#view-panel [data-tooltip]::after { content: attr(data-tooltip); position: absolute; top: calc(100% + 7px); left: 50%; z-index: 25; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel-solid); color: var(--ink); box-shadow: var(--shadow); font: 500 11px/1.3 var(--f-ui); white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-50%, -3px); transition: opacity .14s ease, transform .14s ease, visibility .14s; }
#view-panel [data-tooltip]:hover::after, #view-panel [data-tooltip]:focus-visible::after, #view-panel [data-tooltip]:focus-within::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#view-panel .toolbar-position[data-tooltip]::after { left: auto; right: 0; transform: translateY(-3px); }
#view-panel .toolbar-position[data-tooltip]:hover::after, #view-panel .toolbar-position[data-tooltip]:focus-within::after { transform: translateY(0); }
#map-dock { left: 14px; bottom: 14px; z-index: 8; display: flex; align-items: stretch; gap: 4px; padding: 7px; max-width: calc(100vw - 28px); }
#base-map-cards { position: relative; flex: 0 0 82px; width: 82px; height: 96px; overflow: visible; transition: width .24s ease, flex-basis .24s ease; }
#quick-access { display: flex; align-items: stretch; gap: 4px; }
#base-map-cards[data-open="true"] { flex-basis: 246px; width: 246px; }
.map-card { width: 78px; display: grid; justify-items: center; gap: 4px; padding: 2px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink-2); font-size: 10.5px; font-weight: 600; }
.map-card-preview { flex: none; }
#base-map-cards .map-card { position: absolute; left: 0; bottom: 0; height: 96px; z-index: 1; transition: transform .24s ease, opacity .18s ease; }
#base-map-cards[data-open="false"] .map-card:not([aria-pressed="true"]) { visibility: hidden; opacity: 0; pointer-events: none; }
#base-map-cards[data-open="false"] .map-card[aria-pressed="true"] { z-index: 4; transform: none; }
#base-map-cards[data-open="false"] .map-card[aria-pressed="true"]::after { content: ""; position: absolute; top: 9px; right: 10px; width: 13px; height: 8px; border: 1px solid var(--ink-2); border-radius: 2px; background: var(--panel-solid); transform: skewY(-25deg); box-shadow: 0 3px 0 -1px var(--panel-solid), 0 3px 0 0 var(--ink-2), 0 6px 0 -1px var(--panel-solid), 0 6px 0 0 var(--ink-2); }
#base-map-cards[data-open="false"] [data-base="sim"]:not([aria-pressed="true"]) { z-index: 2; transform: translate(8px, -5px) scale(.94); }
#base-map-cards[data-open="false"] [data-base="aerial"]:not([aria-pressed="true"]) { z-index: 1; transform: translate(16px, -10px) scale(.88); }
#base-map-cards[data-open="false"] [data-base="map"]:not([aria-pressed="true"]) { z-index: 2; transform: translate(8px, -5px) scale(.94); }
#base-map-cards[data-open="true"] [data-base="sim"] { transform: translateX(0); z-index: 1; }
#base-map-cards[data-open="true"] [data-base="aerial"] { transform: translateX(82px); z-index: 1; }
#base-map-cards[data-open="true"] [data-base="map"] { transform: translateX(164px); z-index: 1; }
.map-card:hover { background: var(--chip); color: var(--ink); }
.map-card[aria-pressed="true"] { color: var(--accent); }
.map-card[aria-pressed="true"] .map-card-preview { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.map-card-preview { position: relative; display: block; width: 64px; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--rule); border-radius: 6px; background: var(--chip); }
.map-card-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-sim::after { content: ""; position: absolute; inset: 0; background: rgba(64, 98, 55, .3); mix-blend-mode: color; pointer-events: none; }
.preview-aerial img { filter: saturate(1.08) contrast(1.06); }
.preview-topo { background: #e8e4d8; }
#quick-access { width: 0; overflow: hidden; opacity: 0; visibility: hidden; transition: width .22s ease, opacity .18s ease; }
#map-dock[data-expanded="true"] #quick-access { width: 320px; opacity: 1; visibility: visible; }
.quick-card { display: grid; align-content: center; justify-items: center; gap: 3px; width: 74px; min-width: 68px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-2); font-size: 10.5px; font-weight: 600; }
.quick-card > span { display: grid; place-items: center; width: 64px; aspect-ratio: 1; border-radius: 6px; background: var(--chip); color: var(--ink); font-size: 28px; }
.quick-card svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.quick-card:hover, .quick-card[aria-expanded="true"] { background: var(--accent-soft); color: var(--ink); }
.quick-card[aria-expanded="true"] > span { background: var(--accent); color: var(--accent-ink); }
body.map-details-open #map-dock #quick-access { width: 0 !important; opacity: 0; visibility: hidden; pointer-events: none; }
#quick-panel { position: fixed; left: 14px; bottom: 120px; width: min(350px, calc(100vw - 28px)); max-height: min(58vh, 520px); overflow: auto; padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--panel-solid); box-shadow: var(--shadow); }
#quick-panel[data-mode="buildings"], #quick-panel[data-mode="traffic"] { top: 110px; bottom: 14px; width: min(460px, calc(100vw - 28px)); max-height: none; }
#quick-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
#quick-panel h2, #layers-panel h2 { font: 700 16px var(--f-display); }
.quick-layer-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: min(100%, 360px); }
.quick-layer-toggle { display: flex; align-items: center; gap: 7px; min-height: 32px; cursor: pointer; font-size: 12px; }
.quick-layer-toggle input { accent-color: var(--accent); }
#layers-panel { left: 14px; right: auto; bottom: 136px; width: min(460px, calc(100vw - 28px)); max-height: calc(100% - 180px); z-index: 7; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.map-details-head { display: flex; align-items: center; justify-content: space-between; flex: none; padding: 14px 18px 10px; border-bottom: 1px solid var(--rule); }
.map-details-head .profile-eyebrow { margin-bottom: 0; }
.map-details-head h2 { font-size: 19px !important; }
.map-details-scroll { min-height: 0; padding: 12px 18px 18px; overflow: auto; }
.map-details-section { padding: 10px 0 14px; border-bottom: 1px solid var(--rule); }
.map-details-section > h3 { margin: 0 0 8px; font-size: 14px; }
#layer-list, #analysis-layer-list, #display-layer-list { display: block; }
.map-details-layers .layer-group, #analysis-layer-list .layer-group, #display-layer-list .layer-group { min-width: 0; }
.map-details-display .building-mode-controls { margin-top: 5px; }
.map-details-tools #tool-list { margin-bottom: 6px; }
.control-state { display: none !important; }
.building-toggle-bar { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; margin: 4px 0 12px; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--field); cursor: pointer; }
.building-toggle-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.building-toggle-track { position: relative; grid-column: 1; display: block; width: 36px; height: 21px; border-radius: 999px; background: var(--ink-3); transition: background-color .2s; }
.building-toggle-track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.building-toggle-input:checked + .building-toggle-track { background: var(--accent); }
.building-toggle-input:checked + .building-toggle-track::after { transform: translateX(15px); }
.building-toggle-input:focus-visible + .building-toggle-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.building-toggle-label { grid-column: 2; min-width: 0; font-size: 13px; font-weight: 600; }
.quick-building-toggle { grid-template-columns: 38px; width: 72px; justify-self: start; }
.building-toggle-state { color: var(--ink-3); font-size: 11px; font-weight: 600; }
.building-mode-controls { display: block; min-width: 0; max-height: 560px; margin: 0; padding: 0; border: 0; opacity: 1; visibility: visible; overflow: visible; transition: max-height .25s ease, opacity .2s ease, margin .25s ease, visibility 0s; }
.building-mode-controls legend { margin-bottom: 6px; }
.building-mode-controls.is-collapsed { max-height: 0; margin: 0; opacity: 0; visibility: hidden; overflow: hidden; pointer-events: none; transition-delay: 0s, 0s, 0s, .25s; }
.building-mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 7px; width: min(100%, 360px); aspect-ratio: 1; }
.building-mode-tile, .layer-row { --selector-preview-height: 56px; }
.building-mode-tile { position: relative; display: grid; grid-template-rows: var(--selector-preview-height) minmax(2.4em, 1fr); gap: 3px; min-width: 0; min-height: 0; padding: 6px; overflow: hidden; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink-2); text-align: left; font-size: 10.5px; line-height: 1.2; }
.building-mode-tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); }
.building-mode-tile:disabled { cursor: not-allowed; }
.building-mode-tile:disabled .building-mode-preview { opacity: .35; }
.building-mode-label { min-width: 0; overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
.building-mode-preview { display: block; width: 100%; height: var(--selector-preview-height); min-height: 0; border-radius: 6px; background: var(--chip); }
.building-mode-controls.is-collapsed #color-legend { visibility: hidden; }
.preview-dorf { background: linear-gradient(135deg, rgba(187, 116, 76, .5), rgba(60, 96, 68, .35)), url("../public/data/ortho.jpg") center/cover; }
.preview-neutral { background: linear-gradient(135deg, #dedbd3 0 48%, #bdbdb7 49% 100%); }
.preview-usage { background: linear-gradient(90deg, #d98c5f 0 25%, #b05a9c 25% 50%, #4f81bd 50% 75%, #7b7f86 75%); }
.preview-year { background: linear-gradient(90deg, #6c6579, #739a95, #d2bd72, #af5241); }
.preview-height { background: linear-gradient(90deg, #286da8, #68b4b4, #f0d35e, #cb4737); }
.preview-floors, .preview-dwellings, .preview-heat { background: linear-gradient(90deg, #e6d8b4, #d59a54, #c95844, #762d3d); }
.preview-status { background: linear-gradient(90deg, #3d8c64, #bf9a38, #c85243, #7e7f80); }
#timeline-year-display { position: absolute; top: 18px; left: 20px; z-index: 9; pointer-events: none; color: var(--ink); }
#timeline-year-display span { display: block; color: var(--ink-2); font-size: 12px; font-weight: 700; }
#timeline-year { display: block; font: 600 68px/1.05 var(--f-display); font-variant-numeric: lining-nums; letter-spacing: 0; color: var(--ink); text-shadow: 0 0 2px #fff, 0 0 14px rgba(255,255,255,.95), 0 0 28px rgba(255,255,255,.7); }
#timeline-year-display .timeline-map-caption { display: inline-block; max-width: 24em; margin-top: 6px; padding: 5px 10px; border-radius: 6px; background: var(--panel, rgba(255,255,255,.88)); color: var(--ink-2); font-size: 13px; font-weight: 500; line-height: 1.35; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
#timeline-year-display .timeline-map-caption:empty { display: none; }
#time-travel-panel { left: 50%; bottom: 14px; transform: translateX(-50%); width: min(920px, calc(100vw - 28px)); z-index: 9; padding: 7px 10px; }
.timeline-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-height: 34px; }
.timeline-row .icon-btn { flex: none; width: 32px; height: 32px; }
.timeline-row input[type="range"] { flex: 1 1 auto; min-width: 80px; margin: 0 4px; accent-color: var(--accent); }
#timeline-speed { flex: none; width: 62px; min-width: 0; padding: 5px 6px; }
#timeline-rate { flex: none; min-width: 38px; text-align: center; font-size: 12px; }
.timeline-info { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(430px, calc(100vw - 16px)); max-height: min(48vh, 300px); padding: 12px 14px; overflow: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel-solid); box-shadow: var(--shadow); color: var(--ink-2); font-size: 11px; }
.timeline-info p { margin: 0 0 7px; overflow-wrap: anywhere; }
.timeline-info p:last-child { margin-bottom: 0; }
.timeline-count { font-weight: 700; color: var(--ink); }
.time-travel-active #brand, .time-travel-active #clock-btn, .time-travel-active #sky-panel, .time-travel-active #live-toggle,
.time-travel-active #view-panel, .time-travel-active #map-dock, .time-travel-active #layers-panel,
.time-travel-active #dock, .time-travel-active #statusbar, .time-travel-active #labels,
.time-travel-active #weather-overlay { display: none !important; }
#layer-list { display: grid; gap: 2px; }
.layer-group { border-top: 1px solid var(--rule); padding: 5px 0 2px; }
.layer-group:first-child { border-top: 0; }
.layer-group-summary { display: flex; align-items: center; margin: 0; text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.layer-group-summary::before { flex: none; }
.layer-group-count { margin-left: auto; color: var(--ink-3); font: 10px var(--f-data); }
.layer-group-rows { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; width: min(100%, 360px); padding: 7px 0 5px; }
details { border-top: 1px solid var(--rule); padding: 8px 0; }
details:first-child { border-top: 0; }
summary { cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; list-style: none; margin-bottom: 4px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "\25B8"; display: inline-block; width: 14px; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
.layer-row { position: relative; display: grid; grid-template-rows: var(--selector-preview-height) minmax(0, 1fr); gap: 4px; width: 100%; min-width: 0; aspect-ratio: 1; padding: 6px; overflow: hidden; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink-2); text-align: left; font-size: 10.5px; line-height: 1.2; cursor: pointer; }
.layer-row[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); }
.layer-row:hover { background: var(--chip); }
.layer-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.layer-row .swatch { grid-row: 1; display: block; width: 100%; height: 100%; min-height: 0; border-radius: 6px; }
.layer-row-info { grid-row: 2; display: flex; align-items: start; justify-content: space-between; gap: 4px; min-width: 0; min-height: 2.4em; overflow: hidden; }
.layer-row .name { display: -webkit-box; flex: 1; min-width: 0; overflow: hidden; overflow-wrap: anywhere; word-break: normal; hyphens: auto; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.layer-row .count { flex: none; color: var(--ink-3); font-size: 9.5px; font-family: var(--f-data); text-align: right; }
.selector-source-icon { position: absolute; top: 10px; right: 10px; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--rule); border-radius: 50%; background: var(--panel-solid); color: var(--ink); font: 700 12px/1 var(--f-data); text-align: center; cursor: help; touch-action: manipulation; }
.source-info-popup { position: fixed; z-index: 40; display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: start; gap: 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel-solid); box-shadow: var(--shadow); color: var(--ink); font-size: 12px; line-height: 1.4; }
.source-info-text { margin: 0; overflow-wrap: anywhere; }
.source-info-close { width: 28px; height: 28px; }
#demographic-analysis { right: 14px; bottom: 132px; z-index: 9; display: grid; gap: 8px; width: min(320px, calc(100vw - 28px)); padding: 12px 14px; }
.demographic-analysis-head { display: grid; gap: 8px; min-width: 0; }
.demographic-analysis-head .profile-eyebrow { margin-bottom: 1px; }
.demographic-analysis-head h2 { font: 700 16px/1.2 var(--f-display); overflow-wrap: anywhere; }
.demographic-analysis-head p { margin: 2px 0 0; color: var(--ink-2); font-size: 11.5px; }
.analysis-mode-picker { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; color: var(--ink-3); font-size: 11px; }
.analysis-mode-picker select { min-width: 0; min-height: 34px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); font: inherit; }
.demographic-analysis-legend { min-width: 0; padding-top: 6px; border-top: 1px solid var(--rule); }
.demographic-analysis-legend > span { display: block; margin-bottom: 3px; color: var(--ink-3); font-size: 10px; }
.demographic-analysis-legend img { display: block; max-width: 100%; max-height: 82px; object-fit: contain; object-position: left center; }
#demographic-cell-info { display: grid; gap: 4px; padding: 7px 9px; background: var(--accent-soft); font-size: 11.5px; }
#demographic-cell-info > strong { font-size: 12px; }
#demographic-cell-info .demographic-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#demographic-cell-info .demographic-stats > div { display: grid; gap: 2px; align-content: start; }
#demographic-cell-info .demographic-stats b { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
#demographic-cell-info .demographic-stats span { color: var(--ink-2); font-size: 11px; line-height: 1.3; }
.demographic-analysis-views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.demographic-analysis-views button, .demographic-analysis-times button { min-width: 0; min-height: 34px; padding: 5px 7px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink-2); font-size: 11px; }
.demographic-analysis-views button[aria-pressed="true"], .demographic-analysis-times button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.demographic-analysis-views button:disabled { opacity: .48; cursor: not-allowed; }
.demographic-analysis-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.walking-category-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; color: var(--ink-3); font-size: 11px; }
.walking-category-filter select { min-width: 0; min-height: 34px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); font: inherit; }
.walking-analysis-results { display: grid; gap: 5px; max-height: 190px; overflow: auto; overscroll-behavior: contain; }
.walking-results-summary { margin: 0; color: var(--ink-2); font-size: 11px; }
.walking-result { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); text-align: left; }
.walking-result span { display: grid; min-width: 0; gap: 2px; }
.walking-result b, .walking-result small { overflow-wrap: anywhere; }
.walking-result b { font-size: 11px; }
.walking-result small { color: var(--ink-3); font-size: 10px; }
.walking-result strong { flex: none; font: 600 10px var(--f-data); }
.solar-potential-key { display: flex; flex-wrap: wrap; gap: 5px 10px; }
.solar-potential-key > span { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 10px; }
.solar-potential-key i { width: 11px; height: 11px; flex: none; border-radius: 2px; }
.solar-potential-result { display: grid; gap: 2px; padding: 6px 8px; background: var(--field); color: var(--ink-2); font-size: 10px; }
.solar-potential-result b { color: var(--ink); }
.solar-potential-note { margin: 0; color: var(--ink-3); font-size: 10px; }
.profile-demographic-actions { display: grid; gap: 5px; }
.demographic-analysis-legend[hidden], .demographic-analysis-views[hidden], #walking-analysis-controls[hidden], #walking-category-filter[hidden], #walking-analysis-results[hidden] { display: none; }
.demographic-analysis-exit { width: 100%; border-radius: 6px; }
body.map-details-open #demographic-analysis { bottom: min(46vh, 460px); }
.layer-row:disabled { opacity: .5; cursor: not-allowed; }
.legend { margin-top: 8px; font-size: 12px; color: var(--ink-2); display: grid; gap: 3px; }
.legend .item { display: flex; align-items: center; gap: 6px; }
.legend .swatch { width: 12px; height: 12px; border-radius: 6px; flex: none; }

#inspector { top: 66px; right: 14px; width: min(440px, calc(100vw - 28px)); max-height: calc(100% - 140px); overflow: hidden; padding: 0; z-index: 5; display: flex; flex-direction: column; }
#inspector .close { position: absolute; top: 6px; right: 6px; z-index: 3; }
#inspector-body { width: 100%; min-height: 0; }
#inspector-body:not(.building-profile) { overflow: auto; padding: 14px 16px; }
#inspector-body.building-profile { overflow: auto; padding: 0; }
#inspector h3 { margin: 0 28px 2px 0; font-size: 17px; }
#inspector .sub { color: var(--ink-3); margin-bottom: 10px; font-size: 12.5px; }
#inspector dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; }
#inspector dt { color: var(--ink-3); }
#inspector dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
#inspector .src { font-size: 11.5px; color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 10px; }
.poi-marker-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.poi-marker { position: absolute; left: 0; top: 0; display: block; width: var(--poi-touch-target, 44px); height: 60px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--poi-color); pointer-events: none; cursor: pointer; opacity: 0; visibility: hidden; transition: opacity var(--poi-fade-out, 190ms) ease, visibility 0s linear var(--poi-fade-out, 190ms); }
.poi-marker.is-visible { opacity: var(--poi-opacity, 1); visibility: visible; pointer-events: auto; transition: opacity var(--poi-fade-in, 220ms) ease, visibility 0s; }
.poi-marker::before { content: ""; position: absolute; left: 50%; bottom: 12px; width: calc(var(--poi-size, 20px) * .82); height: var(--poi-size, 20px); border: 1px solid rgba(240, 252, 255, .66); border-radius: 50% 50% 50% 5% / 50% 50% 50% 5%; background: linear-gradient(145deg, rgba(255,255,255,.62), color-mix(in srgb, var(--poi-color) 30%, rgba(166,222,239,.24)) 48%, rgba(226,250,255,.2)); box-shadow: inset 1px 1px 2px rgba(255,255,255,.78), inset -1px -2px 4px rgba(16,43,61,.22), 0 0 11px color-mix(in srgb, var(--poi-color) 25%, transparent), 0 2px 5px rgba(0,0,0,.2); backdrop-filter: blur(5px) saturate(160%); -webkit-backdrop-filter: blur(5px) saturate(160%); transform: translateX(-50%) rotate(-45deg); transition: width .2s ease, height .2s ease, box-shadow .2s ease; }
.poi-glass-stem { position: absolute; left: 50%; top: 50px; width: 1px; height: 10px; background: linear-gradient(rgba(226,250,255,.62), color-mix(in srgb, var(--poi-color) 28%, transparent)); box-shadow: 0 0 5px color-mix(in srgb, var(--poi-color) 35%, transparent); transform: translateX(-50%); }
.poi-marker svg { position: absolute; left: 50%; bottom: calc(12px + var(--poi-size, 20px) * .5 - 6px); width: min(18px, calc(var(--poi-size, 20px) * .52)); height: min(18px, calc(var(--poi-size, 20px) * .52)); fill: none; stroke: rgba(249,254,255,.98); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 2px rgba(35,73,93,.7)); pointer-events: none; transform: translateX(-50%); }
.poi-marker.is-near::before, .poi-marker:hover::before, .poi-marker:focus-visible::before { box-shadow: inset 1px 1px 2px rgba(255,255,255,.78), inset -1px -2px 4px rgba(16,43,61,.25), 0 0 12px color-mix(in srgb, var(--poi-color) 34%, transparent), 0 2px 6px rgba(0,0,0,.24); }
.poi-marker.is-selected::before { box-shadow: inset 1px 1px 2px rgba(255,255,255,.86), inset -1px -2px 4px rgba(16,43,61,.22), 0 0 16px color-mix(in srgb, var(--poi-color) 42%, transparent), 0 2px 7px rgba(0,0,0,.28); animation: poi-glass-select 260ms ease-out; }
.poi-marker[data-name]:not([data-name=""])::after { content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 1px); width: max-content; max-width: min(220px, 70vw); overflow: hidden; padding: 4px 7px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel-solid); color: var(--ink); font: 600 11px/1.3 var(--f-ui); text-overflow: ellipsis; white-space: nowrap; box-shadow: var(--shadow); transform: translateX(-50%); }
.poi-marker:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
@keyframes poi-glass-select { from { filter: brightness(1.3); transform: translateX(-50%) rotate(-45deg) scale(.88); } to { filter: brightness(1); transform: translateX(-50%) rotate(-45deg) scale(1); } }
#inspector.poi-detail { width: min(400px, calc(100vw - 28px)); max-height: min(76vh, 680px); padding: 0; }
#inspector.poi-detail #inspector-body { overflow: auto; padding: 0; }
.poi-sheet-handle { display: none; }
.poi-detail-head { padding: 18px 52px 8px 18px; }
.poi-detail-head .profile-eyebrow { margin-bottom: 4px; }
.poi-detail-head h3 { margin: 0; font-size: 21px; line-height: 1.18; }
.poi-detail-head .sub { margin: 5px 0 0; }
.poi-detail-content { padding: 8px 18px 18px; }
.poi-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 12px; }
.poi-action { display: inline-flex; min-height: 38px; align-items: center; padding: 7px 11px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.poi-action:hover { border-color: var(--accent); background: var(--accent-soft); }
#inspector.poi-detail dl { grid-template-columns: minmax(86px, auto) minmax(0, 1fr); gap: 7px 14px; margin: 12px 0; }
#inspector.poi-detail dd { text-align: left; }
.poi-description { margin: 12px 0; color: var(--ink-2); }
.poi-more { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rule); }
.poi-more summary { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--ink-2); }
.poi-source { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: 11px; }
.profile-header { position: sticky; top: 0; z-index: 2; padding: 14px 44px 0 16px; background: var(--panel-solid); border-bottom: 1px solid var(--rule); }
.profile-eyebrow { display: block; margin-bottom: 3px; color: var(--ink-3); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.profile-header h3 { overflow-wrap: anywhere; }
.profile-header .sub { margin: 2px 0 0; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.profile-tabs { display: flex; gap: 2px; margin-top: 8px; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: thin; }
.profile-tabs button { flex: none; padding: 7px 9px 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-3); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.profile-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.profile-panel { min-height: 0; }
.profile-content { display: flex; flex-direction: column; gap: 14px; padding: 14px 16px 18px; }
.profile-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.profile-kpi { min-width: 0; padding: 9px 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel-solid); }
.profile-kpi span, .profile-building-metrics span { display: block; color: var(--ink-3); font-size: 10.5px; }
.profile-kpi strong, .profile-building-metrics strong { display: block; margin-top: 2px; font: 700 16px/1.2 var(--f-display); overflow-wrap: anywhere; }
.profile-kpi .tag { font: 500 11px/1.4 var(--f-ui); }
.profile-demographics { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel-solid); }
.profile-demographic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-demographic-grid > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.profile-demographic-grid strong { font: 700 18px/1.1 var(--f-display); }
.profile-demographic-grid span { color: var(--ink-3); font-size: 10px; }
.profile-section { display: flex; flex-direction: column; gap: 7px; }
.profile-section h4, .profile-section-title h4 { margin: 0; font: 700 13px/1.35 var(--f-display); }
.profile-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.profile-section-title > span, .profile-section-title > strong { color: var(--ink-3); font-size: 10.5px; font-weight: 600; text-align: right; }
.profile-section .profile-note, .profile-note { margin: 0; color: var(--ink-3); font-size: 10.5px; }
.profile-age { display: grid; gap: 4px; }
.profile-age-value { font: 700 21px/1.15 var(--f-display); }
.profile-area-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-area-compare > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; padding: 8px 9px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel-solid); }
.profile-area-compare span { color: var(--ink-3); font-size: 10.5px; }
.profile-area-compare b { font: 700 16px/1.2 var(--f-display); overflow-wrap: anywhere; }
.profile-area-delta { margin: 0; color: var(--ink-2); font-size: 11px; }
.profile-area-reference { display: flex; flex-direction: column; gap: 2px; padding-left: 9px; }
.profile-area-reference b { font-size: 11px; }
.profile-area-reference span { font-size: 11px; }
.profile-area-reference small { color: var(--ink-3); font-size: 10px; }
.profile-building-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-floor-stack { display: flex; flex-direction: column-reverse; gap: 2px; width: 50px; padding: 5px; border: 1px solid var(--rule); border-bottom-width: 3px; border-radius: 6px; }
.profile-floor-stack span { height: 6px; border-radius: 1px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.profile-nearby { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.profile-nearby li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); font-size: 11.5px; }
.profile-nearby li span { min-width: 0; }
.profile-nearby b, .profile-nearby small { display: block; overflow-wrap: anywhere; }
.profile-nearby small { color: var(--ink-3); font-size: 10.5px; }
.profile-nearby strong { flex: none; font: 600 11px var(--f-data); }
.profile-highlight { margin: 0; padding: 8px 10px; border-radius: 6px; background: var(--accent-soft); font-size: 12px; font-weight: 600; }
.profile-rating { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px 12px; width: 100%; padding: 11px 13px; border: 1px solid var(--rule); border-left: 4px solid var(--rating-tone); border-radius: 12px; background: color-mix(in srgb, var(--rating-tone) 9%, var(--panel-solid)); color: var(--ink); text-align: left; }
.profile-rating:hover, .profile-rating[aria-expanded="true"] { border-color: var(--rating-tone); }
.profile-rating-score { align-self: center; font: 700 30px/.95 var(--f-display); }
.profile-rating-score small { display: block; margin-top: 5px; color: var(--ink-3); font: 500 10px/1 var(--f-ui); }
.profile-rating-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; }
.profile-rating-copy b { font: 700 13px/1.2 var(--f-display); }
.profile-rating-copy small { color: var(--ink-3); font-size: 10px; }
.profile-rating-meter { position: relative; display: block; grid-column: 1 / -1; height: 7px; overflow: visible; border-radius: 6px; background: linear-gradient(90deg, #e4c444 0%, #b8cc69 48%, #3d8a59 100%); }
.profile-rating-meter i { position: absolute; top: 50%; left: var(--rating-position); display: block; width: 13px; height: 13px; border: 2px solid var(--panel-solid); border-radius: 50%; background: var(--rating-tone); box-shadow: 0 0 0 1px var(--rule); transform: translate(-50%, -50%); }
.profile-rating-meter.is-unrated { background: #aeb5b3; }
.profile-rating-scale { display: flex; grid-column: 1 / -1; justify-content: space-between; color: var(--ink-3); font-size: 9px; }
.profile-rating-action { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--rule); color: var(--accent); font-size: 12px; font-weight: 650; }
.profile-rating-action svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.profile-rating[aria-expanded="true"] .profile-rating-action svg { transform: rotate(180deg); }
.profile-rating-details { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--rule); border-radius: 6px; background: var(--panel-solid); }
.profile-rating-details > p { margin: 0; color: var(--ink-3); font-size: 10.5px; }
.profile-rating-details h4 { margin: 2px 0 0; font: 700 12px/1.3 var(--f-display); }
.profile-rating-priorities { display: grid; gap: 6px; margin: 0; padding: 8px; border: 1px solid var(--rule); border-radius: 6px; }
.profile-rating-priorities legend { padding: 0 4px; color: var(--ink-2); font-size: 11px; font-weight: 650; }
.profile-rating-priorities label { display: grid; grid-template-columns: minmax(0, 1fr) minmax(118px, .8fr); align-items: center; gap: 8px; color: var(--ink-2); font-size: 11px; }
.profile-rating-priorities select { width: 100%; min-width: 0; min-height: 32px; padding: 4px 7px; border: 1px solid var(--rule); border-radius: 6px; background: var(--field); color: var(--ink); font: inherit; }
.profile-rating-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.profile-rating-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); font-size: 10.5px; }
.profile-rating-list li span { min-width: 0; }
.profile-rating-list b, .profile-rating-list small { display: block; overflow-wrap: anywhere; }
.profile-rating-list small { margin-top: 2px; color: var(--ink-3); font-size: 9.5px; }
.profile-rating-list li > strong { flex: none; font: 600 10px var(--f-data); }
.profile-rating-excluded { color: var(--ink-2); }
.profile-environment-list { margin-bottom: 2px; }
.profile-compare { display: grid; gap: 5px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.profile-compare-summary { margin: 0; padding: 9px 10px; background: var(--accent-soft); color: var(--ink); font-size: 12px; font-weight: 650; }
.profile-compare .profile-section-title strong { color: var(--ink); }
.profile-histogram { display: flex; align-items: end; gap: 3px; height: 96px; padding: 6px 2px 0; border-bottom: 1px solid var(--rule); }
.profile-histogram-bin { display: flex; flex: 1; min-width: 0; height: 100%; flex-direction: column; align-items: center; justify-content: end; gap: 2px; color: var(--ink-3); }
.profile-histogram-bin b { font: 9px var(--f-data); }
.profile-histogram-bin i { display: block; width: 100%; min-height: 2px; border-radius: 6px 6px 0 0; background: var(--ink-3); opacity: .52; }
.profile-histogram-bin.is-current { color: var(--accent); }
.profile-histogram-bin.is-current i { background: var(--accent); opacity: 1; }
.profile-histogram-bin small { width: 100%; overflow: hidden; color: var(--ink-3); font: 8px var(--f-data); text-align: center; text-overflow: clip; white-space: nowrap; }
.profile-compare p, .profile-empty, .profile-source { margin: 0; color: var(--ink-3); font-size: 10.5px; }
.profile-source { border-top: 1px solid var(--rule); padding-top: 8px; overflow-wrap: anywhere; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; background: var(--chip); color: var(--ink-2); }
.tag.warn { background: rgba(192, 138, 26, .18); color: #8a6212; }

#dock { right: 14px; bottom: 14px; padding: 6px; z-index: 4; display: flex; gap: 6px; }
#statusbar { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; font-size: 11.5px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; pointer-events: none; }

#almanac { position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; background: rgba(10, 20, 18, .35); padding: 16px; }
.sheet { position: relative; width: min(1280px, 100%); height: min(900px, calc(100% - 32px)); max-height: calc(100% - 32px); display: flex; flex-direction: column; overflow: hidden; background: var(--panel-solid); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px 10px; flex: none; }
.sheet-head-main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sheet-head h2 { font-size: 22px; }
.tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--rule); overflow-x: auto; flex: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 7px 10px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }
#almanac-body { min-height: 0; padding: 20px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
#almanac-body p { margin: 0; max-width: 70ch; }
.imprint { flex: none; display: grid; gap: 12px; margin-top: 12px; padding: 22px; border: 1px solid var(--rule); border-top: 3px solid var(--accent); border-radius: 6px; background: var(--field); overflow-wrap: anywhere; }
.imprint h3 { margin: 0; font-size: 22px; }
.imprint h4 { margin: 8px 0 0; font-size: 14px; }
.imprint address { font-style: normal; }
.imprint-address { display: inline-flex; align-items: center; gap: 8px; }
.imprint-location { flex: none; color: var(--accent); background: var(--accent-soft); }
.imprint-location svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; animation: imprint-pin 2.4s ease-in-out infinite; }
.imprint-location:hover svg, .imprint-location:focus-visible svg { animation-play-state: paused; }
.imprint-location:disabled { opacity: .45; cursor: default; }
.imprint-location:disabled svg { animation: none; }
.imprint-contact { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
@keyframes imprint-pin { 0%, 70%, 100% { transform: translateY(0); } 35% { transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .imprint-location svg { animation: none; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stat { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; }
.stat .num { font-size: 22px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 6px; align-items: center; font-size: 12.5px; }
.bar .t { position: relative; padding: 2px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-radius: 6px; }
.bar .t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; opacity: .8; }
.bar .t span { position: relative; }
.bar .v { text-align: right; }
.src { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 6px 14px; font-size: 13px; margin: 0; }
.src dt { color: var(--ink-3); } .src dd { margin: 0; }
.vote-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.vote-filters label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.vote-filters select { min-height: 44px; max-width: 100%; background: var(--field); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; }
#vote-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-items: start; }
.vote { --vote-yes: #28714d; --vote-no: #b8252b; min-width: 0; display: grid; gap: 7px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
:root[data-theme="dark"] .vote { --vote-yes: #70c99a; --vote-no: #ee817a; }
.vote-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vote-heading h3 { margin: 0; font: 600 16px/1.35 var(--f-ui); overflow-wrap: anywhere; }
.vote-heading time { flex: none; font-size: 12px; color: var(--ink-3); }
.vote-local, .vote-shares { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.vote-local { font-size: 15px; }
.vote[data-decision="accepted"] .vote-result, .vote-shares > :first-child { color: var(--vote-yes); }
.vote[data-decision="rejected"] .vote-result, .vote-shares > :last-child { color: var(--vote-no); }
.vote-shares { font-size: 13px; }
.vote-bar { height: 10px; overflow: hidden; border-radius: 2px; background: var(--vote-no); }
.vote-bar > span { display: block; height: 100%; background: var(--vote-yes); }
#almanac-body .vote-delta { font-size: 13px; font-weight: 600; }
.vote-swiss { display: grid; grid-template-columns: auto minmax(40px, 100px); gap: 12px; align-items: center; color: var(--ink-3); font-size: 12px; }
.vote-swiss .vote-bar { height: 4px; background: var(--rule); }
.vote-swiss .vote-bar > span { background: var(--ink-3); }
.vote-details { color: var(--ink-2); font-size: 12px; }
.vote-details summary { cursor: pointer; min-height: 36px; padding: 8px 0; width: fit-content; }
.vote-details dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; margin: 10px 0; }
.vote-details dt { color: var(--ink-3); }
.vote-details dd { margin: 0; overflow-wrap: anywhere; }
.vote-details dd > span { display: block; }
.vote-full-title { overflow-wrap: anywhere; }
.vote-empty { padding: 20px 0; grid-column: 1 / -1; }
@media (max-width: 760px) {
  #vote-results { grid-template-columns: minmax(0, 1fr); }
  .vote-heading { flex-direction: column; gap: 3px; }
  .vote-filters { display: grid; grid-template-columns: minmax(0, 1fr); }
}

#loading { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #101a2c var(--loading-lqip, none) center / cover no-repeat; z-index: 20; transition: opacity .7s; }
#loading::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(8, 14, 26, .05) 0%, rgba(8, 14, 26, .45) 100%); }
.loading-bg { position: absolute; inset: 0; z-index: 0; }
.loading-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 55%; opacity: 0; transform-origin: 32% 48%; transition: opacity 1.2s ease; will-change: transform; }
.loading-bg img.is-loaded { opacity: 1; animation: loading-kenburns 24s ease-in-out infinite alternate; }
@keyframes loading-kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.14) translate3d(2.5%, -1.5%, 0); } }
@media (prefers-reduced-motion: reduce) { .loading-bg img.is-loaded { animation: none; transform: scale(1.04); } }
#loading .loading-card { position: relative; z-index: 2; }
@media (max-aspect-ratio: 3/4) { #loading { place-items: end center; padding-bottom: max(32px, env(safe-area-inset-bottom)); } .loading-bg img { object-position: 24% 50%; transform-origin: 24% 50%; } }
#loading.done { opacity: 0; pointer-events: none; }
#loading .no-webgl .loading-spinner, #loading .no-webgl .bar { display: none; }
#loading .no-webgl .no-webgl-intro { display: inline-flex; margin-top: 12px; text-decoration: none; }
.loading-card { width: min(400px, calc(100vw - 32px)); padding: 28px 26px; text-align: center; background: rgba(247, 249, 246, .9); border: 1px solid rgba(23, 33, 28, .12); border-radius: var(--r-panel); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.loading-spinner { display: block; width: 30px; height: 30px; margin: 0 auto 12px; border: 3px solid rgba(23, 33, 28, .12); border-top-color: var(--accent); border-radius: 50%; animation: loading-spin 1s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.loading-card h2 { font-size: 36px; }
.bar > #loading-bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.loading-card .bar { height: 5px; background: var(--chip); border-radius: 6px; overflow: hidden; margin: 12px 0 8px; display: block; }
.loading-card p { margin: 8px 0 0; }
.loading-note { min-height: 2.9em; color: var(--ink-2); }
#error-banner { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); max-width: min(720px, 92vw); background: #7a1f12; color: #fff; border-radius: 12px; padding: 10px 16px; z-index: 30; box-shadow: var(--shadow); }
#error-banner ul { margin: 4px 0 0; padding-left: 18px; }

@media (max-width: 900px) {
  #brand { width: 250px; }
  #layers-panel { left: 8px; right: auto; bottom: 136px; max-height: calc(100% - 170px); width: min(700px, calc(100vw - 16px)); }
  #inspector { width: min(380px, calc(100vw - 24px)); }
  .building-mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 761px) and (max-width: 1244px) {
  #clock-btn { top: 70px; left: 50%; transform: translateX(-50%); }
  #sky-panel { top: 126px; }
}
@media (min-width: 1245px) and (max-width: 1299px) {
  #clock-btn { top: 14px; left: calc(50% - 25px); transform: translateX(-50%); }
}
@media (max-width: 760px) {
  #brand, #clock-btn, #view-panel { height: 38px; }
  #brand { top: 8px; left: 8px; width: calc(100vw - 16px); padding: 3px 5px 3px 7px; display: grid; grid-template-columns: minmax(0, 1fr) 32px; align-items: center; gap: 4px; }
  #mobile-tools-toggle { display: grid; width: 32px; height: 32px; }
  .search input { height: 30px; }
  #clock-btn { display: grid; top: 54px; left: 8px; right: 8px; transform: translateY(-6px); width: auto; grid-template-columns: minmax(86px, 1fr) minmax(0, 1.5fr) 24px; padding: 5px 7px; gap: 6px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .5s ease, transform .5s ease, visibility 0s linear .5s; }
  #clock-time { font-size: 16px; }
  #clock-wx { display: block; font-size: 11px; }
  .clock-chevron { width: 21px; height: 21px; }
  #view-panel { top: 100px; left: 8px; right: 8px; display: grid; grid-template-columns: 30px 1px repeat(2, 30px) 1px repeat(2, 30px) 1px minmax(0, 1fr) 30px 30px; gap: 4px; padding: 3px 4px; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-6px); transition: opacity .5s ease, transform .5s ease, visibility 0s linear .5s; }
  body.mobile-tools-open #clock-btn, body.mobile-tools-open #view-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition-delay: 0s; }
  #view-panel .toolbar-button { width: 30px; height: 30px; }
  #view-panel .toolbar-icon { width: 19px; height: 19px; }
  #view-panel .toolbar-divider { margin: 0; height: 19px; }
  .toolbar-position { gap: 2px; padding: 2px 3px; }
  .toolbar-pin { width: 15px; height: 15px; }
  #preset-select { flex: 1; width: 100%; max-width: none; padding: 3px 1px; font-size: 10px; }
  #sky-panel { top: 146px; left: 8px; right: 8px; transform: none; width: auto; max-height: calc(100% - 170px); }
  #statusbar { display: none; }
}
@media (max-width: 600px) {
  .navigation-hint-card { width: min(248px, calc(100vw - 24px)); padding: 10px 13px 12px; }
  .hint-gesture { height: 88px; }
  #sky-panel-content { padding-left: 11px; padding-right: 11px; }
  .sky-head { padding-left: 11px; padding-right: 11px; }
  .weather-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #map-dock { left: 8px; bottom: max(8px, env(safe-area-inset-bottom)); max-width: calc(100vw - 16px); padding: 5px; gap: 2px; }
  body:has(#inspector:not([hidden])) #map-dock,
  body:has(#demographic-analysis:not([hidden])) #map-dock,
  body:has(#inspector:not([hidden])) #dock,
  body:has(#demographic-analysis:not([hidden])) #dock { display: none; }
  #base-map-cards .map-card { width: 62px; height: 84px; font-size: 9.5px; }
  .map-card-preview { width: 52px; }
  #base-map-cards { flex-basis: 66px; width: 66px; height: 84px; }
  #base-map-cards[data-open="true"] { flex-basis: 198px; width: 198px; }
  #base-map-cards[data-open="true"] [data-base="aerial"] { transform: translateX(66px); }
  #base-map-cards[data-open="true"] [data-base="map"] { transform: translateX(132px); }
  #map-dock[data-expanded="true"] #quick-access { width: min(190px, calc(100vw - 224px)); }
  .quick-card { width: 60px; min-width: 54px; padding: 0; font-size: 9px; }
  .quick-card > span { width: min(52px, 100%); font-size: 24px; }
  #map-dock[data-expanded="true"] { flex-wrap: wrap; }
  #map-dock[data-expanded="true"] #quick-access { width: 100%; justify-content: space-around; }
  #quick-panel { left: 8px; bottom: 104px; width: min(350px, calc(100vw - 16px)); }
  #quick-panel[data-mode="buildings"], #quick-panel[data-mode="traffic"] { top: 146px; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: none; }
  #layers-panel { top: auto; bottom: 108px; left: 8px; right: 8px; width: auto; max-height: calc(100% - 170px); }
  #demographic-analysis { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; max-height: min(58dvh, 500px); overflow: auto; overscroll-behavior: contain; padding: 8px 10px; gap: 5px; }
  .demographic-analysis-exit { position: sticky; bottom: 0; z-index: 2; }
  body.map-details-open #demographic-analysis { bottom: max(8px, env(safe-area-inset-bottom)); }
  .demographic-analysis-legend { padding-top: 4px; }
  .demographic-analysis-legend img { max-height: 42px; }
  .demographic-analysis-views button { min-height: 34px; }
  .map-details-head { padding: 10px 12px 8px; }
  .map-details-scroll { padding: 8px 12px 12px; }
  #layer-list { grid-template-columns: 1fr; }
  .building-mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
  #time-travel-panel { left: 8px; bottom: 8px; transform: none; width: calc(100vw - 16px); padding: 10px 12px; }
  .timeline-foot { align-items: flex-start; flex-direction: column; gap: 2px; }
  #timeline-year { font-size: 52px; }
  #almanac { padding: 8px; }
  .sheet { width: 100%; height: calc(100% - 16px); max-height: calc(100% - 16px); }
  .sheet-head { gap: 8px; padding: 12px; }
  .sheet-head-main { gap: 8px; }
  .sheet-head h2 { font-size: 18px; }
  .sheet-head .btn { padding: 5px 9px; }
  .tabs { padding: 0 8px; }
  #almanac-body { padding: 14px; }
  #inspector { top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: calc(100dvh - 16px - env(safe-area-inset-top)); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  #inspector:has(#inspector-body.building-profile) { height: min(92dvh, 760px); }
  #inspector-body.building-profile { display: flex; height: 100%; min-height: 0; flex-direction: column; overflow: hidden; }
  #inspector-body.building-profile .profile-header { flex: none; }
  #inspector-body.building-profile .profile-panel { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
  #inspector.poi-detail { top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: min(58vh, 520px); border-right: 0; border-bottom: 0; border-left: 0; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); transition: max-height .24s ease, transform .24s ease; }
  #inspector.poi-detail.poi-compact { max-height: min(31vh, 250px); }
  #inspector.poi-detail.poi-expanded { max-height: calc(100dvh - 20px - env(safe-area-inset-top)); }
  #inspector.poi-detail #inspector-body { overscroll-behavior: contain; }
  .poi-sheet-handle { display: block; width: 100%; height: 28px; padding: 9px 0; border: 0; background: transparent; touch-action: pan-y; }
  .poi-sheet-handle span { display: block; width: 38px; height: 4px; margin: auto; border-radius: 999px; background: var(--ink-3); opacity: .55; }
  .poi-detail-head { padding: 3px 52px 7px 16px; }
  .poi-detail-head h3 { font-size: 19px; }
  .poi-detail-content { padding: 6px 16px 14px; }
  .poi-action { min-height: 44px; }
  #inspector.poi-detail.poi-compact .poi-description, #inspector.poi-detail.poi-compact .poi-more, #inspector.poi-detail.poi-compact .poi-source,
  #inspector.poi-detail.poi-compact #inspector-body dl { display: none; }
  .time-travel-active #statusbar { display: none; }
  .profile-header { padding-left: 12px; }
  .profile-content { gap: 9px; padding: 8px 10px 14px; }
  .profile-demographics { gap: 4px; padding: 6px 8px; }
  .profile-demographics h4 { margin: 0; font-size: 12px; line-height: 1.2; }
  .profile-demographic-grid { gap: 5px; }
  .profile-demographic-grid > div { gap: 1px; }
  .profile-demographic-grid strong { font-size: 16px; line-height: 1; }
  .profile-demographic-grid span { font-size: 9px; line-height: 1.2; }
  .profile-kpis { gap: 4px; }
  .profile-kpi { padding: 5px 7px; border-radius: 6px; }
  .profile-kpi span { font-size: 9.5px; line-height: 1.2; }
  .profile-kpi strong { margin-top: 1px; font-size: 14px; line-height: 1.1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.easter-photo-overlay[hidden] { display: none; }
.easter-photo-overlay {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  padding: 24px; background: rgba(10, 14, 16, 0.92); cursor: zoom-out;
}
.easter-photo-overlay img { max-width: min(94vw, 1400px); max-height: 90vh; object-fit: contain; }
.easter-photo-close {
  position: absolute; top: 18px; right: 18px; border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px; padding: 8px 12px; color: #fff; background: rgba(22,28,30,.9);
  font: inherit; cursor: pointer;
}
.easter-photo-missing { max-width: 520px; color: #fff; text-align: center; }

/* Intro-Video: Angebot im Ladebildschirm, Hinweis nach dem Laden, Abspielfenster */
.intro-offer { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(23, 33, 28, .12); display: grid; gap: 8px; justify-items: center; }
.intro-offer[hidden], .intro-chip[hidden] { display: none; }
.intro-offer-text { margin: 0 !important; color: var(--ink-2); font-size: 13px; }
.intro-offer-play, .intro-chip-play { display: inline-flex; align-items: center; gap: 8px; }
.intro-offer-play { padding: 9px 18px; font-size: 15px; font-weight: 600; }
.intro-offer-play svg, .intro-chip-play svg, .intro-actions svg { width: 16px; height: 16px; fill: currentColor; }
.intro-actions svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.intro-offer-skip { border: 0; background: none; color: var(--ink-2); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.intro-duration { font-weight: 400; opacity: .8; font-variant-numeric: tabular-nums; }
.intro-chip { left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 12; display: flex; align-items: center; gap: 4px; padding: 5px 6px 5px 14px; animation: intro-chip-in .5s ease both; }
.intro-chip-play { border: 0; background: none; color: var(--ink); font: 600 14px/1.2 var(--f-ui); padding: 6px 4px; }
.intro-chip-play svg { color: var(--accent); }
.intro-chip-close { width: 30px; height: 30px; }
@keyframes intro-chip-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .intro-chip { animation: none; } }
.intro-dialog { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--rule); border-radius: var(--r-panel); background: var(--panel-solid); color: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.intro-dialog::backdrop { background: rgba(6, 10, 18, .72); backdrop-filter: blur(4px); }
.intro-frame { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 34px); }
.intro-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; }
.intro-head h2 { margin: 0; font-size: 17px; }
.intro-head .icon-btn { width: 34px; height: 34px; font-size: 22px; }
#intro-video { display: block; width: 100%; height: auto; max-height: calc(100dvh - 140px); background: #000; aspect-ratio: 1920 / 980; }
.intro-actions { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.intro-actions .btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; }
#intro-ready { margin-left: auto; }
#intro-ready:disabled { opacity: .7; cursor: progress; }
.intro-share-status { font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .intro-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; border: 0; }
  .intro-actions { flex-wrap: wrap; }
  #intro-ready { flex: 1 1 100%; justify-content: center; }
}
#demographic-cell-info > small { color: var(--ink-2); font-size: 10.5px; line-height: 1.35; }

/* Handys und schwache Geräte (Klasse .low-power, gesetzt in main.js): keine Glas-, Unschärfe- und Schatteneffekte
   über der laufend neu gezeichneten 3D-Karte. backdrop-filter auf jeder POI-Markierung und jedem Panel muss sonst bei
   jedem Bild neu berechnet werden und blockierte mobile Browser beim schnellen Verschieben und Zoomen. */
.low-power .panel, .low-power .loading-card, .low-power .navigation-hint-card { backdrop-filter: none; -webkit-backdrop-filter: none; }
.low-power .panel { background: var(--panel-solid); }
.low-power .poi-marker::before {
  backdrop-filter: none; -webkit-backdrop-filter: none; transition: none;
  background: color-mix(in srgb, var(--poi-color) 78%, #ffffff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.low-power .poi-marker.is-near::before, .low-power .poi-marker:hover::before, .low-power .poi-marker:focus-visible::before,
.low-power .poi-marker.is-selected::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 1px 3px rgba(0, 0, 0, .35); }
.low-power .poi-glass-stem { box-shadow: none; }
.low-power .poi-marker svg { filter: none; }
.low-power .poi-marker, .low-power .poi-marker.is-visible { transition: none; }
.low-power .plabel { text-shadow: 0 0 2px #fff, 0 0 3px #fff; }
:root[data-theme="dark"].low-power .plabel { text-shadow: 0 0 2px #0b1220, 0 0 3px #0b1220; }
/* Gesten, die auf einem Pin beginnen, gehören der Karte (kein Scrollen oder Zoomen der Seite durch den Browser). */
.poi-marker { touch-action: none; }

/* Velomodus am Computer: Tastenanleitung über den ganzen Bildschirm, bis zum ersten Fahrbefehl */
#ride-keys { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: rgba(8, 12, 16, .5); backdrop-filter: blur(2px); animation: ride-keys-in .35s ease both; }
#ride-keys[hidden] { display: none; }
#ride-keys.is-leaving { opacity: 0; transition: opacity .4s ease; }
@keyframes ride-keys-in { from { opacity: 0; } to { opacity: 1; } }
.ride-keys-card { display: grid; justify-items: center; gap: 20px; padding: 28px 36px 24px; max-width: min(720px, 100%);
  background: var(--panel-solid, #f7f9f6); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: var(--shadow); text-align: center; }
.ride-keys-card h2 { margin: 0; font-family: var(--f-display); font-size: 26px; font-weight: 700; }
.ride-keys-sets { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.ride-keys-set { display: grid; justify-items: center; gap: 8px; }
.ride-keys-set p { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ride-keys-or { font-size: 15px; color: var(--ink-3); }
.ride-keys-cluster { display: grid; grid-template-columns: repeat(3, 64px); grid-auto-rows: 64px; gap: 6px; }
.ride-key { display: inline-grid; place-items: center; align-content: center; gap: 2px; min-width: 64px; height: 64px; padding: 0 10px; box-sizing: border-box;
  font-family: var(--f-data); color: var(--ink); background: var(--field, #fff); border: 1px solid var(--rule); border-bottom-width: 4px; border-radius: 12px;
  transition: transform .08s ease, background .08s ease, color .08s ease; }
.ride-key .g { font-size: 24px; font-weight: 700; line-height: 1; }
.ride-key .l { font-family: var(--f-ui); font-size: 11px; font-weight: 600; color: var(--ink-2); }
.ride-key.wide { min-width: 150px; height: 44px; font-family: var(--f-ui); font-size: 14px; font-weight: 600; }
.ride-keys-more .ride-key:not(.wide) { height: 44px; font-size: 14px; font-weight: 600; }
.ride-key.is-down { background: var(--accent); color: var(--accent-ink, #fff); border-bottom-width: 1px; transform: translateY(3px); }
.ride-key.is-down .l { color: inherit; }
.ride-keys-more { display: flex; gap: 10px 28px; flex-wrap: wrap; justify-content: center; margin: 0; }
.ride-keys-more div { display: flex; align-items: center; gap: 10px; }
.ride-keys-more dd { margin: 0; font-size: 14px; color: var(--ink-2); }
.ride-keys-status { margin: 0; min-height: 1.4em; font-size: 16px; font-weight: 700; color: var(--ink-2); }
#ride-keys.is-ready .ride-keys-status { color: var(--accent); }
#ride-keys.is-ready .ride-key[data-key="ArrowUp"], #ride-keys.is-ready .ride-key[data-key="w"] { animation: ride-key-pulse 1.4s ease-in-out infinite; }
@keyframes ride-key-pulse { 50% { box-shadow: 0 0 0 5px var(--accent-soft, rgba(184, 37, 43, .2)); border-color: var(--accent); } }
@media (prefers-reduced-motion: reduce) { #ride-keys, #ride-keys.is-ready .ride-key { animation: none !important; } #ride-keys.is-leaving { transition: none; } }
@media (max-height: 520px) { .ride-keys-card { gap: 12px; padding: 16px 20px; } .ride-keys-cluster { grid-template-columns: repeat(3, 52px); grid-auto-rows: 52px; } .ride-key { min-width: 52px; height: 52px; } }

/* Velomodus: flache, breite Fahranzeige unten mittig (Strasse | Tempo | Beenden), damit der Anhänger sichtbar bleibt */
#ride-hud { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 22px; padding: 8px 12px 8px 20px; width: max-content; max-width: calc(100vw - 32px);
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: var(--shadow); backdrop-filter: blur(10px); color: var(--ink); }
#ride-hud.is-intro .ride-speed, #ride-hud.is-intro .ride-meta { opacity: .45; }
.ride-info { display: grid; gap: 1px; min-width: 0; }
.ride-speed { display: flex; align-items: baseline; gap: 5px; }
.ride-speed .num { font-family: var(--f-data); font-size: 34px; font-weight: 700; line-height: 1; min-width: 2.2ch; text-align: right; }
.ride-unit { font-size: 13px; color: var(--ink-2); }
.ride-meta { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.ride-note { font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.ride-note:empty { display: none; }
.ride-exit { font: inherit; font-size: 13px; color: var(--ink-2); background: transparent; border: 1px solid var(--rule); border-radius: var(--r-ctl); padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.ride-exit kbd { font-family: var(--f-data); font-size: 11px; margin-left: 4px; }
/* Smartphone: Fahranzeige oben, Kompass-Joystick unten */
#ride-hud.is-touch { top: calc(10px + env(safe-area-inset-top, 0px)); bottom: auto; gap: 4px 14px; padding: 6px 8px 6px 14px; }
#ride-hud.is-touch .ride-speed .num { font-size: 28px; }
#ride-hud.is-touch .ride-exit { padding: 8px 10px; }
#ride-hud.is-touch .ride-exit kbd { display: none; }
#ride-stick { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30;
  display: grid; justify-items: center; gap: 10px; touch-action: none; user-select: none; -webkit-user-select: none; }
.ride-stick-help { font-size: 14px; font-weight: 600; color: var(--ink); background: var(--panel); border: 1px solid var(--rule); border-radius: 999px;
  padding: 7px 14px; box-shadow: var(--shadow); transition: opacity .6s ease; text-align: center; width: max-content; max-width: calc(100vw - 48px); }
.ride-stick-pad { position: relative; width: 168px; height: 168px; border-radius: 50%; touch-action: none; opacity: .95; transition: opacity .6s ease, transform .2s ease; }
.ride-stick-pad svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ride-stick-pad .ring { fill: var(--panel); stroke: var(--rule); stroke-width: 2; }
.ride-stick-pad .inner { fill: none; stroke: var(--rule); stroke-width: 1.5; stroke-dasharray: 3 5; }
.ride-stick-pad .ticks line { stroke: var(--ink-3); stroke-width: 1.5; }
.ride-stick-pad .arrow { fill: var(--accent); }
.ride-stick-label { position: absolute; white-space: nowrap; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); pointer-events: none; }
.ride-stick-label.up { top: 38px; left: 50%; transform: translateX(-50%); }
.ride-stick-label.down { bottom: 38px; left: 50%; transform: translateX(-50%); }
.ride-stick-label.left { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.ride-stick-label.right { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.ride-stick-knob { position: absolute; left: calc(50% - 21px); top: calc(50% - 21px); width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .3), inset 0 0 0 3px rgba(255, 255, 255, .55); pointer-events: none; }
#ride-stick:not(.is-ready) .ride-stick-pad { opacity: .5; }
#ride-stick.is-learned .ride-stick-help { opacity: 0; pointer-events: none; }
#ride-stick.is-learned .ride-stick-pad { opacity: .42; }
#ride-stick.is-learned.is-active .ride-stick-pad { opacity: .8; }
#ride-stick.is-learned .ride-stick-label { opacity: 0; transition: opacity .6s ease; }
@media (prefers-reduced-motion: reduce) { .ride-stick-help, .ride-stick-pad { transition: none; } }
/* Im Velomodus nur Szene und Tempoanzeige: alle Bedienelemente der App sind ausgeblendet */
body.ride-mode #app > :not(#scene), body.ride-mode > :not(#app):not(#ride-hud):not(#ride-stick):not(#ride-keys):not(script):not(style) { display: none !important; }
body.ride-mode #scene { pointer-events: none; }
.ride-street { font-family: var(--f-display); font-size: 16px; font-weight: 600; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ride-stick-label.left, .ride-stick-label.right { background: var(--panel); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 8px; color: var(--ink); }
.route-dialog { position: fixed; left: 50%; bottom: 28px; z-index: 41; display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: 10px; width: min(420px, calc(100vw - 28px)); max-height: 60vh; overflow: auto; padding: 14px 16px; transform: translateX(-50%); border: 1px solid var(--rule); border-radius: 12px; background: var(--panel-solid); box-shadow: var(--shadow); color: var(--ink); font-size: 12.5px; line-height: 1.45; }
.route-dialog[hidden] { display: none; }
.route-dialog-body { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.route-dialog-body strong { font-size: 14px; }
.route-dialog-body dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 0; }
.route-dialog-body dt { color: var(--ink-3); }
.route-dialog-body dd { margin: 0; }
.route-dialog-body p { margin: 0; color: var(--ink-3); font-size: 11px; }
.route-dialog-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.route-dialog-actions .btn { text-decoration: none; }
.route-dialog-close { grid-row: 1; grid-column: 2; width: 28px; height: 28px; }

/* Denkmal und Geschichte */
.heritage-list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.heritage-list li { display: grid; gap: 2px; font-size: 12px; line-height: 1.4; }
.heritage-list li b { font-weight: 650; }
.heritage-list li span { color: var(--ink-2); }
.heritage-events blockquote { margin: 3px 0 0; padding: 0 0 0 10px; color: var(--ink-2); font-size: 11.5px; font-style: italic; }
.heritage-events small, .heritage-events small a { color: var(--ink-3); font-size: 10.5px; }

/* Zeitreise: belegtes Ereignis */
#timeline-year-display .timeline-event { display: block; max-width: 26em; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel-solid, #fff); color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.16); font-size: 13px; line-height: 1.45; animation: timeline-event-in .35s ease-out; }
#timeline-year-display .timeline-event[hidden] { display: none; }
#timeline-year-display .timeline-event strong { display: block; font-size: 15px; margin-bottom: 2px; }
#timeline-year-display .timeline-event small { display: block; margin-top: 6px; color: var(--ink-3); font-size: 11px; }
@keyframes timeline-event-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #timeline-year-display .timeline-event { animation: none; } }
@media (max-width: 760px) { #timeline-year-display .timeline-event { max-width: calc(100vw - 40px); font-size: 12px; } }

#timeline-year-display .timeline-event figure, .heritage-photo { margin: 8px 0 0; }
#timeline-year-display .timeline-event img, .heritage-photo img { display: block; width: 100%; max-height: 190px; object-fit: cover; border-radius: 6px; }
#timeline-year-display .timeline-event figcaption, .heritage-photo figcaption { margin-top: 4px; color: var(--ink-3); font-size: 10.5px; line-height: 1.35; }

/* Vorher/Nachher-Wischer in der Zeitreise */
#compare-divider { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); z-index: 8; cursor: ew-resize; touch-action: none; }
#compare-divider[hidden] { display: none; }
#compare-divider .compare-grip { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
#compare-divider .compare-grip::before, #compare-divider .compare-grip::after { content: ""; position: absolute; top: 12px; border: 6px solid transparent; }
#compare-divider .compare-grip::before { left: 2px; border-right-color: #333; }
#compare-divider .compare-grip::after { right: 2px; border-left-color: #333; }
#compare-divider .compare-label { position: absolute; top: 50%; margin-top: 26px; padding: 4px 8px; border-radius: 6px; background: var(--panel-solid, #fff); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
#compare-divider .compare-then { right: 10px; }
#compare-divider .compare-now { left: 10px; }
#timeline-map-toggle[aria-pressed="true"], #timeline-compare[aria-pressed="true"] { background: var(--ink); color: var(--panel-solid, #fff); }

@media (max-width: 760px) {
  #dock { left: auto; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
  #dock .dock-long { display: none; }
}

/* «Was stand hier früher?» */
.then-map { position: relative; width: 280px; height: 170px; margin-top: 6px; border-radius: 6px; background-repeat: no-repeat; background-color: #eeece6; }
.then-map::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 999px; border: 3px solid #c0392b; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }

#timeline-year-display .timeline-event .timeline-event-extra { margin: 6px 0 0; font-size: 12px; color: var(--ink-2); }

/* Einstieg Luzern */
#luzern-intro { position: absolute; inset: 0; z-index: 18; display: grid; align-items: end; justify-items: start; padding: 0 40px 132px; pointer-events: none; opacity: 0; transition: opacity .5s ease; }
#luzern-intro[hidden] { display: none; }
#luzern-intro.is-visible { opacity: 1; }
#luzern-intro.is-leaving { opacity: 0; }
.luzern-intro-card { max-width: 30rem; padding: 24px 24px 20px; border-radius: 12px; background: var(--panel-solid, #fff); box-shadow: var(--shadow); pointer-events: auto; }
.luzern-intro-card h1 { margin: 0 0 8px; font: 650 44px/1.05 var(--f-display); letter-spacing: 0; text-wrap: balance; }
.luzern-intro-card p { margin: 0 0 18px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.luzern-intro-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.luzern-intro-actions .btn { padding: 10px 16px; font-size: 15px; }
body:has(#luzern-intro.is-visible) #dock, body:has(#luzern-intro.is-visible) #clock-btn, body:has(#luzern-intro.is-visible) #time-weather-panel { visibility: hidden; }
@media (max-width: 760px) {
  #luzern-intro { padding: 0 12px 132px; justify-items: stretch; }
  .luzern-intro-card h1 { font-size: 34px; }
  .luzern-intro-card p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { #luzern-intro { transition: none; } }


#timeline-year-display .timeline-event .timeline-day-title { display: block; margin-bottom: 2px; font: 650 14px/1.35 var(--f-display); }
#timeline-year-display .timeline-event blockquote { margin: 6px 0 0; padding: 0 0 0 10px; font-style: italic; color: var(--ink-2); font-size: 12px; }
#timeline-year-display .timeline-event { pointer-events: auto; }


/* Luzern 3D: entschlackt (Brunnen-Funktionen ohne Bezug zur Stadtgeschichte) */
#quick-access [data-quick="buildings"], #quick-access [data-quick="traffic"], #quick-access [data-quick="timeline"],
.map-details-tools, #demographic-analysis, #timeline-speed, #timeline-rate { display: none !important; }

.profile-summary { margin: 0 0 4px; font: 500 15px/1.45 var(--f-display); color: var(--ink); }

/* Zeitreise-Leiste (Luzern 3D) */
#time-travel-panel { padding: 12px 16px 10px; width: min(880px, calc(100vw - 28px)); }
#time-travel-panel .tl-main { display: flex; align-items: center; gap: 14px; }
#time-travel-panel .tl-play { flex: none; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.18); cursor: pointer; transition: transform .15s ease; }
#time-travel-panel .tl-play:hover { transform: scale(1.05); }
#time-travel-panel .tl-play:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
#time-travel-panel .tl-track { position: relative; flex: 1 1 auto; height: 44px; }
#time-travel-panel .tl-range { position: absolute; left: 0; right: 0; top: 14px; width: 100%; margin: 0; height: 16px; background: transparent; -webkit-appearance: none; appearance: none; --progress: 100%; }
#time-travel-panel .tl-range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--accent) var(--progress), rgba(20,30,25,.16) var(--progress)); }
#time-travel-panel .tl-range::-moz-range-track { height: 4px; border-radius: 999px; background: rgba(20,30,25,.16); }
#time-travel-panel .tl-range::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--accent); }
#time-travel-panel .tl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 999px; background: #fff; border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: grab; }
#time-travel-panel .tl-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 999px; background: #fff; border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
#time-travel-panel .tl-events { position: absolute; left: 0; right: 0; top: 2px; height: 10px; }
#time-travel-panel .tl-dot { position: absolute; top: 0; width: 8px; height: 8px; margin-left: -4px; padding: 0; border: 0; border-radius: 999px; background: var(--ink-2); opacity: .55; cursor: pointer; transition: transform .15s ease, opacity .15s ease; }
#time-travel-panel .tl-dot.is-fire { background: #c2502a; opacity: .8; }
#time-travel-panel .tl-dot:hover, #time-travel-panel .tl-dot:focus-visible { opacity: 1; transform: scale(1.5); }
#time-travel-panel .tl-scale { position: absolute; left: 0; right: 0; top: 30px; height: 14px; }
#time-travel-panel .tl-scale span { position: absolute; transform: translateX(-50%); color: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#time-travel-panel .tl-scale span:last-child { transform: translateX(-100%); }
#time-travel-panel .tl-scale span:first-child { transform: none; }
#time-travel-panel .tl-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 8px; }
#time-travel-panel .tl-day { flex: 0 1 300px; min-width: 0; height: 32px; padding: 0 10px; border: 0; border-radius: 6px; background: var(--field, rgba(0,0,0,.05)); color: var(--ink); font: inherit; font-size: 13px; }
#time-travel-panel .tl-toggles { display: flex; align-items: center; gap: 6px; }
#time-travel-panel .tl-toggle { height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--field, rgba(0,0,0,.05)); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
#time-travel-panel .tl-toggle[aria-pressed="true"] { background: var(--ink); color: var(--panel-solid, #fff); }
@media (max-width: 760px) {
  #time-travel-panel { padding: 10px 12px; }
  #time-travel-panel .tl-main { gap: 10px; }
  #time-travel-panel .tl-controls { flex-wrap: wrap; }
  #time-travel-panel .tl-day { flex: 1 1 100%; }
  #time-travel-panel .tl-toggles { flex: 1 1 100%; }
  #time-travel-panel .tl-toggle { flex: 1 1 0; }
  #time-travel-panel .tl-scale span:nth-child(2), #time-travel-panel .tl-scale span:nth-child(3), #time-travel-panel .tl-scale span:nth-child(5) { display: none; }
  #time-travel-panel .tl-day { width: 100%; }
  #time-travel-panel .tl-long { display: none; }
}
@media (prefers-reduced-motion: reduce) { #time-travel-panel .tl-play, #time-travel-panel .tl-dot { transition: none; } }

.quality-toggle { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 10px; font-size: 13px; cursor: pointer; }
.quality-toggle small { display: block; color: var(--ink-3); font-size: 11px; }

body.time-travel-active #navigation-hint { padding-bottom: 190px; }

/* Live-Wetter mit einem Klick (Start immer hell & klar) */
.live-toggle { position: absolute; top: 68px; left: calc(50% - 18px); transform: translateX(-50%); z-index: 5; display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px 0 11px; border: 0; border-radius: 999px; background: var(--panel, rgba(248, 248, 245, 0.94)); color: var(--ink); font: 600 12.5px/1 var(--f-ui); box-shadow: 0 2px 10px rgba(20, 24, 28, 0.14); cursor: pointer; }
.live-toggle:hover { background: #fff; }
.live-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.live-toggle-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3, #8a8f95); }
.live-toggle[aria-pressed="true"] .live-toggle-dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(184, 37, 43, 0.18); }
body.ride-mode .live-toggle, body:has(#sky-panel:not([hidden])) .live-toggle { display: none; }
@media (min-width: 761px) and (max-width: 1244px) { .live-toggle { top: 124px; left: 50%; } }
@media (min-width: 1245px) and (max-width: 1299px) { .live-toggle { left: calc(50% - 25px); } }
@media (max-width: 760px) {
  .live-toggle { top: 54px; left: auto; right: 8px; transform: none; height: 32px; font-size: 12.5px; }
  body.mobile-tools-open .live-toggle { display: none; }
}

.tb-short { display: none; }
/* Velo nur noch in der Zeitreise (Zeitreise-Fahrt), nicht in der Hauptleiste */
#btn-ride { display: none !important; }
/* Handy: nur das Wesentliche, mit kurzer Beschriftung; Drehen geht mit zwei Fingern */
@media (max-width: 760px) {
  #view-panel { display: flex !important; align-items: center; gap: 4px; height: 44px; }
  #btn-rotate-ccw, #btn-rotate-cw, #btn-theme, #view-panel .toolbar-divider:nth-of-type(2) { display: none !important; }
  #view-panel .toolbar-button[data-short] { width: auto !important; min-width: 44px; height: 38px !important; display: grid; grid-template-rows: 20px 12px; justify-items: center; align-content: center; padding: 0 6px; }
  #view-panel .toolbar-button[data-short]::after, #view-panel .toolbar-button[data-short]::before { display: none !important; }
  #view-panel .tb-short { display: block; font: 600 10px/1 var(--f-ui); color: var(--ink-2, #3b4640); }
  #view-panel .toolbar-position { flex: 1; min-width: 0; height: 38px; }
  #preset-select { font-size: 13px !important; padding: 4px 2px !important; }
}

/* Zeitreise-Fahrt */
.tl-ride { display: inline-flex; align-items: center; gap: 6px; }
.tl-ride svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
/* Zeitreise-Leiste auf dem Handy: fünf Bedienelemente in einer Zeile, nichts bricht um */
@media (max-width: 760px) {
  .tl-toggles { display: flex; flex-wrap: nowrap; gap: 6px; min-width: 0; }
  .tl-toggles .tl-toggle { white-space: nowrap; padding: 0 9px; font-size: 12.5px; flex: 1 1 auto; min-width: 0; justify-content: center; }
  .tl-toggles .icon-btn { flex: 0 0 34px; width: 34px; }
}
@media (max-width: 360px) {
  .tl-toggles .tl-toggle { padding: 0 6px; font-size: 12px; }
  .tl-ride svg { display: none; }
}
@media (max-width: 360px) { .tl-narrow-hide { display: none; } }

/* ===== Zeitreise als Erzählung (Kapitel, leichte Karte, Vor/Zurück, Menü) ===== */
#time-travel-panel { position: absolute; width: min(760px, calc(100vw - 28px)); padding: 10px 14px 10px; }
#time-travel-panel .tl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
#time-travel-panel .tl-chapter { margin: 0; min-width: 0; font: 600 15px/1.3 var(--f-display); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#time-travel-panel .tl-chapter-n { font: 600 12px/1 var(--f-ui); color: var(--ink-3); font-variant-numeric: tabular-nums; margin-right: 4px; }
#time-travel-panel .tl-head-actions { display: flex; gap: 4px; flex: none; }
#time-travel-panel .tl-head-actions .icon-btn { width: 34px; height: 34px; font-size: 17px; }
#time-travel-panel .tl-more { font-weight: 700; letter-spacing: .05em; }
#time-travel-panel .tl-main { gap: 8px; }
#time-travel-panel .tl-step { flex: none; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 999px; background: var(--field, rgba(0,0,0,.06)); color: var(--ink); cursor: pointer; }
#time-travel-panel .tl-step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#time-travel-panel .tl-step:hover { background: rgba(0,0,0,.1); }
#time-travel-panel .tl-step:focus-visible, #time-travel-panel .tl-head-actions .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#time-travel-panel .tl-track { margin-left: 6px; }
#time-travel-panel .tl-chapters { position: absolute; left: 0; right: 0; top: 34px; height: 6px; }
#time-travel-panel .tl-chapters span { position: absolute; top: 0; height: 4px; border-radius: 2px; background: rgba(20,30,25,.14); cursor: pointer; box-shadow: inset 2px 0 0 var(--panel-solid, #fff); }
#time-travel-panel .tl-chapters span.is-active { background: var(--ink-2, #3b4640); }
#time-travel-panel .tl-scale { top: 40px; }
#time-travel-panel .tl-track { height: 54px; }
#time-travel-panel .tl-dot.is-other { opacity: .18; transform: scale(.7); }
#time-travel-panel .tl-menu { position: absolute; right: 10px; bottom: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); padding: 6px; border-radius: 12px; background: var(--panel-solid, #fff); box-shadow: 0 8px 28px rgba(15,25,20,.22); display: grid; gap: 2px; z-index: 12; }
#time-travel-panel .tl-menu[hidden] { display: none; }
#time-travel-panel .tl-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 500 14px/1.2 var(--f-ui); text-align: left; cursor: pointer; }
#time-travel-panel .tl-menu-row:hover { background: rgba(0,0,0,.05); }
#time-travel-panel .tl-menu-row kbd { font: 600 11px/1 var(--f-ui); color: var(--ink-3); border: 1px solid rgba(0,0,0,.15); border-radius: 4px; padding: 3px 5px; }
#time-travel-panel .tl-menu .tl-day { flex: 0 1 150px; height: 32px; font-size: 13px; }
#time-travel-panel .tl-switch { flex: none; width: 34px; height: 20px; border-radius: 999px; background: rgba(20,30,25,.2); position: relative; transition: background .15s; }
#time-travel-panel .tl-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
#time-travel-panel [aria-pressed="true"] .tl-switch { background: var(--accent); }
#time-travel-panel [aria-pressed="true"] .tl-switch::after { transform: translateX(14px); }

/* Halte-Karte: links über der Leiste, Stadt bleibt frei */
#timeline-year-display .timeline-event { position: fixed; left: 20px; bottom: 136px; width: min(360px, calc(100vw - 40px)); max-width: none; margin: 0; padding: 14px 16px 12px; border-radius: 14px; font: 400 14px/1.5 var(--f-ui); box-shadow: 0 8px 28px rgba(15,25,20,.18); max-height: calc(100vh - 300px); overflow: auto; }
#timeline-year-display .timeline-event .ev-head { display: block; }
#timeline-year-display .timeline-event .ev-year { display: block; margin: 0 0 2px; color: var(--accent); font: 600 13px/1.2 var(--f-ui); font-variant-numeric: lining-nums; }
#timeline-year-display .timeline-event .ev-head strong { display: block; margin: 0; font: 600 21px/1.2 var(--f-display); color: var(--ink); }
#timeline-year-display .timeline-event .ev-text { margin: 6px 0 0; color: var(--ink); }
#timeline-year-display .timeline-event .ev-thumb { float: right; width: 92px; height: 92px; margin: 0 0 6px 12px; object-fit: cover; border-radius: 8px; }
#timeline-year-display .timeline-event.is-expanded .ev-thumb { float: none; display: block; width: 100%; height: auto; max-height: 200px; margin: 0 0 10px; }
#timeline-year-display .timeline-event .ev-more { display: inline-block; margin: 8px 0 0; padding: 4px 0; border: 0; background: none; color: var(--ink-2); font: 600 13px/1 var(--f-ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; clear: both; }
#timeline-year-display .timeline-event .ev-more-body { clear: both; margin-top: 6px; }
#timeline-year-display .timeline-event .ev-more-body blockquote { margin: 0 0 8px; padding: 0; color: var(--ink-2); font: italic 400 14px/1.45 var(--f-display); }
#timeline-year-display .timeline-event .ev-note { margin: 0 0 6px; color: var(--ink-3); font-size: 12px; line-height: 1.4; }
#timeline-year-display .timeline-event small a { color: inherit; }
#timeline-year-display .timeline-event.is-chapter .ev-head strong { font-size: 26px; }
#timeline-year-display .timeline-event .ev-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

@media (max-width: 760px) {
  #time-travel-panel { padding: 8px 10px 8px; }
  #time-travel-panel .tl-chapter { font-size: 14px; }
  #time-travel-panel .tl-step { width: 36px; height: 36px; }
  #time-travel-panel .tl-play { width: 42px; height: 42px; }
  #time-travel-panel .tl-menu { right: 0; left: 0; width: auto; }
  /* Bottom-Sheet über der Leiste: wischen links/rechts = Halt, hoch = mehr */
  #timeline-year-display .timeline-event { left: 8px; right: 8px; bottom: 150px; width: auto; max-height: 42vh; padding: 12px 14px 10px; border-radius: 16px 16px 14px 14px; font-size: 14px; touch-action: pan-y; }
  #timeline-year-display .timeline-event::before { content: ""; display: block; width: 36px; height: 4px; margin: -4px auto 8px; border-radius: 2px; background: rgba(20,30,25,.18); }
  #timeline-year-display .timeline-event .ev-thumb { width: 64px; height: 64px; }
  #timeline-year-display .timeline-event .ev-head strong { font-size: 18px; }
  #timeline-year-display .timeline-event.is-expanded { max-height: 70vh; }
  #timeline-year { font-size: 44px; }
}
body.time-travel-active #navigation-hint { display: none !important; }
@media (pointer: coarse) { #time-travel-panel .tl-menu-row kbd { display: none; } }

/* Schlussprüfung 10.11.: Statuszeile nur bei Inhalt; Jahr unter dem Titel statt Eyebrow darüber */
#statusbar[hidden] { display: none !important; }
#timeline-year-display .timeline-event .ev-head strong { margin: 0; }
#timeline-year-display .timeline-event .ev-year { margin: 3px 0 0; color: var(--ink-2); font: 500 13px/1.3 var(--f-ui); }

/* Einwohnerzahl unter der Jahreszahl der Zeitreise */
#timeline-year-display .timeline-pop { display: block; margin-top: 2px; color: var(--ink); font: 600 17px/1.3 var(--f-ui); font-variant-numeric: tabular-nums; text-shadow: 0 0 2px #fff, 0 0 10px rgba(255,255,255,.95); }
#timeline-year-display .timeline-pop:empty { display: none; }
@media (max-width: 760px) { #timeline-year-display .timeline-pop { font-size: 14px; } }

/* Spezialmomente im Panel «Ansicht einstellen» */
.moment-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.moment-buttons button { border: 1px solid var(--rule); background: var(--field); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--ink-2); min-height: 32px; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 120ms ease; }
.moment-buttons button:hover { color: var(--ink); border-color: var(--ink-3); }
.moment-buttons button:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) { .moment-buttons button { transition: none; } }

/* Urheberzeile: dezent unter dem Titel und am Ende des Info-Texts */
.loading-card .loading-byline { margin: 2px 0 10px; font-size: 13px; color: var(--ink-2); letter-spacing: 0.01em; }
.timeline-credit { color: var(--ink-2); font-size: 12.5px; }
.timeline-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
