:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1e293b;
  --glass: rgba(255,255,255,.94);
  --border: rgba(148,163,184,.24);
  --shadow: 0 10px 34px rgba(15,23,42,.16);
  --orange: #ff9f1c;
  --blue: #3b82f6;
}
* { box-sizing: border-box; }
html, body, #map { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; background: #e5e7eb; }
button, select, input { font: inherit; }
button { color: inherit; }
#map { position: fixed; inset: 0; z-index: 0; }
.leaflet-control-zoom { display: none; }
.leaflet-image-layer.radar-overlay { image-rendering: auto; }

.topbar {
  position: fixed; z-index: 1000; top: 12px; left: 12px; right: 12px;
  min-height: 80px; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 26px;
  background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.brand { min-width: 215px; display: flex; align-items: center; gap: 14px; margin-right: auto; }
.brand h1 { margin: 0; font-size: 22px; line-height: 1.05; letter-spacing: -.02em; }
.brand-logo {
  position: relative; width: 54px; height: 54px; flex: 0 0 54px;
  overflow: hidden; border: 1px solid rgba(255,255,255,.36); border-radius: 17px;
  background: #075f61; box-shadow: 0 8px 18px rgba(3,92,94,.28);
}
.brand-logo img {
  position: absolute; width: 220%; height: 220%; max-width: none;
  left: -60%; top: -28%; object-fit: cover; user-select: none; pointer-events: none;
}

.control, .theme-control, .map-box {
  height: 58px; border: 1px solid var(--border); border-radius: 17px;
  background: rgba(241,245,249,.88);
}
.select-control { min-width: 175px; padding: 8px 12px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; }
.parameter-control { min-width: 285px; }
.elevation-control { min-width: 150px; }
.select-control > span { color: #7b8798; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
select { min-width: 0; max-width: 100%; border: 0; outline: 0; background: transparent; font-weight: 700; font-size: 16px; cursor: pointer; }
.theme-control { display: flex; padding: 5px; }
.theme-control button { border: 0; background: transparent; border-radius: 12px; padding: 0 15px; font-weight: 700; color: #6b7587; cursor: pointer; }
.theme-control button.active { color: #20293a; background: #dce2e8; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.boundary-button { min-width: 155px; padding: 0 14px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--border); font-weight: 700; cursor: pointer; }
.switch-dot { width: 43px; height: 25px; padding: 3px; display: inline-flex; border-radius: 999px; background: #cbd5e1; transition: .2s; }
.switch-dot::after { content: ""; width: 19px; height: 19px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: .2s; }
.switch-dot.on { background: var(--blue); }
.switch-dot.on::after { transform: translateX(18px); }
.switch-dot.partial { background: #f59e0b; }
.switch-dot.partial::after { transform: translateX(9px); }

.tools-wrap {
  position: fixed; z-index: 1000; top: 104px; left: 28px; width: 184px;
  display: grid; gap: 7px;
}
.tool-control { position: relative; }
.tools-button {
  width: 184px; min-width: 0; padding: 0 13px;
  display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 9px;
  border: 1px solid var(--border); box-shadow: var(--shadow); cursor: pointer;
  font-weight: 750; text-align: left; backdrop-filter: blur(14px); transition: border-color .16s, background .16s, transform .16s;
}
.tools-button:hover { border-color: rgba(59,130,246,.38); background: rgba(248,250,252,.97); }
.tools-button:active { transform: translateY(1px); }
.tool-button-icon { display: grid; place-items: center; font-size: 18px; line-height: 1; }
.drawing-brush-icon { font-size: 19px; }
.language-button-icon { font-size: 18px; }
.language-chevron { font-size: 16px; transform: none !important; }
.tool-button-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-chevron { color: #7b8798; font-size: 23px; font-weight: 600; line-height: 1; transition: transform .16s; }
.tools-button[aria-expanded="true"] .tool-chevron { transform: rotate(90deg); }
.tools-lines { font-size: 18px; }
.information-button-icon { width: 22px; height: 22px; display: grid; place-items: center; color: #075f61; }
.information-button-icon svg { width: 22px; height: 22px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.information-button-icon .information-dot { fill: currentColor; stroke: none; }
.information-button[aria-expanded="true"] { border-color: rgba(7,95,97,.46); background: rgba(236,254,255,.96); }
.information-panel {
  position: absolute; top: auto; bottom: 0; left: calc(100% + 9px); width: min(355px, calc(100vw - 245px));
  overflow: hidden; border: 1px solid var(--border); border-radius: 17px;
  background: rgba(255,255,255,.97); box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.information-panel header {
  min-height: 58px; padding: 10px 10px 10px 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(148,163,184,.24); background: rgba(248,250,252,.96);
}
.information-panel header div { display: grid; gap: 2px; }
.information-panel header span { color: #768397; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.information-panel header strong { color: #1f2b3d; font-size: 16px; }
.information-panel header button {
  width: 35px; height: 35px; flex: 0 0 35px; border: 0; border-radius: 11px;
  background: #e5eaf0; cursor: pointer; color: #526076; font-size: 23px; line-height: 1;
}
.information-panel header button:hover { background: #dbe3eb; }
.information-panel-body { padding: 13px 15px 15px; color: #405067; }
.information-panel-body p { margin: 0; font-size: 12px; line-height: 1.48; }
.information-panel-body p + p { margin-top: 10px; }
.information-panel-body a { color: #075f61; font-weight: 750; overflow-wrap: anywhere; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.tools-menu {
  position: absolute; top: 0; left: calc(100% + 9px); width: 220px; margin: 0; padding: 7px;
  background: var(--glass); border: 1px solid var(--border); border-radius: 15px;
  box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.tools-menu > button { width: 100%; padding: 11px 12px; border: 0; border-radius: 10px; text-align: left; background: transparent; cursor: pointer; font-weight: 650; }
.tools-menu > button:hover { background: #e8edf3; }
.measure-hint { position: fixed; z-index: 1000; top: 104px; left: 222px; padding: 9px 13px; border-radius: 12px; background: rgba(15,23,42,.88); color: #fff; box-shadow: var(--shadow); font-size: 13px; }

.drawing-tools-button-active { border-color: rgba(59,130,246,.45); background: rgba(239,246,255,.96); }
.drawing-tools-menu {
  width: 318px; max-height: min(680px, calc(100vh - 120px)); padding: 11px; overflow-y: auto;
  scrollbar-width: thin;
}
.drawing-tools-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 1px 2px 10px; }
.drawing-tools-heading strong { font-size: 14px; }
.drawing-tools-heading span { color: #728096; font-size: 11px; font-weight: 750; }
.drawing-tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
.drawing-tool-grid .drawing-tool {
  width: auto; min-height: 58px; padding: 7px 4px;
  display: grid; place-items: center; align-content: center; gap: 3px;
  border: 1px solid rgba(148,163,184,.25); border-radius: 11px;
  background: rgba(248,250,252,.9); cursor: pointer; color: #334155;
}
.drawing-tool-grid .drawing-tool:hover { border-color: rgba(59,130,246,.42); background: #edf4ff; }
.drawing-tool-grid .drawing-tool.active { border-color: #3b82f6; background: #dbeafe; color: #1d4ed8; box-shadow: inset 0 0 0 1px rgba(59,130,246,.15); }
.drawing-tool-grid .drawing-eraser-tool.active { border-color: #f97316; background: #ffedd5; color: #c2410c; box-shadow: inset 0 0 0 1px rgba(249,115,22,.16); }
.drawing-tool-grid .drawing-tool > span { font-size: 23px; line-height: 1; }
.drawing-tool-grid .drawing-tool small { font-size: 9px; font-weight: 800; line-height: 1; }
.drawing-style-details > summary { display: none; }
.drawing-style-details:not([open]) > .drawing-settings { display: grid; }
.drawing-settings { margin-top: 10px; padding-top: 10px; display: grid; gap: 10px; border-top: 1px solid rgba(148,163,184,.25); }
.drawing-color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.drawing-color-control, .drawing-range-control, .drawing-select-control, .drawing-check-control {
  color: #526076; font-size: 11px; font-weight: 800;
}
.drawing-color-control {
  min-height: 43px; padding: 6px 7px 6px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid rgba(148,163,184,.25); border-radius: 10px; background: rgba(248,250,252,.85);
}
.drawing-color-control input[type="color"] { width: 32px; height: 29px; padding: 2px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.drawing-range-control { display: grid; gap: 6px; }
.drawing-range-control > span { display: flex; justify-content: space-between; gap: 10px; }
.drawing-range-control output { color: #243047; font-variant-numeric: tabular-nums; }
.drawing-range-control input[type="range"] { width: 100%; margin: 0; accent-color: #3b82f6; cursor: pointer; }
.drawing-select-control { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 9px; }
.drawing-select-control select { height: 35px; padding: 0 9px; border: 1px solid rgba(148,163,184,.30); border-radius: 9px; background: #f8fafc; font-size: 12px; }
.drawing-check-control { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.drawing-check-control input { width: 17px; height: 17px; margin: 0; accent-color: #3b82f6; }
.drawing-actions { margin-top: 11px; padding-top: 10px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 7px; border-top: 1px solid rgba(148,163,184,.25); }
.drawing-actions button { min-height: 38px; padding: 7px 9px; border: 1px solid rgba(148,163,184,.28); border-radius: 10px; background: #eef2f7; cursor: pointer; font-size: 11px; font-weight: 800; }
.drawing-actions button:hover { background: #e2e8f0; }
.drawing-actions .drawing-clear-button { border-color: rgba(220,38,38,.22); background: #fef2f2; color: #b91c1c; }
.drawing-actions .drawing-clear-button:hover { background: #fee2e2; }

.warnings-button { grid-template-columns: 27px minmax(0,1fr) auto; }
.warning-button-icon {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: #94a3b8; color: #fff; font-size: 16px; font-weight: 950; line-height: 1;
}
.warnings-button.is-enabled { border-color: rgba(249,115,22,.35); }
.warnings-button.is-enabled .warning-button-icon { background: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.11); }
.warnings-button:not(.is-enabled) { color: #68758a; }
.warnings-button.has-no-warnings .warning-button-icon { background: #94a3b8; box-shadow: none; }
.tool-status { color: #6c788b; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.warnings-button.is-enabled:not(.has-no-warnings) .tool-status { color: #c2410c; }
.general-warnings-button.is-enabled { border-color: rgba(220,38,38,.30); }
.general-warnings-button.is-enabled .general-warning-icon { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.10); }
.general-warnings-button.is-enabled:not(.has-no-warnings) .tool-status { color: #b91c1c; }
.radar-visibility-button { grid-template-columns: 27px minmax(0,1fr) auto; }
.radar-button-icon {
  width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%;
  background: #94a3b8; color: #fff; font-size: 17px; font-weight: 900;
}
.radar-visibility-button.is-enabled { border-color: rgba(59,130,246,.34); }
.radar-visibility-button.is-enabled .radar-button-icon { background: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,.11); }
.radar-visibility-button.is-enabled .tool-status { color: #1d4ed8; }
.radar-visibility-button:not(.is-enabled) { color: #68758a; }
.radar-disabled { display: none !important; }

.general-warning-panel {
  position: fixed; z-index: 1005; top: 104px; right: 20px;
  width: min(410px, calc(100vw - 24px)); max-height: calc(100vh - 202px);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(148,163,184,.30); border-radius: 19px;
  background: rgba(255,255,255,.97); box-shadow: 0 18px 58px rgba(15,23,42,.26);
  backdrop-filter: blur(18px);
}
.general-warning-header {
  min-height: 72px; padding: 12px 12px 11px 16px;
  display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(148,163,184,.23); background: rgba(248,250,252,.96);
}
.general-warning-eyebrow { display: block; margin-bottom: 3px; color: #7b8798; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.general-warning-header h2 { margin: 0; font-size: 16px; line-height: 1.15; }
.general-warning-navigation { display: grid; grid-template-columns: 34px auto 34px; align-items: center; gap: 5px; }
.general-warning-navigation button, .general-warning-close {
  width: 34px; height: 34px; padding: 0; border: 1px solid rgba(148,163,184,.27);
  border-radius: 10px; background: #e9eef5; cursor: pointer; font-size: 22px; font-weight: 800; line-height: 1;
}
.general-warning-navigation button:hover, .general-warning-close:hover { background: #dfe6ef; }
.general-warning-navigation button:disabled { opacity: .42; cursor: default; }
.general-warning-navigation span { min-width: 40px; text-align: center; color: #4b586d; font-size: 11px; font-weight: 850; font-variant-numeric: tabular-nums; }
.general-warning-close { color: #68758a; font-size: 20px; }
.general-warning-scope-bar {
  padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 9px;
  border-bottom: 1px solid rgba(148,163,184,.22); background: #fff7ed;
}
.general-warning-scope-bar button {
  min-height: 34px; padding: 6px 10px; flex: 0 0 auto;
  border: 1px solid rgba(249,115,22,.28); border-radius: 10px;
  background: #ffedd5; color: #9a3412; cursor: pointer; font-size: 10px; font-weight: 850;
}
.general-warning-scope-bar button:hover { background: #fed7aa; }
.general-warning-scope-bar span {
  min-width: 0; overflow: hidden; color: #7c2d12; font-size: 10px; font-weight: 750;
  text-align: right; white-space: nowrap; text-overflow: ellipsis;
}
.general-warning-body { padding: 13px; overflow-y: auto; scrollbar-width: thin; color: #263247; }
.general-warning-code-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.general-warning-code-chip {
  padding: 5px 9px; border-radius: 999px; background: var(--warning-color);
  color: #111827; font-size: 10px; font-weight: 950; letter-spacing: .045em;
}
.general-warning-section {
  margin-top: 9px; padding: 11px 12px; border: 1px solid rgba(148,163,184,.22);
  border-left: 5px solid var(--warning-color); border-radius: 12px; background: #fff;
}
.general-warning-section:first-of-type { margin-top: 0; }
.general-warning-section h3 { margin: 0 0 8px; font-size: 12px; }
.general-warning-section dl { margin: 0; display: grid; gap: 7px; }
.general-warning-section dl div { display: grid; gap: 2px; }
.general-warning-section dt { color: #7b8798; font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .055em; }
.general-warning-section dd { margin: 0; font-size: 12px; line-height: 1.4; }
.general-warning-counties { margin-top: 11px; padding: 10px 11px; border-radius: 12px; background: #f1f5f9; }
.general-warning-counties strong { display: block; margin-bottom: 5px; font-size: 10px; text-transform: uppercase; letter-spacing: .055em; }
.general-warning-counties p { margin: 0; color: #536176; font-size: 12px; line-height: 1.45; }
.general-warning-details { margin-top: 10px; border: 1px solid rgba(148,163,184,.24); border-radius: 12px; background: #fff; }
.general-warning-details summary { padding: 10px 11px; cursor: pointer; font-size: 11px; font-weight: 850; }
.general-warning-details div { max-height: 220px; padding: 0 11px 11px; overflow-y: auto; color: #526076; font-size: 11px; line-height: 1.48; }
.general-warning-details p { margin: 7px 0 0; }
.general-warning-empty { margin: 0; padding: 18px 10px; color: #657186; text-align: center; font-size: 13px; font-weight: 700; }
.general-warning-footer {
  padding: 9px 13px 10px; display: grid; gap: 2px;
  border-top: 1px solid rgba(148,163,184,.22); background: #f8fafc;
  color: #8390a3; font-size: 9px; line-height: 1.35;
}
.general-warning-panel.is-collapsed {
  top: 104px; right: auto; bottom: auto; left: 222px;
  width: min(330px, calc(100vw - 242px)); max-height: none;
  border-radius: 15px;
}
.general-warning-panel.is-collapsed .general-warning-header {
  min-height: 54px; padding: 7px 8px 7px 12px;
  border-bottom: 0; gap: 7px;
}
.general-warning-panel.is-collapsed .general-warning-header > div { min-width: 0; }
.general-warning-panel.is-collapsed .general-warning-header h2 {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13px;
}
.general-warning-panel.is-collapsed .general-warning-eyebrow,
.general-warning-panel.is-collapsed .general-warning-scope-bar,
.general-warning-panel.is-collapsed .general-warning-body,
.general-warning-panel.is-collapsed .general-warning-footer { display: none; }
.general-warning-panel.is-collapsed .general-warning-navigation {
  grid-template-columns: 30px auto 30px; gap: 3px;
}
.general-warning-panel.is-collapsed .general-warning-navigation button,
.general-warning-panel.is-collapsed .general-warning-close {
  width: 30px; height: 30px; border-radius: 9px; font-size: 19px;
}
.general-warning-panel.is-collapsed .general-warning-navigation span { min-width: 34px; font-size: 10px; }

@media (min-width: 900px) {
  body.general-warning-panel-open .legend-dock { right: 448px; max-width: calc(100vw - 470px); }
  body.general-warning-panel-open .attribution-note { right: 448px; }
}

.leaflet-container.drawing-active { cursor: crosshair !important; touch-action: none !important; }
.leaflet-container.drawing-eraser-active { cursor: cell !important; touch-action: none !important; }
.leaflet-container.mobile-drawing-map-locked { touch-action: none !important; }

.timeline-panel {
  position: fixed; z-index: 1000; left: 16px; right: 16px; bottom: 14px;
  min-height: 60px; padding: 9px 12px;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 20px;
  background: var(--glass); box-shadow: var(--shadow); backdrop-filter: blur(16px);
}
.timeline-panel button { height: 40px; min-width: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: #e5eaf0; cursor: pointer; font-weight: 750; }
.timeline-panel button.primary { background: var(--blue); color: #fff; }
.timeline-panel input { min-width: 100px; flex: 1; accent-color: var(--blue); }
.timeline-panel time { min-width: 155px; text-align: center; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums; }

.error-toast { position: fixed; z-index: 1200; top: 112px; left: 50%; transform: translateX(-50%); width: min(760px,calc(100% - 40px)); padding: 13px 18px; border-radius: 14px; background: #c53b4b; color: #fff; box-shadow: var(--shadow); text-align: center; }
.legend-dock {
  position: fixed; z-index: 900; right: 20px; bottom: 90px;
  display: flex; align-items: flex-end; justify-content: flex-end; flex-wrap: wrap; gap: 9px;
  max-width: calc(100vw - 24px);
}
.legend { width: 190px; padding: 11px; background: rgba(255,255,255,.9); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.transparency-control {
  width: 150px; min-height: 62px; padding: 10px 11px 9px;
  display: grid; align-content: center; gap: 8px;
  background: rgba(255,255,255,.9); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow); backdrop-filter: blur(12px);
  user-select: none;
}
.transparency-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 800; }
.transparency-header output { min-width: 31px; text-align: right; font-variant-numeric: tabular-nums; }
.transparency-control input { width: 100%; margin: 0; accent-color: var(--blue); cursor: pointer; }
.legend-title { margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.legend-bar { height: 13px; border: 1px solid rgba(20,30,45,.18); border-radius: 8px; background: transparent; }
.legend-values { position: relative; height: 14px; margin-top: 4px; font-size: 10px; font-weight: 700; }
.legend-values span { position: absolute; top: 0; white-space: nowrap; transform: translateX(-50%); }
.legend-values .legend-value-first { transform: none; }
.legend-values .legend-value-last { transform: translateX(-100%); }
.attribution-note { position: fixed; z-index: 700; right: 20px; bottom: 78px; color: rgba(30,41,59,.6); font-size: 10px; pointer-events: none; }
.is-hidden { display: none !important; }

.measure-marker { width: 13px; height: 13px; margin-left: -6px; margin-top: -6px; border: 3px solid #fff; border-radius: 50%; background: #2563eb; box-shadow: 0 1px 7px rgba(0,0,0,.55); }
.measure-label { padding: 5px 8px; border: 0; border-radius: 9px; background: #172033; color: #fff; box-shadow: var(--shadow); font-weight: 750; }
.measure-label::before { border-top-color: #172033; }

@media (max-width: 1180px) {
  .topbar { overflow-x: auto; align-items: stretch; }
  .brand { min-width: 205px; }
  .parameter-control { min-width: 245px; }
}
@media (max-width: 720px) {
  .topbar { top: 6px; left: 6px; right: 6px; min-height: 72px; border-radius: 20px; padding: 8px; }
  .brand { min-width: 190px; }
  .brand-logo { width: 48px; height: 48px; flex-basis: 48px; }
  .brand h1 { font-size: 18px; }
  .control, .theme-control { height: 52px; }
  .tools-wrap { top: 88px; left: 12px; }
  .measure-hint { top: 88px; left: 205px; }
  .timeline-panel { left: 7px; right: 7px; bottom: 7px; gap: 6px; padding: 7px; }
  .timeline-panel time { min-width: 110px; font-size: 11px; }
  #latestButton { display: none; }
  .legend-dock { right: 9px; bottom: 76px; gap: 7px; }
  .legend { width: 155px; }
  .transparency-control { width: 126px; min-height: 59px; padding: 9px; }
  .transparency-header { font-size: 10px; }
  .attribution-note { display: none; }
}

.tools-separator { height: 1px; margin: 6px 5px; background: rgba(148,163,184,.28); }
.cross-section-hint { top: 104px; background: rgba(124,45,18,.92); }
.cross-section-marker {
  width: 15px; height: 15px; margin-left: -7px; margin-top: -7px;
  border: 3px solid #fff; border-radius: 50%; background: #f97316;
  box-shadow: 0 1px 8px rgba(0,0,0,.58);
}
.cross-section-label {
  padding: 5px 8px; border: 0; border-radius: 9px;
  background: #c2410c; color: #fff; box-shadow: var(--shadow); font-weight: 750;
}
.cross-section-label::before { border-top-color: #c2410c; }

.cross-section-panel {
  position: fixed; z-index: 1080; left: 50%; bottom: 88px;
  width: min(920px, calc(100% - 36px)); max-height: calc(100vh - 205px);
  transform: translateX(-50%); overflow: hidden;
  border: 1px solid var(--border); border-radius: 20px;
  background: rgba(255,255,255,.97); box-shadow: 0 18px 60px rgba(15,23,42,.30);
  backdrop-filter: blur(18px);
}
.cross-section-header {
  min-height: 58px; padding: 10px 13px 9px 17px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(148,163,184,.22);
}
.cross-section-header h2 { margin: 0; font-size: 17px; line-height: 1.15; letter-spacing: -.01em; }
.cross-section-header p { min-height: 15px; margin: 4px 0 0; color: #748094; font-size: 12px; }
.cross-section-header button {
  width: 36px; height: 36px; flex: 0 0 36px; border: 0; border-radius: 11px;
  background: #e8edf3; color: #263247; cursor: pointer; font-size: 25px; line-height: 1;
}
.cross-section-header button:hover { background: #dce3eb; }
.cross-section-body {
  position: relative; min-height: 180px; max-height: calc(100vh - 274px);
  overflow: auto; padding: 10px; background: #f4f6f9;
}
.cross-section-image { display: block; width: 100%; height: auto; border-radius: 12px; background: #fff; }
.cross-section-status {
  min-height: 160px; display: grid; place-items: center; padding: 22px;
  color: #657186; text-align: center; font-weight: 700;
}
.cross-section-panel.is-loading .cross-section-status::before {
  content: ""; width: 24px; height: 24px; margin-right: 10px;
  display: inline-block; vertical-align: middle;
  border: 3px solid #cbd5e1; border-top-color: #f97316; border-radius: 50%;
  animation: radar-spin .8s linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .cross-section-hint { top: 88px; }
  .cross-section-panel {
    bottom: 74px; width: calc(100% - 14px); max-height: calc(100vh - 160px); border-radius: 16px;
  }
  .cross-section-body { max-height: calc(100vh - 225px); padding: 6px; }
  .cross-section-header { min-height: 52px; padding: 8px 9px 8px 13px; }
  .cross-section-header h2 { font-size: 15px; }
}

.hover-value {
  position: fixed;
  z-index: 1160;
  pointer-events: none;
  user-select: none;
  min-width: 1ch;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  will-change: left, top;
}


@media (max-width: 720px) {
}


.warning-transparency-control { width: 176px; border-color: rgba(249,115,22,.30); }
.warning-transparency-control input { accent-color: #f97316; }

.nowcast-popup .leaflet-popup-content-wrapper {
  padding: 0; overflow: hidden; border-radius: 18px;
  background: rgba(255,255,255,.98); box-shadow: 0 18px 58px rgba(15,23,42,.28);
}
.nowcast-popup .leaflet-popup-content { margin: 0; width: auto !important; max-height: min(68vh, 620px); overflow-y: auto; }
.nowcast-popup .leaflet-popup-tip { background: #fff; }
.nowcast-popup-content { min-width: 300px; color: #243047; }
.nowcast-popup-title {
  position: sticky; top: 0; z-index: 1; padding: 14px 17px 12px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid rgba(148,163,184,.24); background: rgba(248,250,252,.97);
}
.nowcast-popup-title strong { font-size: 17px; }
.nowcast-popup-title span { color: #748094; font-size: 12px; font-weight: 700; }
.nowcast-warning-card { margin: 12px; padding: 13px 14px; border: 1px solid rgba(148,163,184,.24); border-left: 6px solid var(--warning-color); border-radius: 14px; background: #fff; }
.nowcast-warning-card + .nowcast-warning-card { margin-top: 10px; }
.nowcast-warning-card header { display: grid; gap: 7px; margin-bottom: 10px; }
.nowcast-warning-card header strong { font-size: 14px; }
.nowcast-code-chip { width: fit-content; padding: 4px 8px; border-radius: 999px; background: var(--warning-color); color: #111827; font-size: 11px; font-weight: 900; letter-spacing: .04em; }
.nowcast-warning-card dl { margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.nowcast-warning-card dl div { padding: 8px 9px; border-radius: 10px; background: #f4f6f9; }
.nowcast-warning-card dt { color: #7a8597; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.nowcast-warning-card dd { margin: 3px 0 0; font-size: 12px; font-weight: 750; }
.nowcast-warning-card section { margin-top: 10px; }
.nowcast-warning-card h4 { margin: 0 0 5px; color: #4a566b; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.nowcast-warning-card p { margin: 0; font-size: 13px; line-height: 1.45; }
.nowcast-warning-card footer { margin-top: 10px; color: #8490a1; font-size: 10px; }
.nowcast-area-list { display: grid; gap: 7px; }
.nowcast-area-list div { display: grid; gap: 2px; }
.nowcast-area-list strong { font-size: 12px; }
.nowcast-area-list span, .nowcast-zone-text { color: #566276; font-size: 12px; line-height: 1.4; }

.general-warning-popup .leaflet-popup-content-wrapper {
  padding: 0; overflow: hidden; border-radius: 16px;
  background: rgba(255,255,255,.98); box-shadow: 0 16px 48px rgba(15,23,42,.25);
}
.general-warning-popup .leaflet-popup-content { margin: 0; width: auto !important; }
.general-warning-popup .leaflet-popup-tip { background: #fff; }
.general-warning-popup-content { min-width: 260px; padding: 14px 15px; color: #263247; }
.general-warning-popup-content header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.general-warning-popup-content h3 { margin: 0; font-size: 16px; }
.general-warning-popup-content .general-warning-code-chip { flex: 0 0 auto; }
.general-warning-popup-content p { margin: 5px 0 0; color: #566276; font-size: 12px; line-height: 1.4; }

@media (max-width: 720px) {
  .warning-transparency-control { width: 156px; }
  .nowcast-popup-content { min-width: 250px; }
  .nowcast-warning-card dl { grid-template-columns: 1fr; }
  .general-warning-panel { top: 88px; right: 9px; max-height: calc(100vh - 170px); }
}

@media (max-width: 540px) {
  .tools-wrap { width: 174px; }
  .tools-button { width: 174px; }
  .tool-control > .tools-menu {
    position: fixed; top: 285px; left: 12px; right: 12px; width: auto;
    max-height: calc(100vh - 370px);
  }
  .information-panel {
    position: fixed; top: 285px; bottom: auto; left: 12px; right: 12px; width: auto;
    max-height: calc(100vh - 370px); overflow-y: auto;
  }
  .measure-hint, .cross-section-hint { top: 285px; left: 12px; right: 12px; text-align: center; }
  .drawing-tools-menu { width: auto; }
  .general-warning-panel { top: 82px; left: 7px; right: 7px; width: auto; max-height: calc(100vh - 164px); }
  .general-warning-header { grid-template-columns: minmax(0,1fr) auto auto; padding-left: 13px; }
}

/* Responsive application shell (v6.9.2). The desktop controls keep their
   original layout; phones receive compact drawers and touch-size docks. */
.mobile-controls-button,
.mobile-legend-button { display: none; }
.mobile-controls-panel { display: contents; }
.legend-controls {
  display: flex; align-items: flex-end; justify-content: flex-end;
  flex-wrap: wrap; gap: 9px;
}
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(59,130,246,.42);
  outline-offset: 2px;
}

@media (max-width: 820px), (max-height: 600px) and (max-width: 960px) {
  :root {
    --phone-safe-top: env(safe-area-inset-top, 0px);
    --phone-safe-right: env(safe-area-inset-right, 0px);
    --phone-safe-bottom: env(safe-area-inset-bottom, 0px);
    --phone-safe-left: env(safe-area-inset-left, 0px);
    --phone-timeline-height: 90px;
    --phone-tool-bottom: calc(var(--phone-safe-bottom) + 104px);
    --phone-panel-bottom: calc(var(--phone-safe-bottom) + 162px);
  }

  html, body, #map { height: 100%; height: 100dvh; }
  body { overscroll-behavior: none; }

  .topbar {
    z-index: 1110;
    top: calc(var(--phone-safe-top) + 6px);
    left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px);
    min-height: 58px; height: 58px; padding: 6px 7px;
    overflow: visible; align-items: center; gap: 7px;
    border-radius: 20px;
  }
  .brand { min-width: 0; flex: 1 1 auto; gap: 10px; margin-right: 0; }
  .brand-logo {
    width: 44px; height: 44px; flex: 0 0 44px;
    border-radius: 14px;
  }
  .brand h1 { font-size: 18px; }
  .mobile-controls-button {
    min-width: 46px; height: 46px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--border); border-radius: 14px;
    background: #e8edf3; cursor: pointer; color: #334155;
    font-size: 12px; font-weight: 800;
  }
  .mobile-controls-button svg {
    width: 22px; height: 22px; flex: 0 0 22px;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
  }
  .topbar.mobile-controls-open .mobile-controls-button {
    border-color: rgba(59,130,246,.42); background: #dbeafe; color: #1d4ed8;
  }
  .mobile-controls-panel {
    position: fixed; z-index: 1115;
    top: calc(var(--phone-safe-top) + 72px);
    left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px);
    max-height: calc(100vh - var(--phone-safe-top) - var(--phone-panel-bottom) - 80px);
    max-height: calc(100dvh - var(--phone-safe-top) - var(--phone-panel-bottom) - 80px);
    padding: 9px; overflow-y: auto; overscroll-behavior: contain;
    display: none; grid-template-columns: minmax(0,1fr); gap: 7px;
    border: 1px solid var(--border); border-radius: 18px;
    background: rgba(255,255,255,.97); box-shadow: 0 18px 48px rgba(15,23,42,.24);
    backdrop-filter: blur(18px); scrollbar-width: thin;
  }
  .topbar.mobile-controls-open .mobile-controls-panel { display: grid; }
  .mobile-controls-panel .control,
  .mobile-controls-panel .theme-control {
    width: 100%; min-width: 0; height: 52px;
  }
  .mobile-controls-panel .select-control {
    grid-template-columns: 74px minmax(0,1fr); padding: 7px 11px;
  }
  .mobile-controls-panel .select-control > span { font-size: 10px; }
  .mobile-controls-panel select { width: 100%; font-size: 16px; }
  .mobile-controls-panel .theme-control { justify-content: stretch; }
  .mobile-controls-panel .theme-control button {
    min-width: 0; flex: 1 1 0; padding: 0 7px; font-size: 12px;
  }
  .mobile-controls-panel .boundary-button { justify-content: flex-start; }

  .tools-wrap {
    z-index: 1105; top: auto;
    left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px);
    bottom: var(--phone-tool-bottom);
    width: auto; height: 50px; padding: 1px;
    display: flex; gap: 5px; overflow-x: auto; overflow-y: visible;
    overscroll-behavior-x: contain; scrollbar-width: none;
  }
  .tools-wrap::-webkit-scrollbar { display: none; }
  .tools-wrap > .tool-control,
  .tools-wrap > .tools-button { flex: 0 0 46px; }
  .tool-control { position: static; }
  .tools-wrap .tools-button {
    position: relative; width: 46px; height: 46px; min-height: 46px; padding: 0;
    display: grid; grid-template-columns: 1fr; place-items: center; gap: 0;
    border-radius: 14px; text-align: center;
  }
  .tools-wrap .tool-button-icon,
  .tools-wrap .warning-button-icon,
  .tools-wrap .radar-button-icon,
  .tools-wrap .information-button-icon { grid-column: 1; grid-row: 1; }
  .tools-wrap .tool-button-label,
  .tools-wrap .tool-chevron,
  .tools-wrap .tool-status { display: none; }
  .tools-wrap .language-button-icon { display: none; }
  .tools-wrap .language-button .tool-button-label {
    display: block; max-width: 42px; overflow: hidden;
    font-size: 9px; line-height: 1.05; text-overflow: ellipsis;
  }
  .tools-wrap .warning-button-icon,
  .tools-wrap .radar-button-icon { width: 25px; height: 25px; }

  .tool-control > .tools-menu,
  .tools-menu,
  .information-panel {
    position: fixed; z-index: 1130;
    top: auto; bottom: var(--phone-panel-bottom);
    left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px);
    width: auto; max-height: calc(100vh - var(--phone-safe-top) - var(--phone-panel-bottom) - 78px);
    max-height: calc(100dvh - var(--phone-safe-top) - var(--phone-panel-bottom) - 78px);
    overflow-y: auto; overscroll-behavior: contain;
    border-radius: 17px; scrollbar-width: thin;
  }
  .tools-menu > button { min-height: 46px; }
  .drawing-tools-menu {
    left: auto; width: min(330px, calc(100vw - var(--phone-safe-left) - var(--phone-safe-right) - 14px));
    max-height: min(52dvh, 360px); padding: 7px;
  }
  .drawing-tools-heading { margin: 0 2px 6px; gap: 7px; }
  .drawing-tools-heading strong { font-size: 12px; }
  .drawing-tools-heading span {
    min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 9px;
  }
  .drawing-tool-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .drawing-tool-grid .drawing-tool { min-height: 44px; padding: 4px 2px; border-radius: 9px; }
  .drawing-tool-grid .drawing-tool > span { font-size: 18px; }
  .drawing-tool-grid .drawing-tool small { font-size: 8px; }
  .drawing-style-details { margin-top: 7px; }
  .drawing-style-details > summary {
    min-height: 36px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between;
    border: 1px solid rgba(148,163,184,.28); border-radius: 10px; background: #f1f5f9;
    cursor: pointer; color: #475569; font-size: 10px; font-weight: 850; list-style: none;
  }
  .drawing-style-details > summary::-webkit-details-marker { display: none; }
  .drawing-style-details > summary::after { content: "⌄"; font-size: 14px; }
  .drawing-style-details[open] > summary::after { transform: rotate(180deg); }
  .drawing-style-details:not([open]) > .drawing-settings { display: none; }
  .drawing-settings { margin-top: 6px; padding: 7px 3px 0; gap: 7px; }
  .drawing-color-control { min-height: 38px; }
  .drawing-select-control select { height: 32px; }
  .drawing-actions { margin-top: 7px; padding-top: 7px; }
  .drawing-actions button { min-height: 36px; }

  .timeline-panel {
    z-index: 1100;
    left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px);
    bottom: calc(var(--phone-safe-bottom) + 6px);
    min-height: 0; height: var(--phone-timeline-height); padding: 6px 7px;
    display: grid;
    grid-template-columns: 42px 42px 42px minmax(0,1fr) 58px;
    grid-template-rows: 28px 44px; align-items: center; gap: 4px 5px;
    border-radius: 18px;
  }
  .timeline-panel button {
    min-width: 0; width: 100%; height: 40px; padding: 0 5px; border-radius: 11px;
  }
  #timelineSlider { grid-column: 1 / -1; grid-row: 1; width: 100%; min-width: 0; margin: 0; }
  #previousButton { grid-column: 1; grid-row: 2; }
  #playButton { grid-column: 2; grid-row: 2; }
  #nextButton { grid-column: 3; grid-row: 2; }
  #frameTime {
    grid-column: 4; grid-row: 2; min-width: 0; overflow: hidden;
    font-size: 10px; line-height: 1.15; text-align: center; text-overflow: ellipsis;
  }
  #latestButton {
    grid-column: 5; grid-row: 2; display: block;
    padding: 0 4px; font-size: 10px;
  }

  .legend-dock {
    z-index: 1085; top: auto;
    right: calc(var(--phone-safe-right) + 7px);
    bottom: var(--phone-panel-bottom); max-width: calc(100vw - 14px);
    display: flex; flex-direction: column; align-items: flex-end; gap: 7px;
  }
  .mobile-legend-button {
    min-width: 82px; height: 44px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border: 1px solid var(--border); border-radius: 14px;
    background: rgba(255,255,255,.95); box-shadow: var(--shadow);
    cursor: pointer; font-size: 11px; font-weight: 850; backdrop-filter: blur(14px);
  }
  .mobile-legend-button > span:first-child { font-size: 18px; color: #3b82f6; }
  .legend-controls { display: none; }
  .legend-dock.mobile-expanded {
    left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px);
  }
  .legend-dock.mobile-expanded .legend-controls {
    width: 100%; max-height: 330px; max-height: min(43dvh, 330px); padding: 7px;
    display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px;
    overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    border: 1px solid var(--border); border-radius: 16px;
    background: rgba(255,255,255,.96); box-shadow: var(--shadow); backdrop-filter: blur(16px);
  }
  .legend-dock.mobile-expanded .legend,
  .legend-dock.mobile-expanded .transparency-control {
    width: 100%; min-width: 0; box-shadow: none; background: #f8fafc;
  }
  .legend-dock.mobile-expanded .legend { grid-column: 1 / -1; }
  .legend-dock.mobile-expanded .warning-transparency-control { width: 100%; }

  .general-warning-panel,
  .cross-section-panel {
    z-index: 1120;
    top: calc(var(--phone-safe-top) + 72px);
    bottom: var(--phone-panel-bottom); left: calc(var(--phone-safe-left) + 7px);
    right: calc(var(--phone-safe-right) + 7px); width: auto; max-height: none;
    transform: none; border-radius: 17px;
  }
  .general-warning-header {
    min-height: 66px; padding: 10px 9px 9px 13px;
    grid-template-columns: minmax(0,1fr) auto auto; gap: 7px;
  }
  .general-warning-navigation button,
  .general-warning-close { width: 40px; height: 40px; }
  .general-warning-body { min-height: 0; padding: 10px; }
  .general-warning-scope-bar { padding: 7px 8px; align-items: stretch; flex-direction: column; }
  .general-warning-scope-bar button { width: 100%; min-height: 38px; }
  .general-warning-scope-bar span { text-align: left; white-space: normal; }
  .general-warning-footer { padding-bottom: max(9px, var(--phone-safe-bottom)); }
  .general-warning-panel.is-collapsed {
    top: calc(var(--phone-safe-top) + 72px); right: auto; bottom: auto;
    left: calc(var(--phone-safe-left) + 7px);
    width: min(340px, calc(100vw - var(--phone-safe-left) - var(--phone-safe-right) - 14px));
    max-height: none;
  }
  .general-warning-panel.is-collapsed .general-warning-header {
    min-height: 52px; padding: 6px 7px 6px 10px;
    grid-template-columns: minmax(0,1fr) auto auto;
  }
  .cross-section-body { min-height: 0; max-height: none; flex: 1 1 auto; padding: 6px; }
  .cross-section-panel { display: flex; flex-direction: column; }
  .cross-section-status { min-height: 140px; }

  .measure-hint,
  .cross-section-hint {
    z-index: 1125; top: calc(var(--phone-safe-top) + 72px);
    left: calc(var(--phone-safe-left) + 7px); right: calc(var(--phone-safe-right) + 7px);
    max-width: none; padding: 9px 11px; text-align: center; font-size: 11px;
  }
  .error-toast {
    top: calc(var(--phone-safe-top) + 72px); width: calc(100% - var(--phone-safe-left) - var(--phone-safe-right) - 14px);
    padding: 10px 12px; font-size: 12px;
  }
  .attribution-note { display: none; }
  .leaflet-control-attribution {
    right: calc(var(--phone-safe-right) + 3px); bottom: var(--phone-panel-bottom);
    max-width: 70vw; white-space: normal; text-align: right; font-size: 8px;
  }
  .leaflet-popup { max-width: calc(100vw - var(--phone-safe-left) - var(--phone-safe-right) - 34px) !important; }
  .nowcast-popup-content,
  .general-warning-popup-content {
    width: min(300px, calc(100vw - var(--phone-safe-left) - var(--phone-safe-right) - 72px));
    min-width: 0;
  }
  .nowcast-popup .leaflet-popup-content { max-height: min(54dvh, 480px); }
  .nowcast-warning-card { margin: 8px; padding: 11px; }
  .nowcast-warning-card dl { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .mobile-controls-button { width: 46px; padding: 0; }
  .mobile-controls-button > span { display: none; }
  .general-warning-header { grid-template-columns: minmax(0,1fr) auto; }
  .general-warning-navigation {
    grid-column: 1 / -1; grid-row: 2; justify-content: center;
  }
  .general-warning-close { grid-column: 2; grid-row: 1; }
  .general-warning-eyebrow { font-size: 8px; }
  .general-warning-header h2 { font-size: 14px; }
  .tools-wrap { gap: 4px; }
  .drawing-tool-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .drawing-tools-heading { align-items: baseline; flex-direction: row; gap: 6px; }
  .general-warning-panel.is-collapsed .general-warning-navigation {
    grid-column: auto; grid-row: auto; justify-content: initial;
  }
  .general-warning-panel.is-collapsed .general-warning-close { grid-column: auto; grid-row: auto; }
  .information-panel-body { padding: 11px 12px 13px; }
}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 960px) {
  :root {
    --phone-timeline-height: 54px;
    --phone-tool-bottom: calc(var(--phone-safe-bottom) + 66px);
    --phone-panel-bottom: calc(var(--phone-safe-bottom) + 122px);
  }
  .mobile-controls-panel {
    grid-template-columns: repeat(2, minmax(0,1fr));
    max-height: calc(100vh - var(--phone-safe-top) - 80px);
    max-height: calc(100dvh - var(--phone-safe-top) - 80px);
  }
  .mobile-controls-panel .parameter-control,
  .mobile-controls-panel .theme-control { grid-column: 1 / -1; }
  .timeline-panel {
    height: var(--phone-timeline-height); padding: 5px 6px;
    grid-template-columns: 40px 40px 40px minmax(100px,1fr) minmax(92px,120px) 54px;
    grid-template-rows: 42px; gap: 4px;
  }
  #previousButton { grid-column: 1; grid-row: 1; }
  #playButton { grid-column: 2; grid-row: 1; }
  #nextButton { grid-column: 3; grid-row: 1; }
  #timelineSlider { grid-column: 4; grid-row: 1; }
  #frameTime { grid-column: 5; grid-row: 1; }
  #latestButton { grid-column: 6; grid-row: 1; }
  .tool-control > .tools-menu,
  .tools-menu,
  .information-panel {
    max-height: calc(100vh - var(--phone-safe-top) - var(--phone-panel-bottom) - 76px);
    max-height: calc(100dvh - var(--phone-safe-top) - var(--phone-panel-bottom) - 76px);
  }
  .general-warning-panel,
  .cross-section-panel { top: calc(var(--phone-safe-top) + 70px); }
  .legend-dock.mobile-expanded .legend-controls { max-height: 45dvh; }
}
