:root {
  color-scheme: dark;
  --bg: #071014;
  --panel: rgba(8, 18, 23, 0.94);
  --panel-soft: rgba(12, 25, 31, 0.86);
  --line: rgba(143, 178, 185, 0.17);
  --line-strong: rgba(143, 178, 185, 0.28);
  --text: #e8f1f0;
  --muted: #7f9599;
  --muted-2: #51686d;
  --accent: #d9ff5f;
  --accent-rgb: 217, 255, 95;
  --danger: #ff715b;
  --header-height: 74px;
  --drawer-width: 430px;
  --radius: 4px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

body {
  position: relative;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-shell {
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--header-height) minmax(0, 1fr);
}

.top-header {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: rgba(5, 13, 17, 0.98);
  border-bottom: 1px solid var(--line-strong);
}

.top-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.38), transparent);
  pointer-events: none;
}

.brand {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  transform: rotate(45deg) scale(0.72);
}

.brand-mark span {
  border: 2px solid var(--accent);
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3) {
  background: var(--accent);
}

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-copy small {
  margin-top: 7px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #95aaa9;
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.status-dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.75);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: inherit;
  animation: status-pulse 2.4s infinite;
}

@keyframes status-pulse {
  0%, 100% { transform: scale(0.8); opacity: 0; }
  45% { transform: scale(1.4); opacity: 1; }
}

.header-meta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: right;
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.header-meta > div {
  display: grid;
  gap: 4px;
}

.meta-label {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #0d1a1f;
  cursor: pointer;
}

.icon-button svg,
.drawer-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.active-filter-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #071014;
  border-radius: 9px;
  background: var(--accent);
  color: #142000;
  font-size: 9px;
  font-weight: 800;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--drawer-width);
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0c161a;
}

#map {
  position: absolute;
  inset: 0;
}

.maplibregl-map {
  font: inherit;
}

.maplibregl-canvas {
  filter: saturate(0.82) contrast(1.02) brightness(1.1);
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  z-index: 8;
}

.maplibregl-ctrl-attrib {
  background: rgba(5, 13, 17, 0.78) !important;
  color: var(--muted) !important;
  font-size: 9px !important;
}

.maplibregl-ctrl-attrib a {
  color: #9eaeac !important;
}

.maplibregl-ctrl-group {
  margin: 0 18px 18px 0 !important;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius) !important;
  background: rgba(7, 16, 20, 0.92) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25) !important;
  overflow: hidden;
}

.maplibregl-ctrl-group button {
  width: 38px !important;
  height: 38px !important;
  border-bottom-color: var(--line) !important;
}

.maplibregl-ctrl-icon {
  filter: invert(1) opacity(0.7);
}

.map-vignette,
.map-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-vignette {
  z-index: 3;
  box-shadow: inset 0 0 110px 8px rgba(0, 0, 0, 0.25);
}

.map-grid {
  z-index: 4;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(173, 210, 210, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(173, 210, 210, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to right, black, transparent 76%);
}

.view-switcher {
  position: absolute;
  z-index: 10;
  top: 18px;
  left: 50%;
  display: flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(6, 15, 19, 0.9);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}

.view-button {
  min-width: 86px;
  padding: 9px 14px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.view-button:hover {
  color: var(--text);
}

.view-button.is-active {
  background: var(--accent);
  color: #152000;
  font-weight: 800;
}

.filter-panel {
  position: absolute;
  z-index: 12;
  top: 18px;
  left: 18px;
  width: 274px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 15, 19, 0.9);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.filter-panel::before,
.event-drawer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 28px;
  height: 2px;
  background: var(--accent);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-heading > div {
  display: grid;
  gap: 5px;
}

.eyebrow {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
}

#visible-count {
  font-size: 12px;
  font-weight: 650;
}

.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: none;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.text-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.segmented-control button {
  min-height: 36px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.segmented-control button.is-active {
  background: rgba(var(--accent-rgb), 0.13);
  color: var(--accent);
  box-shadow: inset 0 -1px var(--accent);
}

.category-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.category-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: #93a5a6;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.category-chip:hover {
  border-color: var(--category-color);
  color: var(--text);
}

.category-chip.is-active {
  border-color: color-mix(in srgb, var(--category-color) 60%, transparent);
  background: color-mix(in srgb, var(--category-color) 12%, transparent);
  color: var(--text);
}

.category-chip-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--category-color);
  box-shadow: 0 0 9px color-mix(in srgb, var(--category-color) 55%, transparent);
}

.category-chip-count {
  margin-left: auto;
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.map-legend {
  position: absolute;
  z-index: 9;
  left: 18px;
  bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-width: min(690px, calc(100% - 40px));
  padding: 9px 11px;
  border-left: 1px solid var(--line-strong);
  color: #72898d;
  background: rgba(6, 15, 19, 0.65);
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.legend-ring,
.legend-core {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-ring {
  border: 1px solid #78e2e8;
}

.legend-core {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

.legend-area {
  display: inline-block;
  width: 10px;
  height: 8px;
  border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 26%, transparent);
}

.legend-area.is-occupied { color: #ff5f52; }
.legend-area.is-transnistria { color: #c89bff; }
.legend-area.is-liberated { color: #61e59a; }
.legend-area.is-contested { color: #ffc857; }
.legend-frontline {
  display: inline-block;
  width: 14px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #ff6b55 0 5px, transparent 5px 8px);
  box-shadow: 0 0 6px rgba(255, 107, 85, 0.62);
}
.territory-date { padding-left: 12px; border-left: 1px solid var(--line-strong); }
.territory-date b { color: #9cafb0; font-weight: 500; }

.coordinates {
  position: absolute;
  z-index: 9;
  right: 64px;
  bottom: 20px;
  color: rgba(194, 214, 213, 0.48);
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.event-drawer {
  position: relative;
  z-index: 20;
  min-width: 0;
  overflow: auto;
  background:
    linear-gradient(rgba(139, 172, 177, 0.035) 1px, transparent 1px),
    var(--panel);
  background-size: 100% 52px;
  border-left: 1px solid var(--line-strong);
  scrollbar-color: var(--muted-2) transparent;
  scrollbar-width: thin;
}

.drawer-empty {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 42px;
}

.empty-radar {
  position: relative;
  width: 76px;
  height: 76px;
  margin-bottom: 34px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 50%;
}

.empty-radar::before,
.empty-radar::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 50%;
}

.empty-radar::after {
  inset: 25px;
}

.empty-radar span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 35px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform-origin: left center;
  animation: radar 3.2s linear infinite;
}

@keyframes radar {
  to { transform: rotate(360deg); }
}

.drawer-empty h1 {
  margin: 13px 0 15px;
  color: var(--text);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.drawer-empty > p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.empty-stats {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 44px;
  background: var(--line);
  border: 1px solid var(--line);
}

.empty-stats > div {
  display: grid;
  gap: 7px;
  padding: 17px;
  background: #091519;
}

.empty-stats strong {
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 22px;
  font-weight: 500;
}

.empty-stats span {
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.event-card {
  position: relative;
  min-height: 100%;
  padding: 40px 38px 28px;
}

.drawer-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
}

.event-card > .drawer-close {
  position: absolute;
  top: 25px;
  right: 25px;
}

.drawer-close:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.event-meta-row {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-right: 46px;
}

.category-badge,
.event-priority,
.event-confidence,
.event-score {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  font-family: Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.category-badge {
  border-color: color-mix(in srgb, var(--category-color, var(--accent)) 50%, transparent);
  color: var(--category-color, var(--accent));
}

.event-priority {
  color: var(--muted);
}

.event-confidence {
  color: #8faeb5;
}

.event-score {
  border-color: rgba(var(--accent-rgb), 0.28);
  color: var(--accent);
}

#event-area {
  color: #a9bdc0;
}

.event-card > h1 {
  max-width: 340px;
  margin: 26px 0 16px;
  font-size: clamp(27px, 2.5vw, 37px);
  font-weight: 520;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.event-dateline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
  line-height: 1.5;
  text-transform: uppercase;
}

.event-dateline span::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 9px 2px 0;
  border-radius: 50%;
  background: var(--accent);
}

.divider {
  height: 1px;
  margin: 31px 0 9px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.brief-section {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}

.section-index {
  padding-top: 3px;
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.brief-section h2 {
  margin: 0 0 10px;
  color: #9eb1b2;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brief-section p {
  margin: 0;
  color: #c0cccc;
  font-size: 13px;
  line-height: 1.68;
}

.source-section a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  text-underline-offset: 4px;
}

.source-section a.is-demo {
  color: var(--muted);
  text-decoration: none;
  pointer-events: none;
}

.event-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

.event-footer code {
  color: #789095;
  font-size: 9px;
}

.loading-screen {
  position: absolute;
  z-index: 30;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: #071014;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen strong {
  margin-top: 8px;
  font-family: Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.loading-screen small {
  color: var(--muted);
  font-size: 10px;
}

.error-banner {
  position: absolute;
  z-index: 35;
  left: 50%;
  bottom: 24px;
  width: min(460px, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 113, 91, 0.5);
  background: rgba(37, 13, 12, 0.96);
  color: #ffb4aa;
  transform: translateX(-50%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
  font-size: 12px;
}

.error-banner strong {
  display: block;
  margin-bottom: 4px;
}

.mobile-filter-sheet {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(3px);
}

.sheet-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(680px, 88dvh);
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  overflow: auto;
  border-top: 1px solid var(--line-strong);
  border-radius: 18px 18px 0 0;
  background: #0a161b;
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.48);
}

.sheet-handle {
  width: 36px;
  height: 3px;
  margin: 0 auto 20px;
  border-radius: 2px;
  background: var(--line-strong);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.sheet-header > div {
  display: grid;
  gap: 6px;
}

.sheet-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 550;
  letter-spacing: -0.03em;
}

.mobile-filter-content .segmented-control {
  margin-bottom: 18px;
}

.mobile-filter-content .category-list {
  grid-template-columns: repeat(2, 1fr);
}

.primary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #132000;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  :root {
    --drawer-width: 380px;
  }

  .filter-panel {
    width: 252px;
  }

  .view-switcher {
    left: auto;
    right: 18px;
    transform: none;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 64px;
  }

  .top-header {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .header-status {
    display: none;
  }

  .header-meta > div {
    display: none;
  }

  .icon-button {
    display: grid;
  }

  .workspace {
    position: relative;
    display: block;
  }

  .map-stage {
    width: 100%;
    height: 100%;
  }

  .filter-panel {
    display: none;
  }

  .view-switcher {
    top: 12px;
    right: 12px;
  }

  .view-button {
    min-width: 75px;
    padding: 8px 10px;
  }

  .event-drawer {
    position: absolute;
    z-index: 50;
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-height: min(72dvh, 650px);
    border: 1px solid var(--line-strong);
    border-radius: 8px 8px 3px 3px;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
    transform: translateY(calc(100% + 18px));
    transition: transform 0.32s ease;
  }

  .event-drawer.has-event {
    transform: translateY(0);
  }

  .drawer-empty {
    display: none;
  }

  .event-card {
    min-height: auto;
    padding: 28px 24px 22px;
  }

  .event-card > h1 {
    padding-right: 12px;
    font-size: 27px;
  }

  .event-card > .drawer-close {
    top: 18px;
    right: 18px;
  }

  .brief-section {
    padding: 19px 0;
  }

  .map-legend {
    display: none;
  }

  .coordinates {
    right: auto;
    bottom: 18px;
    left: 14px;
  }

  .maplibregl-ctrl-group {
    margin: 0 12px 14px 0 !important;
  }

  .maplibregl-ctrl-attrib-button {
    margin: 0 !important;
  }
}

@media (max-width: 480px) {
  .brand {
    gap: 7px;
  }

  .brand-copy strong {
    font-size: 12px;
    letter-spacing: 0.13em;
  }

  .view-switcher {
    left: 12px;
    right: auto;
  }

  .view-button {
    min-width: 68px;
    font-size: 9px;
  }

  .map-grid {
    background-size: 52px 52px;
  }

  .event-drawer {
    right: 6px;
    bottom: 6px;
    left: 6px;
    max-height: 76dvh;
  }

  .event-card {
    padding: 25px 19px 19px;
  }

  .event-card > h1 {
    margin-top: 22px;
    font-size: 24px;
  }

  .category-badge,
  .event-priority {
    padding: 5px 7px;
    font-size: 8px;
  }

  .brief-section {
    grid-template-columns: 27px 1fr;
    gap: 8px;
  }

  .brief-section p {
    font-size: 12px;
  }

  .sheet-content {
    padding-right: 15px;
    padding-left: 15px;
  }
}

.header-center {
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-nav {
  display: flex;
  gap: 5px;
}

.social-nav a {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: #9eb0b1;
  background: rgba(255, 255, 255, 0.018);
  text-decoration: none;
  font: 700 9px Consolas, monospace;
  letter-spacing: 0.06em;
  transition: 0.18s ease;
}

.social-nav a:hover,
.social-nav a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}

.social-nav a[aria-disabled="true"] {
  cursor: pointer;
}

.support-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.04);
  cursor: pointer;
  font: 800 10px Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.support-button:hover {
  color: #071014;
  background: var(--accent);
}

.feed-panel {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
}

.feed-header {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 27px 26px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 18, 23, 0.97);
  backdrop-filter: blur(12px);
}

.feed-header h1 {
  margin: 7px 0 0;
  font-size: 25px;
  font-weight: 540;
  letter-spacing: -0.03em;
}

.feed-header > strong {
  color: var(--accent);
  font: 26px/1 Consolas, monospace;
}

.feed-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 15, 19, 0.52);
}

.feed-stats > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 25px;
}

.feed-stats > div + div {
  border-left: 1px solid var(--line);
}

.feed-stats strong {
  color: var(--accent);
  font: 18px Consolas, monospace;
}

.feed-stats span {
  color: var(--muted-2);
  font: 8px Consolas, monospace;
  letter-spacing: 0.09em;
}

.news-feed {
  display: grid;
  padding: 7px 0;
}

.news-item {
  position: relative;
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px 25px 14px 29px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.news-item::before {
  content: "";
  position: absolute;
  top: 17px;
  bottom: 17px;
  left: 17px;
  width: 2px;
  background: var(--item-color);
  opacity: 0.85;
}

.news-item:hover,
.news-item:focus-visible {
  background: rgba(255, 255, 255, 0.028);
}

.news-item__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--item-color);
  font: 8px Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.news-item__top time {
  color: var(--muted-2);
  white-space: nowrap;
}

.news-item > strong {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 650;
}

.news-item__location {
  color: var(--muted);
  font-size: 10px;
}

.feed-empty {
  margin: 0;
  padding: 30px 25px;
  color: var(--muted);
  font-size: 12px;
}

.support-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 13px;
  margin: 18px 20px 24px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.075), rgba(7, 16, 20, 0.9));
}

.support-card__mark {
  color: var(--accent);
  font-size: 18px;
}

.support-card h2 {
  margin: 5px 0 6px;
  font-size: 17px;
}

.support-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.support-card__button {
  grid-column: 1 / -1;
  min-height: 37px;
  margin-top: 5px;
  border: 0;
  color: #071014;
  background: var(--accent);
  cursor: pointer;
  font: 800 10px Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-media-section {
  margin: 6px 0 22px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--line);
}

.event-media-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.event-media-link {
  min-height: 35px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  color: #c5d1d1;
  background: rgba(255, 255, 255, 0.025);
  text-decoration: none;
  cursor: pointer;
  font: 700 9px Consolas, monospace;
  text-transform: uppercase;
}

.event-media-link.platform-youtube { border-color: rgba(255, 92, 92, 0.4); }
.event-media-link.platform-telegram { border-color: rgba(96, 190, 255, 0.4); }
.event-media-link.platform-instagram { border-color: rgba(213, 117, 255, 0.4); }
.event-media-link.platform-facebook { border-color: rgba(104, 142, 255, 0.4); }
.event-media-link:hover { color: var(--accent); border-color: var(--accent); }
.event-media-link.is-placeholder { opacity: 0.7; }

.event-share-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.07), rgba(255, 255, 255, 0.015));
}

.event-share-section p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.event-share-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  color: #142000;
  background: var(--accent);
  cursor: pointer;
  font: 800 9px Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-share-button:hover {
  background: #e5ff88;
}
.event-support-link {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--accent);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: 700 10px Consolas, monospace;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.support-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 8, 11, 0.82);
  backdrop-filter: blur(9px);
}

.support-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 35px;
  border: 1px solid var(--line-strong);
  background: #0a171c;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.62);
}

.support-close {
  position: absolute;
  top: 17px;
  right: 17px;
}

.support-dialog__mark {
  display: block;
  margin-bottom: 23px;
  color: var(--accent);
  font-size: 30px;
}

.support-dialog h2 {
  margin: 9px 0 12px;
  font-size: 29px;
  letter-spacing: -0.035em;
}

.support-dialog > p {
  margin: 0;
  color: #91a5a7;
  font-size: 13px;
  line-height: 1.6;
}

.support-methods {
  display: grid;
  gap: 8px;
  margin: 24px 0 15px;
}

.support-method {
  min-height: 58px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px 15px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.support-method:hover {
  border-color: rgba(var(--accent-rgb), 0.48);
}

.support-method strong { font-size: 12px; }
.support-method span { color: var(--muted); font-size: 10px; }
.support-dialog > small { color: var(--muted-2); font: 9px Consolas, monospace; }

.site-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  max-width: min(390px, calc(100vw - 44px));
  padding: 12px 15px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  color: var(--text);
  background: #0b1b20;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s ease;
  font-size: 11px;
}

.site-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .header-status { display: none; }
  .header-center { gap: 0; }
  .support-button { padding-inline: 10px; }
}

@media (max-width: 820px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto auto;
  }

  .top-header {
    position: sticky;
    top: 0;
    min-height: 64px;
    grid-template-columns: 1fr auto;
    gap: 9px 14px;
    padding: 11px 14px;
  }

  .header-center {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .social-nav {
    width: 100%;
  }

  .social-nav a {
    min-width: 42px;
    flex: 1;
  }

  .header-meta > div { display: none; }
  .support-button { min-height: 40px; }

  .workspace {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .map-stage {
    height: 62dvh;
    min-height: 470px;
    flex: none;
  }

  .event-drawer,
  .event-drawer.has-event {
    position: relative;
    inset: auto;
    width: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 0;
    transform: none;
    box-shadow: none;
  }

  .drawer-empty.feed-panel {
    min-height: auto;
    display: flex;
  }

  .event-card {
    min-height: auto;
  }

  .feed-header {
    position: relative;
    padding: 24px 19px 18px;
  }

  .feed-stats > div { padding-inline: 19px; }
  .news-item { padding-right: 19px; padding-left: 29px; }
  .support-card { margin-inline: 14px; }
}

@media (max-width: 480px) {
  .support-button { font-size: 0; }
  .support-button span { font-size: 13px; }
  .support-dialog { padding: 30px 22px 24px; }
  .support-dialog h2 { padding-right: 32px; font-size: 25px; }
  .map-stage { min-height: 430px; }
  .event-share-section { align-items: stretch; flex-direction: column; }
  .event-share-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
