/* Warm neutral cartography; the established sand-to-rust data scale is unchanged. */
:root{--c0:#f3ead2;--c1:#ecc98a;--c2:#e09a52;--c3:#c9652f;--c4:#8f2f1a;--loss-header:72px}
::selection{background:#dfd3be;color:#20343a}input,select{caret-color:#176b73}button,input,select,summary{touch-action:manipulation}
#address-input::placeholder{color:#53666a;opacity:1}#map{background:#f2efe7}.map-stage{height:calc(100dvh - var(--loss-header));min-height:0}
select{font:inherit;border:1px solid #b9c6c1;border-radius:6px;padding:8px 10px;background:#fff;color:#20343a;min-height:44px;max-width:100%}select:focus-visible,summary:focus-visible{outline:3px solid #277b84;outline-offset:3px}
.metric-bar{position:absolute;left:12px;bottom:28px;z-index:700;background:#fcfbf7;border:1px solid #d3d7cd;border-radius:10px;padding:12px 14px;width:min(350px,calc(100% - 24px));font-size:12px;line-height:1.45}
.metric-bar .scenario{margin:0 0 9px;color:#283f41;font-size:13px;font-weight:650}.metric-bar label{display:block;font-size:12px;color:#4d6061;margin-bottom:4px}.metric-bar select{width:100%;font-size:14px}.metric-bar .key-note{margin:9px 0 0;color:#4d6061}
.scale{list-style:none;display:flex;margin:10px 0 0;padding:0;font-size:11px;color:#344c4f;font-variant-numeric:tabular-nums}.scale li{flex:1;text-align:center;line-height:1.4}.scale li::before{content:'';display:block;height:9px;background:var(--swatch);margin-bottom:5px}.scale li:first-child::before{border-radius:3px 0 0 3px}.scale li:last-child::before{border-radius:0 3px 3px 0}
#scale-explanation{margin-top:5px}#scale-explanation summary{cursor:pointer;min-height:30px;padding:6px 0}#scale-explanation p{margin:3px 0 0;max-width:60ch}#scale-explanation[open]{max-height:220px;overflow:auto}
.panel{border-radius:12px;box-shadow:0 8px 26px #20343a1a;top:calc(var(--loss-header) + 16px);max-height:calc(100dvh - var(--loss-header) - 100px)}.panel-header{padding:12px 16px}.panel-header h2{line-height:1.25;font-size:20px}.panel-content{padding:16px;scrollbar-width:thin;scrollbar-color:#a7b7b1 #f5f3ed}.place-district{margin:3px 0 0!important;font-size:13px}
.panel-content .result-scenario{margin:0 0 10px;font-size:12px;font-weight:600;color:#566763}.measure-label{font-size:14px;color:#344e50;margin:0 0 4px!important}#place-figure{margin:0;color:#7e381e;font-size:34px;font-variant-numeric:tabular-nums}#place-figure-note{margin:6px 0 10px;font-size:14px;line-height:1.5}
#place-panel .scope-note{background:none;border:0;padding:0;margin:8px 0 12px;font-size:12px;line-height:1.5;color:#4d6061}.place-tools{display:flex;gap:8px;margin:12px 0 0}.place-tools button{min-height:44px;font-size:13px;padding:8px 10px;flex:1}#place-details-toggle{display:none}#place-share{text-align:center;color:#176b73}#share-status:empty,#place-source-name:empty{display:none}#share-status{font-size:12px}#place-back{margin-top:14px}#place-details .muted{font-size:12px;line-height:1.5}
.figures{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}.figures th{text-align:left;font-weight:400;padding:7px 0;border-bottom:1px solid #e3e7df}.figures td{text-align:right;font-weight:650;padding:7px 0;border-bottom:1px solid #e3e7df;white-space:nowrap}.figures tr:last-child th,.figures tr:last-child td{border-bottom:0}.figures i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:8px;background:var(--swatch)}
.damage-bar{display:flex;height:10px;border-radius:3px;overflow:hidden;background:#edece4;margin:8px 0 4px}.damage-bar span{background:var(--swatch)}
.rank-list{margin:10px 0 0;padding:0;list-style:none}.rank-list button{display:flex;gap:10px;justify-content:space-between;width:100%;text-align:left;border:0;border-bottom:1px solid #e3e7df;border-radius:0;padding:9px 2px;font-weight:500;min-height:44px}.rank-list button::before{content:attr(data-rank) '.';color:#526863;min-width:2.2em;font-variant-numeric:tabular-nums}.rank-list span:first-child{flex:1}.rank-list span:last-child{font-weight:650;font-variant-numeric:tabular-nums;white-space:nowrap}
#rank-panel label{display:block;font-size:13px;color:#4d6468;margin-bottom:4px}#rank-district{width:100%}.search-results #search-options .address-search{font-weight:650;color:#176b73}.search-results #search-options button{min-height:44px}
.noscript-note{position:relative;z-index:5;max-width:640px;margin:0 auto;padding:20px 16px;background:#fff;line-height:1.6}
@media(max-width:760px){
 .metric-bar{left:8px;right:8px;bottom:auto;top:8px;width:auto;padding:8px 10px}.metric-bar .scenario{font-size:12px;margin-bottom:5px}.metric-bar label{display:none}.metric-bar select{min-height:40px;font-size:13px;padding:6px 8px}.scale{margin-top:6px;font-size:11px}.metric-bar .key-note{font-size:11px;margin-top:6px}.metric-bar summary{font-size:11px}
 .leaflet-top.leaflet-left{top:220px}.leaflet-top,.leaflet-bottom{z-index:650}.panel{top:auto;bottom:74px;right:8px;width:calc(100% - 16px);max-height:calc(100dvh - var(--loss-header) - 100px)}.panel-header{padding:10px 12px}.panel-header h2{font-size:18px}.panel-content{padding:12px}.map-actions{bottom:27px;padding:4px}.map-actions button{padding:7px 9px;min-height:40px}.map-message{top:190px}
 #place-details-toggle{display:block}#place-panel:not(.details-open) #place-details{display:none}#place-panel{max-height:43dvh}#place-panel.details-open{max-height:calc(100dvh - var(--loss-header) - 90px)}#place-panel .result-scenario{display:none}#place-panel #place-figure{font-size:28px}#place-panel #place-figure-note{font-size:13px;margin:3px 0 6px}#place-panel .scope-note{font-size:11px;margin:5px 0}.place-tools{margin-top:8px}#place-panel .panel-content{padding-top:9px}.place-tools button{font-size:12px;padding:7px 5px}
 body.place-open .metric-bar .scenario,body.place-open .metric-bar .key-note,body.place-open #scale-explanation{display:none}body.place-open .leaflet-top.leaflet-left{top:103px}body.place-open .map-message{top:103px}
}
@media(max-height:480px) and (min-width:761px){.metric-bar .key-note,#scale-explanation{display:none}.metric-bar{width:290px}.panel{max-height:calc(100dvh - var(--loss-header) - 40px)}}
/* Keep a usable map window on short phones; the full explanation stays in Details. */
@media(max-width:760px){
 #place-panel .result-scenario{display:block;margin:0 0 5px;font-size:11px}
 #place-measure{display:none}
}
@media(max-width:760px) and (max-height:650px){
 #place-panel:not(.details-open){max-height:32dvh}
 #place-panel:not(.details-open) #place-figure-note,#place-panel:not(.details-open) .result-scenario{display:none}
 #place-panel:not(.details-open) .scope-note{font-size:11px;line-height:1.3;margin:3px 0}
 #place-panel .panel-header{padding:6px 10px}#place-panel .panel-header h2{font-size:16px}#place-panel .panel-close{height:36px;min-width:36px;width:36px}
 #place-panel:not(.details-open) .panel-content{padding:5px 10px 7px}#place-panel:not(.details-open) #place-figure{font-size:24px;float:right;margin-left:10px}
 #place-panel:not(.details-open) .place-tools{clear:both;margin-top:5px}#place-panel:not(.details-open) .place-tools button{min-height:36px}
 .metric-bar .scenario{font-size:11px}
 body.place-open .metric-bar .scenario{display:block;margin-bottom:4px}
 body.place-open .scale{font-size:11px;white-space:nowrap}.scale li::before{margin-bottom:3px}
 body.place-open .leaflet-top.leaflet-left{top:130px}
}

.brand small{font-size:11px}
@media(max-width:760px) and (max-height:650px){body.place-open .metric-bar .scenario::after{content:"Bina envanteri: 2017";display:block;font-weight:400}}
/* Short landscape: use the available width rather than stacking over the map. */
@media(min-width:600px) and (max-width:760px) and (max-height:500px){
 .app-header{flex-wrap:nowrap;min-height:64px;padding:8px 12px;gap:10px}.app-header .brand img{width:26px;height:26px}.app-header .brand small{display:none}.app-header .brand h1{font-size:14px;max-width:165px}.app-header form{order:0;flex:1;flex-basis:auto;min-width:140px}.app-header input{padding:8px}.app-header .account-open{font-size:12px;padding:8px;min-width:68px}
 .metric-bar{left:8px;right:auto;top:auto;bottom:28px;width:260px}.metric-bar .key-note{font-size:11px}.metric-bar .scenario{font-size:11px}.metric-bar #scale-explanation{display:none}
 .panel,#place-panel:not(.details-open),#place-panel.details-open{top:calc(var(--loss-header) + 8px);bottom:auto;right:8px;width:280px;max-height:calc(100dvh - var(--loss-header) - 70px)}
 #place-panel:not(.details-open) #place-figure-note,#place-panel:not(.details-open) .result-scenario{display:block}#place-panel:not(.details-open) #place-figure{float:none;font-size:26px;margin:0}#place-panel .panel-content{padding:10px}
 .leaflet-top.leaflet-left,body.place-open .leaflet-top.leaflet-left{top:8px}.map-actions{left:auto;right:8px;transform:none;bottom:27px;max-width:calc(100% - 290px)}.map-actions button{font-size:11px;padding:7px 6px}
 .search-results{top:calc(var(--loss-header) - 1px);max-height:calc(100dvh - var(--loss-header) - 10px)}
}

.related-maps{margin:10px 0 0;font-size:13px;line-height:1.6;color:#4d6061}.related-maps a{margin-left:10px;font-weight:600;color:#176b70;text-underline-offset:3px;white-space:nowrap}.related-maps a[hidden]{display:none}
