/* =========================================================================
   RazerF5 — self-hosted so every visitor sees it, not just machines where it
   happens to be installed. Licensed under the SIL Open Font License, which
   permits embedding; assets/fonts/LICENSE.txt ships alongside the files as the
   licence requires. Covers Latin, Cyrillic and digits (501 glyphs) — CJK falls
   back to the system font, which is why a fallback chain is still declared.
   ========================================================================= */
@font-face {
  font-family: 'RazerF5';
  src: url('../../assets/fonts/RazerF5-Thin.woff2') format('woff2'),
       url('../../assets/fonts/RazerF5-Thin.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RazerF5';
  src: url('../../assets/fonts/RazerF5-Regular.woff2') format('woff2'),
       url('../../assets/fonts/RazerF5-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RazerF5';
  src: url('../../assets/fonts/RazerF5-Italic.woff2') format('woff2'),
       url('../../assets/fonts/RazerF5-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'RazerF5';
  src: url('../../assets/fonts/RazerF5-Semibold.woff2') format('woff2'),
       url('../../assets/fonts/RazerF5-Semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RazerF5';
  src: url('../../assets/fonts/RazerF5-Bold.woff2') format('woff2'),
       url('../../assets/fonts/RazerF5-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RazerF5';
  src: url('../../assets/fonts/RazerF5-BoldItalic.woff2') format('woff2'),
       url('../../assets/fonts/RazerF5-BoldItalic.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg-main: #07090e;
  --bg-surface: #0e131d;
  --bg-card: #141a27;
  --bg-card-hover: #1b2334;
  --bg-elevated: #212b3f;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(229, 169, 60, 0.35);
  
  --color-primary: #e5a93c;
  --color-primary-hover: #f5b94e;
  --color-primary-dim: rgba(229, 169, 60, 0.15);
  
  --color-pmc: #22c55e;
  --color-pmc-dim: rgba(34, 197, 94, 0.15);
  --color-scav: #fb923c;
  --color-scav-dim: rgba(251, 146, 60, 0.15);
  --color-boss: #ef4444;
  --color-boss-dim: rgba(239, 68, 68, 0.15);
  --color-quest: #f59e0b;
  --color-quest-dim: rgba(245, 158, 11, 0.18);
  --color-loot: #38bdf8;
  --color-stash: #a855f7;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #e5a93c;
  
  --font-hud: 'RazerF5', 'Chakra Petch', sans-serif;
  /* Chinese has no glyphs in RazerF5 (501 glyphs, Latin + Cyrillic only), so the
     system font picks up CJK text after it — the chain must stay. */
  --font-ui: 'RazerF5', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --sidebar-width: 390px;
  --topbar-height: 56px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --shadow-hud: 0 4px 20px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.1);
  --glow-primary: 0 0 16px rgba(229, 169, 60, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* text is selectable by default -- people copy quest names, contacts and coordinates.
     Selection is switched off only where a drag means something else (the map, controls),
     see the rule below. */
  user-select: text;
}

/* Dragging these should pan, draw or press -- never paint a text selection */
.leaflet-container,
.topbar,
.landing-header,
.sidebar-nav-tabs,
button,
.btn-tactical,
.map-dropdown-btn,
.map-dropdown-item,
.lang-dropdown-item,
.landing-tile,
.filter-item-toggle,
.draw-tool-btn,
.color-swatch,
.tactical-text-pin,
.leaflet-marker-icon {
  user-select: none;
}

/* ...but text inside map popups and dialogs stays copyable */
.leaflet-popup-content,
.modal-dialog,
.tarkov-popup-card {
  user-select: text;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* App Container */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* #app and the landing screen are mutually exclusive: exactly one is mounted */
body.on-landing #app {
  display: none;
}
body:not(.on-landing) .landing-screen {
  display: none;
}

/* ==========================================================================
   PROFILE SCREEN
   ========================================================================== */
.profile-screen {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: 0;
  z-index: 1800;
  overflow-y: auto;
  background:
    radial-gradient(circle at 20% 0%, rgba(229, 169, 60, 0.08), transparent 45%),
    var(--bg-main);
}
.profile-screen.open {
  display: flex;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 14, 23, 0.9);
  position: sticky;
  top: 0;
  z-index: 5;
}

.profile-header-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-hud);
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
}

.profile-main {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.profile-card-title {
  margin: 0 0 16px;
  font-family: var(--font-hud);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.profile-identity {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.profile-avatar-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--color-primary);
  background: var(--bg-card) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hud);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}

.profile-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.profile-identity-meta {
  flex: 1;
  min-width: 200px;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-name {
  font-family: var(--font-hud);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

.role-chip {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-hud);
  letter-spacing: 0.3px;
}

.profile-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-hud);
}
/* same colour language as the header chip: red owner, blue admin, green moderator */
.profile-role-badge.role-superadmin {
  background: rgba(239, 68, 68, 0.18); color: #f87171; border-color: rgba(239, 68, 68, 0.4);
}
.profile-role-badge.role-admin {
  background: rgba(56, 189, 248, 0.18); color: #38bdf8; border-color: rgba(56, 189, 248, 0.4);
}
.profile-role-badge.role-moderator {
  background: rgba(34, 197, 94, 0.18); color: #22c55e; border-color: rgba(34, 197, 94, 0.4);
}
.profile-role-badge:empty {
  display: none;
}

.profile-meta-line {
  margin-top: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-label {
  font-family: var(--font-hud);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.profile-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.profile-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.profile-progress-row:last-child {
  border-bottom: none;
}

.profile-progress-name {
  min-width: 150px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.profile-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.profile-progress-fill {
  height: 100%;
  background: var(--color-primary);
}

.profile-progress-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  min-width: 62px;
  text-align: right;
}

.profile-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-primary);
}
.profile-checkbox input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-danger {
  border-color: rgba(239, 68, 68, 0.35);
}
.profile-danger .profile-card-title {
  color: #f87171;
}

.profile-list-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
}
.profile-list-row:last-child {
  border-bottom: none;
}

.profile-list-main {
  flex: 1;
  min-width: 0;
}

.profile-list-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.profile-tag {
  font-size: 0.65rem;
  font-family: var(--font-hud);
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.profile-tag.current {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.profile-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.profile-stat-value {
  font-family: var(--font-hud);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Avatar shown next to the nickname in the header buttons */
.header-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-medium);
  flex-shrink: 0;
}

@media (max-width: 620px) {
  .profile-identity {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-avatar-block {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   LANDING SCREEN
   ========================================================================== */
.landing-screen {
  display: flex;
  flex-direction: column;
  /* body is a fixed-height flex column with overflow hidden, so the landing takes the
     full viewport and scrolls inside itself rather than growing past it */
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 0%, rgba(229, 169, 60, 0.10), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.08), transparent 45%),
    var(--bg-main);
}

.landing-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.landing-nav::-webkit-scrollbar {
  display: none;
}

.landing-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.landing-nav-item:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}
.landing-nav-item.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: rgba(229, 169, 60, 0.12);
}
.landing-nav-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.landing-soon {
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  letter-spacing: 0;
}

.landing-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.landing-announcements:empty {
  display: none;
}
.landing-announcements {
  padding: 14px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.landing-announcement {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(185, 28, 28, 0.9), rgba(127, 29, 29, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.88rem;
}

.landing-main {
  flex: 1;
  padding: 48px 24px 40px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.landing-title {
  font-family: var(--font-hud);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  text-align: center;
}

.landing-tagline {
  margin: 14px auto 0;
  max-width: 720px;
  text-align: center;
  color: var(--color-primary);
  font-family: var(--font-hud);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 600;
  line-height: 1.4;
}

.landing-subtitle {
  margin: 16px auto 0;
  max-width: 760px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.landing-tiles {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.landing-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.landing-tile:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 18px rgba(229, 169, 60, 0.2);
}
.landing-tile:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.landing-tile-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #0b0f18;
  /* previews sit dimmed so the tile text stays readable, and light up on hover to
     confirm which one the cursor is on */
  filter: brightness(0.55) saturate(0.85);
  transition: filter 0.25s ease, transform 0.25s ease;
}

.landing-tile:hover .landing-tile-image,
.landing-tile:focus-visible .landing-tile-image {
  filter: brightness(1) saturate(1);
  transform: scale(1.03);
}

.landing-tile-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.landing-tile-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.landing-tile-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.landing-tile-meta {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.landing-tile-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: var(--font-hud);
}

.landing-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-top: 1px solid var(--border-subtle);
}

.brand-logo-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.brand-logo-btn:hover {
  color: var(--color-primary);
}

@media (max-width: 700px) {
  .landing-header {
    flex-wrap: wrap;
    padding: 12px 16px;
  }
  .landing-nav {
    order: 3;
    width: 100%;
    flex: 1 0 100%;
  }
  .landing-main {
    padding: 32px 16px 28px;
  }
  .landing-tiles {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
}

/* =========================================================================
   TOP NAVIGATION BAR
   ========================================================================= */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 1000;
  gap: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 1px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.brand-badge {
  background: var(--color-primary-dim);
  color: var(--color-primary);
  border: 1px solid var(--border-accent);
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

/* Topbar Map Tabs with Scroll Controls */
.map-dropdown-container {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.map-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 230px;
  max-width: 320px;
  padding: 7px 12px;
  background: rgba(229, 169, 60, 0.12);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-family: var(--font-hud);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.map-dropdown-btn:hover {
  background: rgba(229, 169, 60, 0.2);
  box-shadow: 0 0 12px rgba(229, 169, 60, 0.25);
}

.map-dropdown-icon {
  font-size: 1rem;
  line-height: 1;
}

.map-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-dropdown-chevron {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.map-dropdown-container.open .map-dropdown-chevron {
  transform: rotate(180deg);
}

.tab-badge {
  font-size: 0.65rem;
  background: var(--color-primary);
  padding: 2px 6px;
  border-radius: 10px;
  color: #000;
  font-weight: 700;
  flex-shrink: 0;
}

.map-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 300px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  padding: 4px;
  z-index: 2500;
  animation: dropdown-fade 0.15s ease-out;
}

.map-dropdown-menu.open {
  display: flex;
}

.map-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}
.map-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(229, 169, 60, 0.3);
  border-radius: 4px;
}

.map-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-hud);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--color-primary);
}

.map-dropdown-item.active {
  background: rgba(229, 169, 60, 0.15);
  color: var(--color-primary);
  font-weight: 700;
}

.map-dropdown-item .map-item-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.map-dropdown-item .map-item-names {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.map-dropdown-item .map-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-dropdown-item .map-item-sub {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-dropdown-item .map-item-badge {
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.map-dropdown-item.active .map-item-badge {
  background: var(--color-primary);
  color: #000;
  font-weight: 700;
}

/* Topbar Actions */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Narrow viewports: collapse secondary buttons to icons so the last button
   (Share Raid) is never pushed past the right edge of the window. */
@media (max-width: 1250px) {
  #label-about,
  #label-feedback,
  #label-admin {
    display: none;
  }
  #btn-open-about,
  #btn-open-feedback,
  #btn-open-admin {
    padding: 7px 10px;
  }
}

@media (max-width: 1000px) {
  .brand-logo span {
    display: none;
  }
}

/* Language Dropdown */
.lang-dropdown-container {
  position: relative;
}

.lang-dropdown-btn {
  padding: 6px 10px;
  gap: 6px;
  cursor: pointer;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 170px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.85);
  display: none;
  flex-direction: column;
  padding: 4px;
  z-index: 2500;
  animation: dropdown-fade 0.15s ease-out;
}

.lang-dropdown-menu.open {
  display: flex;
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--text-primary);
  font-family: var(--font-hud);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.lang-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--color-primary);
}

.lang-dropdown-item.active {
  background: rgba(229, 169, 60, 0.15);
  color: var(--color-primary);
  font-weight: 700;
}

.lang-dropdown-item .lang-flag {
  font-size: 1.15rem;
  line-height: 1;
}

.lang-dropdown-item .lang-check {
  margin-left: auto;
  color: var(--color-primary);
  font-size: 0.85rem;
}

@keyframes dropdown-fade {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn-tactical {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-tactical:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
}

.btn-tactical.primary {
  background: var(--color-primary);
  border-color: var(--color-primary-hover);
  color: #000;
  font-weight: 700;
  box-shadow: var(--glow-primary);
}
.btn-tactical.primary:hover {
  background: var(--color-primary-hover);
}

.btn-tactical.active {
  background: var(--color-primary-dim);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* =========================================================================
   ADMIN ACTION BUTTONS
   The admin panel used .btn / .btn-primary / .btn-danger / .btn-success, none of
   which existed in the stylesheet -- the buttons were held together by inline
   styles alone. They now share the tactical look: tinted surface, matching border,
   and a hover that fills the colour in so it is obvious what is about to happen.
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-family: var(--font-hud);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: background 0.15s ease, border-color 0.15s ease,
              color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}
.btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
  transform: translateY(-1px);
}
.btn:active:not(:disabled) {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.74rem;
  letter-spacing: 0.3px;
}

/* Golden — the site's own accent, used for confirming and saving */
.btn-primary {
  background: rgba(229, 169, 60, 0.15);
  border-color: rgba(229, 169, 60, 0.5);
  color: var(--color-primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #000;
  box-shadow: 0 0 14px rgba(229, 169, 60, 0.45);
}

/* Red — destructive: ban, delete */
.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}
.btn-danger:hover:not(:disabled) {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.45);
}

/* Green — restoring and confirming a positive outcome: unban, save role */
.btn-success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
  color: #22c55e;
}
.btn-success:hover:not(:disabled) {
  background: #22c55e;
  border-color: #22c55e;
  color: #04140a;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.45);
}

/* Blue — neutral secondary actions */
.btn-info {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}
.btn-info:hover:not(:disabled) {
  background: #38bdf8;
  border-color: #38bdf8;
  color: #04121c;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}

/* =========================================================================
   MAIN WORKSPACE (SIDEBAR + MAP)
   ========================================================================= */
.main-workspace {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* =========================================================================
   LEFT SIDEBAR (CONTROL CENTER)
   ========================================================================= */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 500;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed {
  transform: translateX(calc(-1 * var(--sidebar-width)));
  /* transform alone only moves the panel visually -- it keeps its slot in the layout,
     leaving a dead strip where the map should be. The negative margin gives the space
     back so the map really fills the screen. */
  margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-toggle-btn {
  position: absolute;
  top: 14px;
  left: var(--sidebar-width);
  z-index: 600;
  width: 28px;
  height: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s;
}
.sidebar.collapsed + .sidebar-toggle-btn,
.sidebar-toggle-btn.collapsed {
  left: 0;
}
.sidebar-toggle-btn:hover {
  background: var(--bg-card);
  color: var(--color-primary);
}

/* Sidebar Tab Navigation */
.sidebar-nav-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
  padding: 4px 6px 0;
  gap: 4px;
}

.sidebar-nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-nav-tab:hover {
  color: var(--text-primary);
}

.sidebar-nav-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: rgba(229, 169, 60, 0.04);
}

.sidebar-content-pane {
  flex: 1;
  overflow-y: auto;
  display: none;
  flex-direction: column;
}
.sidebar-content-pane.active {
  display: flex;
}

/* =========================================================================
   PANE 1: QUESTS & ROUTE
   ========================================================================= */
.quest-search-bar {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper svg {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus {
  border-color: var(--color-primary);
}

/* Trader Filter Pills (Wrapped for easy clicking on all screen sizes) */
.trader-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 4px;
}

.trader-pill {
  padding: 4px 9px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-size: 0.72rem;
  font-family: var(--font-hud);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.trader-pill:hover,
.trader-pill.active {
  background: var(--color-primary-dim);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Route Itinerary Summary Box */
.route-summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  margin: 12px;
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-title {
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.route-steps-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.route-step-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
  font-size: 0.78rem;
}

.route-step-num {
  background: var(--color-primary);
  color: #000;
  font-weight: 700;
  font-family: var(--font-hud);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.route-step-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.route-step-title {
  font-weight: 600;
  color: var(--text-primary);
}
.route-step-desc {
  color: var(--text-secondary);
  font-size: 0.72rem;
}

/* Quests List */
.quests-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quest-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quest-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.quest-card.selected {
  border-color: var(--color-primary);
  background: rgba(229, 169, 60, 0.08);
  box-shadow: 0 0 10px rgba(229, 169, 60, 0.15);
}

.quest-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quest-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.trader-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-family: var(--font-hud);
}

.quest-objectives-preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 24px;
}

.quest-objective-row {
  font-size: 0.74rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.quest-objective-row::before {
  content: '•';
  color: var(--color-primary);
}

/* =========================================================================
   PANE 2: FILTERS (POIs)
   ========================================================================= */
.filters-pane {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filters-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.btn-filter-quick {
  padding: 6px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-family: var(--font-hud);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  white-space: nowrap;
}
.btn-filter-quick:hover {
  background: var(--bg-card-hover);
  color: var(--color-primary);
  border-color: var(--border-accent);
}

.filter-category-group {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.filter-group-header {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-hud);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.group-toggle-actions {
  display: flex;
  gap: 4px;
}

.btn-group-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-family: var(--font-hud);
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-group-action:hover {
  background: var(--color-primary-dim);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.filter-items-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.filter-item-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 0.8rem;
}

.filter-item-toggle:hover {
  background: rgba(255, 255, 255, 0.04);
}

.filter-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.filter-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.filter-count-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* =========================================================================
   PANE 3: TACTICAL DRAWING
   ========================================================================= */
.draw-pane {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.draw-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.draw-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.draw-tool-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.draw-tool-btn.active {
  background: var(--color-primary-dim);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.color-picker-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-swatches-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.color-swatch:hover {
  transform: scale(1.2);
}
.color-swatch.active {
  border-color: #fff;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

/* =========================================================================
   MAP CANVAS & LEAFLET CUSTOMIZATIONS
   ========================================================================= */
.map-wrapper {
  flex: 1;
  position: relative;
  height: 100%;
  width: 100%;
  background: #05070a;
  overflow: hidden;
}

#map-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: #05070a;
}

#map-container.cursor-eraser,
#map-container.cursor-eraser .leaflet-grab,
#map-container.cursor-eraser .leaflet-interactive {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2'%3E%3Cpath d='M7 21L20 8l-4-4L3 17l4 4z'/%3E%3Cline x1='14' y1='6' x2='18' y2='10'/%3E%3Cline x1='3' y1='21' x2='11' y2='21'/%3E%3C/svg%3E") 4 20, crosshair !important;
}

#map-container.cursor-crosshair,
#map-container.cursor-crosshair .leaflet-grab {
  cursor: crosshair !important;
}

/* Leaflet background & canvas */
.leaflet-container {
  background: #05070a !important;
  font-family: var(--font-ui) !important;
}

/* Custom Marker Styling */
.tarkov-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  background: var(--bg-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.tarkov-marker svg {
  width: 15px;
  height: 15px;
  display: block;
}

.tarkov-marker:hover {
  transform: scale(1.3);
  z-index: 1000 !important;
}

.tarkov-marker.selected-spawn-highlight {
  background: #22c55e !important;
  border-color: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.95) !important;
  animation: pulse-spawn 1.5s infinite;
}

.tarkov-marker.selected-extract-highlight {
  background: #0ea5e9 !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(14, 165, 233, 0.95) !important;
  animation: pulse-extract 1.5s infinite;
}

.tarkov-marker.selected-quest-highlight {
  background: #f87171 !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px rgba(248, 113, 113, 0.95), 0 2px 8px rgba(0, 0, 0, 0.8) !important;
  animation: pulse-quest 1.5s infinite;
}

.tarkov-marker.completed-quest-highlight {
  background: #22c55e !important;
  border-color: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.9), 0 2px 8px rgba(0, 0, 0, 0.8) !important;
}

.tarkov-marker.route-waypoint {
  background: #f87171;
  border-color: #ffffff;
  color: #ffffff;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.8rem;
  width: 32px;
  height: 32px;
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.9);
}

.btn-remove-route-step {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}

.btn-remove-route-step:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.1);
}

/* Mark a route step's quest done without leaving the route panel */
.btn-complete-route-step {
  background: transparent;
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}
.btn-complete-route-step:hover {
  background: #22c55e;
  color: #000;
  border-color: #22c55e;
  transform: scale(1.1);
}
.btn-complete-route-step.completed {
  background: #22c55e;
  color: #000;
  border-color: #22c55e;
}
.btn-complete-route-step.completed:hover {
  background: transparent;
  color: #22c55e;
}

/* Marching dashes along the route polyline.
   dashArray is "8, 8", so one full pattern is 16 units; shifting the offset by -16
   over one cycle makes the motion seamless and pointed towards the extract. */
.route-line-animated {
  animation: route-dash-march 1s linear infinite;
}

@keyframes route-dash-march {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -16; }
}

@media (prefers-reduced-motion: reduce) {
  .route-line-animated {
    animation: none;
  }
}

@keyframes pulse-spawn {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

@keyframes pulse-extract {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

@keyframes pulse-quest {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

/* Custom Leaflet Popups */
.leaflet-popup { z-index: 850 !important; }

.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-accent) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-accent) !important;
}

.tarkov-popup-card {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 240px;
  max-width: 320px;
}

.popup-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* the coloured bar is an inline border-left set per category in map-engine.js —
     keep the label off it */
  padding-left: 9px;
  font-family: var(--font-hud);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
}

.popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.popup-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: pre-line;
  max-height: 150px;
  overflow-y: auto;
}

.popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

/* HUD Overlay: Bottom Bar (Coordinates, Scale, Zoom) */
.hud-coordinates {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(14, 19, 29, 0.85);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Floating Controls (Top Right of Map) */
.floating-map-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 800;
}

.floating-btn {
  width: 36px;
  height: 36px;
  background: rgba(14, 19, 29, 0.85);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.floating-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* =========================================================================
   MODALS (Share Link, Export)
   ========================================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}
.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  width: 90%;
  max-width: 480px;
  max-height: 100%;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), var(--glow-primary);
  animation: modal-enter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-enter {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-family: var(--font-hud);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
}
.modal-close-btn:hover {
  color: var(--text-primary);
}

.share-link-input-group {
  display: flex;
  gap: 8px;
}
.share-link-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3000;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--color-primary);
  color: var(--text-primary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), var(--glow-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-in 0.25s ease forwards;
}

/* Toast variants. The default amber reads as confirmation; a warning or a failure
   needs to be distinguishable at a glance, without reading the text. */
.toast-error {
  border-color: var(--color-boss);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(239, 68, 68, 0.35);
}

.toast-error svg { color: var(--color-boss); }

.toast-info {
  border-color: var(--color-loot);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 16px rgba(56, 189, 248, 0.35);
}

.toast-info svg { color: var(--color-loot); }

/* Recovery and error messages are sentences, not two-word confirmations. */
.toast-info span,
.toast-error span { line-height: 1.35; }

.toast-info,
.toast-error { max-width: 380px; align-items: flex-start; }

.toast-info svg,
.toast-error svg { flex-shrink: 0; margin-top: 2px; }

@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive styles */
@media (max-width: 900px) {
  .brand-badge {
    display: none;
  }
  .map-dropdown-container {
    /* keep the trigger readable instead of letting flex squeeze it to nothing */
    flex: 0 0 auto;
  }
  .map-dropdown-btn {
    min-width: 0;
    max-width: 175px;
  }
  .map-dropdown-menu {
    width: min(300px, calc(100vw - 32px));
  }
  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1100 !important;
    max-width: 100vw;
  }
}

/* ==========================================================================
   SYSTEM ANNOUNCEMENT BANNER
   ========================================================================== */
.system-announcement-bar {
  background: linear-gradient(90deg, #b91c1c, #991b1b, #7f1d1d);
  color: #fff;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-family: var(--font-hud);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 990;
}
.announcement-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.announcement-badge {
  background: #000;
  color: #fca5a5;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
}
.announcement-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

/* ==========================================================================
   CONTACT CARDS (ABOUT US)
   ========================================================================== */
.contact-card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  text-decoration: none;
  transition: all 0.2s;
}
.contact-card-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-primary);
  transform: translateY(-1px);
}
.contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ==========================================================================
   DEDICATED FULLSCREEN ADMIN HUB STYLES
   ========================================================================== */
.btn-admin-nav {
  background: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid rgba(239, 68, 68, 0.45) !important;
  color: #fca5a5 !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}
.btn-admin-nav:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: #f87171 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.4) !important;
}

.admin-fullscreen-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #080c14;
  z-index: 99999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-main);
  animation: fadeInAdmin 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-fullscreen-screen.open {
  display: flex !important;
}

@keyframes fadeInAdmin {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.admin-screen-header {
  height: 64px;
  background: #0d1322;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 10;
}

.admin-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-shield-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.admin-header-title {
  font-family: var(--font-hud);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.admin-header-subtitle {
  font-size: 0.72rem;
  color: var(--color-primary);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.admin-status-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  display: inline-block;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-screen-body {
  display: flex;
  flex: 1;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  overflow: hidden;
}

.admin-screen-sidebar {
  width: 270px;
  background: #0a0e19;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  padding: 24px 14px;
  flex-shrink: 0;
  overflow-y: auto;
}

.admin-menu-section-label {
  font-size: 0.68rem;
  font-family: var(--font-hud);
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  padding: 0 12px 8px 12px;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}
.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  transform: translateX(2px);
}
.admin-nav-item.active {
  background: rgba(229, 169, 60, 0.12);
  color: var(--color-primary);
  border-left: 3px solid var(--color-primary);
  font-weight: 700;
}
.admin-nav-icon {
  font-size: 1.1rem;
}
.admin-nav-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px;
  background: #080c14;
}

.admin-tab-pane {
  display: none;
}
.admin-tab-pane.active {
  display: block;
  animation: fadeInAdminTab 0.15s ease;
}

@keyframes fadeInAdminTab {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* KPI Cards */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.admin-kpi-card {
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.admin-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.admin-kpi-val {
  font-size: 1.8rem;
  font-family: var(--font-hud);
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.admin-kpi-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.admin-section-box {
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th {
  background: rgba(0, 0, 0, 0.45);
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.admin-table tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.admin-role-select, .admin-status-select {
  background: #141b2d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.82rem;
}

.badge-status {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.badge-active { background: rgba(34, 197, 94, 0.2); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-banned { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Presence indicator (admin user list only) */
.presence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-family: var(--font-hud);
  color: var(--text-secondary);
  white-space: nowrap;
}
.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.presence-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.9);
}
.presence-dot.offline {
  background: #6b7280;
}

/* Tactical text pin: black outline keeps the label readable over bright map areas.
   The outline is applied to the text only -- stroking the 📍 emoji turned it into a
   solid black rectangle, because the stroke paints over the whole glyph. */
.tactical-text-pin-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: var(--font-hud);
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: move;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.85);
}

.tactical-text-pin-icon {
  -webkit-text-stroke: 0;
  text-shadow: none;
  line-height: 1;
}

.tactical-text-pin-text {
  paint-order: stroke fill;
  -webkit-text-stroke: 3px #000;
  text-shadow:
    -1px -1px 0 #000, 1px -1px 0 #000,
    -1px  1px 0 #000, 1px  1px 0 #000,
     0    2px 3px rgba(0, 0, 0, 0.9);
}

/* A category the map declares but has no markers for: shown for a consistent list,
   greyed out because there is nothing to toggle */
.filter-item-toggle.is-empty {
  opacity: 0.4;
  cursor: default;
}
.filter-item-toggle.is-empty:hover {
  background: transparent;
}

/* Feedback filter toolbar */
.feedback-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.feedback-toolbar input[type="search"] {
  flex: 1 1 260px;
  min-width: 180px;
}
.feedback-toolbar select {
  flex: 0 0 auto;
  background: var(--bg-card);
  cursor: pointer;
}
.feedback-count {
  margin-left: auto;
  font-family: var(--font-hud);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-save-role:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Announcement management list */
.announcement-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 16px;
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.announcement-row:last-child {
  margin-bottom: 0;
}

.badge-type {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
}
.badge-bug { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-site_bug { background: rgba(234, 179, 8, 0.2); color: #fbbf24; }
.badge-suggestion { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.badge-partnership { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.badge-general { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }

.admin-feedback-card {
  background: #0f1523;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.admin-feedback-card.unread {
  border-left: 3px solid var(--color-primary);
}

.btn-icon-delete {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.btn-icon-delete:hover {
  opacity: 1;
}


/* =========================================================================
   AUTH: forgot-password links, hints and e-mail typo suggestions
   ========================================================================= */
.auth-link-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--text-secondary);
  font-family: var(--font-hud);
  font-size: 0.78rem;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: color 0.15s ease;
}
.auth-link-btn:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.auth-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Shown when the address looks like a typo of a well-known domain */
.email-suggest {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--color-primary);
  display: none;
}
.email-suggest.visible {
  display: block;
}
.email-suggest button {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

/* Consent checkbox on the sign-up form */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.consent-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}
.consent-row a {
  color: var(--color-primary);
}

/* ============================================
   ONBOARDING — first-visit tour
   ============================================ */

/* The overlay itself is a plain .modal-backdrop, so showing, hiding and the
   click-outside behaviour come from the shared modal rules. Only the card is
   styled here. */
.onboarding-card {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), var(--glow-primary);
  padding: 40px 40px 24px;
  animation: onboarding-rise 0.25s ease;
}

@keyframes onboarding-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* The card has no modal-header to sit in, so the standard close button is
   placed by hand in the same corner it occupies everywhere else. */
.onboarding-close {
  position: absolute;
  top: 10px;
  right: 12px;
}

/* Fixed height across slides: without it the card jumps as the text length
   changes, and the buttons move out from under the cursor mid-click. */
.onboarding-body {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 10px;
}

.onboarding-visual {
  font-size: 3.8rem;
  line-height: 1;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 12px rgba(229, 169, 60, 0.4));
}

.onboarding-title {
  font-family: var(--font-hud);
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.25;
}

.onboarding-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  max-width: 50ch;
}

.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.onboarding-dots {
  display: flex;
  gap: 7px;
}

.onboarding-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--border-subtle);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.onboarding-dot:hover { background: var(--text-muted); }

.onboarding-dot.active {
  background: var(--color-primary);
  transform: scale(1.35);
}

.onboarding-actions {
  display: flex;
  gap: 8px;
}

.onboarding-actions .btn { min-width: 84px; justify-content: center; }

/* The first slide has nothing to go back to; keeping the button in the layout
   but invisible stops the row from reflowing on every step. */
.onboarding-actions .btn[data-hidden="true"] {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 520px) {
  .onboarding-card { padding: 26px 20px 16px; }
  .onboarding-body { min-height: 285px; }
  .onboarding-title { font-size: 1.2rem; }
  .onboarding-text { font-size: 0.95rem; }
  .onboarding-visual { font-size: 2.8rem; }
  .onboarding-actions .btn { min-width: 76px; }
}


/* JetBrains Mono, self-hosted for the same reason as Leaflet: fonts.gstatic.com
   does not answer from Russia either, so the page was silently falling back to
   whatever monospace the system had. Split by alphabet -- a visitor downloads
   only the ranges their text needs. */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-cyrillic-ext-400.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-latin-ext-400.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-cyrillic-ext-600.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../../assets/fonts/JetBrainsMono-latin-ext-600.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ============================================
   SOURCES AND LICENCES
   ============================================ */

.source-intro {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.sources-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 60vh;
  overflow-y: auto;
}

.source-heading {
  font-family: var(--font-hud);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin: 16px 0 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-subtle);
}

.source-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
}

/* The name itself is the link: a separate column of bare URLs repeated the same
   information and pushed the licence text into a narrow strip. */
.source-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-loot);
  text-decoration: none;
  width: fit-content;
}

.source-name:hover {
  text-decoration: underline;
  color: var(--color-primary);
}

.source-name::after {
  content: ' ↗';
  font-size: 0.72em;
  opacity: 0.65;
}

.source-lic {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.source-note,
.source-disclaimer {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 6px 0 0;
}

.source-disclaimer { font-style: italic; }


/* ============================================
   LANDING FOOTER
   ============================================ */

.landing-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 20px 34px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 40px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-copy { color: var(--text-muted); }

.footer-sep { color: var(--border-medium); }

.landing-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.landing-footer a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
