/* Keep the map at a stable size when the reader opens a tool. */
body.map-led {--atlas-nav-height:48px;--ml-ink:#203f37;--ml-paper:#faf9f2;--ml-edge:#cbd2c2;--ml-dock:52px;overflow:hidden}
body.map-led > main {display:block;height:calc(100dvh - var(--atlas-nav-height));min-height:0}
body.map-led main > .viewer {position:relative;display:flex;flex-flow:column nowrap;height:100%;min-height:0;padding:0;overflow:hidden}
body.map-led .viewer > #viewport {flex:1 1 0;height:auto;min-height:0;width:100%;border:0;border-radius:0;box-shadow:none}
body.map-led #atlasNavigation {padding:0 clamp(8px,2vw,28px);gap:6px;border-bottom:1px solid var(--ml-edge);box-shadow:none;background:var(--ml-paper)}
body.map-led #atlasNavigation .atlas-nav-primary {margin-right:auto;gap:16px}
body.map-led #atlasNavigation .brand {font:600 clamp(16px,2vw,22px)/1 Georgia,serif;letter-spacing:-.035em;color:var(--ml-ink)}
.ml-actions,.ml-dock,.ml-button,.ml-panel-heading {display:flex;align-items:center}
.ml-actions {gap:3px}
body.map-led .ml-button {gap:7px;justify-content:center;min-height:36px;flex-shrink:0;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--ml-ink);padding:6px 10px;font:650 13px/1.2 system-ui,sans-serif;cursor:pointer}
.map-led .ml-button svg {display:block;flex:none}
.map-led .ml-button:hover,.map-led .ml-button[aria-expanded=true]{background:#e6ecdf}
.map-led .ml-button:focus-visible,.ml-panel button:focus-visible,.ml-sites summary:focus-visible,.ml-dock input:focus-visible {outline:2px solid #a9662e;outline-offset:-2px}
.map-led #atlasNavToggle {height:35px;min-height:35px;margin-left:4px;padding:5px 9px}
.ml-dock {height:var(--ml-dock);flex:0 0 var(--ml-dock);gap:3px;padding:0 clamp(8px,2vw,30px);background:var(--ml-paper);border-top:1px solid var(--ml-edge);color:var(--ml-ink)}
.ml-dock .ml-button:first-child {margin-right:8px}
.ml-dock .ml-button:not(:first-child) {width:35px;padding:4px}
.ml-dock .ml-button:disabled {opacity:.36;cursor:default}
.ml-dock .ml-play,.ml-dock .ml-play:hover {border-radius:50%;background:#274d40;color:white;width:32px;height:32px;min-height:32px}
.ml-dock input[type=range] {flex:1;min-width:36px;width:auto;margin:0 10px;height:32px;accent-color:#39664e;cursor:pointer}
.ml-year {font:600 18px/1.05 Georgia,serif;min-width:48px;max-width:160px;text-align:right}
.map-led .ml-panel {position:fixed;z-index:1200;box-sizing:border-box;max-height:calc(100dvh - var(--atlas-nav-height) - var(--ml-dock) - 12px);overflow:auto;overscroll-behavior:contain;background:var(--ml-paper);color:var(--ml-ink);border:1px solid #bac8b8;border-radius:12px;box-shadow:0 12px 38px #1e342b33;font:14px/1.45 system-ui,sans-serif}
.map-led .ml-panel[hidden]{display:none!important}
.ml-panel-heading {position:sticky;top:0;z-index:2;justify-content:space-between;gap:10px;background:var(--ml-paper);border-bottom:1px solid var(--ml-edge);padding:7px 10px 7px 16px}
.ml-panel-heading strong {font:600 18px/1.2 Georgia,serif}
.ml-panel-heading .ml-button {height:32px;min-height:32px;width:32px;padding:0}
.ml-maps,.ml-layers {top:calc(var(--atlas-nav-height) + 6px);right:10px}
.ml-maps {width:min(280px,calc(100vw - 20px));padding-bottom:7px}
.map-led .ml-maps .view-switch {display:grid;grid-template-columns:1fr;gap:2px;margin:6px;padding:0;background:none}
.map-led .ml-maps .view-switch button,.ml-plan-link {text-align:left;border-radius:5px;font:600 13px/1.3 system-ui,sans-serif;padding:10px 12px}
.ml-plan-link {margin:0 6px;width:calc(100% - 12px);text-decoration:underline;text-underline-offset:3px}
.ml-layers {width:min(350px,calc(100vw - 20px))}
.map-led .ml-layers aside {display:block;width:auto;padding:12px 15px 18px;background:#233f37;color:#f1f1e7;overflow:visible}
.map-led .ml-layers aside > :is(h1,.intro,.eyebrow,.rule){display:none}
.map-led .ml-layers aside h2 {font-size:23px;margin:12px 0 6px}
.map-led .ml-sketch {margin:0 0 9px;border-bottom:1px solid #82978a;padding:4px 0 9px}
.ml-sketch summary,.ml-sites summary {font-weight:650;cursor:pointer}
.map-led .ml-sketch fieldset {min-width:0;border:0!important;margin:5px 0!important;padding:0!important;text-align:left}
.ml-sketch legend {display:none}
.ml-time {bottom:calc(var(--ml-dock) + 6px);left:10px;width:min(850px,calc(100vw - 20px))}
.map-led .ml-time :is(.timeline,.building-timeline) {padding:10px 14px 16px;min-width:0}
.map-led .ml-time .house-axis-scroll {max-width:100%}
.map-led #atlasMore footer {display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}
.map-led #houseCard {top:calc(var(--atlas-nav-height) + 8px);z-index:1100}
.map-led .housing-scenario {display:none}
body.map-led.building-mode.plan-mode .viewer > .housing-scenario {position:absolute;top:10px;left:12px;z-index:5;display:flex;align-items:center;flex-wrap:nowrap;gap:3px;margin:0;padding:3px;border:1px solid #c3cbbd;border-radius:9px;background:var(--ml-paper);box-shadow:0 2px 10px #172e251a}
.map-led .housing-choices {border:0;background:#e8ecdf}
.map-led .housing-choices button {min-height:31px}
.ml-sites {position:relative;color:#365b45}
.ml-sites summary {list-style:none;padding:7px 9px;font-size:12px}
.ml-sites summary::-webkit-details-marker {display:none}
.ml-sites summary:after {content:' ▾'}
.ml-sites .ml-site-content {display:grid;gap:9px;position:absolute;top:calc(100% + 7px);left:0;width:min(245px,75vw);padding:12px;border:1px solid var(--ml-edge);border-radius:9px;background:var(--ml-paper);box-shadow:0 8px 20px #284a3626}
.ml-sites:not([open]) .ml-site-content {display:none}
.map-led .ml-sites select {width:100%;max-width:100%}
.map-led.building-mode.plan-mode #leftTag {display:none}
.map-led .mapnote {max-width:68%;pointer-events:none}
.map-led .housing-from-today {flex:none;font-size:11px}
@media(max-width:740px){
  body.map-led {--ml-dock:49px;--atlas-nav-height:46px}
  body.map-led #atlasNavigation .eyebrow {display:none}
  .ml-dock {padding:0 6px}
  .ml-dock input[type=range] {margin:0 4px}
  .ml-dock .ml-button:first-child {margin:0;padding:4px 5px}
  .ml-dock .ml-button:not(:first-child){width:29px}
  .ml-year {font-size:15px;min-width:37px;max-width:78px}
  .ml-sites .ml-site-content {left:auto;right:0}
  body.map-led.building-mode.plan-mode .viewer > .housing-scenario {left:6px;top:6px;max-width:calc(100% - 52px)}
  .map-led .viewer .zoom {top:6px;right:6px}
  .map-led .zoom button {width:33px;height:34px}
  .ml-maps,.ml-layers {right:5px}
  .ml-time {left:5px;width:calc(100vw - 10px)}
  .map-led .ml-actions .ml-button {padding:5px 7px;font-size:12px}
  .map-led .ml-panel {max-height:calc(100dvh - var(--atlas-nav-height) - var(--ml-dock) - 10px)}
}
@media(max-width:430px){
  .ml-dock .ml-button:first-child span{display:none}
  body.map-led #atlasNavigation .atlas-nav-primary {gap:0}
  .map-led #atlasNavigation {gap:1px}
  .map-led .ml-actions .ml-button {gap:4px;padding:4px}
  .ml-sites summary {padding:6px 5px}
  .map-led .housing-choices button {font-size:11px;padding:5px 6px}
}
@media(prefers-reduced-motion:no-preference){
  .ml-panel:not([hidden]) {animation:ml-open .14s ease-out}
  @keyframes ml-open {from{opacity:0;transform:translateY(4px)}}
}

body.map-led .ml-dock .ml-play {width:32px;min-height:32px;height:32px;background:#264d40;color:#fff;border-radius:50%}
body.map-led .ml-dock .ml-play:hover {background:#35634e}
.ml-dock #ml-range {appearance:none;-webkit-appearance:none;background:transparent}
#ml-range::-webkit-slider-runnable-track {height:4px;border-radius:4px;background:linear-gradient(to right,#527a60 var(--ml-progress),#ccd5c6 var(--ml-progress))}
#ml-range::-webkit-slider-thumb {-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:#2c5742;border:2px solid #faf9f2;box-shadow:0 0 0 1px #557660;margin-top:-5px}
#ml-range::-moz-range-track {height:4px;border-radius:4px;background:#ccd5c6}
#ml-range::-moz-range-progress {height:4px;background:#527a60}
#ml-range::-moz-range-thumb {width:12px;height:12px;background:#2c5742;border-radius:50%;border:2px solid #faf9f2}
body.map-led.building-mode.plan-mode:has(.housing-choices [data-layout=built][aria-pressed=true]) .mapnote:after {content:'Modelové domy · ilustrativní zastavění';font:600 11px/1.25 system-ui,sans-serif;color:#71417c}
