:root {
  color-scheme: dark;
  --ink: #f8f6ff;
  --muted: #aaa7bc;
  --panel: rgba(27, 25, 52, 0.84);
  --panel-solid: #1b1934;
  --line: rgba(255, 255, 255, 0.11);
  --gold: #ffd76a;
  --gold-deep: #f6ad32;
  --coral: #ff6b6b;
  --mint: #59e6c4;
  --violet: #8b7cff;
  --bg: #0e0d1d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(139, 124, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 15%, rgba(255, 107, 107, 0.12), transparent 28rem),
    var(--bg);
}

button,
select,
input {
  font: inherit;
}

button,
select,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.hero,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.hero {
  padding: 64px 0 32px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 12px;
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: 0.86;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.draft-lab,
.control-room,
.lineup-stage,
.verdict {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.draft-lab {
  margin-bottom: 24px;
  padding: 28px;
}

.draft-lab-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.draft-lab-heading p:not(.section-kicker) {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.library-count {
  display: grid;
  min-width: 136px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  text-align: center;
}

.library-count strong {
  color: var(--gold);
  font-size: 2rem;
  line-height: 1;
}

.library-count span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.draft-controls {
  display: grid;
  grid-template-columns: minmax(210px, 2fr) repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 12px;
}

.draft-controls select,
.draft-controls input,
.draft-controls .button {
  width: 100%;
}

.simulation-note {
  min-height: 22px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.item-fact {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.draft-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.team-card {
  --team-accent: var(--violet);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--team-accent) 12%, transparent), transparent 48%),
    rgba(12, 11, 27, 0.58);
  transition: border-color 180ms ease, transform 180ms ease;
}

.team-card.is-winner {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 106, 0.12), 0 18px 42px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}

.team-card.is-on-clock {
  border-color: var(--team-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--team-accent) 20%, transparent);
}

.team-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team-heading h3 {
  margin: 0;
  font-size: 1rem;
}

.team-heading span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.winner-chip {
  display: none;
  margin-top: 4px;
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.team-card.is-winner .winner-chip {
  display: block;
}

.team-picks {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.team-picks li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border-radius: 10px;
  padding: 7px 9px;
  color: #eeeafa;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.76rem;
  font-weight: 720;
}

.team-picks .empty-pick {
  color: #77738c;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: transparent;
}

.draft-table {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.draft-turn-bar,
.available-heading,
.spotlight-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.draft-turn-bar h3,
.available-heading h3 {
  margin: 0;
}

.draft-turn-bar p:not(.section-kicker) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.available-heading {
  margin: 24px 0 10px;
}

.available-heading span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.available-pool {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-height: 410px;
  overflow: auto;
  padding: 3px;
}

.available-item {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.73rem;
  font-weight: 750;
  cursor: pointer;
}

.item-profile {
  display: grid;
  gap: 10px;
  width: 100%;
  text-align: left;
}

.item-profile-heading {
  display: grid;
  gap: 3px;
}

.item-profile-heading strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.2;
}

.item-profile-heading span {
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.item-stat-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 8px;
}

.item-stat {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
}

.item-stat b {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.category-stats {
  border-top: 1px solid var(--line);
  padding-top: 7px;
}

.category-stats .item-stat b { color: var(--mint); }

.item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.item-tags span {
  border-radius: 999px;
  padding: 3px 6px;
  color: #d7d2e6;
  background: rgba(255, 255, 255, 0.075);
  font-size: 0.52rem;
  font-weight: 750;
}

.auction-nominee .item-profile {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.auction-nominee .item-profile-heading strong { display: none; }

.available-item:hover:not(:disabled) {
  border-color: var(--gold);
  background: rgba(255, 215, 106, 0.11);
}

.available-item:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.auction-room {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) 2fr;
  gap: 18px;
  margin-top: 20px;
  border: 1px solid rgba(255, 215, 106, 0.2);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 215, 106, 0.045);
}

.auction-nominee {
  display: grid;
  align-content: center;
  gap: 5px;
}

.auction-nominee > span,
.auction-nominee > small {
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.auction-nominee strong {
  color: var(--gold);
  font-size: 1.2rem;
}

.bid-controls {
  display: grid;
  grid-template-columns: 110px 1fr auto auto;
  align-items: end;
  gap: 9px;
}

.bid-team-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bid-team {
  display: block;
  cursor: pointer;
}

.bid-team input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bid-team span {
  display: grid;
  min-height: 46px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
}

.bid-team small { color: var(--muted); }
.bid-team input:checked + span { border-color: var(--mint); background: rgba(89, 230, 196, 0.12); }
.bid-team.is-disabled { opacity: 0.35; cursor: not-allowed; }

.pick-price {
  flex: 0 0 auto;
  color: var(--mint);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
}

.team-score {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.7rem;
}

.judge-score-ledger {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.judge-score-ledger:empty { display: none; }

.judge-score-ledger span {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--team-accent) 30%, var(--line));
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--muted);
  background: color-mix(in srgb, var(--team-accent) 8%, transparent);
  font-size: 0.58rem;
  font-weight: 800;
}

.judge-score-ledger b {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.team-score strong {
  float: right;
  color: var(--gold);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.control-room {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

select,
input,
.button {
  min-height: 46px;
  border-radius: 14px;
}

select,
input {
  border: 1px solid var(--line);
  padding: 0 13px;
  color: var(--ink);
  background: #131127;
}

select { padding-right: 38px; }

.button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.button {
  border: 0;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.button-primary {
  color: #261d06;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
}

.lineup-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  overflow: hidden;
  margin-top: 24px;
  padding: 40px;
  background:
    linear-gradient(120deg, rgba(139, 124, 255, 0.24), transparent 48%),
    linear-gradient(300deg, rgba(255, 215, 106, 0.12), transparent 48%),
    #17152f;
}

.judge-spotlight {
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 215, 106, 0.25);
  border-radius: 28px;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 215, 106, 0.16), transparent 35%),
    linear-gradient(135deg, rgba(139, 124, 255, 0.2), transparent 55%),
    #151329;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3);
}

.score-comparison {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px;
  background:
    linear-gradient(140deg, rgba(89, 230, 196, 0.08), transparent 40%),
    var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.comparison-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.comparison-heading > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: right;
}

.comparison-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 8, 20, 0.45);
}

.comparison-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.comparison-table th,
.comparison-table td {
  min-width: 55px;
  border-right: 1px solid rgba(255, 255, 255, 0.055);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  padding: 10px 8px;
  text-align: center;
}

.comparison-table thead th {
  color: var(--muted);
  background: #15132a;
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comparison-table thead span,
.comparison-table thead small { display: block; }
.comparison-table thead span { color: var(--gold); font-size: 0.7rem; }
.comparison-table thead small { margin-top: 2px; font-size: 0.48rem; }

.comparison-table .team-column {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 150px;
  background: #17152d;
  text-align: left;
}

.comparison-table tbody .team-column {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
}

.comparison-table .team-column i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--team-dot);
  box-shadow: 0 0 12px var(--team-dot);
}

.comparison-table .team-column b {
  margin-left: auto;
  color: var(--gold);
}

.score-cell {
  color: #6f6b82;
  font-variant-numeric: tabular-nums;
  transition: color 220ms ease, background 220ms ease, transform 220ms ease;
}

.score-cell.is-revealed {
  color: var(--ink);
  background: rgba(89, 230, 196, 0.055);
  font-weight: 900;
  animation: score-pop 420ms ease both;
}

.comparison-table .average-column {
  min-width: 80px;
  color: var(--gold);
  background: rgba(255, 215, 106, 0.055);
  font-size: 0.92rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.comparison-table .status-column {
  min-width: 78px;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 850;
  text-transform: uppercase;
}

.comparison-table tr.is-active > * {
  box-shadow: inset 0 2px rgba(89, 230, 196, 0.45), inset 0 -2px rgba(89, 230, 196, 0.45);
}

.comparison-table tr.is-locked .status-column { color: var(--mint); }

.comparison-table tr.is-winner > * {
  color: var(--gold);
  background-color: rgba(255, 215, 106, 0.1);
  box-shadow: inset 0 2px var(--gold), inset 0 -2px var(--gold);
}

.score-comparison.is-finalizing {
  border-color: rgba(255, 215, 106, 0.55);
  animation: verdict-pulse 900ms ease-in-out infinite alternate;
}

.spotlight-progress {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spotlight-progress span:last-child { color: var(--gold); }

.spotlight-layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.85fr) minmax(320px, 1.15fr);
  align-items: center;
  gap: 36px;
}

.spotlight-portrait {
  aspect-ratio: 1;
  max-height: 560px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, white 10%);
  border-radius: 24px;
  background-repeat: no-repeat;
  background-size: 400% 400%;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
}

.spotlight-copy h2 { font-size: clamp(2.5rem, 6vw, 5.2rem); }

.spotlight-teaser,
.spotlight-breakdown {
  max-width: 620px;
  margin: 18px 0;
  color: #ebe7f7;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  line-height: 1.55;
}

.spotlight-details {
  display: grid;
  max-width: 660px;
  gap: 8px;
  margin: 18px 0;
}

.spotlight-traits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(5, 5, 16, 0.24);
}

.personality-accents {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: var(--muted);
  font-size: 0.66rem;
}

.personality-accents b { margin-right: 3px; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
.personality-accents span { border: 1px solid var(--line); border-radius: 999px; padding: 3px 7px; background: rgba(255, 255, 255, 0.04); }

.selection-breakdown {
  display: grid;
  gap: 10px;
  animation: fade-up 360ms ease both;
}

.selection-breakdown-heading,
.selection-score-head,
.score-modifiers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.selection-breakdown-heading {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.selection-score-row {
  --meter-color: var(--gold);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px;
  padding: 10px 12px;
  background: rgba(5, 5, 16, 0.28);
}

.selection-score-row.is-favorite { border-color: rgba(255, 215, 106, 0.58); box-shadow: inset 3px 0 var(--gold); }
.selection-score-row.is-hated { border-color: rgba(255, 77, 106, 0.65); box-shadow: inset 3px 0 #8d132f; }
.selection-score-head strong { font-size: 0.82rem; }
.selection-score-head span { color: var(--meter-color); font-weight: 950; font-variant-numeric: tabular-nums; }

.selection-meter {
  height: 7px;
  margin: 7px 0 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.selection-meter span {
  display: block;
  width: var(--meter-width);
  height: 100%;
  border-radius: inherit;
  background: var(--meter-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--meter-color) 45%, transparent);
  animation: meter-grow 620ms cubic-bezier(.2,.8,.2,1) both;
}

.contribution-layers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.contribution-layers span {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 5px 7px;
  color: var(--muted);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.contribution-layers b { color: var(--ink); font-variant-numeric: tabular-nums; }

.selection-score-row p { margin: 0; color: var(--muted); font-size: 0.72rem; line-height: 1.42; }
.selection-flag { margin-left: 6px; color: var(--meter-color); font-size: 0.58rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; }
.score-modifiers { border-top: 1px solid var(--line); padding-top: 9px; color: var(--muted); font-size: 0.7rem; }
.score-modifiers b { color: var(--ink); }

.spotlight-breakdown {
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  color: var(--muted);
  font-size: 0.96rem;
}

.spotlight-scorecard {
  width: 180px !important;
  height: 150px !important;
  margin: 24px 0 !important;
}

.spotlight-scorecard .scorecard-front strong { font-size: 4.4rem; }
.spotlight-scorecard.is-revealed .scorecard-flipper { transform: rotateY(180deg); }
.spotlight-scorecard.is-resetting .scorecard-flipper { transition: none; }
.spotlight-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.spotlight {
  position: absolute;
  top: -180px;
  width: 160px;
  height: 560px;
  transform-origin: top;
  background: linear-gradient(to bottom, rgba(255, 244, 185, 0.22), transparent 78%);
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.spotlight-left {
  left: 10%;
  transform: rotate(-18deg);
}

.spotlight-right {
  right: 22%;
  transform: rotate(17deg);
}

.lineup-copy,
.final-score {
  position: relative;
  z-index: 1;
}

.lineup-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.lineup-list span {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 9px 13px;
  color: #efedff;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 750;
}

.final-score {
  display: grid;
  min-width: 160px;
  place-content: center;
  text-align: center;
}

.final-score span,
.final-score small {
  color: var(--muted);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.final-score span {
  font-size: 0.72rem;
}

.final-score strong {
  font-size: 4rem;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.final-score small {
  font-size: 0.62rem;
}

.jury-section {
  padding: 56px 0 16px;
}

.jury-section.dramatic-active .section-heading { margin-bottom: 12px; }
.jury-section.dramatic-active .judge-card { display: none; }
.jury-section.dramatic-active .judge-card.is-counted {
  display: block;
  padding: 9px;
  animation: fade-up 400ms ease both;
}
.jury-section.dramatic-active .judge-card.is-counted .portrait-stage { margin: 18px -9px 8px; }
.jury-section.dramatic-active .judge-card.is-counted .trait-list,
.jury-section.dramatic-active .judge-card.is-counted .preferences,
.jury-section.dramatic-active .judge-card.is-counted .reaction,
.jury-section.dramatic-active .judge-card.is-counted .judge-style,
.jury-section.dramatic-active .judge-card.is-counted .scorecard-shell { display: none; }
.jury-section.dramatic-active .judge-card.is-counted .scorecard-flipper { transition: none; }
.jury-section.dramatic-active .judge-card.is-counted .scorecard-front strong { font-size: 1.9rem; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-heading > p {
  max-width: 340px;
  margin-bottom: 4px;
  color: var(--muted);
  text-align: right;
}

.judge-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.judge-card {
  --accent: var(--violet);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 14px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
    var(--panel-solid);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.19);
}

.judge-number {
  position: absolute;
  z-index: 4;
  top: 12px;
  left: 12px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #100f1d;
  background: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
}

.archetype {
  position: absolute;
  z-index: 4;
  top: 13px;
  right: 12px;
  max-width: calc(100% - 58px);
  overflow: hidden;
  color: var(--accent);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.portrait-stage {
  position: relative;
  aspect-ratio: 1;
  margin: 18px -14px 12px;
  overflow: hidden;
  border-block: 1px solid rgba(255, 255, 255, 0.09);
  background: #21152f;
}

.portrait-sheet {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 400% 400%;
}

.judge-name {
  margin-bottom: 3px;
  font-size: 1.02rem;
  line-height: 1.15;
}

.judge-style {
  min-height: 30px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.trait-list {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
}

.judge-team-totals {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.judge-team-totals[hidden] { display: none; }

.judge-team-totals span {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
}

.judge-team-totals i { width: 7px; height: 7px; border-radius: 50%; background: var(--team-dot); }
.judge-team-totals b { color: var(--ink); font-variant-numeric: tabular-nums; }

.trait {
  display: grid;
  grid-template-columns: 66px 1fr 16px;
  align-items: center;
  gap: 6px;
  color: #cecadf;
  font-size: 0.62rem;
  font-weight: 750;
}

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

.trait-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.trait-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.preferences {
  min-height: 94px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.preference-sealed {
  display: grid;
  min-height: 74px;
  place-content: center;
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 750;
}

.lock-mark {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 1.25rem;
}

.preference-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.67rem;
}

.preference-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 5px;
}

.preference-list b {
  color: var(--gold);
}

.preference-list .hated {
  margin-top: 4px;
  color: #ff9d9d;
}

.preference-list .lens-like { color: #9ff1d9; }
.preference-list .constraint { margin-top: 4px; color: #ffcb7f; }

.scorecard-shell {
  width: 100px;
  height: 88px;
  margin: 12px auto 2px;
  perspective: 700px;
}

.scorecard-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 820ms cubic-bezier(0.2, 0.78, 0.2, 1);
}

.scorecard-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  border: 5px solid #f7e7b8;
  border-radius: 14px;
  backface-visibility: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34), inset 0 0 0 2px #cfb46b;
  text-align: center;
}

.scorecard-back {
  color: #fff8dc;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.13) 0 2px, transparent 3px) 0 0 / 12px 12px,
    linear-gradient(145deg, #453572, #22193f);
}

.scorecard-back strong {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin: auto;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.scorecard-back small,
.scorecard-front small {
  margin-top: 4px;
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scorecard-front {
  color: #171226;
  background: #fff9e7;
  transform: rotateY(180deg);
}

.scorecard-front strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.45rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.scorecard-front small {
  color: #746230;
}

.judge-card.is-revealed .scorecard-flipper {
  transform: rotateY(180deg);
}

.reaction {
  display: none;
  min-height: 94px;
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: #e6e2f2;
  font-size: 0.7rem;
  line-height: 1.45;
}

.judge-card.is-revealed .reaction {
  display: block;
  animation: fade-up 450ms ease both 520ms;
}

.judge-card.is-revealed .preferences {
  display: none;
}

.verdict {
  margin: 40px 0;
  padding: 34px;
  text-align: center;
}

.verdict[hidden] {
  display: none;
}

.verdict p:not(.section-kicker) {
  max-width: 680px;
  margin: 12px auto 22px;
  color: var(--muted);
  line-height: 1.65;
}

.winner-explanation {
  max-width: 720px;
  margin: 0 auto 24px;
  border: 1px solid rgba(255, 215, 106, 0.28);
  border-radius: 18px;
  padding: 18px 20px;
  background: rgba(255, 215, 106, 0.065);
  text-align: left;
}

.winner-explanation span {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.winner-explanation p {
  margin: 7px 0 0 !important;
  color: #ece8f7 !important;
  line-height: 1.55 !important;
}

footer {
  padding: 34px 0 46px;
  color: #858198;
  font-size: 0.75rem;
  text-align: center;
}

footer a {
  color: #c9c4ff;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes score-pop {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes meter-grow {
  from { width: 0; }
}

@keyframes verdict-pulse {
  from { box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22); }
  to { box-shadow: 0 0 0 2px rgba(255, 215, 106, 0.12), 0 26px 90px rgba(255, 215, 106, 0.12); }
}

@media (max-width: 1040px) {
  .draft-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .draft-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .judge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .available-pool { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auction-room, .bid-controls { grid-template-columns: 1fr; }

  .control-room {
    align-items: start;
    flex-direction: column;
  }

  .controls {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .hero,
  main,
  footer {
    width: min(100% - 20px, 1180px);
  }

  .hero {
    padding-top: 40px;
  }

  .controls,
  .draft-controls,
  label,
  select,
  input,
  .button {
    width: 100%;
  }

  .draft-lab {
    padding: 22px;
  }

  .draft-lab-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .library-count {
    min-width: 0;
  }

  .draft-controls,
  .draft-board {
    grid-template-columns: 1fr;
  }

  .draft-turn-bar,
  .available-heading { align-items: stretch; flex-direction: column; }
  .available-pool { grid-template-columns: 1fr; }
  .spotlight-layout { grid-template-columns: 1fr; gap: 22px; }
  .spotlight-traits { grid-template-columns: 1fr; }
  .spotlight-actions { display: grid; }
  .spotlight-portrait { max-height: none; }
  .score-comparison { padding: 20px 14px; }
  .comparison-heading { align-items: start; flex-direction: column; }
  .comparison-heading > p { text-align: left; }

  .lineup-stage {
    grid-template-columns: 1fr;
    padding: 28px 22px;
  }

  .final-score {
    min-width: 0;
    border-top: 1px solid var(--line);
    padding-top: 22px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-heading > p {
    text-align: left;
  }

  .judge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .judge-card {
    padding: 11px;
    border-radius: 19px;
  }

  .portrait-stage {
    margin-inline: -11px;
  }

  .trait {
    grid-template-columns: 58px 1fr 14px;
  }
}

@media (max-width: 420px) {
  .judge-grid {
    grid-template-columns: 1fr;
  }
}

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

/* Prominent route into online rooms — desktop and mobile. */
.hero-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 1.4rem;
}

.online-cta {
  font-size: 1.02rem;
  padding: 0.85rem 1.6rem;
  text-decoration: none;
}

.hero-mode-note {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .hero-modes {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .online-cta {
    width: 100%;
  }
}

/* Fact provenance chip on item cards — quiet by default, expands on demand. */
.item-stat.is-unknown b { opacity: 0.5; }
.fact-badge { margin: 0.35rem 0 0; font-size: 0.72rem; }
.fact-badge > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  list-style: none;
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  letter-spacing: 0.02em;
}
.fact-badge > summary::-webkit-details-marker { display: none; }
.fact-badge.is-backed > summary { color: #7fe3c0; }
.fact-badge.is-unresolved > summary { color: #ffc98a; }
.fact-badge ul { margin: 0.4rem 0 0; padding-left: 1rem; opacity: 0.8; }
.fact-badge p { margin: 0.3rem 0 0; opacity: 0.7; }

/* Team setup: names + human/computer controllers, shared visual language. */
.team-setup {
  margin: 1rem 0 0;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(12, 14, 34, 0.45);
}
.team-setup-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.team-setup-heading p { margin: 0; opacity: 0.82; }
.team-setup-rows { display: grid; gap: 0.6rem; }
.team-setup-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 0.6rem;
  align-items: end;
  padding-left: 0.65rem;
  border-left: 3px solid var(--team-color, #8b7cff);
}
.team-setup-row label { display: grid; gap: 0.25rem; font-size: 0.8rem; }
.team-setup-row span { opacity: 0.7; letter-spacing: 0.02em; }
.team-setup-row input,
.team-setup-row select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 8, 24, 0.75);
  color: inherit;
  font: inherit;
}
@media (max-width: 760px) {
  .team-setup-row { grid-template-columns: 1fr; }
}

/* Non-disruptive AI context status shown beside the reveal controls. */
.ai-status {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: rgba(226, 232, 255, 0.72);
}
.ai-status[data-state="applied"] { color: #f4c869; }
.ai-status[data-state="pending"] { opacity: 0.8; }


/* AI-written judge presentation (falls back to local templates field by field). */
.judge-teaser,
.judge-verdict {
  margin: 0.4rem 0 0.6rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(236, 240, 255, 0.9);
}
.judge-verdict { margin: 0.7rem 0 0; font-style: italic; }
.judge-teaser.is-ai,
.spotlight-teaser.is-ai,
.judge-verdict.is-ai { border-left: 2px solid rgba(240, 199, 94, 0.75); padding-left: 0.6rem; }
.selection-evidence {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: rgba(214, 221, 245, 0.62);
}

/* ---------------------------------------------------------------- */
/* Dedicated dramatic-reveal transition. While the jury deliberates  */
/* nothing else may render: no judge grid, no scoreboard, no setup.  */

body.is-deliberating .draft-lab,
body.is-deliberating .control-room,
body.is-deliberating .draft-board,
body.is-deliberating .lineup-stage,
body.is-deliberating .score-comparison,
body.is-deliberating .jury-section,
body.is-deliberating .judge-spotlight,
body.is-deliberating .verdict {
  display: none !important;
}

.jury-deliberating {
  min-height: min(78vh, 720px);
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 4rem) 1.25rem;
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(124, 92, 255, 0.28), transparent 62%),
    linear-gradient(180deg, rgba(11, 14, 34, 0.96), rgba(8, 10, 26, 0.99));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 90px rgba(3, 5, 18, 0.55);
}

.jury-deliberating[hidden] { display: none; }

.deliberating-inner {
  width: min(560px, 100%);
  text-align: center;
  display: grid;
  gap: 1.1rem;
  justify-items: center;
}

.deliberating-inner h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  letter-spacing: -0.02em;
}

.deliberating-teams {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.deliberating-team {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #f5f6ff;
  border: 1px solid color-mix(in oklab, var(--team-accent) 60%, transparent);
  background: color-mix(in oklab, var(--team-accent) 22%, transparent);
}

.deliberating-card {
  width: 118px;
  height: 152px;
  animation: deliberating-float 2.6s ease-in-out infinite;
}

@keyframes deliberating-float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

.deliberating-progress {
  width: min(340px, 90%);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.deliberating-progress span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c5cff, #f5c86b);
  animation: deliberating-sweep 1.5s ease-in-out infinite;
}

@keyframes deliberating-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

.deliberating-status {
  margin: 0;
  max-width: 44ch;
  color: rgba(230, 233, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  .deliberating-card,
  .deliberating-progress span { animation: none; }
}

.hero h1 .brand-sub {
  color: var(--gold, #f5c86b);
  font-weight: 700;
}
