:root {
  --bg: #0b0f14;
  --panel: rgba(18, 24, 33, 0.72);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --p0: #2bd2ff;
  --p1: #ff5a8c;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

#menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.96);
  pointer-events: auto;
}

#menuBg {
  position: fixed;
  inset: 0;
  z-index: 45;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  background: transparent;
}

#menu::before {
  content: "";
  position: absolute;
  inset: -30%;
  display: none;
  background:
    radial-gradient(900px 600px at 18% 22%, rgba(43, 210, 255, 0.16), rgba(0, 0, 0, 0) 62%),
    radial-gradient(900px 700px at 78% 68%, rgba(255, 90, 140, 0.14), rgba(0, 0, 0, 0) 64%),
    radial-gradient(700px 520px at 52% 82%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 58%);
  filter: blur(18px) saturate(1.15);
  opacity: 0.95;
  animation: menuDrift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

#menu::after {
  content: "";
  position: absolute;
  inset: 0;
  display: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0px, rgba(255, 255, 255, 0.05) 1px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0) 46px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 1px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0) 46px),
    radial-gradient(900px 560px at 50% 45%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.78) 100%);
  mix-blend-mode: overlay;
  opacity: 0.35;
  animation: menuGrid 10s linear infinite;
  pointer-events: none;
}

#menu.lobbyLite {
  background: rgba(8, 10, 14, 0.96);
}

#menu.lobbyLite::before,
#menu.lobbyLite::after {
  display: none;
  animation: none;
  filter: none;
}

#menu.menuLogo {
  background: rgba(8, 10, 14, 0.22);
  backdrop-filter: none;
}

#menu.menuLogo::before {
  display: none;
}

#menu.menuLogo::after {
  display: none;
}

@keyframes menuDrift {
  0% {
    transform: translate3d(-2%, -1.5%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(2.5%, 2%, 0) scale(1.03);
  }
}

@keyframes menuGrid {
  0% {
    background-position:
      0px 0px,
      0px 0px,
      0px 0px;
  }
  100% {
    background-position:
      0px 92px,
      92px 0px,
      0px 0px;
  }
}

.menuShell {
  width: min(860px, 100%);
  display: grid;
  place-items: center;
}

.menuPanel {
  width: min(680px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.78);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 22px 22px 18px;
  position: relative;
  z-index: 1;
}

.menuTitle {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.6px;
  line-height: 1;
  margin: 0 0 8px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}

.menuSub {
  color: var(--muted);
  margin-bottom: 18px;
}

.menuGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.menuBtn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  padding: 18px 18px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  transition:
    transform 120ms ease,
    background 120ms ease,
    border-color 120ms ease;
}

.menuBtn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.085);
  border-color: rgba(255, 255, 255, 0.22);
}

.menuBtn.primary {
  background: linear-gradient(135deg, rgba(43, 210, 255, 0.24), rgba(255, 90, 140, 0.18));
  border-color: rgba(255, 255, 255, 0.20);
}

.menuFoot {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.menuHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.menuTitleSmall {
  font-size: 20px;
  font-weight: 900;
}

.formRow {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
}

.formRow .label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.joinList {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding-right: 6px;
}

.lobbyRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
}

.lobbyRowTitle {
  font-weight: 900;
  margin-bottom: 4px;
}

.lobbyRowMeta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.lobbyMeta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

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

.playerRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.readyPill {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.72);
}

.readyPill.on {
  border-color: rgba(43, 210, 255, 0.35);
  color: rgba(43, 210, 255, 0.9);
}

.lobbyActions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.muted {
  color: var(--muted);
}

.menuPanel .btn,
.menuPanel .input,
.menuPanel .range {
  pointer-events: auto;
}

#view,
#viewMap,
#viewTerritory {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  image-rendering: auto;
}

#viewMap {
  z-index: 1;
  pointer-events: none;
}

#viewTerritory {
  z-index: 2;
  pointer-events: none;
}

#view {
  z-index: 3;
}

.loadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1200px 800px at 50% 40%, rgba(22, 30, 42, 0.92), rgba(8, 10, 14, 0.96));
  pointer-events: auto;
}

.loadingPanel {
  width: min(560px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 20, 0.86);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 18px 18px 14px;
  text-align: center;
}

.loadingTitle {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-bottom: 8px;
}

.loadingSub {
  line-height: 1.35;
}

.matchResult {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.matchResultPanel {
  width: min(620px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 20, 0.86);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 20px 20px 16px;
}

.matchResultTitle {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
}

.matchResultBody {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.35;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

.matchResultActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bottomBar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  pointer-events: none;
}

.playerCard {
  width: 320px;
  padding: 12px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 20, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.territoryCard {
  width: 360px;
  padding: 12px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 20, 0.78);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.territoryHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.territoryTitle {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.territoryTitle .territoryLabel {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.territoryTitle .territoryPct {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(255, 255, 255, 0.78);
}

.territoryTitle .p0 {
  color: rgba(43, 210, 255, 0.95);
}

.territoryTitle .p1 {
  color: rgba(255, 90, 140, 0.95);
}

.territoryCities {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.territoryBuff {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.territoryBuff .p0 {
  color: rgba(43, 210, 255, 0.95);
}

.territoryBuff .p1 {
  color: rgba(255, 90, 140, 0.95);
}

.territoryBuff .sep {
  opacity: 0.5;
  margin: 0 6px;
}

.territoryBuff .label {
  opacity: 0.55;
  margin-left: 8px;
  font-weight: 600;
}

.territoryBar {
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  display: flex;
}

.territorySeg {
  height: 100%;
  width: 0%;
  transition: width 120ms linear;
}

.territorySeg.p0 {
  background: linear-gradient(90deg, rgba(43, 210, 255, 0.95), rgba(43, 210, 255, 0.35));
}

.territorySeg.p1 {
  background: linear-gradient(90deg, rgba(255, 90, 140, 0.95), rgba(255, 90, 140, 0.35));
}

.territorySeg.neutral {
  background: linear-gradient(90deg, rgba(200, 210, 225, 0.45), rgba(200, 210, 225, 0.18));
}

.playerCard.p0 {
  box-shadow: 0 18px 50px rgba(43, 210, 255, 0.06), 0 18px 50px rgba(0, 0, 0, 0.35);
  border-color: rgba(43, 210, 255, 0.22);
}

.playerCard.p1 {
  box-shadow: 0 18px 50px rgba(255, 90, 140, 0.06), 0 18px 50px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 90, 140, 0.22);
}

.opRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.opIcon {
  width: 34px;
  height: 34px;
  opacity: 0.92;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35));
}

.playerCard.p0 .opIcon {
  fill: rgba(43, 210, 255, 0.9);
}

.playerCard.p1 .opIcon {
  fill: rgba(255, 90, 140, 0.9);
}

.opBlock {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opValue {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.opLabel {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.opBar {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.opBarFill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 120ms linear;
}

.playerCard.p0 .opBarFill {
  background: linear-gradient(90deg, rgba(43, 210, 255, 0.95), rgba(43, 210, 255, 0.35));
}

.playerCard.p1 .opBarFill {
  background: linear-gradient(90deg, rgba(255, 90, 140, 0.95), rgba(255, 90, 140, 0.35));
}

.metaRow {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
}

.metaItem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.metaItem.budgetItem {
  background: rgba(255, 255, 255, 0.05);
}

.metaItem.budgetItem.hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
}

.metaItem.budgetItem.focus {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.metaItem .icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  fill: rgba(255, 255, 255, 0.78);
}

.metaVal {
  font-size: 16px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.budgetVal {
  min-width: 48px;
}

#hud {
  position: fixed;
  left: 16px;
  top: 16px;
  right: 16px;
  z-index: 20;
  pointer-events: none;
}

.hudToggle {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 30;
  pointer-events: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.92);
  border-radius: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.matchMenuBtn {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 32;
  pointer-events: auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.92);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.matchMenuBtn:hover {
  background: rgba(18, 24, 33, 0.98);
  border-color: rgba(255, 255, 255, 0.18);
}

.matchMenu {
  position: fixed;
  right: 16px;
  top: 62px;
  z-index: 32;
  width: 220px;
  pointer-events: auto;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 20, 0.88);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.matchMenuTitle {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.9);
}

.matchMenuActions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn.danger {
  border-color: rgba(255, 90, 140, 0.35);
  background: rgba(255, 90, 140, 0.10);
}

.btn.danger:hover {
  border-color: rgba(255, 90, 140, 0.50);
  background: rgba(255, 90, 140, 0.14);
}

.spawnEditor {
  position: fixed;
  left: 16px;
  bottom: 74px;
  z-index: 31;
  width: 330px;
  pointer-events: auto;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 14, 20, 0.88);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.spawnEditor[data-mode="art"] {
  width: min(720px, calc(100vw - 32px));
}

.spawnHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.spawnTitle {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.9);
}

.spawnRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.spawnHint {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.pill.small {
  padding: 6px 8px;
  font-size: 12px;
}

.btn.small {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 12px;
}

.input.small {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 12px;
  width: 110px;
}

#spawnPresetName {
  width: 150px;
}

#spawnMapSelect {
  width: 160px;
}

#spawnTilesRow {
  flex-wrap: wrap;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.check input {
  width: 16px;
  height: 16px;
}

.check.small {
  font-size: 12px;
}

.spawnEditor .btn[data-active="1"] {
  border-color: rgba(255, 255, 255, 0.40);
  background: rgba(255, 255, 255, 0.10);
}

.spawnArtRow {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.spawnArtPane {
  flex: 1;
  min-width: 0;
}

#spawnArtRow .spawnRow {
  flex-wrap: wrap;
}

#tileArtScopeRow {
  flex-wrap: wrap;
}

#tileArtKeySelect {
  width: 160px;
}

#tileArtOverlaySelect {
  width: 160px;
}

#tileArtAssetFilterInput {
  width: 140px;
}

#tileArtPreviewCanvas {
  width: 128px;
  height: 128px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  image-rendering: pixelated;
}

.assetGrid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  margin-top: 8px;
  max-height: 320px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.assetItem {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  text-align: left;
}

.assetItem:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.assetItem[data-active="1"] {
  border-color: rgba(255, 255, 255, 0.40);
  background: rgba(255, 255, 255, 0.10);
}

.assetThumb {
  display: block;
  width: 100%;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.assetLabel {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hudCollapsed #hudPanel {
  display: none;
}

.statusToast {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 25;
}

.hoverCard {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.92);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hoverCard.compact {
  width: 150px;
  padding: 6px 8px;
  border-radius: 10px;
}

.hoverCard.compact .hoverCardRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hoverCard.compact .hoverCardName {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}

.hoverCard.compact .hoverCardBudget {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: rgba(255, 255, 255, 0.86);
  flex: 0 0 auto;
}

.hoverCard.compact .hoverCardBudget.pending {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.hoverCard.compact .hoverCardBudget .num {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.hoverCard.compact .hoverCardBudget .unit {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.hoverCard .muted {
  color: rgba(255, 255, 255, 0.62);
}

.cityHover {
  position: fixed;
  z-index: 30;
  pointer-events: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.92);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.cityHoverTitle {
  font-weight: 700;
  margin-bottom: 8px;
}

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

.cityHoverHint {
  margin-top: 6px;
}

.nodeHover {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.92);
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  min-width: 190px;
}

.nodeHover .title {
  font-weight: 800;
  margin-bottom: 6px;
}

.nodeHover .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0;
}

.nodeHover .k {
  color: rgba(255, 255, 255, 0.65);
}

.nodeHover .v {
  color: rgba(255, 255, 255, 0.92);
}

.nodeHover .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  margin-left: 6px;
  color: rgba(255, 255, 255, 0.75);
}

.hoverCard .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: -1px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.row.controls {
  flex-wrap: wrap;
}

.pill {
  pointer-events: none;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: var(--muted);
}

.stat {
  pointer-events: none;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  font-size: 13px;
  min-width: 260px;
  color: var(--muted);
}

.help {
  pointer-events: none;
  max-width: 560px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.k {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
}

.controls {
  pointer-events: auto;
}

.controls * {
  pointer-events: auto;
}

.btn {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.9);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.input {
  width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.9);
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  outline: none;
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.range {
  width: 160px;
  accent-color: rgba(255, 255, 255, 0.8);
}
