/* WCKC R32 Quick Play
   Dark. Prestigious. The kit fills the screen.
   Color strategy: Committed. Deep near-black + warm gold. */

:root {
  --bg:         oklch(10% 0.010 265);
  --surface:    oklch(15% 0.012 265);
  --surface-hi: oklch(20% 0.014 265);
  --border:     oklch(26% 0.014 265);
  --border-hi:  oklch(40% 0.016 265);
  --text:       oklch(93% 0.006 90);
  --text-dim:   oklch(68% 0.008 265);
  --text-faint: oklch(55% 0.008 265);
  --gold:       oklch(74% 0.17 52);
  --gold-dim:   oklch(50% 0.12 52);
  --gold-bg:    oklch(20% 0.06 52);
  --green:      oklch(67% 0.18 148);
  --green-bg:   oklch(19% 0.06 148);
  --r:          10px;
  --r-sm:       6px;
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; }
body { background: var(--bg); font-family: system-ui, -apple-system, sans-serif; }

/* Scope all text colors under r32 root to override site theme */
#wckc-r32-root,
#wckc-r32-root #wckc-r32-root * {
  color: inherit !important;
}
#wckc-r32-root #wckc-r32-root {
  color: var(--text) !important;
  font-family: system-ui, -apple-system, sans-serif;
}

/* ── Shared buttons ── */
.wckc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 18px 32px; border-radius: var(--r);
  font-size: 18px; font-weight: 700; letter-spacing: 0.01em;
  cursor: pointer; border: none; font-family: inherit;
  transition: opacity 0.12s, transform 0.12s;
}
#wckc-r32-root .wckc-btn:active { transform: scale(0.97); }
#wckc-r32-root .wckc-btn--primary { background: var(--gold); color: oklch(11% 0.01 52); }
#wckc-r32-root .wckc-btn--primary:hover { opacity: 0.87; }
#wckc-r32-root .wckc-btn--ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
#wckc-r32-root .wckc-btn--ghost:hover { color: var(--text); border-color: var(--border-hi); }

/* ── Mode select ── */
.wckc-mode-select {
  min-height: 100svh; background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 24px 56px; gap: 40px;
}

#wckc-r32-root .wckc-mode-select__hero { text-align: center; max-width: 560px; }

#wckc-r32-root .wckc-mode-select__eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold) !important; margin-bottom: 18px;
  display: block;
}

#wckc-r32-root .wckc-mode-select__title {
  font-size: clamp(64px, 13vw, 100px);
  font-weight: 800; letter-spacing: -0.03em;
  line-height: 0.92; margin-bottom: 22px; color: var(--text) !important;
  text-transform: none !important;
  font-family: system-ui, -apple-system, sans-serif !important;
}

#wckc-r32-root .wckc-mode-select__sub {
  font-size: 20px; color: var(--text-dim) !important; line-height: 1.55;
}

#wckc-r32-root .wckc-mode-select__cards {
  display: flex; flex-direction: column; gap: 16px;
  width: 100%; max-width: 480px;
}

@media (min-width: 700px) {
#wckc-r32-root .wckc-mode-select__cards { flex-direction: row; max-width: 820px; }
#wckc-r32-root .wckc-mode-select__card { flex: 1; }
}

/* Base card — full tournament: visible surface, clear border */
#wckc-r32-root .wckc-mode-select__card {
  background: oklch(18% 0.014 265) !important;
  border: 1px solid oklch(32% 0.016 265) !important;
  border-radius: var(--r); padding: 32px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Quick Play card — warm gold tint, stronger border, slightly elevated */
#wckc-r32-root .wckc-mode-select__card--quick {
  background: oklch(15% 0.040 52) !important;
  border: 1px solid var(--gold-dim) !important;
  box-shadow: 0 0 0 1px oklch(50% 0.12 52 / 0.3),
              0 8px 32px oklch(74% 0.17 52 / 0.12) !important;
}

#wckc-r32-root .wckc-mode-select__card-badge {
  display: inline-flex; align-items: center; padding: 5px 13px;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.10em; text-transform: uppercase;
  background: var(--gold-bg); color: var(--gold); width: fit-content !important;
}
#wckc-r32-root .wckc-mode-select__card-badge--full {
  background: oklch(28% 0.016 265) !important;
  color: var(--text-dim) !important;
  border: 1px solid oklch(40% 0.016 265);
}

#wckc-r32-root .wckc-mode-select__card-icon { font-size: 36px; line-height: 1; }
#wckc-r32-root .wckc-mode-select__card-title {
  font-size: 28px; font-weight: 700; letter-spacing: -0.01em;
  text-transform: none !important; color: var(--text) !important;
}
#wckc-r32-root .wckc-mode-select__card-desc { font-size: 17px; color: var(--text-dim); line-height: 1.6; }

#wckc-r32-root .wckc-mode-select__card-voted {
  font-size: 15px; color: var(--gold);
  line-height: 1.55;
  padding: 12px 14px;
  background: var(--gold-bg) !important;
  border-radius: var(--r-sm);
}

#wckc-r32-root .wckc-mode-select__card-meta {
  display: flex; gap: 16px; font-size: 14px; color: var(--text-faint);
}

#wckc-r32-root .wckc-mode-select__card-btn {
  margin-top: 8px; padding: 17px 20px; border-radius: var(--r-sm);
  font-size: 18px; font-weight: 700; cursor: pointer; border: none;
  font-family: inherit; transition: opacity 0.12s, transform 0.12s;
}
#wckc-r32-root .wckc-mode-select__card-btn:active { transform: scale(0.97); }
#wckc-r32-root .wckc-mode-select__card-btn--quick { background: var(--gold); color: oklch(11% 0.01 52); }
#wckc-r32-root .wckc-mode-select__card-btn--quick:hover { opacity: 0.87; }
#wckc-r32-root .wckc-mode-select__card-btn--full {
  background: oklch(26% 0.016 265) !important;
  color: var(--text) !important;
  border: 1px solid oklch(42% 0.018 265) !important;
}
#wckc-r32-root .wckc-mode-select__card-btn--full:hover {
  background: oklch(30% 0.018 265) !important;
  border-color: oklch(52% 0.018 265) !important;
}
#wckc-r32-root .wckc-mode-select__card-progress { font-size: 15px; color: var(--gold); font-weight: 600; }

/* ── Returning champion ── */
.wckc-returning {
  min-height: 100svh; background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 24px 56px; gap: 24px; text-align: center;
}

#wckc-r32-root .wckc-returning__crown { font-size: 56px; line-height: 1; }
#wckc-r32-root .wckc-returning__eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
}

#wckc-r32-root .wckc-returning__hero { display: flex; flex-direction: column; align-items: center; gap: 20px; }

#wckc-r32-root .wckc-returning__kit-img {
  width: clamp(140px, 32vw, 200px); height: auto; object-fit: contain;
}

#wckc-r32-root .wckc-returning__champion-name {
  font-size: clamp(36px, 8vw, 56px); font-weight: 800;
  letter-spacing: -0.02em; color: var(--gold);
}
#wckc-r32-root .wckc-returning__champion-sub { font-size: 16px; color: var(--text-dim); }

#wckc-r32-root .wckc-returning__tension { max-width: 440px; }
#wckc-r32-root .wckc-returning__tension-text { font-size: 22px; line-height: 1.5; color: var(--text); }

#wckc-r32-root .wckc-returning__actions { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 340px; }

#wckc-r32-root .wckc-returning__r32result {
  background: var(--surface); border: 1px solid var(--border) !important;
  border-radius: var(--r); padding: 18px 22px; max-width: 380px;
}
#wckc-r32-root .wckc-returning__r32result p { font-size: 16px; color: var(--text-dim); }
#wckc-r32-root .wckc-returning__r32result strong { color: var(--text); font-size: 18px; display: block; margin: 4px 0; }
#wckc-r32-root .wckc-returning__match { font-size: 15px !important; color: var(--green) !important; margin-top: 8px !important; }
#wckc-r32-root .wckc-returning__match--diff { color: var(--text-faint) !important; }

/* ── R32 match screen ── */
.wckc-r32 {
  height: 100svh;
  background: var(--bg); color: var(--text) !important;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Header */
.wckc-r32__header {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: var(--bg); z-index: 10;
  flex-shrink: 0;
}

#wckc-r32-root .wckc-r32__back {
  background: none; border: none; color: var(--text-dim) !important;
  font-size: 22px; cursor: pointer; padding: 4px 8px;
  border-radius: var(--r-sm); line-height: 1;
  transition: color 0.1s; flex-shrink: 0; font-family: inherit;
}
#wckc-r32-root .wckc-r32__back:hover { color: var(--text); }

#wckc-r32-root .wckc-r32__round-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }

#wckc-r32-root .wckc-r32__round-label {
  font-size: 13px; font-weight: 800; color: var(--gold);
  letter-spacing: 0.10em; text-transform: uppercase;
  white-space: nowrap;
}
#wckc-r32-root .wckc-r32__match-label {
  font-size: 13px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

#wckc-r32-root .wckc-r32__progress-wrap { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
#wckc-r32-root .wckc-r32__progress-bar {
  width: 88px; height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden;
}
#wckc-r32-root .wckc-r32__progress-fill {
  height: 100%; background: var(--gold); border-radius: 2px;
  transition: width 0.35s ease-out;
}
#wckc-r32-root .wckc-r32__progress-label {
  font-size: 14px; color: var(--text-dim);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ── Matchup ── */
.wckc-r32__matchup {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
}

/* Vertical divider with VS badge */
.wckc-r32__vs {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}

#wckc-r32-root .wckc-r32__vs-line {
  flex: 1; width: 1px;
  background: var(--border) !important;
}

#wckc-r32-root .wckc-r32__vs-badge {
  font-size: 13px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--text-dim); background: var(--surface) !important;
  border: 1px solid var(--border-hi); border-radius: 999px;
  padding: 8px 14px; white-space: nowrap;
  flex-shrink: 0;
}

/* Kit cards */
.wckc-r32__kit-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; padding: 24px 20px;
  cursor: pointer; position: relative;
  transition: background 0.14s;
  min-height: 0;
}
#wckc-r32-root .wckc-r32__kit-card:hover { background: oklch(14% 0.012 265); }
#wckc-r32-root .wckc-r32__kit-card:active { background: oklch(18% 0.014 265); }

#wckc-r32-root .wckc-r32__kit-card--champion { background: oklch(12% 0.022 52 / 0.7); }
#wckc-r32-root .wckc-r32__kit-card--champion:hover { background: oklch(16% 0.028 52 / 0.8); }

#wckc-r32-root .wckc-r32__champion-badge {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  background: var(--gold-bg); color: var(--gold) !important;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 5px 14px;
  border-radius: 999px; border: 1px solid var(--gold-dim);
  white-space: nowrap;
}

#wckc-r32-root .wckc-r32__kit-img {
  display: block;
  width: min(320px, 42vw);
  max-height: 50vh;
  height: auto; object-fit: contain;
  filter: drop-shadow(0 10px 32px oklch(0% 0 0 / 0.5));
  transition: transform 0.2s ease-out, filter 0.2s ease-out;
}
#wckc-r32-root .wckc-r32__kit-card:hover .wckc-r32__kit-img {
  transform: scale(1.06) translateY(-6px);
  filter: drop-shadow(0 18px 44px oklch(0% 0 0 / 0.65));
}

#wckc-r32-root .wckc-r32__kit-info {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
}
#wckc-r32-root .wckc-r32__team-name { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
#wckc-r32-root .wckc-r32__team-finish {
  font-size: 13px; color: var(--gold-dim); font-weight: 600;
  letter-spacing: 0.04em;
}
#wckc-r32-root .wckc-r32__kit-type {
  font-size: 11px; color: var(--text-faint); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
}

#wckc-r32-root .wckc-r32__kit-card--tbd { opacity: 0.3; cursor: default; }
#wckc-r32-root .wckc-r32__kit-tbd { font-size: 20px; color: var(--text-faint); font-weight: 700; }

/* Footer — instruction strip */
.wckc-r32__footer {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 14px 24px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg) !important;
}

#wckc-r32-root .wckc-r32__prompt {
  font-size: 17px; font-weight: 600; color: var(--text-dim);
  letter-spacing: 0.02em; text-align: center;
}

#wckc-r32-root .wckc-r32__first-match-note {
  font-size: 14px; color: var(--text-faint);
  text-align: center; line-height: 1.5;
  max-width: 480px;
}

/* Kit vote stats */
.wckc-r32__kit-stats {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; margin-top: 6px;
  padding: 10px 14px;
  background: oklch(18% 0.012 265);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  max-width: 190px; width: 100%;
  flex-shrink: 0;
}

#wckc-r32-root .wckc-r32__kit-score {
  font-size: 14px; font-weight: 700;
  color: var(--gold); letter-spacing: 0.01em !important;
  text-align: center; line-height: 1.4;
}

#wckc-r32-root .wckc-r32__kit-champ-pct {
  font-size: 13px; color: var(--text);
  text-align: center; font-weight: 500;
  border-top: 1px solid var(--border);
  padding-top: 5px; width: 100%;
}

/* Persistent full tournament nudge — proper CTA banner */
.wckc-r32__full-nudge {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  margin-top: 4px;
  padding: 12px 20px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-dim);
  border-radius: var(--r);
  width: 100%;
  max-width: 560px;
}

#wckc-r32-root .wckc-r32__full-nudge-text {
  font-size: 15px; font-weight: 600;
  color: var(--text) !important;
  white-space: nowrap;
}

#wckc-r32-root .wckc-r32__full-nudge-btn {
  background: var(--gold) !important;
  border: none;
  color: oklch(11% 0.01 52) !important;
  font-size: 15px; font-weight: 800;
  cursor: pointer; padding: 10px 18px;
  border-radius: var(--r-sm);
  font-family: inherit;
  transition: opacity 0.12s, transform 0.12s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
#wckc-r32-root .wckc-r32__full-nudge-btn:hover { opacity: 0.87; }
#wckc-r32-root .wckc-r32__full-nudge-btn:active { transform: scale(0.97); }
#wckc-r32-root .wckc-r32-loading {
  min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; background: var(--bg); color: var(--text-faint); font-size: 17px;
}
#wckc-r32-root .wckc-r32-loading__spinner {
  width: 32px; height: 32px; border: 2px solid var(--border);
  border-top-color: var(--gold); border-radius: 50%;
  animation: r32spin 0.65s linear infinite;
}
@keyframes r32spin {to { transform: rotate(360deg); } }

/* ── Completion ── */
.wckc-r32-complete {
  min-height: 100svh; background: var(--bg); color: var(--text);
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 24px 56px; gap: 24px; text-align: center;
}

#wckc-r32-root .wckc-r32-complete__trophy {
  font-size: 64px; line-height: 1;
  animation: r32pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes r32pop {
from { transform: scale(0.3); opacity: 0; }
to { transform: scale(1); opacity: 1; }
}

#wckc-r32-root .wckc-r32-complete__eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold);
}

#wckc-r32-root .wckc-r32-complete__hero { display: flex; flex-direction: column; align-items: center; gap: 20px; }

#wckc-r32-root .wckc-r32-complete__kit-img {
  width: clamp(160px, 36vw, 240px); height: auto; object-fit: contain;
  animation: r32rise 0.5s 0.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes r32rise {
from { transform: translateY(24px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}

#wckc-r32-root .wckc-r32-complete__champion-name {
  font-size: clamp(36px, 9vw, 60px); font-weight: 800; letter-spacing: -0.02em; color: var(--gold);
}
#wckc-r32-root .wckc-r32-complete__kit-label {
  font-size: 14px; color: var(--text-faint); letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 600;
}

#wckc-r32-root .wckc-r32-complete__verdict {
  font-size: 16px; padding: 10px 18px; border-radius: var(--r-sm);
}
#wckc-r32-root .wckc-r32-complete__verdict--match { background: var(--green-bg); color: var(--green); }
#wckc-r32-root .wckc-r32-complete__verdict--diff { background: var(--surface); color: var(--text-faint); }

#wckc-r32-root .wckc-r32-complete__ctas { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 380px; }

#wckc-r32-root .wckc-r32-complete__upgrade {
  background: var(--gold-bg); border: 1px solid var(--gold-dim) !important;
  border-radius: var(--r); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 14px;
}
#wckc-r32-root .wckc-r32-complete__upgrade-text { font-size: 18px; color: var(--text); line-height: 1.5; }

#wckc-r32-root .wckc-r32-complete__secondary-actions { display: flex; gap: 10px; }
#wckc-r32-root .wckc-r32-complete__secondary-actions .wckc-btn { flex: 1; font-size: 16px; padding: 14px 18px; }

/* ── Responsive ── */
@media (max-width: 480px) {

/* Header — tighter, prevent truncation */
#wckc-r32-root .wckc-r32__header { padding: 10px 12px; gap: 8px; }
#wckc-r32-root .wckc-r32__back { font-size: 16px; padding: 2px 6px; }
#wckc-r32-root .wckc-r32__round-label { font-size: 11px; letter-spacing: 0.08em; }
#wckc-r32-root .wckc-r32__match-label { font-size: 12px; }
#wckc-r32-root .wckc-r32__progress-bar { width: 56px; }
#wckc-r32-root .wckc-r32__progress-label { font-size: 11px; }

/* Matchup — slimmer VS column */
#wckc-r32-root .wckc-r32__matchup { grid-template-columns: 1fr 36px 1fr; }

/* Kit card — less padding, more kit */
#wckc-r32-root .wckc-r32__kit-card { padding: 16px 6px 12px; gap: 8px; }
#wckc-r32-root .wckc-r32__kit-img { width: min(155px, 42vw); }
#wckc-r32-root .wckc-r32__team-name { font-size: 14px; }
#wckc-r32-root .wckc-r32__team-finish { font-size: 11px; }
#wckc-r32-root .wckc-r32__kit-type { font-size: 10px; }
#wckc-r32-root .wckc-r32__champion-badge { font-size: 10px; top: 10px; padding: 2px 8px; }

/* VS badge — smaller on mobile */
#wckc-r32-root .wckc-r32__vs-badge { font-size: 10px; padding: 5px 8px; }

/* Stat block — compact on mobile, single line score */
#wckc-r32-root .wckc-r32__kit-stats {
  padding: 7px 10px; gap: 4px; max-width: 160px;
}
#wckc-r32-root .wckc-r32__kit-score {
  font-size: 11px; line-height: 1.3;
}
#wckc-r32-root .wckc-r32__kit-champ-pct {
  font-size: 10px; padding-top: 3px;
}

/* Footer — fix nudge overflow */
#wckc-r32-root .wckc-r32__footer { padding: 12px 12px 16px; gap: 8px; }
#wckc-r32-root .wckc-r32__prompt { font-size: 13px; }
#wckc-r32-root .wckc-r32__first-match-note { font-size: 11px; }
#wckc-r32-root .wckc-r32__full-nudge {
  padding: 10px 12px; gap: 8px;
  flex-direction: column; align-items: center;
}
#wckc-r32-root .wckc-r32__full-nudge-text { font-size: 13px; text-align: center; white-space: normal; }
#wckc-r32-root .wckc-r32__full-nudge-btn { font-size: 14px; padding: 10px 16px; width: 100%; }
}

@media (min-width: 900px) {
#wckc-r32-root .wckc-r32__kit-img { width: min(400px, 34vw); }
#wckc-r32-root .wckc-r32__team-name { font-size: 22px; }
#wckc-r32-root .wckc-r32__kit-card { padding: 32px 32px; }
}
