/* ==========================================================================
   BEST COUNTRY — Light World Command Deck
   ========================================================================== */

:root {
  --bg-base: #f3efe4;
  --bg-surface: #fffaf0;
  --bg-card: rgba(255, 253, 247, 0.94);
  --bg-card-hover: #ffffff;
  --bg-overlay: rgba(250, 247, 238, 0.92);

  --border-subtle: rgba(30, 35, 42, 0.12);
  --border-card: rgba(30, 35, 42, 0.22);
  --border-highlight: rgba(30, 35, 42, 0.48);

  --text-main: #20242c;
  --text-muted: #696d70;
  --text-faint: #8a8c89;

  --gold: #efb824;
  --gold-light: #9a6500;
  --gold-glow: rgba(239, 184, 36, 0.24);

  --emerald: #168765;
  --emerald-light: #0c6c4e;
  --emerald-glow: rgba(22, 135, 101, 0.2);

  --indigo: #4264c7;
  --indigo-light: #3151af;
  --indigo-glow: rgba(66, 100, 199, 0.18);

  --blue: #4778dc;
  --crimson: #d95348;

  /* Map land colors */
  --land-default: #c7d6d0;
  --land-stroke: #6e8780;
  --land-hover: #ffda62;
  --land-hover-stroke: #20242c;

  --font-sans: 'Manrope', sans-serif;
  --font-display: 'Archivo Black', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  color-scheme: light;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-base);
  background-image:
    linear-gradient(rgba(32, 36, 44, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 36, 44, .035) 1px, transparent 1px),
    radial-gradient(circle 520px at 12% 0%, rgba(255, 214, 83, .28), transparent 70%),
    radial-gradient(circle 480px at 92% 18%, rgba(126, 197, 172, .2), transparent 72%);
  background-size: 28px 28px, 28px 28px, auto, auto;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 999;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

/* ==========================================================================
   Topbar Header
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.03em;
  transition: opacity 0.15s;
}
.brand:hover { opacity: 0.9; }
.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  font-size: 18px;
}
.brand-text { display: flex; align-items: baseline; }
.brand-lol { color: var(--gold); font-size: 18px; }

/* Live Stats Ticker */
.stats-ticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.live-dot-pulse {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald);
}
.live-dot-pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--emerald);
  opacity: 0.4;
  animation: radar-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes radar-ping {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

.ticker-item b { color: var(--text-main); font-weight: 700; }
.ticker-sep { color: rgba(255, 255, 255, 0.2); }
.text-gold { color: var(--gold) !important; }
.text-emerald { color: var(--emerald) !important; }

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}
.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.nav-tab:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.05); }
.nav-tab.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 10px; }
.share-x-only { min-height: 48px; background: #20242c; color: #fff; border-color: #20242c; }
.share-x-only:hover { color: #fff; background: #343942; }
.user-identity-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-pill);
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
}
.user-identity-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
  transform: translateY(-1px);
}
.user-avatar-wrap {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.2);
  font-size: 14px;
}
.user-identity-btn img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}

.help-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 14px;
  transition: all 0.15s;
}
.help-btn:hover { color: var(--text-main); border-color: var(--border-highlight); background: rgba(255, 255, 255, 0.08); }

/* ==========================================================================
   Main Page Layout
   ========================================================================== */

main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.loading-shell {
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
}
.loading-orbit {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Hero Header Section
   ========================================================================== */

.hero-section {
  text-align: center;
  max-width: 840px;
  margin: 0 auto 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-pill);
  color: var(--gold-light);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.5vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.gradient-text {
  background: linear-gradient(135deg, #fbbf24, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.5;
}

/* Search Bar */
.search-container {
  width: 100%;
  max-width: 560px;
  position: relative;
  margin-top: 6px;
}
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 18px;
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 48px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: 15px;
  color: var(--text-main);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
}
.search-input:focus {
  outline: none;
  border-color: var(--indigo-light);
  box-shadow: 0 0 0 3px var(--indigo-glow), 0 8px 24px rgba(0,0,0,0.5);
}
.search-clear {
  position: absolute;
  right: 14px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 13px;
}

/* Quick Filter Chips */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
}
.chip-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

/* Rivalry Banner */
.rivalry-banner {
  width: 100%;
  max-width: 760px;
  padding: 12px 18px;
  margin-top: 10px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 13.5px;
}
.rivalry-banner strong { color: var(--gold-light); }
.rivalry-quick-btn {
  padding: 6px 14px;
  background: var(--crimson);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: transform 0.15s;
}
.rivalry-quick-btn:hover { transform: scale(1.05); }

/* ==========================================================================
   Map Stage & World SVG Map
   ========================================================================== */

.map-card-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.map-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.map-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
}

.map-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.dot-lead { background: var(--gold); }
.dot-top { background: var(--blue); }
.dot-mine { background: var(--emerald); }

/* SVG Map Stage */
.map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 500;
  background: radial-gradient(circle at 50% 40%, #0d1527 0%, #060911 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#world-map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Country Path Styles */
.map-sphere { fill: none; stroke: rgba(255, 255, 255, 0.06); stroke-width: 0.8; }

.country-path {
  fill: var(--land-default);
  stroke: var(--land-stroke);
  stroke-width: 0.65;
  cursor: pointer;
  transition: fill 0.15s ease, stroke 0.15s ease, filter 0.15s ease;
}

.country-path:hover,
.country-path.is-hovered {
  fill: var(--land-hover) !important;
  stroke: var(--land-hover-stroke) !important;
  stroke-width: 1.4 !important;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

/* Ranked status fills */
.country-path.rank-1 {
  fill: #3b2a0c;
  stroke: var(--gold);
  stroke-width: 1;
}
.country-path.rank-top {
  fill: #162644;
  stroke: #4b6cb7;
}
.country-path.has-king {
  stroke: var(--gold-light);
  stroke-width: 0.9;
}
.country-path.user-voted {
  fill: #063826;
  stroke: var(--emerald);
  stroke-width: 1.2;
}

/* Crown Pins on Map */
.map-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-pin-item {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s;
}
.map-pin-item:hover { transform: translate(-50%, -115%) scale(1.1); }

.pin-bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 5px;
  background: rgba(14, 19, 31, 0.9);
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px var(--gold-glow);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.pin-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}

/* Floating Map Tooltip */
.map-tooltip {
  position: fixed;
  z-index: 500;
  pointer-events: none;
  background: rgba(14, 19, 31, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.7), 0 0 20px rgba(99, 102, 241, 0.15);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  min-width: 200px;
}
.map-tooltip.show { opacity: 1; transform: translateY(0); }
.tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.tooltip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
}
.tooltip-rank {
  padding: 2px 7px;
  background: var(--gold);
  color: #000;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 900;
}
.tooltip-stat {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}
.tooltip-stat strong { color: var(--text-main); }
.tooltip-king {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gold-light);
  font-weight: 700;
}

/* ==========================================================================
   Country Action Drawer (Slide-Over & Bottom Sheet)
   ========================================================================== */

.country-drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
  visibility: hidden;
  transition: visibility 0.3s;
}
.country-drawer.open { visibility: visible; }

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.country-drawer.open .drawer-backdrop { opacity: 1; }

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100vw);
  background: #0e1422;
  border-left: 1px solid var(--border-card);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
  padding: 28px 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.country-drawer.open .drawer-content { transform: translateX(0); }

/* Drawer Elements */
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.drawer-country-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.drawer-flag { font-size: 48px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4)); }
.drawer-names h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.drawer-rank-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-pill);
  color: var(--gold-light);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
}
.drawer-close-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 18px;
  transition: all 0.15s;
}
.drawer-close-btn:hover { background: rgba(255, 255, 255, 0.12); color: var(--text-main); }

/* Big Vote Card in Drawer */
.vote-action-card {
  padding: 20px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vote-card-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.vote-card-stat span { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.vote-card-stat strong { font-family: var(--font-display); font-size: 32px; font-weight: 900; color: var(--emerald-light); }

.big-vote-btn {
  height: 56px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.big-vote-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, #34d399, #10b981);
}
.big-vote-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* King Section Card in Drawer */
.king-status-card {
  padding: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.03));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.king-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.king-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.king-big-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  box-shadow: 0 0 14px var(--gold-glow);
}
.king-info-text { display: flex; flex-direction: column; gap: 2px; }
.king-info-text strong { font-size: 18px; font-weight: 800; }
.king-info-text span { font-size: 13px; color: var(--text-muted); }

.take-throne-btn {
  height: 52px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #000;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px var(--gold-glow);
  transition: all 0.2s;
}
.take-throne-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Rivalry Tug Card */
.drawer-rivalry-card {
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}
.rivalry-prog-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}
.rivalry-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--emerald));
  border-radius: var(--radius-pill);
}

/* Share Section in Drawer */
.drawer-share-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.share-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.15s;
}
.share-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
}

/* History List in Drawer */
.history-section { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.history-user { display: flex; align-items: center; gap: 10px; }
.history-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* ==========================================================================
   Tab 2: Rankings / Leaderboard (Podium & Table)
   ========================================================================== */

.ranking-view {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Top 3 Podium Stage */
.podium-stage {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: flex-end;
  gap: 16px;
  max-width: 860px;
  margin: 16px auto 10px;
  width: 100%;
}
.podium-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  position: relative;
  transition: transform 0.2s;
  cursor: pointer;
}
.podium-card:hover { transform: translateY(-4px); border-color: var(--border-highlight); }

.podium-card.rank-1 {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.2), rgba(16, 23, 38, 0.8));
  border-color: var(--gold);
  box-shadow: 0 14px 40px var(--gold-glow);
  padding-top: 32px;
}
.podium-card.rank-2 {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.15), rgba(16, 23, 38, 0.8));
  border-color: #94a3b8;
}
.podium-card.rank-3 {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.15), rgba(16, 23, 38, 0.8));
  border-color: #cd7f32;
}

.podium-medal {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 20px;
  position: absolute;
  top: -18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.podium-flag { font-size: 52px; line-height: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }
.podium-card.rank-1 .podium-flag { font-size: 64px; }
.podium-name { font-family: var(--font-display); font-size: 20px; font-weight: 900; }
.podium-votes { font-size: 15px; font-weight: 800; color: var(--emerald-light); }

.podium-king-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-light);
}

/* Leaderboard Controls */
.ranking-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.filter-pills { display: flex; gap: 6px; }
.filter-pill {
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s;
}
.filter-pill.active, .filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: var(--border-highlight);
}

/* Leaderboard Table List */
.ranking-list { display: flex; flex-direction: column; gap: 8px; }

.rank-item {
  display: grid;
  grid-template-columns: 50px minmax(180px, 1fr) minmax(100px, 140px) minmax(140px, 200px) 100px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  transition: all 0.15s ease;
  cursor: pointer;
}
.rank-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateX(4px);
}

.rank-badge {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  color: var(--text-muted);
}
.rank-item:nth-child(1) .rank-badge { background: var(--gold); color: #000; }
.rank-item:nth-child(2) .rank-badge { background: #94a3b8; color: #000; }
.rank-item:nth-child(3) .rank-badge { background: #cd7f32; color: #fff; }

.country-info-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.country-flag-sm { font-size: 28px; line-height: 1; }
.country-name-wrap { display: flex; flex-direction: column; min-width: 0; }
.country-name-wrap strong { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.country-name-wrap small { font-size: 12px; color: var(--text-muted); }

.vote-stat-cell {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--emerald-light);
  font-variant-numeric: tabular-nums;
}

.king-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.king-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  object-fit: cover;
}
.king-open-tag { color: var(--text-faint); font-size: 12px; }

.small-vote-btn {
  height: 38px;
  padding: 0 16px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  color: var(--emerald-light);
  font-weight: 800;
  font-size: 12.5px;
  transition: all 0.15s;
}
.small-vote-btn:hover {
  background: var(--emerald);
  color: #fff;
  transform: scale(1.04);
}
.small-vote-btn:disabled {
  background: rgba(71, 85, 105, 0.1);
  border-color: rgba(71, 85, 105, 0.2);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Tab 3: Hall of Kings (Krallar & Ağalar Grid)
   ========================================================================== */

.kings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.royal-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}
.royal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), #fbbf24);
}
.royal-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 12px 30px var(--gold-glow);
}

.royal-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.royal-avatar-wrap {
  position: relative;
}
.royal-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  box-shadow: 0 0 14px var(--gold-glow);
}
.royal-crown-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 16px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.royal-meta { display: flex; flex-direction: column; gap: 2px; }
.royal-handle { font-size: 18px; font-weight: 800; }
.royal-domain {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.royal-stats-box {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
}
.royal-stat-col { display: flex; flex-direction: column; gap: 2px; }
.royal-stat-col span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.royal-stat-col strong { font-size: 15px; font-weight: 800; }

.royal-link-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.15s;
}
.royal-link-btn:hover { background: rgba(255, 255, 255, 0.1); }

/* ==========================================================================
   Modals & Dialogs
   ========================================================================== */

.sheet-dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 520px;
  width: min(520px, calc(100vw - 32px));
  margin: auto;
}
.sheet-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sheet-dialog form,
.sheet-dialog .help-content {
  background: #0f1523;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.dialog-eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.08em;
}
.dialog-head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
}

.icon-button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 16px;
}
.icon-button:hover { background: rgba(255, 255, 255, 0.15); color: var(--text-main); }

/* Form Fields */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group input {
  height: 48px;
  padding: 0 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14.5px;
  transition: border-color 0.15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--indigo-light);
  box-shadow: 0 0 0 3px var(--indigo-glow);
}

.input-prefix-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 14px;
  color: var(--gold);
  font-weight: 800;
}
.input-prefix-wrap input { padding-left: 32px; width: 100%; }

.field-hint { font-size: 11.5px; color: var(--text-faint); font-weight: 500; }
.optional-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Upload Field */
.upload-label {
  padding: 16px;
  border: 2px dashed var(--border-highlight);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.15s;
}
.upload-label:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--gold); }
.upload-label input { display: none; }

/* Identity Preview */
.identity-preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg);
}
.identity-preview-card img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
}
.preview-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.06em;
}

/* Buttons */
.primary-btn {
  height: 50px;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #000;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px var(--gold-glow);
  transition: all 0.2s;
}
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.4);
}
.full-width { width: 100%; }

.demo-login-btn {
  height: 44px;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s;
}
.demo-login-btn:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.08); }

.auth-icon-badge {
  font-size: 48px;
  text-align: center;
  margin: 4px auto;
}
.auth-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

/* Rules / Help cards */
.rule-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
}
.rule-icon { font-size: 26px; }
.rule-card strong { font-size: 14.5px; font-weight: 800; display: block; margin-bottom: 2px; }
.rule-card p { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }

.form-error { color: var(--crimson); font-size: 13px; font-weight: 600; text-align: center; }

/* Toast Notifications */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #131a2c;
  border: 1px solid var(--border-highlight);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.error { border-left-color: var(--crimson); }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; }
  .stats-ticker { order: 3; width: 100%; justify-content: center; }
  .nav-tabs { order: 2; }
  .podium-stage { grid-template-columns: 1fr; }
  .podium-card.rank-1 { order: -1; }
  .rank-item {
    grid-template-columns: 40px 1fr 90px;
    gap: 10px;
  }
  .king-cell, .vote-prog-cell { display: none; }
}

@media (max-width: 600px) {
  .topbar-inner { padding: 10px 14px; }
  .brand-text { display: none; }
  .nav-tab span { display: none; }
  .nav-tab { padding: 8px 12px; font-size: 16px; }
  .hero-title { font-size: 32px; }
  .map-card-wrapper { padding: 12px; border-radius: var(--radius-lg); }
  .map-card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .drawer-content { width: 100vw; }
}

/* ==========================================================================
   v6 — Light atlas / command-deck treatment
   ========================================================================== */

.topbar {
  background: var(--bg-overlay);
  border-bottom: 1px solid #20242c;
  box-shadow: 0 3px 0 rgba(32, 36, 44, .08);
}
.topbar-inner {
  max-width: 1480px;
  padding: 9px 18px;
}
.brand { gap: 8px; font-size: 17px; }
.brand-icon {
  width: 35px;
  height: 35px;
  background: var(--gold);
  border: 1.5px solid #20242c;
  border-radius: 50% 50% 42% 58%;
  box-shadow: 2px 2px 0 #20242c;
  font-size: 16px;
  transform: rotate(-5deg);
}
.brand-lol { color: var(--crimson); font-size: 15px; }
.stats-ticker,
.nav-tabs {
  background: rgba(255, 255, 255, .62);
  border-color: rgba(32, 36, 44, .2);
}
.stats-ticker {
  border-radius: 5px 15px 5px 15px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
}
.ticker-item b { color: var(--text-main); }
.ticker-sep { color: rgba(32, 36, 44, .28); }
.nav-tabs { border-radius: 8px; padding: 3px; }
.nav-tab {
  border-radius: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: -.02em;
}
.nav-tab:hover { color: var(--text-main); background: rgba(32, 36, 44, .06); }
.nav-tab.active {
  color: #fff;
  background: #20242c;
  box-shadow: none;
}
.user-identity-btn {
  color: #20242c;
  background: #ffdd68;
  border: 1.5px solid #20242c;
  border-radius: 7px 16px 7px 16px;
  box-shadow: 2px 2px 0 #20242c;
}
.user-identity-btn:hover { background: #ffe991; transform: translate(-1px, -1px); }
.user-avatar-wrap { background: rgba(255,255,255,.55); }
.help-btn {
  color: var(--text-main);
  background: rgba(255,255,255,.68);
  border-color: rgba(32,36,44,.3);
}
.help-btn:hover { color: var(--text-main); background: #fff; border-color: #20242c; }

main {
  max-width: 1480px;
  padding: 22px 18px 64px;
}

.arena-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  align-items: end;
  gap: 34px;
  margin: 2px 0 18px;
  padding: 8px 2px 4px;
}
.arena-copy { max-width: 750px; }
.console-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
}
.arena-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.7vw, 56px);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.045em;
}
.arena-copy h1 span { color: var(--crimson); }
.arena-copy p {
  max-width: 680px;
  margin-top: 9px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.arena-tools { display: flex; flex-direction: column; gap: 7px; }
.arena-tools .search-input-wrap { width: 100%; }
.search-input {
  height: 46px;
  background: rgba(255,255,255,.84);
  border: 1.5px solid #20242c;
  border-radius: 6px 20px 6px 20px;
  color: var(--text-main);
  box-shadow: 4px 4px 0 rgba(32,36,44,.12);
  font-family: var(--font-mono);
  font-size: 12px;
}
.search-input:focus {
  border-color: #20242c;
  box-shadow: 4px 4px 0 #b9c9ff;
}
.quick-chips { justify-content: flex-start; margin-top: 0; }
.chip-btn {
  color: var(--text-main);
  background: rgba(255,255,255,.55);
  border-color: rgba(32,36,44,.2);
  border-radius: 4px 10px 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.chip-btn:hover { color: var(--text-main); background: #fff; border-color: #20242c; transform: translateY(-1px); }

.arena-grid {
  display: grid;
  grid-template-columns: minmax(210px, 252px) minmax(520px, 1fr) minmax(210px, 252px);
  grid-template-areas: "left map right";
  gap: 12px;
  align-items: stretch;
}
.intel-left { grid-area: left; }
.intel-right { grid-area: right; }
.arena-grid > .map-card-wrapper { grid-area: map; }
.intel-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.intel-card,
.map-card-wrapper {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid #20242c;
  box-shadow: 5px 5px 0 rgba(32, 36, 44, .13);
}
.intel-card {
  overflow: hidden;
  border-radius: 5px 22px 5px 14px;
}
.intel-card:nth-child(even) { border-radius: 18px 5px 18px 5px; }
.intel-card-head {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(32,36,44,.18);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .1em;
}
.intel-card-head b,
.mint-label {
  padding: 2px 6px;
  color: #fff;
  background: var(--crimson);
  border-radius: 2px 7px 2px 7px;
  font-size: 8px;
}
.intel-card-head .mint-label { background: var(--emerald); }
.intel-list { display: flex; flex-direction: column; }
.intel-row {
  width: 100%;
  min-height: 45px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(32,36,44,.1);
  text-align: left;
  transition: background .15s, padding-left .15s;
}
.intel-row:hover { background: #fff4c8; padding-left: 13px; }
.intel-rank {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 9px;
}
.intel-country { min-width: 0; display: flex; align-items: center; gap: 7px; }
.intel-country i { font-size: 17px; font-style: normal; }
.intel-country strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.intel-value,
.intel-price {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
}
.intel-price { color: var(--emerald-light); font-weight: 500; }
.intel-footer-action {
  width: 100%;
  min-height: 37px;
  color: var(--text-main);
  background: #f7f1e2;
  border-top: 1px solid rgba(32,36,44,.1);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .07em;
}
.intel-footer-action:hover { color: #fff; background: #20242c; }
.pulse-list { padding: 4px 10px 7px; }
.pulse-row { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 9px 0; border-bottom: 1px dashed rgba(32,36,44,.16); }
.pulse-row:last-child { border-bottom: 0; }
.pulse-row p { color: var(--text-muted); font-family: var(--font-mono); font-size: 8.5px; line-height: 1.45; }

.leader-intel {
  min-height: 234px;
  padding: 16px;
  background: #ffe379;
  isolation: isolate;
}
.leader-intel::after {
  content: "#1";
  position: absolute;
  right: -8px;
  bottom: -18px;
  z-index: -1;
  color: rgba(32,36,44,.07);
  font-family: var(--font-display);
  font-size: 96px;
}
.leader-stripe {
  display: inline-flex;
  padding: 3px 7px;
  color: #fff;
  background: #20242c;
  border-radius: 2px 8px 2px 8px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .1em;
}
.leader-flag { margin-top: 8px; font-size: 36px; line-height: 1; }
.leader-rank { display: block; margin-top: 5px; font-family: var(--font-mono); font-size: 8px; }
.leader-intel h2 { margin-top: 2px; font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1; }
.leader-intel p { margin-top: 5px; color: rgba(32,36,44,.7); font-size: 10px; }
.leader-vote {
  width: 100%;
  min-height: 38px;
  margin-top: 13px;
  color: #fff;
  background: var(--crimson);
  border: 1.5px solid #20242c;
  border-radius: 5px 14px 5px 14px;
  box-shadow: 2px 2px 0 #20242c;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}
.leader-vote:hover { transform: translate(1px,1px); box-shadow: 1px 1px 0 #20242c; }
.throne-list .intel-row { grid-template-columns: minmax(0,1fr) auto; }

.map-card-wrapper {
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  border-radius: 8px 28px 8px 28px;
  box-shadow: 7px 7px 0 rgba(32,36,44,.16);
}
.map-card-header {
  min-height: 39px;
  margin: 0;
  padding: 2px 4px 10px;
  border-bottom-color: rgba(32,36,44,.14);
}
.map-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; }
.map-title-index {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: #fff;
  background: #20242c;
  border-radius: 50%;
  font-size: 8px;
}
.map-legend { color: var(--text-muted); font-family: var(--font-mono); font-size: 8px; }
.legend-dot { width: 8px; height: 8px; border: 1px solid rgba(32,36,44,.35); border-radius: 2px; }
.map-stage {
  min-height: 430px;
  aspect-ratio: auto;
  background:
    linear-gradient(rgba(32,36,44,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,36,44,.055) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, #e8f3ef 0%, #d5e8e2 70%, #c8ddd7 100%);
  background-size: 36px 36px, 36px 36px, auto;
  border: 1px solid rgba(32,36,44,.26);
  border-radius: 5px 18px 5px 18px;
}
.map-sphere { fill: rgba(255,255,255,.18); stroke: rgba(32,36,44,.13); }
.country-path { filter: drop-shadow(0 1px 0 rgba(255,255,255,.35)); }
.country-path.untracked { pointer-events: none; opacity: .55; }
.country-path:hover,
.country-path.is-hovered {
  filter: drop-shadow(2px 3px 0 rgba(32,36,44,.22));
}
.country-path.rank-1 { fill: #ffd753; stroke: #8b6500; }
.country-path.rank-top { fill: #9fb5f0; stroke: #465a91; }
.country-path.has-king { stroke: #b06d00; stroke-width: 1.2; }
.country-path.user-voted { fill: #70c8a6; stroke: #0c6c4e; }
.pin-bubble {
  color: var(--text-main);
  background: rgba(255,253,247,.94);
  border: 1px solid #20242c;
  border-radius: 3px 9px 3px 9px;
  box-shadow: 2px 2px 0 rgba(32,36,44,.24);
  font-family: var(--font-mono);
  font-size: 8px;
}
.map-command-bar {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 5px 0;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .08em;
}
.map-command-bar button {
  color: #fff;
  background: var(--crimson);
  border-radius: 3px 9px 3px 9px;
  padding: 5px 8px;
  font: inherit;
}
.map-command-stat { color: var(--emerald-light); font-weight: 500; }

.map-tooltip {
  color: var(--text-main);
  background: rgba(255,253,247,.97);
  border: 1.5px solid #20242c;
  border-radius: 5px 15px 5px 15px;
  box-shadow: 5px 5px 0 rgba(32,36,44,.18);
}
.tooltip-rank { color: #20242c; }
.tooltip-stat strong { color: var(--text-main); }

/* All secondary views inherit the light card language. */
.hero-badge,
.drawer-rank-tag { color: #765000; background: #fff0af; border-color: #c99918; }
.gradient-text { background: none; -webkit-text-fill-color: var(--crimson); color: var(--crimson); }
.podium-card,
.rank-item,
.royal-card,
.rule-card,
.drawer-rivalry-card {
  background: var(--bg-card);
  border-color: var(--border-card);
  box-shadow: 4px 4px 0 rgba(32,36,44,.1);
}
.podium-card,
.royal-card { border-radius: 7px 24px 7px 24px; }
.podium-card.rank-1 { background: #ffe585; border-color: #8c6900; box-shadow: 6px 6px 0 rgba(32,36,44,.14); }
.podium-card.rank-2 { background: #edf1f5; border-color: #8b949b; }
.podium-card.rank-3 { background: #f5d1b3; border-color: #aa7148; }
.podium-king-badge,
.royal-stats-box,
.filter-pill,
.share-btn,
.royal-link-btn,
.demo-login-btn { color: var(--text-main); background: rgba(255,255,255,.6); }
.filter-pill.active,
.filter-pill:hover { color: #fff; background: #20242c; }
.rank-item { border-radius: 4px 16px 4px 16px; }
.rank-item:hover { background: #fff; box-shadow: 4px 4px 0 rgba(32,36,44,.15); }
.rank-badge { background: rgba(32,36,44,.07); }
.royal-card:nth-child(3n+2) { border-radius: 22px 6px 22px 6px; }
.drawer-backdrop { background: rgba(32,36,44,.36); }
.drawer-content {
  color: var(--text-main);
  background: #f7f1e6;
  border-left: 1.5px solid #20242c;
  box-shadow: -8px 0 0 rgba(32,36,44,.12);
}
.drawer-close-btn { color: var(--text-main); background: rgba(32,36,44,.07); }
.drawer-close-btn:hover { color: #fff; background: #20242c; }
.vote-action-card { background: #dff3e8; border-color: #78ad96; }
.king-status-card { background: #fff0b6; border-color: #c99918; }
.rivalry-prog-bar { background: rgba(32,36,44,.1); }
.history-row { background: rgba(255,255,255,.5); }

.sheet-dialog {
  color: var(--text-main);
  background: #fffaf0;
  border: 1.5px solid #20242c;
  border-radius: 8px 28px 8px 28px;
  box-shadow: 8px 8px 0 rgba(32,36,44,.22);
}
.sheet-dialog form,
.sheet-dialog .help-content {
  color: var(--text-main);
  background: #fffaf0;
  border: 0;
  box-shadow: none;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.sheet-dialog::backdrop { background: rgba(32,36,44,.38); }
.icon-button { color: var(--text-main); background: rgba(32,36,44,.06); }
.form-group input {
  color: var(--text-main);
  background: #fff;
  border-color: rgba(32,36,44,.25);
}
.form-group input:focus { border-color: #20242c; box-shadow: 0 0 0 3px rgba(71,120,220,.16); }
.identity-preview-card { background: #fff0b6; border-color: #c99918; }
.primary-btn { color: #fff; background: var(--crimson); border: 1px solid #20242c; box-shadow: 3px 3px 0 #20242c; }
.primary-btn:hover { box-shadow: 1px 1px 0 #20242c; }
.toast { color: var(--text-main); background: #fffdf7; border-color: #20242c; box-shadow: 4px 4px 0 rgba(32,36,44,.18); }
.loading-orbit { border-color: rgba(32,36,44,.12); border-top-color: var(--crimson); }

/* Public owner identity + email-free checkout */
.king-visit-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 11px;
  color: #f7f7f5;
  background: #20242c;
  border: 1px solid #111318;
  border-radius: 5px 16px 5px 16px;
  box-shadow: 3px 3px 0 rgba(32,36,44,.2);
}
.king-visit-card .king-big-avatar { width: 54px; height: 54px; border: 2px solid #fffaf0; border-radius: 9px; object-fit: cover; }
.king-link-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.king-link-network { color: #ffd753; font: 500 9px/1 var(--font-mono); letter-spacing: .12em; }
.king-link-copy strong { overflow: hidden; font: 800 15px/1.2 var(--font-body); text-overflow: ellipsis; white-space: nowrap; }
.king-link-copy small { color: #aeb3bd; font: 700 9.5px/1.2 var(--font-mono); letter-spacing: .04em; }
.king-visit-actions { display: flex; align-items: stretch; gap: 7px; }
.king-click-metric {
  min-width: 54px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #20242c;
  background: #ffd753;
  border: 1px solid #ffe899;
  border-radius: 4px 10px 4px 10px;
}
.king-click-metric strong { font: 900 16px/1 var(--font-display); }
.king-click-metric small { margin-top: 3px; font: 800 7.5px/1 var(--font-mono); letter-spacing: .08em; }
.visit-king-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  color: #fff;
  background: var(--crimson);
  border: 1px solid #ff8178;
  border-radius: 4px 10px 4px 10px;
  font: 900 10px/1 var(--font-body);
  white-space: nowrap;
}
.visit-king-btn:hover { color: #fff; transform: translateY(-1px); }
.king-display-name { margin-top: 7px; color: #624b12; font: 700 11px/1.3 var(--font-mono); }

@media (max-width: 520px) {
  .king-visit-card { grid-template-columns: 46px minmax(0, 1fr); }
  .king-visit-card .king-big-avatar { width: 46px; height: 46px; }
  .king-visit-actions { grid-column: 1 / -1; }
  .king-click-metric, .visit-king-btn { min-height: 40px; }
  .visit-king-btn { flex: 1; justify-content: center; }
}

.checkout-country-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #fff0b6;
  border: 1px solid #c99918;
  border-radius: 5px 16px 5px 16px;
}
.checkout-country-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 17px; }
.checkout-country-line > strong { color: var(--crimson); font: 900 21px/1 var(--font-display); }
.checkout-country-card p { color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.checkout-price-note { padding: 8px 10px; color: #664d08; background: rgba(255,255,255,.56); border-radius: 4px 10px 4px 10px; font: 600 10px/1.3 var(--font-mono); }
.checkout-identity-fields { display: flex; flex-direction: column; gap: 13px; }
.checkout-field { display: flex; flex-direction: column; gap: 6px; color: var(--text-main); font-size: 12px; font-weight: 800; }
.checkout-field > span { color: var(--text-faint); font-weight: 500; }
.checkout-field input { width: 100%; height: 47px; padding: 0 13px; color: var(--text-main); background: #fff; border: 1px solid rgba(32,36,44,.3); border-radius: 4px 12px 4px 12px; font: 500 13px/1 var(--font-body); }
.checkout-field input:focus { outline: 0; border-color: #20242c; box-shadow: 0 0 0 3px rgba(71,120,220,.14); }
.checkout-field small { color: var(--text-faint); font-size: 9.5px; font-weight: 500; }
.checkout-upload { display: flex; align-items: center; gap: 11px; padding: 10px; cursor: pointer; background: rgba(255,255,255,.58); border: 1px dashed rgba(32,36,44,.45); border-radius: 4px 12px 4px 12px; }
.checkout-upload > span { display: grid; width: 45px; height: 45px; flex: 0 0 45px; place-items: center; overflow: hidden; color: #fff; background: #20242c; border-radius: 9px; font-size: 20px; }
.checkout-upload img { width: 100%; height: 100%; object-fit: cover; }
.checkout-upload div { display: flex; flex-direction: column; gap: 2px; }
.checkout-upload strong { font-size: 12px; }
.checkout-upload small { color: var(--text-faint); font-size: 9.5px; }
.checkout-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.device-session-note { color: var(--text-faint); font: 500 9px/1.45 var(--font-mono); }
.checkout-saved-identity { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px; background: #dff3e8; border: 1px solid #78ad96; border-radius: 5px 14px 5px 14px; }
.checkout-saved-identity img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.checkout-saved-identity div { min-width: 0; display: flex; flex-direction: column; }
.checkout-saved-identity small { color: #39765e; font: 500 8.5px/1 var(--font-mono); letter-spacing: .09em; }
.checkout-saved-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout-saved-identity button { color: #fff; background: #20242c; border-radius: 4px 9px 4px 9px; padding: 8px; font: 700 9px/1 var(--font-mono); }

/* Country command center — voting and paid placement share one visible surface. */
.drawer-command-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font: 600 8px/1 var(--font-mono);
  letter-spacing: .16em;
}
.drawer-content > * { flex-shrink: 0; }
.drawer-command-label span { width: 7px; height: 7px; background: var(--emerald); border: 1px solid #225d47; border-radius: 50%; box-shadow: 0 0 0 3px rgba(36,155,111,.12); }
.throne-command-card {
  flex: 0 0 auto;
  overflow: hidden;
  background: #fffdf7;
  border: 1.5px solid #20242c;
  border-radius: 6px 22px 6px 22px;
  box-shadow: 5px 5px 0 rgba(32,36,44,.14);
}
.throne-command-head {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: #fffaf0;
  background: #20242c;
  border-bottom: 4px solid #ffd753;
}
.throne-command-head div { display: flex; flex-direction: column; gap: 5px; }
.throne-command-head span { color: #9fe0c1; font: 500 8px/1 var(--font-mono); letter-spacing: .14em; }
.throne-command-head h3 { margin: 0; font: 900 18px/1.05 var(--font-display); letter-spacing: -.025em; }
.throne-command-head > strong { color: #ffd753; font: 900 23px/1 var(--font-display); white-space: nowrap; }
.drawer-throne-form { display: flex; flex-direction: column; gap: 13px; padding: 16px; }
.throne-command-promise { color: var(--text-muted); font-size: 11.5px; line-height: 1.55; }
.throne-command-promise strong { color: var(--text-main); }
.checkout-upload { position: relative; }
.checkout-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px,1fr));
  overflow: hidden;
  background: #f7f1e6;
  border: 1px solid rgba(32,36,44,.22);
  border-radius: 4px 13px 4px 13px;
}
.checkout-ledger > span { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px 11px; border-right: 1px solid rgba(32,36,44,.14); }
.checkout-ledger small { color: var(--text-faint); font: 500 7px/1.2 var(--font-mono); letter-spacing: .08em; }
.checkout-ledger strong { font: 800 13px/1 var(--font-body); }
.checkout-ledger .checkout-ledger-total { color: #fff; background: var(--crimson); border: 0; }
.checkout-ledger-total small { color: rgba(255,255,255,.78); }
.checkout-ledger-total strong { font: 900 17px/1 var(--font-display); }
.drawer-throne-error:empty { display: none; }
.drawer-throne-submit {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 17px;
  color: #fff;
  background: var(--crimson);
  border: 1.5px solid #20242c;
  border-radius: 5px 15px 5px 15px;
  box-shadow: 3px 3px 0 #20242c;
  font: 900 13px/1 var(--font-display);
  letter-spacing: .015em;
  transition: transform .15s ease, box-shadow .15s ease;
}
.drawer-throne-submit > span { min-width: 0; text-align: left; line-height: 1.15; }
.drawer-throne-submit strong { color: #fff5b8; font-size: 16px; white-space: nowrap; }
.drawer-throne-submit:hover { transform: translate(2px,2px); box-shadow: 1px 1px 0 #20242c; }
.drawer-throne-submit:disabled { opacity: .65; cursor: wait; transform: none; box-shadow: none; }
.checkout-trust { color: var(--text-faint); font: 500 8px/1.5 var(--font-mono); }
.owned-throne-panel { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 12px; align-items: center; padding: 16px; }
.owned-throne-panel img { width: 54px; height: 54px; border: 1.5px solid #20242c; border-radius: 5px 14px 5px 14px; object-fit: cover; }
.owned-throne-panel div { display: flex; flex-direction: column; gap: 3px; }
.owned-throne-panel div strong { font-size: 12.5px; }
.owned-throne-panel div small { color: var(--text-muted); font-size: 10px; line-height: 1.4; }
.owned-throne-panel button,
.checkout-unavailable button { grid-column: 1 / -1; min-height: 40px; color: #fff; background: #20242c; border-radius: 4px 12px 4px 12px; font: 700 9px/1 var(--font-mono); letter-spacing: .06em; }
.checkout-unavailable { display: flex; flex-direction: column; gap: 7px; padding: 16px; }
.checkout-unavailable small { color: var(--text-muted); line-height: 1.45; }

/* ==========================================================================
   Map as the product — full world surface, persistent paid identity
   ========================================================================== */
main.map-product-mode {
  width: 100%;
  max-width: none;
  padding: 0 0 28px;
}
.map-product-shell { width: 100%; background: #d8e9e3; border-bottom: 1.5px solid #20242c; }
.map-product-header {
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(440px, 1.2fr);
  align-items: end;
  gap: 28px;
  padding: 15px 22px 14px;
  background: #f7f1e6;
  border-bottom: 1.5px solid #20242c;
}
.map-product-title h1 { font: 400 clamp(30px, 3.2vw, 52px)/.88 var(--font-display); letter-spacing: -.055em; }
.map-product-title h1 span { color: var(--crimson); }
.map-product-title p { margin-top: 7px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
.map-product-tools { display: flex; flex-direction: column; gap: 8px; }
.map-product-tools .quick-chips { flex-wrap: nowrap; overflow-x: auto; }

.map-product-shell .map-stage {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  display: block;
  background: #cfe3dc;
  border: 0;
  border-radius: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  isolation: isolate;
}
.map-product-shell .map-stage:active { cursor: grabbing; }
.map-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(32,36,44,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32,36,44,.045) 1px, transparent 1px),
    radial-gradient(circle at 48% 38%, rgba(255,255,255,.74), transparent 44%),
    linear-gradient(150deg, #e1f0eb 0%, #bfd9d0 100%);
  background-size: 38px 38px, 38px 38px, auto, auto;
}
.map-transform-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform-origin: 50% 50%;
  will-change: transform;
}
.map-product-shell #world-map-svg { width: 100%; height: 100%; }
.map-product-shell .map-sphere { fill: rgba(255,255,255,.24); stroke: rgba(32,36,44,.15); stroke-width: .7; }
.map-product-shell .country-path { fill: #b7cec6; stroke: #516b64; stroke-width: .58; vector-effect: non-scaling-stroke; }
.map-product-shell .country-path:hover,
.map-product-shell .country-path.is-hovered,
.map-product-shell .country-path:focus { fill: #ffd95d !important; stroke: #20242c !important; stroke-width: 1.5 !important; filter: drop-shadow(0 2px 0 rgba(32,36,44,.23)); outline: none; }
.map-product-shell .country-path.rank-1 { fill: #ffd753; stroke: #8b6500; }
.map-product-shell .country-path.rank-top { fill: #9fb5f0; stroke: #465a91; }
.map-product-shell .country-path.has-king { fill: #ffe7a0; stroke: #8b6500; stroke-width: 1.3; }

.map-product-shell .map-pins-layer { z-index: 3; }
.map-product-shell .map-pin-item { z-index: 2; transform: translate(-50%, -100%); }
.map-product-shell .map-pin-item:hover { z-index: 20; transform: translate(-50%, -106%); }
.map-product-shell .map-pin-item:focus { outline: none; }
.map-product-shell .map-pin-item:focus-visible .pin-bubble { outline: 3px solid #3151af; outline-offset: 3px; }
.map-product-shell .pin-bubble {
  min-height: 29px;
  gap: 7px;
  padding: 4px 8px 4px 4px;
  color: #fff;
  background: #20242c;
  border: 1px solid #0d1015;
  border-radius: 5px 13px 5px 13px;
  box-shadow: 3px 3px 0 rgba(32,36,44,.25), 0 0 0 2px rgba(255,255,255,.5);
  font-family: var(--font-body);
}
.map-product-shell .owner-map-pin .pin-bubble { min-height: 39px; padding: 4px 9px 4px 4px; border-color: #ffcf43; }
.map-product-shell .pin-avatar { display: block; width: 31px; height: 31px; flex: 0 0 31px; border: 1px solid rgba(255,255,255,.8); border-radius: 7px; object-fit: cover; }
.pin-owner-copy,
.pin-rank-copy { display: flex; min-width: 0; flex-direction: column; text-align: left; }
.pin-owner-copy strong { max-width: 126px; overflow: hidden; font-size: 10.5px; font-weight: 900; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.pin-owner-copy small { color: #b8bdc6; font: 500 7px/1.2 var(--font-mono); }
.pin-rank-flag { font-size: 17px; }
.pin-rank-copy strong { color: #ffd753; font: 700 9px/1 var(--font-mono); }
.pin-rank-copy small { color: #d6d8dc; font: 500 7px/1.1 var(--font-mono); }

.map-hud {
  position: absolute;
  z-index: 8;
  top: 18px;
  width: 230px;
  overflow: hidden;
  color: #20242c;
  background: rgba(255,251,241,.94);
  border: 1.5px solid #20242c;
  border-radius: 5px 18px 5px 18px;
  box-shadow: 5px 5px 0 rgba(32,36,44,.17);
  backdrop-filter: blur(10px);
  cursor: default;
}
.map-ranking-hud { left: 18px; }
.map-throne-hud { right: 18px; }
.map-hud-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid rgba(32,36,44,.15); font: 600 8px/1 var(--font-mono); letter-spacing: .1em; }
.map-hud-head b { padding: 3px 6px; color: #fff; background: var(--crimson); border-radius: 3px 7px; font-size: 7px; }
.map-hud-row { width: 100%; min-height: 36px; display: grid; grid-template-columns: 18px 19px minmax(0,1fr) auto; align-items: center; gap: 6px; padding: 5px 9px; border-bottom: 1px solid rgba(32,36,44,.1); text-align: left; }
.map-hud-row:hover { background: #fff0b6; }
.map-hud-row > span { color: var(--text-faint); font: 500 8px/1 var(--font-mono); }
.map-hud-row i { font-size: 15px; font-style: normal; }
.map-hud-row strong { overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.map-hud-row small { color: var(--text-muted); font: 500 7.5px/1 var(--font-mono); white-space: nowrap; }
.map-hud-row.throne { grid-template-columns: 20px minmax(0,1fr) auto; }
.map-hud-row.throne small { color: var(--emerald-light); font-weight: 700; }
.map-hud-footer { width: 100%; min-height: 31px; font: 600 8px/1 var(--font-mono); }
.map-hud-footer:hover { color: #fff; background: #20242c; }
.map-feed-head { min-height: 30px; display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-top: 1.5px solid #20242c; border-bottom: 1px solid rgba(32,36,44,.15); font: 700 8px/1 var(--font-mono); letter-spacing: .1em; }
.map-feed-head .live-dot-pulse { width: 7px; height: 7px; flex: 0 0 7px; }
.map-feed-list { display: flex; flex-direction: column; }
.map-feed-item { width: 100%; min-height: 46px; display: grid; grid-template-columns: 23px minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 6px 9px; border-bottom: 1px solid rgba(32,36,44,.1); text-align: left; }
button.map-feed-item:hover { background: #fff0b6; }
.map-feed-icon { width: 23px; height: 23px; display: grid; place-items: center; background: rgba(32,36,44,.07); border-radius: 3px 7px; font-size: 12px; }
.map-feed-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.map-feed-copy strong,
.map-feed-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-feed-copy strong { font-size: 8.5px; line-height: 1.1; }
.map-feed-copy small { color: var(--text-muted); font: 500 6.5px/1.1 var(--font-mono); }
.map-feed-item time { color: var(--text-faint); font: 500 6.5px/1 var(--font-mono); white-space: nowrap; }
.map-feed-empty { display: grid; grid-template-columns: 24px 1fr; gap: 3px 7px; align-items: center; padding: 10px; }
.map-feed-empty > span { grid-row: 1 / 3; }
.map-feed-empty strong { font-size: 8.5px; }
.map-feed-empty small { color: var(--text-muted); font: 500 6.5px/1.25 var(--font-mono); }
.map-mobile-feed { display: none; }
.map-live-counter { position: absolute; z-index: 8; top: 18px; left: 50%; padding: 7px 12px; color: #fff; background: #20242c; border: 1px solid #080a0d; border-radius: 4px 12px 4px 12px; box-shadow: 3px 3px 0 rgba(32,36,44,.18); transform: translateX(-50%); font: 500 8px/1 var(--font-mono); letter-spacing: .08em; }
.map-live-counter span { color: #ffd753; font-weight: 700; }
.map-zoom-controls { position: absolute; z-index: 9; right: 18px; bottom: 18px; display: grid; grid-template-columns: 38px 54px 38px 38px; overflow: hidden; background: #fffaf0; border: 1.5px solid #20242c; border-radius: 5px 15px 5px 15px; box-shadow: 4px 4px 0 rgba(32,36,44,.18); }
.map-zoom-controls button,
.map-zoom-controls output { min-height: 38px; display: grid; place-items: center; border-right: 1px solid rgba(32,36,44,.16); font: 700 12px/1 var(--font-mono); }
.map-zoom-controls button:hover { color: #fff; background: #20242c; }
.map-zoom-controls output { color: var(--text-muted); font-size: 8px; }
.map-gesture-hint { position: absolute; z-index: 7; bottom: 20px; left: 50%; padding: 5px 9px; color: rgba(32,36,44,.64); background: rgba(255,251,241,.72); border-radius: 3px 9px; transform: translateX(-50%); font: 500 7px/1 var(--font-mono); letter-spacing: .08em; white-space: nowrap; }

.map-owner-rail { min-height: 78px; display: grid; grid-template-columns: 210px minmax(0,1fr); border-top: 1.5px solid #20242c; background: #fffaf0; }
.owner-rail-label { display: grid; grid-template-columns: 32px 1fr; align-content: center; column-gap: 7px; padding: 10px 14px; border-right: 1px solid rgba(32,36,44,.18); }
.owner-rail-label > span { grid-row: 1 / 3; align-self: center; font-size: 24px; }
.owner-rail-label strong { font: 600 8px/1 var(--font-mono); letter-spacing: .08em; }
.owner-rail-label small { color: var(--text-faint); font-size: 8px; }
.owner-rail-track { min-width: 0; display: flex; align-items: stretch; overflow-x: auto; }
.owner-rail-item { min-width: 178px; display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-right: 1px solid rgba(32,36,44,.13); text-align: left; }
.owner-rail-item:hover { background: #fff0b6; }
.owner-rail-item img { width: 42px; height: 42px; flex: 0 0 42px; border: 1.5px solid #20242c; border-radius: 8px; object-fit: cover; }
.owner-rail-item span { min-width: 0; display: flex; flex-direction: column; }
.owner-rail-item strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.owner-rail-item small { color: var(--text-muted); font: 500 7.5px/1.3 var(--font-mono); }
.owner-rail-empty { padding: 0 22px; color: var(--crimson); font: 700 9px/1 var(--font-mono); letter-spacing: .06em; }

@media (min-width: 721px) {
  .country-drawer { pointer-events: none; }
  .country-drawer .drawer-content { width: min(510px, 43vw); pointer-events: auto; }
  .country-drawer.open .drawer-backdrop { opacity: 0 !important; background: transparent; pointer-events: none; backdrop-filter: none; }
}

@media (max-width: 1180px) {
  .stats-ticker .ticker-item:nth-of-type(4),
  .stats-ticker .ticker-item:nth-of-type(6),
  .stats-ticker .ticker-sep:nth-of-type(3),
  .stats-ticker .ticker-sep:nth-of-type(5) { display: none; }
  .arena-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "map map"
      "left right";
  }
  .intel-stack { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .map-product-shell .map-stage { min-height: 0; }
  .map-hud { width: 205px; }
}

@media (max-width: 900px) {
  .topbar-inner { flex-wrap: nowrap; }
  .stats-ticker { order: initial; width: auto; }
  .stats-ticker .ticker-item:not(:first-of-type),
  .stats-ticker .ticker-sep { display: none; }
  .arena-intro { grid-template-columns: 1fr; gap: 18px; }
  .arena-tools { max-width: none; }
  .arena-copy h1 { max-width: 760px; }
  .map-product-shell .map-stage { min-height: 0; }
  .map-throne-hud { display: none; }
}

@media (max-width: 720px) {
  main { padding: 15px 10px 48px; }
  .topbar-inner { padding: 8px 10px; gap: 8px; }
  .stats-ticker { display: none; }
  .user-btn-label { display: none; }
  .user-identity-btn { padding: 5px; }
  .help-btn { display: none; }
  .arena-copy h1 { font-size: clamp(28px, 10vw, 42px); }
  .arena-copy p { font-size: 12px; }
  .map-product-header { min-height: 0; grid-template-columns: 1fr; gap: 12px; padding: 14px 12px 12px; }
  .map-product-title h1 { font-size: 35px; }
  .map-product-title p { font-size: 10px; }
  .map-product-tools .search-input { height: 42px; }
  .arena-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "map" "left" "right";
  }
  .intel-stack { grid-template-columns: 1fr; }
  .map-card-wrapper { padding: 7px; border-radius: 6px 20px 6px 20px; }
  .map-product-shell .map-stage { height: 360px; min-height: 360px; aspect-ratio: auto; }
  .map-product-shell .map-transform-layer { inset: 0 auto auto 50%; width: 720px; height: 360px; margin-left: -360px; }
  .map-product-shell .map-ranking-hud { display: none; }
  .map-mobile-feed { display: block; background: #fffaf0; border-top: 1.5px solid #20242c; }
  .map-mobile-feed .map-feed-head { min-height: 38px; border-top: 0; padding-inline: 12px; font-size: 9px; }
  .map-mobile-feed .map-feed-item { min-height: 55px; grid-template-columns: 30px minmax(0,1fr) auto; padding: 8px 12px; }
  .map-mobile-feed .map-feed-icon { width: 30px; height: 30px; font-size: 15px; }
  .map-mobile-feed .map-feed-copy strong { font-size: 10px; }
  .map-mobile-feed .map-feed-copy small,
  .map-mobile-feed .map-feed-item time { font-size: 7px; }
  .map-live-counter { top: 9px; font-size: 7px; }
  .map-zoom-controls { right: 10px; bottom: 10px; grid-template-columns: 36px 48px 36px 36px; }
  .map-gesture-hint { left: 10px; bottom: 13px; max-width: 180px; overflow: hidden; transform: none; text-overflow: ellipsis; }
  .map-owner-rail { grid-template-columns: 132px minmax(0,1fr); min-height: 70px; }
  .owner-rail-label { grid-template-columns: 24px 1fr; padding: 8px; }
  .owner-rail-label > span { font-size: 18px; }
  .owner-rail-label small { display: none; }
  .owner-rail-item { min-width: 158px; padding: 7px 10px; }
  .owner-rail-item img { width: 38px; height: 38px; flex-basis: 38px; }
  .map-legend { display: none; }
  .map-command-bar { align-items: flex-start; flex-direction: column; }
  .map-command-bar button { width: 100%; }
  .quick-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .chip-btn { flex: 0 0 auto; }
  .leader-intel { min-height: 220px; }
  .country-drawer .drawer-content { padding: 20px 16px; }
  .drawer-throne-form { padding: 14px; }
  .king-visit-card { grid-template-columns: 48px minmax(0, 1fr); }
  .king-visit-card .king-big-avatar { width: 48px; height: 48px; }
  .visit-king-btn { grid-column: 1 / -1; width: 100%; text-align: center; }
}

@media (max-width: 460px) {
  .nav-tab { padding: 7px 9px; }
  .nav-tab span { display: none; }
  .brand-icon { width: 32px; height: 32px; }
  .arena-intro { margin-top: 0; }
  .console-kicker { font-size: 8.5px; }
  .map-product-shell .map-stage { height: 320px; min-height: 320px; }
  .map-product-shell .map-transform-layer { width: 640px; height: 320px; margin-left: -320px; }
  .map-product-shell .pin-bubble { padding: 3px 6px 3px 3px; }
  .map-product-shell .pin-avatar { display: block; width: 28px; height: 28px; flex-basis: 28px; }
  .map-product-shell .map-pin-item:nth-child(n+7) { display: block; }
  .pin-owner-copy strong { max-width: 100px; font-size: 9px; }
  .rank-item { grid-template-columns: 34px minmax(0,1fr) 74px; padding: 11px 9px; }
  .small-vote-btn { padding: 0 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
