/* 3D relief view (js/view3d.js) */
#v3d { position: fixed; inset: 0; z-index: 3000; background: #dfe6d6; }
#v3d[hidden], .v3d-hint[hidden] { display: none; }
#v3d-map { position: absolute; inset: 0; }
body.v3d-open { overflow: hidden; }
.v3d-bar { position: absolute; top: 10px; left: 10px; right: 60px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
  max-width: 760px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 10px rgba(15, 23, 42, .25);
  font-size: 14px; color: #0f172a; }
.v3d-title { font-weight: 700; flex: 1 1 160px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3d-close { font: inherit; font-weight: 700; border: 0; border-radius: 8px; padding: 6px 12px; background: #0f172a; color: #fff; cursor: pointer; }
.v3d-close:focus-visible { outline: 3px solid #60a5fa; outline-offset: 2px; }
.v3d-ctl { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; min-width: 0; max-width: 100%; }
.v3d-ctl select { font: inherit; padding: 2px 4px; min-width: 0; max-width: 100%; flex: 1 1 auto; }
.v3d-ctl input[type=range] { width: 110px; }
.v3d-hint { position: absolute; left: 10px; bottom: 34px; max-width: min(560px, calc(100% - 20px)); padding: 6px 10px; border-radius: 8px;
  background: rgba(15, 23, 42, .72); color: #fff; font-size: 12px; line-height: 1.35; pointer-events: none; }
.v3d-detail { display: inline-block; margin: 4px 0 8px; font: inherit; font-weight: 600; border: 1px solid #0f172a; border-radius: 8px;
  padding: 5px 10px; background: #fff; color: #0f172a; cursor: pointer; }
.v3d-detail:hover { background: #f1f5f9; }
#v3d .maplibregl-popup-content { font-size: 13px; color: #0f172a; } /* white popup in dark mode too */
#v3d .maplibregl-popup-content a { color: #1d4ed8; }
@media (max-width: 600px) {
  .v3d-bar { right: 50px; font-size: 13px; padding: 6px 8px; }
  .v3d-ctl input[type=range] { width: 90px; }
  .v3d-hint { bottom: 64px; font-size: 11px; }
}
@media (prefers-color-scheme: dark) {
  .v3d-bar { background: rgba(15, 23, 42, .92); color: #f1f5f9; }
  .v3d-close { background: #f1f5f9; color: #0f172a; }
  .v3d-detail { background: #0f172a; color: #f1f5f9; border-color: #94a3b8; }
}
/* the ⛰ button makes the header one button wider: still fit 320-360 px phones */
@media (max-width: 420px) {
  .topbar .icon-btn { width: 34px; }
}
@media (max-width: 360px) {
  .topbar { gap: 4px; padding: 0 4px; }
  .topbar .icon-btn { width: 32px; }
}
@media (max-width: 340px) {
  .topbar .brand { display: none; }
}
