* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #07152f;
  color: #eef5ff;
}

.topbar {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #07152f, #123365);
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.topbar h1 { margin: 0 0 4px; font-size: 22px; }
.topbar p { margin: 0; color: #b9c8e8; font-size: 14px; }

.topbar nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar a {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.28);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-weight: 800;
}

.topbar a:hover { background: rgba(255,255,255,.16); }

.panel {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 14px;
  background: #0c1e42;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.stat {
  min-width: 125px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
}

.stat strong {
  display: block;
  font-size: 21px;
  line-height: 1;
  color: #9be7ff;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: #b9c8e8;
  font-size: 12px;
}

.toggle,
.selectbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #dce8ff;
}

.toggle input { transform: scale(1.1); accent-color: #36a9ff; }

.selectbox select {
  color: #fff;
  background: #173967;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  outline: none;
}

#map {
  height: calc(100vh - 125px);
  min-height: 520px;
  width: 100%;
  background: #102448;
}

.notice {
  position: fixed;
  left: 14px;
  bottom: 14px;
  max-width: min(560px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(10, 20, 42, .92);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  z-index: 1000;
}

.leaflet-popup-content { font-size: 14px; line-height: 1.35; }
.popup-title { font-weight: 900; font-size: 16px; margin-bottom: 6px; color: #14365f; }
.popup-muted { color: #566; }
.popup-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 9px; }
.popup-grid b { color: #123; }

.r2r-line {
  filter: drop-shadow(0 0 2px rgba(63,169,255,.35));
}

.r2r-line-hover {
  filter: drop-shadow(0 0 5px rgba(0,126,255,.85));
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(54, 169, 255, .22);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background-color: rgba(54, 169, 255, .82);
  color: white;
  font-weight: 900;
}

@media (max-width: 800px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  #map { height: calc(100vh - 245px); min-height: 430px; }
}


/* --- Compact one-row toolbar --- */
.panel-one-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  white-space: nowrap;
}

.toolbar-stats,
.toolbar-controls,
.bandbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.toolbar-stats {
  padding-right: 8px;
  border-right: 1px solid rgba(255,255,255,.14);
}

.mini-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.07);
}

.mini-stat span {
  font-size: 15px;
}

.mini-stat strong {
  font-size: 20px;
  line-height: 1;
  color: #9be7ff;
  min-width: 2.2em;
}

.mini-stat em {
  font-style: normal;
  color: #c5d5f0;
  font-size: 12px;
}

.toggle.compact,
.selectbox.compact {
  min-height: 38px;
  padding: 7px 11px;
}

.map-select select {
  min-width: 118px;
}

.bandbar {
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.bandbar-label {
  opacity: .95;
  padding-left: 4px;
}

.band-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.band-chip {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-weight: 800;
  line-height: 1;
}

.band-chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.16);
}

.band-chip.active {
  box-shadow: 0 0 0 2px rgba(255,255,255,.18) inset, 0 0 14px rgba(102,217,255,.26);
}

.band-chip[data-band=""] { background: rgba(102,217,255,.18); }
.band-chip.band-hf-low { background: rgba(255,141,48,.26); border-color: rgba(255,141,48,.55); }
.band-chip.band-hf-mid { background: rgba(55,155,255,.26); border-color: rgba(55,155,255,.55); }
.band-chip.band-vhf { background: rgba(49,211,123,.26); border-color: rgba(49,211,123,.55); }
.band-chip.band-uhf { background: rgba(177,112,255,.26); border-color: rgba(177,112,255,.55); }
.band-chip.band-other { background: rgba(255,255,255,.12); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px,1px,1px,1px) !important;
  white-space: nowrap !important;
}

@media (max-width: 1100px) {
  .panel-one-row {
    padding-bottom: 10px;
  }
  .mini-stat em {
    display: none;
  }
  .mini-stat strong {
    min-width: auto;
  }
}


/* --- One-row toolbar: band as dropdown, no chip overflow --- */
.band-select select {
  min-width: 150px;
}

.panel-one-row {
  overflow-x: visible;
}

.bandbar,
.band-chips,
.band-chip {
  display: none !important;
}

@media (max-width: 1250px) {
  .toolbar-stats {
    gap: 6px;
  }
  .mini-stat {
    padding: 7px 9px;
  }
  .toggle.compact,
  .selectbox.compact {
    padding: 7px 10px;
  }
  .band-select select {
    min-width: 130px;
  }
}

/* OK7JN language switcher */
.lang-switch{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-top:0}
.lang-switch a{display:inline-flex;align-items:center;justify-content:center;min-width:34px;padding:6px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.25);background:rgba(10,32,62,.72);color:#eaf6ff;text-decoration:none;font-weight:900;font-size:12px;line-height:1}
.lang-switch a.active{background:#66d9ff;color:#07152f;border-color:#9be7ff;box-shadow:0 0 0 2px rgba(102,217,255,.18)}
.topbar nav{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:10px}
@media(max-width:760px){.topbar nav{align-items:flex-start;justify-content:flex-start}.lang-switch{justify-content:flex-start}}
