/* ==========================================================================
   Scene furniture: lobby, armed, final.
   Namespaced away from broadcast.css so nothing fights over specificity.
   ========================================================================== */

/* --- Crest -------------------------------------------------------------- */

/* Sized so the whole lobby (crest, headline, roster, standby line) clears a
   1440x900 stage without scrolling. Nobody scrolls a television. */
.crest-hero {
  width: clamp(7rem, 14vw, 11rem);
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.65));
  animation: crest-settle 1200ms var(--ease-slam) both;
}
.crest-hero svg { width: 100%; height: auto; display: block; }

@keyframes crest-settle {
  0%   { transform: scale(1.6) translateY(-40px); opacity: 0; filter: blur(14px); }
  100% { transform: scale(1) translateY(0); opacity: 1; filter: blur(0); }
}

/* --- Roster strip -------------------------------------------------------- */

.roster-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 52rem;
}

.roster-chip {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--chalk-line);
  border-radius: 999px;
  background: rgba(16, 38, 22, 0.7);
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk-soft);
  animation: chip-in 420ms var(--ease-out) both;
}
.roster-chip.is-empty {
  border-style: dashed;
  color: var(--chalk-faint);
  text-transform: none;
  font-family: var(--body);
  letter-spacing: 0;
}

@keyframes chip-in {
  0% { opacity: 0; transform: translateY(10px) scale(0.9); }
  100% { opacity: 1; transform: none; }
}

/* --- The seal (commitment) ---------------------------------------------- */

.seal {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  padding: 1.1rem 1.5rem;
  max-width: 46rem;
  border: 1px solid var(--gold-deep);
  background: rgba(233, 179, 65, 0.06);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.seal__label {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  text-indent: 0.28em;
}

.seal__value {
  font-family: var(--mono);
  font-size: clamp(0.6rem, 1.5vw, 0.82rem);
  color: var(--chalk);
  word-break: break-all;
  line-height: 1.5;
  max-width: 42rem;
  text-align: center;
}

.seal__note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--chalk-dim);
  max-width: 44ch;
  text-align: center;
  text-wrap: pretty;
}

/* --- Lucky charms -------------------------------------------------------- */

.charm-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 52rem;
}

.charm {
  padding: 0.25rem 0.7rem;
  border: 1px dashed var(--chalk-line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--chalk-dim);
  animation: chip-in 420ms var(--ease-out) both;
}
.charm strong {
  color: var(--gold);
  font-weight: 600;
  margin-right: 0.35rem;
}

/* --- Final board --------------------------------------------------------- */

/* The final scene carries a headline, the whole board and the verification
   block at once, so its headline steps down to leave the board room. */
.scene[data-scene="final"] { gap: 0.9rem; padding: 1rem 0 2rem; }
.scene[data-scene="final"] .scene__headline {
  font-size: clamp(1.7rem, 4.2vw, 3.3rem);
  line-height: 0.95;
}

.winner-name {
  color: var(--gold-bright);
  text-shadow: 0 0 60px rgba(255, 217, 128, 0.7);
}

.final-board {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.4rem;
  width: 100%;
  max-width: 56rem;
}

.final-slot {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.8rem;
  background: rgba(16, 38, 22, 0.72);
  border-left: 3px solid var(--chalk-line);
  animation: chip-in 500ms var(--ease-out) both;
}

.final-slot__pick {
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  text-align: right;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.final-slot__name {
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--chalk);
  overflow-wrap: anywhere;
  text-align: left;
}

.final-slot[data-first="true"] {
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(233, 179, 65, 0.22), rgba(16, 38, 22, 0.72));
}
.final-slot[data-first="true"] .final-slot__name { color: var(--gold-bright); }

/* --- Verification block --------------------------------------------------- */

.verify-block {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.3rem;
  max-width: 52rem;
  width: 100%;
  border: 1px solid var(--chalk-line);
  background: rgba(5, 13, 8, 0.6);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

.verify-block__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
}

.verify-block__title {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--go);
}

.verify-block__note {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--chalk-dim);
  text-wrap: pretty;
}
.verify-block__note code {
  font-family: var(--mono);
  font-size: 0.82em;
  color: var(--gold);
  background: rgba(233, 179, 65, 0.1);
  padding: 0.1em 0.4em;
}

.verify-block__seed {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--chalk-faint);
  word-break: break-all;
  line-height: 1.5;
  text-align: left;
}

@media (max-width: 900px) {
  .final-board { grid-template-columns: 1fr 1fr; }
  .crest-hero { width: clamp(7rem, 34vw, 10rem); }
}

@media (max-width: 520px) {
  .final-board { grid-template-columns: 1fr; }
}

/* --- Practice-field link and lock ---------------------------------------- */

.lobby-try {
  margin: 0;
  font-size: 0.88rem;
  color: var(--chalk-faint);
  text-wrap: pretty;
}
.lobby-try a {
  color: var(--gold);
  text-underline-offset: 3px;
}

.demo-lock {
  width: 100%;
  max-width: 34rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--signal);
  background: rgba(255, 59, 78, 0.1);
  font-size: 0.9rem;
  color: var(--chalk-soft);
  text-align: left;
  text-wrap: pretty;
}
.demo-lock[hidden] { display: none; }
.demo-lock strong { color: var(--signal); display: block; margin-bottom: 0.2rem; }
.demo-lock a { color: var(--gold); }

/* --- Phone: keep the lobby's call to action above the fold ---------------- */

@media (max-width: 620px) {
  /* The crest is already in the top bar; a second large one costs the whole
     reason the page exists (the practice-draft link) its place on screen. */
  .crest-hero { width: clamp(5rem, 22vw, 7rem); }

  .roster-chip { font-size: 0.88rem; padding: 0.26rem 0.62rem; }
  .roster-strip { gap: 0.35rem; }

  /* The top bar chip already says STANDBY. On a phone this duplicate line is
     what pushes the practice-draft link, the one thing we want tapped, below
     the fold. It stays on larger screens where there is room for both. */
  .scene[data-scene="lobby"] .press-start { display: none; }
  .press-start { font-size: 0.82rem; letter-spacing: 0.22em; text-indent: 0.22em; }
  .lobby-try { font-size: 0.85rem; }

  .seal { padding: 0.8rem 0.9rem; }
  .seal__value { font-size: 0.58rem; }
  .seal__note { font-size: 0.78rem; }

  .final-slot { padding: 0.38rem 0.6rem; grid-template-columns: 2rem 1fr; }
  .final-slot__pick { font-size: 1.25rem; }
  .final-slot__name { font-size: 1.05rem; }
  .verify-block { padding: 0.8rem 0.9rem; }
  .verify-block__seed { font-size: 0.58rem; }
  .verify-block__note { font-size: 0.78rem; }
}

/* --- Claimed spots, shown on the lobby and the board ---------------------- */

.roster-chip[data-claimed="true"] {
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, rgba(233, 179, 65, 0.16), rgba(16, 38, 22, 0.7));
  color: var(--chalk);
}
.roster-chip__team {
  display: block;
  margin-top: 0.05rem;
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
}

.board-slot__team {
  display: block;
  margin-top: 0.05rem;
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  opacity: 0.85;
}

.claim-tally {
  margin: 0;
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--go);
}
.claim-tally[hidden] { display: none; }

/* --- Team names on the final board and the winner headline ---------------- */

.final-slot__team {
  display: block;
  margin-top: 0.1rem;
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold);
  opacity: 0.9;
}

.winner-team {
  display: block;
  font-family: var(--display);
  font-size: 0.5em;
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--chalk-soft);
  opacity: 0.85;
}
.winner-team[hidden] { display: none; }
