
:root {
  --bg-primary:    #eef0f3;   
  --bg-secondary:  #ffffff;   
  --bg-tertiary:   #f2f4f7;   
  --text-primary:  #1a1d21;
  --text-secondary:#565b63;
  --text-tertiary: #636a74;   
  --accent:        #d92d20;   
  --accent-hover:  #b42318;
  --accent-glow:   rgba(217, 45, 32, 0.14);
  --border-accent: rgba(217, 45, 32, 0.35);
  --data:          #e5322a;   
  --amber-text: #92400e;   
  --alert-bg:   #fef2f2;   
  --alert-line: #fca5a5;
  --alert-text: #7a1712;   
  --border: rgba(0, 0, 0, 0.10);   
  --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --mono: 'Share Tech Mono', 'SF Mono', ui-monospace, monospace;
  --radius: 2px;
  --side-l: 320px;
  --side-r: 360px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  font: 13px/1.5 var(--font);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;        
  overscroll-behavior: none;                 
  -webkit-tap-highlight-color: transparent;  
}
.skip-link {
  position: fixed; top: -60px; left: 8px; z-index: 20;
  padding: 8px 12px; background: var(--bg-secondary); color: var(--accent);
  border: 1px solid var(--border-accent); border-radius: var(--radius);
  font: 600 12px/1 var(--font); text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 8px; }
#mapWrap:focus:not(:focus-visible) { outline: none; }
.noscript-note {
  padding: 24px 20px; background: var(--alert-bg); color: var(--alert-text);
  border-bottom: 1px solid var(--alert-line);
  font-size: 13px; line-height: 1.5; text-align: center;
}
.noscript-note a { color: var(--accent-hover); }
#polyOpacityVal { font-variant-numeric: tabular-nums; }   
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.14); border-radius: 4px; }
.side-body, .bulletin-body { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0.14) transparent; }
#app {
  position: relative;
  display: grid;
  grid-template-columns: var(--side-l) 1fr var(--side-r);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "header header header"
    "sidebar map bulletin";
  height: 100vh;
  height: 100dvh;   
  transition: grid-template-columns 0.2s ease;
}
#app.left-collapsed  { grid-template-columns: 0 1fr var(--side-r); }
#app.right-collapsed { grid-template-columns: var(--side-l) 1fr 0; }
#app.left-collapsed.right-collapsed { grid-template-columns: 0 1fr 0; }
#app.left-collapsed  #sidebar,
#app.right-collapsed #bulletin { visibility: hidden; }
header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.logo { width: 42px; height: 42px; color: var(--accent); flex: none; }
header .brand { display: flex; align-items: center; gap: 3px; text-decoration: none; color: inherit; flex: none; }
.logo .dash { animation: dashIn 0.9s ease-out both; }
.logo .dash:nth-child(1) { animation-delay: 0s; }
.logo .dash:nth-child(2) { animation-delay: 0.5s; }
.logo .dash:nth-child(3) { animation-delay: 1s; }
.logo .dash:nth-child(4) { animation-delay: 1.5s; }
@keyframes dashIn {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  32%  { opacity: 0.2; }
  46%  { opacity: 1; }
  60%  { opacity: 0.45; }
  74%  { opacity: 1; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .logo .dash { animation: none; }
}
header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 0.9;           
  letter-spacing: -1.2px;
  color: var(--text-primary);
  text-align: left;
  white-space: nowrap;
}
.brand-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; flex: 0 1 auto; min-width: 0;
}
.subhead {
  margin: 0; max-width: 100%;
  font-size: 11px; font-weight: 500; line-height: 1.25;
  color: var(--text-secondary); text-align: center; text-wrap: balance;
}
.nav-group { flex: 1 1 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.nav-group-left  { justify-content: flex-start; }
.nav-group-right { justify-content: flex-end; }
.nav-toggle {
  display: flex; flex: none;
  width: 38px; height: 38px; padding: 0;
  align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.nav-toggle:hover { color: var(--accent); }
.nav-toggle.is-active { color: var(--accent); border-color: var(--border-accent); background: var(--accent-glow); }
.nav-toggle svg { display: block; }
#scrim { display: none; }
#sidebar, #bulletin {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--bg-secondary);
}
#sidebar  { grid-area: sidebar;  border-right: 1px solid var(--border); }
#bulletin { grid-area: bulletin; border-left:  1px solid var(--border); }
.side-body, .bulletin-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px; }
.group { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.group:last-child { border-bottom: 0; }
.group > h2 {
  margin: 0 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-tertiary);
}
label { display: block; margin: 5px 0; cursor: pointer; }
label.inline { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.checks.stacked { display: flex; flex-direction: column; gap: 2px; }
.checks.stacked label.inline { margin: 3px 0; }
label.inline.disabled, label.inline.disabled input { cursor: not-allowed; }
label.inline.disabled { color: var(--text-tertiary); opacity: 0.5; }
.slider-row { margin: 8px 0 2px; }
.slider-row .rowlabel { margin-bottom: 4px; }
.slider-row input[type="range"] {
  display: block; width: 100%; margin: 0; cursor: pointer;
}
.link-btn {
  border: 0; background: transparent; padding: 0 0 0 8px; cursor: pointer;
  color: var(--accent); font-family: var(--font); font-size: 11px;
  text-transform: none; letter-spacing: 0; text-decoration: underline;
}
.link-btn:hover { color: var(--accent-hover); }
.rowlabel {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--text-tertiary); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
}
.rowlabel span:last-child { color: var(--text-secondary); text-transform: none; letter-spacing: 0; }
.rowlabel label { margin: 0; }
.note-line { display: block; text-transform: none; letter-spacing: 0; line-height: 1.4; color: var(--text-tertiary); margin: 6px 0 0; }
.note-line b { color: var(--text-secondary); }
.note-line:empty { margin: 0; }
.rowlabel[hidden], .note-line[hidden] { display: none; }
.segmented {
  display: flex; gap: 2px; padding: 2px; margin-top: 20px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-tertiary);
}
.mode-hint { text-align: center; }
.segmented button {
  flex: 1; padding: 6px 4px; border: 0; border-radius: var(--radius); cursor: pointer;
  background: transparent; color: var(--text-secondary);
  font-family: var(--font); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px; transition: background 0.15s, color 0.15s;
}
.segmented button:hover { color: var(--text-primary); }
.segmented button.active { background: var(--accent); color: #fff; }
.date-input-row { display: flex; align-items: center; gap: 8px; }
.date-input-row[hidden] { display: none; }
.date-input-row input[type="date"] {
  flex: 1; padding: 7px 10px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary); font-size: 13px;
  font-family: var(--font); outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.date-input-row input[type="date"]:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-glow); }
.date-input-row input[type="date"]::-webkit-calendar-picker-indicator { display: none; }
.date-input-row input[type="date"] { appearance: none; -moz-appearance: textfield; }
.date-sep { color: var(--text-tertiary); font-size: 11px; }
.day-step {
  flex: 0 0 auto; padding: 0 10px; align-self: stretch;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--accent); font-size: 17px; line-height: 1; font-family: var(--font);
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.day-step:hover:not(:disabled) { background: var(--bg-tertiary); }
.day-step:disabled { color: var(--text-tertiary); opacity: 0.4; cursor: default; }
.calendar-wrap { position: relative; margin-top: 10px; }
.calendar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cal-header button {
  background: none; border: 0; color: var(--accent); font-size: 17px; line-height: 1;
  cursor: pointer; padding: 2px 9px; border-radius: var(--radius); font-family: var(--font);
}
.cal-header button:hover:not(:disabled) { background: var(--bg-tertiary); }
.cal-header button:disabled { color: var(--text-tertiary); opacity: 0.4; cursor: default; }
.cal-header span { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day-header { text-align: center; font-size: 10px; font-weight: 600; color: var(--text-tertiary); padding: 3px 0; }
.cal-day {
  position: relative; aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  font-size: 12px; color: var(--text-tertiary); border-radius: var(--radius);
  cursor: pointer; font-variant-numeric: tabular-nums; transition: background 0.12s;
}
.cal-day:empty { cursor: default; }
.cal-day:not(:empty):hover { background: var(--bg-tertiary); }
.cal-day.has-data { color: var(--text-primary); font-weight: 500; }
.cal-day.no-data { color: var(--text-tertiary); }   
.cal-day.has-report { color: var(--text-primary); font-weight: 500; }
.cal-day.in-range { background: var(--accent-glow); color: var(--text-primary); }
.cal-day.selected { outline: 2px solid var(--accent); outline-offset: -2px; color: var(--accent); font-weight: 700; }
.cal-day:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-marks { display: flex; align-items: center; justify-content: center; gap: 3px; height: 9px; }
.sortie-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--data); flex: none; }
.report-dot { width: 5px; height: 5px; box-sizing: border-box; border-radius: 50%;
  border: 1px solid var(--data); background: transparent; flex: none; }
.cal-cross { width: 9px; height: 9px; color: var(--data); flex: none; }   
.cal-key {
  display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center;
  padding: 8px 0 0; margin-top: 8px; border-top: 1px solid var(--border);
  font-size: 10px; color: var(--text-tertiary);
}
.cal-key span { display: flex; align-items: center; gap: 4px; }
input { accent-color: var(--accent); }   
input[type="checkbox"] { width: 15px; height: 15px; }
button.link {
  background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-family: var(--font);
}
button.link:hover { color: var(--accent-hover); text-decoration: underline; }
.btn-line {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--text-primary);
  font-family: var(--font); font-size: 12px; font-weight: 500; transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-line:hover { border-color: var(--border-accent); color: var(--accent); background: var(--bg-tertiary); }
.btn-line .muted { color: var(--text-tertiary); font-weight: 400; }
#animate { font-weight: 600; }
.note-line + .btn-line { margin-top: 8px; }
.btn-line + .btn-line { margin-top: 6px; }
#mapWrap { grid-area: map; display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; isolation: isolate; container: mapcell / inline-size; }
#map { flex: 1; min-height: 0; position: relative; background: var(--bg-primary); container-type: size; }
#mapCredit { display: none; }
@media (max-width: 860px) {
  #mapCredit {
    display: block; flex: 0 0 auto; width: 100%; box-sizing: border-box;
    padding: 3px 12px; text-align: center;
    background: var(--bg-secondary); border-top: 1px solid var(--border);
  }
  #mapCredit .maplibregl-ctrl { margin: 0; float: none; background: none; box-shadow: none; }
  #mapCredit .maplibregl-ctrl-attrib {
    position: static; min-width: 0; max-width: none; padding: 0; background: none;
  }
  #mapCredit .maplibregl-ctrl-attrib-inner { font-size: 9px; line-height: 1.3; white-space: normal; color: var(--text-tertiary); }
}
#mapDisclaimer {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 5;   
  max-width: calc(100% - 24px);
  box-sizing: border-box;
  padding: 2px 8px;
  color: var(--text-secondary);            
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;   
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 0 6px rgba(255, 255, 255, 0.85);
  pointer-events: none;  
  display: none;
}
#mapDisclaimer.visible { display: block; }
@container mapcell (max-width: 760px) {
  #mapDisclaimer {
    position: static;
    transform: none;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    padding: 6px 14px;
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    white-space: normal;                 
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    text-shadow: none;                   
    pointer-events: auto;
  }
}
@supports not (container-type: inline-size) {
  @media (max-width: 640px) {
    #mapDisclaimer {
      position: static;
      transform: none;
      flex: 0 0 auto;
      width: 100%;
      max-width: none;
      padding: 6px 14px;
      font-size: 11px;
      line-height: 1.4;
      text-align: center;
      white-space: normal;
      color: var(--text-secondary);
      background: var(--bg-secondary);
      border-top: 1px solid var(--border);
      text-shadow: none;
      pointer-events: auto;
    }
  }
}
#loadError {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 6; max-width: 88%; padding: 20px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
#loadError[hidden] { display: none; }
#loadError svg { color: var(--accent); }
#loadError .le-title { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--text-primary); }
#loadError .le-msg { margin: 0; font-size: 13px; }
#loadErrorRetry {
  margin-top: 5px; padding: 6px 16px; font-family: var(--font); font-size: 12px; font-weight: 600;
  color: #fff; background: var(--accent); border: 0; border-radius: var(--radius);
  cursor: pointer; transition: background 0.15s;
}
#loadErrorRetry:hover { background: var(--accent-hover); }
.swatch { display: inline-block; width: 11px; height: 11px; border-radius: var(--radius); vertical-align: -1px; margin-right: 6px; background: var(--accent); }
.maplibregl-popup-content {
  background: rgba(255, 255, 255, 0.97) !important; color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--font); font-size: 12px; max-width: 300px; padding: 12px 14px;
}
.maplibregl-popup { z-index: 3; }
.maplibregl-popup-content .popup {
  max-height: 40vh; max-height: calc(50cqh - 40px); overflow-y: auto; overscroll-behavior: contain;
}
.maplibregl-popup-content h3 {
  margin: 0 0 6px; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--text-primary);
}
.popup-caveat { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--border); color: var(--amber-text); font-size: 10px; font-family: var(--font); }
.popup-disclaimer { margin-top: 4px; color: var(--text-tertiary); font-size: 10px; line-height: 1.4; font-family: var(--font); }
.popup a { color: var(--accent); text-decoration: none; }
.popup a:hover { text-decoration: underline; }
.ext { margin-left: 3px; font-size: 0.9em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 4px 0; }
.kv dt { color: var(--text-tertiary); white-space: nowrap; }
.kv dd { margin: 0; }   
.maplibregl-popup-close-button { color: var(--text-tertiary); font-size: 16px; padding-right: 6px; }
.maplibregl-ctrl-group { border: 1px solid var(--border) !important; border-radius: var(--radius) !important; }
.basemap-switch {
  background: rgba(255, 255, 255, 0.95); border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14); font-size: 11px; color: var(--text-secondary);
}
.basemap-switch .bm-toggle {
  display: flex; align-items: center; justify-content: center;
  padding: 6px; background: none; border: 0; cursor: pointer; color: var(--text-secondary);
}
.basemap-switch .bm-toggle:hover { color: var(--text-primary); }
.basemap-switch.open .bm-toggle { color: var(--accent); }
.basemap-switch .bm-toggle svg { display: block; }
.basemap-switch .bm-options { display: none; padding: 2px 9px 7px; }
.basemap-switch.open .bm-options { display: block; }
.basemap-switch label.inline { display: flex; gap: 6px; margin: 3px 0; color: var(--text-secondary); font-size: 12px; }
.basemap-switch .bm-sep { border-top: 1px solid var(--border); margin: 6px 0 5px; }
.basemap-switch .bm-group-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-tertiary); margin-bottom: 2px;
}
.inset-map {
  width: 113px; height: 156px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-primary); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}
.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib {
  position: absolute; left: 11px; bottom: 11px; margin: 0;
  box-sizing: border-box; min-width: 111px; max-width: 111px;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.82);
}
.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-inner { font-size: 8px; line-height: 1.3; white-space: normal; }
.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib abbr { text-decoration: none; border: 0; cursor: help; }
.maplibregl-ctrl-bottom-left .map-legend {
  width: 113px; margin: 0 0 8px 10px; padding: 5px 8px; box-sizing: border-box;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  font-size: 10px; line-height: 1.3; color: var(--text-secondary);
  pointer-events: none;
}
.map-legend .ml-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.map-legend .ml-row.ml-wrap { white-space: normal; }
.map-legend .ml-row.ml-wrap > :not(.ml-swatch) { min-width: 0; }
.map-legend .ml-row + .ml-row { margin-top: 3px; }
.map-legend .ml-swatch { flex: none; width: 18px; }
.bul-range { margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
  font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.bul-head { margin: 0 0 3px; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text-primary); }
.bul-meta { margin: 0 0 12px; font-size: 10px; color: var(--text-tertiary); font-family: var(--mono); }
.bul-figures { margin: -4px 0 12px; padding: 6px 8px; font-size: 11px; line-height: 1.45;
  color: var(--text-secondary); background: var(--bg-tertiary); border-radius: var(--radius); }
.bul-figures-label { font-weight: 600; color: var(--text-primary); }
.bul-clause {
  margin: 0 0 12px; font-size: 14px; line-height: 1.55;
  color: var(--text-secondary);
}
.bul-label { font-weight: 600; color: var(--text-primary); }
.bul-list { margin: 6px 0 0; padding: 0 0 0 16px; list-style: disc; }
.bul-list li { margin: 0 0 4px; }
.bul-list li:last-child { margin-bottom: 0; }
.bul-list li::marker { color: var(--data); }
.bul-foot { margin: 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: 10px; line-height: 1.5; color: var(--text-tertiary); }
.bul-foot a { color: var(--accent); white-space: nowrap; }
.bul-empty { font-size: 12px; line-height: 1.55; color: var(--text-tertiary); }
.bul-disclaimer { margin: 14px 0 0; font-size: 10px; line-height: 1.5; color: var(--text-tertiary); }
@media (max-width: 860px) {
  #app, #app.left-collapsed, #app.right-collapsed, #app.left-collapsed.right-collapsed {
    grid-template-columns: 1fr; grid-template-rows: auto 1fr;
    grid-template-areas: "header" "map";
  }
  header { gap: 6px; padding-left: 12px; padding-right: 12px; flex-wrap: wrap; }
  .brand-block { display: contents; }
  .subhead { order: 1; flex-basis: 100%; }
  .nav-group { gap: 6px; }
  .nav-toggle { width: 44px; height: 44px; border: none; background: none; }
  .nav-toggle.is-active { background: none; border-color: transparent; }
  #sidebar, #bulletin {
    position: fixed; top: var(--header-h, 60px); bottom: 0; z-index: 15;
    width: min(86vw, 340px); max-height: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0.25s;
  }
  #sidebar  { left: 0;  transform: translateX(-100%); }
  #bulletin { right: 0; transform: translateX(100%); }
  #app.m-left-open  #sidebar  { transform: none; visibility: visible; }
  #app.m-right-open #bulletin { transform: none; visibility: visible; }
  #app.m-left-open #scrim, #app.m-right-open #scrim {
    display: block; position: fixed; inset: var(--header-h, 60px) 0 0 0; z-index: 14;
    background: rgba(18, 23, 28, 0.38);
  }
  .date-input-row input[type="date"] { font-size: 16px; }
  .cal-header button, .day-step {
    min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
  }
  .maplibregl-popup-close-button { width: 32px; height: 32px; }
  .help-modal .help-foot a { padding: 6px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
#helpModal {
  width: 460px;
  max-width: calc(100vw - 32px); max-width: calc(100dvw - 32px);
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);
  padding: 0; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-secondary); color: var(--text-primary);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.24);
}
#helpModal::backdrop { background: rgba(18, 23, 28, 0.42); }
.help-modal { padding: 16px 20px 20px; font-family: var(--font); }
.help-head { display: flex; align-items: center; justify-content: space-between; }
.help-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.help-x {
  border: 0; background: none; cursor: pointer; color: var(--text-tertiary);
  font-size: 20px; line-height: 1; padding: 2px 4px;
}
.help-x:hover { color: var(--accent); }
.help-modal p.help-lead { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-primary); }
.help-h {
  margin: 16px 0 5px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-tertiary);
}
.help-modal p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.help-list { margin: 0; padding-left: 18px; }
.help-list li { font-size: 13px; line-height: 1.5; color: var(--text-secondary); margin-bottom: 5px; }
.help-list li:last-child { margin-bottom: 0; }
.help-modal a { color: var(--accent); }
.help-modal .ext { margin-left: 1px; }
.help-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--border); }
.help-foot .help-h { margin-top: 0; color: var(--text-secondary); }
.help-modal .help-foot p { font-size: 10px; line-height: 1.5; color: var(--text-tertiary); }
.help-modal .help-foot p + p { margin-top: 6px; }
.help-modal .help-foot a { white-space: nowrap; }
.maplibregl-ctrl-bottom-right { display: flex; flex-direction: row; align-items: flex-end; }
.export-ctrl {
  background: rgba(255, 255, 255, 0.95); border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14); color: var(--text-secondary);
}
.export-ctrl-btn {
  display: flex; align-items: center; justify-content: center; padding: 6px;
  background: none; border: 0; cursor: pointer; color: var(--text-secondary);
}
.export-ctrl-btn:hover { color: var(--text-primary); }
.export-ctrl-btn svg { display: block; }
#exportModal {
  width: 380px;
  max-width: calc(100vw - 32px); max-width: calc(100dvw - 32px);
  max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px);   
  padding: 0; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-secondary); color: var(--text-primary);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.24);
}
#exportModal::backdrop { background: rgba(18, 23, 28, 0.42); }
.export-modal { padding: 16px 18px 18px; font-family: var(--font); }
.export-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.export-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-primary); }
.export-x {
  border: 0; background: none; cursor: pointer; color: var(--text-tertiary);
  font-size: 20px; line-height: 1; padding: 2px 4px;
}
.export-x:hover { color: var(--accent); }
.export-scope-note { margin: 2px 0 0; }
.export-grouplabel {
  margin: 15px 0 8px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-tertiary);
}
.export-choice-row { margin-bottom: 8px; }
.export-choice { line-height: 1.3; padding: 9px 11px; }
.export-choice .ec-title { display: block; font-size: 13px; font-weight: 600; }
.export-choice .ec-desc { display: block; font-size: 11px; margin-top: 2px; }
.export-choice.is-busy { opacity: 0.55; pointer-events: none; }
.export-subopt { margin-top: 7px; }
.tl-opts { display: flex; gap: 8px; }
.tl-opts .seg-mini { flex: 1 1 0; display: flex; }
.tl-opts .seg-mini button { flex: 1 1 0; text-align: center; }
.seg-mini { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg-mini button {
  border: 0; border-right: 1px solid var(--border); background: #fff; cursor: pointer;
  padding: 4px 10px; font-family: var(--font); font-size: 11px; color: var(--text-secondary);
}
.seg-mini button:last-child { border-right: 0; }
.seg-mini button:hover { color: var(--text-primary); }
.seg-mini button.active { background: var(--accent); color: #fff; }
.seg-mini button:disabled { cursor: not-allowed; color: var(--text-tertiary); background: var(--bg-tertiary); }
.seg-mini button.active:disabled { background: var(--accent); color: #fff; opacity: 0.5; }
.tl-progress { display: none; position: fixed; inset: 0; z-index: 60; place-items: center;
  background: rgba(0, 0, 0, 0.35); }
.tl-progress.is-open { display: grid; }
.tl-progress-card {
  background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; width: min(320px, 82vw); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  font-family: var(--font);
}
.tl-progress-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.tl-progress-track { margin: 12px 0 7px; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--bg-tertiary); }
.tl-progress-bar { height: 100%; width: 0; background: var(--accent); transition: width 0.15s ease; }
.tl-progress-sub { font-size: 11px; color: var(--text-secondary); }
.tl-progress-cancel {
  display: block; margin: 14px 0 0 auto; padding: 5px 14px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-secondary); color: var(--text-secondary);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tl-progress-cancel:hover { border-color: var(--border-accent); color: var(--accent); background: var(--bg-tertiary); }
.tl-progress-cancel:disabled { cursor: default; opacity: 0.6; }
.tl-progress-cancel:disabled:hover { border-color: var(--border); color: var(--text-secondary); background: var(--bg-secondary); }
.export-choice-row.is-disabled { opacity: 0.6; }
.export-choice:disabled, .export-choice:disabled:hover {
  cursor: not-allowed; border-color: var(--border); color: var(--text-primary); background: #fff;
}
.export-error { margin: 10px 0 0; font-weight: 600; color: var(--alert-text); }
.export-caveat {
  margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 11px; line-height: 1.5; color: var(--text-tertiary);
}
.export-caveat b { color: var(--text-secondary); }
@media (max-width: 640px) {
  #exportModal { width: calc(100vw - 24px); width: calc(100dvw - 24px); }
}
.bm-options label.is-unavailable {
  opacity: 0.45;
  cursor: not-allowed;
}
