/* The map and timeline share one screen; long reference material opens on demand. */
#open3D,.photoChoice button{display:inline-block;background:#24483d;color:#fff;text-decoration:none;border-radius:5px;padding:8px 10px;font-size:12px;white-space:nowrap}.photoChoice button:last-child{background:#e6ebdf;color:#203b36}.photoChoice{max-width:410px}.photoChoice h2{font-size:24px}
@media(max-width:740px){#open3D{font-size:11px;text-align:center;padding:6px}}
body>header{height:48px;padding:0 18px;justify-content:flex-start}
header>.eyebrow{margin-right:auto}header button{padding:6px 12px;min-height:34px}
main{height:calc(100dvh - 48px);min-height:0;grid-template-columns:clamp(225px,22vw,305px) minmax(0,1fr)}
main>aside{overflow:auto;padding:20px;display:block;scrollbar-width:thin}
aside h1,.building-mode aside h1{font-size:36px;margin:8px 0 12px}
.viewer{padding:10px 14px 0;min-height:0;overflow:auto}
.view-switch{flex-shrink:0;margin-bottom:8px}.view-switch button{padding:8px 13px}
.viewer #viewport,body.building-mode .viewer #viewport{height:auto;min-height:145px;flex:1 0 145px}
.building-timeline,.timeline{padding:8px 0 0;flex-shrink:0}.timelinehead,.building-timeline .timelinehead{margin-bottom:4px;gap:8px}
.timeline .hint,.building-timeline .hint{margin:3px 0}.period-totals{margin-bottom:5px}.period-totals strong{font-size:20px}
.viewer footer{padding:5px 0;font-size:10px;flex-shrink:0}
#flowPanel{background:#fffef7;border:1px solid #c6cfc0;border-radius:8px;margin:0 0 8px;padding:10px 12px;flex:none}
.flowFields,.flowResult,.flowResult>div:last-child,#flowNearby{display:flex;align-items:center;gap:8px}
.flowFields label,.flowFields legend{font-size:11px;font-weight:700;color:#486157}
.flowFields label:first-child{flex:1;min-width:0}.flowFields select{display:block;width:100%;height:34px;margin-top:3px;font-size:13px;text-overflow:ellipsis}
.flowFields fieldset{margin:0;border:0;padding:0}.flowFields legend{padding:0;margin-bottom:3px}
#flowPanel button,#flowMarker{border-radius:5px;background:#e6ebdf;font-size:12px;min-height:34px;padding:5px 9px}
#flowPanel button[aria-pressed=true]{background:#234e44;color:white}
.flowResult{justify-content:space-between;margin-top:8px;padding-top:7px;border-top:1px solid #dee3d6}
.flowResult strong,.flowResult small,#flowContent small{display:block}.flowResult strong{font:600 22px Georgia,serif}.flowResult small{font-size:11px;margin-top:2px}
#flowNearby:not(:empty){margin-top:5px}.flow-mode .mapnote{font-size:0}.flow-mode .mapnote:after{content:'Území bilance · městys Pozořice';font-size:10px}
#flowMarker{position:absolute;color:#fff;background:#153e4a;border:1px solid #fff;font-weight:700;box-shadow:0 1px 4px #0004}
#flowDetail table{width:100%;border-collapse:collapse;font-size:13px}#flowDetail th,#flowDetail td{text-align:left;border-bottom:1px solid #cdd5ca;padding:7px 3px}
.flowBar{display:block;height:9px;background:#397267}#flowDetail small{margin-top:5px}
dialog .close{position:sticky;top:0;background:#f3f1e9;border-radius:6px;z-index:1}#atlasMore aside{border-radius:8px;padding:14px}
@media(max-width:740px){
  body>header{padding:0 8px;gap:5px;height:44px}.brand{font-size:12px;margin-right:auto}header>.eyebrow{display:none}header button{font-size:10px;padding:4px 7px}
  main{height:calc(100dvh - 44px);display:block}.viewer{height:100%;padding:6px 6px 0}
  .view-switch{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-self:stretch;align-items:stretch;margin-bottom:5px;border-radius:8px;padding:2px}
  .view-switch button{font-size:11px;line-height:1.15;padding:4px;min-height:36px;border-radius:6px}
  #flowPanel{padding:6px 8px;margin-bottom:5px}.flowFields{display:grid;grid-template-columns:minmax(0,1fr) 67px}
  .flowFields fieldset{grid-column:1/-1;display:flex;gap:3px}.flowFields legend{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
  .flowFields select{font-size:12px}.flowFields{gap:4px}.flowResult{gap:3px;padding-top:5px;margin-top:5px;align-items:start}.flowResult strong{font-size:18px}
  .flowResult>div:last-child{flex-direction:column;align-items:stretch;gap:2px}#flowPanel button{font-size:11px;min-height:30px}
  .timelinehead label,.timelinehead .play{font-size:11px}.play{min-width:0;padding:8px 11px}
  #ticks,.building-years{flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start}.building-years button,#ticks button{flex:0 0 auto}
  .timeline .hint,.building-timeline .hint{display:none}
  .building-timeline,.timeline{padding-top:5px}.building-timeline .timelinehead{gap:4px}.period-totals{font-size:10px;gap:14px}.period-totals strong{font-size:17px}
  .viewer footer{align-items:center;font-size:8px}.viewer footer .textlink{min-height:26px}
  #atlasMore aside{display:block}dialog{padding:15px}
}
