/* ══════════════════════════════════════════════════════════════
   ClashOS — CWL Bonus Medal Distribution
   Visual Grammar: Exact In-Game Shop & Store Chrome
   ══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'ClashBold';
  src: url('/Clash_Bold.woff2') format('woff2'),
       url('/Clash_Bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Theme Palettes (Parchment & Wood Store Chrome) */
  --parchment-top: #FAF5E8;
  --parchment-base: #F3EBD4;
  --parchment-border: #D8C9A8;
  --parchment-inset: #E5D9BF;

  --wood-top: #6B4221;
  --wood-base: #4A2B11;
  --wood-dark: #2E1807;
  --wood-border: #1C0D03;

  --gold-primary: #FFB81C;
  --gold-deep: #D48B08;
  --gold-light: #FFE066;

  --btn-green-top: #62D836;
  --btn-green-mid: #42B81C;
  --btn-green-bottom: #2D9210;
  --btn-green-bevel: #175406;
  --btn-green-border: #134205;

  --ink-primary: #2C1A0C;
  --ink-secondary: #5E4128;
  --ink-muted: #88684A;

  --font-display: 'ClashBold', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

:focus-visible {
  outline: 2px solid #FFCE47 !important;
  outline-offset: 2px !important;
}

body {
  background-color: #080C0F !important;
  background-image: 
    radial-gradient(ellipse at 50% 35%, rgba(12, 18, 23, 0.82) 0%, rgba(6, 9, 12, 0.96) 100%),
    url('/assets/coc_shop_ambient_bg.webp') !important;
  background-size: cover !important;
  background-position: center top !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  color: var(--ink-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
  padding-bottom: 0 !important;
  margin: 0;
}

.cbt-main,
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px 40px;
  flex: 1 0 auto;
  width: 100%;
  min-height: calc(100vh - 160px);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-x: clip;
  min-width: 0;
}

@media (max-width: 480px) {
  .cbt-main,
  .container {
    padding: 0 12px 32px;
  }
}

/* ══════════════════════════════════════════════════════════════
   GOOGLE ADSENSE & AUTO-ADS RESPONSIVE HARD CONTAINMENT
   Prevents unconstrained ad units, related search widgets,
   or side rails from blowing out mobile viewport width.
   ══════════════════════════════════════════════════════════════ */
ins.adsbygoogle,
.google-auto-placed,
.adsbygoogle-noablate,
div[id^="google_ads_iframe"],
iframe[id^="google_ads_iframe"],
iframe[id^="aswift_"] {
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.google-auto-placed {
  width: 100% !important;
  max-width: 100% !important;
  margin: 16px auto !important;
  overflow-x: hidden !important;
  clear: both !important;
}

@media (max-width: 1024px) {
  .adsbygoogle-noablate,
  .google-auto-placed[style*="position: fixed"],
  .google-auto-placed[style*="position: absolute"] {
    max-width: 100vw !important;
    overflow: hidden !important;
  }
}

.podium-grid-3 > *,
.cbt-podium-deck > *,
.cbt-stat-grid > *,
.cbt-offseason-grid > * {
  min-width: 0;
}

/* ══════════════════════════════════════════════════════════════
   1. IN-GAME STORE HEADER
   ══════════════════════════════════════════════════════════════ */
.store-header {
  padding: 24px 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.store-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.store-logo-badge {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, #664121 0%, #381E0A 100%);
  border: 2px solid #FFCE47;
  border-bottom: 3px solid #8B5810;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.store-brand-text {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  color: #FFFDF5;
  text-shadow: 
    -2px -2px 0 #241305, 2px -2px 0 #241305, 
    -2px 2px 0 #241305, 2px 2px 0 #241305,
    0 4px 0 #150901, 0 6px 12px rgba(0,0,0,0.8);
}

.store-nav-plank {
  background: linear-gradient(180deg, #593517 0%, #361C08 100%);
  border: 2px solid #231103;
  border-bottom: 4px solid #140801;
  border-radius: 24px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

.store-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #E2D3B8;
  text-decoration: none;
  transition: all 0.15s ease;
}

.store-nav-btn:hover {
  color: #FFFDF5;
  background: rgba(255, 255, 255, 0.08);
}

.store-nav-btn.active {
  background: linear-gradient(180deg, var(--parchment-top) 0%, var(--parchment-base) 100%);
  color: var(--ink-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  border: 1px solid #FFD966;
}

/* ══════════════════════════════════════════════════════════════
   CLASH IN-GAME RIBBON BANNER
   ══════════════════════════════════════════════════════════════ */
.ribbon-banner-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  margin-bottom: 20px;
  z-index: 4;
}

.ribbon-banner {
  position: relative;
  background: linear-gradient(180deg, #E63946 0%, #C0202F 50%, #90111E 100%);
  border-top: 2px solid #FF9DA6;
  border-bottom: 3px solid #5A0810;
  padding: 8px 36px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

.ribbon-banner::before,
.ribbon-banner::after {
  content: '';
  position: absolute;
  top: 5px;
  width: 0;
  height: 0;
  border-style: solid;
}

.ribbon-banner::before {
  left: -20px;
  border-width: 17px 20px 17px 0;
  border-color: #90111E #90111E #90111E transparent;
  filter: drop-shadow(-2px 3px 2px rgba(0,0,0,0.5));
}

.ribbon-banner::after {
  right: -20px;
  border-width: 17px 0 17px 20px;
  border-color: #90111E transparent #90111E #90111E;
  filter: drop-shadow(2px 3px 2px rgba(0,0,0,0.5));
}

.ribbon-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFDF5;
  margin: 0;
  line-height: 1.2;
  text-shadow: 
    -1px -1px 0 #4A080E, 1px -1px 0 #4A080E,
    -1px 1px 0 #4A080E, 1px 1px 0 #4A080E,
    0 2px 0 #300408;
}

/* ══════════════════════════════════════════════════════════════
   WOOD-FRAMED PARCHMENT STORE PANEL CHROME
   ══════════════════════════════════════════════════════════════ */
.game-panel,
.cbt-card {
  background: linear-gradient(180deg, var(--parchment-top) 0%, var(--parchment-base) 100%);
  border: 3px solid #3E240D;
  border-radius: 18px;
  box-shadow: 
    0 8px 0 #211205,
    0 14px 28px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  position: relative;
  margin-bottom: 24px;
  overflow: hidden;
  color: var(--ink-primary);
}

/* Wood Top Trim / Header Bar */
.panel-wood-header,
.cbt-card-header {
  background: linear-gradient(180deg, #69401F 0%, #46270E 100%);
  border-bottom: 2px solid #291404;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.panel-wood-title,
.cbt-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #FFE699;
  text-shadow: 
    -1px -1px 0 #241103, 1px -1px 0 #241103,
    -1px 1px 0 #241103, 1px 1px 0 #241103,
    0 2px 0 #140801;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.panel-wood-title svg,
.cbt-card-title svg {
  color: #FFE699;
}

/* Corner Rivets */
.panel-rivet {
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 35% 35%, #FFDF79 0%, #A6751C 70%, #4D3305 100%);
  border-radius: 50%;
  border: 1px solid #291804;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 1px 2px rgba(0,0,0,0.6);
}

.panel-body,
.cbt-card-body {
  padding: 24px;
}

/* ══════════════════════════════════════════════════════════════
   2. HERO SEARCH & INTEL BOARD
   ══════════════════════════════════════════════════════════════ */
.hero-board,
.cbt-hero {
  margin-bottom: 48px;
  text-align: center;
}

.hero-headline,
.cbt-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #FFFDF5;
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 
    -2px -2px 0 #2B1505, 2px -2px 0 #2B1505,
    -2px 2px 0 #2B1505, 2px 2px 0 #2B1505,
    0 4px 0 #180B02, 0 8px 18px rgba(0,0,0,0.8);
}

.hero-subhead,
.cbt-hero-desc {
  font-size: 1.05rem;
  font-weight: 600;
  color: #E2D3B8;
  max-width: 640px;
  margin: 0 auto 26px;
  line-height: 1.6;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}

.hero-eval-box {
  background: linear-gradient(180deg, var(--parchment-top) 0%, var(--parchment-base) 100%);
  border: 3px solid #3E240D;
  border-radius: 16px;
  padding: 24px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 
    0 8px 0 #211205,
    0 14px 28px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.eval-input-row,
.cbt-search-bar {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.eval-input-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--parchment-inset);
  border: 2px solid #C0B092;
  border-radius: 12px;
  padding: 0 16px;
  min-height: 52px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.eval-input-field:focus-within {
  border-color: #D49B1E;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(212, 155, 30, 0.35);
}

.eval-prefix {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink-secondary);
}

.eval-input,
#clan-tag-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-primary);
  text-transform: uppercase;
}

.eval-input::placeholder,
#clan-tag-input::placeholder {
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--ink-muted);
  text-transform: none;
}

/* In-Game 3D Beveled Green CTA Button */
.btn-coc-green,
.cbt-btn-primary {
  background: linear-gradient(180deg, var(--btn-green-top) 0%, var(--btn-green-mid) 50%, var(--btn-green-bottom) 100%);
  border: 2px solid var(--btn-green-border);
  border-bottom: 5px solid var(--btn-green-bevel);
  border-radius: 12px;
  padding: 12px 26px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #FFFDF5;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-shadow: 
    -1px -1px 0 #134205, 1px -1px 0 #134205,
    -1px 1px 0 #134205, 1px 1px 0 #134205,
    0 2px 0 #0C2903;
  box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  transition: all 0.1s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-coc-green:hover,
.cbt-btn-primary:hover {
  filter: brightness(1.06);
}

.btn-coc-green:active,
.cbt-btn-primary:active {
  transform: translateY(3px);
  border-bottom-width: 2px;
  margin-top: 3px;
}

.cbt-btn-outline-gold {
  background: linear-gradient(180deg, #FFE899 0%, #F5C542 50%, #D49B1E 100%);
  border: 2px solid #8C5C04;
  border-bottom: 4px solid #5C3C02;
  border-radius: 12px;
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: #382004;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  text-decoration: none;
  transition: filter 0.1s ease;
}

.cbt-btn-outline-gold:hover {
  filter: brightness(1.05);
}

/* Copy Button Success State (Green Feedback) */
.cbt-copied-success {
  background: linear-gradient(180deg, #34D399 0%, #059669 100%) !important;
  border-color: #065F46 !important;
  border-bottom-color: #044331 !important;
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.cbt-plain-text-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-secondary);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.cbt-plain-text-link:hover {
  color: var(--ink-primary);
}

.eval-quick-tags,
.cbt-quick-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-secondary);
  flex-wrap: wrap;
}

.coc-tag-btn,
.cbt-chip-btn {
  background: #EAE0C7;
  border: 1.5px solid #C4B495;
  border-bottom: 3px solid #A89572;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
  cursor: pointer;
  transition: all 0.1s ease;
  user-select: none;
}

.coc-tag-btn:hover,
.cbt-chip-btn:hover {
  background: #FFFDF5;
  border-color: #A38C65;
  border-bottom-color: #8C754E;
  transform: translateY(-1px);
}

.coc-tag-btn:active,
.cbt-chip-btn:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
}

.cbt-season-deck {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1.5px solid #D8C9A8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.cbt-season-select {
  background: var(--parchment-inset);
  border: 2px solid #C0B092;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-primary);
  outline: none;
}

/* ── Toast Notification ── */
.cbt-status {
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.cbt-status.error { background: #FEE2E2; border: 2px solid #F87171; color: #93131D; }
.cbt-status.success { background: #DCFCE7; border: 2px solid #4ADE80; color: #166534; }
.cbt-status.loading { background: #FEF3C7; border: 2px solid #FCD34D; color: #92400E; }

/* ── Loading Card State ── */
.cbt-loading-card {
  text-align: center;
  padding: 44px 24px !important;
  max-width: 640px;
  margin: 24px auto !important;
}

.cbt-loading-radar {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbt-loading-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(192, 176, 146, 0.3);
  border-top-color: #D97706;
  border-right-color: #F59E0B;
  animation: cbtSpin 1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.cbt-loading-shield-icon {
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cbtPulse 1.5s ease-in-out infinite alternate;
}

@keyframes cbtSpin {
  to { transform: rotate(360deg); }
}

@keyframes cbtPulse {
  from { transform: scale(0.92); opacity: 0.75; }
  to { transform: scale(1.08); opacity: 1; }
}

.cbt-loading-pulse-track {
  width: 100%;
  max-width: 280px;
  height: 6px;
  background: var(--parchment-inset);
  border: 1px solid #C0B092;
  border-radius: 999px;
  margin: 20px auto 0;
  overflow: hidden;
  position: relative;
}

.cbt-loading-pulse-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, #D97706, #FBBF24, #D97706);
  border-radius: 999px;
  animation: cbtPulseBar 1.6s ease-in-out infinite;
}

@keyframes cbtPulseBar {
  0% { left: -40%; width: 40%; }
  50% { width: 60%; }
  100% { left: 100%; width: 40%; }
}

/* ── Off-Season Panel ── */
.cbt-offseason-panel {
  max-width: 820px;
  margin: 20px auto 32px !important;
  padding: 0 !important;
}

.cbt-offseason-hero {
  text-align: center;
  border-bottom: 1.5px solid #D6C8B0;
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.cbt-offseason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .cbt-offseason-grid {
    grid-template-columns: 1fr;
  }
}

.cbt-offseason-choice {
  background: var(--parchment-inset);
  border: 1.5px solid #C0B092;
  border-bottom: 3px solid #9E8961;
  border-radius: 14px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.cbt-offseason-choice h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink-primary);
  margin: 0 0 8px;
}

.cbt-offseason-choice p {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}

.cbt-choice-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(180deg, #6B4221 0%, #44250C 100%);
  border: 1.5px solid #FFCE47;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  color: #FFE699;
}

.cbt-offseason-search-box {
  background: rgba(0, 0, 0, 0.04);
  border: 1.5px dashed #C0B092;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 8px;
}

.cbt-results-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 480px) {
  .cbt-results-search-form {
    flex-direction: column;
  }
  .cbt-results-search-form button {
    width: 100%;
  }
}

/* ══════════════════════════════════════════════════════════════
   3. THREE SIGNALS SECTION (In-Game 3-Card Grid)
   ══════════════════════════════════════════════════════════════ */
.signals-grid,
.cbt-signals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 56px;
}

.signal-card,
.cbt-signal-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}

.signal-card .panel-body,
.cbt-signal-card .panel-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.signal-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(180deg, #6B4221 0%, #44250C 100%);
  border: 2px solid #FFCE47;
  border-bottom: 3px solid #291404;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.signal-icon-circle svg {
  color: #FFE699;
}

.signal-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-primary);
  margin-bottom: 8px;
}

.signal-desc {
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
  flex: 1;
}

/* Reward / Penalty Currency Chip Badge */
.coc-badge-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #FFFFFF 0%, #EDE1C4 100%);
  border: 2px solid #CDBA93;
  border-bottom: 3px solid #9E8961;
  border-radius: 8px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.badge-gold {
  color: #9C6000;
  border-color: #E5B242;
  border-bottom-color: #B38115;
  background: linear-gradient(180deg, #FFF9E6 0%, #FFEAB0 100%);
}

.badge-green {
  color: #176008;
  border-color: #8FD87B;
  border-bottom-color: #4C9E37;
  background: linear-gradient(180deg, #F0FDF4 0%, #DCFCE7 100%);
}

.badge-red {
  color: #93131D;
  border-color: #F87171;
  border-bottom-color: #DC2626;
  background: linear-gradient(180deg, #FEF2F2 0%, #FEE2E2 100%);
}

/* ══════════════════════════════════════════════════════════════
   4. RECIPIENT ROSTER GRID (Rank 1 Unlock Shine & Physical Podium)
   ══════════════════════════════════════════════════════════════ */
.roster-section {
  margin-bottom: 40px;
  position: relative;
  overflow-x: hidden;
}

.podium-grid-3,
.cbt-podium-deck {
  display: grid;
  grid-template-columns: 1fr 1.22fr 1fr;
  align-items: flex-end;
  gap: 22px;
  max-width: 980px;
  margin: 32px auto 24px;
}

/* #1 Recipient Special Chest/Legendary Unlock Starburst */
.rank-1-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.legendary-shine-burst {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  height: 440px;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(circle, rgba(255, 184, 28, 0.45) 0%, rgba(255, 217, 102, 0.2) 40%, rgba(255, 184, 28, 0) 70%);
  animation: pulseReward 3.5s ease-in-out infinite alternate;
}

@keyframes pulseReward {
  0% { transform: translate(-50%, -50%) scale(0.95); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.rank-card,
.cbt-podium-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 0 !important;
}

/* Rank 1 Physical Hierarchy & Soft Gold Ring Glow */
.rank-card.rank-1,
.cbt-podium-card.rank-1 {
  transform: translateY(-24px);
  margin-bottom: 24px;
  border-color: #7A4E18;
  border-width: 3.5px;
  box-shadow: 
    0 12px 0 #281405,
    0 22px 42px rgba(0, 0, 0, 0.9);
}

.rank-card.rank-1 .panel-body {
  padding: 28px 18px 24px;
}

.rank-header-banner {
  padding: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  color: #FFFDF5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
}

.banner-gold {
  background: linear-gradient(180deg, #F5A623 0%, #D48008 100%);
  color: #FFFDF5;
  text-shadow: 0 2px 0 #7A4600;
}

.banner-silver {
  background: linear-gradient(180deg, #7A8B9E 0%, #516274 100%);
  color: #FFFDF5;
  text-shadow: 0 2px 0 #2E3B49;
}

.banner-bronze {
  background: linear-gradient(180deg, #B87333 0%, #874E1A 100%);
  color: #FFFDF5;
  text-shadow: 0 2px 0 #4E2807;
}

.rank-avatar-box,
.cbt-recipient-avatar-box {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: linear-gradient(180deg, #593719 0%, #351C09 100%);
  border: 3px solid #FFCE47;
  border-bottom: 4px solid #8F5B12;
  margin: 0 auto 12px;
  padding: 4px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  position: relative;
}

/* Rank 1 Singular Themed Gold Glow Ring */
.rank-1 .rank-avatar-box,
.rank-1 .cbt-recipient-avatar-box {
  width: 96px;
  height: 96px;
  border: 3.5px solid #FFE066;
  border-bottom: 5px solid #B38115;
  box-shadow: 
    0 0 22px rgba(255, 184, 28, 0.75),
    0 0 10px rgba(255, 217, 102, 0.5),
    0 6px 14px rgba(0, 0, 0, 0.4);
}

.rank-avatar-img,
.cbt-recipient-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.rank-crown,
.cbt-rank-crown,
.rank-crown-svg {
  position: absolute;
  top: -14px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE066 0%, #FFB81C 100%);
  border: 2px solid #5A3508;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
  z-index: 5;
}

.rank-player-name,
.cbt-recipient-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.rank-1 .rank-player-name,
.rank-1 .cbt-recipient-name {
  font-size: 1.45rem;
  color: #874E05;
}

.rank-player-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.rank-stats-panel,
.cbt-recipient-statline {
  background: var(--parchment-inset);
  border: 1.5px solid #C4B596;
  border-radius: 10px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-secondary);
  line-height: 1.45;
  margin-bottom: 12px;
}

/* Key-Signal Standout Tag */
.cbt-key-signal-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: #7A4600;
  background: rgba(245, 166, 35, 0.16);
  border: 1px solid rgba(184, 153, 101, 0.45);
  border-radius: 6px;
  padding: 3px 9px;
  margin: 0 auto 8px;
  max-width: 92%;
  line-height: 1.25;
  text-align: center;
}

.rank-1 .cbt-key-signal-tag {
  background: rgba(255, 206, 71, 0.28);
  border-color: #D49B1E;
  color: #683900;
}

.rank-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.cbt-score-gap {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-secondary);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 1px 6px;
  line-height: 1.2;
}

.rank-score-chip {
  background: linear-gradient(180deg, #FFE899 0%, #F5C542 50%, #D49B1E 100%);
  border: 2px solid #8C5C04;
  border-bottom: 4px solid #5C3C02;
  border-radius: 12px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.rank-score-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.rank-score-val,
.cbt-podium-score-num {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #382004;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

/* Slot-Count Bridge */
.cbt-slot-bridge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
}

.cbt-slot-bridge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 206, 71, 0.3);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: #E2D7C5;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.15s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.cbt-slot-bridge-btn:hover {
  color: #FFD25A;
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 206, 71, 0.6);
}

.cbt-slot-bridge-btn svg {
  transition: transform 0.2s ease;
}

.cbt-slot-bridge-btn:hover svg {
  transform: translateY(2px);
}

/* ── Season Completion Status Banner ── */
.cbt-season-status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cbt-season-status-banner.in-progress {
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  color: #92400E;
}

.cbt-season-status-banner.complete-live {
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
  color: #166534;
}

.cbt-season-status-banner.complete-archived {
  background: var(--parchment-inset);
  border: 1.5px solid #C0B092;
  color: var(--ink-primary);
}

.cbt-status-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cbt-status-icon-wrap svg {
  display: block;
}

.cbt-status-icon-wrap.in-progress-icon {
  background: rgba(217, 119, 6, 0.15);
  color: #D97706;
}

.cbt-status-icon-wrap.complete-icon {
  background: rgba(34, 197, 94, 0.15);
  color: #16A34A;
}

.cbt-status-icon-wrap.archived-icon {
  background: rgba(139, 88, 16, 0.15);
  color: #8B5810;
}

@media (max-width: 640px) {
  .cbt-season-status-banner {
    font-size: 0.82rem;
    padding: 8px 12px;
    gap: 10px;
    margin-bottom: 14px;
  }
  .cbt-status-icon-wrap {
    width: 22px;
    height: 22px;
  }
  .cbt-status-icon-wrap svg {
    width: 15px;
    height: 15px;
  }
}

.cbt-clan-strip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #D8C9A8;
  flex-wrap: wrap;
}

.cbt-clan-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cbt-league-crest-box {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(180deg, #593719 0%, #351C09 100%);
  border: 2px solid #FFCE47;
  border-bottom: 3px solid #8F5B12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

.cbt-league-crest-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cbt-clan-titles h1,
.cbt-clan-titles h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--ink-primary);
  margin: 0 0 2px;
}

.cbt-clan-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-secondary);
  flex-wrap: wrap;
  margin-top: 3px;
}

.cbt-clan-dot {
  color: #B4A484;
  font-size: 1rem;
  line-height: 1;
}

.cbt-clan-tag-badge {
  background: #EAE0C7;
  border: 1px solid #C4B495;
  padding: 2px 6px;
  border-radius: 4px;
}

.cbt-promo-demote-badge {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-secondary);
  background: #EFE7D4;
  border: 1px solid #C8BA9C;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.cbt-promo-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cbt-promo-divider {
  color: #B4A484;
  font-weight: 700;
}

.cbt-stat-grid {
  display: grid;
  grid-template-columns: 1.35fr 1.35fr 1fr;
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .cbt-stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cbt-stat-cell.cbt-stat-hero {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .cbt-stat-grid {
    grid-template-columns: 1fr;
  }
}

.cbt-stat-cell {
  background: var(--parchment-inset);
  border: 1.5px solid #C0B092;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 104px;
}

/* Total Bonus Pool Hero Cell */
.cbt-stat-cell.cbt-stat-hero {
  background: linear-gradient(180deg, #F3E7CF 0%, #E7D7B9 100%);
  border: 2px solid #B89965;
  border-bottom: 3.5px solid #8A6834;
}

.cbt-stat-cell-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.cbt-stat-metric-body {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cbt-stat-hero-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  color: #7A4600;
}

.cbt-stat-stars-val {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  color: #7A4600;
}

.cbt-stat-cell-sub {
  font-size: 0.76rem;
  color: var(--ink-secondary);
  font-weight: 600;
  line-height: 1.3;
}

/* 7-Round War Progress Pips */
.cbt-round-pips-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  position: relative;
}

.cbt-round-pip {
  flex: 1;
  height: 14px;
  border-radius: 3px;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
  padding: 0;
  margin: 0;
  background: none;
  touch-action: manipulation;
  outline: none;
}

/* Touch Hitbox Expansion */
.cbt-round-pip::before {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -3px;
  right: -3px;
}

.cbt-round-pip.pip-unplayed {
  background: rgba(0, 0, 0, 0.08);
  border-color: #C4B495;
}

.cbt-round-pip.pip-prep {
  background: rgba(217, 119, 6, 0.2);
  border-color: #D97706;
}

.cbt-round-pip.pip-live {
  background: #F59E0B;
  border-color: #B45309;
  animation: cbtPipPulse 1.8s ease-in-out infinite;
}

.cbt-round-pip.pip-win {
  background: #22C55E;
  border-color: #16A34A;
}

.cbt-round-pip.pip-loss {
  background: #EF4444;
  border-color: #DC2626;
}

.cbt-round-pip.pip-tie {
  background: #94A3B8;
  border-color: #64748B;
}

.cbt-round-pip:hover,
.cbt-round-pip:focus-visible,
.cbt-round-pip.is-active-pip {
  transform: scale(1.15);
  outline: 2px solid #FFCE47;
  outline-offset: 1px;
  box-shadow: 0 0 8px rgba(255, 206, 71, 0.7);
  z-index: 5;
}

/* Pip Floating Tooltip Popover (Mobile & Desktop) */
.cbt-pip-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #141C24;
  color: #FFF3D1;
  border: 1.5px solid #D49B1E;
  border-radius: 6px;
  padding: 5px 12px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7), 0 0 8px rgba(212, 155, 30, 0.35);
  pointer-events: none;
  z-index: 100;
  animation: cbtPopoverPop 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 90vw;
  text-overflow: ellipsis;
  overflow: hidden;
}

.cbt-pip-popover-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #D49B1E;
}

@keyframes cbtPopoverPop {
  0% { opacity: 0; transform: translate(-50%, 4px) scale(0.95); }
  100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.cbt-pip-active-text {
  color: #874E05 !important;
  font-weight: 700 !important;
  background: rgba(255, 232, 153, 0.55);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(212, 155, 30, 0.45);
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes cbtPipPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 6px 1.5px rgba(245, 158, 11, 0.5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cbt-round-pip.pip-live {
    animation: none;
  }
  .cbt-pip-popover {
    animation: none;
  }
}

/* Collapsible Scoring Policy Panel */
.cbt-scoring-collapse {
  background: linear-gradient(180deg, var(--parchment-top) 0%, var(--parchment-base) 100%);
  border: 3px solid #3E240D;
  border-radius: 16px;
  box-shadow: 0 6px 0 #211205, 0 12px 24px rgba(0, 0, 0, 0.65);
  margin-bottom: 24px;
  overflow: hidden;
}

.cbt-scoring-summary {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: linear-gradient(180deg, #69401F 0%, #46270E 100%);
  color: #FFE699;
  user-select: none;
  list-style: none;
  transition: background 0.15s ease;
}

.cbt-scoring-summary::-webkit-details-marker {
  display: none;
}

.cbt-scoring-summary:hover {
  background: linear-gradient(180deg, #7A4B26 0%, #522E10 100%);
}

.cbt-scoring-summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cbt-customize-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFE699;
  text-decoration: underline;
  white-space: nowrap;
}

.cbt-scoring-drawer-body {
  padding: 20px;
  border-top: 2px solid #291404;
}

/* Preset Pills & Sliders */
.cbt-preset-deck {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cbt-preset-pill {
  flex: 1;
  min-width: 140px;
  background: var(--parchment-inset);
  border: 2px solid #C0B092;
  border-bottom: 4px solid #9E8961;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.cbt-preset-pill.active {
  background: linear-gradient(180deg, #FFE899 0%, #F5C542 50%, #D49B1E 100%);
  border-color: #8C5C04;
  border-bottom-color: #5C3C02;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cbt-preset-name {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cbt-preset-desc {
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.cbt-slider-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cbt-slider-unit,
.cbt-slider-cell {
  background: var(--parchment-inset);
  border: 1.5px solid #C0B092;
  border-radius: 10px;
  padding: 14px 16px;
}

.cbt-slider-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-primary);
}

.cbt-slider-num {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 800;
  color: #874E05;
}

.cbt-slider-num.penalty {
  color: #93131D;
}

.cbt-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #D8C9A8;
  border: 1px solid #B09F7D;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cbt-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE066 0%, #D49B1E 100%);
  border: 2px solid #5C3806;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4), inset 0 1px 0 #FFF5CC;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.cbt-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(255, 206, 71, 0.8), 0 2px 6px rgba(0, 0, 0, 0.5);
}

.cbt-slider-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #FFE066 0%, #D49B1E 100%);
  border: 2px solid #5C3806;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4), inset 0 1px 0 #FFF5CC;
  cursor: pointer;
}

@media (max-width: 768px) {
  .cbt-slider-input {
    padding: 10px 0;
    height: 28px;
  }
  .cbt-slider-input::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }
  .cbt-slider-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }
}

.cbt-details-drawer {
  margin-top: 18px;
  border-top: 1.5px solid #D8C9A8;
  padding-top: 14px;
}

.cbt-details-drawer summary {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--wood-top);
  cursor: pointer;
  user-select: none;
}

/* Full Table */
.cbt-table-wrapper {
  overflow-x: auto;
  border: 2px solid #C0B092;
  border-radius: 12px;
  background: #FAF5E8;
  -webkit-overflow-scrolling: touch;
}

.cbt-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.cbt-table-wrapper::-webkit-scrollbar-track {
  background: #EAE0C7;
  border-radius: 4px;
}

.cbt-table-wrapper::-webkit-scrollbar-thumb {
  background: #B09F7D;
  border-radius: 4px;
}

.cbt-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #8F7B57;
}

.cbt-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  position: relative;
}

.cbt-roster-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.cbt-roster-table th {
  background: linear-gradient(180deg, #69401F 0%, #46270E 100%);
  color: #FFE699;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-bottom: 2px solid #291404;
  transition: background 0.15s ease;
}

.cbt-roster-table th:hover {
  background: linear-gradient(180deg, #7A4B26 0%, #522E10 100%);
}

.cbt-roster-table th.sorted-th {
  color: #FFFFFF;
  background: linear-gradient(180deg, #7A4B26 0%, #522E10 100%);
}

.cbt-sort-arrow {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.72rem;
  color: #FFD966;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.cbt-roster-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #E5D9BF;
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-primary);
  white-space: nowrap;
  transition: background 0.1s ease;
}

.cbt-roster-table tr:last-child td {
  border-bottom: none;
}

/* ── Table Row Highlighting & Recipient Tinting ── */
.cbt-roster-table tbody tr td {
  background: #F4EFE6;
  border-bottom: 1px solid #E2D7C2;
}

.cbt-roster-table tbody tr:nth-child(even) td {
  background: #EFE8DC;
}

.cbt-roster-table tbody tr:hover td {
  background: #E4D9C8 !important;
}

.cbt-roster-table tr:hover td:first-child {
  box-shadow: inset 3px 0 0 #B89965;
}

/* Recipient rows (above the cutoff line) receive a subtle, distinguished warm gold tint */
.cbt-roster-table tbody tr.is-recipient td {
  background: #FFF9E6;
  border-bottom: 1px solid #E8DCB8;
}

.cbt-roster-table tbody tr.is-recipient:nth-child(even) td {
  background: #FFF3D1;
}

.cbt-roster-table tbody tr.is-recipient:hover td {
  background: #FFEAA8 !important;
}

.cbt-roster-table tbody tr.is-recipient:hover td:first-child {
  box-shadow: inset 3px 0 0 #D49B1E;
}

.cbt-roster-table tr.is-cutoff td {
  border-bottom: 3.5px dashed #D97706 !important;
}

/* Missed & Incomplete Attack Warnings */
.cbt-stat-miss-warn {
  color: #B91C1C !important;
  font-weight: 800 !important;
}

.table-name-cell {
  font-family: var(--font-sans) !important;
  font-weight: 700 !important;
}

.table-name-cell span {
  max-width: 180px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.table-score-cell {
  font-weight: 800 !important;
  color: #874E05 !important;
  background: rgba(255, 232, 153, 0.3) !important;
  padding: 8px 12px !important;
}

/* Score Performance Meter (Impeccable Visualize) */
.cbt-score-meter-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 68px;
}

.cbt-score-val-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cbt-score-val {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: #874E05;
  line-height: 1.1;
}

.cbt-score-bar-track {
  width: 100%;
  height: 4px;
  background: rgba(135, 78, 5, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.cbt-score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F5C542 0%, #D49B1E 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Gold Sparkle Burst on Copy (Impeccable Delight) */
.cbt-sparkle-burst {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

.cbt-sparkle-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 206, 71, 0.9);
  animation: sparklePop 0.65s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}

@keyframes sparklePop {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0);
    opacity: 0;
  }
}

/* Ineligible Deck */
.cbt-ineligible-deck {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cbt-ineligible-chip {
  background: #EAE0C7;
  border: 1.5px solid #C4B495;
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.cbt-ineligible-chip strong {
  color: var(--ink-primary);
}

/* Explainer Link Banner & Tip Icon Frame */
.cbt-explainer-banner {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cbt-tip-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(180deg, #6B4221 0%, #44250C 100%);
  border: 2px solid #FFCE47;
  border-bottom: 3px solid #291404;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #FFE699;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* FAQ Accordion */
.cbt-faq-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cbt-faq-block {
  background: var(--parchment-inset);
  border: 1.5px solid #C0B092;
  border-radius: 10px;
  overflow: hidden;
}

.cbt-faq-trigger {
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--ink-primary);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.cbt-faq-trigger::after {
  content: '▼';
  font-size: 0.72rem;
  color: var(--ink-muted);
  transition: transform 0.2s ease;
}

.cbt-faq-block.active .cbt-faq-trigger::after {
  transform: rotate(180deg);
  color: var(--gold-deep, #874E05);
}

.cbt-faq-content {
  display: none;
  padding: 0 16px 14px;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.cbt-faq-block.active .cbt-faq-content {
  display: block;
}

.cbt-calculator-link {
  margin-top: 18px;
  padding: 14px 18px;
  background: #FFF9E6;
  border: 1.5px solid #E5B242;
  border-radius: 10px;
}

.cbt-calculator-link a {
  color: #874E05;
  font-weight: 800;
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE ADAPTATIONS
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .signals-grid,
  .cbt-signals-grid {
    grid-template-columns: 1fr;
  }
  .podium-grid-3,
  .cbt-podium-deck {
    display: grid !important;
    grid-template-columns: 1fr 1.18fr 1fr !important;
    align-items: flex-end !important;
    gap: 12px !important;
    margin: 24px auto 18px !important;
    max-width: 720px !important;
  }
  .rank-1-wrap {
    order: 0 !important;
    margin-bottom: 0 !important;
  }
  .rank-card.rank-1,
  .cbt-podium-card.rank-1 {
    transform: translateY(-16px) !important;
    margin-bottom: 16px !important;
  }
  .cbt-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cbt-slider-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .podium-grid-3,
  .cbt-podium-deck {
    grid-template-columns: 1fr 1.14fr 1fr !important;
    gap: 6px !important;
    margin: 18px auto 14px !important;
    padding: 0 2px !important;
    max-width: 100% !important;
  }

  .rank-card.rank-1,
  .cbt-podium-card.rank-1 {
    transform: translateY(-10px) !important;
    margin-bottom: 10px !important;
    border-width: 2.5px !important;
    box-shadow: 0 6px 0 #281405, 0 12px 24px rgba(0, 0, 0, 0.75) !important;
  }

  .rank-card .panel-body {
    padding: 8px 4px 8px !important;
  }

  .rank-card.rank-1 .panel-body {
    padding: 10px 4px 10px !important;
  }

  .rank-header-banner {
    padding: 4px 2px !important;
    font-size: 0.65rem !important;
    gap: 2px !important;
    letter-spacing: 0.02em !important;
  }
  .rank-header-banner span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rank-avatar-box,
  .cbt-recipient-avatar-box {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    border-width: 2px !important;
    border-bottom-width: 3px !important;
    margin: 0 auto 5px !important;
    padding: 2px !important;
  }

  .rank-1 .rank-avatar-box,
  .rank-1 .cbt-recipient-avatar-box {
    width: 50px !important;
    height: 50px !important;
    border-width: 2.5px !important;
    border-bottom-width: 4px !important;
    box-shadow: 0 0 14px rgba(255, 184, 28, 0.65), 0 4px 8px rgba(0, 0, 0, 0.35) !important;
  }

  .rank-crown,
  .cbt-rank-crown,
  .rank-crown-svg {
    top: -8px !important;
    right: -6px !important;
    width: 20px !important;
    height: 20px !important;
    border-width: 1.5px !important;
  }
  .rank-crown-svg svg {
    width: 11px !important;
    height: 11px !important;
  }

  .rank-player-name,
  .cbt-recipient-name {
    font-size: 0.82rem !important;
    line-height: 1.15 !important;
    margin-bottom: 1px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
    padding: 0 2px !important;
  }

  .rank-1 .rank-player-name,
  .rank-1 .cbt-recipient-name {
    font-size: 0.92rem !important;
  }

  .rank-player-tag {
    font-size: 0.60rem !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .cbt-key-signal-tag {
    font-size: 0.58rem !important;
    padding: 2px 4px !important;
    margin: 0 auto 5px !important;
    border-radius: 4px !important;
    line-height: 1.1 !important;
    max-width: 100% !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .rank-stats-panel,
  .cbt-recipient-statline {
    display: none !important;
  }

  .rank-score-wrap {
    gap: 2px !important;
    margin-bottom: 5px !important;
  }

  .rank-score-chip {
    padding: 3px 6px !important;
    gap: 3px !important;
    border-radius: 6px !important;
    border-width: 1.5px !important;
    border-bottom-width: 2.5px !important;
  }

  .rank-score-chip img {
    width: 13px !important;
    height: 13px !important;
  }

  .rank-score-val,
  .cbt-podium-score-num {
    font-size: 0.90rem !important;
  }

  .rank-1 .rank-score-val,
  .rank-1 .cbt-podium-score-num {
    font-size: 1.00rem !important;
  }

  .cbt-score-gap {
    font-size: 0.58rem !important;
    padding: 1px 3px !important;
    line-height: 1.1 !important;
    border-radius: 3px !important;
    margin-top: 1px !important;
  }

  .cbt-why-btn {
    font-size: 0.60rem !important;
    padding: 2px 5px !important;
    min-height: 20px !important;
    margin-top: 2px !important;
    border-radius: 3px !important;
  }
  .cbt-why-btn svg {
    width: 9px !important;
    height: 9px !important;
  }
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll !important;
  }
  .legendary-shine-burst {
    animation: none !important;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 0.65 !important;
    width: 280px !important;
    height: 280px !important;
    will-change: auto;
  }
  .cg-site-footer {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #080C0F !important;
  }
  .cbt-modal-backdrop {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(6, 10, 14, 0.94) !important;
  }
  .cbt-faq-section,
  .cbt-strategy-showcase,
  .cbt-allotment-table-wrap {
    content-visibility: auto;
    contain-intrinsic-size: 0 450px;
  }
}

@media (max-width: 580px) {
  body {
    background-image: 
      radial-gradient(ellipse at 50% 30%, rgba(12, 18, 23, 0.88) 0%, rgba(6, 9, 12, 0.98) 100%),
      url('/assets/coc_shop_ambient_bg.webp') !important;
    background-attachment: scroll !important;
  }
  .store-header {
    flex-direction: column;
    gap: 14px;
  }
  .store-nav-plank {
    gap: 8px;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }
  .store-nav-btn {
    padding: 8px 16px;
    min-height: 40px;
  }
  .coc-tag-btn,
  .cbt-chip-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .legendary-shine-burst {
    width: 220px !important;
    height: 220px !important;
    max-width: 80vw !important;
    max-height: 80vw !important;
  }
  .cbt-filter-toggle-grid {
    grid-template-columns: 1fr !important;
  }
  .eval-input-row,
  .cbt-search-bar {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .eval-input-field {
    width: 100%;
    box-sizing: border-box;
  }
  .btn-coc-green,
  .cbt-btn-primary {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 48px;
  }
  .cbt-stat-grid {
    grid-template-columns: 1fr;
  }
  .cbt-clan-strip-header {
    flex-direction: column;
    align-items: stretch;
  }
  .cbt-scoring-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .cbt-customize-cta {
    align-self: flex-start;
  }
}

@media (max-width: 360px) {
  .store-nav-btn {
    padding: 6px 10px;
    font-size: 0.76rem;
    min-height: 36px;
  }
  .store-nav-plank {
    gap: 3px;
    padding: 3px 4px;
  }
}

/* ══════════════════════════════════════════════════════════════
   CWL BONUS TOOL — INTEGRATED AMBIENT FOOTER
   Simple, clean, authentic part of the Clash theme
   ══════════════════════════════════════════════════════════════ */
.cg-site-footer {
  background: linear-gradient(180deg, rgba(12, 18, 23, 0) 0%, rgba(9, 14, 18, 0.7) 30%, rgba(6, 10, 14, 0.92) 100%) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 206, 71, 0.15) !important;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35) !important;
  margin-top: auto !important;
  padding: 36px 20px 28px !important;
  font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif) !important;
  width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 10 !important;
}

.cg-site-footer__inner {
  max-width: 960px !important;
  margin: 0 auto !important;
  padding: 0 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: center !important;
}

.cg-site-footer__brand {
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;
}

.cg-site-footer__brand img {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 0 8px rgba(255, 206, 71, 0.35)) !important;
}

.cg-site-footer__name {
  font-family: var(--font-display, 'ClashBold', sans-serif) !important;
  font-size: 1.35rem !important;
  color: #FFFDF5 !important;
  margin: 0 !important;
  letter-spacing: -0.01em !important;
  text-shadow: 
    -1.5px -1.5px 0 #241305, 1.5px -1.5px 0 #241305, 
    -1.5px 1.5px 0 #241305, 1.5px 1.5px 0 #241305,
    0 3px 0 #150901, 0 4px 8px rgba(0, 0, 0, 0.8) !important;
}

.cg-site-footer__copy {
  font-size: 12px !important;
  color: #D4C5A9 !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.cg-site-footer__disclaimer {
  font-size: 11px !important;
  color: rgba(212, 197, 169, 0.55) !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  line-height: 1.5 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
}

.cg-site-footer__nav {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px 16px !important;
  margin-top: 6px !important;
}

.cg-site-footer__nav a {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #FFD466 !important;
  text-decoration: none !important;
  transition: color 0.15s ease, text-shadow 0.15s ease !important;
  padding: 4px 4px !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
  display: inline-flex !important;
  align-items: center !important;
}

.cg-site-footer__nav a:hover {
  color: #FFFFFF !important;
  text-decoration: underline !important;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.8) !important;
}

@media (max-width: 480px) {
  .cg-site-footer {
    padding: 24px 12px 20px !important;
  }
  .cg-site-footer__inner {
    gap: 10px !important;
  }
  .cg-site-footer__nav {
    gap: 4px 10px !important;
  }
  .cg-site-footer__nav a {
    font-size: 11.5px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   6. CONTESTED SLOT WARNING DIALOGUE & TIER REFERENCE GRID
   ══════════════════════════════════════════════════════════════ */
.cbt-contested-box {
  background: linear-gradient(180deg, #4A1E14 0%, #2A0E08 100%);
  border: 2px solid #D9383A;
  border-top: 2px solid #FFA6A8;
  border-bottom: 4px solid #140503;
  border-radius: 14px;
  padding: 14px 20px;
  margin: 0 auto 20px;
  max-width: 680px;
  color: #FFE6E6;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-align: center;
}

.cbt-contested-box strong {
  color: #FFD24D;
  font-family: var(--font-display);
}

.cbt-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 12px;
}

/* Semantic table for AEO — visible to crawlers, hidden from visual UI */
.cbt-league-table {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cbt-tier-cell {
  background: var(--parchment-inset);
  border: 1.5px solid #C0B092;
  border-bottom: 3px solid #9E8961;
  border-radius: 12px;
  padding: 12px 8px 10px;
  text-align: center;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.cbt-tier-cell:hover {
  transform: translateY(-2px);
  border-color: #8C5C04;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08), 0 6px 14px rgba(0, 0, 0, 0.2);
}

.cbt-tier-badge-box {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.cbt-tier-badge-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.cbt-tier-name {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 4px;
}

.cbt-tier-slots {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  color: #874E05;
  background: #FFE899;
  border: 1px solid #D49B1E;
  border-radius: 4px;
  padding: 2px 6px;
  margin-bottom: 4px;
}

@media (max-width: 480px) {
  .cbt-tier-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .cbt-tier-cell {
    padding: 8px 4px 6px !important;
  }
  .cbt-tier-badge-box {
    width: 34px !important;
    height: 34px !important;
    margin-bottom: 4px !important;
  }
  .cbt-tier-badge-img {
    width: 30px !important;
    height: 30px !important;
  }
  .cbt-tier-name {
    font-size: 0.8rem !important;
    margin-bottom: 2px !important;
  }
  .cbt-tier-slots {
    font-size: 0.72rem !important;
    padding: 1px 4px !important;
  }
  .cbt-tier-medals {
    font-size: 0.75rem !important; /* >= 12px floor */
  }

  /* Mobile Leaderboard: Smooth horizontal scrolling with all 11 columns */
  .cbt-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100%;
  }
  .cbt-roster-table {
    min-width: 840px !important;
  }
  .cbt-roster-table td,
  .cbt-roster-table th {
    padding: 10px 10px !important;
    font-size: 0.82rem !important;
  }
  .table-score-cell {
    min-width: 100px !important;
  }
  .table-name-cell span {
    max-width: 140px !important;
  }
  .cbt-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    padding: 10px 14px !important;
  }
}

/* ── Unofficial Model Disclaimer ── */
.cbt-model-disclaimer {
  text-align: center;
  font-size: 0.86rem;
  color: #E2D7C5;
  margin: -8px auto 16px;
  max-width: 580px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.15px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ── "Why?" Score Breakdown Buttons & Interactivity ── */
.cbt-why-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #EAE0C8;
  color: #5E4128;
  border: 1px solid #B8A380;
  border-bottom: 2px solid #8F7753;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  min-height: 32px;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s ease;
  vertical-align: middle;
}
.cbt-why-btn:hover {
  background: #FFF5DC;
  color: #2C1A0C;
  border-color: #7A5B35;
  transform: translateY(-1px);
}
.cbt-why-btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EFE6D1;
  color: #6E4D2E;
  border: 1px solid #C4B291;
  border-radius: 3px;
  font-size: 0.70rem;
  font-weight: 700;
  padding: 1.5px 5px;
  cursor: pointer;
  margin-left: 0;
  transition: background 0.15s ease, color 0.15s ease;
  vertical-align: middle;
  position: relative;
  line-height: 1.2;
}
.cbt-why-btn-inline::after {
  content: '';
  position: absolute;
  top: -12px;
  bottom: -12px;
  left: -12px;
  right: -12px;
}
.cbt-why-btn-inline:hover {
  background: #FFF8E6;
  color: #2C1A0C;
  border-color: #8F7753;
}
.cbt-roster-table tbody tr {
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.cbt-roster-table tbody tr:hover td {
  background: rgba(255, 232, 153, 0.22);
}
.rank-card {
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════
   SCORE BREAKDOWN MODAL
   ══════════════════════════════════════════════════════════════ */
.cbt-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 10, 14, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.cbt-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
.cbt-modal-dialog {
  background: var(--parchment-base);
  border: 3px solid #6B4221;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.7), 0 0 0 1px #1C0D03;
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  transform: translateY(16px) scale(0.96);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.cbt-modal-backdrop.is-open .cbt-modal-dialog {
  transform: translateY(0) scale(1);
}
.cbt-modal-header {
  background: linear-gradient(180deg, #6B4221 0%, #4A2B11 100%);
  border-bottom: 2px solid #2E1807;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cbt-modal-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #FFFDF5;
  text-shadow: -1px -1px 0 #1A0D03, 1px -1px 0 #1A0D03, -1px 1px 0 #1A0D03, 1px 1px 0 #1A0D03;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cbt-modal-close {
  background: linear-gradient(180deg, #C23828 0%, #8A1F13 100%);
  border: 1px solid #5A1109;
  border-bottom: 2px solid #380703;
  color: #FFFDF5;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
  position: relative;
}
.cbt-modal-close::after {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
}
.cbt-modal-close:hover {
  filter: brightness(1.15);
  transform: scale(1.05);
}
.cbt-modal-close:active {
  transform: translateY(1px);
}
.cbt-modal-body {
  padding: 18px 20px 20px;
  overflow-y: auto;
  max-height: 80vh;
}
@media (max-width: 480px) {
  .cbt-modal-body {
    padding: 14px 12px 16px;
  }
  .cbt-modal-breakdown-table th,
  .cbt-modal-breakdown-table td {
    padding: 6px 4px;
    font-size: 0.82rem;
  }
  .cbt-modal-close {
    width: 36px;
    height: 36px;
  }
}
@media (max-height: 520px) {
  .cbt-modal-dialog {
    max-height: 94vh;
  }
  .cbt-modal-body {
    max-height: calc(94vh - 46px);
    padding: 10px 14px;
  }
  .cbt-modal-member-card {
    padding: 8px 10px;
    margin-bottom: 8px;
  }
}
.cbt-modal-member-card {
  background: var(--parchment-top);
  border: 1px solid var(--parchment-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cbt-modal-member-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cbt-modal-member-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cbt-modal-member-sub {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.cbt-modal-score-badge {
  background: linear-gradient(180deg, #FFE899 0%, #D49B1E 100%);
  border: 1px solid #874E05;
  border-bottom: 2px solid #5C3202;
  border-radius: 6px;
  padding: 4px 10px;
  text-align: center;
  flex-shrink: 0;
}
.cbt-modal-score-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: #2E1807;
  line-height: 1;
}
.cbt-modal-score-lbl {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #5C3202;
  letter-spacing: 0.3px;
}
.cbt-modal-policy-note {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cbt-modal-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.cbt-modal-breakdown-table th {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-muted);
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--parchment-border);
}
.cbt-modal-breakdown-table th:last-child,
.cbt-modal-breakdown-table td:last-child {
  text-align: right;
}
.cbt-modal-breakdown-table td {
  font-size: 0.85rem;
  color: var(--ink-primary);
  padding: 8px 8px;
  border-bottom: 1px solid rgba(216, 201, 168, 0.45);
  font-variant-numeric: tabular-nums;
}
.cbt-modal-signal-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.cbt-modal-pts-pos {
  color: #1E6B05;
  font-weight: 700;
}
.cbt-modal-pts-neg {
  color: #B52A1C;
  font-weight: 700;
}
.cbt-modal-pts-zero {
  color: var(--ink-muted);
}
.cbt-modal-total-row td {
  border-top: 2px solid #B8A380;
  border-bottom: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink-primary);
  padding-top: 10px;
}
.cbt-modal-total-pts {
  color: var(--gold-deep);
  font-size: 1.25rem;
}
.cbt-modal-footnote {
  font-size: 0.75rem;
  color: #664A2F; /* 5.8:1 WCAG AA contrast */
  text-align: center;
  line-height: 1.4;
  margin-top: 8px;
}

/* ── Mobile Sticky Copy CTA Bar ── */
.cbt-mobile-sticky-bar {
  display: none;
}
@media (max-width: 768px) {
  .cbt-mobile-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 900;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
    max-width: calc(100% - 32px);
  }
  .cbt-mobile-sticky-bar.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .cbt-sticky-copy-btn {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.2);
    padding: 10px 20px !important;
    font-size: 0.92rem !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   SHAREABLE SEASON RECAP CARD BUTTON & SPINNER
   ══════════════════════════════════════════════════════════════ */
/* Share button animation & spin */
.cbt-spin {
  animation: cbt-spin-anim 1s linear infinite;
}
@keyframes cbt-spin-anim {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cbt-btn-share-gold {
  background: linear-gradient(180deg, #FFE899 0%, #F5C542 50%, #D49B1E 100%) !important;
  color: #382402 !important;
  border: 2px solid #8C5C04 !important;
  border-bottom: 5px solid #5C3C02 !important;
}
.cbt-btn-share-gold:hover {
  filter: brightness(1.08) !important;
}
.cbt-btn-share-gold:active {
  transform: translateY(3px) !important;
  border-bottom-width: 2px !important;
}
.cbt-sticky-share-btn {
  margin-left: 8px;
  padding: 10px 18px !important;
  font-size: 0.92rem !important;
  white-space: nowrap;
}


@media (prefers-reduced-motion: reduce) {
  .legendary-shine-burst {
    animation: none !important;
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 0.85 !important;
  }
  .cbt-tier-cell,
  .btn-coc-green,
  .cbt-btn-primary,
  .coc-tag-btn,
  .cbt-chip-btn,
  .cbt-btn-outline-gold,
  .cbt-why-btn,
  .cbt-why-btn-inline,
  .cbt-btn-skip,
  .cbt-btn-undo {
    transition: none !important;
    transform: none !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   ELIGIBILITY FILTERS & DECLINE / PASS DOWN
   ══════════════════════════════════════════════════════════════ */
.cbt-filter-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
.cbt-filter-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  min-height: 48px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.24);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
  -webkit-user-select: none;
}
.cbt-filter-toggle-row:hover {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 206, 71, 0.35);
}
.cbt-filter-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 12px;
}
.cbt-filter-toggle-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-primary, #FAF5E8);
}
.cbt-filter-toggle-desc {
  font-size: 0.75rem;
  color: var(--ink-secondary, #D0C4B4);
  line-height: 1.3;
}
.cbt-filter-checkbox {
  width: 22px;
  height: 22px;
  min-width: 22px;
  cursor: pointer;
  accent-color: var(--cbt-gold, #FFCE47);
}

.cbt-unfilled-slots-box {
  margin: 0 auto 16px;
  max-width: 640px;
  padding: 10px 16px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 8px;
  color: #FDE68A;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.cbt-btn-skip,
.cbt-btn-undo {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  touch-action: manipulation;
  line-height: 1;
}
.cbt-btn-skip {
  background: rgba(239, 68, 68, 0.14);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.cbt-btn-skip:hover {
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.65);
  color: #FFFFFF;
}
.cbt-btn-undo {
  background: rgba(59, 130, 246, 0.16);
  color: #93C5FD;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.cbt-btn-undo:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: rgba(59, 130, 246, 0.7);
  color: #FFFFFF;
}

.cbt-declined-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #F87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 4px;
  padding: 3px 6px;
  white-space: nowrap;
}

.cbt-member-cell-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.cbt-member-name {
  font-weight: 600;
}
.cbt-member-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cbt-podium-skip-wrap {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}
.cbt-podium-skip-btn {
  width: 100%;
  max-width: 140px;
}

.cbt-reason-tag {
  font-size: 0.75rem;
  color: #FCA5A5;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}

/* ── Estimate My Medals Panel ── */
.cbt-est-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.cbt-est-control-group {
  display: flex;
  flex-direction: column;
}

.cbt-est-label {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.cbt-est-select {
  min-height: 44px;
  cursor: pointer;
}

.cbt-est-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cbt-est-step-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  background: linear-gradient(180deg, #69401F 0%, #46270E 100%);
  border: 1px solid #211205;
  border-radius: 8px;
  color: #FFE699;
  font-family: var(--font-display);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s ease, background 0.15s ease;
  user-select: none;
}

.cbt-est-step-btn:hover {
  background: linear-gradient(180deg, #7A4B26 0%, #522E10 100%);
}

.cbt-est-step-btn:active {
  transform: translateY(1px);
}

.cbt-est-number-input {
  flex: 1;
  min-height: 44px;
  height: 44px;
  background: var(--parchment-inset);
  border: 2px solid #C0B092;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-primary);
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.cbt-est-number-input::-webkit-outer-spin-button,
.cbt-est-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cbt-est-output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.cbt-est-card {
  background: var(--parchment-top);
  border: 1px solid var(--parchment-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cbt-est-card-interactive {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.cbt-est-card-interactive:hover {
  transform: translateY(-2px);
  border-color: #D49B1E;
  box-shadow: 0 4px 12px rgba(146, 83, 8, 0.18);
}

.cbt-est-card-interactive:focus-visible {
  outline: 2px solid #D49B1E;
  outline-offset: 2px;
}

.cbt-est-card-highlight {
  background: linear-gradient(180deg, #5C3202 0%, #381C01 100%);
  border: 2px solid #D49B1E;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.cbt-est-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.cbt-est-card-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink-secondary);
}

.cbt-est-subtext {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.cbt-est-card-val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}

.cbt-est-card-val.gold {
  color: #925308;
}

.cbt-est-card-val.green {
  color: #1E6B05;
}

.cbt-est-card-val.grand {
  color: #FFE899;
  font-size: 1.65rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.cbt-est-card-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.35;
}

.cbt-modal-estimate-btn {
  transition: transform 0.1s ease;
}

.cbt-modal-estimate-btn:hover {
  filter: brightness(1.1);
}

@media (max-width: 600px) {
  .cbt-est-controls-grid,
  .cbt-est-output-grid {
    grid-template-columns: 1fr;
  }
}


