:root {
  --bg: #080c13;
  --panel: #1c2533;
  --panel-2: #222d3d;
  --panel-3: #111923;
  --line: #344155;
  --line-soft: rgba(139, 159, 188, .18);
  --text: #f5f7fb;
  --muted: #96a1b3;
  --blue: #3879ef;
  --blue-soft: #2c5ba4;
  --green: #52e43e;
  --red: #ff433f;
  --orange: #ffb020;
  --purple: #b26cff;
  --shadow: 0 18px 50px rgba(0, 0, 0, .34);
  --header-h: 72px;
  --gold: #f6b62b;
  --gold-2: #ffd25a;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-width: 320px;
  overflow: hidden;
  color: var(--text);
  background: #0a1018;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.site-header {
  position: relative;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 28px);
  padding: 0 clamp(18px, 2.7vw, 52px);
  border-bottom: 1px solid rgba(246, 182, 43, .14);
  background: rgba(7, 8, 9, .97);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .32);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: #f5f0e8;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .045em;
}
.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name b { color: var(--gold); }
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(13px, 1.35vw, 24px);
  margin: 0 auto;
  color: #a8a8ad;
  font-size: 12px;
  font-weight: 800;
}
.main-nav a {
  padding: 27px 0 23px;
  border-bottom: 2px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  border-color: var(--gold);
}
.mobile-menu {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 0;
  background: transparent;
  font-size: 23px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.header-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.header-button:hover { transform: translateY(-1px); }
.header-button-ghost { color: #f4f4f6; background: rgba(255,255,255,.025); }
.header-button-ghost:hover { border-color: rgba(246,182,43,.55); }
.header-button-primary {
  color: #17130a;
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 8px 22px rgba(246,182,43,.16);
}

.map-page {
  height: calc(100vh - var(--header-h));
  padding: 10px;
  background: #7f98bb;
}
.map-app {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 10px;
}

.map-viewport {
  position: relative;
  min-width: 0;
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
  border: 1px solid #273649;
  border-radius: 12px;
  background: #7d96ba;
  box-shadow: var(--shadow);
}
.map-world {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center;
  will-change: transform;
  user-select: none;
  backface-visibility: hidden;
}
.map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  /* No CSS filter: filtered images are rasterised before zoom and become blurry. */
  filter: none;
}
.map-viewport.scheme-mode .map-image {
  opacity: 1;
}
.map-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, rgba(0, 0, 0, 0) 52%, rgba(7, 13, 21, .14) 100%),
    linear-gradient(rgba(10, 18, 28, .02), rgba(9, 17, 26, .06));
}
.zones-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.markers-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint;
}

.map-style-button,
.fullscreen-button,
.map-controls button,
.monitor-mobile-button {
  position: relative;
  z-index: 50;
  color: #10151d;
  border: 1px solid rgba(19, 28, 39, .22);
  border-radius: 4px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
  font-weight: 800;
}
.map-style-button {
  position: absolute;
  top: 14px;
  left: 14px;
  min-width: 94px;
  height: 42px;
  padding: 0 15px;
  font-size: 15px;
}
.map-controls {
  position: absolute;
  top: 66px;
  left: 14px;
  z-index: 50;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(20, 28, 38, .24);
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
}
.map-controls button {
  width: 42px;
  height: 40px;
  border: 0;
  border-bottom: 1px solid #d5dae0;
  border-radius: 0;
  box-shadow: none;
  font-size: 22px;
  font-weight: 500;
}
.map-controls button:last-child {
  border-bottom: 0;
  color: #263344;
  font-size: 19px;
}
.fullscreen-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 23px;
  font-weight: 500;
}
.monitor-mobile-button {
  display: none;
  position: absolute;
  top: 14px;
  right: 66px;
  height: 42px;
  padding: 0 14px;
}

.map-help {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 45;
  width: min(620px, calc(100% - 150px));
  padding: 24px 28px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 12px;
  background: rgba(10, 16, 24, .78);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
  backdrop-filter: blur(5px);
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: clamp(16px, 1.45vw, 22px);
  font-weight: 750;
  line-height: 1.35;
  opacity: 1;
  transition: opacity .25s ease, visibility .25s ease;
  pointer-events: none;
}
.map-help.hidden {
  opacity: 0;
  visibility: hidden;
}

.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 48;
  display: flex;
  align-items: center;
  gap: 0;
  max-width: calc(100% - 28px);
  overflow-x: auto;
  border: 1px solid rgba(168, 188, 215, .45);
  border-radius: 8px;
  background: rgba(12, 19, 28, .92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .27);
  scrollbar-width: none;
}
.map-legend::-webkit-scrollbar { display: none; }
.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  color: #f4f7fb;
  border-right: 1px solid rgba(152, 171, 198, .24);
  font-size: 11px;
  font-weight: 700;
}
.map-legend span:last-child { border-right: 0; }
.map-source {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 43;
  max-width: 360px;
  padding: 7px 10px;
  color: #c1cad7;
  border: 1px solid rgba(168, 188, 215, .28);
  border-radius: 5px;
  background: rgba(12, 19, 28, .82);
  font-size: 9px;
  text-align: right;
}
.map-source a { color: #dce6ff; text-decoration: underline; }

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: #0c131d;
}
.map-loading small { color: #9ba7b9; }
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #26364b;
  border-top-color: #6e8dff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.map-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(320px, calc(100% - 40px));
  padding: 24px;
  border: 1px solid #3a495e;
  border-radius: 12px;
  background: rgba(12, 19, 29, .95);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  text-align: center;
}
.map-empty span { color: #9ba7b9; font-size: 13px; }
.map-empty button {
  margin-top: 6px;
  padding: 9px 13px;
  color: #fff;
  border: 1px solid #415778;
  border-radius: 6px;
  background: #172235;
}

/*
 * V184: true vector markers in screen space.
 * No marker transform, no CSS mask and no hover scaling. Positions are snapped
 * to the physical-pixel grid in map.js, including Windows 125/150/175% scaling.
 */
.map-marker {
  --marker-color: var(--green);
  --marker-size: 12px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--marker-size);
  height: var(--marker-size);
  padding: 0;
  overflow: visible;
  color: var(--marker-color);
  border: 0;
  background: transparent;
  transform: none;
  pointer-events: auto;
  z-index: 10;
  contain: layout style;
}
.map-marker[hidden] { display: none; }
.map-marker.house-free { --marker-color: #58ee42; z-index: 10; }
.map-marker.house-occupied { --marker-color: #ff433f; z-index: 12; }
.map-marker.business { --marker-size: 16px; z-index: 18; }
.map-marker.farm,
.map-marker.workshop {
  --marker-size: 19px;
  z-index: 22;
}
.map-marker.farm { --marker-color: #f6c52f; }
.map-marker.workshop { --marker-color: #48bde8; }
.map-marker.farm .marker-glyph,
.map-marker.workshop .marker-glyph { inset: 0; }
.map-marker.business-fuel { --marker-color: #ff493f; }
.map-marker.business-food { --marker-color: #ffb020; }
.map-marker.business-shop { --marker-color: #7fe944; }
.map-marker.business-bar { --marker-color: #bd71ff; }
.map-marker.business-casino { --marker-color: #ffd338; }
.map-marker.business-auto,
.map-marker.business-service,
.map-marker.business-taxi,
.map-marker.business-rent { --marker-color: #50c8ff; }
.map-marker.business-clothes { --marker-color: #e67dff; }
.map-marker.business-target { --marker-color: #ff785f; }
.map-marker.business-bank { --marker-color: #4dd6a4; }
.map-marker.business-medical { --marker-color: #ff5a6a; }
.map-marker.business-hotel { --marker-color: #7f9dff; }
.map-marker.business-farm,
.map-marker.business-warehouse,
.map-marker.business-factory { --marker-color: #d5ad52; }
.map-marker.business-default { --marker-color: #f3bb38; }
.map-marker:hover,
.map-marker:focus-visible,
.map-marker.selected {
  z-index: 80;
}
.map-marker:hover .marker-svg path,
.map-marker:focus-visible .marker-svg path,
.map-marker.selected .marker-svg path {
  stroke: #ffffff;
  stroke-width: 2.8;
}
.marker-glyph {
  position: absolute;
  inset: 0;
  display: block;
  color: var(--marker-color);
  pointer-events: none;
}
.marker-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  shape-rendering: geometricPrecision;
}
.marker-svg path {
  fill: currentColor;
  stroke: #05070a;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  paint-order: stroke fill;
}
.marker-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  min-width: max-content;
  max-width: 300px;
  padding: 8px 11px;
  color: #fff;
  border: 1px solid rgba(206, 219, 238, .78);
  border-radius: 6px;
  background: rgba(7, 12, 19, .97);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  transform: translateX(-50%) translateY(4px);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s ease, visibility .12s ease, transform .12s ease;
  pointer-events: none;
}
.marker-tooltip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(206, 219, 238, .78);
  border-bottom: 1px solid rgba(206, 219, 238, .78);
  background: #080d15;
  transform: translate(-50%, -4px) rotate(45deg);
}
.map-marker:hover .marker-tooltip,
.map-marker:focus-visible .marker-tooltip,
.map-marker.selected .marker-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.turf-zone {
  position: absolute;
  color: #a95cff;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 32%, transparent);
  box-shadow: inset 0 0 12px color-mix(in srgb, currentColor 18%, transparent);
  pointer-events: auto;
}
.turf-zone:hover,
.turf-zone.selected {
  z-index: 20;
  outline: 2px solid rgba(255, 255, 255, .9);
  filter: brightness(1.25);
}

.legend-icon,
.category-icon,
.list-icon {
  --icon-url: url('/assets/map/icons/business-default.svg');
  --icon-color: #fff;
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.legend-icon::before,
.legend-icon::after,
.category-icon::before,
.category-icon::after,
.list-icon::before,
.list-icon::after {
  content: '';
  position: absolute;
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.legend-icon::before,
.category-icon::before,
.list-icon::before { inset: 0; background: #06080b; }
.legend-icon::after,
.category-icon::after,
.list-icon::after { inset: 2px; background: var(--icon-color); }
.icon-house-free { --icon-url: url('/assets/map/icons/house.svg'); --icon-color: #58ee42; }
.icon-house-occupied { --icon-url: url('/assets/map/icons/house.svg'); --icon-color: #ff433f; }
.icon-fuel { --icon-url: url('/assets/map/icons/business-fuel.svg'); --icon-color: #ff493f; }
.icon-food { --icon-url: url('/assets/map/icons/business-food.svg'); --icon-color: #ffb020; }
.icon-shop { --icon-url: url('/assets/map/icons/business-shop.svg'); --icon-color: #7fe944; }
.icon-bar { --icon-url: url('/assets/map/icons/business-bar.svg'); --icon-color: #bd71ff; }
.icon-default { --icon-url: url('/assets/map/icons/business-default.svg'); --icon-color: #f3bb38; }

/* Right monitoring panel. */
.monitor-panel {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #334154;
  border-radius: 18px;
  background: linear-gradient(180deg, #222c3a 0, #1b2431 100%);
  box-shadow: var(--shadow);
}
.monitor-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 13px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.monitor-kicker {
  display: block;
  margin-bottom: 4px;
  color: #8d98aa;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
}
.monitor-header h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -.015em;
}
.monitor-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: #b9c3d1;
  border: 0;
  border-radius: 10px;
  background: #2c3747;
  font-size: 25px;
}
.layer-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 12px 14px 6px;
}
.layer-switcher a {
  min-width: 0;
  padding: 8px 4px;
  overflow: hidden;
  color: #9da8b9;
  border: 1px solid #37465c;
  border-radius: 7px;
  background: #1a2330;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}
.layer-switcher a:hover,
.layer-switcher a.active {
  color: #fff;
  border-color: #3979db;
  background: #27446f;
}
.monitor-search {
  position: relative;
  margin: 8px 14px 6px;
}
.monitor-search span {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 2;
  color: #8e9aab;
  transform: translateY(-50%);
  font-size: 18px;
}
.monitor-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 36px;
  color: #fff;
  border: 1px solid #354359;
  border-radius: 8px;
  outline: 0;
  background: #141c27;
  font-size: 12px;
}
.monitor-search input:focus {
  border-color: #3979db;
  box-shadow: 0 0 0 3px rgba(57, 121, 219, .14);
}
.monitor-section {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line-soft);
}
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #9ba6b7;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .08em;
}
.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.category-button {
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 9px;
  color: #e6ebf3;
  border: 1px solid #37609b;
  border-radius: 8px;
  background: #21385b;
  font-size: 11px;
  font-weight: 780;
}
.category-button:hover,
.category-button.active {
  border-color: #4e8df0;
  background: #2c568c;
  box-shadow: inset 0 0 0 1px rgba(105, 158, 240, .13);
}
.category-button .category-icon { width: 16px; height: 16px; }
.sort-section select {
  width: 100%;
  height: 39px;
  padding: 0 12px;
  color: #f1f4f8;
  border: 1px solid #2f3b4d;
  border-radius: 8px;
  outline: none;
  background: #121923;
  font-size: 11px;
  font-weight: 700;
}
.monitor-summary {
  min-height: 26px;
  padding: 9px 16px 5px;
  color: #8995a7;
  font-size: 10px;
}
.monitor-list {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding: 5px 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: #3d4a5e transparent;
}
.monitor-card {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  color: #fff;
  border: 1px solid #354254;
  border-radius: 11px;
  background: #252e3b;
  text-align: left;
  transition: border-color .13s ease, background .13s ease, transform .13s ease;
}
.monitor-card:hover {
  border-color: #53677f;
  background: #293544;
  transform: translateY(-1px);
}
.monitor-card.active {
  border-color: #4a85df;
  background: #283e5d;
  box-shadow: inset 0 0 0 1px rgba(80, 139, 229, .18);
}
.monitor-card .list-icon {
  width: 25px;
  height: 25px;
}
.monitor-card-content { min-width: 0; }
.monitor-card h3 {
  margin: 0 0 4px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor-card p {
  margin: 0;
  overflow: hidden;
  color: #9da8b8;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor-card-price {
  max-width: 88px;
  color: #32d89d;
  font-size: 10px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}
.monitor-card-price.occupied { color: #ff6c68; }
.monitor-card-price.turf { color: #c393ff; }
.monitor-footer {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line-soft);
  background: #1b2431;
}
.monitor-footer button {
  min-height: 39px;
  color: #eaf0fa;
  border: 1px solid #3d536f;
  border-radius: 8px;
  background: #27384d;
  font-size: 11px;
  font-weight: 800;
}
.monitor-footer button:disabled {
  cursor: not-allowed;
  color: #707c8e;
  border-color: #303b4a;
  background: #202936;
}
.monitor-footer .refresh-button { font-size: 19px; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 400;
  padding: 12px 16px;
  color: #fff;
  border: 1px solid #41536b;
  border-radius: 8px;
  background: #172333;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(90px);
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: none; }

.map-app:fullscreen,
.map-app:-webkit-full-screen {
  padding: 10px;
  background: #7f98bb;
}
.map-app:fullscreen .map-viewport,
.map-app:-webkit-full-screen .map-viewport { height: 100%; }

@media (max-width: 1120px) {
  .header-actions .header-button-primary { display: none; }
  .map-app { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 860px) {
  body { overflow: hidden; }
  .site-header { padding: 0 14px; gap: 12px; }
  .mobile-menu { display: block; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 240;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(246,182,43,.18);
    background: #090a0b;
    box-shadow: 0 18px 38px rgba(0,0,0,.45);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 11px; border-bottom: 1px solid #1b2532; }
  .header-actions { margin-left: auto; }
  .header-actions .header-button { min-height: 36px; padding: 0 12px; }
  .map-page { padding: 6px; }
  .map-app { display: block; }
  .map-viewport { height: 100%; border-radius: 9px; }
  .monitor-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 300;
    height: min(82vh, 720px);
    border-radius: 16px;
    transform: translateY(calc(100% + 20px));
    transition: transform .22s ease;
  }
  .monitor-panel.open { transform: none; }
  .monitor-close { transform: rotate(90deg); }
  .monitor-mobile-button { display: block; }
  .map-legend { right: 14px; max-width: calc(100% - 28px); }
  .map-source { display: none; }
}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .header-actions { display: none; }
  .map-help {
    width: calc(100% - 60px);
    padding: 18px;
    font-size: 15px;
  }
  .map-style-button { min-width: 82px; height: 38px; }
  .fullscreen-button { width: 38px; height: 38px; }
  .monitor-mobile-button { right: 59px; height: 38px; }
  .map-controls { top: 59px; }
  .map-controls button { width: 38px; height: 36px; }
  .map-legend span { min-height: 38px; padding: 0 10px; font-size: 9px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .monitor-panel { height: min(87vh, 720px); }
  .layer-switcher { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 861px) {
  .map-app {
    transition: grid-template-columns .22s ease;
  }
  .map-app.monitor-collapsed {
    grid-template-columns: minmax(0, 1fr) 0;
  }
  .map-app.monitor-collapsed .monitor-panel {
    opacity: 0;
    transform: translateX(112%);
    pointer-events: none;
  }
  .map-app.monitor-collapsed .monitor-mobile-button {
    display: block;
  }
  .monitor-panel {
    transition: opacity .2s ease, transform .22s ease;
  }
}

@media (max-width: 1300px) and (min-width: 861px) {
  .map-source { display: none; }
}
