* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #06131f;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
}

.home-map-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #06131f;
}

.home-map-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  background: linear-gradient(rgba(6,19,31,.22), rgba(2,6,23,.72));
}

.home-map-bg .leaflet-control-container {
  display: none;
}

.home-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-glass {
  width: min(90vw, 760px);
  padding: 28px;
  border-radius: 30px;
  border: 1px solid rgba(34,211,238,.34);
  background:
    radial-gradient(circle at top left, rgba(34,211,238,.22), transparent 34%),
    linear-gradient(145deg, rgba(15,23,42,.74), rgba(8,47,73,.58));
  box-shadow:
    0 24px 70px rgba(0,0,0,.48),
    0 0 34px rgba(34,211,238,.14),
    inset 0 1px 0 rgba(255,255,255,.10);
  backdrop-filter: blur(22px);
}

.home-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.home-brand {
  color: #22d3ee;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 900;
}

.badge {
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(34,211,238,.12);
  border: 1px solid rgba(34,211,238,.22);
  color: #a7f3ff;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 18px;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 8vw, 78px);
  line-height: .95;
  letter-spacing: -.07em;
}

.lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255,255,255,.72);
  font-size: 17px;
  line-height: 1.55;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  min-height: 52px;
  border-radius: 18px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
  text-align: center;
}

.primary {
  background: linear-gradient(135deg, #06b6d4, #22c55e);
  color: #fff;
}

.secondary {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: #fff;
}

.v2-lang-picker {
  position: relative;
}

.v2-lang-btn {
  width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(34,211,238,.36);
  background: radial-gradient(circle at top, rgba(34,211,238,.26), rgba(15,23,42,.24));
  color: #a7f3ff;
  font-size: 13px;
  font-weight: 900;
}

.v2-lang-menu.hidden {
  display: none;
}

.v2-lang-menu {
  position: absolute;
  right: 56px;
  top: 0;
  z-index: 3000;
  display: flex;
  gap: 6px;
  width: auto;
  padding: 4px;
  border-radius: 18px;
  border: 1px solid rgba(34,211,238,.34);
  background: radial-gradient(circle at top, rgba(34,211,238,.22), rgba(15,23,42,.80));
  backdrop-filter: blur(20px);
}

.v2-lang-menu button {
  width: 44px;
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #dffbff;
  font-size: 13px;
  font-weight: 900;
}

.v2-lang-menu button:hover,
.v2-lang-menu button.active {
  background: rgba(34,211,238,.18);
}

@media (max-width: 640px) {
  .home-shell {
    min-height: 100dvh;
    padding: 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    align-items: flex-end;
    justify-content: center;
  }

  .home-glass {
    width: 100%;
    max-width: 390px;
    padding: 22px;
    border-radius: 28px;
  }

  h1 {
    font-size: clamp(34px, 9vw, 40px);
    line-height: 1;
    letter-spacing: -.055em;
  }

  .lead {
    font-size: 14px;
    line-height: 1.5;
  }

  .badge {
    font-size: 11px;
    white-space: normal;
  }

  .actions {
    grid-template-columns: 1fr;
  }
}

.offline-shell {
  align-items: center;
  justify-content: center;
}

.offline-glass {
  width: min(90vw, 430px);
}

.offline-glass .actions {
  grid-template-columns: 1fr;
}