.terrain-page .terrain-controls{position:absolute;z-index:4;top:22px;left:50%;width:295px;transform:translateX(-50%);padding:12px 14px 8px;background:#1c231ff5;color:#e8e0ce;border:1px solid #7b6846;border-radius:4px;box-shadow:0 5px 22px #0004}
.terrain-controls>label{display:flex;justify-content:space-between;font-size:12px;font-weight:700}
.terrain-controls output{font-weight:700}
.terrain-controls>input[type=range]{display:block;width:100%;margin:7px 0 0;accent-color:#9166b9}
.terrain-controls p{font-size:10px;line-height:1.3;margin:1px 0 0;opacity:.72}
.terrain-layer-controls{padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid #7b6846}
.terrain-layer-controls h3{margin:0 0 5px;font-size:14px}
.terrain-page .layers-panel{max-height:calc(100% - 100px);overflow-y:auto}
.terrain-legend{position:absolute;left:24px;bottom:42px;z-index:3;width:260px;border:1px solid #7b6846;border-radius:7px;background:#1c231ff5;color:#e8e0ce;box-shadow:0 4px 16px #0002;font-size:11px}
.terrain-legend summary{padding:10px 12px;cursor:pointer;font-weight:700}
.terrain-legend summary span{font-weight:400;float:right;opacity:.75}
.terrain-legend-body{padding:0 12px 10px}
.terrain-ramp{height:10px;border-radius:5px;background:linear-gradient(90deg,#267694 0%,#37979d 8%,#4fae94 18%,#77be86 28%,#a7c77e 40%,#d2c577 52%,#e1a767 64%,#c27c5b 76%,#996360 85%,#705c69 92%,#ece5d3 100%)}
.terrain-ramp-off{opacity:.25}
.terrain-ticks{display:flex;justify-content:space-between;margin-top:4px;font-size:10px}
.terrain-legend p{line-height:1.5;margin:8px 0 4px}
.terrain-legend small{display:block;font-size:10px;line-height:1.5;opacity:.8}
.terrain-legend a{display:block;margin-top:5px;color:inherit;font-size:10px}
html[data-theme=official] .terrain-legend{background:#eeedf2f5;color:#40304f;border-color:#b9adcb}
html[data-theme=official] .terrain-controls{background:#fffffff2;color:#302a3b;border-color:#ded9e4;border-radius:7px;box-shadow:0 5px 22px #34294b20}
html[data-theme=official] .terrain-layer-controls{border-color:#cbc4d6}
.terrain-page .region-filter[hidden]{display:none}
@media(max-width:700px){
 .terrain-page .terrain-controls{top:62px;width:238px;padding:8px 10px 5px}
 .terrain-controls p{display:none}
 .terrain-legend{left:8px;bottom:32px;width:238px;font-size:10px}
 .terrain-legend summary{padding:7px 9px}
 .terrain-page .layers-panel{max-height:calc(100% - 65px)}
 .terrain-page:has(.water-detail:not([hidden])) .terrain-legend{display:none}
}
