* {
  box-sizing: border-box;
}

:root {
  --bg-fallback: #f7f7f8;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-panel: rgba(255, 255, 255, 0.52);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);

  --text: #18181b;
  --muted: #71717a;
  --accent: #0066cc;
  --accent-gold: #c9a84c;
  --accent-soft: rgba(0, 102, 204, 0.12);
  --accent-gold-soft: rgba(201, 168, 76, 0.12);
  --good: #22c55e;

  --shimmer: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.08), transparent);

  --classical: linear-gradient(135deg, #8ec5fc, #e0c3fc);
  --rapid: linear-gradient(135deg, #f6d365, #fda085);
  --blitz: linear-gradient(135deg, #ff758c, #ff7eb3);
  --bullet: linear-gradient(135deg, #84fab0, #8fd3f4);
  --team: linear-gradient(135deg, #d4dde3, #eef2f6);
  --fischer: linear-gradient(135deg, #a18cd1, #fbc2eb);
  --other: linear-gradient(135deg, #c3cfe2, #e2ebf0);
}

body.theme-dark {
  --bg-fallback: #09090b;
  --glass-bg: rgba(18, 18, 24, 0.78);
  --glass-panel: rgba(22, 22, 30, 0.62);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);

  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-gold: #d4b65a;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --accent-gold-soft: rgba(212, 182, 90, 0.15);
  --good: #4ade80;
  --shimmer: linear-gradient(90deg, transparent, rgba(212, 182, 90, 0.06), transparent);
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: var(--bg-fallback);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 0.3s ease, color 0.3s ease;
}

/* App shell */
.app-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
}

.map-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
}

/* Glass utility */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  pointer-events: auto;
  animation: panelFadeIn 0.5s ease both;
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Overlay layer */
.glass-ui-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  padding-bottom: 120px;
}

/* Topbar */
.maps-topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-radius: 100px;
}

.maps-topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0.3;
}

.maps-search-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 12px rgba(201, 168, 76, 0.25);
  border: 1.5px solid var(--accent-gold-soft);
  flex-shrink: 0;
}

.maps-title-block {
  min-width: 0;
}

.maps-title-block h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.maps-title-block p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.maps-topbar__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-header__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hamburger-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--glass-panel);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hamburger-btn:hover {
  background: rgba(128, 128, 128, 0.15);
}

.lang-toggle {
  text-decoration: none;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-toggle:hover {
  background: rgba(0, 102, 204, 0.22);
  transform: translateY(-1px);
}

/* Layout */
.panels-container {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: space-between;
  overflow: hidden;
}

.maps-sidebar {
  width: 360px;
  max-height: 100%;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

/* Inner panels */
.inner-panel {
  position: relative;
  padding: 18px;
  background: var(--glass-panel);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 16px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.inner-panel:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.inner-panel:first-child::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-gold), var(--accent));
  border-radius: 2px;
  opacity: 0.5;
}

.inner-panel h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.inner-panel p {
  margin: 0;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  font-size: 0.84rem;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 2px 8px rgba(0, 102, 204, 0.08);
}

/* Buttons */
.button-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  font-weight: 700;
}

.btn-primary:hover {
  background: #005bb5;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.25);
}

/* Stats */
.stats-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  padding: 12px;
  text-align: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
}

.stat:hover {
  transform: translateY(-2px);
}

.label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.helper-text {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Result list */
.result-list {
  display: grid;
  gap: 8px;
  max-height: 30vh;
  overflow-y: auto;
  padding-right: 4px;
}

.result-card {
  min-width: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.result-card h3 {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-card .meta {
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

.result-card__head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.result-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1d1d1f;
}

/* Bottom ticker */
.bottom-ticker {
  position: absolute;
  left: 400px;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px 8px 20px;
  border-radius: 100px;
  pointer-events: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-ticker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), var(--accent), transparent);
  opacity: 0.4;
}

.bottom-ticker:hover {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.ticker-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 16px;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  background-color: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(0, 102, 204, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
  }
}

.ticker-viewport {
  flex: 1;
  overflow-x: auto;
  scroll-behavior: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.ticker-viewport::-webkit-scrollbar {
  display: none;
}

.ticker-track {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  color: var(--text);
  font-size: 0.84rem;
  cursor: default;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ticker-item strong {
  font-weight: 700;
}

.ticker-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.ticker-meta {
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-controls {
  display: flex;
  gap: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.ticker-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ticker-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Map hint */
.map-hint {
  position: absolute;
  top: 80px;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);
  padding: 8px 16px;
  border-radius: 30px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  pointer-events: auto;
}

/* Markers */
.count-bubble {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: var(--text);
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.t-marker {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px 14px 14px 4px;
  transform: rotate(45deg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  border: 2px solid #fff;
}

.t-marker__core {
  transform: rotate(-45deg);
  font-size: 1rem;
  font-weight: 700;
  color: #1d1d1f;
}

.t-marker__mini {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  border: 1px solid #fff;
  font-size: 0.6rem;
  font-weight: 700;
  transform: rotate(-45deg);
}

/* Drawer */
.drawer.hidden {
  display: none;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.drawer-inner {
  position: relative;
  width: min(480px, 100%);
  height: 100%;
  padding: 24px;
  overflow: auto;
  border-radius: 24px 0 0 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(40px);
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.drawer-close:hover {
  background: rgba(0, 0, 0, 0.1);
}

.drawer-hero,
.engagement-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.drawer-marker {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 16px;
  color: #1d1d1f;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.popup-card h3 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 1rem;
}

.popup-row {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
}

.tag-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.event-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.event-link:hover {
  text-decoration: underline;
}

/* Color categories */
.classical {
  background: var(--classical);
}

.rapid {
  background: var(--rapid);
}

.blitz {
  background: var(--blitz);
}

.bullet {
  background: var(--bullet);
}

.team {
  background: var(--team);
}

.fischer {
  background: var(--fischer);
}

.other {
  background: var(--other);
}

/* General info section */
.general-info-section {
  padding: 60px 20px;
  background: var(--bg-fallback);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

.info-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.info-column h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 1.5rem;
}

.info-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-column ul li {
  margin-bottom: 12px;
}

.info-column ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.info-column ul li a:hover {
  color: var(--accent);
}

.info-column p {
  color: var(--muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  position: static;
  width: 100%;
  margin-top: 0;
  padding: 12px 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), var(--accent), transparent);
  opacity: 0.3;
}

body.theme-dark .site-footer {
  background: rgba(9, 9, 11, 0.88);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* Cookie consent */
.cookie-consent {
  position: fixed;
  left: 50%;
  bottom: -100px;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  background: var(--glass-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
  transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-consent.show {
  bottom: 0;
}

.cookie-text {
  flex: 1;
  color: var(--text);
  font-size: 0.85rem;
  line-height: 1.4;
}

.cookie-text a {
  color: var(--accent);
}

.cookie-btn {
  border: none;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cookie-btn:hover {
  background: #005bb5;
}

body.theme-dark .cookie-btn:hover {
  background: #0ea5e9;
}

/* Theme toggle */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-panel);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(128, 128, 128, 0.2);
}

/* Navbar dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--glass-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-dropdown-toggle:hover {
  background: var(--glass-bg);
  transform: translateY(-1px);
  box-shadow: var(--glass-shadow);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  min-width: 240px;
  margin-top: 8px;
  padding: 8px;
  background: var(--glass-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-toggle:focus + .nav-dropdown-menu,
.nav-dropdown-menu:focus-within {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.nav-dropdown-item i {
  width: 20px;
  text-align: center;
  color: var(--accent);
}

.nav-dropdown-item:hover {
  background: rgba(128, 128, 128, 0.15);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
  border-width: 0;
  clip: rect(0, 0, 0, 0);
}

/* Leaflet overrides */
.esri-leaflet-logo {
  display: none !important;
}

.leaflet-control-attribution {
  font-size: 10px;
  opacity: 0.1;
}

/* Layers control */
.leaflet-control-layers {
  background: var(--glass-panel) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 16px !important;
  box-shadow: var(--glass-shadow) !important;
  color: var(--text) !important;
  overflow: hidden;
  transition: all 0.3s ease;
}

.leaflet-control-layers-expanded {
  padding: 12px 16px !important;
  background: var(--glass-bg) !important;
}

.leaflet-control-layers-list {
  margin-bottom: 0 !important;
}

.leaflet-control-layers label {
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

/* Bottom right controls */
.leaflet-bottom.leaflet-right {
  margin-right: 24px;
  margin-bottom: 90px;
  z-index: 900;
}

/* Zoom controls */
.leaflet-bar {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: var(--glass-shadow) !important;
}

.leaflet-bar a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  background: var(--glass-panel) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--glass-border) !important;
  transition: all 0.2s ease !important;
}

.leaflet-bar a:hover {
  background: var(--glass-bg) !important;
  color: var(--accent) !important;
}

.leaflet-bar a:last-child {
  border-bottom: none !important;
}

/* Popups */
.leaflet-popup-content-wrapper {
  padding: 4px;
  background: var(--glass-panel) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 20px !important;
  box-shadow: var(--glass-shadow) !important;
  color: var(--text) !important;
}

.leaflet-popup-tip {
  background: var(--glass-panel) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid var(--glass-border) !important;
  box-shadow: none !important;
}

.leaflet-popup-tip-container {
  overflow: visible !important;
}

.leaflet-popup-close-button {
  padding: 12px 14px 0 0 !important;
  color: var(--text) !important;
  font-size: 1.4rem !important;
  font-weight: 300 !important;
  transition: color 0.2s ease !important;
}

.leaflet-popup-close-button:hover {
  color: var(--accent) !important;
  background: transparent !important;
}

.popup-card {
  padding: 12px 8px;
}

.popup-card h3 {
  margin-top: 0;
  color: var(--accent);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 900px) {
  .app-container {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .map-bg {
    position: relative;
    height: 35vh;
    z-index: 0;
  }

  .glass-ui-layer {
    position: static;
    gap: 8px;
    padding: 10px;
    padding-bottom: 10px;
    pointer-events: auto;
    background: var(--bg-fallback);
  }

  .maps-topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
  }

  .maps-topbar::after {
    display: none;
  }

  .maps-search-shell {
    flex: 1;
    min-width: 0;
  }

  .maps-title-block h1 {
    font-size: 0.95rem;
  }

  .maps-title-block p {
    max-width: 180px;
    font-size: 0.72rem;
  }

  .hamburger-btn {
    display: grid;
    place-items: center;
  }

  .maps-topbar__actions {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
  }

  .maps-topbar__actions.nav-open {
    display: flex;
    animation: panelFadeIn 0.3s ease both;
  }

  .top-header__meta {
    display: none;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 100%;
    margin-top: 4px;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .panels-container {
    flex-direction: column;
    gap: 8px;
    overflow: visible;
  }

  .maps-sidebar {
    width: 100%;
    max-height: none;
    padding: 12px;
    padding-bottom: 0;
    gap: 10px;
  }

  .glass-panel {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .inner-panel {
    padding: 10px;
  }

  .inner-panel h2 {
    margin-bottom: 6px;
    font-size: 0.95rem;
  }

  .inner-panel p {
    font-size: 0.8rem;
  }

  .form-grid {
    gap: 6px;
  }

  .form-grid input,
  .form-grid select {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .button-row {
    margin-top: 8px;
  }

  .inner-panel p,
  .inner-panel h2,
  .result-card .meta,
  .result-card h3 {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .stats-panel {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .stat {
    padding: 6px 4px;
  }

  .result-list {
    max-height: 20vh;
  }

  .map-hint {
    top: 12px;
  }

  .bottom-ticker {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 6px;
    padding: 10px;
    border-radius: 16px;
    flex-direction: column;
    gap: 6px;
  }

  .bottom-ticker::before {
    display: none;
  }

  .ticker-label {
    width: 100%;
    justify-content: center;
    padding-right: 0;
    padding-bottom: 8px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .ticker-controls {
    width: 100%;
    justify-content: center;
    padding-left: 0;
    padding-top: 8px;
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  .ticker-item {
    font-size: 0.8rem;
  }

  .site-footer {
    position: static;
    margin-top: 12px;
    padding: 10px 16px;
    box-shadow: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .site-footer::before {
    display: none;
  }

  body.theme-dark .site-footer {
    background: rgba(9, 9, 11, 0.92);
  }

  .footer-links {
    gap: 10px;
  }

  .footer-links a {
    font-size: 0.75rem;
  }

  .site-footer p {
    font-size: 0.7rem !important;
  }

  body {
    padding-bottom: 0;
  }

  .cookie-consent {
    width: 95%;
    max-width: none;
    bottom: 16px;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    text-align: center;
    border-radius: 20px;
  }

  .cookie-consent.show {
    bottom: 16px;
  }

  .cookie-text {
    font-size: 0.8rem;
  }

  .leaflet-bottom.leaflet-right {
    margin-right: 12px;
    margin-bottom: 20px;
  }
}

@media (max-width: 420px) {
  .maps-title-block p {
    max-width: 140px;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }

  .stat .label {
    font-size: 0.6rem;
  }
}