/* ══════════════════════════════════════════════════════════════
   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%;
}

: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;
  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);
}

/* ══════════════════════════════════════════════════════════════
   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;
}

.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 {
  position: absolute;
  top: -16px;
  right: -8px;
  font-size: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
}

.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: 10px 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.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);
}

/* ── 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;
  line-height: 1.45;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

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

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

.cbt-season-status-banner.complete-archived {
  background: var(--parchment-inset);
  border: 1.5px solid #C0B092;
  border-left: 5px solid #8B5810;
  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: 20px;
  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);
}

.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);
}

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

.cbt-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.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.1);
}

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

.cbt-stat-cell-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.cbt-stat-cell-val.gold {
  color: #874E05;
}

.cbt-stat-cell-sub {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  font-weight: 500;
}

/* 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;
}

.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-roster-table {
  width: 100%;
  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;
}

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

.cbt-roster-table tr:hover td:first-child {
  border-left: 3px solid #D49B1E;
}

.cbt-roster-table tr.is-recipient td {
  background: #FFF9E6;
}

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

.cbt-roster-table tr.is-cutoff td {
  border-bottom: 3px dashed #F59E0B;
}

.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: 64px;
}

.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: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
  }
  .rank-1-wrap {
    order: -1;
    margin-bottom: 0;
  }
  .rank-card.rank-1,
  .cbt-podium-card.rank-1 {
    transform: none;
    margin-bottom: 0;
  }
  .cbt-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cbt-slider-grid {
    grid-template-columns: 1fr;
  }
}

@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;
  }
  .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: 280px;
    height: 280px;
  }
  .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 Simplification (≤480px): Show only Rank, Member, Score, Stars */
  .cbt-roster-table .cbt-col-hide-mobile {
    display: none !important;
  }
  .cbt-roster-table td,
  .cbt-roster-table th {
    padding: 8px 6px !important;
  }
  .table-score-cell {
    min-width: 90px !important;
  }
  .table-name-cell span {
    max-width: 110px !important;
  }
}

/* ── Unofficial Model Disclaimer ── */
.cbt-model-disclaimer {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin: -8px auto 16px;
  max-width: 580px;
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: 0.15px;
  opacity: 0.92;
}

/* ── "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.72rem;
  font-weight: 700;
  padding: 3px 7px;
  cursor: pointer;
  margin-left: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  vertical-align: middle;
  position: relative;
}
.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;
  }
}

@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 {
    transition: none !important;
    transform: none !important;
  }
}
