.rescue {padding-block:2rem 3rem;color:#152f3e}
.rescue h1 {font-size:clamp(2rem,4vw,3.2rem);line-height:1.1;margin:.4rem 0 1rem}
.rescue h2 {font-size:1.5rem;margin:1.5rem 0 .5rem}
.rescue p {margin:.5rem 0 .8rem}.rescue-lead {font-size:1.12rem}
.rescue-locate,.shelter-controls,.shelter-list .map-directions {display:flex;gap:.7rem 1.2rem;flex-wrap:wrap;align-items:center}
.rescue-locate {margin:1.2rem 0 .4rem}.shelter-controls {margin:1rem 0;align-items:end}
.rescue-locate button,.rescue-action {display:inline-block;padding:.7rem 1rem;border:1px solid #11584f;color:white;background:#11584f;border-radius:.35rem;font:inherit;font-weight:650;cursor:pointer;text-decoration:none}
.rescue-locate button:disabled {opacity:.65;cursor:wait}.shelter-controls label {display:grid;gap:.25rem;font-weight:650;min-width:0;max-width:100%}
.shelter-controls input,.shelter-controls select {font:inherit;background:white;color:#173c3b;padding:.6rem .8rem;border:1px solid #86a39f;border-radius:.35rem;max-width:100%}
.rescue section {margin:1.5rem 0;padding-top:.5rem;border-top:1px solid #bfd2ce}
#shelter-map {height:clamp(390px,62vh,660px);container-type:inline-size;isolation:isolate;border:1px solid #a7c4be;border-radius:.45rem;background:#e8efed}
#shelter-map .leaflet-popup-content {max-width:calc(100cqw - 4rem);overflow-wrap:anywhere}
#shelter-map .leaflet-tooltip {max-width:calc(100cqw - 2rem);white-space:normal}
#shelter-map:has(.leaflet-popup) .leaflet-tooltip {visibility:hidden}
.shelter-popup strong,.shelter-place strong,.shelter-place span,.shelter-place b {display:block}
.shelter-list {margin:.4rem 0;padding-left:1.65rem}.shelter-list li {padding:.6rem .2rem;border-bottom:1px solid #d6e2df}
.shelter-list .map-directions {margin-top:.35rem}.rescue .map-directions a,.rescue a:not(.rescue-action) {text-decoration:underline;text-underline-offset:.18em}
.shelter-list button {font:inherit;color:#16594f;border:1px solid #aac6bf;border-radius:.3rem;background:white;padding:.2rem .5rem;cursor:pointer}
.rescue-guidance {max-width:76ch}.rescue-source,#position-status {color:#405b60;font-size:.94rem}
.rescue footer.rescue-source {background:transparent;padding:1rem 0;border-top:1px solid #c9dad5}
.rescue-detail {margin:.65rem 0}.rescue-detail summary,.rescue .coordinate-entry summary {cursor:pointer;font-weight:650}
.rescue table {width:100%;border-collapse:collapse;margin:.5rem 0}.rescue th,.rescue td {padding:.42rem .6rem;text-align:left;border-bottom:1px solid #cbdbd7}.rescue td {text-align:right;font-variant-numeric:tabular-nums}
.rescue .coordinate-entry form {display:grid;gap:.45rem;margin:.5rem 0}.rescue .coordinate-entry input {max-width:100%}
@media(max-width:600px){.shelter-controls label {width:100%}.rescue-locate {align-items:start;flex-direction:column}}
#rescue-layers {min-width:0;padding:.55rem .8rem .8rem;border:1px solid #afc7c2;border-radius:.4rem;margin:1rem 0 .5rem}
#rescue-layers legend {padding:0 .35rem;font-weight:700}
#rescue-layers>div {display:flex;flex-wrap:wrap;gap:.25rem 1rem}
#rescue-layers label {display:inline-flex;align-items:center;gap:.38rem;padding:.32rem .2rem;cursor:pointer}
#rescue-layers input {accent-color:#135c55;width:1.05rem;height:1.05rem}
.rescue-key {display:inline-block;width:.75rem;height:.75rem;border:1px solid #334b50;border-radius:50%;flex:none;background:var(--key)}
.key-varjumine {--key:#176259}.key-stend {--key:#176da3}.key-tuli {--key:#ba431f}.key-vesi {--key:#4553aa}.key-hydrant {--key:#663f86}.key-toostus {--key:#d6ad57;border-radius:2px}
.rescue-year {margin:.4rem 0 .7rem}.rescue-year button,.rescue-cluster-popup button {font:inherit;padding:.45rem .7rem;background:white;border:1px solid #87a5a0;border-radius:.35rem;color:#184f48;cursor:pointer}
.rescue-symbol {display:grid;place-items:center;background:var(--key);color:white;border-radius:50%;flex:none}
.rescue-symbol svg {display:block;width:76%;height:76%;pointer-events:none}
#rescue-layers .rescue-symbol {width:1.25rem;height:1.25rem}
.rescue-map-icon {box-sizing:border-box;border:0;background:none}
.rescue-map-icon .rescue-symbols {display:grid;width:100%;height:100%;box-sizing:border-box;position:relative;border:2px solid white;border-radius:50%;background:#fff;box-shadow:0 1px 4px #19344099}
.rescue-map-icon .rescue-symbol {min-width:0;min-height:0}
.rescue-map-icon.mixed .rescue-symbols {grid-template-columns:repeat(auto-fit,17px);grid-auto-rows:17px;border-radius:6px;align-content:center;justify-content:center}
.rescue-map-icon.mixed .rescue-symbol {width:17px;height:17px;border-radius:4px}
.rescue-map-icon.near .rescue-symbols {box-shadow:0 0 0 3px #edaa34,0 0 0 4px #594323}
.rescue-marker-count {position:absolute;top:-7px;right:-7px;min-width:14px;box-sizing:border-box;padding:1px 3px;color:#fff;background:#182f3d;border:1px solid #fff;border-radius:8px;font:700 10px/12px system-ui;text-align:center}
.rescue-marker-caption {position:absolute;visibility:hidden;pointer-events:none;top:50%;transform:translateY(-50%);white-space:nowrap;color:#16313d;background:#fffffff5;border-radius:4px;box-shadow:0 1px 3px #1c354044;padding:2px 4px;font:650 12px/15px system-ui}
.rescue-marker-caption[data-side] {visibility:visible}
.rescue-marker-caption[data-side=right] {left:calc(100% + 12px)}
.rescue-marker-caption[data-side=left] {right:calc(100% + 12px)}
.shelter-popup small,.rescue-cluster-popup small {display:block;font:600 .82rem/1.2 system-ui;color:#37575c;margin:0 0 .2rem}
.rescue-map-icon:focus-visible .rescue-symbols {outline:3px solid #073d69;outline-offset:3px}

.rescue-cluster-popup {max-width:19rem}.rescue-cluster-popup ul {padding-left:1rem;max-height:10rem;overflow:auto}
