:root {
  --bg-midnight: #061A14;
  --bg-deep-turf: #09261D;
  --emerald-core: #10B981;
  --emerald-bright: #34D399;
  --cleat-lime: #A3E635;
  --trophy-gold: #FBBF24;
  --strike-crimson: #F43F5E;
  --ink-white: #ECFDF5;
  --ink-muted: #99D5C3;
  --glass-surface: rgba(8, 31, 24, 0.84);
  --glass-heavy: rgba(5, 22, 17, 0.94);
  --glass-border: rgba(52, 211, 153, 0.26);
  --gold-border: rgba(251, 191, 36, 0.48);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-midnight);
  color: var(--ink-white);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  touch-action: none;
}

.tabular-val {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#app-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #0D382B 0%, #061A14 75%);
}

#stadium-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* =========================================================
   STADIUM BROADCAST SCOREBOARD & CHARGE HUD (SCORE-SAFE!)
   ========================================================= */
.hud-layer {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  left: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  max-width: 680px;
  margin: 0 auto;
}

.scoreboard-broadcast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  background: var(--glass-heavy);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 6px 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.team-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.team-topi {
  justify-content: flex-start;
}

.team-rival {
  justify-content: flex-end;
}

.team-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 3px 5px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.team-topi .team-tag {
  background: rgba(163, 230, 53, 0.18);
  color: var(--cleat-lime);
  border: 1px solid rgba(163, 230, 53, 0.4);
}

.team-rival .team-tag {
  background: rgba(244, 63, 94, 0.18);
  color: #FDA4AF;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

.score-num {
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink-white);
  text-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
}

.clock-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  min-width: 0;
}

.set-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--trophy-gold);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.timer-wind-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rally-tag,
.wind-tag {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* Sub-HUD row */
.hud-subrow {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}

.charge-container {
  pointer-events: auto;
  flex: 1 1 0%;
  min-width: 108px;
  background: var(--glass-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 13px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.charge-container.overdrive-ready {
  border-color: var(--trophy-gold);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.45);
  animation: pulseGold 1s infinite alternate;
}

@keyframes pulseGold {
  from {
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
  }
  to {
    box-shadow: 0 0 22px rgba(163, 230, 53, 0.75);
  }
}

.charge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.charge-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--cleat-lime);
  white-space: nowrap;
  overflow: hidden;
}

.charge-pct {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--trophy-gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.charge-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
  overflow: hidden;
}

.charge-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10B981 0%, #A3E635 55%, #FBBF24 100%);
  transition: width 0.15s ease-out;
}

.hud-utility-cluster {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.coin-pill {
  height: 36px;
  min-width: 58px;
  max-width: 96px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--glass-surface);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: var(--trophy-gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

.coin-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FEF08A, #F59E0B);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
  flex-shrink: 0;
}

.icon-glass-btn {
  height: 36px;
  padding: 0 9px;
  border-radius: 11px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--ink-white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.15s ease;
}

.icon-glass-btn:active {
  transform: scale(0.94);
}

/* =========================================================
   ARCADE TOUCH CONTROLS (LIVE MATCH)
   ========================================================= */
.touch-controls-layer {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(var(--safe-bottom) + 12px);
  z-index: 9;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  max-width: 680px;
  margin: 0 auto;
}

.dpad-cluster,
.action-cluster {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.arcade-pad-btn {
  width: 64px;
  height: 60px;
  padding: 0 6px;
  border-radius: 16px;
  background: rgba(6, 26, 20, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(52, 211, 153, 0.42);
  color: var(--ink-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transition: transform 0.08s ease, background 0.12s ease;
}

.arcade-pad-btn:active,
.arcade-pad-btn.pressed {
  transform: scale(0.92);
  background: rgba(16, 185, 129, 0.35);
  border-color: var(--cleat-lime);
}

.pad-arrow {
  font-size: 16px;
  line-height: 1;
  color: var(--cleat-lime);
}

.pad-caption {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.arcade-action-btn {
  min-width: 72px;
  height: 62px;
  padding: 0 10px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease, filter 0.12s ease;
}

.arcade-action-btn:active,
.arcade-action-btn.pressed {
  transform: scale(0.91);
}

.btn-loft {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.92), rgba(5, 150, 105, 0.92));
  border: 1.5px solid #6EE7B7;
  color: #03150F;
}

.btn-spike {
  background: linear-gradient(160deg, #A3E635 0%, #FBBF24 100%);
  border: 1.5px solid #FEF08A;
  color: #061A14;
}

.btn-spike.overdrive-glow {
  background: linear-gradient(160deg, #FBBF24 0%, #F43F5E 100%);
  color: #FFFFFF;
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.85);
}

.action-main {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.action-sub {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.9;
  white-space: nowrap;
}

/* =========================================================
   APPLE GAMES HERO OVERLAY & FLOATING PILL DOCK
   ========================================================= */
.hub-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: radial-gradient(circle at 50% 20%, rgba(9, 38, 29, 0.72) 0%, rgba(4, 16, 12, 0.94) 85%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--safe-top) + 92px) 10px calc(var(--safe-bottom) + 12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.hub-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.tab-view {
  display: none;
  width: 100%;
  max-width: 500px;
  margin: auto;
  max-height: calc(100dvh - 160px);
  overflow-y: auto;
  scrollbar-width: none;
}

.tab-view::-webkit-scrollbar {
  display: none;
}

.tab-view.active {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Hero Spotlight Card */
.hero-spotlight-card {
  background: linear-gradient(180deg, rgba(14, 53, 40, 0.94) 0%, rgba(6, 26, 20, 0.98) 100%);
  border: 1px solid rgba(163, 230, 53, 0.35);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.hero-art-header {
  position: relative;
  height: 112px;
  background: radial-gradient(circle at 50% 60%, rgba(16, 185, 129, 0.42), rgba(4, 18, 14, 0.88));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(52, 211, 153, 0.22);
}

.hero-striker-img {
  height: 104px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.65));
  transform: translateX(-18px);
  animation: heroFloat 2.8s ease-in-out infinite alternate;
}

.hero-ball-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.85));
  transform: translate(0px, -12px);
  animation: ballSpinPulse 2.2s ease-in-out infinite alternate;
}

.hero-glove-img {
  height: 76px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.7));
  transform: translateX(16px);
}

@keyframes heroFloat {
  from {
    transform: translate(-18px, 2px) rotate(-2deg);
  }
  to {
    transform: translate(-18px, -5px) rotate(3deg);
  }
}

@keyframes ballSpinPulse {
  from {
    transform: translate(0px, -8px) scale(0.95);
  }
  to {
    transform: translate(4px, -16px) scale(1.06);
  }
}

.hero-live-chip {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(6, 26, 20, 0.86);
  border: 1px solid rgba(163, 230, 53, 0.45);
  color: var(--cleat-lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--emerald-bright);
  white-space: nowrap;
}

.hero-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink-white);
  line-height: 1.08;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-muted);
}

.equipped-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(4, 17, 13, 0.76);
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 12px;
  padding: 7px 10px;
  flex-wrap: wrap;
}

.equipped-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.equipped-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
}

.equipped-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--trophy-gold);
  white-space: nowrap;
}

.equipped-stats-mini {
  display: flex;
  gap: 4px;
}

.mini-stat {
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(16, 185, 129, 0.16);
  color: var(--cleat-lime);
  white-space: nowrap;
}

.mode-selector-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.mode-pill {
  height: 36px;
  padding: 0 6px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s ease;
}

.mode-pill.active {
  background: rgba(16, 185, 129, 0.28);
  border-color: var(--cleat-lime);
  color: var(--ink-white);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.hero-cta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.primary-kickoff-btn,
.shootout-cta-btn,
.secondary-drill-btn {
  height: 44px;
  padding: 0 6px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.primary-kickoff-btn {
  background: linear-gradient(135deg, #A3E635 0%, #10B981 100%);
  border: none;
  color: #04150F;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.shootout-cta-btn {
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  border: none;
  color: #04150F;
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.35);
}

.secondary-drill-btn {
  background: rgba(16, 185, 129, 0.14);
  border: 1.5px solid rgba(163, 230, 53, 0.45);
  color: var(--cleat-lime);
}

.primary-kickoff-btn:active,
.shootout-cta-btn:active,
.secondary-drill-btn:active {
  transform: scale(0.96);
}

/* Career Strip */
.career-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.career-metric {
  background: rgba(8, 31, 24, 0.86);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.metric-val {
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--trophy-gold);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.metric-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* =========================================================
   CLEAT LOCKER & TROPHY CHEST UNBOX DRAWER
   ========================================================= */
.drawer-panel {
  background: linear-gradient(180deg, rgba(11, 43, 33, 0.95) 0%, rgba(5, 22, 17, 0.98) 100%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drawer-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--emerald-bright);
  white-space: nowrap;
}

.drawer-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink-white);
  white-space: nowrap;
}

.locker-coin-badge,
.trophy-count-pill {
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(4, 17, 13, 0.85);
  border: 1px solid var(--gold-border);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--trophy-gold);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Trophy Chest Unbox Banner (s6.png) */
.chest-unbox-banner {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.18) 0%, rgba(16, 185, 129, 0.16) 100%);
  border: 1px solid var(--gold-border);
  border-radius: 16px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chest-banner-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.6));
  transition: transform 0.25s ease;
}

.chest-banner-img.chest-pop {
  transform: scale(1.24) rotate(-8deg);
}

.chest-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.chest-eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--trophy-gold);
  white-space: nowrap;
}

.chest-headline {
  font-size: 13px;
  font-weight: 900;
  color: var(--ink-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chest-sub {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chest-open-btn {
  height: 36px;
  padding: 0 10px;
  border-radius: 11px;
  background: linear-gradient(135deg, #FBBF24 0%, #A3E635 100%);
  border: none;
  color: #04150F;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.chest-open-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cleat-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.cleat-card {
  background: rgba(4, 18, 14, 0.8);
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cleat-card.equipped {
  border-color: var(--cleat-lime);
  box-shadow: 0 0 18px rgba(163, 230, 53, 0.22);
}

.cleat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.cleat-badge-orb {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  color: #04150F;
  flex-shrink: 0;
}

.cleat-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-white);
  white-space: nowrap;
}

.cleat-perk {
  font-size: 12px;
  color: var(--ink-muted);
}

.cleat-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.stat-bar-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-bar-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-bar-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10B981, #A3E635);
}

.cleat-action-btn {
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(163, 230, 53, 0.45);
  background: rgba(16, 185, 129, 0.22);
  color: var(--cleat-lime);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.cleat-action-btn.active-equip {
  background: var(--cleat-lime);
  color: #04150F;
  border-color: var(--cleat-lime);
}

.cleat-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* WHOOP Filter Pills & Geometric Shield Badges */
.filter-pills-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.filter-pill {
  height: 34px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(52, 211, 153, 0.22);
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.14s ease;
}

.filter-pill.active {
  background: var(--emerald-core);
  border-color: var(--cleat-lime);
  color: #04150F;
}

.shield-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shield-badge-card {
  background: rgba(4, 17, 13, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 16px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

.shield-badge-card.unlocked {
  border-color: var(--trophy-gold);
  background: radial-gradient(circle at 50% 25%, rgba(251, 191, 36, 0.16), rgba(4, 17, 13, 0.92));
}

.hex-shield-crest {
  width: 52px;
  height: 58px;
  clip-path: polygon(50% 0%, 95% 22%, 95% 72%, 50% 100%, 5% 72%, 5% 22%);
  background: linear-gradient(160deg, #134E3A 0%, #062018 100%);
  border: 2px solid var(--emerald-core);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  box-shadow: inset 0 0 12px rgba(16, 185, 129, 0.35);
}

.shield-badge-card.unlocked .hex-shield-crest {
  background: linear-gradient(160deg, #FBBF24 0%, #10B981 100%);
  color: #04150F;
}

.shield-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-white);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.shield-progress {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* =========================================================
   APPLE GAMES FLOATING TRANSLUCENT PILL DOCK
   ========================================================= */
.floating-pill-dock {
  width: 100%;
  max-width: 400px;
  margin: 8px auto 0;
  padding: 5px;
  border-radius: 999px;
  background: rgba(5, 22, 17, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(52, 211, 153, 0.32);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.dock-pill {
  height: 40px;
  padding: 0 6px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.18s ease;
}

.dock-pill.active {
  background: linear-gradient(135deg, #10B981 0%, #A3E635 100%);
  color: #04150F;
  box-shadow: 0 4px 14px rgba(163, 230, 53, 0.4);
}

/* =========================================================
   POST-MATCH RESULT MODAL
   ========================================================= */
.result-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(3, 14, 10, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.result-modal.hidden {
  display: none;
}

.result-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, #0D382B 0%, #051812 100%);
  border: 1.5px solid var(--gold-border);
  border-radius: 24px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
}

.result-emblem {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.65));
}

.result-eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--cleat-lime);
}

.result-headline {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink-white);
}

.result-scoreline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 32px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.res-score.topi {
  color: var(--cleat-lime);
}

.res-score.rival {
  color: #FDA4AF;
}

.res-divider {
  color: var(--ink-muted);
}

.result-rewards-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.reward-chip {
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid var(--glass-border);
  border-radius: 13px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reward-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  white-space: nowrap;
}

.reward-val {
  font-size: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--trophy-gold);
}

.result-actions-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}
