* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: rgba(12, 12, 13, 0.92);
  --text: #f7f7f8;
  --muted: #b9b9be;
  --blue: #2c3efe;
  --green: #00e16a;
  --yellow: #f0ca58;
  --red: #ff5068;
  --ui-border: rgba(255, 255, 255, 0.055);
  --ui-border-hover: rgba(255, 255, 255, 0.09);
  --ui-divider: rgba(255, 255, 255, 0.028);
  --ui-surface: rgba(255, 255, 255, 0.022);
  --ui-surface-hover: rgba(255, 255, 255, 0.038);
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  background: var(--bg);
}

body {
  overflow: hidden;
  color: var(--text);
  font-family: "Onest", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(44, 62, 254, 0.025), transparent 37%),
    #030303;
}

.topbar {
  position: absolute;
  z-index: 5;
  inset: 0 0 auto;
  min-height: 104px;
  pointer-events: none;
}

.brand {
  position: absolute;
  top: 31px;
  left: clamp(24px, 2.7vw, 44px);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  pointer-events: auto;
}

.brand-logo {
  display: block;
  width: clamp(108px, 9vw, 132px);
  height: auto;
}

.system-status {
  position: absolute;
  top: 32px;
  left: 50%;
  width: min(420px, 48vw);
  transform: translateX(-50%);
  text-align: center;
  opacity: 1;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 220ms ease;
  will-change: transform, opacity;
}

.system-status h1 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.system-status p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  color: #ececef;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.bullet {
  color: #aaaab0;
}

.map-stage {
  position: absolute;
  inset: 48px 0 52px;
  display: grid;
  place-items: center;
  overflow: visible;
  transition: opacity 260ms ease, transform 540ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform, opacity;
}

.map-halo {
  display: none;
}

.russia-map {
  position: relative;
  z-index: 1;
  display: block;
  width: min(99vw, 1450px);
  height: min(88vh, 800px);
  border: 0;
  background: transparent !important;
  background-color: transparent !important;
  color-scheme: normal;
  object-fit: contain;
  overflow: visible;
  transform: translate3d(0, -22px, 0);
  will-change: transform;
}

.app-shell.is-search-open .map-stage {
  opacity: 1;
  transform: translate3d(min(215px, 16vw), 0, 0);
}

.app-shell.is-search-open .system-status {
  opacity: 1;
  transform: translateX(calc(-50% + min(215px, 16vw)));
}

.search-panel {
  position: absolute;
  z-index: 4;
  inset: 0 auto 0 0;
  display: block;
  width: min(430px, 34vw);
  padding: 112px 26px 104px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #050506;
  opacity: 0;
  transform: translateX(-100%);
  pointer-events: none;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
  will-change: transform, opacity;
  scrollbar-width: thin;
  scrollbar-color: #242428 transparent;
}

.app-shell.is-search-open .search-panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.search-panel__header {
  width: 100%;
  margin: 0 0 26px;
}

.search-panel h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 160ms ease, background 160ms ease;
}

.search-field:focus-within {
  border-color: rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.04);
}

.search-field svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: #8f8f96;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f7f7f8;
  font: inherit;
  font-size: 16px;
}

.search-field input::placeholder {
  color: #68686f;
}

.traffic-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  width: 100%;
  margin: 18px 0 24px;
  color: #a0a0a6;
  font-size: 12px;
}

.traffic-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.risk-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}

.risk-dot--green { color: var(--green); }
.risk-dot--yellow { color: var(--yellow); }
.risk-dot--red { color: var(--red); }

.search-panel__meta {
  width: 100%;
  min-height: 20px;
  margin: 0 0 12px;
  color: #78787f;
  font-size: 12px;
}

.region-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 2px 0 12px;
}

.region-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 16px 16px 15px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 16px;
  outline: 0;
  background: rgba(255, 255, 255, 0.018);
  color: #f4f4f5;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.region-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.032);
}

.region-card:active {
  transform: scale(0.992);
}

.region-card.is-selected {
  border-color: rgba(255, 255, 255, 0.19);
  background: rgba(255, 255, 255, 0.045);
}

.region-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.region-card__name {
  min-width: 0;
  overflow: hidden;
  color: #f7f7f8;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-card__dot {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  border-width: 2px;
}

.region-card__threats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
}

.threat-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.threat-tag--red {
  border-color: rgba(255, 80, 104, 0.2);
  background: rgba(255, 80, 104, 0.07);
  color: #ff8a9a;
}

.threat-tag--yellow {
  border-color: rgba(240, 202, 88, 0.2);
  background: rgba(240, 202, 88, 0.065);
  color: #efd57c;
}

.region-card__clear {
  color: #85858c;
  font-size: 13px;
  line-height: 1.3;
}

.region-card__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  color: #717178;
  font-size: 11.5px;
  line-height: 1;
}

.region-card__status {
  color: #9a9aa1;
}

.region-card__separator {
  color: #45454b;
}

.region-card__time {
  color: #68686f;
}

.region-results__empty {
  margin: 22px 4px;
  color: #74747b;
  font-size: 13px;
  text-align: center;
}

.bottom-nav {
  position: absolute;
  z-index: 8;
  bottom: clamp(34px, 4.3vh, 46px);
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(380px, calc(100vw - 40px));
  height: 58px;
  padding: 4px 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.028);
  border-radius: 28px;
  background: rgba(11, 11, 12, 0.94);
  box-shadow:
    0 12px 38px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.bottom-nav::after {
  content: 'РуКарта 2026';
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(224, 225, 230, 0.38);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.035em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.bottom-nav__disclaimer {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  padding: 0;
  transform: translateX(-50%);
  border: 0;
  outline: 0;
  background: transparent;
  color: rgba(206, 207, 214, 0.27);
  font: inherit;
  font-size: 8.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.015em;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 140ms ease;
}

.bottom-nav__disclaimer:hover,
.bottom-nav__disclaimer:focus-visible {
  color: rgba(224, 225, 231, 0.56);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 2px 10px 1px;
  border: 0;
  border-radius: 20px;
  outline: 0;
  background: transparent;
  color: #f4f4f5;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.025em;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.025);
}

.nav-item:active {
  transform: scale(0.97);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.is-active {
  color: var(--blue);
}

@media (max-width: 720px) {
  .app-shell {
    min-height: 520px;
  }

  .brand {
    top: 20px;
    left: 18px;
    font-size: 21px;
  }

  .brand-logo {
    width: 108px;
  }

  .system-status {
    top: 72px;
    width: calc(100vw - 36px);
  }

  .map-stage {
    inset: 112px 4px 85px;
  }

  .russia-map {
    width: 112vw;
    height: 72vh;
  }

  .app-shell.is-search-open .map-stage {
    opacity: 0.28;
    transform: translate3d(18vw, 0, 0) scale(0.98);
  }

  .app-shell.is-search-open .system-status {
    opacity: 0;
    transform: translateX(-50%) translateY(-8px);
  }

  .search-panel {
    width: min(88vw, 390px);
    padding: 104px 18px 96px;
  }

  .bottom-nav {
    bottom: 18px;
    height: 60px;
  }
}

@media (max-height: 620px) and (min-width: 721px) {
  .map-stage {
    top: 62px;
    bottom: 66px;
  }

  .russia-map {
    height: 80vh;
  }

  .bottom-nav {
    bottom: 14px;
  }
}

/* Map-first workspace */
.app-shell.is-search-open .map-stage {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.app-shell.is-search-open .system-status {
  opacity: 1;
  transform: translateX(-50%);
}

.search-panel {
  z-index: 7;
  inset: 96px auto auto 24px;
  display: flex;
  width: min(360px, calc(100vw - 48px));
  max-height: min(560px, calc(100dvh - 210px));
  padding: 18px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 20px;
  background: rgba(7, 7, 8, 0.96);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 170ms ease, transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-shell.is-search-open .search-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.search-panel__header {
  margin: 0 0 16px;
}

.search-panel h2 {
  font-size: 23px;
  letter-spacing: -0.04em;
}

.search-panel__header p {
  margin: 6px 0 0;
  color: #77777e;
  font-size: 13px;
}

.search-field {
  min-height: 52px;
  border-radius: 12px;
  background: #0e0e10;
}

.search-panel__meta {
  min-height: auto;
  margin: 12px 2px 8px;
  font-size: 12px;
}

.region-results {
  gap: 0;
  max-height: 350px;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #29292d transparent;
}

.region-card {
  display: flex;
  min-height: 48px;
  padding: 0 10px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0;
  background: transparent;
  transition: background 140ms ease, color 140ms ease;
}

.region-card:first-child {
  border-top: 0;
}

.region-card:hover,
.region-card.is-selected {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.045);
}

.region-card:active {
  transform: none;
}

.region-card__name {
  overflow: visible;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-overflow: clip;
  white-space: normal;
}

.region-card__arrow {
  flex: 0 0 auto;
  color: #68686f;
  font-size: 16px;
}

.region-results__empty {
  margin: 16px 4px 6px;
  text-align: left;
}

.map-legend {
  position: absolute;
  z-index: 6;
  left: 24px;
  bottom: 102px;
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 8px 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 13px;
  background: rgba(8, 8, 9, 0.9);
  color: #b8b8bd;
  font-size: 11.5px;
}

.map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--legend-color);
  white-space: nowrap;
}

.map-legend__item > span {
  color: #b8b8bd;
}

.map-legend__icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-legend__item--special-status {
  --legend-color: #e05a67;
}

.map-legend__border-sample {
  width: 17px;
  height: 12px;
  flex: 0 0 auto;
  border: 1.5px dashed #e05a67;
  border-radius: 4px;
}

.region-panel__threat-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  background: transparent;
  color: var(--threat-color);
}

.region-panel__threat-svg {
  width: 28px;
  height: 28px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-controls {
  position: absolute;
  z-index: 6;
  right: 24px;
  bottom: 102px;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(8, 8, 9, 0.92);
  transition: right 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.map-controls button {
  display: grid;
  width: 42px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #d9d9dc;
  cursor: pointer;
  font-size: 22px;
}

.map-controls button:first-child {
  border-top: 0;
}

.map-controls button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.map-controls svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.region-panel {
  position: absolute;
  z-index: 7;
  top: 18px;
  right: 18px;
  bottom: 92px;
  width: min(390px, calc(100vw - 36px));
  padding: 24px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 24px;
  background: rgba(7, 7, 8, 0.97);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateX(calc(100% + 28px));
  pointer-events: none;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
  scrollbar-width: thin;
  scrollbar-color: #29292d transparent;
}

.app-shell.is-details-open .region-panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.app-shell.is-details-open .map-stage {
  transform: translate3d(-150px, 0, 0);
}

.app-shell.is-details-open .system-status {
  transform: translateX(calc(-50% - 120px));
}

.app-shell.is-details-open .map-controls {
  right: min(430px, 42vw);
}

.region-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.region-panel__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: #717178;
  font-size: 12px;
}

.region-panel h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.region-panel__hide {
  padding: 7px 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.045);
  color: #9f9fa5;
  cursor: pointer;
  font-size: 12px;
}

.region-panel__hide:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.075);
}

.region-panel__state {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.065);
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.region-panel__status-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.region-panel__state div {
  display: grid;
  gap: 4px;
}

.region-panel__state strong {
  font-size: 15px;
  font-weight: 600;
}

.region-panel__state span:last-child {
  color: #73737a;
  font-size: 12px;
}

.region-panel__section {
  padding: 21px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.region-panel__section h3 {
  margin: 0 0 12px;
  color: #85858c;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.region-panel__threats {
  display: grid;
  gap: 8px;
}

.region-panel__threat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.region-panel__threat span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.region-panel__threat strong {
  font-size: 14px;
  font-weight: 500;
}

.region-panel__clear,
.region-panel__placeholder {
  color: #8b8b92;
  font-size: 13px;
  line-height: 1.5;
}

.region-panel__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.region-panel__facts div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.region-panel__facts span {
  color: #73737a;
  font-size: 11px;
}

.region-panel__facts strong {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 720px) {
  .app-shell.is-search-open .map-stage {
    opacity: 1;
    transform: none;
  }

  .app-shell.is-search-open .system-status {
    opacity: 1;
    transform: translateX(-50%);
  }

  .search-panel {
    inset: 84px 12px auto;
    width: auto;
    max-height: 54dvh;
    padding: 16px;
  }

  .map-legend {
    left: 12px;
    right: 12px;
    bottom: 92px;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    font-size: 11px;
  }

  .map-controls {
    right: 12px;
    bottom: 146px;
  }

  .region-panel {
    top: auto;
    right: 10px;
    bottom: 82px;
    left: 10px;
    width: auto;
    max-height: 58dvh;
    padding: 20px;
    border-radius: 22px;
    transform: translateY(calc(100% + 28px));
  }

  .app-shell.is-details-open .region-panel {
    transform: translateY(0);
  }

  .app-shell.is-details-open .map-stage,
  .app-shell.is-details-open .system-status {
    transform: none;
  }

  .app-shell.is-details-open .map-controls,
  .app-shell.is-details-open .map-legend {
    opacity: 0;
    pointer-events: none;
  }
}

/* Refined tab layout */
.search-panel__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #66666d;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.search-panel h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.search-panel__header p {
  max-width: 310px;
  margin: 9px 0 0;
  color: #7e7e85;
  font-size: 13px;
  line-height: 1.45;
}

.region-panel {
  border-radius: 0;
  box-shadow: none;
}

.region-panel__hide {
  padding: 5px 0;
  border-radius: 0;
  background: transparent;
  color: #77777e;
}

.region-panel__hide:hover {
  background: transparent;
  color: #fff;
}

.region-panel__threat {
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.region-panel__threat:last-child {
  border-bottom: 0;
}

.region-panel__facts {
  display: block;
}

.region-panel__facts div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.region-panel__facts div:last-child {
  border-bottom: 0;
}

.region-panel__facts strong {
  max-width: 190px;
  text-align: right;
}

@media (min-width: 721px) {
  .search-panel {
    inset: 0 auto 0 0;
    width: min(400px, 32vw);
    max-height: none;
    padding: 112px 24px 100px 28px;
    overflow: hidden;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    background: #050506;
    box-shadow: none;
    transform: translateX(-100%);
    transform-origin: center left;
  }

  .app-shell.is-search-open .search-panel {
    transform: translateX(0);
  }

  .search-panel__header {
    margin-bottom: 22px;
  }

  .search-field {
    min-height: 54px;
    border-radius: 12px;
  }

  .search-panel__meta {
    margin: 16px 2px 8px;
  }

  .region-results {
    max-height: none;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
  }

  .region-card {
    min-height: 52px;
    padding: 0 8px 0 4px;
  }

  .region-card__name {
    font-size: 14.5px;
  }

  .app-shell.is-search-open .map-stage {
    transform: translate3d(min(190px, 15vw), 0, 0) scale(0.98);
  }

  .app-shell.is-search-open .system-status {
    transform: translateX(calc(-50% + min(170px, 13vw)));
  }

  .app-shell.is-search-open .map-legend {
    left: calc(min(400px, 32vw) + 24px);
  }

  .region-panel {
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 32vw);
    padding: 112px 28px 98px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
    background: #050506;
    transform: translateX(100%);
  }

  .app-shell.is-details-open .region-panel {
    transform: translateX(0);
  }

  .app-shell.is-details-open .map-stage {
    transform: translate3d(max(-190px, -15vw), 0, 0) scale(0.98);
  }

  .app-shell.is-details-open .system-status {
    transform: translateX(calc(-50% - min(170px, 13vw)));
  }

  .app-shell.is-details-open .map-controls {
    right: calc(min(400px, 32vw) + 24px);
  }

  .app-shell.is-search-open.is-details-open .map-stage {
    transform: scale(0.9);
  }

  .app-shell.is-search-open.is-details-open .system-status {
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  .search-panel {
    inset: 0 auto 0 0;
    width: min(78vw, 360px);
    max-height: none;
    padding: 104px 18px 92px;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    background: #050506;
    box-shadow: none;
    transform: translateX(-100%);
  }

  .app-shell.is-search-open .search-panel {
    transform: translateX(0);
  }

  .app-shell.is-search-open .map-stage {
    opacity: 1;
    transform: translate3d(22vw, 0, 0) scale(0.96);
  }

  .region-results {
    max-height: none;
    min-height: 0;
    flex: 1;
  }

  .region-panel {
    border-radius: 20px 20px 0 0;
  }
}

/* Full-bleed map + soft edge treatment */
.app-shell::before,
.app-shell::after {
  content: '';
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  height: 130px;
  pointer-events: none;
}

.app-shell::before {
  top: 0;
  background: linear-gradient(to bottom, #030303 0%, rgba(3, 3, 3, 0.92) 28%, rgba(3, 3, 3, 0) 100%);
}

.app-shell::after {
  bottom: 0;
  background: linear-gradient(to top, #030303 0%, rgba(3, 3, 3, 0.9) 30%, rgba(3, 3, 3, 0) 100%);
}

.map-stage {
  inset: 0;
  overflow: hidden;
}

.russia-map {
  width: min(104vw, 1540px);
  height: min(100vh, 920px);
  transform: none;
}

/* Cleaner search tab */
.search-panel__eyebrow {
  display: none;
}

.search-panel__header {
  margin-bottom: 20px;
}

.search-panel h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
}

.search-panel__header p {
  margin: 9px 0 0;
  color: #6f6f76;
  font-size: 14px;
  line-height: 1.35;
}

.search-field {
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: #0b0b0d;
}

.search-field:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
  background: #0d0d0f;
}

.search-field input {
  font-size: 16px;
  letter-spacing: -0.015em;
}

.search-panel__meta {
  margin: 22px 0 8px;
  padding: 0 2px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #707077;
  font-size: 12px;
}

.region-results {
  gap: 0;
  padding: 0;
}

.region-card {
  min-height: 50px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 0;
  background: transparent;
}

.region-card:hover {
  border-color: rgba(255, 255, 255, 0.045);
  background: rgba(255, 255, 255, 0.028);
}

.region-card.is-selected {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(44, 62, 254, 0.08);
}

.region-card__name {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.region-card__arrow {
  display: none;
}

@media (min-width: 721px) {
  .search-panel {
    width: min(390px, 31vw);
    padding: 34px 24px 96px 26px;
  }

  .app-shell.is-search-open .map-stage {
    transform: translate3d(min(180px, 14vw), 0, 0) scale(0.985);
  }

  .app-shell.is-search-open .system-status {
    transform: translateX(calc(-50% + min(160px, 12vw)));
  }

  .app-shell.is-search-open .map-legend {
    left: calc(min(390px, 31vw) + 24px);
  }

  .app-shell.is-search-open.is-details-open .map-stage {
    transform: scale(0.92);
  }
}

@media (max-width: 720px) {
  .map-stage {
    inset: 0;
  }

  .russia-map {
    width: 118vw;
    height: 92vh;
  }

  .app-shell::before,
  .app-shell::after {
    height: 112px;
  }

  .search-panel {
    width: min(84vw, 370px);
    padding: 28px 18px 92px;
  }

  .search-panel h2 {
    font-size: 32px;
  }

  .app-shell.is-search-open .map-stage {
    transform: translate3d(24vw, 0, 0) scale(0.97);
  }
}

/* Unified side panels */
.search-panel,
.region-panel {
  font-family: 'Onest', sans-serif;
}

.region-results {
  display: block;
  align-content: start;
}

.region-card {
  display: grid;
  width: 100%;
  min-height: 66px;
  padding: 11px 4px 12px;
  gap: 7px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 0;
  background: transparent;
  text-align: left;
  transition: background 120ms ease, padding 120ms ease;
}

.region-card:hover {
  padding-left: 10px;
  padding-right: 10px;
  background: rgba(255, 255, 255, 0.028);
}

.region-card.is-selected {
  padding-left: 10px;
  padding-right: 10px;
  background: rgba(44, 62, 254, 0.075);
}

.region-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.region-card__name {
  min-width: 0;
  color: #f3f3f5;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.region-card__updated {
  flex: 0 0 auto;
  color: #5f5f66;
  font-size: 10.5px;
  font-weight: 400;
  white-space: nowrap;
}

.region-card__details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.region-card__threat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--threat-color);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.region-card__threat-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.region-card__threat > span {
  color: #8c8c93;
}

.region-card__threat--clear > span {
  color: #7f9d8d;
}

.region-card.is-selected .region-card__threat > span {
  color: #c6c8d4;
}

.region-panel__header {
  display: block;
  margin: 0;
  padding: 0 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.region-panel__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.region-panel__eyebrow {
  margin: 0;
  color: #6f6f76;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.region-panel h2 {
  margin: 0;
  max-width: 310px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.region-panel__hide {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: #85858c;
}

.region-panel__hide:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
}

.region-panel__hide svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.region-panel__state {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 19px;
  padding: 0;
  border: 0;
}

.region-panel__status-dot {
  width: 10px;
  height: 10px;
}

.region-panel__state div {
  gap: 3px;
}

.region-panel__state strong {
  font-size: 14px;
  font-weight: 500;
}

.region-panel__state span:last-child {
  font-size: 11.5px;
}

.region-panel__section {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.region-panel__section h3,
.region-panel__section-head h3 {
  margin: 0 0 13px;
  color: #a0a0a6;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
}

.region-panel__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.region-panel__section-head h3 {
  margin-bottom: 13px;
}

.region-panel__count {
  min-width: 24px;
  height: 22px;
  margin-bottom: 11px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: #b9b9bf;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}

.region-panel__threats {
  gap: 0;
}

.region-panel__threat {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--threat-color);
}

.region-panel__threat:last-child {
  border-bottom: 0;
}

.region-panel__threat strong {
  color: #dedee2;
  font-size: 13px;
  font-weight: 500;
}

.region-panel__clear {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: #7f9d8d;
}

.region-panel__clear-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #29d67d;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.region-panel__detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.region-panel__detail-row span {
  color: #77777e;
  font-size: 12px;
}

.region-panel__detail-row strong {
  max-width: 210px;
  color: #d8d8dc;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  text-align: right;
}

.region-panel__placeholder {
  max-width: 310px;
  color: #73737a;
  font-size: 13px;
  line-height: 1.5;
}

@media (min-width: 721px) {
  .search-panel,
  .region-panel {
    width: min(390px, 31vw);
    padding: 34px 24px 96px 26px;
  }

  .region-panel {
    padding-left: 26px;
    padding-right: 26px;
  }
}

@media (max-width: 720px) {
  .region-card {
    min-height: 60px;
  }

  .region-panel h2 {
    font-size: 28px;
  }
}

/* Map display settings */
.map-settings {
  position: absolute;
  z-index: 8;
  right: 78px;
  bottom: 102px;
  width: min(370px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 22px;
  background: rgba(10, 10, 11, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 190ms cubic-bezier(0.2, 0.8, 0.2, 1),
    right 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.map-settings.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.map-settings__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 7px 13px 9px;
}

.map-settings h2 {
  margin: 0;
  color: #f5f5f7;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.map-settings__header p {
  margin: 4px 0 0;
  color: #6f6f76;
  font-size: 11.5px;
  line-height: 1.35;
}

.map-settings__close {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  color: #8e8e95;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}

.map-settings__close:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  transform: scale(1.04);
}

.map-settings__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.map-settings__list {
  display: grid;
  gap: 7px;
}

.map-setting {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.026);
  cursor: pointer;
  transition: background 130ms ease, border-color 130ms ease, transform 130ms ease;
}

.map-setting:hover {
  border-color: rgba(255, 255, 255, 0.085);
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.map-setting__icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: #b4b5bd;
}

.map-setting__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-setting__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.map-setting__copy strong {
  color: #f0f0f2;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.map-setting__copy > span {
  max-width: 218px;
  color: #727279;
  font-size: 11px;
  line-height: 1.35;
}

.map-switch {
  position: relative;
  flex: 0 0 auto;
}

.map-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.map-switch__track {
  display: block;
  position: relative;
  width: 40px;
  height: 23px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 999px;
  background: #25262b;
  transition: background 150ms ease, border-color 150ms ease;
}

.map-switch__track > span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #8c8e97;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  transition: transform 170ms cubic-bezier(0.2, 0.8, 0.2, 1), background 150ms ease;
}

.map-switch input:checked + .map-switch__track {
  border-color: rgba(107, 122, 255, 0.38);
  background: rgba(68, 84, 220, 0.62);
}

.map-switch input:checked + .map-switch__track > span {
  transform: translateX(17px);
  background: #f5f6ff;
}

.map-switch input:focus-visible + .map-switch__track {
  outline: 2px solid rgba(108, 126, 255, 0.72);
  outline-offset: 2px;
}

.map-settings__note {
  margin: 10px 8px 2px;
  color: #55565d;
  font-size: 10px;
  line-height: 1.35;
}

#mapSettingsButton.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.app-shell.is-details-open .map-settings {
  right: min(514px, calc(42vw + 64px));
}

@media (min-width: 1100px) {
  .app-shell.is-details-open .map-settings {
    right: calc(min(400px, 32vw) + 78px);
  }
}

@media (max-width: 720px) {
  .map-settings {
    right: 12px;
    bottom: 146px;
    width: min(370px, calc(100vw - 24px));
    padding: 10px;
    border-radius: 20px;
  }

  .map-setting {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 10px;
  }

  .map-setting__icon {
    width: 34px;
    height: 34px;
  }

  .app-shell.is-details-open .map-settings {
    opacity: 0;
    pointer-events: none;
  }
}

/* Search panel — compact clean layout */
.search-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #060607;
}

.search-panel__top {
  flex: 0 0 auto;
  padding-bottom: 10px;
}

.search-panel__header {
  margin: 0 0 16px;
}

.search-panel h2 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.search-panel__header p {
  margin: 7px 0 0;
  color: #66676e;
  font-size: 12.5px;
  line-height: 1.35;
}

.search-field {
  min-height: 50px;
  padding: 0 14px;
  gap: 10px;
  border-color: rgba(255, 255, 255, 0.075);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
}

.search-field:hover {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.036);
}

.search-field:focus-within {
  border-color: rgba(117, 130, 255, 0.52);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(74, 91, 230, 0.08);
}

.search-field svg {
  width: 18px;
  height: 18px;
  stroke: #777981;
  stroke-width: 1.9;
}

.search-field input {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.search-field input::placeholder {
  color: #5f6067;
}

.search-panel__meta {
  min-height: 0;
  margin: 13px 2px 4px;
  padding: 0;
  border: 0;
  color: #5d5e65;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.region-results {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 1px 20px 0;
  scrollbar-width: thin;
  scrollbar-color: #2b2c31 transparent;
}

.region-card {
  display: grid;
  width: 100%;
  min-height: 68px;
  padding: 11px 12px 10px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.018);
  transition:
    background 130ms ease,
    border-color 130ms ease,
    transform 130ms ease;
}

.region-card:hover {
  padding-left: 12px;
  padding-right: 12px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.038);
  transform: translateY(-1px);
}

.region-card:active {
  transform: scale(0.993);
}

.region-card.is-selected {
  padding-left: 12px;
  padding-right: 12px;
  border-color: rgba(95, 111, 255, 0.26);
  background: rgba(65, 80, 210, 0.10);
}

.region-card__header {
  align-items: flex-start;
  gap: 12px;
}

.region-card__name {
  color: #f1f1f3;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.region-card__updated {
  padding-top: 2px;
  color: #55565d;
  font-size: 9.5px;
  line-height: 1.2;
}

.region-card__details {
  gap: 5px;
}

.region-card__threat {
  gap: 4px;
  padding: 4px 7px 4px 6px;
  border: 1px solid color-mix(in srgb, var(--threat-color) 22%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--threat-color) 9%, transparent);
  font-size: 10.5px;
}

.region-card__threat-icon {
  width: 13px;
  height: 13px;
  stroke-width: 1.85;
}

.region-card__threat > span {
  color: color-mix(in srgb, var(--threat-color) 72%, #d8d8dc);
}

.region-card__threat--clear {
  border-color: rgba(104, 150, 127, 0.13);
  background: rgba(91, 129, 111, 0.07);
}

.region-card__threat--clear > span {
  color: #799889;
}

.region-card.is-selected .region-card__threat > span {
  color: #d8d9e2;
}

.region-results__empty {
  margin-top: 8px;
  padding: 20px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  color: #66676d;
  font-size: 12px;
  text-align: center;
}

@media (min-width: 721px) {
  .search-panel {
    width: min(420px, 33vw);
    padding: 32px 20px 92px 22px;
  }
}

@media (max-width: 720px) {
  .search-panel {
    width: min(94vw, 420px);
    padding: 26px 16px 88px 18px;
  }

  .search-panel h2 {
    font-size: 31px;
  }

  .search-panel__header {
    margin-bottom: 15px;
  }

  .region-card {
    min-height: 72px;
  }
}

/* Search panel visual weight fixes */
.search-panel__top {
  padding-bottom: 12px;
}

.search-panel h2 {
  font-size: 32px;
}

.search-field {
  min-height: 54px;
  padding: 0 15px;
  border-color: rgba(255, 255, 255, 0.095);
  background: rgba(255, 255, 255, 0.034);
}

.search-field input {
  font-size: 15px;
}

.search-panel__meta {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 11px;
}

.region-results {
  gap: 8px;
  padding: 4px 8px 22px 0;
  scrollbar-gutter: stable;
}

.region-results::-webkit-scrollbar {
  width: 6px;
}

.region-results::-webkit-scrollbar-track {
  background: transparent;
}

.region-results::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.region-card {
  min-height: 76px;
  padding: 13px 14px 12px;
  gap: 9px;
  border-color: rgba(255, 255, 255, 0.065);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.018);
}

.region-card:hover {
  padding-left: 14px;
  padding-right: 14px;
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.048);
}

.region-card.is-selected {
  padding-left: 14px;
  padding-right: 14px;
  border-color: rgba(95, 111, 255, 0.34);
  background: rgba(65, 80, 210, 0.13);
}

.region-card__name {
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.24;
}

.region-card__updated {
  padding-top: 3px;
  font-size: 10.5px;
  color: #62636b;
}

.region-card__details {
  gap: 6px;
}

.region-card__threat {
  padding: 5px 8px 5px 7px;
  font-size: 11.5px;
}

.region-card__threat-icon {
  width: 14px;
  height: 14px;
}

@media (max-width: 720px) {
  .region-results {
    padding-right: 7px;
  }

  .region-card {
    min-height: 74px;
    padding: 12px 13px 11px;
  }

  .region-card:hover,
  .region-card.is-selected {
    padding-left: 13px;
    padding-right: 13px;
  }

  .region-card__name {
    font-size: 15px;
  }
}

@media (min-width: 721px) {
  .app-shell.is-search-open .map-stage {
    transform: translate3d(min(200px, 15vw), 0, 0) scale(0.985);
  }

  .app-shell.is-search-open .system-status {
    transform: translateX(calc(-50% + min(180px, 13vw)));
  }

  .app-shell.is-search-open .map-legend {
    left: calc(min(420px, 33vw) + 24px);
  }
}

/* Region card bottom spacing / no clipping */
.region-card {
  flex: 0 0 auto;
  height: auto;
  overflow: visible;
  padding-bottom: 16px;
  border-bottom: 0;
}

.region-card__details {
  position: relative;
  z-index: 1;
  padding-bottom: 1px;
}

.region-results {
  align-content: flex-start;
  padding-bottom: 32px;
}

/* Search typography + cleaner status chips */
.search-panel__header p,
.search-panel__meta,
.region-card__updated,
.region-card__threat {
  font-weight: 500;
}

.search-panel__header p {
  color: #74757d;
}

.search-panel__meta {
  color: #6b6c74;
}

.region-card__updated {
  color: #6c6d75;
}

.region-card__threat {
  min-height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--threat-color) 11%, rgba(255, 255, 255, 0.02));
  line-height: 1;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--threat-color) 17%, transparent);
}

.region-card__threat-icon {
  width: 13px;
  height: 13px;
}

.region-card__threat > span {
  color: color-mix(in srgb, var(--threat-color) 78%, #e5e5e8);
}

.region-card__threat--clear {
  background: rgba(74, 111, 91, 0.11);
  box-shadow: inset 0 0 0 1px rgba(101, 143, 119, 0.14);
}

.region-card__threat--clear > span {
  color: #8eaa9b;
}

/* Let the search list scroll all the way to the panel edge */
.search-panel {
  padding-bottom: 0 !important;
}

.region-results {
  margin-bottom: 0;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

@media (max-width: 720px) {
  .search-panel {
    padding-bottom: 0 !important;
  }

  .region-results {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}

/* Region panel — clean card layout */
.region-panel {
  padding-top: 22px !important;
  padding-bottom: 28px !important;
  background: #070708;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.region-panel::-webkit-scrollbar {
  width: 6px;
}

.region-panel::-webkit-scrollbar-track {
  background: transparent;
}

.region-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.region-panel__header {
  padding: 0 0 14px;
  border-bottom: 0;
}

.region-panel__toolbar {
  margin-bottom: 10px;
}

.region-panel__eyebrow {
  color: #777982;
  font-size: 11.5px;
  font-weight: 550;
}

.region-panel h2 {
  max-width: none;
  font-size: 29px;
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.region-panel__hide {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.region-panel__state {
  margin-top: 14px;
  padding: 11px 12px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.024);
}

.region-panel__status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
}

.region-panel__state div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.region-panel__state strong {
  color: #efeff2;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
}

.region-panel__state span:last-child {
  color: #73747c;
  font-size: 10.5px;
  font-weight: 500;
}

.region-panel__section {
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.region-panel__section h3,
.region-panel__section-head h3,
.region-panel__section-label {
  margin: 0;
  color: #898a92;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: 0;
}

.region-panel__section-head {
  min-height: 24px;
  align-items: center;
  margin-bottom: 10px;
}

.region-panel__section-head h3 {
  margin: 0;
}

.region-panel__count {
  min-width: 24px;
  height: 24px;
  margin: 0;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #bfc0c6;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 22px;
}

.region-panel__threats {
  display: grid;
  gap: 6px;
}

.region-panel__threat {
  min-height: 38px;
  padding: 8px 2px;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.region-panel__threat-icon {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  place-items: center;
}

.region-panel__threat-svg {
  width: 17px;
  height: 17px;
}

.region-panel__threat strong {
  color: #e7e7ea;
  font-size: 12.5px;
  font-weight: 540;
  line-height: 1.25;
}

.region-panel__clear {
  min-height: 38px;
  padding: 8px 2px;
  border-radius: 0;
  background: transparent;
  color: #8da798;
  font-size: 12.5px;
  font-weight: 540;
}

.region-panel__section--verification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.region-panel__verification {
  max-width: 180px;
  color: #e5e5e8;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.3;
  text-align: right;
}

.region-panel__section--info {
  display: grid;
  gap: 8px;
}

.region-panel__section--info h3 {
  margin: 0;
}

.region-panel__placeholder {
  max-width: none;
  color: #75767e;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

@media (min-width: 721px) {
  .region-panel {
    width: min(410px, 33vw);
    padding-left: 22px !important;
    padding-right: 22px !important;
  }
}

@media (max-width: 720px) {
  .region-panel {
    padding: 18px 14px max(20px, env(safe-area-inset-bottom)) !important;
  }

  .region-panel h2 {
    font-size: 27px;
  }

  .region-panel__section {
    padding: 13px;
  }

  .region-panel__section--verification {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .region-panel__verification {
    max-width: none;
    text-align: left;
  }
}

/* Unified interface borders */
.bottom-nav,
.map-controls,
.map-legend,
.region-panel,
.map-settings,
.search-field,
.region-card,
.map-setting,
.map-switch__track,
.region-panel__state,
.region-panel__section,
.region-panel__hide {
  border-color: var(--ui-border);
}

.search-field:hover,
.region-card:hover,
.map-setting:hover,
.region-panel__hide:hover {
  border-color: var(--ui-border-hover);
}

.map-switch input:checked + .map-switch__track {
  border-color: rgba(107, 122, 255, 0.22);
}

.map-controls button {
  border-top-color: var(--ui-divider);
}

.region-card,
.map-setting,
.region-panel__state,
.region-panel__section {
  background: var(--ui-surface);
}

.region-card:hover,
.map-setting:hover {
  background: var(--ui-surface-hover);
}

.region-card.is-selected {
  border-color: rgba(95, 111, 255, 0.18);
}

.region-card__threat {
  border: 0;
  box-shadow: none;
}

.region-results__empty {
  border-color: var(--ui-border);
}

/* Active events are a section, not a stack of chips */
.region-panel__section--events {
  margin-top: 10px;
  padding: 16px 2px 12px;
  border: 0;
  border-bottom: 1px solid var(--ui-divider);
  border-radius: 0;
  background: transparent;
}

.region-panel__section--events .region-panel__section-head {
  margin-bottom: 6px;
  padding: 0 2px;
}

.region-panel__section--events .region-panel__count {
  min-width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6f7078;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.2;
}

.region-panel__section--events .region-panel__threats {
  gap: 0;
}

.region-panel__section--events .region-panel__threat {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 7px 2px;
  border: 0;
  border-bottom: 1px solid var(--ui-divider);
  background: transparent;
}

.region-panel__section--events .region-panel__threat:last-child {
  border-bottom: 0;
}

.region-panel__section--events .region-panel__threat-icon {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--threat-color);
}

.region-panel__section--events .region-panel__threat strong {
  color: #e9e9ec;
  font-size: 13px;
  font-weight: 540;
}

.region-panel__section--events .region-panel__clear {
  min-height: 42px;
  padding: 7px 2px;
  background: transparent;
}

/* Frosted side panels over the map */
.search-panel {
  background: rgba(5, 5, 6, 0.78);
  -webkit-backdrop-filter: blur(22px) saturate(112%);
  backdrop-filter: blur(22px) saturate(112%);
}

.region-panel {
  background: rgba(7, 7, 8, 0.74);
  -webkit-backdrop-filter: blur(22px) saturate(112%);
  backdrop-filter: blur(22px) saturate(112%);
}

/* Region detail panel v2 — hierarchy first */
.region-panel {
  width: min(430px, calc(100vw - 36px));
  padding: 24px 22px 28px !important;
}

.region-panel__header {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--ui-divider);
}

.region-panel__title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
}

.region-panel__title-row h2 {
  margin: 0;
  max-width: 330px;
  font-size: 30px;
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.region-panel__hide {
  margin-top: 1px;
}

.region-panel__status-line {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  color: #777982;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.region-panel__status-line strong {
  color: #ececef;
  font-size: 12.5px;
  font-weight: 560;
}

.region-panel__status-separator {
  color: #4f5056;
}

.region-panel__section--events {
  margin-top: 0;
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--ui-divider);
}

.region-panel__section--events .region-panel__section-head {
  min-height: 0;
  margin: 0 0 8px;
  padding: 0;
}

.region-panel__section--events .region-panel__section-head h3 {
  color: #9899a1;
  font-size: 11.5px;
  font-weight: 560;
}

.region-panel__section--events .region-panel__count {
  color: #66676f;
}

.region-panel__section--events .region-panel__threat {
  grid-template-columns: 22px minmax(0, 1fr);
  min-height: 42px;
  padding: 8px 0;
}

.region-panel__section--events .region-panel__threat strong {
  font-size: 13px;
  font-weight: 550;
}

.region-panel__fact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  border-bottom: 1px solid var(--ui-divider);
}

.region-panel__fact-row > span {
  color: #7c7d85;
  font-size: 11.5px;
  font-weight: 520;
}

.region-panel__fact-row > strong {
  min-width: 0;
  max-width: 190px;
  color: #e5e5e8;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.region-panel__fact-row.is-stacked {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 6px;
  padding: 12px 0;
}

.region-panel__fact-row.is-stacked > strong {
  max-width: none;
  text-align: left;
}

.region-panel__disclosure {
  border-bottom: 1px solid var(--ui-divider);
}

.region-panel__disclosure summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  min-height: 50px;
  align-items: center;
  gap: 12px;
  list-style: none;
  color: #b4b5bc;
  cursor: pointer;
  font-size: 12px;
  font-weight: 550;
}

.region-panel__disclosure summary::-webkit-details-marker {
  display: none;
}

.region-panel__disclosure summary svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #66676f;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease, stroke 160ms ease;
}

.region-panel__disclosure summary:hover {
  color: #ededf0;
}

.region-panel__disclosure summary:hover svg {
  stroke: #9b9ca3;
}

.region-panel__disclosure[open] summary svg {
  transform: rotate(90deg);
}

.region-panel__disclosure .region-panel__placeholder {
  padding: 0 28px 14px 0;
  color: #71727a;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
}

@media (min-width: 721px) {
  .region-panel {
    width: min(430px, 34vw);
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

@media (max-width: 720px) {
  .region-panel {
    padding: 20px 16px max(22px, env(safe-area-inset-bottom)) !important;
  }

  .region-panel__title-row h2 {
    font-size: 28px;
  }

  .region-panel__fact-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 0;
  }

  .region-panel__fact-row > strong {
    max-width: none;
    text-align: left;
  }
}

/* Hairline borders: soft, inset and impossible to clip from outside */
.bottom-nav,
.map-controls,
.map-legend,
.region-panel,
.map-settings,
.search-field,
.region-card,
.map-setting,
.map-switch__track,
.region-panel__hide {
  border: 0;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
}

.bottom-nav {
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 12px 38px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.012);
}

.region-panel {
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 24px 80px rgba(0, 0, 0, 0.36);
}

.map-settings {
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 24px 70px rgba(0, 0, 0, 0.38);
}

.search-field:hover,
.region-card:hover,
.map-setting:hover,
.region-panel__hide:hover {
  box-shadow: inset 0 0 0 0.5px var(--ui-border-hover);
}

.search-field:focus-within {
  border: 0;
  box-shadow:
    inset 0 0 0 0.5px rgba(117, 130, 255, 0.5),
    0 0 0 3px rgba(74, 91, 230, 0.07);
}

.region-card.is-selected {
  border: 0;
  box-shadow: inset 0 0 0 0.5px rgba(95, 111, 255, 0.34);
}

.map-switch input:checked + .map-switch__track {
  border: 0;
  box-shadow: inset 0 0 0 0.5px rgba(107, 122, 255, 0.26);
}

.region-results {
  padding-left: 1px;
  padding-right: 9px;
}

.region-card {
  width: calc(100% - 1px);
  margin-left: 0.5px;
  margin-right: 0.5px;
}

.region-panel__header,
.region-panel__section--events,
.region-panel__fact-row,
.region-panel__disclosure,
.region-panel__section--events .region-panel__threat {
  border-color: var(--ui-divider);
}

/* Search panel v2 — mirrors the region detail panel */
.search-panel {
  top: 18px;
  left: 18px;
  bottom: 92px;
  width: min(430px, calc(100vw - 36px));
  height: auto;
  padding: 24px 22px 0 !important;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(7, 7, 8, 0.74);
  -webkit-backdrop-filter: blur(22px) saturate(112%);
  backdrop-filter: blur(22px) saturate(112%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 24px 80px rgba(0, 0, 0, 0.36);
}

.search-panel__header {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--ui-divider);
}

.search-panel__header h2,
.search-panel h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.search-panel__header p {
  margin: 7px 0 0;
  color: #777982;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.search-panel__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.search-field {
  flex: 0 0 auto;
  min-height: 48px;
  margin-top: 16px;
  padding: 0 13px;
  gap: 10px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.search-field svg {
  width: 17px;
  height: 17px;
  stroke: #74757d;
  stroke-width: 1.8;
}

.search-field input {
  font-size: 13.5px;
  font-weight: 500;
}

.search-field input::placeholder {
  color: #5f6067;
}

.search-panel__meta {
  flex: 0 0 auto;
  margin: 14px 0 6px;
  padding: 0;
  color: #72737b;
  font-size: 11px;
  font-weight: 520;
}

.region-results {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 8px max(18px, env(safe-area-inset-bottom)) 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.region-results::-webkit-scrollbar {
  width: 6px;
}

.region-results::-webkit-scrollbar-track {
  background: transparent;
}

.region-results::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.region-card {
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: 11px 0 10px;
  gap: 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background 120ms ease, padding 120ms ease;
}

.region-card + .region-card {
  border-top: 1px solid var(--ui-divider);
}

.region-card:hover {
  padding-left: 8px;
  padding-right: 8px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  transform: none;
}

.region-card:active {
  transform: none;
  background: rgba(255, 255, 255, 0.04);
}

.region-card.is-selected {
  padding-left: 8px;
  padding-right: 8px;
  border: 0;
  background: rgba(95, 111, 255, 0.07);
  box-shadow: inset 2px 0 0 rgba(95, 111, 255, 0.58);
}

.region-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.region-card__name {
  color: #ededf0;
  font-size: 13.5px;
  font-weight: 560;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.region-card__updated {
  padding-top: 1px;
  color: #66676f;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
}

.region-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.region-card__threat {
  display: inline-flex;
  min-height: 0;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 10.5px;
  font-weight: 520;
}

.region-card__threat-icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.region-card__threat > span {
  color: color-mix(in srgb, var(--threat-color) 72%, #c9c9cf);
}

.region-card__threat--clear {
  background: transparent;
  box-shadow: none;
}

.region-card__threat--clear > span {
  color: #81998c;
}

.region-results__empty {
  margin: 12px 0 0;
  padding: 18px 0;
  border: 0;
  border-radius: 0;
  color: #74757d;
  font-size: 12px;
  text-align: left;
}

@media (min-width: 721px) {
  .search-panel {
    width: min(430px, 34vw);
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .app-shell.is-search-open .map-stage {
    transform: translate3d(min(220px, 16vw), 0, 0) scale(0.985);
  }

  .app-shell.is-search-open .system-status {
    transform: translateX(calc(-50% + min(195px, 14vw)));
  }

  .app-shell.is-search-open .map-legend {
    left: calc(min(430px, 34vw) + 36px);
  }
}

@media (max-width: 720px) {
  .search-panel {
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 82px;
    width: auto;
    padding: 20px 16px 0 !important;
    border-radius: 22px;
  }

  .search-panel__header h2,
  .search-panel h2 {
    font-size: 28px;
  }

  .search-field {
    min-height: 46px;
    margin-top: 14px;
  }

  .region-card {
    min-height: 64px;
  }
}

/* Search as a real left drawer/tab, not a nested floating card */
.search-panel {
  inset: 0 auto 0 0;
  width: min(430px, 34vw);
  max-height: none;
  padding: 26px 24px 96px !important;
  border-radius: 0 24px 24px 0;
  background: rgba(7, 7, 8, 0.80);
  opacity: 1;
  transform: translateX(calc(-100% - 1px));
  transform-origin: left center;
  pointer-events: none;
  box-shadow:
    inset -0.5px 0 0 var(--ui-border),
    18px 0 56px rgba(0, 0, 0, 0.28);
  transition:
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease;
}

.app-shell.is-search-open .search-panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.search-panel__header {
  padding-top: 2px;
}

.search-panel__body {
  min-height: 0;
}

.region-results {
  margin-right: -8px;
  padding-right: 8px;
}

@media (min-width: 721px) {
  .app-shell.is-search-open .map-stage {
    transform: translate3d(min(215px, 17vw), 0, 0) scale(0.985);
  }

  .app-shell.is-search-open .system-status {
    transform: translateX(calc(-50% + min(190px, 15vw)));
  }

  .app-shell.is-search-open .map-legend {
    left: calc(min(430px, 34vw) + 22px);
  }
}

@media (max-width: 720px) {
  .search-panel {
    inset: 0 auto 0 0;
    width: min(420px, 92vw);
    padding: 22px 16px 88px !important;
    border-radius: 0 22px 22px 0;
  }

  .app-shell.is-search-open .map-stage {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Narrower side panels */
.search-panel {
  width: min(360px, 29vw);
  padding-left: 20px !important;
  padding-right: 20px !important;
}

.region-panel {
  width: min(360px, 29vw);
  padding-left: 20px !important;
  padding-right: 20px !important;
  border-radius: 24px 0 0 24px;
}

.region-card {
  position: relative;
}

.region-card.is-selected {
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  box-shadow: none;
}

.region-card.is-selected::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 62, 254, 0.08);
}

.region-card.is-selected .region-card__header,
.region-card.is-selected .region-card__details {
  padding-left: 13px;
}

.region-card.is-selected .region-card__name {
  color: #ffffff;
  font-weight: 620;
}

.region-card.is-selected .region-card__updated {
  color: #7a7b83;
}

@media (min-width: 721px) {
  .app-shell.is-search-open .map-stage {
    transform: translate3d(min(180px, 14.5vw), 0, 0) scale(0.99);
  }

  .app-shell.is-search-open .system-status {
    transform: translateX(calc(-50% + min(155px, 12.5vw)));
  }

  .app-shell.is-search-open .map-legend {
    left: calc(min(360px, 29vw) + 20px);
  }

  .app-shell.is-details-open .map-stage {
    transform: translate3d(max(-180px, -14.5vw), 0, 0) scale(0.99);
  }

  .app-shell.is-details-open .system-status {
    transform: translateX(calc(-50% - min(155px, 12.5vw)));
  }

  .app-shell.is-details-open .map-controls {
    right: calc(min(360px, 29vw) + 22px);
  }

  .app-shell.is-details-open .map-settings {
    right: calc(min(360px, 29vw) + 58px);
  }
}

@media (max-width: 720px) {
  .search-panel {
    width: min(360px, 88vw);
  }

  .region-panel {
    width: min(360px, calc(100vw - 24px));
  }
}

/* Unified frosted side-panel treatment */
.search-panel,
.region-panel {
  border: 0;
  background: rgba(7, 7, 8, 0.64);
  -webkit-backdrop-filter: blur(28px) saturate(118%);
  backdrop-filter: blur(28px) saturate(118%);
}

.search-panel {
  box-shadow:
    inset -0.5px 0 0 var(--ui-border),
    18px 0 54px rgba(0, 0, 0, 0.24);
}

.region-panel {
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 24px 72px rgba(0, 0, 0, 0.28);
}

.search-panel__header,
.region-panel__header,
.region-panel__section--events,
.region-panel__fact-row,
.region-panel__disclosure,
.region-card + .region-card {
  border-color: var(--ui-divider);
}

.region-card + .region-card {
  border-top-width: 0.5px;
}

.region-panel__hide,
.search-field {
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
}

.region-panel__hide:hover,
.search-field:hover {
  box-shadow: inset 0 0 0 0.5px var(--ui-border-hover);
}

/* Frosted map overlays: legend + controls */
.map-legend,
.map-controls {
  border: 0;
  background: rgba(7, 7, 8, 0.62);
  -webkit-backdrop-filter: blur(26px) saturate(116%);
  backdrop-filter: blur(26px) saturate(116%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 14px 38px rgba(0, 0, 0, 0.24);
}

.map-legend {
  border-radius: 14px;
}

.map-controls {
  overflow: hidden;
  border-radius: 14px;
}

.map-controls button {
  border: 0;
  border-top: 0.5px solid var(--ui-divider);
}

.map-controls button:first-child {
  border-top: 0;
}

.map-controls button:hover {
  background: rgba(255, 255, 255, 0.045);
}

.map-legend__border-sample {
  border-width: 1px;
  opacity: 0.88;
}

/* Frosted bottom navigation — same visual system as map overlays */
.bottom-nav {
  border: 0;
  background: rgba(7, 7, 8, 0.62);
  -webkit-backdrop-filter: blur(26px) saturate(116%);
  backdrop-filter: blur(26px) saturate(116%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 14px 38px rgba(0, 0, 0, 0.24);
}

.nav-item {
  border: 0;
  background: transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.045);
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.032);
  color: var(--blue);
}

.nav-item:active {
  background: rgba(255, 255, 255, 0.06);
  transform: scale(0.975);
}

/* Navigator */
.navigator-page {
  position: absolute;
  z-index: 7;
  inset: 0;
  overflow-y: auto;
  padding: 34px clamp(24px, 5vw, 72px) 110px;
  background:
    radial-gradient(circle at 50% 0%, rgba(44, 62, 254, 0.035), transparent 34%),
    #030303;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-shell.is-navigator-open .navigator-page {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.navigator-page__header,
.navigator-live {
  width: min(820px, 100%);
  margin-inline: auto;
}

.navigator-page__header h1 {
  margin: 0;
  color: #f5f5f7;
  font-size: 32px;
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.navigator-page__header p {
  margin: 7px 0 0;
  color: #777982;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
}

.navigator-live {
  margin-top: 18px;
}

.navigator-live__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #8c8e96;
  font-size: 11px;
  font-weight: 550;
}

.navigator-live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 225, 106, 0.08);
  animation: navigator-live-pulse 2.2s ease-in-out infinite;
}

@keyframes navigator-live-pulse {
  50% {
    box-shadow: 0 0 0 5px rgba(0, 225, 106, 0.025);
    opacity: 0.72;
  }
}

.navigator-feed {
  border-top: 0.5px solid var(--ui-divider);
}

.navigator-feed__item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 66px;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 0.5px solid var(--ui-divider);
}

.navigator-feed__icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--event-color);
}

.navigator-feed__svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navigator-feed__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.navigator-feed__copy strong {
  color: #ededf0;
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
}

.navigator-feed__copy span,
.navigator-feed__item time {
  color: #707179;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
}

.navigator-feed__item time {
  align-self: center;
  white-space: nowrap;
}

.navigator-feed__empty {
  padding: 24px 2px;
  color: #777982;
  font-size: 12px;
}

@media (max-width: 720px) {
  .navigator-page {
    padding: 24px 18px 96px;
  }

  .navigator-page__header h1 {
    font-size: 29px;
  }

  .navigator-live {
    margin-top: 16px;
  }

  .navigator-feed__item {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
  }

  .navigator-feed__item time {
    grid-column: 2;
    margin-top: -4px;
  }
}

/* Navigator is an overlay mode on the same map, not a separate screen */
.navigator-page {
  inset: 24px auto auto 50%;
  width: min(760px, calc(100vw - 120px));
  height: auto;
  padding: 0;
  overflow: visible;
  background: transparent;
  opacity: 0;
  transform: translate(-50%, -7px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.app-shell.is-navigator-open .navigator-page {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: none;
}

.app-shell.is-navigator-open .system-status {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
}

.navigator-page__header {
  width: 100%;
  margin: 0;
  text-align: center;
}

.navigator-page__header h1 {
  margin: 0;
  color: #f5f5f7;
  font-size: 15px;
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.navigator-page__header p {
  margin: 3px 0 0;
  color: #9a9ba2;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.navigator-feed {
  position: relative;
  width: 100%;
  height: 38px;
  margin-top: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: rgba(7, 7, 8, 0.58);
  -webkit-backdrop-filter: blur(24px) saturate(116%);
  backdrop-filter: blur(24px) saturate(116%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 10px 30px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}

.navigator-feed__track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  will-change: transform;
  animation: navigator-ticker 34s linear infinite;
}

.navigator-feed:hover .navigator-feed__track {
  animation-play-state: paused;
}

.navigator-feed__group {
  display: flex;
  flex: none;
  align-items: center;
  gap: 26px;
  padding: 0 26px 0 18px;
}

.navigator-feed__item {
  display: inline-flex;
  min-height: 0;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

.navigator-feed__icon {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  color: var(--event-color);
}

.navigator-feed__svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navigator-feed__text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: #85868e;
  font-size: 10.5px;
  font-weight: 500;
}

.navigator-feed__text strong {
  color: #ededf0;
  font-size: 11.5px;
  font-weight: 560;
}

.navigator-feed__text > span::before,
.navigator-feed__text time::before {
  content: '·';
  margin-right: 6px;
  color: #515259;
}

.navigator-feed__text time {
  color: #6f7078;
  font-size: 9.5px;
  font-weight: 500;
}

.navigator-feed__empty {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  color: #85868e;
  font-size: 11px;
  white-space: nowrap;
}

@keyframes navigator-ticker {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 720px) {
  .navigator-page {
    top: 22px;
    width: calc(100vw - 32px);
    padding: 0;
  }

  .navigator-page__header h1 {
    font-size: 14px;
  }

  .navigator-page__header p {
    font-size: 10.5px;
  }

  .navigator-feed {
    height: 36px;
    margin-top: 8px;
    border-radius: 13px;
  }

  .navigator-feed__track {
    animation-duration: 28s;
  }
}

/* Navigator live timeline */
.navigator-timeline {
  width: min(560px, 100%);
  margin: 10px auto 0;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(7, 7, 8, 0.60);
  -webkit-backdrop-filter: blur(24px) saturate(116%);
  backdrop-filter: blur(24px) saturate(116%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 14px 34px rgba(0, 0, 0, 0.20);
  pointer-events: auto;
}

.navigator-timeline__head {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 0.5px solid var(--ui-divider);
}

.navigator-timeline__head > span:first-child {
  color: #eeeeF1;
  font-size: 11.5px;
  font-weight: 570;
}

.navigator-timeline__head > span:last-child {
  color: #686970;
  font-size: 9.5px;
  font-weight: 520;
}

.navigator-timeline__list {
  max-height: min(260px, 38vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.11) transparent;
}

.navigator-timeline__list::-webkit-scrollbar {
  width: 5px;
}

.navigator-timeline__list::-webkit-scrollbar-track {
  background: transparent;
}

.navigator-timeline__list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
}

.navigator-timeline__item {
  display: grid;
  width: 100%;
  min-height: 52px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 0.5px solid var(--ui-divider);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 130ms ease;
}

.navigator-timeline__item:last-child {
  border-bottom: 0;
}

.navigator-timeline__item:hover {
  background: rgba(255, 255, 255, 0.035);
}

.navigator-timeline__item:active {
  background: rgba(255, 255, 255, 0.055);
}

.navigator-timeline__icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: var(--event-color);
}

.navigator-timeline__svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navigator-timeline__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.navigator-timeline__copy strong {
  overflow: hidden;
  color: #e9e9ec;
  font-size: 11.5px;
  font-weight: 560;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navigator-timeline__copy > span {
  overflow: hidden;
  color: color-mix(in srgb, var(--event-color) 65%, #8a8b92);
  font-size: 10px;
  font-weight: 510;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navigator-timeline__item time {
  color: #676870;
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}

.navigator-timeline__empty {
  padding: 18px 14px;
  color: #777982;
  font-size: 11px;
  font-weight: 500;
}

@media (max-width: 720px) {
  .navigator-timeline {
    width: 100%;
    margin-top: 8px;
    border-radius: 14px;
  }

  .navigator-timeline__list {
    max-height: min(220px, 32vh);
  }

  .navigator-timeline__item {
    min-height: 50px;
    padding: 8px 12px;
  }

  .navigator-timeline__item time {
    display: none;
  }
}

/* Navigator v3: map-first layout with a side history rail */
.navigator-page {
  inset: 0;
  width: auto;
  height: auto;
  padding: 0;
  overflow: visible;
  background: transparent;
  opacity: 0;
  transform: none;
  pointer-events: none;
}

.app-shell.is-navigator-open .navigator-page {
  opacity: 1;
  transform: none;
  pointer-events: none;
}

.navigator-page__header {
  position: absolute;
  top: 24px;
  left: calc(50% - 150px);
  width: min(620px, calc(100vw - 430px));
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.navigator-feed {
  position: absolute;
  top: 62px;
  left: calc(50% - 150px);
  width: min(620px, calc(100vw - 430px));
  margin: 0;
  transform: translateX(-50%);
}

.navigator-timeline {
  position: absolute;
  top: 108px;
  right: 18px;
  bottom: 92px;
  width: 300px;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(7, 7, 8, 0.62);
  -webkit-backdrop-filter: blur(26px) saturate(116%);
  backdrop-filter: blur(26px) saturate(116%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    -14px 0 36px rgba(0, 0, 0, 0.20);
  pointer-events: auto;
}

.navigator-timeline__head {
  min-height: 58px;
  padding: 0 14px;
}

.navigator-timeline__head > div {
  display: grid;
  gap: 2px;
}

.navigator-timeline__head > div strong {
  color: #eeeeF1;
  font-size: 12px;
  font-weight: 580;
}

.navigator-timeline__head > div span {
  color: #6f7078;
  font-size: 9.5px;
  font-weight: 500;
}

.navigator-timeline__head > span:last-child {
  color: #63646b;
  font-size: 9px;
  font-weight: 520;
}

.navigator-timeline__list {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.navigator-timeline__item {
  min-height: 54px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 9px 13px;
}

.navigator-timeline__item.is-started {
  opacity: 0.62;
}

.navigator-timeline__item.is-started .navigator-timeline__icon {
  color: color-mix(in srgb, var(--event-color) 58%, #72737a);
}

.navigator-timeline__copy > span {
  font-size: 9.7px;
}

.app-shell.is-navigator-open .map-stage {
  transform: translate3d(-145px, 0, 0) scale(0.985);
}

.app-shell.is-navigator-open .map-controls {
  right: 336px;
}

.app-shell.is-navigator-open .map-settings {
  right: 372px;
}

@media (max-width: 980px) and (min-width: 721px) {
  .navigator-timeline {
    width: 270px;
  }

  .navigator-page__header,
  .navigator-feed {
    left: calc(50% - 125px);
    width: min(500px, calc(100vw - 350px));
  }

  .app-shell.is-navigator-open .map-stage {
    transform: translate3d(-125px, 0, 0) scale(0.985);
  }

  .app-shell.is-navigator-open .map-controls {
    right: 306px;
  }
}

@media (max-width: 720px) {
  .navigator-page__header {
    top: 18px;
    left: 50%;
    width: calc(100vw - 32px);
  }

  .navigator-feed {
    top: 54px;
    left: 50%;
    width: calc(100vw - 32px);
  }

  .navigator-timeline {
    top: auto;
    right: 12px;
    bottom: 82px;
    left: 12px;
    width: auto;
    height: min(230px, 31vh);
    margin: 0;
    border-radius: 18px;
    box-shadow:
      inset 0 0 0 0.5px var(--ui-border),
      0 -12px 34px rgba(0, 0, 0, 0.18);
  }

  .navigator-timeline__head {
    min-height: 48px;
  }

  .navigator-timeline__item {
    min-height: 48px;
    padding: 7px 12px;
  }

  .navigator-timeline__item time {
    display: none;
  }

  .app-shell.is-navigator-open .map-stage {
    transform: translate3d(0, -62px, 0) scale(0.92);
  }

  .app-shell.is-navigator-open .map-controls,
  .app-shell.is-navigator-open .map-settings {
    right: 18px;
  }
}

/* Navigator history toolbar + progressive filters */
.navigator-history-toolbar {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 0.5px solid var(--ui-divider);
  background: rgba(255, 255, 255, 0.012);
}

.navigator-history-toolbar__left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.navigator-filter-trigger,
.navigator-filter-reset {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.navigator-filter-trigger {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.026);
  color: #c9cad0;
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  font-size: 9.8px;
  font-weight: 540;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.navigator-filter-trigger:hover,
.navigator-filter-trigger.is-open {
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 0.5px var(--ui-border-hover);
}

.navigator-filter-trigger > svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.navigator-filter-trigger__count {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding-inline: 4px;
  border-radius: 999px;
  background: rgba(44, 62, 254, 0.14);
  color: var(--blue);
  font-size: 8.5px;
  font-weight: 650;
}

.navigator-filter-trigger__chevron {
  margin-left: -1px;
  transition: transform 160ms ease;
}

.navigator-filter-trigger.is-open .navigator-filter-trigger__chevron {
  transform: rotate(180deg);
}

.navigator-filter-reset {
  padding: 4px 3px;
  background: transparent;
  color: #73757d;
  font-size: 9px;
  font-weight: 520;
}

.navigator-filter-reset:hover {
  color: #b1b2b8;
}

.navigator-sort-control {
  display: block;
  flex: 0 0 auto;
}

.navigator-sort-control > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.navigator-sort-control select,
.navigator-history-filters select {
  border: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.026);
  color: #c8c9cf;
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  font: inherit;
  cursor: pointer;
  transition: background 120ms ease, box-shadow 120ms ease;
}

.navigator-sort-control select {
  width: 86px;
  height: 30px;
  padding: 0 7px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 520;
}

.navigator-history-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-bottom: 0.5px solid var(--ui-divider);
  background: rgba(255, 255, 255, 0.018);
}

.navigator-history-filters[hidden] {
  display: none;
}

.navigator-history-filters label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.navigator-history-filters label:last-child {
  grid-column: 1 / -1;
}

.navigator-history-filters label > span {
  padding-left: 2px;
  color: #686a72;
  font-size: 8.5px;
  font-weight: 540;
  line-height: 1.2;
}

.navigator-history-filters select {
  width: 100%;
  height: 31px;
  min-width: 0;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 9.5px;
  font-weight: 520;
}

.navigator-sort-control select:hover,
.navigator-history-filters select:hover {
  background: rgba(255, 255, 255, 0.042);
  box-shadow: inset 0 0 0 0.5px var(--ui-border-hover);
}

.navigator-sort-control select:focus-visible,
.navigator-history-filters select:focus-visible,
.navigator-filter-trigger:focus-visible {
  box-shadow:
    inset 0 0 0 0.5px rgba(44, 62, 254, 0.5),
    0 0 0 2px rgba(44, 62, 254, 0.08);
}

.navigator-timeline__day {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  min-height: 27px;
  align-items: center;
  padding: 0 13px;
  border-bottom: 0.5px solid var(--ui-divider);
  background: rgba(8, 8, 9, 0.91);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #6d6f77;
  font-size: 8.8px;
  font-weight: 560;
  letter-spacing: 0.01em;
}

.navigator-timeline__item.is-cleared {
  opacity: 0.48;
}

.navigator-timeline__item.is-cleared .navigator-timeline__icon {
  filter: saturate(0.45);
}

.navigator-timeline__item:not(.is-started):not(.is-cleared) {
  background: rgba(255, 255, 255, 0.012);
}

@media (max-width: 720px) {
  .navigator-history-toolbar {
    min-height: 44px;
    padding: 7px 9px;
  }

  .navigator-filter-trigger,
  .navigator-sort-control select {
    height: 29px;
  }

  .navigator-sort-control select {
    width: 78px;
    font-size: 8.7px;
  }

  .navigator-history-filters {
    gap: 7px;
    padding: 9px;
  }

  .navigator-history-filters select {
    height: 30px;
    font-size: 9px;
  }

  .navigator-timeline__day {
    min-height: 25px;
    padding-inline: 12px;
  }
}

/* Navigator history drawer — mirrors Search panel */
.navigator-timeline {
  top: 18px;
  right: 18px;
  bottom: 92px;
  width: min(430px, calc(100vw - 36px));
  height: auto;
  margin: 0;
  border-radius: 24px;
  background: rgba(7, 7, 8, 0.74);
  -webkit-backdrop-filter: blur(22px) saturate(112%);
  backdrop-filter: blur(22px) saturate(112%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 24px 80px rgba(0, 0, 0, 0.36);
}

.navigator-timeline__head {
  flex: 0 0 auto;
  min-height: 0;
  padding: 24px 22px 18px;
  border-bottom: 1px solid var(--ui-divider);
}

.navigator-timeline__head > div {
  gap: 7px;
}

.navigator-timeline__head > div strong {
  color: #f3f3f5;
  font-size: 30px;
  font-weight: 620;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.navigator-timeline__head > div span {
  color: #777982;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.navigator-timeline__head > span:last-child {
  align-self: flex-start;
  margin-top: 7px;
  color: #777982;
  font-size: 10.5px;
  font-weight: 520;
}

.navigator-history-toolbar {
  min-height: 52px;
  padding: 10px 22px;
  background: transparent;
}

.navigator-filter-trigger {
  height: 34px;
  gap: 7px;
  padding-inline: 10px;
  border-radius: 11px;
  font-size: 11px;
}

.navigator-filter-trigger > svg {
  width: 14px;
  height: 14px;
}

.navigator-filter-reset {
  font-size: 10px;
}

.navigator-sort-control select {
  width: 102px;
  height: 34px;
  padding-inline: 9px;
  border-radius: 11px;
  font-size: 10px;
}

.navigator-history-filters {
  gap: 10px;
  padding: 12px 22px 14px;
  background: rgba(255, 255, 255, 0.012);
}

.navigator-history-filters label > span {
  font-size: 9.5px;
}

.navigator-history-filters select {
  height: 36px;
  padding-inline: 10px;
  border-radius: 11px;
  font-size: 10.5px;
}

.navigator-timeline__list {
  padding: 0 10px max(18px, env(safe-area-inset-bottom)) 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.navigator-timeline__list::-webkit-scrollbar {
  width: 6px;
}

.navigator-timeline__list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.navigator-timeline__day {
  top: 0;
  min-height: 34px;
  margin-right: -10px;
  padding: 0;
  background: rgba(7, 7, 8, 0.93);
  color: #74757d;
  font-size: 10.5px;
  font-weight: 550;
}

.navigator-timeline__item {
  min-height: 68px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 11px 0 10px;
  border-bottom: 1px solid var(--ui-divider);
  border-radius: 0;
  background: transparent;
  transition: background 120ms ease, padding 120ms ease, opacity 120ms ease;
}

.navigator-timeline__item:hover {
  padding-left: 8px;
  padding-right: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.navigator-timeline__icon {
  width: 22px;
  height: 22px;
}

.navigator-timeline__svg {
  width: 19px;
  height: 19px;
}

.navigator-timeline__copy {
  gap: 5px;
}

.navigator-timeline__copy strong {
  color: #eeeeF1;
  font-size: 13.5px;
  font-weight: 570;
  line-height: 1.25;
}

.navigator-timeline__copy > span {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
}

.navigator-timeline__item time {
  color: #777982;
  font-size: 10.5px;
  font-weight: 500;
}

.navigator-timeline__item.is-started {
  opacity: 0.7;
}

.navigator-timeline__item.is-cleared {
  opacity: 0.52;
}

@media (min-width: 721px) {
  .navigator-page__header,
  .navigator-feed {
    left: calc(50% - 205px);
    width: min(680px, calc(100vw - 540px));
  }

  .app-shell.is-navigator-open .map-stage {
    transform: translate3d(-180px, 0, 0) scale(0.99);
  }

  .app-shell.is-navigator-open .map-controls {
    right: 470px;
  }

  .app-shell.is-navigator-open .map-settings {
    right: 506px;
  }
}

@media (max-width: 720px) {
  .navigator-timeline {
    top: 12px;
    right: 12px;
    bottom: 82px;
    left: auto;
    width: min(430px, calc(100vw - 24px));
    height: auto;
    border-radius: 22px;
  }

  .navigator-timeline__head {
    padding: 20px 18px 16px;
  }

  .navigator-timeline__head > div strong {
    font-size: 28px;
  }

  .navigator-history-toolbar {
    padding: 9px 18px;
  }

  .navigator-history-filters {
    padding: 10px 18px 12px;
  }

  .navigator-timeline__list {
    padding-left: 18px;
  }

  .navigator-timeline__item {
    min-height: 64px;
  }

  .navigator-timeline__item time {
    display: block;
    font-size: 9.5px;
  }

  .app-shell.is-navigator-open .map-stage {
    transform: translate3d(-18px, 0, 0) scale(0.94);
  }
}

/* Navigator history as a real right drawer — mirrored Search */
.navigator-timeline {
  inset: 0 0 0 auto;
  width: min(360px, 29vw);
  height: auto;
  margin: 0;
  border-radius: 24px 0 0 24px;
  border: 0;
  background: rgba(7, 7, 8, 0.64);
  -webkit-backdrop-filter: blur(28px) saturate(118%);
  backdrop-filter: blur(28px) saturate(118%);
  box-shadow:
    inset 0.5px 0 0 var(--ui-border),
    -18px 0 54px rgba(0, 0, 0, 0.24);
}

.navigator-timeline__head {
  padding: 30px 24px 20px;
}

.navigator-history-toolbar {
  padding: 12px 24px;
  gap: 12px;
}

.navigator-history-filters {
  padding: 14px 24px 16px;
}

.navigator-timeline__list {
  padding: 0 18px 96px 24px;
}

.navigator-timeline__day {
  margin-right: 0;
  padding-right: 6px;
}

.navigator-timeline__item {
  width: 100%;
  padding-left: 2px;
  padding-right: 2px;
}

.navigator-timeline__item:hover {
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 10px;
}

.navigator-timeline__item time {
  padding-left: 8px;
}

.navigator-history-toolbar__left {
  gap: 8px;
}

@media (min-width: 721px) {
  .navigator-page__header,
  .navigator-feed {
    left: calc(50% - min(155px, 12.5vw));
    width: min(680px, calc(100vw - 430px));
  }

  .app-shell.is-navigator-open .map-stage {
    transform: translate3d(max(-180px, -14.5vw), 0, 0) scale(0.99);
  }

  .app-shell.is-navigator-open .map-controls {
    right: calc(min(360px, 29vw) + 22px);
  }

  .app-shell.is-navigator-open .map-settings {
    right: calc(min(360px, 29vw) + 58px);
  }
}

@media (max-width: 720px) {
  .navigator-timeline {
    inset: 0 0 0 auto;
    width: min(360px, 88vw);
    height: auto;
    border-radius: 22px 0 0 22px;
  }

  .navigator-timeline__head {
    padding: 26px 20px 18px;
  }

  .navigator-history-toolbar {
    padding: 10px 20px;
  }

  .navigator-history-filters {
    padding: 12px 20px 14px;
  }

  .navigator-timeline__list {
    padding: 0 14px 88px 20px;
  }

  .app-shell.is-navigator-open .map-stage {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Navigator history v5 — same internal rhythm as Search drawer */
.navigator-timeline {
  box-sizing: border-box;
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 20px 20px;
}

.navigator-timeline__head {
  flex: 0 0 auto;
  min-height: 0;
  padding: 2px 0 0;
  border: 0;
}

.navigator-timeline__head > div {
  gap: 7px;
}

.navigator-timeline__head > span:last-child {
  margin-top: 8px;
}

.navigator-history-toolbar {
  flex: 0 0 auto;
  min-height: 0;
  margin-top: 16px;
  padding: 0 0 14px;
  border-bottom: 0.5px solid var(--ui-divider);
  background: transparent;
}

.navigator-history-filters {
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 0 16px;
  border-bottom: 0.5px solid var(--ui-divider);
  background: transparent;
}

.navigator-timeline__list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 6px -8px 0 0;
  padding: 0 8px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.navigator-timeline__day {
  min-height: 34px;
  margin: 0;
  padding: 0;
  border-bottom: 0.5px solid var(--ui-divider);
  background: rgba(7, 7, 8, 0.92);
}

.navigator-timeline__item {
  box-sizing: border-box;
  width: 100%;
  min-height: 68px;
  padding: 11px 0 10px;
  border-radius: 0;
}

.navigator-timeline__item:hover {
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 10px;
}

.navigator-timeline__item time {
  padding-left: 10px;
  padding-right: 2px;
}

.navigator-timeline__empty {
  padding: 18px 0;
}

/* Give the live ticker breathing room below the navigator subtitle */
.navigator-feed {
  top: 76px;
}

@media (max-width: 720px) {
  .navigator-timeline {
    padding: 22px 16px 16px;
  }

  .navigator-timeline__head {
    padding: 2px 0 0;
  }

  .navigator-history-toolbar {
    margin-top: 14px;
    padding: 0 0 12px;
  }

  .navigator-history-filters {
    padding: 12px 0 14px;
  }

  .navigator-timeline__list {
    margin-right: -7px;
    padding-right: 7px;
  }

  .navigator-feed {
    top: 68px;
  }
}

/* Clean History drawer component. Intentionally isolated from legacy navigator-timeline styles. */
.history-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  box-sizing: border-box;
  display: flex;
  width: min(360px, 29vw);
  min-width: 320px;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 20px 20px;
  border: 0;
  border-radius: 24px 0 0 24px;
  background: rgba(7, 7, 8, 0.64);
  -webkit-backdrop-filter: blur(28px) saturate(118%);
  backdrop-filter: blur(28px) saturate(118%);
  box-shadow:
    inset 0.5px 0 0 var(--ui-border),
    -18px 0 54px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
}

.history-drawer__head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0 0;
}

.history-drawer__head > div {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.history-drawer__head strong {
  color: #f3f3f5;
  font-size: 30px;
  font-weight: 620;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.history-drawer__head > div span {
  color: #777982;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}

.history-drawer__head > span:last-child {
  flex: 0 0 auto;
  margin-top: 7px;
  color: #777982;
  font-size: 10.5px;
  font-weight: 520;
  white-space: nowrap;
}

.history-drawer__toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 0 0 14px;
  border-bottom: 0.5px solid var(--ui-divider);
}

.history-drawer__toolbar-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.history-filter-trigger,
.history-filter-reset {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.history-filter-trigger {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.028);
  color: #c9cad0;
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  font-size: 11px;
  font-weight: 550;
}

.history-filter-trigger:hover,
.history-filter-trigger.is-open {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 0.5px var(--ui-border-hover);
}

.history-filter-trigger > svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-filter-trigger__count {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  padding-inline: 4px;
  border-radius: 999px;
  background: rgba(44, 62, 254, 0.14);
  color: var(--blue);
  font-size: 8.5px;
  font-weight: 650;
}

.history-filter-trigger__chevron {
  transition: transform 160ms ease;
}

.history-filter-trigger.is-open .history-filter-trigger__chevron {
  transform: rotate(180deg);
}

.history-filter-reset {
  padding: 4px 2px;
  background: transparent;
  color: #73757d;
  font-size: 9.5px;
  font-weight: 520;
}

.history-filter-reset:hover {
  color: #b1b2b8;
}

.history-sort-control {
  flex: 0 0 auto;
}

.history-sort-control > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.history-sort-control select,
.history-drawer__filters select {
  border: 0;
  outline: none;
  background: rgba(255, 255, 255, 0.028);
  color: #c8c9cf;
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  font: inherit;
  cursor: pointer;
}

.history-sort-control select {
  width: 102px;
  height: 34px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 10px;
  font-weight: 520;
}

.history-drawer__filters {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 0 16px;
  border-bottom: 0.5px solid var(--ui-divider);
}

.history-drawer__filters[hidden] {
  display: none;
}

.history-drawer__filters label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.history-drawer__filters label:last-child {
  grid-column: 1 / -1;
}

.history-drawer__filters label > span {
  padding-left: 2px;
  color: #686a72;
  font-size: 9.5px;
  font-weight: 540;
}

.history-drawer__filters select {
  width: 100%;
  height: 36px;
  min-width: 0;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 10.5px;
  font-weight: 520;
}

.history-sort-control select:hover,
.history-drawer__filters select:hover {
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 0 0 0.5px var(--ui-border-hover);
}

.history-drawer__list {
  flex: 1 1 auto;
  min-height: 0;
  margin: 12px 0 0;
  padding: 0 4px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.history-drawer__list::-webkit-scrollbar {
  width: 5px;
}

.history-drawer__list::-webkit-scrollbar-track {
  background: transparent;
}

.history-drawer__list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.history-drawer__day {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 12px;
  padding: 5px 0 7px;
  border: 0;
  background: transparent;
  color: #777982;
  font-size: 10.5px;
  font-weight: 550;
  white-space: nowrap;
}

.history-drawer__day::after {
  content: '';
  width: 100%;
  height: 0.5px;
  flex: 1 1 auto;
  background: var(--ui-divider);
}

.history-drawer__item {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  min-height: 104px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 14px 0 13px;
  border: 0;
  border-bottom: 0.5px solid var(--ui-divider);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, padding 120ms ease, opacity 120ms ease;
}

.history-drawer__item:hover {
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.032);
}

.history-drawer__item.is-selected {
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 10px;
  background: rgba(44, 62, 254, 0.065);
  box-shadow: inset 2px 0 0 rgba(44, 62, 254, 0.72);
  opacity: 1;
}

.history-drawer__item.is-selected .history-drawer__source {
  color: #ffffff;
}

.history-drawer__item.is-selected .history-drawer__quote {
  color: #d0d1d6;
}

.history-drawer__item.is-started {
  opacity: 0.86;
}

.history-drawer__item.is-cleared {
  opacity: 0.62;
}

.history-drawer__item.is-selected,
.history-drawer__item.is-selected.is-started,
.history-drawer__item.is-selected.is-cleared {
  opacity: 1;
}

.history-drawer__icon {
  display: grid;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  place-items: center;
  color: var(--event-color);
}

.history-drawer__svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-drawer__copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.history-drawer__source-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.history-drawer__source {
  overflow: hidden;
  color: #eeeeF1;
  font-size: 12px;
  font-weight: 590;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-drawer__source-line time {
  flex: 0 0 auto;
  color: #6f7179;
  font-size: 9.8px;
  font-weight: 500;
  white-space: nowrap;
}

.history-drawer__quote {
  display: -webkit-box;
  overflow: hidden;
  color: #b9bac0;
  font-size: 11.5px;
  font-weight: 480;
  line-height: 1.42;
  white-space: normal;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-drawer__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #71737b;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
}

.history-drawer__region {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-drawer__threat {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--event-color) 72%, #8a8b92);
  white-space: nowrap;
}

.history-drawer__threat::before {
  content: '·';
  margin-right: 7px;
  color: #4d4f56;
}

.history-drawer__empty {
  padding: 18px 0;
  color: #777982;
  font-size: 11px;
  font-weight: 500;
}

/* Ticker sits clearly below the navigator subtitle. */
.navigator-feed {
  top: 82px;
}

@media (max-width: 720px) {
  .history-drawer {
    width: min(360px, 88vw);
    min-width: 0;
    padding: 22px 16px 16px;
    border-radius: 22px 0 0 22px;
  }

  .history-drawer__head strong {
    font-size: 28px;
  }

  .history-drawer__toolbar {
    margin-top: 15px;
  }

  .history-sort-control select {
    width: 88px;
  }

  .history-drawer__list {
    margin-right: 0;
    padding-right: 3px;
  }

  .history-drawer__item {
    min-height: 98px;
    gap: 10px;
    padding-top: 13px;
    padding-bottom: 12px;
  }

  .history-drawer__source-line time {
    font-size: 9.3px;
  }

  .history-drawer__quote {
    font-size: 11px;
  }

  .navigator-feed {
    top: 74px;
  }
}

/* Clean Search drawer component. Isolated from legacy search-panel / region-card styles. */
.search-drawer {
  position: absolute;
  z-index: 9;
  inset: 0 auto 0 0;
  box-sizing: border-box;
  display: flex;
  width: min(360px, 29vw);
  min-width: 320px;
  min-height: 0;
  flex-direction: column;
  padding: 26px 20px 20px;
  border: 0;
  border-radius: 0 24px 24px 0;
  background: rgba(7, 7, 8, 0.64);
  -webkit-backdrop-filter: blur(28px) saturate(118%);
  backdrop-filter: blur(28px) saturate(118%);
  box-shadow:
    inset -0.5px 0 0 var(--ui-border),
    18px 0 54px rgba(0, 0, 0, 0.24);
  opacity: 1;
  transform: translateX(calc(-100% - 1px));
  transform-origin: left center;
  pointer-events: none;
  transition:
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease;
}

.app-shell.is-search-open .search-drawer {
  transform: translateX(0);
  pointer-events: auto;
}

.search-drawer__head {
  flex: 0 0 auto;
  padding: 2px 0 0;
}

.search-drawer__head h2 {
  margin: 0;
  color: #f3f3f5;
  font-size: 30px;
  font-weight: 620;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.search-drawer__head p {
  margin: 7px 0 0;
  color: #777982;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}

.search-drawer__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.search-drawer__field {
  display: grid;
  min-height: 46px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 0 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  transition: background 120ms ease, box-shadow 120ms ease;
}

.search-drawer__field:hover,
.search-drawer__field:focus-within {
  background: rgba(255, 255, 255, 0.042);
  box-shadow: inset 0 0 0 0.5px var(--ui-border-hover);
}

.search-drawer__field svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #777982;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-drawer__field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #ededf0;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
}

.search-drawer__field input::placeholder {
  color: #62646b;
}

.search-drawer__field input::-webkit-search-cancel-button {
  opacity: 0.45;
}

.search-drawer__meta {
  flex: 0 0 auto;
  margin-top: 16px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--ui-divider);
  color: #777982;
  font-size: 10.5px;
  font-weight: 520;
  line-height: 1.3;
}

.search-drawer__results {
  min-height: 0;
  flex: 1 1 auto;
  margin: 6px -8px 0 0;
  padding: 0 8px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.search-drawer__results::-webkit-scrollbar {
  width: 5px;
}

.search-drawer__results::-webkit-scrollbar-track {
  background: transparent;
}

.search-drawer__results::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.search-result {
  position: relative;
  display: grid;
  box-sizing: border-box;
  width: 100%;
  min-height: 68px;
  gap: 7px;
  padding: 11px 0 10px;
  border: 0;
  border-bottom: 0.5px solid var(--ui-divider);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, padding 120ms ease;
}

.search-result:hover {
  padding-left: 8px;
  padding-right: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.032);
}

.search-result:active {
  background: rgba(255, 255, 255, 0.052);
}

.search-result.is-selected {
  padding-left: 0;
  padding-right: 0;
  background: transparent;
}

.search-result.is-selected::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 62, 254, 0.08);
}

.search-result.is-selected .search-result__header,
.search-result.is-selected .search-result__details {
  padding-left: 13px;
}

.search-result__header {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
}

.search-result__name {
  overflow: hidden;
  color: #ededf0;
  font-size: 13.5px;
  font-weight: 570;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result.is-selected .search-result__name {
  color: #fff;
  font-weight: 620;
}

.search-result__updated {
  color: #71727a;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.search-result__details {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.search-result__threat {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: var(--threat-color);
}

.search-result__threat-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-legend__icon,
.region-panel__threat-svg,
.region-panel__clear-icon,
.navigator-feed__svg,
.history-drawer__svg,
.search-result__threat-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.28));
}

.search-result__threat > span {
  overflow: hidden;
  max-width: 190px;
  font-size: 10.5px;
  font-weight: 510;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result__threat--clear {
  color: #767980;
}

@media (min-width: 721px) {
  .app-shell.is-search-open .map-stage {
    transform: translate3d(min(180px, 14.5vw), 0, 0) scale(0.99);
  }

  .app-shell.is-search-open .system-status {
    transform: translateX(calc(-50% + min(155px, 12.5vw)));
  }

  .app-shell.is-search-open .map-legend {
    left: calc(min(360px, 29vw) + 20px);
  }
}

@media (max-width: 720px) {
  .search-drawer {
    width: min(360px, 88vw);
    min-width: 0;
    padding: 22px 16px 16px;
    border-radius: 0 22px 22px 0;
  }

  .search-drawer__head h2 {
    font-size: 28px;
  }

  .search-drawer__field {
    margin-top: 16px;
  }

  .search-drawer__results {
    margin-right: -7px;
    padding-right: 7px;
  }

  .search-result {
    min-height: 64px;
  }

  .search-result__updated {
    font-size: 9.5px;
  }

  .app-shell.is-search-open .map-stage {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* History controls v2 — custom dropdowns, less chrome */
.history-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.history-drawer__toolbar {
  min-height: 44px;
  margin-top: 18px;
  padding: 0 0 10px;
}

.history-filter-trigger {
  height: 38px;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #a7a9b0;
  font-size: 12px;
  font-weight: 560;
}

.history-filter-trigger:hover,
.history-filter-trigger.is-open {
  background: transparent;
  box-shadow: none;
  color: #f0f0f2;
}

.history-filter-trigger > svg {
  width: 16px;
  height: 16px;
}

.history-filter-trigger__count {
  min-width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  font-size: 10px;
  font-weight: 650;
}

.history-filter-trigger__count[hidden] {
  display: none !important;
}

.history-filter-reset {
  padding: 0;
  color: #75777f;
  font-size: 10.5px;
}

.history-filter-reset:hover {
  color: #c5c6ca;
}

.history-sort-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #777981;
}

.history-sort-control__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-select {
  position: relative;
  min-width: 148px;
}

.history-select--sort {
  min-width: 74px;
}

.history-select__trigger {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #d8d9dd;
  font: inherit;
  font-size: 12px;
  font-weight: 540;
  line-height: 1;
  text-align: right;
  cursor: pointer;
  transition: color 120ms ease;
}

.history-select--sort .history-select__trigger {
  min-height: 34px;
  gap: 6px;
  font-size: 11px;
  font-weight: 560;
}

.history-select__trigger:hover,
.history-select.is-open .history-select__trigger {
  color: #fff;
}

.history-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-select__chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: #71737b;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease, stroke 120ms ease;
}

.history-select.is-open .history-select__chevron {
  transform: rotate(180deg);
  stroke: #c9cad0;
}

.history-select__menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: max(100%, 184px);
  box-sizing: border-box;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 15, 17, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  backdrop-filter: blur(24px) saturate(120%);
  box-shadow:
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.075),
    0 14px 40px rgba(0, 0, 0, 0.44);
}

.history-select__menu[hidden] {
  display: none;
}

.history-select__option {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #a7a9b0;
  font: inherit;
  font-size: 11.5px;
  font-weight: 520;
  text-align: left;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}

.history-select__option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f1f3;
}

.history-select__option.is-selected {
  color: #f4f4f6;
}

.history-select__check {
  width: 14px;
  flex: 0 0 14px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
}

.history-select__option.is-selected .history-select__check {
  opacity: 1;
}

.history-drawer__filters {
  display: block;
  padding: 2px 0 12px;
  border-bottom: 0.5px solid var(--ui-divider);
}

.history-drawer__filters[hidden] {
  display: none;
}

.history-filter-row {
  display: grid;
  min-height: 52px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.022);
}

.history-filter-row:last-child {
  border-bottom: 0;
}

.history-filter-row > span {
  color: #85878e;
  font-size: 11px;
  font-weight: 520;
  line-height: 1.25;
}

/* Navigator filter selects use the same field treatment as the appeal form. */
.history-drawer__filters .history-select {
  min-width: 148px;
}

.history-drawer__filters .history-select__trigger {
  box-sizing: border-box;
  min-height: 40px;
  justify-content: space-between;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  color: #e9e9ec;
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  transition: background 140ms ease, box-shadow 140ms ease, color 120ms ease;
}

.history-drawer__filters .history-select__trigger:hover,
.history-drawer__filters .history-select.is-open .history-select__trigger {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(44, 62, 254, 0.72);
  color: #fff;
}

.history-drawer__filters .history-select__menu {
  right: auto;
  left: 0;
  width: 100%;
  min-width: 100%;
  background: rgba(15, 15, 17, 0.94);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.075);
}

/* Keep the dropdown surface itself light in both shared uses. */
.appeal-form__select .history-select__menu {
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.075);
}

@media (max-width: 720px) {
  .history-drawer__toolbar {
    min-height: 42px;
    margin-top: 15px;
  }

  .history-filter-trigger {
    height: 36px;
    font-size: 11.5px;
  }

  .history-select {
    min-width: 138px;
  }

  .history-select--sort {
    min-width: 82px;
  }

  .history-select__trigger {
    min-height: 38px;
    font-size: 11.5px;
  }

  .history-filter-row {
    min-height: 50px;
  }

  .history-select__menu {
    width: max(100%, 172px);
  }

  .history-drawer__filters .history-select__menu {
    width: 100%;
  }
}

/* Keep map controls fully outside the Navigator history drawer. */
@media (min-width: 721px) {
  .app-shell.is-navigator-open .map-controls {
    right: calc(clamp(320px, 29vw, 360px) + 18px);
  }
}

@media (max-width: 720px) {
  .app-shell.is-navigator-open .map-controls {
    right: calc(min(360px, 88vw) + 12px);
  }
}

/* Bottom navigation follows the available map workspace. */
.bottom-nav {
  transition:
    transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 180ms ease,
    background 180ms ease;
}

@media (min-width: 721px) {
  .app-shell.is-search-open:not(.is-details-open) .bottom-nav {
    transform: translateX(calc(-50% + clamp(160px, 14.5vw, 180px)));
  }

  .app-shell.is-navigator-open .bottom-nav,
  .app-shell.is-details-open:not(.is-search-open) .bottom-nav {
    transform: translateX(calc(-50% - clamp(160px, 14.5vw, 180px)));
  }

  .app-shell.is-search-open.is-details-open .bottom-nav {
    transform: translateX(-50%);
  }
}

@media (max-width: 720px) {
  .app-shell.is-search-open .bottom-nav,
  .app-shell.is-navigator-open .bottom-nav,
  .app-shell.is-details-open .bottom-nav {
    transform: translateX(-50%);
  }
}

/* Appeal dialog / mobile bottom sheet. */
.appeal-modal[hidden] {
  display: none;
}

.appeal-modal {
  position: absolute;
  z-index: 61;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 2, 3, 0.42);
}

.appeal-modal__card {
  box-sizing: border-box;
  width: min(460px, calc(100vw - 32px));
  padding: 20px;
  border: 0;
  border-radius: 22px;
  background: rgba(7, 7, 8, 0.7);
  -webkit-backdrop-filter: blur(28px) saturate(118%);
  backdrop-filter: blur(28px) saturate(118%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 24px 72px rgba(0, 0, 0, 0.4);
  color: #ededf0;
  will-change: transform;
}

.appeal-modal__grabber {
  display: none;
}

.appeal-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.appeal-modal__head h2 {
  margin: 0;
  color: #f4f4f6;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.appeal-modal__head p {
  margin: 6px 0 0;
  color: #9698a1;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.appeal-modal__close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: #999ba3;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.appeal-modal__close:hover,
.appeal-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.appeal-modal__close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.appeal-form {
  display: grid;
  gap: 12px;
}

.appeal-form__field {
  display: grid;
  gap: 7px;
}

.appeal-form__field > span {
  color: #a8aab2;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
}

.appeal-form__field input,
.appeal-form__field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  color: #f0f0f2;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.appeal-form__field textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.5;
}

.appeal-form__field input::placeholder,
.appeal-form__field textarea::placeholder {
  color: #62646c;
}

.appeal-region-search {
  position: relative;
  width: 100%;
}

.appeal-region-search__menu {
  position: absolute;
  z-index: 35;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  box-sizing: border-box;
  max-height: min(300px, 42vh);
  padding: 6px;
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(15, 15, 17, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  backdrop-filter: blur(24px) saturate(120%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.075);
  scrollbar-width: thin;
  scrollbar-color: #29292d transparent;
}

.appeal-region-search__menu[hidden] {
  display: none;
}

.appeal-region-search__option {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0 10px;
  border-radius: 9px;
  color: #b7b9c0;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.25;
  cursor: pointer;
  user-select: none;
  transition: background 100ms ease, color 100ms ease;
}

.appeal-region-search__option:hover,
.appeal-region-search__option.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: #f4f4f6;
}

.appeal-region-search__option.is-active {
  box-shadow: inset 2px 0 0 var(--blue);
}

.appeal-region-search__empty {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #777982;
  font-size: 12px;
  font-weight: 500;
}

.appeal-form__field input:focus,
.appeal-form__field textarea:focus {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(44, 62, 254, 0.72);
}

.appeal-form__select.history-select {
  min-width: 0;
  width: 100%;
}

.appeal-form__select .history-select__trigger {
  box-sizing: border-box;
  min-height: 42px;
  justify-content: space-between;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 0.5px var(--ui-border);
  color: #f0f0f2;
  font-size: 13.5px;
  font-weight: 550;
  text-align: left;
}

.appeal-form__select .history-select__trigger:hover,
.appeal-form__select.is-open .history-select__trigger {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(44, 62, 254, 0.72);
}

.appeal-form__select .history-select__menu {
  right: auto;
  left: 0;
  width: 100%;
  min-width: 100%;
  max-height: min(280px, 42vh);
  overflow-y: auto;
}

.appeal-form__select .history-select__option {
  min-height: 42px;
  font-size: 13px;
  font-weight: 550;
}

.appeal-form__footer {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.appeal-form__status {
  min-width: 0;
  color: #999ba3;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}

.appeal-form__status.is-error {
  color: #d88691;
}

.appeal-form__status.is-success {
  color: #71b790;
}

.appeal-form__submit {
  min-width: 112px;
  height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #050506;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, filter 140ms ease;
}

.appeal-form__submit:hover {
  filter: brightness(1.1);
}

.appeal-form__submit:active {
  transform: scale(0.98);
}

.appeal-form__submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

@media (max-width: 720px) {
  .appeal-modal {
    align-items: end;
    padding: 0;
    background: rgba(2, 2, 3, 0.34);
  }

  .appeal-modal__card {
    width: 100%;
    max-height: min(82dvh, 680px);
    padding: 10px 18px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 24px 24px 0 0;
    background: rgba(7, 7, 8, 0.76);
    box-shadow:
      inset 0 0 0 0.5px var(--ui-border),
      0 -18px 56px rgba(0, 0, 0, 0.34);
  }

  .appeal-modal__grabber {
    display: grid;
    width: 100%;
    height: 24px;
    place-items: start center;
    padding-top: 4px;
    cursor: grab;
    touch-action: none;
  }

  .appeal-modal__grabber span {
    display: block;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
  }

  .appeal-modal__head {
    margin-top: 2px;
  }

  .appeal-form__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .appeal-form__submit {
    width: 100%;
  }
}

/* Compact disclaimer dialog. */
.disclaimer-modal[hidden] {
  display: none;
}

.disclaimer-modal {
  position: absolute;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 2, 3, 0.48);
}

.disclaimer-modal__card {
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  padding: 20px;
  border: 0;
  border-radius: 22px;
  background: rgba(7, 7, 8, 0.68);
  -webkit-backdrop-filter: blur(28px) saturate(118%);
  backdrop-filter: blur(28px) saturate(118%);
  box-shadow:
    inset 0 0 0 0.5px var(--ui-border),
    0 24px 72px rgba(0, 0, 0, 0.38);
  color: #ededf0;
  will-change: transform;
}

.disclaimer-modal__grabber {
  display: none;
}

.disclaimer-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.disclaimer-modal__head h2 {
  margin: 0;
  color: #f4f4f6;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.disclaimer-modal__close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: #999ba3;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.disclaimer-modal__close:hover,
.disclaimer-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.disclaimer-modal__close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.disclaimer-modal__card p {
  margin: 0;
  color: #bfc0c6;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.58;
}

.disclaimer-modal__notice {
  margin-top: 14px !important;
  padding-top: 14px;
  border-top: 0.5px solid var(--ui-divider);
  color: #e0e1e5 !important;
  font-weight: 550 !important;
}

@media (max-width: 720px) {
  .disclaimer-modal {
    align-items: end;
    padding: 0;
    background: rgba(2, 2, 3, 0.34);
  }

  .disclaimer-modal__card {
    width: 100%;
    max-height: min(72dvh, 560px);
    padding: 10px 18px max(20px, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 24px 24px 0 0;
    background: rgba(7, 7, 8, 0.74);
    box-shadow:
      inset 0 0 0 0.5px var(--ui-border),
      0 -18px 56px rgba(0, 0, 0, 0.34);
    touch-action: pan-y;
  }

  .disclaimer-modal__grabber {
    display: grid;
    width: 100%;
    height: 24px;
    place-items: start center;
    padding-top: 4px;
    cursor: grab;
    touch-action: none;
  }

  .disclaimer-modal__grabber:active {
    cursor: grabbing;
  }

  .disclaimer-modal__grabber span {
    display: block;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
  }

  .disclaimer-modal__head {
    margin-top: 2px;
  }

  .bottom-nav {
    bottom: max(38px, calc(env(safe-area-inset-bottom) + 30px));
  }

  .bottom-nav__disclaimer {
    font-size: 8px;
  }
}

@media (max-height: 620px) and (min-width: 721px) {
  .bottom-nav {
    bottom: 32px;
  }
}

/* Region drawer must fully own pointer interaction above the SVG object. */
.region-panel {
  z-index: 20;
  isolation: isolate;
  pointer-events: none !important;
  touch-action: pan-y;
}

.app-shell.is-details-open .region-panel {
  pointer-events: auto !important;
}

.app-shell.is-details-open .region-panel > *,
.app-shell.is-details-open .region-panel button,
.app-shell.is-details-open .region-panel details,
.app-shell.is-details-open .region-panel summary {
  pointer-events: auto;
}

/* Map controls are an independent interaction layer in every workspace mode. */
.map-controls {
  z-index: 40 !important;
  isolation: isolate;
  pointer-events: auto !important;
}

.map-controls button {
  position: relative;
  z-index: 1;
  pointer-events: auto !important;
  touch-action: manipulation;
}

.map-controls svg {
  pointer-events: none;
}

@media (max-width: 720px) {
  .app-shell:not(.is-details-open) .map-controls {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
}
