/* Malgarus — Интерактивная карта мира ЗБТ (malgarus.ru/map.php)
   Скоуплено под .page-world-map и .atlas-shell, чтобы не конфликтовать с глобальной шапкой сайта. */

body.page-world-map {
  overflow: hidden;
  height: 100vh;
  background: var(--bg, #08070b);
  user-select: none;
}

.page-world-map .atlas-shell {
  --wm-panel: rgba(14, 13, 20, 0.88);
  --wm-card: rgba(24, 22, 34, 0.72);
  --wm-surface: rgba(255, 255, 255, 0.04);
  --wm-surface-hover: rgba(255, 255, 255, 0.08);
  --wm-line: rgba(255, 255, 255, 0.09);
  --wm-line-2: rgba(255, 255, 255, 0.16);
  --wm-line-gold: rgba(229, 184, 96, 0.36);
  --wm-shadow: 0 24px 64px -20px rgba(0, 0, 0, 0.85);

  position: relative;
  width: 100%;
  height: calc(100vh - var(--topbar-h, 74px));
  overflow: hidden;
  background: radial-gradient(circle at 56% 50%, #162637 0%, #111e2b 58%, #0c151f 100%);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.atlas-shell button,
.atlas-shell input {
  font-family: inherit;
  color: inherit;
}

.atlas-shell .btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid rgba(229, 184, 96, 0.55);
  background: linear-gradient(180deg, rgba(66, 48, 28, 0.92), rgba(36, 26, 16, 0.94));
  color: var(--gold-l);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.atlas-shell .btn-gold:hover {
  border-color: var(--gold-l);
  box-shadow: 0 8px 24px -8px rgba(229, 184, 96, 0.45);
  transform: translateY(-1px);
}

.atlas-shell .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--wm-line);
  background: var(--wm-panel);
  backdrop-filter: blur(14px);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.atlas-shell .btn-ghost:hover {
  border-color: var(--wm-line-gold);
  color: var(--ink);
  background: rgba(26, 23, 36, 0.92);
}

.atlas-shell .btn-ghost.active {
  border-color: var(--gold);
  color: var(--gold-l);
  background: rgba(229, 184, 96, 0.14);
}

/* ==================== VIEWPORT & WORLD STAGE ==================== */
.atlas-shell .viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  outline: none;
}

.atlas-shell .viewport.dragging { cursor: grabbing; }

.atlas-shell .world-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 3280px;
  height: 1600px;
  transform-origin: 0 0;
}

.atlas-shell .world-bg {
  position: absolute;
  inset: 0;
  width: 3280px;
  height: 1600px;
  max-width: none;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-mask-image: radial-gradient(ellipse 96% 94% at 50% 50%, #000 76%, transparent 100%);
  mask-image: radial-gradient(ellipse 96% 94% at 50% 50%, #000 76%, transparent 100%);
}

.atlas-shell .world-svg {
  position: absolute;
  inset: 0;
  width: 3280px;
  height: 1600px;
  overflow: visible;
}

/* Territory Polygons */
.territory-path {
  fill-opacity: 0.34;
  stroke: rgba(247, 223, 166, 0.52);
  stroke-width: 2.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill-opacity 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease;
}

.territory-path:hover {
  fill-opacity: 0.54;
  stroke: #f7dfa6;
  stroke-width: 3;
}

.territory-path.selected {
  fill-opacity: 0.62;
  stroke: #ffe5a3;
  stroke-width: 3.6;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 12px rgba(229, 184, 96, 0.65));
}

/* Merged Kingdom Polygons */
#kingdoms-group { display: none; }
#kingdom-pins-layer { display: none; }

.atlas-shell[data-mode="kingdoms"] #kingdoms-group { display: block; }
.atlas-shell[data-mode="kingdoms"] #kingdom-pins-layer { display: block; }
.atlas-shell[data-mode="kingdoms"] .territory-path.in-kingdom { display: none; }
.atlas-shell[data-mode="kingdoms"] .territory-path:not(.in-kingdom) {
  fill-opacity: 0.14;
  stroke: rgba(255, 255, 255, 0.24);
  stroke-width: 1.4;
  stroke-dasharray: 4 3;
}
.atlas-shell[data-mode="kingdoms"] .territory-path:not(.in-kingdom):hover {
  fill-opacity: 0.34;
  stroke: #f7dfa6;
}
.atlas-shell[data-mode="kingdoms"] #pins-layer .map-pin.in-kingdom { display: none !important; }
.atlas-shell[data-mode="kingdoms"] #pins-layer .map-pin:not(.in-kingdom) { opacity: 0.55; }
.atlas-shell[data-mode="kingdoms"] #pins-layer .map-pin:not(.in-kingdom):hover { opacity: 1; }

.kingdom-path {
  fill-opacity: 0.44;
  stroke: rgba(247, 223, 166, 0.85);
  stroke-width: 2.8;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill-opacity 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease, filter 0.2s ease;
}

.kingdom-path:hover {
  fill-opacity: 0.62;
  stroke: #fff0c2;
  stroke-width: 3.6;
}

.kingdom-path.selected {
  fill-opacity: 0.68;
  stroke: #ffe5a3;
  stroke-width: 4.2;
  filter: drop-shadow(0 0 16px rgba(229, 184, 96, 0.78));
}

.map-pin.is-merged-kingdom .pin-shield {
  width: 38px;
  height: 44px;
}

.map-pin.is-merged-kingdom .pin-label {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-color: rgba(229, 184, 96, 0.65);
  background: rgba(14, 12, 20, 0.92);
  color: var(--gold-l);
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-pin.is-merged-kingdom .pin-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-2);
  margin-left: 4px;
}

/* Map Modes */
.atlas-shell[data-mode="terrain"] .territory-path {
  fill-opacity: 0.04;
  stroke: rgba(247, 223, 166, 0.28);
  stroke-width: 1.4;
}
.atlas-shell[data-mode="terrain"] .territory-path:hover {
  fill-opacity: 0.22;
  stroke: #f7dfa6;
}
.atlas-shell[data-mode="terrain"] .territory-path.selected {
  fill-opacity: 0.32;
  stroke: #ffe5a3;
  stroke-width: 3.2;
}

.atlas-shell[data-mode="diplomacy"] .territory-path {
  fill: #4b5563 !important;
  fill-opacity: 0.24;
  stroke: rgba(255, 255, 255, 0.18);
}
.atlas-shell[data-mode="diplomacy"] .territory-path.diplo-self {
  fill: #e5b860 !important;
  fill-opacity: 0.58;
  stroke: #fff1c2;
  stroke-width: 3.6;
}
.atlas-shell[data-mode="diplomacy"] .territory-path.diplo-ally {
  fill: #34b88c !important;
  fill-opacity: 0.50;
  stroke: #7ff0c6;
  stroke-width: 2.8;
}
.atlas-shell[data-mode="diplomacy"] .territory-path.diplo-enemy {
  fill: #d94136 !important;
  fill-opacity: 0.54;
  stroke: #ff9c94;
  stroke-width: 2.8;
}

/* Screen-space 1:1 Labels & Emblems */
.sea-labels-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sea-label {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: rgba(229, 210, 172, 0.34);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.map-pin {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.18s ease;
}

.map-pin .pin-shield {
  width: 26px;
  height: 30px;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.82));
  transition: transform 0.16s ease;
}

.map-pin.is-kingdom .pin-shield { width: 32px; height: 37px; }
.map-pin:hover .pin-shield,
.map-pin.selected .pin-shield {
  transform: scale(1.18);
  filter: drop-shadow(0 0 10px rgba(229, 184, 96, 0.85));
}

.map-pin .pin-label {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(11, 10, 16, 0.88);
  border: 1px solid rgba(229, 184, 96, 0.36);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  transition: border-color 0.18s, background 0.18s, color 0.18s;
}

.map-pin.is-war .pin-label { border-color: rgba(255, 110, 96, 0.6); }
.map-pin.selected .pin-label {
  background: rgba(42, 30, 16, 0.94);
  border-color: var(--gold-l);
  color: var(--gold-l);
}

.atlas-shell.zoom-far .map-pin.is-vassal .pin-label,
.atlas-shell.zoom-far .map-pin.is-independent .pin-label { display: none; }
.atlas-shell.zoom-far .map-pin.selected .pin-label,
.atlas-shell.zoom-far .map-pin:hover .pin-label { display: block; }

/* ==================== FLOATING HUD ==================== */
.top-center-bar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: var(--wm-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--wm-line);
  box-shadow: var(--wm-shadow);
  transition: opacity 0.25s, transform 0.25s;
}

.mode-btn {
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.mode-btn:hover { color: var(--ink); background: var(--wm-surface); }
.mode-btn.active {
  color: var(--gold-l);
  background: rgba(229, 184, 96, 0.14);
  border-color: rgba(229, 184, 96, 0.38);
}

/* ==================== LEFT SIDEBAR ==================== */
.atlas-shell .sidebar {
  position: absolute;
  top: 16px;
  left: 16px;
  bottom: 16px;
  width: 316px;
  z-index: 22;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--wm-panel);
  backdrop-filter: blur(18px);
  border: 1px solid var(--wm-line);
  box-shadow: var(--wm-shadow);
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
}

.atlas-shell .sidebar::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 90px;
  background: linear-gradient(180deg, rgba(229, 184, 96, 0.10), transparent);
  pointer-events: none;
}

.atlas-shell .sidebar.collapsed {
  transform: translateX(-340px);
  opacity: 0;
  pointer-events: none;
}

.sidebar-head {
  position: relative;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--wm-line);
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sidebar-title {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.02em;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--wm-line);
  background: var(--wm-surface);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
}

.icon-btn:hover { border-color: var(--wm-line-gold); color: var(--gold-l); }

.continent-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--wm-line);
  margin-bottom: 10px;
}

.cont-tab {
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.16s;
}

.cont-tab:hover { color: var(--ink); }
.cont-tab.active {
  background: rgba(229, 184, 96, 0.18);
  color: var(--gold-l);
  box-shadow: inset 0 0 0 1px rgba(229, 184, 96, 0.34);
}

.search-wrap { position: relative; margin-bottom: 10px; }
.search-wrap svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 10px;
  border: 1px solid var(--wm-line);
  background: rgba(0, 0, 0, 0.32);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.18s;
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--wm-line-gold); }

.filter-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--wm-line);
  background: var(--wm-surface);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover { border-color: var(--wm-line-2); color: var(--ink); }
.chip.active {
  border-color: var(--gold);
  background: rgba(229, 184, 96, 0.15);
  color: var(--gold-l);
}

.world-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--wm-line);
  background: rgba(0, 0, 0, 0.22);
}

.w-stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.w-stat strong { font-size: 15px; font-weight: 700; color: var(--gold-l); }
.w-stat span { font-size: 10.5px; color: var(--muted); }

.territory-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.territory-list::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar { width: 6px; }
.territory-list::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 999px; }

.t-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.t-item:hover { background: var(--wm-surface-hover); border-color: var(--wm-line); }
.t-item.active { background: rgba(229, 184, 96, 0.12); border-color: var(--wm-line-gold); }
.t-item-shield { width: 28px; height: 32px; flex-shrink: 0; }
.t-item-info { flex: 1; min-width: 0; }
.t-item-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.t-item-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.t-item-cont {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--wm-surface);
  color: var(--muted);
  flex-shrink: 0;
}

.open-sidebar-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 21;
  display: none;
}

.atlas-shell .sidebar.collapsed + .open-sidebar-btn { display: inline-flex; }

/* ==================== RIGHT INSPECTOR DRAWER ==================== */
.atlas-shell .drawer {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: 392px;
  max-width: calc(100vw - 32px);
  z-index: 25;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--wm-panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--wm-line-gold);
  box-shadow: var(--wm-shadow);
  overflow: hidden;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
}

.atlas-shell .drawer.hidden {
  transform: translateX(430px);
  opacity: 0;
  pointer-events: none;
}

.drawer-hero {
  position: relative;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--wm-line);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: linear-gradient(180deg, rgba(229, 184, 96, 0.13), rgba(14, 13, 20, 0.2));
}

.drawer-shield-box {
  width: 68px;
  height: 78px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.7));
}

.drawer-head-text { flex: 1; min-width: 0; padding-right: 26px; }
.drawer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }

.atlas-shell .badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--wm-line);
  background: var(--wm-surface);
  color: var(--ink-2);
}

.atlas-shell .badge.kingdom { color: var(--gold-l); border-color: rgba(229, 184, 96, 0.45); background: rgba(229, 184, 96, 0.14); }
.atlas-shell .badge.vassal  { color: var(--sapphire); border-color: rgba(110, 168, 245, 0.4); background: rgba(110, 168, 245, 0.12); }
.atlas-shell .badge.war     { color: var(--danger); border-color: rgba(255, 124, 104, 0.48); background: rgba(201, 70, 60, 0.18); }
.atlas-shell .badge.independent { color: var(--emerald); border-color: rgba(79, 209, 147, 0.38); background: rgba(79, 209, 147, 0.12); }

.drawer-title {
  font-family: var(--f-display);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 4px;
  color: var(--ink);
}

.drawer-kingdom { font-size: 13px; color: var(--gold); font-weight: 600; }
.drawer-close { position: absolute; top: 14px; right: 14px; }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  user-select: text;
}

.motto-box {
  position: relative;
  padding: 12px 14px 12px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(229, 184, 96, 0.11), rgba(229, 184, 96, 0.02));
  border: 1px solid rgba(229, 184, 96, 0.24);
  border-left: 3px solid var(--gold);
}

.motto-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 3px;
}

.motto-text {
  font-family: var(--f-display);
  font-size: 18px;
  font-style: italic;
  font-weight: 600;
  color: var(--gold-l);
  line-height: 1.28;
}

.metrics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.metric-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--wm-card);
  border: 1px solid var(--wm-line);
}
.metric-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 3px; }
.metric-val { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.metric-sub { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

.sec-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 8px;
}

.tags-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.atlas-shell .tag {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--wm-surface);
  border: 1px solid var(--wm-line);
  font-size: 12px;
  color: var(--ink);
}
.atlas-shell .tag.biome {
  border-color: rgba(229, 184, 96, 0.28);
  color: var(--gold-l);
  background: rgba(229, 184, 96, 0.08);
}

.diplo-group { display: flex; flex-wrap: wrap; gap: 6px; }
.diplo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--wm-line);
  background: var(--wm-surface);
  color: var(--ink);
  transition: transform 0.15s, border-color 0.15s;
}
.diplo-btn:hover { transform: translateY(-1px); border-color: var(--wm-line-gold); }
.diplo-btn.ally  { border-color: rgba(79, 209, 147, 0.4); background: rgba(79, 209, 147, 0.1); color: #9ff0c8; }
.diplo-btn.enemy { border-color: rgba(255, 124, 104, 0.45); background: rgba(201, 70, 60, 0.14); color: #ffb3a8; }

.chronicle-list { display: flex; flex-direction: column; gap: 8px; }
.chronicle-item {
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid var(--wm-line);
}
.chronicle-date { font-size: 10.5px; font-weight: 700; color: var(--gold); margin-bottom: 2px; }
.chronicle-text { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }

.drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--wm-line);
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.28);
}
.drawer-footer .btn-gold { flex: 1; justify-content: center; }

/* ==================== BOTTOM CONTROLS ==================== */
.bottom-controls {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 14px;
  background: var(--wm-panel);
  backdrop-filter: blur(16px);
  border: 1px solid var(--wm-line);
  box-shadow: var(--wm-shadow);
  transition: opacity 0.25s;
}

.coords-readout {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  padding: 0 8px;
  border-right: 1px solid var(--wm-line);
  white-space: nowrap;
}

.zoom-group { display: flex; align-items: center; gap: 4px; }
.zoom-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--wm-line);
  background: var(--wm-surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.zoom-btn:hover { border-color: var(--wm-line-gold); color: var(--gold-l); }
.zoom-label {
  min-width: 46px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-l);
  font-variant-numeric: tabular-nums;
}

/* ==================== TOOLTIP ==================== */
.map-tooltip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  max-width: 280px;
  padding: 10px 13px;
  border-radius: 12px;
  background: rgba(12, 11, 18, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--wm-line-gold);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.72);
  opacity: 0;
  transform: translate(14px, 14px);
  transition: opacity 0.14s ease;
}
.map-tooltip.visible { opacity: 1; }
.tt-title { font-family: var(--f-display); font-size: 18px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.tt-sub { font-size: 11.5px; font-weight: 600; color: var(--gold); margin: 2px 0 5px; }
.tt-motto { font-family: var(--f-display); font-style: italic; font-size: 14.5px; color: var(--ink-2); line-height: 1.25; }
.tt-hint { margin-top: 6px; font-size: 10.5px; color: var(--muted); }

/* ==================== CLEAN VIEW ==================== */
.atlas-shell.clean-ui .sidebar,
.atlas-shell.clean-ui .drawer,
.atlas-shell.clean-ui .top-center-bar,
.atlas-shell.clean-ui .open-sidebar-btn {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 960px) {
  .atlas-shell .sidebar { width: 280px; }
  .atlas-shell .drawer { width: 340px; }
  .coords-readout { display: none; }
}

@media (max-width: 680px) {
  .top-center-bar { top: 10px; padding: 4px; }
  .mode-btn { padding: 6px 9px; font-size: 11.5px; }
  .atlas-shell .sidebar {
    top: 60px;
    left: 10px;
    right: 10px;
    bottom: 70px;
    width: auto;
  }
  .atlas-shell .drawer {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 76vh;
  }
  .atlas-shell .drawer.hidden { transform: translateY(110%); }
}
