/*
 * The big screen. One 16:9 stage, 100rem wide and 56.25rem tall, scaled as a
 * whole: 1rem is one hundredth of the stage width, so the layout is the same
 * on a 720p TV, a laptop and a 4K screen. Left rail: Aga and the players.
 * Right: the board. Nothing ever overlaps the answers.
 */

html {
  font-size: min(1vw, 1.7778vh);
  height: 100%;
  overflow: hidden;
}

body.tv {
  height: 100%;
  overflow: hidden;
  font-size: 1.6rem;
  cursor: default;
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100rem;
  height: 56.25rem;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: 25rem 1fr;
  gap: 1.6rem;
  padding: 1.5rem 1.8rem;
}

/* ------------------------------------------------------------------ rail */

.rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rail__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.2rem;
}

.rail__brand {
  font-size: 2.7rem;
}

.rail__code {
  padding: 0.25rem 0.8rem;
  border-radius: 0.8rem;
  background: var(--ink-3);
  color: var(--cream);
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
}

.rail__code::before {
  content: "kod ";
  font-family: var(--text);
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--mist);
}

.rail__host {
  position: relative;
  height: 14.6rem;
  margin-top: 0.5rem;
}

.rail__disc {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 15rem;
  height: 15rem;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--ink-3);
  box-shadow: inset 0 0 0 0.35rem var(--honey), 0 0 0 0.9rem rgba(255, 200, 61, 0.1);
  clip-path: inset(0 0 0.1rem 0 round 50% 50% 46% 46%);
}

.rail__aga {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 13.4rem;
  height: 15.5rem;
  transform: translateX(-50%);
  clip-path: inset(-20% -20% 0 -20%);
}

.bubble {
  position: relative;
  height: 6.7rem;
  margin-top: 0.9rem;
  padding: 0.7rem 1rem;
  border-radius: 1.1rem;
  background: var(--cream);
  color: var(--ink);
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-0.4rem) scale(0.97);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bubble[data-on="true"] {
  opacity: 1;
  transform: none;
}

.bubble::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.75rem;
  width: 1.5rem;
  height: 1.5rem;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0.25rem;
  background: var(--cream);
}

.bubble p {
  position: relative;
  width: 100%;
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bubble p[data-size="long"] {
  font-size: 1.14rem;
}

.bubble p[data-size="short"] {
  font-size: 1.6rem;
}

.seats {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  flex: 1;
  min-height: 0;
}

.seat {
  --tone: var(--ink-4);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.82rem;
  padding: 0 0.7rem 0 0.35rem;
  border-radius: 0.9rem;
  background: var(--ink-2);
  box-shadow: inset 0.3rem 0 0 var(--tone);
}

.seat--empty {
  background: transparent;
  box-shadow: inset 0 0 0 0.12rem var(--ink-3);
  color: #6f7ab0;
  font-size: 1.1rem;
  padding-left: 1rem;
}

.seat--new {
  animation: pop-in 0.35s ease-out;
}

.seat--off {
  opacity: 0.45;
}

.seat .avatar {
  width: 2.35rem;
  height: 2.35rem;
  margin-left: 0.35rem;
}

.seat__nick {
  flex: 1;
  min-width: 0;
  font-size: 1.4rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat__tag {
  flex: none;
  padding: 0.1rem 0.5rem;
  border-radius: 0.5rem;
  background: var(--ink-4);
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 600;
}

.seat__score {
  flex: none;
  font-family: var(--display);
  font-size: 1.5rem;
  min-width: 3.2rem;
  text-align: right;
}

.seat__delta {
  flex: none;
  padding: 0.05rem 0.5rem;
  border-radius: 0.6rem;
  background: var(--good);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.2rem;
  animation: pop-in 0.3s ease-out;
}

.seat__delta[data-sign="minus"] {
  background: var(--coral);
}

/* status light: has the player acted in this phase? */
.seat__st {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.seat__st[data-st="wait"] {
  box-shadow: inset 0 0 0 0.2rem var(--ink-4);
  animation: st-wait 1.1s ease-in-out infinite;
}

.seat__st[data-st="done"],
.seat__st[data-st="pick"] {
  background: var(--good);
}

.seat__st[data-st="pick"] {
  background: var(--honey);
  animation: st-wait 0.9s ease-in-out infinite;
}

.seat__st svg {
  width: 1rem;
  height: 1rem;
}

@keyframes st-wait {
  50% {
    transform: scale(0.72);
    opacity: 0.6;
  }
}

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

.board {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.2rem;
}

.head__round {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--mist);
  white-space: nowrap;
}

.head__round b {
  padding: 0.2rem 0.9rem;
  border-radius: 0.8rem;
  background: var(--honey);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.45rem;
}

.head__round .cat {
  padding: 0.2rem 0.9rem;
  border-radius: 0.8rem;
  background: var(--ink-3);
  color: var(--cream);
  overflow: hidden;
  text-overflow: ellipsis;
}

.head__right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: none;
}

.head__count {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--mist);
}

.head__clock {
  min-width: 3.4rem;
  padding: 0.05rem 0.6rem;
  border-radius: 0.8rem;
  background: var(--ink-3);
  font-size: 1.9rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.head__clock[data-low="true"] {
  background: var(--coral);
  color: var(--ink);
}

.tool {
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 0.45rem;
  height: 2.7rem;
  min-width: 2.7rem;
  padding: 0 0.6rem;
  border-radius: 0.8rem;
  color: var(--mist);
  background: var(--ink-2);
  font-size: 1.15rem;
  font-weight: 600;
}

.tool svg {
  width: 1.55rem;
  height: 1.55rem;
}

.tool[data-attention="true"] {
  background: var(--honey);
  color: var(--ink);
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  50% {
    transform: scale(1.06);
  }
}

.timer {
  height: 0.8rem;
  margin-top: 0.7rem;
  border-radius: 0.4rem;
  background: var(--ink-3);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.timer[data-on="true"] {
  opacity: 1;
}

.timer i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 0.4rem;
  background: var(--honey);
  transform-origin: left center;
}

.timer[data-low="true"] i {
  background: var(--coral);
}

.view {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
}

.view > .screen {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  animation: rise-in 0.35s ease-out;
}

.kicker {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

.hint {
  font-size: 1.5rem;
  color: var(--mist);
}

.center {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.4rem;
}

/* --------------------------------------------------------- boot and login */

.boot {
  font-size: 1.8rem;
  color: var(--mist);
}

.boot .spinner {
  font-size: 2.4rem;
}

.login {
  display: grid;
  grid-template-columns: 1fr 24rem;
  gap: 3rem;
  align-items: center;
  flex: 1;
}

.login h1 {
  font-size: 4.2rem;
  color: var(--honey);
}

.login ol {
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.85rem;
}

.login li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  align-items: baseline;
}

.login li::before {
  content: counter(step);
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-3);
  font-family: var(--display);
  font-size: 1.5rem;
  transform: translateY(0.2rem);
}

.login__code {
  margin-top: 1.8rem;
  font-size: 5.4rem;
  letter-spacing: 0.1em;
  color: var(--cream);
}

.qr {
  aspect-ratio: 1;
  padding: 1.3rem;
  border-radius: 1.6rem;
  background: #fff;
  box-shadow: 0 0.6rem 0 rgba(0, 0, 0, 0.35);
}

.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr--missing {
  display: none;
}

/* ------------------------------------------------------------------ lobby */

.view > .screen.lobby {
  display: grid;
  grid-template-columns: 21rem 1fr;
  gap: 3.2rem;
  align-items: center;
}

.lobby__qr {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
}

.lobby__main {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.lobby h1 {
  font-size: 4.6rem;
  color: var(--honey);
}

.lobby__how {
  font-size: 1.9rem;
}

.lobby__how b {
  color: var(--honey);
  font-weight: 700;
}

.code {
  display: flex;
  gap: 0.8rem;
}

.code span {
  width: 6.4rem;
  height: 7.4rem;
  display: grid;
  place-items: center;
  border-radius: 1.2rem;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--display);
  font-size: 5.2rem;
  box-shadow: 0 0.5rem 0 #c9bd9c;
}

.lobby__setup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 1.3rem;
}

.lobby__setup .chip {
  min-height: 2.3rem;
  font-size: 1.25rem;
}

.chip--wait {
  color: var(--mist);
}

.chip--ready {
  background: var(--good);
  color: var(--ink);
}

.chip--failed {
  background: transparent;
  box-shadow: inset 0 0 0 0.12rem var(--ink-4);
  color: #8a94c2;
  text-decoration: line-through;
}

.lobby__go {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 0.4rem;
}

.lobby__go .btn {
  font-size: 2rem;
  min-height: 4.6rem;
  padding: 0 2.2rem;
  --edge: 0.5rem;
}

/* ------------------------------------------------------- intro and rounds */

.intro__brand {
  font-size: 11rem;
  animation: pop-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.parade {
  display: flex;
  gap: 1.4rem;
  justify-content: center;
}

.parade > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 1.5rem;
  font-weight: 600;
  animation: pop-in 0.4s ease-out backwards;
}

.parade > div {
  width: 7.4rem;
}

.parade span:last-child {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parade .avatar {
  width: 6rem;
  height: 6rem;
}

.round h1 {
  font-size: 8.4rem;
  color: var(--honey);
  text-shadow: 0 0.5rem 0 var(--honey-deep);
  animation: pop-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.round h1[data-size="m"] {
  font-size: 7rem;
}

.round h1[data-size="s"] {
  font-size: 5.6rem;
}

.round__blurb {
  font-size: 2.2rem;
  max-width: 52rem;
}

.rules {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-align: left;
}

.rules li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.4rem 0.7rem 0.8rem;
  border-radius: 1.1rem;
  background: var(--ink-2);
  font-size: 1.8rem;
  font-weight: 500;
  animation: rise-in 0.4s ease-out backwards;
}

.rules li::before {
  content: "";
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--coral);
}

.dots {
  display: flex;
  gap: 0.6rem;
}

.dots i {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--ink-4);
}

.dots i[data-on="true"] {
  background: var(--honey);
}

/* --------------------------------------------------- category and wagers */

.who {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 2.6rem;
}

.who .avatar {
  width: 4rem;
  height: 4rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  width: 100%;
}

.pick {
  --face: var(--a);
  --rim: var(--a-deep);
  min-height: 13rem;
  padding: 1.4rem;
  border-radius: 1.6rem;
  background: var(--face);
  color: var(--ink);
  box-shadow: 0 0.6rem 0 var(--rim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  font-family: var(--display);
  font-size: 2.7rem;
  line-height: 1.1;
  animation: pop-in 0.4s ease-out backwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pick:nth-child(2) {
  --face: var(--b);
  --rim: var(--b-deep);
  animation-delay: 0.08s;
}

.pick:nth-child(3) {
  --face: var(--c);
  --rim: var(--c-deep);
  animation-delay: 0.16s;
}

.pick small {
  font-family: var(--text);
  font-size: 1.35rem;
  font-weight: 600;
}

.cards[data-picked="true"] .pick {
  opacity: 0.3;
}

.cards[data-picked="true"] .pick[data-chosen="true"] {
  opacity: 1;
  transform: scale(1.06);
}

.stake b {
  font-size: 3rem;
}

.stake small {
  font-size: 1.6rem;
}

.level {
  display: inline-flex;
  gap: 0.35rem;
  vertical-align: middle;
}

.level i {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--ink-4);
}

.level i[data-on="true"] {
  background: var(--coral);
}

/* --------------------------------------------------------------- question */

.q {
  gap: 1.2rem;
}

.q__text {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  font-family: var(--display);
  font-size: 4rem;
  line-height: 1.12;
  text-wrap: balance;
}

.q__text[data-size="m"] {
  font-size: 3.4rem;
}

.q__text[data-size="s"] {
  font-size: 2.9rem;
}

.q__value {
  align-self: flex-start;
  padding: 0.2rem 1rem;
  border-radius: 0.8rem;
  background: var(--coral);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.7rem;
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.3rem;
}

.tiles[data-cols="1"] {
  grid-template-columns: 1fr;
}

.tile {
  --face: var(--a);
  --rim: var(--a-deep);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-height: 8.2rem;
  padding: 0.8rem 1.3rem 0.8rem 1rem;
  border-radius: 1.4rem;
  background: var(--face);
  color: var(--ink);
  box-shadow: 0 0.55rem 0 var(--rim);
  animation: pop-in 0.35s ease-out backwards;
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.tile[data-tone="1"] {
  --face: var(--b);
  --rim: var(--b-deep);
}

.tile[data-tone="2"] {
  --face: var(--c);
  --rim: var(--c-deep);
}

.tile[data-tone="3"] {
  --face: var(--d);
  --rim: var(--d-deep);
}

.tile[data-tone="good"] {
  --face: var(--good);
  --rim: var(--good-deep);
}

.tile[data-tone="coral"] {
  --face: var(--coral);
  --rim: var(--coral-deep);
}

.tiles--compact .tile {
  min-height: 5.3rem;
}

.tile__key {
  flex: none;
  width: 3.6rem;
  height: 3.6rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--ink);
  color: var(--face);
  font-family: var(--display);
  font-size: 2.2rem;
}

.tiles--compact .tile__key {
  width: 2.9rem;
  height: 2.9rem;
  font-size: 1.8rem;
}

.tile__text {
  flex: 1;
  min-width: 0;
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.tile__text[data-size="s"] {
  font-size: 1.85rem;
}

.tiles--compact .tile__text {
  font-size: 1.8rem;
}

.tile__who {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem;
  max-width: 11rem;
}

.tile__who .avatar {
  width: 2.5rem;
  height: 2.5rem;
  animation: pop-in 0.3s ease-out backwards;
}

.tile__note {
  flex: none;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* After the reveal the right answer stays fully visible; the others step back. */
.tiles[data-revealed="true"] .tile {
  animation: none;
  opacity: 0.34;
  box-shadow: 0 0.2rem 0 var(--rim);
}

.tiles[data-revealed="true"] .tile[data-correct="true"] {
  opacity: 1;
  transform: scale(1.025);
  box-shadow: 0 0.55rem 0 var(--rim), 0 0 0 0.45rem var(--cream);
}

.tile[data-correct="true"] .tile__key {
  background: var(--cream);
  color: var(--ink);
}

.prompt {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 9rem;
  padding: 1.2rem 1.8rem;
  border-radius: 1.4rem;
  background: var(--ink-2);
  font-size: 2.2rem;
  font-weight: 600;
}

.prompt svg {
  flex: none;
  width: 4.4rem;
  height: 4.4rem;
  color: var(--honey);
}

.prompt small {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--mist);
}

.fact {
  flex: none;
  padding: 0.75rem 1.2rem;
  border-radius: 1.1rem;
  background: var(--ink-2);
  font-size: 1.5rem;
  line-height: 1.3;
  animation: rise-in 0.5s ease-out 0.5s backwards;
}

.fact b {
  color: var(--honey);
  font-weight: 700;
}

/* closest-number reveal */
.answer {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 1.6rem;
  color: var(--mist);
}

.answer b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 5.4rem;
  color: var(--honey);
  animation: pop-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.guesses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 1.2rem;
}

.guess {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.6rem;
  padding: 0.3rem 1rem 0.3rem 0.5rem;
  border-radius: 1rem;
  background: var(--ink-2);
  font-size: 1.6rem;
  font-weight: 600;
  animation: rise-in 0.35s ease-out backwards;
}

.guess[data-best="true"] {
  background: var(--good);
  color: var(--ink);
}

.guess .avatar {
  width: 2.8rem;
  height: 2.8rem;
}

.guess__nick {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guess small {
  min-width: 3.4rem;
  text-align: right;
  font-size: 1.25rem;
  font-weight: 700;
}

.guess b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.9rem;
}

/* ------------------------------------------------- standings and the end */

.table {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
  justify-content: center;
}

.table h1 {
  font-size: 3.4rem;
  color: var(--honey);
  margin-bottom: 0.6rem;
}

.rank {
  --tone: var(--p0);
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 4.1rem;
  padding: 0 1.2rem 0 0.6rem;
  border-radius: 1.1rem;
  background: var(--ink-2);
  overflow: hidden;
  animation: rise-in 0.4s ease-out backwards;
}

.rank__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--tone);
  opacity: 0.2;
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rank > :not(.rank__bar) {
  position: relative;
}

.rank__place {
  flex: none;
  width: 3rem;
  font-family: var(--display);
  font-size: 2.2rem;
  text-align: center;
}

.rank .avatar {
  width: 3.2rem;
  height: 3.2rem;
}

.rank__nick {
  flex: 1;
  min-width: 0;
  font-size: 2rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank__move {
  flex: none;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--mist);
}

.rank__move[data-dir="up"] {
  color: var(--good);
}

.rank__move[data-dir="down"] {
  color: var(--coral);
}

.rank__score {
  flex: none;
  min-width: 6rem;
  text-align: right;
  font-family: var(--display);
  font-size: 2.4rem;
  font-variant-numeric: tabular-nums;
}

.rank--hidden {
  background: transparent;
  box-shadow: inset 0 0 0 0.14rem var(--ink-3);
  color: #6f7ab0;
  animation: none;
}

.rank--top {
  background: var(--ink-3);
  box-shadow: inset 0 0 0 0.2rem var(--honey);
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: end;
  height: 25rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  animation: rise-in 0.6s ease-out backwards;
}

.step .avatar {
  width: 7rem;
  height: 7rem;
}

.step[data-place="1"] .avatar {
  width: 9rem;
  height: 9rem;
}

.step__nick {
  max-width: 100%;
  font-size: 2rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step__block {
  width: 100%;
  border-radius: 1.4rem 1.4rem 0 0;
  background: var(--ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 0.6rem;
  font-family: var(--display);
}

.step__block b {
  font-weight: 400;
  font-size: 3.6rem;
  line-height: 1;
}

.step__block span {
  font-size: 1.7rem;
  color: var(--mist);
}

.step[data-place="1"] .step__block {
  height: 10.5rem;
  background: var(--honey);
  color: var(--ink);
}

.step[data-place="1"] .step__block span {
  color: var(--ink);
}

.step[data-place="2"] .step__block {
  height: 7.4rem;
}

.step[data-place="3"] .step__block {
  height: 5.2rem;
}

.end__row {
  display: flex;
  gap: 1rem;
  margin-top: 1.1rem;
}

.award {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 1rem;
  border-radius: 1.1rem;
  background: var(--ink-2);
  font-size: 1.25rem;
  color: var(--mist);
  animation: rise-in 0.5s ease-out backwards;
}

.award b {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--coral);
}

.award strong {
  color: var(--cream);
  font-size: 1.45rem;
}

.end__rest {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 0.9rem;
  font-size: 1.45rem;
  color: var(--mist);
}

.end__rest b {
  color: var(--cream);
}

.end__go {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: auto;
}

.end__go .btn {
  font-size: 1.7rem;
  min-height: 3.8rem;
  padding: 0 1.8rem;
}

/* ---------------------------------------------------------------- overlays */

.confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  background: rgba(12, 18, 48, 0.9);
  text-align: center;
  animation: pop-in 0.2s ease-out;
}

.veil h1 {
  font-size: 7rem;
  color: var(--honey);
}

.veil p {
  max-width: 50rem;
  font-size: 2rem;
}

.veil .btn {
  font-size: 1.8rem;
  min-height: 4rem;
  padding: 0 2rem;
}

/* ------------------------------------------------- presenter: a character */

/* Before the first snapshot nobody is on screen; then Aga or a character's camera. */
body:not([data-host]) .rail__disc,
body:not([data-host]) .rail__aga,
body[data-host="cast"] .rail__disc,
body[data-host="cast"] .rail__aga {
  visibility: hidden;
}

.cam {
  display: none;
  position: absolute;
  inset: 0;
  margin: 0;
}

body[data-host="cast"] .cam {
  display: block;
}

.cam--new .cam__screen {
  animation: pop-in 0.45s ease-out;
}

.cam__screen {
  position: absolute;
  left: 50%;
  top: 0;
  width: 19.5rem;
  height: 14.6rem;
  transform: translateX(-50%);
  border: 0.3rem solid var(--honey);
  border-radius: 1.6rem;
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: 0 0 0 0.9rem rgba(255, 200, 61, 0.1);
  transition: opacity 0.3s ease;
}

.cam__img,
.cam__video,
.onair__cam img,
.onair__cam canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.cam__img {
  object-fit: cover;
  object-position: 50% 30%;
}

.cam__video,
.onair__cam canvas {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cam__video[data-live="true"],
.onair__cam canvas[data-live="true"] {
  opacity: 1;
}

/* the little "on air" sign, while the video runs */
.live {
  position: absolute;
  top: 0.6rem;
  left: 0.7rem;
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.55rem;
  border-radius: 0.5rem;
  background: var(--coral);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--ink);
  animation: st-wait 1.4s ease-in-out infinite;
}

canvas[data-live="true"] + .live {
  display: inline-flex;
}

/* name plate, a lower third over the bottom edge of the camera */
.cam__plate {
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: -0.5rem;
  display: flex;
  flex-direction: column;
  padding: 0.3rem 0.9rem 0.35rem 1.1rem;
  border-radius: 0.8rem;
  background: var(--ink);
  box-shadow: inset 0.4rem 0 0 var(--honey), 0 0.3rem 0 rgba(0, 0, 0, 0.35);
  line-height: 1.12;
}

.cam__plate b,
.cam__plate span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cam__plate b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--cream);
}

.cam__plate span {
  font-size: 1rem;
  color: var(--mist);
}

/* during the entrance the presenter is on the board; the rail keeps a still */
body[data-onstage="true"] .cam__screen {
  opacity: 0.45;
}

/* --------------------------------------------- the entrance of a character */

.view > .screen.onair {
  display: grid;
  grid-template-columns: 31rem minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.onair__cam {
  position: relative;
  height: 100%;
  border: 0.45rem solid var(--honey);
  border-radius: 2rem;
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: 0 0.7rem 0 rgba(0, 0, 0, 0.35);
  animation: pop-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.onair__cam img {
  object-fit: cover;
  object-position: 50% 35%;
}

.onair__cam .live {
  top: 1rem;
  left: 1rem;
  font-size: 1.1rem;
}

.onair__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.onair__brand {
  font-size: 4.4rem;
  margin-bottom: 1rem;
  animation: pop-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 0.2s backwards;
}

.onair__name {
  font-size: 5rem;
  line-height: 1.02;
  color: var(--honey);
  overflow-wrap: anywhere;
  animation: rise-in 0.5s ease-out 0.35s backwards;
}

.onair__name[data-size="m"] {
  font-size: 4.4rem;
}

.onair__name[data-size="s"] {
  font-size: 3.8rem;
}

.onair__role {
  font-size: 2.1rem;
  font-weight: 600;
  animation: rise-in 0.5s ease-out 0.5s backwards;
}

.onair__with {
  margin-top: 1.2rem;
  font-size: 1.5rem;
  color: var(--mist);
}

.onair .parade {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.9rem;
}

.onair .parade > div {
  width: 6.2rem;
  font-size: 1.25rem;
}

.onair .parade .avatar {
  width: 4.8rem;
  height: 4.8rem;
}

/* ------------------------------------------------- the lobby: who presents */

.lobby__host {
  display: flex;
  align-items: center;
  gap: 1rem;
  align-self: flex-start;
  max-width: 100%;
  min-height: 4rem;
  padding: 0.5rem 1.3rem 0.5rem 0.5rem;
  border-radius: 1.2rem;
  background: var(--ink-2);
}

.lobby__host[data-presenter="aga"] {
  padding-left: 1.3rem;
}

.lobby__host.is-new {
  animation: pop-in 0.45s ease-out;
}

.lobby__host-img {
  flex: none;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 0.9rem;
  object-fit: cover;
  box-shadow: 0 0 0 0.2rem var(--honey);
}

.lobby__host-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.lobby__host-text small {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.lobby__host-text b {
  font-family: var(--display);
  font-weight: 400;
  font-size: 2rem;
  color: var(--cream);
}

.lobby__host-text span {
  font-size: 1.3rem;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------ a guest speaks */

.bubble[data-kind="guest"] {
  gap: 0.8rem;
  padding: 0.5rem 1rem 0.5rem 0.7rem;
  background: var(--ink-3);
  color: var(--cream);
  box-shadow: inset 0 0 0 0.22rem var(--tone, var(--honey));
}

.bubble[data-kind="guest"]::before {
  display: none;
}

.bubble .bubble__face {
  width: 4.4rem;
  height: 4.4rem;
}

.bubble__body {
  flex: 1;
  min-width: 0;
}

.bubble__who {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.15;
  color: var(--tone, var(--honey));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bubble[data-kind="guest"] p {
  font-size: 1.2rem;
  line-height: 1.2;
  -webkit-line-clamp: 3;
}

.bubble[data-kind="guest"] p[data-size="short"] {
  font-size: 1.38rem;
}

.bubble[data-kind="guest"] p[data-size="long"] {
  font-size: 1.08rem;
}

.seat--talk {
  background: var(--ink-3);
  box-shadow: inset 0.3rem 0 0 var(--tone), inset 0 0 0 0.16rem var(--tone);
}

.seat--talk .avatar {
  animation: seat-talk 0.55s ease-in-out infinite alternate;
}

@keyframes seat-talk {
  to {
    transform: scale(1.12);
  }
}

.award__who {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.15rem 0;
}

.award__who .avatar {
  width: 2.2rem;
  height: 2.2rem;
}

/* ---- the studio rendered by Unreal (web/tv/stream.js): a video exactly where the
   studio canvas is, under every caption. It stays transparent while it connects
   (the three.js studio shows through) and covers the screen once it plays. */

.ue {
  position: fixed;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

body[data-picture="ue"] .ue {
  opacity: 1;
  background: #05061a;
}

body[data-picture="ue"] .studio3d {
  visibility: hidden;
}

.ue__video {
  position: absolute;
  inset: 0;
}

.ue__video video {
  object-fit: cover;
  pointer-events: none !important;
}
