:root {
  font: 15px/1.45 system-ui, sans-serif;
  color: #182d29;
  background: #d6cdb9;
}

* { box-sizing: border-box; }
body { margin: 0; }
#map, #map .maplibregl-canvas-container { position: absolute; inset: 0; }
#map { isolation: isolate; }
#map > .maplibregl-canvas-container > .maplibregl-canvas, .surroundings-mask {
  filter: var(--ambient-filter, none);
}
#map > .maplibregl-canvas-container::after, .surroundings-mask::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgb(21 43 87 / var(--night-tint, 0));
  pointer-events: none;
}
#map .maplibregl-ctrl-bottom-left, #map .maplibregl-ctrl-bottom-right { z-index: 7; }
.region-overlay, .surroundings-mask, .surroundings-circle, .surroundings-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.region-overlay { z-index: 2; }
.surroundings-defs { position: absolute; }
.surroundings-mask {
  z-index: 3;
  background: #d6cdb9;
  mask: url(#outside-zone);
}
.surroundings-circle {
  background: #c5c5c5;
  clip-path: url(#surroundings-circle);
}
.surroundings-map { filter: grayscale(1) brightness(0.78); }
.police-station-marker {
  display: grid;
  place-items: center;
  z-index: 4;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #3e6172;
  box-shadow: 0 2px 5px #182d2966;
  cursor: pointer;
}
.police-station-marker svg { width: 24px; height: 24px; }
.police-station-marker svg path { fill: #fff; }
.police-station-marker svg text {
  fill: #3e6172;
  font: bold 14px/1 sans-serif;
  text-anchor: middle;
}
.police-station-marker.highlighted, .police-station-marker:hover, .police-station-marker:focus-visible {
  z-index: 5;
  background: #175d9f;
}
.police-station-marker.highlighted { box-shadow: 0 0 0 3px #5798d0, 0 2px 5px #182d2966; }
.police-station-marker.is-off {
  background: #8a969b;
  opacity: 0.55;
  filter: grayscale(0.35);
  box-shadow: 0 1px 3px #182d2944;
}
.police-station-marker.is-off svg text { fill: #8a969b; }
.police-station-marker.is-off:is(:hover, :focus-visible) {
  background: #6f7c81;
  opacity: 0.85;
}
.police-station-marker[aria-disabled="true"] { cursor: default; }
.tool-button[aria-pressed="true"] {
  border-color: #087c70;
  background: #e4f1ec;
  color: #075b4f;
}
.station-unlock-status {
  position: absolute;
  left: 50%;
  bottom: 52px;
  z-index: 8;
  max-width: min(420px, calc(100% - 24px));
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #182d29e8;
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px #182d2940;
  pointer-events: none;
}
.station-unlock-status[hidden] { display: none; }
.station-unlock-status.is-limit {
  background: #5a2b1ee8;
}
.police-station-name {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  width: max-content;
  max-width: min(230px, 70vw);
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 5px;
  background: #182d29;
  color: #fff;
  font-size: 12px;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.police-station-marker:is(:hover, :focus-visible) { z-index: 6; }
.police-station-marker:is(:hover, :focus-visible) .police-station-name { display: block; }
.top-bar {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.clock {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(420px, 100%);
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: #fbfaf6f5;
  box-shadow: 0 2px 8px #293d3320;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  pointer-events: auto;
}
.clock-header { display: flex; align-items: center; gap: 5px; min-width: 0; }
.clock time {
  flex: 1 1 auto;
  min-width: 40px;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#time-rate {
  flex: 0 0 48px;
  width: 48px;
  color: #40574f;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}
.clock-buttons { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.circular-button {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  min-height: 28px;
  padding: 0;
  border-color: #9fb7ab;
  border-radius: 50%;
  background: #fbfaf6;
  color: #40574f;
}
.circular-button[aria-pressed="true"] { border-color: #087c70; background: #e4f1ec; color: #075b4f; }
.circular-button svg { width: 18px; height: 18px; fill: currentColor; }
.collapse-button { margin-left: 2px; }
.collapse-button svg { transition: transform 150ms ease; }
.collapse-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.speed-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.speed-button {
  display: grid;
  place-items: center;
  padding: 0;
  border-color: #9fb7ab;
  background: #fbfaf6;
  color: #40574f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.speed-button-base { font-size: 9px; font-weight: 700; }
.speed-button:disabled { cursor: default; opacity: 0.45; }
.clock-controls { display: grid; gap: 2px 10px; }
.clock-controls[hidden] { display: none; }
.weather-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  font-weight: 600;
}
.weather-header output { color: #40574f; font-weight: 500; }
#weather-status {
  color: #52675f;
  font-size: 11px;
}
.weather-attribution { color: #52675f; font-size: 10px; }
.weather-attribution a { color: #0c6256; }
.clock-controls input[type="range"] {
  width: 100%;
  height: 24px;
  margin: 0;
  accent-color: #086456;
  cursor: pointer;
}
.clock-controls input[type="range"]:focus-visible { outline: 2px solid #087c70; outline-offset: 2px; }
.clock-controls input[type="range"]:disabled { cursor: default; opacity: 0.9; }
.event-controls {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid #dbe5df;
}
.event-notice {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.active-events {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 96px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}
.active-events[hidden] { display: none; }
.active-events button {
  min-height: 28px;
  padding: 2px 8px;
  border-color: #c97656;
  background: #fff0e7;
  color: #823a25;
  font-size: 12px;
}
.active-events button[aria-pressed="true"] {
  border-color: #823a25;
  background: #a23f20;
  color: #fff;
}
.event-marker {
  z-index: 6;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #a23f20;
  color: #fff;
  box-shadow: 0 2px 5px #182d2966;
  font-weight: 800;
  cursor: pointer;
}
.event-marker.selected {
  box-shadow: 0 0 0 3px #c9765688, 0 2px 5px #182d2966;
}
.event-marker.en-route { background: #b7791f; }
.event-marker.on-site { background: #087c70; }
.patrol-marker {
  z-index: 7;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #1f6159;
  box-shadow: 0 2px 6px #182d2966;
  font-size: 16px;
  line-height: 1;
}
.patrol-marker.en-route { background: #b7791f; }
.patrol-marker.on-site { background: #087c70; }
.patrol-marker.returning { background: #3d6e68; }
.event-assignment-dialog {
  width: min(920px, calc(100vw - 24px));
  max-width: 920px;
  height: min(640px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid #7c9baa55;
  border-radius: 16px;
  background: linear-gradient(165deg, #f7faf8, #eef4f0 60%, #e8efea);
  box-shadow: 0 24px 64px #071117aa;
  color: #1c2a24;
}
.event-assignment-dialog::backdrop { background: #0d171480; }
.event-assignment-dialog[open] {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}
.event-assignment-fleet {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.event-assignment-fleet li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #c9d6cf;
  border-radius: 999px;
  background: #f3f7f4;
  color: #5f746b;
  font-size: 11px;
}
.event-assignment-fleet li b { color: #1c2a24; }
.event-assignment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid #c9d6cf;
}
.event-assignment-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}
.event-assignment-phase,
.event-assignment-status {
  margin: 4px 0 0;
  color: #5f746b;
  font-size: 13px;
}
.event-assignment-station-bar {
  display: grid;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid #c9d6cf;
  background: #fff;
}
.event-assignment-station {
  margin: 0;
  color: #087c70;
  font-size: 13px;
  font-weight: 700;
}
.event-assignment-stations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.event-assignment-stations button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #9bb3aa;
  border-radius: 999px;
  background: #f3f7f4;
  color: #1c2a24;
  font-size: 12px;
}
.event-assignment-stations button[aria-pressed="true"] {
  border-color: #087c70;
  background: #e4f1ec;
  color: #075b4f;
  font-weight: 700;
}
.event-assignment-board {
  display: grid;
  grid-template-columns: 1fr 36px 1fr;
  gap: 0;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
}
.event-assignment-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid #c9d6cf;
  border-radius: 12px;
  background: #f3f7f4;
}
.event-assignment-mission {
  border-color: #e0b9a8;
  background: #fff8f3;
}
.event-assignment-column h3 {
  margin: 0;
  color: #5f746b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.event-assignment-mission h3 { color: #a23f20; }
.event-assignment-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event-assignment-group + .event-assignment-group {
  padding-top: 8px;
  border-top: 1px dashed #b7c6bf;
}
.event-assignment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.event-assignment-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #c9d6cf;
  border-radius: 10px;
  background: #fff;
  cursor: grab;
}
.event-assignment-card:active { cursor: grabbing; }
.event-assignment-card.drag-over {
  border-color: #087c70;
  box-shadow: inset 0 0 0 1px #087c70;
}
.event-assignment-card.is-blocked {
  border-color: #e0b9a8;
  background: #fff0e7;
  cursor: not-allowed;
  opacity: .92;
}
.event-assignment-card.is-blocked .event-assignment-meta small {
  color: #a23f20;
}
.event-assignment-card.is-blocked .event-assignment-move {
  border-color: #d7a08a;
  background: #ffe4d6;
  color: #a23f20;
}
.event-assignment-card.en-turno {
  border-color: #e0b9a8;
  background: #fff8f3;
}
.event-assignment-list.drag-over {
  outline: 1px dashed #087c70;
  outline-offset: 2px;
  border-radius: 10px;
}
.event-assignment-avatar,
.event-assignment-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #e8fff8;
}
.event-assignment-avatar.m { background: linear-gradient(145deg, #2a5a68, #1a3a44); }
.event-assignment-avatar.f { background: linear-gradient(145deg, #5a4a68, #3a2a44); }
.event-assignment-icon {
  background: linear-gradient(145deg, #3d6e68, #234843);
  font-size: 16px;
}
.event-assignment-meta { min-width: 0; }
.event-assignment-meta strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.event-assignment-meta small {
  color: #5f746b;
  font-size: 11px;
}
.event-assignment-move {
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #9bb3aa;
  border-radius: 7px;
  background: #e4f1ec;
  color: #087c70;
  font-weight: 700;
}
.event-assignment-mission .event-assignment-move {
  border-color: #d7a08a;
  background: #fff0e7;
  color: #a23f20;
}
.event-assignment-empty {
  margin: 0;
  color: #5f746b;
  font-size: 12px;
  font-style: italic;
  list-style: none;
}
.event-assignment-divider {
  display: grid;
  place-items: center;
  color: #5f746b;
  font-size: 22px;
  font-weight: 700;
}
.event-assignment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px 16px;
  border-top: 1px solid #c9d6cf;
}
.event-assignment-footer .event-assignment-status { margin: 0; }
#event-assignment-dispatch {
  min-height: 40px;
  padding: 0 18px;
  border-color: #3d9f91;
  background: linear-gradient(180deg, #2a7f74, #1f6159);
  color: #e9fff9;
  font-weight: 700;
}
#event-assignment-dispatch:disabled {
  border-color: #b7c6bf;
  background: #d7e0db;
  color: #5f746b;
}
@media (max-width: 720px) {
  .event-assignment-board {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .event-assignment-divider {
    height: 24px;
    transform: rotate(90deg);
  }
  .event-assignment-footer {
    flex-direction: column;
    align-items: stretch;
  }
}
.map-tools {
  position: relative;
  display: grid;
  justify-items: end;
  gap: 6px;
}
.tool-button {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: #9fb7ab;
  border-radius: 50%;
  background: #fbfaf6f5;
  box-shadow: 0 2px 8px #293d3320;
  font-size: 18px;
  line-height: 1;
  pointer-events: auto;
}
.tool-button[hidden], .heat-maps[hidden], .heat-maps-legend[hidden],
.developer-tools[hidden], .event-chance-heatmap[hidden], .vehicle-route-tool[hidden] { display: none; }
.tool-button svg { width: 19px; height: 19px; fill: currentColor; pointer-events: none; }
.tool-button:is([aria-expanded="true"], .active-layer) {
  border-color: #087c70;
  background: #e4f1ec;
  color: #075b4f;
}
.heat-maps {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(270px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: #fbfaf6f5;
  box-shadow: 0 5px 24px #293d3320;
  pointer-events: auto;
}
.graphics-settings, .developer-tools {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  gap: 9px;
  width: min(290px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  overflow: auto;
  padding: 12px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: #fbfaf6f5;
  box-shadow: 0 5px 24px #293d3320;
  pointer-events: auto;
}
.developer-tool-options { display: grid; gap: 4px; }
.developer-tool-options button { text-align: left; }
.developer-tool-options button[aria-pressed="true"] { border-color: #087c70; background: #e4f1ec; }
.vehicle-route-tool { display: grid; gap: 7px; margin-top: 4px; padding-top: 8px; border-top: 1px solid #dbe5df; }
.vehicle-route-tool > p { font-size: 11px; }
.vehicle-route-vehicles { display: grid; gap: 4px; }
.vehicle-route-vehicles button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.vehicle-route-vehicles button[aria-pressed="true"] { border-color: #087c70; background: #e4f1ec; }
.vehicle-route-vehicles button span { color: #52675f; font-size: 11px; }
.vehicle-route-status { min-height: 2.8em; color: #40574f; }
#vehicle-route-reset { min-height: 34px; font-size: 12px; }
.vehicle-route-status[data-state="error"] { color: #8a3e29; }
.vehicle-route-status[data-state="result"] { color: #075b4f; font-weight: 650; }
.event-chance-heatmap { display: grid; gap: 8px; margin-top: 4px; }
.threshold-multiplier { display: grid; gap: 4px; }
.threshold-multiplier input[type="range"] {
  width: 100%;
  accent-color: #086456;
}
.threshold-multiplier input[type="range"]:focus-visible { outline: 2px solid #087c70; outline-offset: 2px; }
.multiplier-number-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.multiplier-number-field input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
}
.multiplier-number-field span {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.threshold-multiplier-note { margin: 0; font-size: 11px; color: #4d5f57; }
.developer-tool-actions { display: grid; gap: 4px; }
.event-tuning { display: grid; gap: 8px; padding-top: 4px; border-top: 1px solid #d7e0db; }
.event-tuning[hidden] { display: none; }
.event-tuning-json {
  border: 1px solid #fff;
  border-radius: 12px;
  padding: 0;
  background: #fbfaf6;
  box-shadow: 0 8px 28px #293d3340;
  width: min(420px, calc(100vw - 32px));
}
.event-tuning-json::backdrop { background: #1c2a2480; }
.event-tuning-json-form { display: grid; gap: 10px; padding: 14px; }
.event-tuning-json-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
  min-height: 220px;
}
.event-tuning-json-actions { display: flex; gap: 8px; justify-content: flex-end; }
.event-chance-list {
  display: grid;
  gap: 4px;
  max-height: min(280px, 45dvh);
  overflow: auto;
  padding-right: 2px;
}
.event-chance-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}
.event-chance-list button[aria-pressed="true"] { border-color: #087c70; background: #e4f1ec; }
.event-chance-rate {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  color: #4d5f57;
}
#event-chance-status { font-size: 12px; }
.graphics-settings[hidden] { display: none; }
.graphics-settings label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.graphics-settings input { flex: 0 0 auto; margin: 3px 0 0; accent-color: #086456; }
.graphics-settings-note { font-size: 11px; }
.heat-map-options { display: grid; gap: 4px; margin: 7px 0; }
.heat-map-options button { display: flex; align-items: center; gap: 8px; text-align: left; }
.heat-map-options button[aria-pressed="true"] { border-color: #087c70; background: #e4f1ec; }
.heat-map-swatch { width: 12px; height: 12px; border-radius: 50%; background: var(--heat-color); }
#heat-maps-status, .heat-maps-legend { font-size: 12px; }
#retry-heat-maps { margin-top: 8px; }
.heat-maps-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 8px;
  margin-top: 8px;
}
.heat-maps-legend::before {
  content: '';
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, var(--heat-color));
}
@media (max-width: 360px) {
  .clock-header { gap: 3px; }
  .circular-button { flex-basis: 22px; width: 22px; min-height: 22px; }
  .clock-buttons { gap: 2px; }
  .circular-button svg { width: 15px; height: 15px; }
  .collapse-button { margin-left: 0; }
  .speed-button { font-size: 12px; }
  .speed-button-base { font-size: 8px; }
  #time-rate { flex-basis: 42px; width: 42px; font-size: 10px; }
  .clock time { min-width: 40px; }
}
.region-selector {
  position: absolute;
  top: 82px;
  right: 12px;
  z-index: 3;
  width: min(320px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 13px 15px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: #fbfaf6f5;
  box-shadow: 0 5px 24px #293d3320;
  color: #182d29;
}
.region-selector[hidden] { display: none; }
.region-bar, .region-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.region-bar { margin-bottom: 8px; }
.region-bar strong { flex: 1; overflow-wrap: anywhere; }
.region-bar button, .region-selector .collapse-region {
  flex: 0 0 32px;
  width: 32px;
  min-height: 32px;
  padding: 0;
  justify-content: center;
  text-align: center;
}
.region-selector .collapse-region::before { content: '▾'; }
.region-selector .collapse-region[aria-expanded="false"]::before { content: '▸'; }
.region-selector > p { margin: 7px 0 9px; font-size: 12px; }
.region-selector ul { margin: 0; padding-left: 17px; list-style: none; }
.region-selector > ul { padding-left: 0; }
.region-selector li { margin: 3px 0; }
.region-selector li button {
  min-height: 32px;
  padding: 4px 8px;
  border-color: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 550;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.region-row > button[data-region] { min-width: 0; overflow-wrap: anywhere; }
.region-row:not(:has(.collapse-region)) > button { margin-left: 36px; }
.region-mark { flex: 0 0 auto; color: #52675f; }
.region-selector li button[aria-pressed="true"] {
  border-color: #087c70;
  background: #e4f1ec;
  color: #075b4f;
  font-weight: 700;
}
.region-selector button[aria-disabled="true"] { cursor: wait; opacity: 0.6; }
.station-panel {
  position: absolute;
  top: 82px;
  left: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: min(360px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  overflow: auto;
  padding: 15px;
  border: 1px solid #fff;
  border-radius: 15px;
  background: #fbfaf6f7;
  box-shadow: 0 8px 28px #182d2940;
  scrollbar-color: #9fb7ab transparent;
}
.station-panel[hidden], .station-name-editor[hidden],
#station-home-view[hidden], #station-personnel-view[hidden], #station-vehicles-view[hidden], .hiring-panel[hidden], .vehicle-hiring-panel[hidden] { display: none; }
#station-home-view, #station-personnel-view, #station-vehicles-view {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
}
.station-panel-header { display: flex; align-items: center; gap: 9px; }
.station-panel-header-back { gap: 8px; }
.station-emblem {
  display: grid;
  flex: 0 0 40px;
  height: 44px;
  place-items: center;
  clip-path: polygon(50% 0, 96% 15%, 91% 67%, 50% 100%, 9% 67%, 4% 15%);
  background: #175d70;
  color: white;
  font-size: 20px;
  font-weight: 800;
}
.station-heading { flex: 1; min-width: 0; }
.station-heading > small { color: #087c70; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.station-heading h2 { overflow: hidden; margin: 1px 0 0; font-size: 18px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.station-icon-button { display: grid; flex: 0 0 32px; width: 32px; min-height: 32px; place-items: center; padding: 0; font-size: 19px; }
.station-name-editor { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.station-name-editor input { flex: 1 1 100%; min-width: 0; min-height: 36px; padding: 6px 8px; border: 1px solid #9fb7ab; border-radius: 7px; font: inherit; }
.station-name-editor button { min-height: 32px; padding: 4px 9px; font-size: 12px; }
.station-name-editor button:first-of-type { border-color: #086456; background: #086456; color: #fff; }
.station-name-editor > small { flex: 1 1 100%; color: #8a3e29; font-size: 11px; }
.station-capacity { padding: 12px; border: 1px solid #c9d8d0; border-radius: 10px; background: linear-gradient(115deg, #e7f2ed, #eef4ef); }
.station-capacity-heading, .station-capacity-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.station-capacity-heading { margin-bottom: 8px; }
.station-capacity h3, .station-regions h3 { margin: 0; font-size: 12px; }
.station-capacity-heading strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.station-meter { height: 9px; overflow: hidden; border: 1px solid #9fb7ab; border-radius: 20px; background: #fbfaf6; }
.station-meter span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #128876, #53bb8d); transition: width 150ms ease; }
.station-capacity-footer { margin-top: 6px; color: #52675f; font-size: 11px; }
.station-capacity-footer strong { color: #075b4f; }
.station-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.station-sections h3 { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; margin: 0 0 1px; color: #40574f; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.station-sections h3 small { color: #71847c; font-size: 9px; font-weight: 500; letter-spacing: .04em; }
.station-sections button { position: relative; display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; align-items: center; gap: 1px 7px; min-height: 54px; padding: 6px 8px; text-align: left; }
.station-sections button > span { display: grid; grid-row: 1 / 3; width: 27px; height: 27px; place-items: center; border-radius: 7px; background: #e4f1ec; color: #087c70; font-size: 17px; }
.station-sections button strong { align-self: end; font-size: 12px; }
.station-sections button small { align-self: start; color: #64776f; font-size: 10px; font-weight: 450; }
.station-regions { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid #dbe5df; }
.station-regions > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.station-regions > div span { color: #52675f; font-size: 11px; }
.station-regions button { display: flex; min-height: 36px; align-items: center; justify-content: space-between; text-align: left; }
.station-regions button span { font-size: 18px; }
.station-panel-note { color: #52675f; font-size: 10px; }
.station-personnel-actions { display: flex; gap: 8px; }
.station-hire-button {
  flex: 1;
  min-height: 38px;
  border-color: #086456;
  background: linear-gradient(180deg, #0a7a6a, #086456);
  color: #fff;
}
.station-hire-button:hover:not(:disabled) { background: #074e43; }
.station-hire-button:disabled { cursor: not-allowed; opacity: 0.45; }
.station-agent-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.station-agent {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid #c9d8d0;
  border-radius: 10px;
  background: linear-gradient(140deg, #f4f8f5, #eef4ef);
}
.station-agent.hiring-row,
.station-agent.has-action { grid-template-columns: 40px minmax(0, 1fr) auto; }
.station-agent.otro-turno {
  border-color: #d5ddd8;
  background: #eef1ef;
  color: #7a8a83;
}
.station-agent.otro-turno .station-agent-photo {
  filter: grayscale(1);
  opacity: .75;
}
.station-agent.otro-turno .station-agent-skill,
.station-agent.otro-turno .station-agent-caption { color: #8a9791; }
.station-agent.otro-turno .station-agent-skill b { color: #5f746b; }
.station-agent[draggable="true"] { cursor: grab; }
.station-agent[draggable="true"]:active { cursor: grabbing; }
.station-agent.dragging { opacity: .55; }
.station-agent-photo {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #9fb7ab88;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #eef8f4;
}
.station-agent-photo.m { background: linear-gradient(145deg, #2a6a78, #184854); }
.station-agent-photo.f { background: linear-gradient(145deg, #6a5478, #443454); }
.station-agent-meta { min-width: 0; }
.station-agent-meta strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.station-agent-caption {
  display: block;
  margin-top: 1px;
  color: #5f746b;
  font-size: 11px;
}
.station-agent-skills { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; }
.station-agent-skill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #64776f;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.station-agent-skill b {
  color: #18463a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.station-skill-dots { display: inline-flex; gap: 2px; }
.station-skill-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c9d8d0;
}
.station-skill-dot.on { background: #128876; }
.station-hire-mini {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 11px;
}
.station-move-mini {
  min-width: 32px;
  border-color: #9bb3aa;
  background: #e4f1ec;
  color: #087c70;
  font-weight: 700;
}
.station-dismiss-mini { color: #7a3b2e; border-color: #c9a39a; }
.station-dismiss-mini:hover:not(:disabled) { border-color: #8a3e29; color: #8a3e29; background: #f7ece8; }
.shifts-column-active .station-move-mini {
  border-color: #d7a08a;
  background: #fff0e7;
  color: #a23f20;
}
.shifts-seats .station-agent {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 6px;
  padding: 6px 8px;
}
.shifts-seats .station-agent-photo {
  width: 28px;
  height: 28px;
  font-size: 10px;
}
.station-vehicle-actions { display: flex; }
.station-vehicle-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.station-vehicle-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #c9d8d0;
  border-radius: 10px;
  background: linear-gradient(140deg, #f4f8f5, #eef4ef);
}
.station-vehicle-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; background: #e0ede6; font-size: 20px; }
.station-vehicle-meta { min-width: 0; }
.station-vehicle-meta strong { display: block; font-size: 12px; }
.station-vehicle-stats { margin-top: 3px; color: #64776f; font-size: 10px; line-height: 1.45; }
.station-vehicle-actions-col { display: flex; flex-direction: column; gap: 5px; align-items: stretch; }
.station-vehicle-edit-code {
  min-height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  color: #075b4f;
  font-size: 10px;
}
.station-vehicle-edit-code:hover:not(:disabled) { border-color: #087c70; background: #e4f1ec; }
.station-vehicle-code-editor {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.station-vehicle-code-editor[hidden] { display: none; }
.station-vehicle-code-editor input {
  flex: 1 1 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #9fb7ab;
  border-radius: 7px;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.station-vehicle-code-save,
.station-vehicle-code-cancel {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11px;
}
.station-vehicle-code-save {
  border-color: #086456;
  background: #086456;
  color: #fff;
}
.station-vehicle-code-status {
  flex: 1 1 100%;
  color: #8a3e29;
  font-size: 11px;
}
.station-vehicle-remove { min-height: 28px; padding: 0 8px; border-color: #c9a39a; border-radius: 7px; color: #7a3b2e; font-size: 10px; }
.station-vehicle-remove:hover:not(:disabled) { border-color: #8a3e29; color: #8a3e29; background: #f7ece8; }
.station-vehicle-empty { padding: 15px 12px; border: 1px dashed #b9cbc1; border-radius: 10px; color: #64776f; font-size: 12px; line-height: 1.5; text-align: center; }
.hiring-panel {
  position: absolute;
  top: 82px;
  right: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  overflow: auto;
  padding: 15px;
  border: 1px solid #fff;
  border-radius: 15px;
  background: #fbfaf6f7;
  box-shadow: 0 8px 28px #182d2940;
  scrollbar-color: #9fb7ab transparent;
}
.hiring-panel-footer {
  margin-top: auto;
  color: #71847c;
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.vehicle-hiring-panel {
  position: absolute;
  top: 82px;
  right: 12px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  overflow: auto;
  padding: 15px;
  border: 1px solid #fff;
  border-radius: 15px;
  background: #fbfaf6f7;
  box-shadow: 0 8px 28px #182d2940;
  scrollbar-color: #9fb7ab transparent;
}
.vehicle-hiring-status { min-height: 1em; margin: 0; color: #8a3e29; font-size: 11px; }
.station-section-dialog {
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid #fff;
  border-radius: 14px;
  background: #fbfaf6;
  box-shadow: 0 8px 30px #182d2966;
  color: #182d29;
}
.station-section-dialog::backdrop { background: #182d2970; }
.station-section-dialog h2 { margin: 0 0 8px; font-size: 19px; }
.station-section-dialog p { margin: 0 0 14px; }
.station-section-dialog button { display: block; margin-left: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.navigation-help {
  position: absolute;
  top: 82px;
  right: 12px;
  z-index: 4;
  width: min(310px, calc(100vw - 24px));
  padding: 13px 15px;
  border: 1px solid #fff;
  border-radius: 12px;
  background: #fbfaf6f5;
  box-shadow: 0 5px 24px #293d3320;
  color: #182d29;
}
.navigation-help[hidden] { display: none; }
.navigation-help p { margin-top: 7px; font-size: 13px; }
kbd {
  padding: 1px 5px;
  border: 1px solid #bdc9bf;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.panel {
  position: absolute;
  top: 82px;
  left: 12px;
  z-index: 2;
  width: min(350px, calc(100% - 96px));
  padding: 17px 19px;
  border: 1px solid #fff;
  border-radius: 16px;
  background: #fbfaf6f5;
  box-shadow: 0 5px 24px #293d3320;
}

.home { color: #0c6256; font-size: 13px; font-weight: 650; text-decoration: none; }
.home:hover { text-decoration: underline; }
h1 { margin: 6px 0; font-size: 22px; line-height: 1.15; letter-spacing: -0.025em; }
p { margin: 0; color: #40574f; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions:has(button:not([hidden])) { margin-top: 13px; }
button {
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid #9fb7ab;
  border-radius: 8px;
  background: #fbfaf6;
  color: #18463a;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover { background: #e9f0e9; }
button.primary { background: #086456; border-color: #086456; color: white; }
button.primary:hover { background: #074e43; }
button:disabled { cursor: wait; opacity: 0.6; }
:is(a, button, summary):focus-visible { outline: 2px solid #087c70; outline-offset: 3px; }
#map.exploring .maplibregl-canvas-container { cursor: crosshair; }
#map.route-planning .maplibregl-canvas-container { cursor: crosshair; }
body.game .panel { display: none; }

@media (max-width: 620px) {
  .panel { top: auto; bottom: 38px; left: 12px; width: min(350px, calc(100% - 24px)); }
  .station-panel { top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: 58dvh; padding: 12px 13px max(12px, env(safe-area-inset-bottom)); gap: 9px; border-radius: 15px 15px 0 0; }
  .station-panel.with-hiring { max-height: 42dvh; bottom: 43dvh; }
  .hiring-panel {
    top: auto; right: 0; bottom: 0; left: 0; width: 100%;
    max-height: 42dvh; padding: 12px 13px max(12px, env(safe-area-inset-bottom));
    border-radius: 15px 15px 0 0;
  }
  .vehicle-hiring-panel {
    top: auto; right: 0; bottom: 0; left: 0; width: 100%;
    max-height: 42dvh; padding: 12px 13px max(12px, env(safe-area-inset-bottom));
    border-radius: 15px 15px 0 0;
  }
  .station-emblem { flex-basis: 36px; height: 39px; }
  .station-heading h2 { font-size: 16px; }
  .station-capacity { padding: 9px 10px; }
  .station-sections { gap: 5px; }
  .station-sections button { min-height: 48px; }
  h1 { font-size: 19px; }
}
