/* TV host. One fixed 1920×1080 stage; every px value below is a stage px. */

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #120d08;
  font-family: var(--font-body);
  color: var(--ink);
}

.stage {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 50% 30%,
    #d9b487 0%,
    var(--kraft) 45%,
    var(--kraft-dark) 100%
  );
  transform-origin: center;
}

.stage__canvas {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
}

.ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ui > * {
  pointer-events: auto;
}

/* ── paper tags ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px 10px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 0 var(--ink);
}

.tag--kraft {
  background: var(--kraft);
}
.tag--paper {
  background: var(--paper);
}
.tag--ink {
  background: var(--ink);
  color: var(--yellow);
}
.tag--red {
  background: var(--red);
  color: var(--paper);
}
.tag--yellow {
  background: var(--yellow);
}
.tag--blue {
  background: var(--blue);
  color: var(--paper);
}

.topbar {
  position: absolute;
  top: 26px;
  left: 40px;
  right: 40px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar[hidden],
.hud[hidden],
.hint[hidden] {
  display: none;
}

/* ── lobby ── */
.lobby {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 640px minmax(0, 1fr);
  gap: 50px;
  padding: 70px 80px;
}

.lobby__join {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  text-align: center;
  transform: rotate(-1.5deg);
}

.logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: 118px;
  line-height: 0.9;
  color: var(--red);
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--ink);
}

.logo span {
  color: var(--yellow);
}

.lobby__qr {
  width: 330px;
  height: 330px;
  margin: 26px 0 14px;
  border: 5px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  image-rendering: pixelated;
}

.lobby__url {
  font-size: 28px;
  font-weight: 800;
}

.lobby__code {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--blue);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
}

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

/* the lobby sits over the living-map video (D82): every control and the join prompt stand on
   solid paper plates — never bare text on moving art, never a see-through disabled button */
.lobby__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px 18px 20px;
  border: 5px solid var(--ink);
  border-radius: 22px;
  background: var(--cream);
  box-shadow: 0 8px 0 var(--kraft-dark), 0 8px 0 5px var(--ink);
}
.lobby__head > span {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.lobby__head .btn {
  white-space: nowrap;
}
.lobby__head > .presets {
  order: 3;
  flex-basis: 100%;
  flex-wrap: wrap; /* nowrap pushed the start button off the 1920 stage once v3/news/venue joined the row */
}
.lobby__head .lobby__venue {
  width: 180px;
}
.lobby__head .btn:not(.btn--ghost) {
  padding: 10px 30px 14px;
  font-size: 34px;
}
.lobby__head .btn[disabled] {
  filter: none;
  opacity: 1;
  background: var(--kraft);
  color: var(--kraft-deep);
  box-shadow: 0 6px 0 var(--kraft-dark), 0 6px 0 5px var(--ink);
}

.lobby__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), 1fr);
  gap: 18px;
  align-content: start;
}

.teamcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px 10px 10px;
  border: 4px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow:
    0 7px 0 var(--team, var(--kraft-dark)),
    0 7px 0 4px var(--ink);
  animation: pop 420ms var(--ease-out) both;
}

.teamcard img {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.teamcard b {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teamcard small {
  font-size: 20px;
  font-weight: 700;
  opacity: 0.7;
}

.teamcard.is-away {
  opacity: 0.45;
}

/* the join prompt: an ink plate low on the stage, clear of the map's centre */
.lobby__empty {
  justify-self: center;
  align-self: end;
  margin-top: 520px;
  padding: 14px 40px 20px;
  border: 5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: 54px;
  text-align: center;
  box-shadow: 0 8px 0 var(--kraft-deep);
  transform: rotate(-1deg);
}

.btn {
  padding: 16px 40px 20px;
  border: 5px solid var(--ink);
  border-radius: 22px;
  background: var(--green);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 40px;
  cursor: pointer;
  box-shadow:
    0 9px 0 var(--green-dark),
    0 9px 0 5px var(--ink);
  transition:
    transform 140ms var(--ease-out),
    box-shadow 140ms var(--ease-out);
}

.btn:active {
  transform: translateY(7px);
  box-shadow:
    0 2px 0 var(--green-dark),
    0 2px 0 5px var(--ink);
}

.btn--ghost {
  background: var(--paper);
  color: var(--ink);
  font-size: 26px;
  padding: 10px 22px 12px;
  box-shadow:
    0 6px 0 var(--kraft-dark),
    0 6px 0 5px var(--ink);
}

.btn[disabled] {
  filter: grayscale(1);
  opacity: 0.55;
  cursor: default;
}

/* ── centre cards: intro, fork, results ── */
.center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 120px 100px 190px;
}

.intro {
  width: 1100px;
  padding: 50px 70px 60px;
  text-align: center;
  transform: rotate(-1deg);
  animation: drop 520ms var(--ease-out) both;
}

.intro-stage {
  background: var(--kraft) center / cover no-repeat;
}
.intro-stage .intro {
  /* the title card's object lives in its left third; Tele owns the bottom-right corner */
  justify-self: start;
  width: 840px;
  margin-left: 440px;
}

/* D81: papercraft station icon (art/stations), never an emoji */
.intro__icon {
  display: block;
  width: 168px;
  height: 168px;
  margin: 0 auto;
  object-fit: contain;
}
.tag img,
.btn__icon {
  width: 1.3em;
  height: 1.3em;
  object-fit: contain;
  vertical-align: -0.3em;
}
.btn__icon {
  margin-right: 8px;
}

.intro h1 {
  margin: 10px 0 14px;
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 0.95;
  color: var(--red);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
}

.intro p {
  margin: 0 auto;
  max-width: 900px;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.25;
  text-wrap: balance;
}

.intro__tags {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.fork {
  width: 1640px;
  text-align: center;
}

.fork h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 110px;
  color: var(--paper);
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 8px 0 var(--ink);
}

.fork__who {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
  font-size: 34px;
}

/* the chosen route's banner takes the heading's place */
.fork.is-chosen h1 {
  visibility: hidden;
}

.fork__who img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.fork__routes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.route {
  overflow: hidden;
  padding: 0 0 26px;
  transition:
    transform 460ms var(--ease-out),
    opacity 300ms ease,
    filter 300ms ease;
  animation: drop 520ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 90ms);
}

.route:nth-child(1) {
  transform: rotate(-2deg);
}
.route:nth-child(2) {
  transform: rotate(1.5deg);
}

.route__art {
  height: 300px;
  border-bottom: 5px solid var(--ink);
  background-size: cover;
  background-position: center 70%;
}

.route h2 {
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-size: 64px;
}

.route p {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
}

.route.is-chosen {
  transform: scale(1.06) rotate(0deg);
}
.route.is-rejected {
  opacity: 0.35;
  filter: grayscale(0.8);
  transform: scale(0.94);
}

/* ── Rocket Rally ── */
.rally__card {
  position: absolute;
  top: 96px;
  left: 50%;
  width: 1560px;
  padding: 18px 36px 22px;
  transform: translateX(-50%);
  transform-origin: top center;
  transition:
    transform 520ms var(--ease-out),
    opacity 300ms ease;
}

.rally__card.is-away {
  transform: translateX(-50%) translateY(-130%);
  opacity: 0;
}

.rally__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 26px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--kraft-deep);
}

.rally__q {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 50px;
  line-height: 1.08;
  text-align: center;
  text-wrap: balance;
}

.rally__opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 18px 10px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  font-size: 36px;
  font-weight: 900;
  transition:
    transform 300ms var(--ease-out),
    opacity 300ms ease,
    background-color 200ms ease;
}

.opt i {
  display: grid;
  place-items: center;
  flex: 0 0 58px;
  height: 58px;
  border: 4px solid var(--ink);
  border-radius: 14px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 36px;
  font-style: normal;
}

.opt:nth-child(1) i {
  background: var(--red);
}
.opt:nth-child(2) i {
  background: var(--blue);
}
.opt:nth-child(3) i {
  background: var(--yellow);
  color: var(--ink);
}
.opt:nth-child(4) i {
  background: var(--green);
}

.opt.is-right {
  background: #cdeccf;
  transform: scale(1.04);
}

.opt.is-wrong {
  opacity: 0.35;
}

.timer {
  height: 16px;
  margin-top: 14px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}

.timer i {
  display: block;
  height: 100%;
  background: var(--red);
  transform-origin: left center;
  transition: transform 1000ms linear;
}

/* ── HUD: every team keeps its seat for the whole game ── */
.hud {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 22px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(var(--cols, 8), 1fr);
  gap: 8px 10px;
}

.seat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 12px 5px 4px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
  box-shadow:
    0 5px 0 var(--team, var(--kraft-dark)),
    0 5px 0 3px var(--ink);
  font-weight: 900;
  font-size: calc(28px * var(--hud-scale, 1)); /* names and points read from the back of the room */
  transition: transform 300ms var(--ease-out);
}

.seat img {
  width: calc(52px * var(--hud-scale, 1));
  height: calc(52px * var(--hud-scale, 1));
  object-fit: contain;
}

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

.seat b {
  font-family: var(--font-display);
  font-size: 1.2em;
  font-variant-numeric: tabular-nums;
}

.seat.is-ready {
  transform: translateY(-6px);
  background: #fff3c4;
}
.seat.is-up b {
  color: var(--green-dark);
}
/* ── the ribbon: > 8 teams, one strip of chips (§5.0) ── */
.hud--ribbon {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: 4px 10px;
  max-width: calc(var(--per-row, 40) * (var(--chip, 46px) + 10px));
  margin: 0 auto;
  left: 30px;
  right: 30px;
  bottom: 16px;
}
.chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--chip, 46px);
  transition: transform 300ms var(--ease-out);
}
.chip img {
  width: var(--chip, 46px);
  height: var(--chip, 46px);
  padding: 3px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--team, var(--paper));
  object-fit: contain;
}
.chip b {
  margin-top: -6px;
  min-width: 34px;
  padding: 0 4px;
  border: 3px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  font: 400 28px/1.05 var(--font-display);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.chip.is-ready img { border-width: 6px; }
.chip.is-ready { transform: translateY(-6px); }
.chip.is-up b { background: #cdeccf; }
.chip.is-right b { background: var(--green); color: var(--paper); }
.chip.is-wrong img { filter: grayscale(0.7); }
.chip.is-wrong b { background: var(--red); color: var(--paper); }
.chip.is-away { opacity: 0.4; }

.seat.is-away {
  opacity: 0.4;
}

/* ── results ── */
.podium {
  width: 1200px;
  padding: 40px 60px 50px;
  text-align: center;
  animation: drop 520ms var(--ease-out) both;
}

.podium h1 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: 84px;
  color: var(--blue);
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
}

.podium ol {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.podium li {
  display: grid;
  grid-template-columns: 70px 80px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 8px 24px 8px 12px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: var(--paper);
  font-size: 36px;
  font-weight: 900;
  text-align: left;
  animation: pop 420ms var(--ease-out) both;
  animation-delay: calc(var(--i) * 70ms + 200ms);
}

.podium li.is-top {
  background: #ffe9a8;
}
.podium li:has(small) {
  grid-template-columns: 70px 80px 1fr auto auto;
}
.podium li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.podium li small {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--ink);
  opacity: 0.6;
}
.podium__page {
  min-height: 1em;
  margin: 14px 0 0;
  font-size: 26px;
  font-weight: 900;
}
.podium__page:empty {
  display: none;
}
.podium__again {
  margin: 22px 0 0;
}
.podium li img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.podium li em {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 44px;
}
.podium li strong {
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--green-dark);
}

.winner img {
  width: 300px;
  height: 300px;
  object-fit: contain;
}

/* big rooms: two columns of six, paged — 40 teams, every one findable from the sofa */
.podium:has(ol[data-dense]) {
  width: 1700px;
  padding: 24px 40px 28px;
}
.podium:has(ol[data-dense]) h1 {
  margin-bottom: 14px;
  font-size: 60px;
}
.center:has(ol[data-dense]) {
  padding-bottom: 140px;
}
.center:has(.winner ol[data-dense]) {
  padding-bottom: 40px;
}
.winner:has(ol[data-dense]) > img {
  width: 120px;
  height: 120px;
}
.podium ol[data-dense] {
  grid-template-rows: repeat(6, auto);
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  gap: 10px 24px;
}
.podium ol[data-dense] li {
  padding: 4px 20px 4px 10px;
  font-size: 32px;
}
.podium ol[data-dense] li img {
  width: 56px;
  height: 56px;
}

/* ── banner + hint ── */
.banner {
  position: absolute;
  top: 300px; /* above the action band, below the question card's title line */
  left: 50%;
  z-index: 9;
  padding: 18px 60px 24px;
  border: 6px solid var(--ink);
  border-radius: 28px;
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 96px;
  white-space: nowrap;
  box-shadow:
    0 12px 0 var(--yellow-dark),
    0 12px 0 6px var(--ink);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9) rotate(-3deg);
  transition:
    opacity 220ms ease,
    transform 420ms var(--ease-out);
  pointer-events: none;
}

.banner.is-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(-3deg);
}
/* the convoy's beat banners sit in the lane board's empty top-right (x 1300–1890), off the question card and the claw */
.banner--board {
  top: 330px;
  left: 1595px;
  padding: 12px 36px 16px;
  font-size: 52px;
}

/* record banners live in the top bar's free middle-right, never over the question or answers */
.banner--record {
  top: 58px;
  left: 1400px;
  padding: 4px 28px 10px;
  border-width: 5px;
  font-size: 36px;
}

/* bottom-left: Tele owns the bottom-right corner (bible §3.3), the host cue must never sit under him */
.hint {
  position: absolute;
  left: 40px;
  bottom: 150px;
  z-index: 6;
  padding: 6px 18px 8px;
  border-radius: 999px;
  background: rgba(43, 33, 24, 0.78);
  color: var(--paper);
  font-size: 26px;
  font-weight: 800;
  /* F4: an operator aid, not stage furniture — it shows for the first seconds of a beat, then leaves the audience's frame */
  animation: hint-away 400ms 6s forwards;
}
@keyframes hint-away {
  to {
    opacity: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(14px);
  }
}

@keyframes drop {
  from {
    opacity: 0;
    translate: 0 -60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teamcard,
  .intro,
  .route,
  .podium,
  .podium li {
    animation: none;
  }
}

/* big rooms: the lobby must hold 40 teams without running off the stage */
.lobby__grid[data-dense] {
  gap: 10px;
}

.lobby__grid[data-dense] .teamcard {
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-width: 3px;
  border-radius: 14px;
}

.lobby__grid[data-dense] .teamcard img {
  width: 52px;
  height: 52px;
}

.lobby__grid[data-dense] .teamcard b {
  font-size: 22px;
}

.lobby__grid[data-dense] .teamcard small {
  display: none;
}

/* ── boss health ── */
.boss {
  position: absolute;
  top: 24px; /* takes the title's place in the top bar */
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 760px;
  padding: 8px 20px 10px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--red-dark);
  transform: translateX(-50%);
  box-shadow: 0 6px 0 var(--ink);
}

.boss[hidden] {
  display: none;
}

.boss__bar {
  flex: 1;
  height: 20px;
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--cream);
}

.boss__bar i {
  display: block;
  height: 100%;
  background: var(--red);
  transform-origin: left center;
  transition: transform 700ms var(--ease-out);
}

.boss.is-down {
  color: var(--green-dark);
}

/* ── MC: pause, help, preset picker ── */
.pause {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  gap: 10px;
  background: rgba(43, 33, 24, 0.72);
  color: var(--paper);
  text-align: center;
}

.pause[hidden],
.help[hidden] {
  display: none;
}

.pause b {
  font-family: var(--font-display);
  font-size: 220px;
  font-weight: 400;
  line-height: 1;
  -webkit-text-stroke: 6px var(--ink);
  paint-order: stroke fill;
  color: var(--yellow);
}

.pause span {
  font-size: 34px;
  font-weight: 800;
}

/* D26: the MC's connectivity list under a drop pause */
.pause small {
  max-width: 1500px;
  font-size: 28px;
  font-weight: 800;
  color: var(--cream, var(--paper));
}

.help {
  position: absolute;
  right: 40px;
  top: 110px;
  z-index: 21;
  width: 560px;
  padding: 24px 34px 30px;
}

.help h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 400;
}

.help dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 22px;
  margin: 0;
  font-size: 26px;
  font-weight: 800;
}

.help dt {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--blue-dark);
}

.help dd {
  margin: 0;
}

.presets {
  display: inline-flex;
  gap: 10px;
}

.presets .btn.is-on {
  background: var(--yellow);
}

/* ── lobby: the venue's name for the night's photo ── */
.lobby__venue {
  width: 220px;
  padding: 8px 16px 10px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  font: 400 26px var(--font-display);
  color: var(--ink);
}

/* ── Tele, the announcer (bible §3.3): bottom-right, above the ribbon, never over the TV object ── */
.tele {
  position: absolute;
  right: 18px;
  bottom: 128px;
  z-index: 8;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  transition: transform 420ms var(--ease-out), opacity 300ms;
}
.tele.is-off {
  transform: translateX(560px); /* out to the right: a downward slide crossed the ribbon (z 8 over 5) */
  opacity: 0;
}
.tele__body {
  width: 300px;
  height: auto;
  margin-left: -40px;
}
.tele__line {
  max-width: 420px;
  margin: 70px 0 0;
  padding: 14px 26px 18px;
  border: 5px solid var(--ink);
  border-radius: 24px 24px 6px 24px;
  background: var(--paper);
  box-shadow: 0 7px 0 var(--ink);
  font: 400 40px/1.08 var(--font-display);
  text-align: center;
  transform: rotate(-2deg);
}
.tele--small .tele__body { width: 210px; }
.tele--small .tele__line { margin-top: 40px; font-size: 34px; }
/* beside the photo: the line stacks above him so nothing covers the frame */
.tele--side { flex-direction: column; align-items: flex-end; }
.tele--side .tele__line { margin: 0 10px -10px 0; max-width: 300px; }

/* ── the Pub Machine scene (bible §4.2): sprites at their manifest offsets on the 1920×1080 stage ── */
.mach {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.mach__base,
.mach__part,
.mach__chair,
.mach__inspector {
  position: absolute;
}
.mach__base { left: 0; top: 0; width: 1920px; height: 1080px; }
/* the camera: everything on the bench lives in one world that leans in on the fresh bay */
.mach__world { position: absolute; inset: 0; will-change: transform; }
.mach__part.is-fresh { filter: drop-shadow(0 26px 14px rgba(20, 12, 4, 0.35)); }
/* D78: unbuilt slots wear blueprint covers; the round label is code, never baked */
.mach__cover { position: absolute; z-index: 1; }
.mach__cover img { display: block; width: 100%; height: 100%; }
.mach__cover b {
  position: absolute;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 12px 4px 0;
  color: var(--paper);
  opacity: 0.9;
  font: 400 40px/1 var(--font-display);
}
.mach__cover.is-roof b { align-items: center; justify-content: center; padding: 0; font-size: 32px; }
/* light: a warm vignette over the bench, a pool of light on the bay that just got its part */
.mach__vignette {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(ellipse 62% 70% at 50% 42%, transparent 55%, rgba(43, 33, 24, 0.34) 100%);
}
.mach__spot {
  position: absolute;
  z-index: 5;
  width: 560px;
  height: 460px;
  margin: -230px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 236, 190, 0.55), rgba(255, 236, 190, 0));
  mix-blend-mode: soft-light;
  opacity: 0;
  pointer-events: none;
}
.mach__stamp {
  position: absolute;
  z-index: 8;
  padding: 4px 22px 8px;
  border: 7px solid currentColor;
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.9);
  font: 400 48px/1 var(--font-display);
  white-space: nowrap;
  translate: -50% -50%;
}
.mach__stamp.is-neat { color: var(--green-dark); }
.mach__stamp.is-crooked { color: var(--ink); background: var(--yellow); }
.mach__stamp.is-smoking { color: var(--red-dark); }
.mach__scrap { position: absolute; z-index: 8; width: 30px; height: 18px; margin: -9px 0 0 -15px; border: 3px solid var(--ink); }
/* G12 discovery plaques under the hopper's rim (D68), drawn the same way on the photo */
.mach__plaque {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 186px;
  padding: 4px 6px 4px 12px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--yellow);
  box-shadow: 0 6px 0 rgba(43, 33, 24, 0.3);
  font: 900 26px/1.05 var(--font-body);
  translate: -50% 0;
  rotate: var(--rot, 0deg);
}
/* a two-word answer ("Plitvička jezera") takes two lines instead of an ellipsis */
.mach__plaque span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mach__plaque b {
  flex: none;
  min-width: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font: 400 26px/34px var(--font-display);
  text-align: center;
}
/* the build sheet on the bench: seven tickets in round order */
.mach__sheet {
  position: absolute;
  top: 800px;
  left: 830px; /* clear of Tele's corner on the right */
  z-index: 6;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 12px 14px 14px;
  border: 5px solid var(--ink);
  border-radius: 18px;
  background: var(--cream);
  box-shadow: 0 10px 0 rgba(43, 33, 24, 0.3);
  list-style: none;
  transform: translateX(-50%) rotate(-0.6deg);
}
.mach__sheet li.mach__sheet-head { min-width: 0; padding: 6px 8px 8px 2px; border: 0; box-shadow: none; }
.mach__sheet li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 122px;
  padding: 6px 10px 8px;
  border: 4px solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 6px 0 rgba(43, 33, 24, 0.3);
  line-height: 1;
}
.mach__sheet small { font: 800 26px/1 var(--font-body); }
.mach__sheet b { font: 400 34px/1.05 var(--font-display); }
.mach__sheet .is-todo { border: 4px dashed var(--blue-dark); background: var(--cream); color: var(--blue-dark); box-shadow: none; }
.mach__sheet .is-neat { background: var(--yellow); }
.mach__sheet .is-crooked { background: var(--paper); transform: rotate(-3deg); }
.mach__sheet .is-smoking { background: var(--soot, #3a2f28); color: var(--paper); }
.mach__sheet .is-fresh { outline: 5px solid var(--paper); outline-offset: 3px; }
.mach__sheet--v3 { top: 760px; left: 960px; width: 1770px; display: grid; grid-template-columns: 150px repeat(6, 1fr); gap: 12px; }
.mach__sheet--v3 .mach__sheet-head { grid-row: span 2; justify-content: center; }
.mach__sheet--v3 li { min-width: 0; min-height: 76px; justify-content: center; gap: 5px; }
.mach__sheet--v3 small { font-size: 20px; }
.mach__sheet--v3 b { font-size: 28px; }
.mach__extra { position: absolute; left: 50px; top: 130px; display: grid; grid-template-columns: 260px 260px; gap: 22px; }
.mach__extra-card { padding: 16px; text-align: center; transform: rotate(-1deg); }
.mach__extra-card small { font: 800 20px var(--font-body); }
.mach__extra-card h2 { font: 400 34px var(--font-display); margin: 8px 0; }
.mach__extra-card .tag { font-size: 22px; }
.mach__extra-card.is-todo { border-style: dashed; color: var(--blue-dark); background: var(--cream); }
.mach__extra-card.is-neat { background: var(--yellow); }
.mach__extra-card.is-smoking { background: var(--soot, #3a2f28); color: var(--paper); }
.mach__inspector { z-index: 4; }
.mach__inspector img { position: absolute; left: 50%; bottom: -6px; height: 104%; transform: translateX(-50%); }
.mach__rivet {
  position: absolute;
  z-index: 6;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}
.mach__grab {
  position: absolute;
  top: 0;
  left: 1110px; /* over the claw boom: the arm she wants back */
  z-index: 7;
  width: 280px;
  transform-origin: 50% 0;
}
.mach__grab i {
  display: block;
  width: 22px;
  height: 640px;
  margin: 0 auto -4px;
  background: url(../art/grabilica/cable.png) center top / 22px auto repeat-y;
}
.mach__grab img { display: block; width: 280px; }
.mach__card {
  position: absolute;
  top: 130px;
  right: 40px;
  z-index: 6;
  width: 400px;
  padding: 18px 28px 26px;
  text-align: center;
  transform: rotate(1.5deg);
}
.mach__card small { font: 800 26px var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; }
.mach__card h2 { margin: 4px 0 6px; font: 400 60px/1 var(--font-display); color: var(--red); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.mach__card p { margin: 0 0 12px; font: 800 30px var(--font-body); }
.mach__card b { font-family: var(--font-display); font-weight: 400; }
.mach__quality { font-size: 32px; white-space: nowrap; transform: rotate(-3deg); }
.mach__quality[hidden] { display: none; }
.mach__sab {
  position: absolute;
  top: 130px;
  left: 40px;
  z-index: 6;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 18px;
  width: 460px;
  padding: 20px 24px 26px;
  transform: rotate(-1.5deg);
}
.mach__who { position: relative; }
.mach__who img {
  width: 120px;
  height: 120px;
  padding: 6px;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background: var(--team, var(--paper));
  object-fit: contain;
}
.mach__who b {
  position: absolute;
  right: -6px;
  bottom: -4px;
  min-width: 44px;
  border: 4px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  font: 400 30px/1.1 var(--font-display);
  text-align: center;
}
.mach__ask { align-self: center; }
.mach__ask small { font: 800 26px var(--font-body); text-transform: uppercase; }
.mach__ask h3 { margin: 2px 0 0; font: 400 40px/1.05 var(--font-display); overflow-wrap: break-word; }
.mach__sides { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mach__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px 14px;
  border: 4px solid var(--ink);
  border-radius: 18px;
  background: var(--kraft);
  color: var(--ink);
  box-shadow: 0 6px 0 var(--kraft-deep), 0 6px 0 4px var(--ink);
  font: inherit;
  transition: transform 200ms var(--ease-out);
}
.mach__side b { font: 400 36px/1 var(--font-display); }
.mach__side small { font: 800 26px var(--font-body); }
.mach__side.is-wrong small { color: var(--red-dark); }
.mach__side.is-on { background: var(--yellow); transform: translateY(-6px) scale(1.04); }
.mach__sides:has(.is-on) .mach__side:not(.is-on) { opacity: 0.4; }
.mach__clock {
  grid-column: 1 / -1;
  height: 12px;
  border: 3px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  overflow: hidden;
}
.mach__clock i { display: block; height: 100%; background: var(--red); transform-origin: left center; }

/* ── end of the night: the photo frame on the TV ── */
.photo-view { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.photo-view__frame { padding: 14px; transform: rotate(-1deg); }
.photo-view__frame canvas { display: block; width: 1184px; height: 666px; border-radius: 12px; }
.photo-view__hint { display: flex; align-items: center; gap: 18px; margin: 0; font: 400 34px var(--font-display); }

@media (prefers-reduced-motion: reduce) {
  .tele { transition: none; }
}

/* #16: every seat carries the team's number, the same as the ribbon chips above 8 teams */
.seat__no { position: absolute; left: -10px; top: -12px; min-width: 34px; padding: 0 5px; border: 3px solid var(--ink); border-radius: 10px; background: var(--paper); font: 400 calc(26px * var(--hud-scale, 1)) / 1.15 var(--font-display); font-style: normal; text-align: center; color: var(--ink); }

/* the fullscreen button is only for a windowed TV */
:fullscreen #lobby-fs {
  display: none;
}
