@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-0: #09111d;
  --bg-1: #111c2a;
  --bg-2: #172432;
  --surface: rgba(17, 29, 43, 0.9);
  --surface-strong: rgba(10, 18, 29, 0.96);
  --line: rgba(34, 219, 191, 0.32);
  --line-soft: rgba(181, 198, 216, 0.18);
  --text: #f4f7fb;
  --muted: #b7c5d5;
  --accent: #22dbbf;
  --accent-deep: #0d8f83;
  --brand-warm: #f6b734;
  --danger: #f2674f;
  --map-background: #7899b0;
  --radius: 8px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 219, 191, 0.72) rgba(7, 15, 27, 0.62);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(7, 15, 27, 0.62);
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid rgba(7, 15, 27, 0.62);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(34, 219, 191, 0.86), rgba(13, 143, 131, 0.78));
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(54, 245, 219, 0.95), rgba(34, 219, 191, 0.84));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(34, 219, 191, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(181, 198, 216, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 6%, rgba(34, 219, 191, 0.16), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(246, 183, 52, 0.1), transparent 26%),
    linear-gradient(135deg, var(--bg-0), var(--bg-1) 56%, var(--bg-2));
  background-size: 86px 86px, 86px 86px, auto, auto, auto;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1260px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(10, 17, 27, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.42));
}

.nav-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(7, 15, 27, 0.78);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.nav-toggle span + span {
  margin-top: 4px;
}

.nav-links a {
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 10px 12px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: 0;
}

.hero .container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.hero::after {
  content: '';
  position: absolute;
  right: -180px;
  top: -150px;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 219, 191, 0.18), rgba(34, 219, 191, 0));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 58px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.kicker::before,
.kicker::after {
  content: '';
  width: 34px;
  height: 2px;
  background: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0;
}

h1 {
  margin-top: 14px;
  max-width: 13ch;
  font-size: clamp(2.75rem, 7vw, 6rem);
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  font-size: 1.9rem;
  text-transform: uppercase;
}

h3 {
  font-size: 1.45rem;
  text-transform: uppercase;
}

.hero p,
p {
  color: var(--muted);
}

.hero p {
  max-width: 58ch;
  font-size: 1.02rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.button.primary {
  color: #071320;
  background: linear-gradient(120deg, var(--accent), #77f0df);
  box-shadow: 0 14px 28px rgba(34, 219, 191, 0.24);
}

.button.secondary {
  color: var(--text);
  background: rgba(17, 29, 43, 0.6);
  border-color: var(--line);
}

.panel {
  background: linear-gradient(145deg, rgba(17, 29, 43, 0.94), rgba(9, 17, 29, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 24px;
}

.brand-showcase {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(16, 29, 44, 0.96), rgba(9, 17, 29, 0.98)),
    radial-gradient(circle at 50% 0%, rgba(34, 219, 191, 0.16), transparent 45%);
  box-shadow: var(--shadow);
  text-align: center;
}

.brand-showcase img {
  width: min(380px, 88%);
  height: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5));
}

.brand-showcase h2 {
  margin-top: 18px;
}

.showcase-rule {
  width: 86px;
  height: 3px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.stat-box {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(7, 15, 27, 0.62);
}

.stat-box strong {
  display: block;
  color: var(--brand-warm);
  font: 800 1.8rem/1 'Barlow Condensed', sans-serif;
}

.stat-box span {
  color: var(--muted);
  font-size: 0.85rem;
}

.section {
  padding: 30px 0 58px;
}

.section-title {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.video-wrap {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline article {
  padding: 12px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: rgba(7, 15, 27, 0.58);
}

.map-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.controls {
  position: sticky;
  top: 98px;
  padding: 18px;
}

.controls h2 {
  margin-bottom: 6px;
}

.controls label {
  display: block;
  margin: 12px 0 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.controls input,
.controls select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(5, 12, 22, 0.92);
  color: var(--text);
  font: inherit;
}

.controls input:focus,
.controls select:focus {
  outline: 2px solid rgba(34, 219, 191, 0.32);
  border-color: var(--accent);
}

.tag-filter {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.tag-checkbox-box,
.filter-checkbox-box {
  max-height: 160px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.66);
  overflow: auto;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 600;
}

.filter-check input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}

.map-accordion {
  margin-top: 12px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.72);
  overflow: hidden;
}

.map-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.map-accordion summary::-webkit-details-marker {
  display: none;
}

.map-accordion summary::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(244, 247, 251, 0.18);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1;
}

.map-accordion[open] summary {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(34, 219, 191, 0.08);
}

.map-accordion[open] summary::after {
  content: '-';
}

.map-accordion > :not(summary) {
  margin: 10px;
}

.map-accordion > label {
  margin: 12px 10px 5px;
}

.map-accordion > input,
.map-accordion > select,
.map-accordion > textarea {
  width: calc(100% - 20px);
}

.panel-soft {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(5, 12, 22, 0.72);
}

.zone-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.zone-actions button {
  flex: 1;
  min-width: 0;
}

.zone-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.zone-list li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
  align-items: center;
}

.zone-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid rgba(244, 247, 251, 0.28);
}

.zone-list-button,
.zone-rename-button,
.zone-edit-button,
.zone-cancel-button,
.zone-delete-button {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(7, 15, 27, 0.78);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.zone-list-button.active {
  border-color: var(--accent);
  background: rgba(34, 219, 191, 0.12);
}

.zone-delete-button {
  width: auto;
  text-align: center;
}

.zone-edit-button,
.zone-rename-button,
.zone-cancel-button,
.zone-delete-button {
  width: auto;
  text-align: center;
}

.zone-rename-button {
  border-color: rgba(130, 174, 255, 0.45);
}

.zone-edit-button {
  border-color: rgba(34, 219, 191, 0.45);
}

.zone-cancel-button {
  border-color: rgba(246, 183, 52, 0.45);
}

.location-list {
  display: grid;
  gap: 8px;
  max-height: 390px;
  margin: 14px 0 0;
  padding: 0 4px 0 0;
  overflow: auto;
  scrollbar-gutter: stable;
  list-style: none;
}

.location-list button {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(7, 15, 27, 0.68);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.location-list button small {
  color: var(--muted);
}

.location-list button.active,
.location-list button:hover {
  border-color: var(--accent);
  background: rgba(34, 219, 191, 0.12);
}

.location-subcategory {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(7, 15, 27, 0.62);
  overflow: hidden;
}

.location-subcategory summary {
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.location-subcategory summary::-webkit-details-marker {
  display: none;
}

.location-subcategory[open] summary {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(34, 219, 191, 0.08);
}

.location-subcategory-items {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.location-subcategory-items button {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(7, 15, 27, 0.68);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.location-subcategory-items button.active,
.location-subcategory-items button:hover {
  border-color: var(--accent);
  background: rgba(34, 219, 191, 0.12);
}

.map-panel {
  padding: 12px;
}

.map-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.map-toolbar button {
  min-width: 42px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(5, 12, 22, 0.92);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.map-toolbar button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.map-toolbar input {
  flex: 1;
  accent-color: var(--accent);
}

.map-viewport {
  position: relative;
  height: min(72vh, 820px);
  min-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--map-background);
  scrollbar-color: var(--accent) rgba(7, 15, 27, 0.8);
  scrollbar-width: thin;
}

.map-viewport.panning {
  cursor: grabbing;
  user-select: none;
}

.map-canvas {
  position: relative;
  width: max-content;
  height: max-content;
  background: #7a97ad;
  contain: layout paint size;
}

.map-canvas img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
  image-rendering: auto;
  backface-visibility: hidden;
}

.pin-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.zone-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.zone-polygon {
  pointer-events: none;
  transition: fill-opacity 140ms ease;
}

.zone-handle {
  fill: #ffffff;
  stroke: rgba(7, 15, 27, 0.96);
  stroke-width: 6px;
  cursor: grab;
}

.zone-handle:active {
  cursor: grabbing;
}

.zone-edge-handle {
  fill: rgba(255, 255, 255, 0.86);
  stroke: rgba(7, 15, 27, 0.92);
  stroke-width: 5px;
  cursor: pointer;
}

.zone-edge-plus {
  fill: rgba(7, 15, 27, 0.94);
  font-family: 'Poppins', sans-serif;
  font-size: 30px;
  font-weight: 800;
  pointer-events: none;
}

.zone-label {
  fill: #f4f7fb;
  font-size: 52px;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: 1.2px;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.5);
  stroke-width: 10px;
  text-transform: uppercase;
  user-select: none;
  pointer-events: none;
}

.poi-marker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(244, 247, 251, 0.75);
  border-radius: 50%;
  background: rgba(7, 19, 31, 0.92);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 219, 191, 0.16), 0 12px 24px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.poi-marker svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.poi-cluster {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 9px;
  border: 2px solid rgba(244, 247, 251, 0.86);
  border-radius: 999px;
  color: #071320;
  background: linear-gradient(135deg, #30ead2, #f6b734);
  box-shadow: 0 0 0 7px rgba(34, 219, 191, 0.18), 0 18px 34px rgba(0, 0, 0, 0.45);
  font: 900 0.92rem/1 'Inter', sans-serif;
  cursor: zoom-in;
  transform: translate(-50%, -50%);
}

.poi-cluster:hover {
  box-shadow: 0 0 0 9px rgba(246, 183, 52, 0.24), 0 22px 42px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%) scale(1.08);
}

.poi-cluster.cluster-medium {
  background: linear-gradient(135deg, #ff9f2f, #f6b734);
  box-shadow: 0 0 0 7px rgba(255, 159, 47, 0.22), 0 18px 34px rgba(0, 0, 0, 0.45);
}

.poi-cluster.cluster-high {
  color: #ffffff;
  background: linear-gradient(135deg, #ff4d4d, #b7132f);
  box-shadow: 0 0 0 7px rgba(255, 77, 77, 0.26), 0 18px 34px rgba(0, 0, 0, 0.48);
}

.poi-cluster.subcategory-cluster {
  background: linear-gradient(135deg, #39b7ff, #22dbbf);
  box-shadow: 0 0 0 7px rgba(57, 183, 255, 0.26), 0 18px 34px rgba(0, 0, 0, 0.48);
}

.poi-marker:hover,
.poi-marker.active {
  color: #071320;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(34, 219, 191, 0.24), 0 16px 28px rgba(0, 0, 0, 0.48);
  transform: translate(-50%, -50%) scale(1.08);
}

.poi-marker.selected {
  color: #071320;
  background: var(--brand-warm);
  box-shadow: 0 0 0 6px rgba(246, 183, 52, 0.3), 0 16px 30px rgba(0, 0, 0, 0.5);
}

.poi-marker.dragging {
  z-index: 5;
  color: #071320;
  background: var(--brand-warm);
  box-shadow: 0 0 0 6px rgba(246, 183, 52, 0.28), 0 18px 32px rgba(0, 0, 0, 0.54);
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.18);
}

.poi-marker[data-category='Banking'] {
  color: var(--brand-warm);
  box-shadow: 0 0 0 4px rgba(246, 183, 52, 0.18), 0 12px 24px rgba(0, 0, 0, 0.42);
}

.poi-marker[data-icon='fire'],
.poi-marker[data-icon='medical'] {
  color: #ff6b5c;
  box-shadow: 0 0 0 4px rgba(255, 107, 92, 0.2), 0 12px 24px rgba(0, 0, 0, 0.42);
}

.poi-marker[data-icon='garbage'] {
  color: #b7d96a;
  box-shadow: 0 0 0 4px rgba(183, 217, 106, 0.2), 0 12px 24px rgba(0, 0, 0, 0.42);
}

.poi-marker[data-icon='police'],
.poi-marker[data-icon='ranger'],
.poi-marker[data-icon='coast-guard'] {
  color: #8be7ff;
  box-shadow: 0 0 0 4px rgba(139, 231, 255, 0.18), 0 12px 24px rgba(0, 0, 0, 0.42);
}

.poi-marker[data-icon='bank'] {
  color: var(--brand-warm);
  box-shadow: 0 0 0 4px rgba(246, 183, 52, 0.2), 0 12px 24px rgba(0, 0, 0, 0.42);
}

.poi-marker[data-icon='fuel'],
.poi-marker[data-icon='garage'],
.poi-marker[data-icon='dealership'],
.poi-marker[data-icon='taxi'] {
  color: #35d6ff;
}

.poi-marker[data-icon='restaurant'],
.poi-marker[data-icon='coffee'],
.poi-marker[data-icon='bar'],
.poi-marker[data-icon='nightlife'] {
  color: #f6b734;
}

.poi-marker[data-icon='store'],
.poi-marker[data-icon='market'],
.poi-marker[data-icon='clothing'],
.poi-marker[data-icon='tattoo'],
.poi-marker[data-icon='electronics'],
.poi-marker[data-icon='pawn'] {
  color: #22dbbf;
}

.poi-marker[data-icon='cave'],
.poi-marker[data-icon='landmark'],
.poi-marker[data-icon='marine'],
.poi-marker[data-icon='warehouse'],
.poi-marker[data-icon='hotel'],
.poi-marker[data-icon='weapon'] {
  color: #b7d96a;
}

.poi-marker[data-icon='property'] {
  color: #8be7ff;
  box-shadow: 0 0 0 4px rgba(139, 231, 255, 0.18), 0 12px 24px rgba(0, 0, 0, 0.42);
}

.poi-marker[data-category='Housing'] {
  color: #8be7ff;
}

.poi-marker[data-category='Medical'] {
  color: #ff8170;
}

.location-detail {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(7, 15, 27, 0.72);
}

.location-detail h3 {
  margin-bottom: 8px;
}

.location-detail p {
  margin: 8px 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  color: #dce9f8;
  font-size: 0.82rem;
}

.poi-image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.poi-image-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(7, 15, 27, 0.52);
}

.poi-image-single {
  margin-bottom: 12px;
}

.poi-image-single img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(7, 15, 27, 0.52);
}

.poi-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.poi-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(220px, 32vw, 300px);
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.poi-carousel-track::-webkit-scrollbar {
  display: none;
}

.poi-carousel-item {
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(7, 15, 27, 0.42);
  cursor: zoom-in;
  scroll-snap-align: start;
}

.poi-carousel-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
}

.carousel-arrow {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  color: var(--text);
  background: rgba(7, 15, 27, 0.82);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.poi-lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 7, 13, 0.88);
}

.poi-lightbox[hidden] {
  display: none;
}

.poi-lightbox img {
  width: min(980px, calc(100vw - 140px));
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border: 1px solid rgba(244, 247, 251, 0.25);
  border-radius: 12px;
  background: rgba(7, 15, 27, 0.82);
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(244, 247, 251, 0.35);
  border-radius: 999px;
  color: #f4f7fb;
  background: rgba(7, 15, 27, 0.84);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close {
  top: 22px;
  right: 22px;
  font-size: 2rem;
}

.lightbox-arrow.prev {
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-arrow.next {
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(244, 247, 251, 0.25);
  border-radius: 999px;
  color: #f4f7fb;
  background: rgba(7, 15, 27, 0.78);
  font-weight: 700;
  transform: translateX(-50%);
}

.modal {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  display: none;
  width: min(390px, calc(100vw - 28px));
  padding: 0;
  pointer-events: none;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  display: none;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(72vh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(80, 95, 72, 0.84), rgba(17, 29, 43, 0.78));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.modal:not(.full-view)::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  width: 26px;
  height: 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(50, 67, 54, 0.82);
  transform: translateX(-50%) rotate(45deg);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: rgba(7, 15, 27, 0.82);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.modal-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
}

.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 8px;
  font-weight: 700;
}

.inline-checkbox input[type='checkbox'] {
  width: 16px;
  height: 16px;
}

.linked-lore-fields {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(7, 15, 27, 0.42);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 14px 0;
}

.modal-stat {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(6, 14, 25, 0.68);
}

.modal-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.poi-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.poi-actions button {
  min-height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  color: var(--text);
  background: rgba(244, 247, 251, 0.12);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.poi-actions .full-view-button {
  grid-column: 1 / -1;
  color: #071320;
  border-color: transparent;
  background: var(--accent);
}

.map-save-status {
  min-width: 0;
  max-width: 180px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
}

.site-footer {
  padding: 24px 0 34px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  text-align: center;
}

.compact-hero {
  min-height: 42vh;
  padding: 118px 0 58px;
}

.document-section {
  padding-top: 34px;
}

.document-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.doc-sidebar a {
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.doc-sidebar a:hover {
  color: #071320;
  background: var(--accent);
  text-decoration: none;
}

.doc-pages {
  display: grid;
  gap: 18px;
}

.doc-page {
  scroll-margin-top: 104px;
  padding: 28px;
}

.doc-page h2 {
  margin-top: 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 0.96;
  text-transform: uppercase;
}

.doc-page h3 {
  margin: 0 0 8px;
}

.doc-columns,
.district-dossier-grid,
.location-lore-grid,
.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.doc-columns section,
.district-dossier-grid section,
.location-lore-grid article,
.vehicle-card {
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(7, 15, 27, 0.48);
}

.location-lore-grid article {
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.location-lore-grid article>a {
  margin-top: auto;
  font-weight: 800;
}

.document-timeline {
  margin-top: 12px;
}

.vehicle-shell {
  display: grid;
  gap: 18px;
}

.vehicle-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.vehicle-toolbar h2,
.vehicle-toolbar p {
  margin: 0;
}

.vehicle-filters {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(150px, 190px);
  gap: 10px;
}

.vehicle-filters input,
.vehicle-filters select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text);
  background: rgba(5, 12, 22, 0.92);
  font: inherit;
}

.vehicle-card {
  display: grid;
  gap: 14px;
}

.vehicle-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(34, 219, 191, 0.12), transparent 42%),
    rgba(5, 12, 22, 0.74);
  cursor: zoom-in;
}

.vehicle-media:hover,
.vehicle-media:focus-visible {
  border-color: rgba(34, 219, 191, 0.72);
  outline: none;
}

.vehicle-media::before {
  content: 'Snapshot pending';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vehicle-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-image-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(3, 8, 15, 0.88);
  backdrop-filter: blur(10px);
}

.vehicle-image-modal.open {
  display: grid;
}

.vehicle-image-modal figure {
  width: min(1120px, 100%);
  margin: 0;
}

.vehicle-image-modal img {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(5, 12, 22, 0.92);
}

.vehicle-image-modal figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  color: var(--text);
  font-weight: 800;
}

.vehicle-image-modal figcaption code {
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--accent);
  background: rgba(5, 12, 22, 0.82);
}

.vehicle-image-close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--text);
  background: rgba(5, 12, 22, 0.92);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.vehicle-card h2 {
  margin: 0;
  font-size: 1.25rem;
}

.vehicle-card p {
  margin: 0;
  color: var(--muted);
}

.vehicle-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vehicle-code-row code {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--accent);
  background: rgba(5, 12, 22, 0.74);
  overflow-wrap: anywhere;
}

.vehicle-code-row button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: #071320;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-shell {
  padding: 74px 0 58px;
}

.admin-login-card {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 30px;
}

.admin-login-card h1,
.admin-hero h1 {
  max-width: none;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.admin-app {
  display: grid;
  gap: 18px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.file-button {
  cursor: pointer;
}

#importContentInput {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.admin-form label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  background: rgba(5, 12, 22, 0.82);
  font: inherit;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form .button {
  margin-top: 16px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-hint,
.form-message,
.lore-era {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-message {
  min-height: 22px;
  color: var(--danger);
  font-weight: 800;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: rgba(7, 15, 27, 0.62);
}

.admin-list h3,
.admin-list p {
  margin: 0;
}

.admin-list p {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-list button {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(242, 103, 79, 0.42);
  border-radius: 8px;
  color: #ffd5cf;
  background: rgba(242, 103, 79, 0.12);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.admin-security-note p {
  margin-bottom: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: rise-in 600ms ease forwards;
}

.reveal.delay-1 {
  animation-delay: 120ms;
}

.reveal.delay-2 {
  animation-delay: 220ms;
}

.reveal.delay-3 {
  animation-delay: 320ms;
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {

  .hero-grid,
  .columns,
  .map-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    position: relative;
    flex-wrap: nowrap;
    min-height: 70px;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    border: 1px solid rgba(244, 247, 251, 0.2);
    border-radius: 10px;
    background: rgba(8, 15, 26, 0.96);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
  }

  .site-header.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    font-size: 0.78rem;
    border-bottom: 0;
    border-radius: 7px;
    background: rgba(34, 219, 191, 0.04);
  }

  .nav-links a.active,
  .nav-links a:hover {
    border-bottom: 0;
    background: rgba(34, 219, 191, 0.16);
  }

  .controls {
    position: static;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

@media (max-width: 640px) {

  .stats,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .brand span {
    display: none;
  }

  h1 {
    max-width: 100%;
  }

  .map-viewport {
    min-height: 420px;
  }
}

.map-page {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--map-background);
}

.map-page .site-header {
  position: fixed;
  left: 16px;
  right: 16px;
  top: 12px;
  z-index: 40;
  border: 1px solid rgba(34, 219, 191, 0.22);
  border-radius: 12px;
  background: rgba(11, 20, 33, 0.74);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.map-page .header-inner {
  width: auto;
  min-height: 56px;
  padding: 0 16px;
}

.map-page .brand-logo {
  width: 42px;
  height: 42px;
}

.map-page .brand span,
.map-page .nav-links a {
  font-size: 0.68rem;
}

.map-app {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  background: var(--map-background);
}

.map-page .map-credit-footer {
  position: relative;
  z-index: 50;
  min-height: 0;
  padding: 8px 0;
  border-top-color: rgba(244, 247, 251, 0.24);
  background: linear-gradient(180deg, rgba(9, 17, 29, 0.98), rgba(13, 24, 37, 1));
}

.map-page .map-credit-footer p {
  margin: 0;
  color: #dce9f8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.map-app .map-viewport {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: contain;
}

.map-app .map-viewport.zooming-wheel .pin-layer,
.map-app .map-viewport.zooming-wheel .zone-layer {
  visibility: hidden;
}

.map-app .map-viewport::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.map-app .map-viewport::-webkit-scrollbar-track {
  background: rgba(7, 15, 27, 0.34);
}

.map-app .map-viewport::-webkit-scrollbar-thumb {
  border: 2px solid rgba(7, 15, 27, 0.34);
  border-radius: 999px;
  background: rgba(34, 219, 191, 0.72);
}

.map-controls {
  position: fixed;
  z-index: 30;
  left: 24px;
  top: 94px;
  bottom: 24px;
  width: min(420px, calc(100vw - 48px));
  padding: 18px;
  overflow: auto;
  scrollbar-gutter: stable;
  border-color: rgba(244, 247, 251, 0.22);
  background: linear-gradient(145deg, rgba(19, 34, 48, 0.72), rgba(70, 88, 63, 0.5));
  backdrop-filter: blur(18px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.filters-collapsed .map-controls {
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(-100% - 32px));
}

.map-controls-head {
  margin-bottom: 14px;
}

.map-controls-head h1 {
  max-width: none;
  margin: 6px 0 4px;
  font-size: 2.05rem;
}

.map-controls-head p {
  margin: 0;
  font-size: 0.92rem;
}

.map-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid rgba(244, 247, 251, 0.18);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(7, 15, 27, 0.44);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.map-app .map-toolbar {
  position: fixed;
  z-index: 35;
  right: 24px;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 72px;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid rgba(244, 247, 251, 0.18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(19, 34, 48, 0.84), rgba(70, 88, 63, 0.62));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transform: translateY(-50%);
}

.map-app .map-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  width: 54px;
  min-height: 44px;
  height: 44px;
  padding: 0 7px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1;
  text-align: center;
  white-space: normal;
}

.map-app .map-toolbar #toggleSidebarButton {
  min-width: 54px;
  width: 54px;
  font-size: 0.68rem;
}

.map-app .map-toolbar #saveSharedMapButton {
  min-width: 54px;
  width: 54px;
  font-size: 0;
}

.map-app .map-toolbar #saveSharedMapButton::before {
  content: 'Save';
  font-size: 0.76rem;
}

.map-app .map-toolbar input {
  width: 28px;
  height: 150px;
  flex: 0 0 150px;
  margin: 2px 0;
  accent-color: var(--accent);
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  writing-mode: vertical-lr;
  direction: rtl;
  transform: none;
}

.map-app .map-toolbar input::-webkit-slider-runnable-track {
  width: 6px;
  border-radius: 999px;
  background: rgba(244, 247, 251, 0.28);
}

.map-app .map-toolbar input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-left: -6px;
  border: 2px solid rgba(244, 247, 251, 0.86);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.map-app .map-toolbar input::-moz-range-track {
  width: 6px;
  border-radius: 999px;
  background: rgba(244, 247, 251, 0.28);
}

.map-app .map-toolbar input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(244, 247, 251, 0.86);
  border-radius: 999px;
  background: var(--accent);
}

.map-app .map-toolbar .map-save-status {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: min(240px, calc(100vw - 32px));
  padding: 7px 9px;
  border: 1px solid rgba(244, 247, 251, 0.18);
  border-radius: 999px;
  background: rgba(7, 15, 27, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  color: #dce9f8;
  font-size: 0.7rem;
  line-height: 1.15;
  text-align: right;
  white-space: normal;
}

.map-app .location-list {
  max-height: min(34vh, 330px);
}

.map-app .location-detail {
  background: rgba(7, 15, 27, 0.5);
}

.map-page .modal {
  padding: 0;
}

.map-page .modal-panel {
  background: linear-gradient(145deg, rgba(80, 95, 72, 0.84), rgba(17, 29, 43, 0.78));
}

.map-page .modal.full-view {
  left: 50%;
  top: 50%;
  width: min(980px, calc(100vw - 32px));
  max-height: min(84vh, 760px);
  display: none;
  align-items: stretch;
  transform: translate(-50%, -50%);
}

.map-page .modal.full-view.open {
  display: flex;
}

.map-page .modal.full-view .modal-panel {
  width: 100%;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(19, 34, 48, 0.8), rgba(70, 88, 63, 0.62));
}

.map-page .modal.full-view .modal-panel::after {
  display: none;
}

.map-page .modal.full-view .modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.context-menu {
  position: fixed;
  z-index: 160;
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(11, 20, 33, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
}

.context-menu.open {
  display: grid;
  gap: 6px;
}

.context-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.context-menu button:hover:not(:disabled) {
  color: #071320;
  background: var(--accent);
}

.context-menu button:disabled {
  color: rgba(244, 247, 251, 0.38);
  cursor: not-allowed;
}

.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.editor-modal.open {
  display: flex;
}

.editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 7, 13, 0.38);
}

.editor-panel {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 32px));
  max-height: min(88vh, 820px);
  overflow: auto;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(19, 34, 48, 0.96), rgba(70, 88, 63, 0.84));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}

.editor-header,
.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.editor-footer {
  border-top: 1px solid var(--line-soft);
  border-bottom: 0;
}

.editor-body {
  padding: 18px;
}

.editor-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 219, 191, 0.24);
  border-radius: 8px;
  color: #dce9f8;
  background: rgba(34, 219, 191, 0.08);
  font-size: 0.88rem;
  line-height: 1.45;
}

.editor-body label {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-body input,
.editor-body select,
.editor-body textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--text);
  background: rgba(5, 12, 22, 0.82);
  font: inherit;
}

.editor-body textarea {
  resize: vertical;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.editor-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-position {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
}

.editor-footer button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  color: var(--text);
  background: rgba(244, 247, 251, 0.12);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.editor-footer button[type='submit'] {
  color: #071320;
  border-color: transparent;
  background: var(--accent);
}

@media (max-width: 960px) {
  .document-layout {
    grid-template-columns: 1fr;
  }

  .doc-sidebar {
    position: static;
  }

  .doc-columns,
  .district-dossier-grid,
  .location-lore-grid,
  .vehicle-grid,
  .vehicle-filters {
    grid-template-columns: 1fr;
  }

  .vehicle-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .map-page .site-header {
    left: 10px;
    right: 10px;
  }

  .map-page .nav-links {
    right: 10px;
    left: 10px;
  }

  .map-controls {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 82px;
    width: auto;
    max-height: min(68vh, 620px);
    border-radius: 14px;
  }

  .filters-collapsed .map-controls {
    opacity: 0;
    visibility: hidden;
    transform: translateY(calc(100% + 30px));
  }

  .map-app .map-toolbar {
    right: 12px;
    bottom: 14px;
    top: auto;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
  }

  .map-app .map-toolbar #zoomInButton,
  .map-app .map-toolbar #zoomOutButton,
  .map-app .map-toolbar #resetMapButton,
  .map-app .map-toolbar #saveSharedMapButton,
  .map-app .map-toolbar #zoomRange {
    display: none;
  }

  .map-app .map-toolbar #toggleSidebarButton {
    min-width: 64px;
    width: 64px;
    min-height: 64px;
    height: 64px;
    border: 1px solid rgba(244, 247, 251, 0.18);
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(19, 34, 48, 0.92), rgba(70, 88, 63, 0.74));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .map-app .map-toolbar .map-save-status {
    right: 12px;
    bottom: 86px;
    top: auto;
    text-align: right;
  }

  .map-page .modal {
    width: min(360px, calc(100vw - 24px));
  }

  .map-page .modal.full-view {
    left: 50%;
    top: 50%;
    width: min(700px, calc(100vw - 24px));
    max-height: min(78vh, 620px);
    transform: translate(-50%, -50%);
  }

  .editor-grid,
  .editor-grid-three,
  .admin-form-grid,
  .admin-form-grid.three,
  .poi-image-grid {
    grid-template-columns: 1fr;
  }

  .poi-carousel {
    gap: 6px;
  }

  .poi-carousel-track {
    grid-auto-columns: 88%;
  }

  .poi-lightbox img {
    width: calc(100vw - 36px);
    max-height: calc(100vh - 140px);
  }

  .lightbox-arrow.prev {
    left: 10px;
  }

  .lightbox-arrow.next {
    right: 10px;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }
}

body.lightbox-open {
  overflow: hidden;
}

@media (pointer: coarse) {
  .map-app .map-toolbar {
    right: 12px;
    bottom: 14px;
    top: auto;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
  }

  .map-app .map-toolbar #zoomInButton,
  .map-app .map-toolbar #zoomOutButton,
  .map-app .map-toolbar #resetMapButton,
  .map-app .map-toolbar #saveSharedMapButton,
  .map-app .map-toolbar #zoomRange {
    display: none;
  }

  .map-app .map-toolbar #toggleSidebarButton {
    min-width: 64px;
    width: 64px;
    min-height: 64px;
    height: 64px;
  }
}