/*
  Online play (private rooms), TriviAI 1.3.0: setup, category picker, Review & Invite, lobby, invitation,
  joining, the private quiz and its roster, results, rematch and TV. Sizes are canvas units (var(--u)).
  Geometry comes from the Unity prefabs (FriendsSetup, the Friends panel sheet, PrivateQuizRoster) and
  the 1.3.0 web captures in .unlazy/web-game/reference/40-48. Class prefix: on-.
*/

/* ---- shared bits ---------------------------------------------------------------------------- */
.on-boot {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.on-card {
  background: #fefefe;
  border-radius: calc(41 * var(--u));
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e6ebed;
}
.on-hint {
  font-size: calc(28 * var(--u));
  line-height: 1.3;
  color: var(--ink);
}
.on-hint--center {
  text-align: center;
  color: var(--section-grey);
}
.on-status {
  font-size: calc(28 * var(--u));
  color: var(--ink);
}
.on-status.is-error {
  color: var(--danger-ink);
}
.on-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: calc(52 * var(--u));
  padding: 0 calc(26 * var(--u));
  border-radius: 999px;
  font-style: normal;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #e9eef3;
  color: #37474f;
}
.on-badge.is-good {
  background: #e6f8eb;
  color: #247948;
}
.on-badge.is-warning {
  background: #fff4d6;
  color: #8a6418;
}
.on-code {
  font-weight: var(--w-bold);
  font-size: calc(54 * var(--u));
  letter-spacing: 0.12em;
  line-height: 1.05;
  color: var(--ink);
  text-indent: 0.12em;
}

/* the feedback card (FriendsFeedbackCard) */
.on-feedback {
  --fill: #edf5fb;
  --edge: #c1d7e5;
  --accent: #528ac1;
  --ink-f: #25455f;
  position: relative;
  padding: calc(18 * var(--u)) calc(26 * var(--u)) calc(18 * var(--u)) calc(38 * var(--u));
  border-radius: calc(30 * var(--u));
  background: var(--fill);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--edge);
  color: var(--ink-f);
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.3;
  white-space: pre-line;
}
.on-feedback::before {
  content: '';
  position: absolute;
  left: calc(16 * var(--u));
  top: calc(18 * var(--u));
  bottom: calc(18 * var(--u));
  width: calc(7 * var(--u));
  border-radius: 999px;
  background: var(--accent);
}
.on-feedback--good {
  --fill: #edf8ee;
  --edge: #b3d8b9;
  --accent: #269451;
  --ink-f: #235d39;
}
.on-feedback--warning {
  --fill: #fff6df;
  --edge: #e6d49c;
  --accent: #c19127;
  --ink-f: #6c5117;
}
.on-feedback--error {
  --fill: #fff0ec;
  --edge: #e6b8ad;
  --accent: #b6443a;
  --ink-f: #853a32;
}

/* avatars */
.on-avatar {
  --size: calc(110 * var(--u));
  position: relative;
  flex: none;
  width: var(--size);
  height: var(--size);
}
.on-avatar__disc {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #43966d;
}
.on-avatar__disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.on-avatar__letter {
  font-weight: var(--w-bold);
  font-size: calc(var(--size) * 0.5);
  line-height: 1;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.on-avatar__badge {
  position: absolute;
  right: calc(var(--size) * -0.04);
  bottom: calc(var(--size) * -0.04);
  display: grid;
  place-items: center;
  width: calc(var(--size) * 0.42);
  height: calc(var(--size) * 0.42);
  border-radius: 50%;
  background: #96a0ac;
  box-shadow: 0 0 0 calc(var(--size) * 0.035) #fff;
  color: #fff;
}
.on-avatar__badge--ready {
  background: #369662;
}
.on-avatar__badge svg {
  width: 62%;
  height: 62%;
  stroke-width: 3.4;
}

/* the confirmation card (leave / cancel) */
.on-confirm-layer {
  z-index: 60;
}
.on-confirm {
  width: min(100%, calc(900 * var(--u)));
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(22 * var(--u));
  padding: calc(40 * var(--u)) calc(48 * var(--u)) calc(32 * var(--u));
  border-radius: calc(56 * var(--u));
  background: #f6f9f7;
  text-align: center;
  box-shadow: 0 calc(16 * var(--u)) calc(48 * var(--u)) rgba(0, 0, 0, 0.32);
  animation: pop-in var(--t-med) var(--ease-spring);
}
.on-confirm:focus {
  outline: none;
}
.on-confirm h2 {
  font-weight: var(--w-bold);
  font-size: calc(66 * var(--u));
  line-height: 1.1;
  color: var(--ink);
}
.on-confirm p {
  font-weight: var(--w-medium);
  font-size: calc(38 * var(--u));
  line-height: 1.3;
  color: #7a8089;
}
.on-confirm__refund {
  display: inline-flex;
  align-items: center;
  gap: calc(12 * var(--u));
  color: var(--ink) !important;
  font-weight: var(--w-semibold) !important;
  font-size: calc(32 * var(--u)) !important;
}
.on-confirm__refund img {
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
}
.on-confirm__actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  margin-top: calc(26 * var(--u));
}
.on-confirm .btn {
  --btn-h: calc(108 * var(--u));
  --btn-font: calc(30 * var(--u));
}
.on-confirm .btn--danger {
  --btn-h: calc(84 * var(--u));
  --btn-font: calc(27 * var(--u));
}

/* ---- full-screen setup pages (Basic Background, header, pinned action) ----------------------------- */
.on-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background-color: #c6f2d6;
  background-size: cover;
  background-position: center;
}
.on-page__body {
  flex: 1;
  min-height: 0;
}
.on-page__column {
  width: 100%;
  margin: 0 auto;
  padding: calc(40 * var(--u)) calc(50 * var(--u)) calc(40 * var(--u));
}
.on-page__footer {
  flex: none;
  padding: calc(10 * var(--u)) 0 calc(var(--safe-bottom) + 72 * var(--u));
}
.on-page__footer .on-page__column {
  padding-top: 0;
  padding-bottom: 0;
  padding-left: calc(41 * var(--u));
  padding-right: calc(41 * var(--u));
}
/* phone: the hint and any refusal sit in the pinned footer, right above the action, so no screen height can slide a line
   of text under the button; the form scrolls above and fades out at the footer's edge instead of being cut mid-line */
.on-footer__notes {
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
  margin-bottom: calc(18 * var(--u));
  text-align: center;
}
.on-footer__notes > * {
  margin: 0;
}
.on-page--setup:not(.on-page--setup-wide) .on-page__body {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 36 * var(--u)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 36 * var(--u)), transparent);
}
/* a short phone (width to height at or above 11:20, the 360x640 / 375x667 / 390x664 class): the form's rhythm tightens a
   little so all six settings, the hint and the action fit without scrolling */
@media (max-width: 759px) and (min-aspect-ratio: 11/20) {
  .on-page--setup .on-settings {
    gap: calc(28 * var(--u));
  }
  .on-page--setup .on-page__footer {
    padding-bottom: calc(var(--safe-bottom) + 56 * var(--u));
  }
}
/* a tall phone: the spare height is shared out over the gaps between the settings (and above and below them) instead of
   being left as one empty band above the hint */
.on-page--setup:not(.on-page--setup-wide) .on-page__body {
  display: flex;
  flex-direction: column;
}
.on-page--setup:not(.on-page--setup-wide) .on-page__column {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}
.on-page--setup:not(.on-page--setup-wide) .on-settings {
  flex: 1 1 auto;
  justify-content: space-evenly;
}
/* 1.3.0 draws these action labels at about 30 canvas units (the shared large button is 40) */
.on-page .btn,
.on-sheet__footer .btn {
  --btn-h: calc(108 * var(--u));
  --btn-font: calc(30 * var(--u));
}
.layout-wide .on-page__column {
  max-width: 800px;
  padding-left: 24px;
  padding-right: 24px;
}
.layout-wide .on-page__footer .on-page__column {
  padding-left: 24px;
  padding-right: 24px;
}
.layout-wide .on-page--picker .on-page__column {
  max-width: 960px;
}
/* the ticket pill: icon left, count right, as on the Couch Clash and Categories headers */
.on-tickets {
  display: inline-flex;
}
.on-page .screen-header .pill {
  color: var(--cream);
  font-size: calc(28 * var(--u));
  font-weight: var(--w-medium);
  text-shadow: none;
  min-width: calc(160 * var(--u));
  justify-content: space-between;
  gap: calc(20 * var(--u));
  padding-right: calc(44 * var(--u));
}
.on-page .screen-header__title p {
  font-size: calc(24 * var(--u));
}
/* wide: the pill is the compact one of the Categories header (it hugs the icon and the count, no meter bar), and Back and
   the pill sit on the band's middle like there; the phone keeps the CurrencyHud geometry above */
.layout-wide .on-page .screen-header .pill {
  flex: none;
  min-width: 0;
  justify-content: center;
  gap: calc(14 * var(--u));
  padding: 0 calc(20 * var(--u)) 0 calc(16 * var(--u));
  color: #fff;
  font-size: calc(32 * var(--u));
  font-weight: var(--w-medium);
  text-shadow: var(--on-colour-shadow);
}
.layout-wide .on-page--setup .screen-header__side {
  top: 0;
}
/* the back button and the tickets pill sit 14u above the band's middle, as on the Couch Clash setup (1.3.0 captures) */
.on-page--setup .screen-header__side {
  position: relative;
  top: calc(-14 * var(--u));
}

.on-settings {
  display: flex;
  flex-direction: column;
  gap: calc(34 * var(--u));
}
.on-settings.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.on-section__head {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  min-height: calc(48 * var(--u));
  margin-bottom: calc(16 * var(--u));
}
.on-section__badge {
  display: grid;
  place-items: center;
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  border-radius: 50%;
  background: #0d8439;
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  text-shadow: var(--on-colour-shadow);
}
.on-section__head h2 {
  font-weight: var(--w-semibold);
  font-size: calc(27 * var(--u));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #031c26;
}
.on-section__hint {
  font-weight: var(--w-medium);
  font-size: calc(24 * var(--u));
  color: #808890;
}
.on-section__card {
  padding: calc(22 * var(--u)) calc(24 * var(--u));
  border-radius: calc(28 * var(--u));
  background: #fefefe;
  box-shadow:
    0 calc(4 * var(--u)) calc(14 * var(--u)) rgba(27, 37, 89, 0.08),
    inset 0 0 0 calc(2 * var(--u)) rgba(255, 255, 255, 0.9);
}
.on-section--players .on-section__card {
  padding: 0;
  background: none;
  box-shadow: none;
}

/* chips (SegmentedChipGroupView / MultiSelectChipGroupView) */
.on-chips {
  display: flex;
  gap: calc(16 * var(--u));
}
.on-chip {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(14 * var(--u));
  min-height: calc(93 * var(--u));
  padding: 0 calc(12 * var(--u));
  border-radius: calc(23 * var(--u));
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #e6e6e7,
    0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(27, 37, 89, 0.06);
  color: #031c26;
  font-weight: var(--w-bold);
  font-size: calc(29 * var(--u));
  letter-spacing: 0.045em;
  line-height: 1.1;
  transition:
    background-color var(--t-fast),
    color var(--t-fast),
    transform var(--t-fast);
}
.on-chip:hover:not(.is-on) {
  background: #f6faf7;
}
.on-chip:active {
  transform: scale(0.97);
}
.on-chip.is-on {
  background: #0d8439;
  color: #fff;
  box-shadow: none;
  text-shadow: var(--on-colour-shadow);
}
.on-chips--count .on-chip {
  min-height: calc(93 * var(--u));
  padding: 0;
}
.on-chips--tiers {
  flex-wrap: wrap;
  gap: calc(10 * var(--u)) calc(9 * var(--u));
}
.on-chips--tiers .on-chip {
  flex: 1 1 auto;
  min-height: calc(100 * var(--u));
  padding: 0 calc(22 * var(--u));
  font-size: calc(29 * var(--u));
}
.on-chips--rounds {
  flex: none;
  gap: calc(14 * var(--u));
}
.on-chips--rounds .on-chip {
  flex: 0 0 auto;
  min-width: calc(100 * var(--u));
  min-height: calc(100 * var(--u));
  padding: 0 calc(26 * var(--u));
}
.on-chips--big {
  gap: calc(16 * var(--u));
}
.on-chips--big .on-chip {
  min-height: calc(131 * var(--u));
  padding: 0 calc(14 * var(--u));
  gap: calc(10 * var(--u));
  font-size: calc(29 * var(--u));
  line-height: 1.2;
  text-align: center;
}
/* the two choices are the same width, whichever one carries the check disc */
.on-chips--big .on-chip {
  flex: 1 1 0;
}
/* phone: the chosen chip keeps the same air from its rim to the check disc and from the end of its label to the rim, about a
   third of what the other chip has around its label, instead of running the text almost to the edge */
.layout-phone .on-chips--big .on-chip {
  padding-left: calc(26 * var(--u));
  padding-right: calc(26 * var(--u));
}
.on-chip__label {
  min-width: 0;
  text-align: center;
}
.on-chips--big .on-chip__label {
  flex: 0 1 auto;
}
.on-chip__check {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  border-radius: 50%;
  background: #fff;
  color: #0d8439;
}
.on-chip__check svg {
  width: 62%;
  height: 62%;
  stroke-width: 3;
}
.on-rounds {
  display: flex;
  align-items: stretch;
  gap: calc(14 * var(--u));
}
.on-readout {
  flex: 1 1 0;
  min-width: calc(150 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(2 * var(--u));
  min-height: calc(100 * var(--u));
  padding: calc(6 * var(--u)) calc(10 * var(--u));
  border-radius: calc(23 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e6e6e7;
}
.on-readout.is-custom {
  background: #e6f4ea;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #0d8439;
}
/* the custom readout's own green ring is the focus mark (the page's focus shadow covered the MAX line) */
.on-readout__input:focus-visible {
  outline: none;
  box-shadow: none;
}
.on-readout.is-custom:focus-within {
  box-shadow:
    inset 0 0 0 calc(3 * var(--u)) #0d8439,
    0 0 0 calc(5 * var(--u)) rgba(13, 132, 57, 0.22);
}
.on-readout__value,
.on-readout__input {
  width: 100%;
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  letter-spacing: 0.045em;
  line-height: 1.1;
  color: #031c26;
  background: none;
  border: 0;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.on-readout__max {
  font-weight: var(--w-medium);
  font-size: calc(17 * var(--u));
  letter-spacing: 0.04em;
  color: #808890;
}

/* CategorySlotView */
.on-slot {
  --slot-edge: #0d8439;
  --slot-fill: #fff;
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  width: 100%;
  min-height: calc(128 * var(--u));
  padding: calc(14 * var(--u)) calc(30 * var(--u)) calc(14 * var(--u)) calc(26 * var(--u));
  border-radius: calc(28 * var(--u));
  background: var(--slot-fill);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--slot-edge);
  text-align: left;
  transition: filter var(--t-fast);
}
.on-slot:hover {
  filter: brightness(0.98);
}
.on-slot__disc {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(84 * var(--u));
  height: calc(84 * var(--u));
  border-radius: 50%;
  background: var(--slot-disc, var(--slot-edge));
}
.on-slot__glyph {
  width: 62%;
  height: 62%;
  background: #fff;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.on-slot__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
}
.on-slot__name {
  font-weight: var(--w-bold);
  font-size: calc(33 * var(--u));
  letter-spacing: 0.045em;
  line-height: 1.25;
  color: #031c26;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-slot__sub {
  font-weight: var(--w-medium);
  font-size: calc(22 * var(--u));
  color: #808890;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-slot__chevron {
  flex: none;
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  color: #808890;
}
.on-slot__chevron svg {
  width: 100%;
  height: 100%;
}

/* wide: one centred column (max 800 px), the chips share the row evenly */
.layout-wide .on-settings {
  gap: calc(40 * var(--u));
}
.layout-wide .on-chips--tiers .on-chip {
  flex: 1 1 0;
}

/* ---- wide setup: the form, then its action (nothing pinned over the settings) ---------------------------------
   One column: the category and the Game Settings card, the mode robot below them. A larger screen takes a larger unit
   (the header keeps the page's own). */
.layout-wide .on-page--setup-wide .on-page__body {
  display: flex;
  flex-direction: column;
}
@media (min-width: 1400px) and (min-height: 860px) {
  .layout-wide .on-page--setup-wide .on-page__body {
    --u: 0.64px;
  }
}
@media (min-width: 1800px) and (min-height: 1000px) {
  .layout-wide .on-page--setup-wide .on-page__body {
    --u: 0.74px;
  }
}
@media (min-width: 760px) and (orientation: portrait) and (min-height: 1100px) {
  .layout-wide .on-page--setup-wide .on-page__body {
    --u: 0.62px;
  }
}
@media (min-width: 1000px) and (max-width: 1199px) and (max-height: 800px) and (orientation: landscape) {
  .layout-wide .on-page--setup-wide .on-page__body {
    --u: 0.57px;
  }
}
/* a landscape tablet or small laptop of 801 to 859 px: the columns take the extra height instead of leaving it as empty bands */
@media (min-width: 1000px) and (min-height: 801px) and (max-height: 859px) and (orientation: landscape) {
  .layout-wide .on-page--setup-wide .on-page__body {
    --u: 0.62px;
  }
}
.layout-wide .on-page--setup-wide .on-settings {
  gap: calc(32 * var(--u));
}
/* six settings, the hint and the action in one column of 1180 px: a little less between them so it never scrolls */
@media (min-width: 760px) and (orientation: portrait) and (min-height: 1100px) {
  .layout-wide .on-page--setup-wide .on-settings {
    gap: calc(26 * var(--u));
  }
}
/* a landscape screen 750 to 859 px high (1024x768, 1180x820, 1366x768): more air between and inside the cards, so the form
   fills the height instead of floating in two empty bands */
@media (min-width: 1000px) and (min-height: 750px) and (max-height: 859px) and (orientation: landscape) {
  .layout-wide .on-page--setup-wide .on-settings {
    row-gap: calc(46 * var(--u));
  }
  .layout-wide .on-page--setup-wide .on-section__card {
    padding-top: calc(26 * var(--u));
    padding-bottom: calc(26 * var(--u));
  }
  .layout-wide .on-page--setup-wide .on-chips--count .on-chip,
  .layout-wide .on-page--setup-wide .on-chips--tiers .on-chip,
  .layout-wide .on-page--setup-wide .on-chips--rounds .on-chip {
    min-height: calc(110 * var(--u));
  }

}
.layout-wide .on-page--setup-wide .on-page__column {
  margin: auto;
  padding-top: 28px;
  padding-bottom: 28px;
}
@media (min-width: 1000px) and (orientation: landscape) {
  .layout-wide .on-page--setup-wide .on-page__column {
    max-width: calc(2 * 900 * var(--u) + 88px);
  }
}






.layout-wide .on-page--setup-wide .on-section__card {
  container-type: inline-size;
}
/* a narrow card (a 1024 px wide landscape screen, two columns): the two answer-reveal choices stand one above the other like
   the Couch Clash ones, each label on one line at the size of the other chips' labels instead of squeezed beside its neighbour */
@container (max-width: 450px) {
  .layout-wide .on-page--setup-wide .on-chips--big {
    flex-direction: column;
    gap: calc(12 * var(--u));
  }
  .layout-wide .on-page--setup-wide .on-chips--big .on-chip {
    flex: none;
    min-height: calc(96 * var(--u));
  }
}
/* the player count sits on the mint page on the phone (as in Unity); on a wide screen it gets the same white section card
   as every other setting, with chips as tall as theirs */
.layout-wide .on-page--setup-wide .on-section--players .on-section__card {
  padding: calc(22 * var(--u)) calc(24 * var(--u));
  background: #fefefe;
  box-shadow:
    0 calc(4 * var(--u)) calc(14 * var(--u)) rgba(27, 37, 89, 0.08),
    inset 0 0 0 calc(2 * var(--u)) rgba(255, 255, 255, 0.9);
}
.layout-wide .on-page--setup-wide .on-chips--count {
  gap: calc(12 * var(--u));
}
.layout-wide .on-page--setup-wide .on-chips--count .on-chip {
  min-height: calc(100 * var(--u));
}
.layout-wide .on-page--setup-wide .on-section__hint {
  font-size: max(13px, calc(24 * var(--u)));
}
.layout-wide .on-page--setup-wide .on-readout__max {
  font-size: max(13px, calc(21 * var(--u)));
}
.layout-wide .on-page--setup-wide .on-chips--tiers .on-chip {
  /* every label keeps the same air on both sides: the row's spare width is shared out evenly, not by label length */
  flex: 1 1 auto;
  min-width: max-content;
  padding: 0 calc(18 * var(--u));
}
/* rounds and time: the choices share the row by their labels, the readout keeps a third of it */
.layout-wide .on-page--setup-wide .on-chips--rounds {
  flex: 1 1 auto;
  min-width: 0;
}
.layout-wide .on-page--setup-wide .on-chips--rounds .on-chip {
  flex: 1 1 0;
  min-width: max-content;
  padding: 0 calc(20 * var(--u));
}
.layout-wide .on-page--setup-wide .on-readout {
  flex: 0 0 30%;
  min-width: 0;
}
@container (max-width: 400px) {
  .layout-wide .on-page--setup-wide .on-rounds {
    flex-direction: column;
  }
  .layout-wide .on-page--setup-wide .on-readout {
    flex: none;
  }
}
@container (max-width: 400px) {
  .layout-wide .on-page--setup-wide .on-chips--tiers {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .layout-wide .on-page--setup-wide .on-chips--tiers .on-chip {
    grid-column: span 2;
  }
  .layout-wide .on-page--setup-wide .on-chips--tiers .on-chip:nth-child(n + 4) {
    grid-column: span 3;
  }
}

/* ---- the category picker ---------------------------------------------------------------------------- */
/* the host's category list: the same tile as the Category browser (CategoryPlayTilePrefab: 186u tall, rim 12u, lip 14u,
   spacing 20u, side padding 20u), so the picker and the browser look alike */
.on-page--picker .on-page__column {
  padding-left: calc(20 * var(--u));
  padding-right: calc(20 * var(--u));
  padding-top: calc(16 * var(--u));
}
.on-search {
  position: relative;
  margin: 0 calc(8 * var(--u)) calc(14 * var(--u));
}
.on-search__input {
  width: 100%;
  height: calc(96 * var(--u));
  padding: 0 calc(96 * var(--u)) 0 calc(36 * var(--u));
  border-radius: 999px;
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) rgba(27, 37, 89, 0.08),
    0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.06);
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  font-style: italic;
  color: var(--ink);
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.on-search__input:not(:placeholder-shown) {
  font-style: normal;
}
.on-search__input::placeholder {
  color: #808890;
  opacity: 0.8;
}
.on-search__input:focus-visible {
  box-shadow: inset 0 0 0 calc(4 * var(--u)) #0d8439;
}
.on-search__clear {
  position: absolute;
  right: calc(18 * var(--u));
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: calc(64 * var(--u));
  height: calc(64 * var(--u));
  border-radius: 50%;
  color: var(--ink);
  background: rgba(27, 37, 89, 0.08);
}
.on-search__clear svg {
  width: 46%;
  height: 46%;
}
.on-tiles {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.on-tiles__loading {
  display: grid;
  place-items: center;
  padding: calc(120 * var(--u)) 0;
}
.on-tile {
  --accent: #d6741b;
  --rim: #a85c15;
  --lip: #7d4510;
  --medallion: #e0944d;
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: calc(186 * var(--u));
  min-height: 72px;
  margin-bottom: calc(14 * var(--u));
  padding: 0 calc(14 * var(--u)) 0 calc(38 * var(--u));
  border-radius: calc(72 * var(--u));
  background: var(--accent);
  box-shadow:
    inset 0 calc(-14 * var(--u)) 0 0 var(--lip),
    inset 0 0 0 calc(12 * var(--u)) var(--rim),
    0 calc(14 * var(--u)) 0 0 rgba(0, 0, 0, 0.25);
  color: #fff;
  text-align: left;
  transition: transform var(--t-fast) var(--ease-out), filter var(--t-fast);
}
.on-tile:hover {
  filter: brightness(1.05);
}
.on-tile:active {
  transform: translateY(calc(5 * var(--u)));
}
.on-tile__medallion {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(150 * var(--u));
  height: calc(150 * var(--u));
  min-width: 52px;
  min-height: 52px;
  border-radius: 50%;
  background: var(--medallion);
  overflow: hidden;
}
.on-tile__glyph {
  width: calc(120 * var(--u));
  height: calc(120 * var(--u));
  object-fit: contain;
  filter: drop-shadow(0 calc(1 * var(--u)) 0 rgba(0, 0, 0, 0.5));
}
.on-tile__art {
  width: calc(112 * var(--u));
  height: calc(112 * var(--u));
  object-fit: contain;
}
.on-tile__letter {
  font-weight: var(--w-bold);
  font-size: calc(64 * var(--u));
  text-shadow: var(--on-colour-shadow);
}
.on-tile__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(10 * var(--u));
  margin-left: calc(23 * var(--u));
  padding-bottom: calc(6 * var(--u));
}
.on-tile__name {
  font-weight: var(--w-extrabold);
  font-size: max(16px, calc(44 * var(--u)));
  line-height: 1.12;
  letter-spacing: 0.048em;
  text-shadow: var(--on-colour-shadow);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.on-tile__meta {
  font-weight: var(--w-bold);
  font-size: max(11px, calc(26 * var(--u)));
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: var(--on-colour-shadow);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.on-tile__chevron {
  flex: none;
  width: calc(40 * var(--u));
  min-width: 14px;
  height: calc(40 * var(--u));
  color: #fff;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.35));
}
.on-tile__chevron svg {
  width: 100%;
  height: 100%;
  stroke-width: 3.6;
}.layout-wide .on-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: calc(34 * var(--u)) 24px;
}

/* ---- the hub frame and the sheet ---------------------------------------------------------------------- */
.on-hub .hub__page {
  min-height: 0;
}
.on-sheet {
  --band: #151a52;
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: calc(18 * var(--u)) calc(20 * var(--u)) calc(6 * var(--u));
  border-radius: calc(44 * var(--u));
  overflow: hidden;
  background: #f6f9f7;
  box-shadow: 0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 18, 66, 0.22);
  z-index: 2;
}
.on-sheet--warm {
  background: #f9f7f3;
}
.on-sheet__band {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: calc(84 * var(--u)) 1fr calc(84 * var(--u));
  align-items: center;
  column-gap: calc(16 * var(--u));
  min-height: calc(133 * var(--u));
  padding: calc(18 * var(--u)) calc(24 * var(--u));
  background: var(--band);
  color: #fff;
  z-index: 1;
}
.on-sheet__btn {
  --size: calc(84 * var(--u));
  width: calc(84 * var(--u));
  height: calc(84 * var(--u));
  background: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
}
.on-sheet__btn svg {
  width: 44%;
  height: 44%;
}
/* the close cross is drawn bolder and larger than the back chevron (1.3.0 header) */
.on-sheet__band > .on-sheet__btn:last-child svg {
  width: 58%;
  height: 58%;
  stroke-width: 2.8;
}
span.on-sheet__btn {
  background: none !important;
}
.on-sheet__title {
  min-width: 0;
  text-align: center;
}
.on-sheet__title h1 {
  font-weight: var(--w-semibold);
  font-size: calc(43 * var(--u));
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow: var(--on-colour-shadow);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-sheet--review .on-sheet__title h1,
.on-sheet--rematch .on-sheet__title h1,
.on-sheet--tv .on-sheet__title h1 {
  text-transform: none;
  font-size: calc(43 * var(--u));
}
.on-sheet__title p {
  margin-top: calc(2 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.2;
  text-shadow: var(--on-colour-shadow);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-sheet__body {
  flex: 1;
  min-height: 0;
  padding: calc(24 * var(--u)) calc(26 * var(--u));
  display: flex;
  flex-direction: column;
}
.on-sheet__body > * {
  flex: none;
}
.on-sheet__body > .on-lobby {
  flex: 1;
}
.on-sheet__footer {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
  padding: calc(14 * var(--u)) calc(26 * var(--u)) calc(30 * var(--u));
}
.on-sheet__footer .btn--slate,
.on-sheet__footer .btn--white,
.on-sheet__footer .btn--danger {
  --btn-h: calc(86 * var(--u));
  --btn-font: calc(26 * var(--u));
}
.on-sheet__footer .btn--yellow {
  --btn-h: calc(108 * var(--u));
}
/* The action icons are white glyphs with a dark outline: on a white button they wash out, so they print in
   the label's own navy there (brightness(0) turns the glyph black, the tint pulls it to the ink colour). */
.on-sheet .btn--white .btn__icon,
.on-page .btn--white .btn__icon,
.on-confirm .btn--white .btn__icon {
  filter: brightness(0) invert(11%) sepia(38%) saturate(2400%) hue-rotate(204deg) brightness(0.92);
}
.on-sheet__footer .on-lobby__actions .btn--slate {
  --btn-h: calc(108 * var(--u));
  --btn-font: calc(32 * var(--u));
}
.layout-wide .on-sheet {
  width: min(calc(100% - 64px), 760px);
  margin: 20px auto 24px;
  border-radius: 28px;
  flex: 1 1 auto;
}
.layout-wide .on-sheet--lobby {
  width: min(calc(100% - 64px), 1060px);
}
.layout-wide .on-sheet__band {
  padding-left: 28px;
  padding-right: 28px;
}
.layout-wide .on-sheet__body {
  padding: 28px 32px;
}
.layout-wide .on-sheet__footer {
  padding: 16px 32px 32px;
}
.layout-wide .on-sheet__footer .btn--yellow {
  align-self: stretch;
}

/* ---- Review & Invite ------------------------------------------------------------------------------------- */
.on-review {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.on-review__hero {
  display: flex;
  align-items: center;
  gap: calc(26 * var(--u));
  padding: calc(18 * var(--u)) calc(26 * var(--u));
  min-height: calc(160 * var(--u));
}
.on-review__hero h2 {
  min-width: 0;
  font-weight: var(--w-bold);
  font-size: calc(43 * var(--u));
  line-height: 1.15;
  color: var(--accent, #4b6a14);
  color: color-mix(in srgb, var(--accent, #6f9e0d) 70%, #000);
}
.on-hero-ring {
  --accent: #6f9e0d;
  display: grid;
  place-items: center;
  flex: none;
  width: calc(116 * var(--u));
  height: calc(116 * var(--u));
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 calc(6 * var(--u)) var(--accent);
}
.on-hero-ring__art {
  width: 62%;
  height: 62%;
  object-fit: contain;
}
.on-hero-ring__glyph {
  width: 56%;
  height: 56%;
  background: var(--accent);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.on-hero-ring__letter {
  font-weight: var(--w-bold);
  font-size: calc(56 * var(--u));
  color: var(--accent);
}
.on-review__rules {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(18 * var(--u)) calc(20 * var(--u));
  padding: calc(26 * var(--u)) calc(28 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.2;
  color: #4a5a78;
}
.on-review__rules--wait {
  display: block;
  font-size: calc(32 * var(--u));
}
.on-review__price {
  padding: calc(24 * var(--u)) calc(28 * var(--u)) calc(20 * var(--u));
}
.on-review__price > header {
  display: flex;
  justify-content: space-between;
  gap: calc(16 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(27 * var(--u));
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.on-review__amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(14 * var(--u));
  padding: calc(14 * var(--u)) 0 calc(18 * var(--u));
  border-bottom: calc(2 * var(--u)) solid #e6ebed;
}
.on-review__amount strong {
  font-weight: var(--w-bold);
  font-size: calc(98 * var(--u));
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.on-review__amount img {
  width: calc(86 * var(--u));
  height: calc(86 * var(--u));
}
.on-review__amount span {
  align-self: flex-end;
  padding-bottom: calc(24 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(36 * var(--u));
  color: var(--ink-soft);
}
.on-review__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(20 * var(--u));
  padding-top: calc(16 * var(--u));
}
.on-review__split > div {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  min-width: 0;
}
.on-review__split img {
  flex: none;
  width: calc(80 * var(--u));
  height: calc(80 * var(--u));
  object-fit: contain;
}
.on-review__split span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.on-review__split small {
  font-weight: var(--w-semibold);
  font-size: calc(30 * var(--u));
  color: var(--ink);
}
.on-review__split b {
  font-weight: var(--w-bold);
  font-size: calc(38 * var(--u));
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.on-review__split-price {
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
}
.on-review__split .on-review__split-price img {
  width: calc(36 * var(--u));
  height: calc(36 * var(--u));
}
.on-review__balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(4 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  color: #4a5a78;
}
.on-review__balance b {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(42 * var(--u));
  color: var(--ink);
}
.on-review__balance img {
  width: calc(62 * var(--u));
  height: calc(62 * var(--u));
}
.on-review__note {
  padding: 0 calc(4 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.35;
  color: #4a5a78;
  white-space: pre-line;
}
.on-sheet__footer .btn--muted {
  opacity: 0.9;
}

/* ---- the lobby ---------------------------------------------------------------------------------------------- */
.on-lobby {
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
  min-height: 100%;
}
.on-lobby__left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
}
.on-roster {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
}
.on-seat {
  display: flex;
  align-items: center;
  gap: calc(26 * var(--u));
  min-height: calc(148 * var(--u));
  padding: calc(16 * var(--u)) calc(28 * var(--u)) calc(16 * var(--u)) calc(26 * var(--u));
  border-radius: calc(41 * var(--u));
  background: #fefefe;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e6ebed;
}
.on-seat.is-left {
  opacity: 0.55;
}
.on-seat__text {
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
  min-width: 0;
}
.on-seat__name {
  font-weight: var(--w-extrabold);
  font-size: calc(43 * var(--u));
  letter-spacing: 0.045em;
  line-height: 1.15;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-seat__role {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  color: #737f88;
}
.on-seat__role .is-ready {
  font-weight: var(--w-semibold);
  color: #237446;
}
.on-invite-row {
  display: flex;
  align-items: center;
  gap: calc(26 * var(--u));
  width: 100%;
  min-height: calc(142 * var(--u));
  padding: calc(14 * var(--u)) calc(26 * var(--u)) calc(14 * var(--u)) calc(26 * var(--u));
  border-radius: calc(41 * var(--u));
  background: #edf4fe;
  border: calc(3.4 * var(--u)) dashed #86a9e6;
  text-align: left;
  color: #2c5fc4;
  transition: background-color var(--t-fast);
}
.on-invite-row:hover:not(:disabled) {
  background: #e3eefd;
}
.on-invite-row:disabled {
  opacity: 0.55;
}
.on-invite-row__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
  border-radius: 50%;
  background: #dce8fa;
  color: #3366cc;
}
.on-invite-row__icon svg {
  width: 48%;
  height: 48%;
}
.on-invite-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
}
.on-invite-row__text b {
  font-weight: var(--w-bold);
  font-size: calc(43 * var(--u));
  line-height: 1.1;
  color: #2f62c8;
}
.on-invite-row__text span {
  font-weight: var(--w-medium);
  font-size: calc(27 * var(--u));
  letter-spacing: 0.05em;
  color: #6b7388;
}
.on-invite-row__chevron {
  flex: none;
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  color: #2f62c8;
}
.on-invite-row__chevron svg {
  width: 100%;
  height: 100%;
  stroke-width: 3;
}
/* the stage takes whatever height the seats leave; its size never depends on the robot inside it
   (a robot that changed the stage's height would flip the "does it fit" measure back and forth) */
.on-stage {
  position: relative;
  flex: 1 1 0;
  min-height: calc(40 * var(--u));
  overflow: hidden;
}
.on-stage__robot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(440 * var(--u));
  height: calc(440 * var(--u));
  transform: translate(-50%, -50%);
}
.on-stage__shadow {
  position: absolute;
  left: 50%;
  bottom: calc(6 * var(--u));
  width: calc(260 * var(--u));
  height: calc(70 * var(--u));
  transform: translateX(-50%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: 0.5;
}
.on-stage__bot {
  position: absolute;
  inset: 0 0 calc(28 * var(--u)) 0;
}
.on-settings-row {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  width: 100%;
  min-height: calc(139 * var(--u));
  padding: calc(14 * var(--u)) calc(28 * var(--u)) calc(14 * var(--u)) calc(22 * var(--u));
  border-radius: calc(41 * var(--u));
  background: #fefefe;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #e6ebed,
    0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.05);
  text-align: left;
}
.on-settings-row:disabled {
  cursor: default;
}
.on-settings-row:hover:not(:disabled) {
  background: #fbfcfb;
}
.on-settings-row__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
}
.on-settings-row__text b {
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  line-height: 1.12;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-settings-row__text span {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.25;
  color: #737f88;
  /* a longer summary ("... • Results at the end") wraps to a second line instead of being cut */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
/* Unity's lobby footer breathes more than the shared sheet footer: more air above and below the actions */
.on-sheet--lobby .on-sheet__footer {
  gap: calc(20 * var(--u));
  padding-bottom: calc(52 * var(--u));
}
.on-sheet--lobby .on-link {
  margin-top: calc(12 * var(--u));
}
.on-settings-row__edit {
  display: inline-flex;
  align-items: center;
  gap: calc(6 * var(--u));
  flex: none;
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  color: var(--ink);
}
.on-settings-row__edit svg {
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  stroke-width: 3.4;
}
.on-disc {
  --accent: #43966d;
  display: grid;
  place-items: center;
  flex: none;
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
  border-radius: 50%;
  background: var(--accent);
}
.on-disc img {
  width: 66%;
  height: 66%;
  object-fit: contain;
}
.on-disc__glyph {
  width: 58%;
  height: 58%;
  background: #fff;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}
.on-disc__letter {
  font-weight: var(--w-bold);
  font-size: calc(46 * var(--u));
  color: #fff;
}
.on-lobby__actions {
  display: grid;
  /* The leave button takes the width its whole label needs (Finnish POISTU PELISTÄ), the ready button the rest. */
  grid-template-columns: auto minmax(0, 1fr);
  gap: calc(26 * var(--u));
}
.on-lobby__actions .btn--slate .btn__label { white-space: nowrap; }
.on-sheet__footer .on-lobby__actions .btn {
  --btn-font: calc(32 * var(--u));
}
.on-lobby__actions .btn {
  min-width: 0;
  padding: 0 calc(20 * var(--u));
  gap: calc(12 * var(--u));
}
.on-sheet__footer .on-lobby__actions .btn--slate {
  --btn-font: calc(32 * var(--u));
}
.on-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: calc(14 * var(--u));
  align-self: center;
  padding: calc(8 * var(--u)) calc(20 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(34 * var(--u));
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: calc(6 * var(--u));
}
.on-link__icon { width: calc(42 * var(--u)); height: calc(42 * var(--u)); flex: none; }
.on-link:disabled {
  opacity: 0.4;
}

/* wide: seats on the left, the invitation card (QR + code) on the right */
.layout-wide .on-lobby--paired {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: stretch;
  gap: 28px;
}
.layout-wide .on-lobby--paired .on-lobby__right {
  align-self: start;
}
/* wide: the settings row, the actions and the TV link sit under the seats, the card keeps the full height */
.layout-wide .on-sheet__footer--inline {
  padding: 0;
  gap: 14px;
}
.layout-wide .on-lobby__left > .on-sheet__footer--inline {
  flex: none;
}
.layout-wide .on-stage__robot {
  width: 160px;
  height: 160px;
}
.layout-wide .on-stage__shadow {
  width: 120px;
  height: 32px;
}
.on-invite-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 20px;
  border-radius: 24px;
  background: #fefefe;
  box-shadow: inset 0 0 0 2px #e6ebed;
  text-align: center;
}
.on-invite-card h3 {
  font-weight: var(--w-bold);
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.on-invite-card p {
  font-size: 15px;
  color: #6b7388;
}
.on-invite-card__qr {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 230px;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px #e6ebed;
}
.on-invite-card__qr .on-qr,
.on-share__qr .on-qr {
  width: 100%;
  height: 100%;
  display: block;
}
.on-invite-card__wait {
  font-size: 15px;
  color: #6b7388;
}
.on-invite-card small,
.on-share__card small {
  font-weight: var(--w-medium);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #6b7388;
}
.on-invite-card .on-code {
  font-size: 40px;
}
.on-invite-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}
.on-invite-card__actions .btn {
  --btn-h: 50px;
  --btn-font: 16px;
  width: 100%;
  padding: 0 16px;
  min-width: 0;
}
.on-invite-card__note {
  font-size: 14px;
  color: #247948;
}
.on-qr--loading {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #eef1f4, #f8f9fa, #eef1f4);
  background-size: 200% 100%;
  animation: on-shimmer 1.2s linear infinite;
}
.reduced-motion .on-qr--loading {
  animation: none;
}
@keyframes on-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---- the invitation sheet ---------------------------------------------------------------------------------- */
.on-share {
  display: flex;
  flex-direction: column;
  gap: calc(22 * var(--u));
}
.on-share__intro {
  display: flex;
  align-items: center;
  gap: calc(26 * var(--u));
}
.on-share__robot {
  flex: none;
  width: calc(200 * var(--u));
  height: calc(250 * var(--u));
}
.on-share__intro h2 {
  font-weight: var(--w-bold);
  font-size: calc(53 * var(--u));
  line-height: 1.12;
  color: var(--ink);
}
.on-share__intro p {
  margin-top: calc(8 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: #7a8089;
}
.on-share__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: calc(24 * var(--u)) calc(28 * var(--u)) calc(26 * var(--u));
}
.on-share__card > header {
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  align-self: stretch;
}
.on-share__card > header div {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
  min-width: 0;
}
.on-share__card > header b {
  font-weight: var(--w-bold);
  font-size: calc(39 * var(--u));
  line-height: 1.15;
  color: var(--ink);
}
.on-share__card > header div span {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: #7a8089;
}
.on-share__qr {
  display: grid;
  place-items: center;
  width: min(100%, calc(480 * var(--u)));
  aspect-ratio: 1;
  margin: calc(8 * var(--u)) 0;
  overflow: hidden;
}
.on-share__unavailable {
  padding: 0 calc(24 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(32 * var(--u));
  color: #8a6418;
}
.on-share__card small {
  font-size: calc(23 * var(--u));
}
.on-share__scan {
  font-weight: var(--w-medium);
  font-size: calc(26 * var(--u));
  color: #7a8089;
}
.on-share__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(16 * var(--u));
}
/* wide: the intro, the notice and the actions on the left, the QR card on the right at the sheet's full height */
.layout-wide .on-sheet--share {
  width: min(calc(100% - 64px), 960px);
}
.layout-wide .on-share--wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 32px;
  row-gap: 18px;
  align-items: start;
}
.layout-wide .on-share--wide .on-share__intro {
  grid-column: 1;
  grid-row: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.layout-wide .on-share--wide .on-share__card {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  padding: 24px 28px 28px;
}
.layout-wide .on-share--wide > .on-feedback {
  grid-column: 1;
  grid-row: 2;
}
.layout-wide .on-share--wide .on-share__actions {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
}
.layout-wide .on-share__qr {
  width: 280px;
}
.layout-wide .on-share__robot {
  width: 120px;
  height: 150px;
}
.layout-wide .on-share__intro h2 {
  font-size: 30px;
}
.layout-wide .on-share__intro p {
  font-size: 17px;
}
.layout-wide .on-code {
  font-size: 44px;
}
.layout-wide .on-share__card small,
.layout-wide .on-share__scan {
  font-size: 15px;
}
.layout-wide .on-share__card > header b {
  font-size: 24px;
}
.layout-wide .on-share__card > header div span {
  font-size: 16px;
}

/* ---- join / recovery / rematch / TV --------------------------------------------------------------------------- */
.on-join {
  display: flex;
  flex-direction: column;
  gap: calc(18 * var(--u));
}
.on-join__intro {
  display: flex;
  align-items: center;
  gap: calc(26 * var(--u));
}
.on-join__robot {
  flex: none;
  width: calc(180 * var(--u));
  height: calc(250 * var(--u));
}
.on-join__intro h2,
.on-join__heading {
  font-weight: var(--w-bold);
  font-size: calc(58 * var(--u));
  line-height: 1.12;
  color: var(--ink);
}
.on-join__intro p,
.on-join > p {
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: #7a8089;
}
.on-join__label {
  margin-top: calc(10 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.on-join__input {
  width: 100%;
  height: calc(136 * var(--u));
  padding: 0 calc(30 * var(--u));
  border-radius: calc(46 * var(--u));
  background: #ececef;
  font-weight: var(--w-medium);
  font-size: calc(50 * var(--u));
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  color: var(--ink);
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
}
.on-join__input::placeholder {
  color: #7a8089;
}
.on-join__input:focus-visible {
  box-shadow: inset 0 0 0 calc(4 * var(--u)) #337fe0;
  background: #f4f6fb;
}
.on-join__input--name {
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}
.on-join__hint {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: #7a8089;
}
.on-join__steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
  margin-top: calc(10 * var(--u));
}
.on-join__steps li {
  display: flex;
  align-items: center;
  gap: calc(26 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  color: #6b7388;
}
.on-join__steps li span {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(78 * var(--u));
  height: calc(78 * var(--u));
  border-radius: 50%;
  background: #e3eefb;
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  color: #1f3d7a;
}
.on-join--recovery,
.on-join--rematch {
  align-items: center;
  text-align: center;
}
.on-join__hero {
  width: calc(340 * var(--u));
  height: calc(380 * var(--u));
}
.on-join--recovery h2,
.on-join--rematch h2 {
  font-weight: var(--w-bold);
  font-size: calc(54 * var(--u));
  line-height: 1.12;
  color: var(--ink);
}
.on-join__context {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(32 * var(--u));
  color: var(--ink);
}
.on-join__initial {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: calc(64 * var(--u));
  height: calc(64 * var(--u));
  border-radius: 50%;
  background: #43966d;
  font-style: normal;
  font-weight: var(--w-bold);
  font-size: calc(32 * var(--u));
  color: #fff;
}
.on-join__intro--host {
  flex-wrap: wrap;
}
.on-join__intro--host > div {
  flex: 1;
  min-width: 0;
}
.on-join__category {
  font-weight: var(--w-semibold) !important;
  color: var(--ink) !important;
}
.on-join__rules {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
  padding: calc(24 * var(--u)) calc(28 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  color: #4a5a78;
}
.on-join__free {
  font-weight: var(--w-semibold);
  font-size: calc(32 * var(--u));
  color: #247948;
}
.on-join--wait {
  align-items: center;
  justify-content: center;
  min-height: calc(500 * var(--u));
}
.on-rematch__card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  padding: calc(24 * var(--u)) calc(28 * var(--u));
  text-align: left;
}
.on-rematch__card header {
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
}
.on-rematch__card header div {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.on-rematch__card header b {
  font-weight: var(--w-bold);
  font-size: calc(42 * var(--u));
  color: var(--ink);
}
.on-rematch__card header div span {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  color: #7a8089;
}
.on-rematch__card ul {
  list-style: none;
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.35;
  color: #4a5a78;
}
.on-rematch__card p {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  color: #7a8089;
}
.on-tv {
  align-items: center;
  text-align: center;
}
.on-tv h2 {
  font-weight: var(--w-bold);
  font-size: calc(52 * var(--u));
  line-height: 1.12;
  color: var(--ink);
}
.on-tv .on-join__input,
.on-tv .on-join__label,
.on-tv .on-join__hint {
  align-self: stretch;
}
.on-tv__facts {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding: calc(22 * var(--u)) calc(28 * var(--u));
  text-align: left;
}
.on-tv__facts div {
  display: flex;
  justify-content: space-between;
  gap: calc(20 * var(--u));
}
.on-tv__facts dt {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  color: #7a8089;
}
.on-tv__facts dd {
  font-weight: var(--w-semibold);
  font-size: calc(32 * var(--u));
  text-align: right;
  color: var(--ink);
}
.on-tv__list {
  align-self: stretch;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
}
.on-tv__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(20 * var(--u));
  padding: calc(18 * var(--u)) calc(24 * var(--u));
  text-align: left;
}
.on-tv__list span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.on-tv__list b {
  font-size: calc(36 * var(--u));
  color: var(--ink);
}
.on-tv__list small {
  font-size: calc(28 * var(--u));
  color: #7a8089;
}
.on-tv-preview {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
  text-align: left;
  color: var(--ink);
}
.on-tv-preview__phase {
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7388;
}
.on-tv-preview h3 {
  font-weight: var(--w-bold);
  font-size: calc(48 * var(--u));
  line-height: 1.2;
}
.on-tv-preview__options,
.on-tv-preview__roster {
  list-style: none;
  font-size: calc(34 * var(--u));
  line-height: 1.5;
}
.on-tv-preview__reveal {
  font-size: calc(32 * var(--u));
  color: #247948;
}
.layout-wide .on-join__hero {
  width: 180px;
  height: 200px;
}
.layout-wide .on-join__robot {
  width: 110px;
  height: 150px;
}
.layout-wide .on-join__input {
  height: 70px;
  font-size: 28px;
  border-radius: 24px;
}

/* the QR scanner (camera) */
.on-scanner {
  z-index: 70;
}
.on-scanner__card {
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: #f6f9f7;
  text-align: center;
}
.on-scanner__card h2 {
  font-weight: var(--w-bold);
  font-size: 22px;
  color: var(--ink);
}
.on-scanner__card video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  background: #0b0f16;
}
.on-scanner__card p {
  font-size: 15px;
  color: #6b7388;
}

/* ---- the private quiz ---------------------------------------------------------------------------------------------- */
.on-quiz-wait {
  position: absolute;
  inset: 0;
}
.on-quiz .quiz-banner__title {
  font-size: calc(48 * var(--u));
  letter-spacing: 0.01em;
}
/* the roster is the quiz's footer: it keeps its own height, long rooms scroll inside it so the question keeps room */
.on-quiz__roster {
  max-height: 34vh;
  overflow-y: auto;
  padding-top: calc(10 * var(--u));
}
.on-quiz__roster.is-stale {
  visibility: hidden;
}
.on-roster-panel {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding-top: calc(4 * var(--u));
}
.on-roster-panel__count {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  color: #5b6577;
}
.on-roster-panel__context {
  font-weight: var(--w-regular);
  font-size: calc(32 * var(--u));
  line-height: 1.25;
  color: var(--ink);
}
.on-rlist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
}
.on-rrow {
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  min-height: calc(112 * var(--u));
  padding: calc(14 * var(--u)) calc(24 * var(--u)) calc(14 * var(--u)) calc(20 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #fefefe;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #e6ebed,
    0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.05);
}
.on-rrow.is-own {
  box-shadow:
    inset 0 0 0 calc(4 * var(--u)) #0d8439,
    0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.05);
}
.on-rrow.is-left {
  opacity: 0.55;
}
.on-rrow__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
}
.on-rrow__text b {
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  line-height: 1.15;
  color: #031c26;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-rrow__text span {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.25;
  color: #5b6577;
  white-space: pre-line;
}
.on-rrow__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: calc(56 * var(--u));
  height: calc(56 * var(--u));
  border-radius: 50%;
  background: var(--danger);
}
.on-rrow.is-ok .on-rrow__mark {
  background: var(--correct);
}
.on-rrow__mark img {
  width: 54%;
  height: 54%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.on-duel {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(24 * var(--u));
}
.on-duel__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(12 * var(--u));
  padding: calc(28 * var(--u)) calc(16 * var(--u)) calc(24 * var(--u));
  border-radius: calc(41 * var(--u));
  background: #fefefe;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e6ebed;
  text-align: center;
}
.on-duel__card.is-own {
  box-shadow: inset 0 0 0 calc(4 * var(--u)) #0d8439;
}
.on-duel__name {
  font-weight: var(--w-bold);
  font-size: calc(38 * var(--u));
  line-height: 1.15;
  color: #031c26;
  overflow-wrap: anywhere;
}
.on-duel__answer {
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.25;
  color: #031c26;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.on-duel__mark {
  position: absolute;
  right: calc(18 * var(--u));
  top: calc(18 * var(--u));
  display: grid;
  place-items: center;
  width: calc(54 * var(--u));
  height: calc(54 * var(--u));
  border-radius: 50%;
  background: var(--danger);
}
.on-duel__card.is-ok .on-duel__mark {
  background: var(--correct);
}
.on-duel__mark img {
  width: 54%;
  height: 54%;
  filter: brightness(0) invert(1);
}
.on-duel__points {
  font-weight: var(--w-bold);
  font-size: calc(72 * var(--u));
  line-height: 1;
  color: #5b6577;
}
.on-duel__card.is-ok .on-duel__points {
  color: #0d8439;
}
.on-duel__final {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: #5b6577;
}

/* wide: the roster is a panel in the margin beside the centred question column (kept in flow on narrower
   screens). It is positioned against the column (.quiz__body): just right of its edge, as wide as the margin. */
@media (min-width: 1400px) {
  .layout-wide .on-quiz--wide .on-quiz__roster {
    position: absolute;
    top: calc(94 * var(--u));
    left: calc(100% + 28px);
    width: min(360px, calc(50vw - 50% - 56px));
    max-height: calc(100% - 94 * var(--u) - 24px);
    overflow-y: auto;
  }
  .layout-wide .on-quiz--wide .on-quiz__roster .on-duel {
    grid-template-columns: 1fr;
  }
  /* the open reveal card already shows everybody's choice: the panel steps aside while it is up */
  .layout-wide .on-quiz--wide .on-quiz__roster.is-covered {
    visibility: hidden;
  }
  .layout-wide .on-quiz--wide .on-quiz__roster .on-rrow__text b {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
.layout-wide .on-quiz .on-roster-panel__count {
  font-size: 15px;
}
.layout-wide .on-quiz .on-roster-panel__context {
  font-size: 15px;
}
.layout-wide .on-quiz .on-rrow {
  min-height: 62px;
  padding: 8px 14px 8px 10px;
  border-radius: 20px;
  gap: 12px;
}
.layout-wide .on-quiz .on-rrow__text b {
  font-size: 17px;
}
.layout-wide .on-quiz .on-rrow__text span {
  font-size: 14px;
}
.layout-wide .on-quiz .on-rrow__mark {
  width: 30px;
  height: 30px;
}
.layout-wide .on-quiz .on-duel__name {
  font-size: 18px;
}
.layout-wide .on-quiz .on-duel__answer {
  font-size: 15px;
}
.layout-wide .on-quiz .on-duel__points {
  font-size: 40px;
}

/* the reveal card (QuizRevealView, private) */
.on-quiz.is-loading .answer:disabled {
  --face: #f4f7f6;
  --lip: #d5dfdf;
  --ink-a: #6a7a86;
  cursor: wait;
}
.on-reveal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - var(--banner-h) - var(--safe-top) - calc(40 * var(--u)));
  border-radius: calc(56 * var(--u)) calc(56 * var(--u)) 0 0;
  background: var(--card-warm);
  box-shadow: 0 calc(-12 * var(--u)) calc(40 * var(--u)) rgba(0, 0, 0, 0.28);
  animation: on-rise var(--t-slow) var(--ease-out);
}
@keyframes on-rise {
  from {
    transform: translateY(24%);
    opacity: 0;
  }
}
.reduced-motion .on-reveal {
  animation: none;
}
.layout-wide .on-reveal {
  left: 50%;
  right: auto;
  width: min(100%, calc(1080 * var(--u)));
  transform: translateX(-50%);
  animation: none;
}
.on-reveal__scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
  padding: calc(24 * var(--u)) calc(50 * var(--u)) calc(16 * var(--u));
}
.on-reveal__scroll > * {
  flex: none;
}
.on-reveal--recap:has(.on-recap__clue) {
  height: calc(100% - var(--banner-h) - var(--safe-top) - calc(40 * var(--u)));
}
.on-recap__clue .question-card {
  gap: calc(24 * var(--u));
  padding: calc(32 * var(--u));
}
.on-recap__clue .question-card__media {
  width: 100%;
}
.on-recap__clue .question-card__picture {
  width: 100%;
  height: auto;
  aspect-ratio: 1.52;
}
.on-recap__clue .question-card__text {
  font-size: calc(38 * var(--u));
  line-height: 1.35;
}
.layout-wide .on-recap__clue .question-card__picture {
  height: min(24vh, calc(400 * var(--u)));
  aspect-ratio: auto;
}
.on-reveal__hero {
  display: flex;
  align-items: center;
  gap: calc(28 * var(--u));
}
.on-reveal__hole {
  --tone: var(--correct);
  position: relative;
  flex: none;
  width: calc(210 * var(--u));
  height: calc(210 * var(--u));
  border-radius: 50%;
  background: #f0f6f3;
  box-shadow: inset 0 0 0 calc(8 * var(--u)) color-mix(in srgb, var(--tone) 80%, #000);
}
.on-reveal.is-wrong .on-reveal__hole {
  --tone: var(--danger);
  background: #fbf0ee;
}
.on-reveal__robot {
  position: absolute;
  left: 50%;
  bottom: calc(10 * var(--u));
  width: 86%;
  height: 108%;
  transform: translateX(-50%);
}
.on-reveal__hero h2 {
  font-weight: var(--w-bold);
  font-size: calc(76 * var(--u));
  line-height: 1;
  color: var(--correct-ink);
}
.on-reveal.is-wrong .on-reveal__hero h2 {
  color: var(--danger-ink);
}
.on-reveal__answer {
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
  padding: calc(18 * var(--u)) calc(28 * var(--u));
  border-radius: calc(34 * var(--u));
  background: #eaf5ee;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #bfe2c8;
}
.on-reveal__answer small {
  font-weight: var(--w-semibold);
  font-size: calc(26 * var(--u));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--correct-ink);
}
.on-reveal__answer b {
  font-weight: var(--w-bold);
  font-size: calc(44 * var(--u));
  line-height: 1.2;
  color: var(--correct-ink);
}
.on-reveal__explanation {
  padding: calc(20 * var(--u)) calc(28 * var(--u));
  border-radius: calc(34 * var(--u));
  background: #f1f6f3;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #d9e5de;
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.35;
  color: #3e4a56;
}
.on-reveal__mascot {
  font-weight: var(--w-semibold);
  font-size: calc(32 * var(--u));
  text-align: center;
  color: #5b6577;
}
.on-reveal__footer {
  flex: none;
  padding: calc(12 * var(--u)) calc(50 * var(--u)) calc(var(--safe-bottom) + 28 * var(--u));
}
.on-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(18 * var(--u));
  min-height: calc(100 * var(--u));
  border-radius: 999px;
  background: #e9edf1;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #d6dce3;
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  letter-spacing: 0.05em;
  color: #5b6577;
}
.on-wait__dots {
  display: inline-flex;
  gap: calc(8 * var(--u));
}
.on-wait__dots i {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
  border-radius: 50%;
  background: #5b6577;
  animation: on-dot 1.2s ease-in-out infinite;
}
.on-wait__dots i:nth-child(2) {
  animation-delay: 0.15s;
}
.on-wait__dots i:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes on-dot {
  50% {
    transform: translateY(calc(-8 * var(--u)));
    opacity: 0.45;
  }
}
.reduced-motion .on-wait__dots i {
  animation: none;
}

/* the reconnect banner */
.on-reconnect {
  position: absolute;
  left: calc(30 * var(--u));
  right: calc(30 * var(--u));
  top: calc(var(--banner-h) + var(--safe-top) + 14 * var(--u));
  z-index: 35;
  display: grid;
  grid-template-columns: calc(150 * var(--u)) 1fr;
  gap: calc(20 * var(--u));
  align-items: center;
  padding: calc(18 * var(--u)) calc(26 * var(--u));
  border-radius: calc(40 * var(--u));
  background: #fff6df;
  box-shadow:
    inset 0 0 0 calc(3 * var(--u)) #e6d49c,
    0 calc(10 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, 0.2);
  color: #6c5117;
}
.on-reconnect__robot {
  width: calc(150 * var(--u));
  height: calc(170 * var(--u));
}
.on-reconnect__text {
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
}
.on-reconnect__text h3 {
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
}
.on-reconnect__text p {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.25;
}
.on-reconnect__text small {
  font-size: calc(26 * var(--u));
  opacity: 0.85;
}
.on-reconnect__actions {
  grid-column: 1 / -1;
  display: flex;
  gap: calc(16 * var(--u));
  justify-content: flex-end;
}
.layout-wide .on-reconnect {
  left: 50%;
  right: auto;
  width: min(calc(100% - 40px), calc(1000 * var(--u)));
  transform: translateX(-50%);
}

/* the answer review (recap): the reveal card of a finished round, with the three actions in its footer */
.on-reveal__kicker {
  margin-bottom: calc(-6 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5b6577;
}
/* NEXT ANSWER on its own row, the other two side by side */
.on-recap__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(14 * var(--u));
}
.on-recap__actions .btn {
  --btn-h: calc(96 * var(--u));
  --btn-font: calc(30 * var(--u));
  padding-left: calc(20 * var(--u));
  padding-right: calc(20 * var(--u));
}
.on-recap__actions .btn:first-child,
.on-recap__actions .btn:nth-child(2):last-child {
  grid-column: 1 / -1;
}
.on-recap__actions .btn--compact {
  --btn-h: calc(84 * var(--u));
  --btn-font: calc(26 * var(--u));
}
.on-recap__actions .btn__label {
  min-width: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.05;
}

/* ---- results --------------------------------------------------------------------------------------------------------- */
.on-result {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: calc(20 * var(--u)) calc(30 * var(--u)) calc(30 * var(--u));
}
.on-result__card {
  margin: auto 0;
  animation: pop-in var(--t-slow) var(--ease-spring);
}
.app--phone .on-result {
  /* HubFrame already reserves the fixed tabs. Add only the card's breathing room. */
  padding-bottom: calc(var(--safe-bottom) + 64 * var(--u));
}
.on-result__context {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(4 * var(--u));
  padding: calc(14 * var(--u)) calc(20 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.3;
  color: #5b6577;
}
.on-result__context b {
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  color: var(--ink);
}
.on-result__payment {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  font-weight: var(--w-semibold);
  color: var(--ink);
}
.on-result__payment img {
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
}
.on-score {
  align-self: stretch;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  margin-top: calc(4 * var(--u));
}
.on-score__row {
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(14 * var(--u)) calc(24 * var(--u)) calc(14 * var(--u)) calc(18 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #f4f1ea;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e3dfd6;
  text-align: left;
}
.on-score__row.is-first {
  background: #eaf5ee;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #bfe2c8;
}
.on-score__row.is-own {
  box-shadow: inset 0 0 0 calc(4 * var(--u)) #0d8439;
}
.on-score__rank {
  flex: none;
  min-width: calc(40 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(44 * var(--u));
  color: var(--ink);
}
.on-score__text {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
  min-width: 0;
}
.on-score__text b {
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  color: #031c26;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-score__text span {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: #5b6577;
}
.on-score--duel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(20 * var(--u));
}
.on-score__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(22 * var(--u)) calc(14 * var(--u));
  border-radius: calc(41 * var(--u));
  background: #f4f1ea;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e3dfd6;
}
.on-score__card.is-own {
  box-shadow: inset 0 0 0 calc(4 * var(--u)) #0d8439;
}
.on-score__card b {
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  line-height: 1.15;
  color: #031c26;
  overflow-wrap: anywhere;
}
.on-score__card strong {
  font-weight: var(--w-bold);
  font-size: calc(84 * var(--u));
  line-height: 1;
  color: var(--ink);
}
.on-score__card small {
  font-size: calc(26 * var(--u));
  color: #5b6577;
}
/* One primary (yellow, tallest), one secondary (blue), then the quiet white actions. The px floors keep every action a
   44 px touch target on small phones and keep the order of heights (primary > share > quiet) at every width. */
.on-result .result-card__actions {
  gap: max(8px, calc(20 * var(--u)));
}
.on-result .result-card__actions .btn {
  --btn-h: max(50px, calc(104 * var(--u)));
  --btn-font: calc(38 * var(--u));
}
.on-result .result-card__actions .btn--lg {
  --btn-h: max(56px, calc(120 * var(--u)));
}
.on-result .result-card__actions .btn--compact {
  --btn-h: max(44px, calc(88 * var(--u)));
  --btn-font: calc(32 * var(--u));
}
.on-result .result-card__actions .btn--compact .btn__icon {
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
}
/* While one action runs the others are disabled, but keep their faces: a stack of grey reads as a dead screen. */
.on-result .result-card__actions.is-busy .btn:disabled {
  cursor: progress;
}
.on-result .result-card__actions.is-busy .btn--yellow:disabled {
  --btn-base: #ffc800;
  --btn-edge: var(--amber-edge);
}
.on-result .result-card__actions.is-busy .btn--blue:disabled {
  --btn-base: #337fe0;
  --btn-edge: color-mix(in srgb, var(--btn-base) 58%, #000000);
}
.on-result .result-card__actions.is-busy .btn--white:disabled {
  --btn-base: #ffffff;
  --btn-edge: transparent;
}
/* wide: the verdict on the left, the game summary, the scoreboard and the actions on the right */
.on-result__main,
.on-result__side {
  display: contents;
}
.layout-wide .on-result__card {
  width: min(100%, 1000px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 48px;
  align-items: center;
  padding: 32px 48px 36px;
}
.layout-wide .on-result__main,
.layout-wide .on-result__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.layout-wide .on-result__side .on-score {
  width: 100%;
}
.layout-wide .on-result .result-card__hero {
  height: 220px;
}
.layout-wide .on-result .result-card__circle {
  width: 200px;
  height: 200px;
}
.layout-wide .on-result .result-card__robot {
  width: 172px;
  height: 190px;
}
.layout-wide .on-result .result-card__title {
  font-size: 40px;
}
.layout-wide .on-result .result-card__subtitle {
  font-size: 18px;
}
.layout-wide .on-result .result-card__box {
  width: 280px;
  height: 80px;
  font-size: 36px;
  border-radius: 22px;
}
.layout-wide .on-result .result-card__caption,
.layout-wide .on-result__context {
  font-size: 15px;
}
.layout-wide .on-result__context b {
  font-size: 20px;
}
.layout-wide .on-score__text b {
  font-size: 19px;
}
.layout-wide .on-score__text span {
  font-size: 15px;
}
.layout-wide .on-score__rank {
  font-size: 24px;
}
.layout-wide .on-score__card b {
  font-size: 20px;
}
.layout-wide .on-score__card strong {
  font-size: 48px;
}
.layout-wide .on-result .result-card__actions {
  width: 100%;
}
.layout-wide .on-result .result-card__actions .btn {
  --btn-h: 58px;
  --btn-font: 20px;
}
.layout-wide .on-result .result-card__actions .btn--lg {
  --btn-h: 64px;
}
.layout-wide .on-result .result-card__actions .btn--compact {
  --btn-h: 50px;
  --btn-font: 17px;
}

/* ---- wide: type that the fixed unit makes too small gets a floor ------------------------------------------------------- */
.layout-wide .on-seat__name {
  font-size: 22px;
}
.layout-wide .on-seat__role {
  font-size: 15px;
}
.layout-wide .on-seat {
  min-height: 84px;
  border-radius: 24px;
  gap: 16px;
}
.layout-wide .on-invite-row__text b {
  font-size: 22px;
}
.layout-wide .on-invite-row__text span {
  font-size: 15px;
}
.layout-wide .on-settings-row__text b {
  font-size: 22px;
}
.layout-wide .on-settings-row__text span {
  font-size: 15px;
}
.layout-wide .on-settings-row__edit {
  font-size: 17px;
}
.layout-wide .on-link {
  font-size: 16px;
}
.layout-wide .on-sheet__footer .btn {
  --btn-font: 18px;
  --btn-h: 58px;
}
.layout-wide .on-sheet__footer .btn--slate,
.layout-wide .on-sheet__footer .btn--white,
.layout-wide .on-sheet__footer .btn--danger {
  --btn-h: 52px;
  --btn-font: 16px;
}
.layout-wide .on-sheet__footer .btn--yellow {
  --btn-h: 58px;
}
.layout-wide .on-sheet__footer .on-lobby__actions .btn--slate {
  --btn-h: 58px;
  --btn-font: 18px;
}
.layout-wide .on-sheet__title h1 {
  font-size: 26px;
}
.layout-wide .on-sheet--review .on-sheet__title h1,
.layout-wide .on-sheet--rematch .on-sheet__title h1,
.layout-wide .on-sheet--tv .on-sheet__title h1 {
  font-size: 28px;
}
.layout-wide .on-sheet__title p {
  font-size: 15px;
}
.layout-wide .on-sheet__band {
  min-height: 80px;
}
.layout-wide .on-sheet__btn {
  width: 48px;
  height: 48px;
}
.layout-wide .on-sheet__band {
  grid-template-columns: 48px 1fr 48px;
}
.layout-wide .on-review__hero h2 {
  font-size: 26px;
}
.layout-wide .on-hero-ring {
  width: 72px;
  height: 72px;
}
.layout-wide .on-review__rules {
  font-size: 18px;
}
.layout-wide .on-review__price > header {
  font-size: 15px;
}
.layout-wide .on-review__amount strong {
  font-size: 64px;
}
.layout-wide .on-review__amount img {
  width: 48px;
  height: 48px;
}
.layout-wide .on-review__amount span {
  font-size: 20px;
  padding-bottom: 12px;
}
.layout-wide .on-review__split img {
  width: 44px;
  height: 44px;
}
.layout-wide .on-review__split small {
  font-size: 16px;
}
.layout-wide .on-review__split b {
  font-size: 21px;
}
.layout-wide .on-review__split .on-review__split-price img {
  width: 22px;
  height: 22px;
}
.layout-wide .on-review__balance {
  font-size: 18px;
}
.layout-wide .on-review__balance b {
  font-size: 22px;
}
.layout-wide .on-review__balance img {
  width: 34px;
  height: 34px;
}
.layout-wide .on-review__note,
.layout-wide .on-review__rules--wait {
  font-size: 17px;
}
.layout-wide .on-join__intro h2,
.layout-wide .on-join__heading {
  font-size: 30px;
}
.layout-wide .on-join__intro p,
.layout-wide .on-join > p,
.layout-wide .on-join__hint {
  font-size: 17px;
}
.layout-wide .on-join__label {
  font-size: 14px;
}
.layout-wide .on-join__steps li {
  font-size: 19px;
}
.layout-wide .on-join__steps li span {
  width: 42px;
  height: 42px;
  font-size: 19px;
}
.layout-wide .on-join--recovery h2,
.layout-wide .on-join--rematch h2,
.layout-wide .on-tv h2 {
  font-size: 28px;
}
.layout-wide .on-join__rules,
.layout-wide .on-rematch__card ul {
  font-size: 18px;
}
.layout-wide .on-join__free,
.layout-wide .on-join__context {
  font-size: 17px;
}
.layout-wide .on-rematch__card header b {
  font-size: 22px;
}
.layout-wide .on-rematch__card header div span,
.layout-wide .on-rematch__card p {
  font-size: 16px;
}
.layout-wide .on-tv__facts dt {
  font-size: 15px;
}
.layout-wide .on-tv__facts dd {
  font-size: 17px;
}
.layout-wide .on-tv__list b {
  font-size: 19px;
}
.layout-wide .on-tv__list small {
  font-size: 15px;
}
.layout-wide .on-badge {
  font-size: 14px;
  min-height: 30px;
  padding: 0 14px;
}
.layout-wide .on-feedback {
  font-size: 16px;
  padding: 12px 16px 12px 22px;
  border-radius: 16px;
}
.layout-wide .on-feedback::before {
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 4px;
}
.layout-wide .on-confirm {
  padding: 28px 32px 30px;
  gap: 14px;
  border-radius: 30px;
}
.layout-wide .on-confirm h2 {
  font-size: 30px;
}
.layout-wide .on-confirm p {
  font-size: 17px;
}
.layout-wide .on-confirm .btn {
  --btn-h: 56px;
  --btn-font: 18px;
}
.layout-wide .on-confirm .btn--danger {
  --btn-h: 50px;
  --btn-font: 16px;
}
.layout-wide .on-reveal__scroll {
  padding: 20px 32px 12px;
  gap: 14px;
}
.layout-wide .on-reveal__hole {
  width: 120px;
  height: 120px;
}
.layout-wide .on-reveal__hero h2 {
  font-size: 44px;
}
.layout-wide .on-reveal__answer small {
  font-size: 14px;
}
.layout-wide .on-reveal__answer b {
  font-size: 22px;
}
.layout-wide .on-reveal__explanation {
  font-size: 17px;
}
.layout-wide .on-reveal__mascot {
  font-size: 16px;
}
.layout-wide .on-reveal__footer {
  padding: 8px 32px 20px;
}
.layout-wide .on-wait {
  font-size: 18px;
  min-height: 56px;
}
.layout-wide .on-reconnect {
  padding: 14px 20px;
}
.layout-wide .on-reconnect__text h3 {
  font-size: 20px;
}
.layout-wide .on-reconnect__text p {
  font-size: 16px;
}
.layout-wide .on-reconnect__text small {
  font-size: 14px;
}
.layout-wide .on-reconnect__robot {
  width: 90px;
  height: 100px;
}
.layout-wide .on-reconnect {
  grid-template-columns: 90px 1fr;
}
/* answer review, wide: the three actions share one row of the reveal card */
.layout-wide .on-recap__actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 0;
}
.layout-wide .on-recap__actions .btn {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
  --btn-h: 54px;
  --btn-font: 17px;
}
.layout-wide .on-recap__actions .btn:first-child {
  order: 3;
}
.layout-wide .on-reveal__kicker {
  font-size: 15px;
}

/* section titles: Rubik SemiBold, uppercase, character spacing 6 (FriendsSetup prefab) */
.on-section__head h2 {
  letter-spacing: 0.06em;
}


/* a lost private game: the title and the score wear the fail accent (QuizResultPanelView.BindCopy) */
.on-result__card.result-card--lose {
  --result-accent: var(--danger);
}
.on-tv-preview__picture .question-card{min-height:calc(360 * var(--u));margin:calc(20 * var(--u)) 0}
.on-tv-preview__picture .question-card__picture{width:calc(300 * var(--u));height:calc(300 * var(--u))}
.on-section .on-format-hint{margin:calc(20 * var(--u)) 0 0;line-height:1.35}
.layout-wide .on-page--setup-wide .on-page__footer .on-page__column{padding-top:0;padding-bottom:0}
.layout-wide .on-page--setup-wide .on-page__footer{padding-bottom:calc(var(--safe-bottom) + 36 * var(--u))}

/* Online: the category and the Game Settings card (settings-summary.js, couch.css) at the top, the mode robot below them */
.on-page--setup .on-settings,
.on-page--setup:not(.on-page--setup-wide) .on-settings {
  justify-content: flex-start;
}
.layout-wide .on-page--setup-wide .on-page__column {
  max-width: calc(980 * var(--u) + 48px);
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.layout-wide .on-page--setup-wide .on-settings {
  flex: 1 1 auto;
}
.layout-wide .on-page--setup-wide .on-page__body{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 24 * var(--u)),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 24 * var(--u)),transparent)}

/* One-tap party start (#/online/party). */
.on-party__topic { margin: 0 0 10px; font-weight: 700; }
.on-party__choices {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
  margin-bottom: calc(10 * var(--u));
}
.on-party__choice {
  display: flex;
  align-items: center;
  gap: calc(28 * var(--u));
  width: 100%;
  min-height: calc(124 * var(--u));
  padding: calc(16 * var(--u)) calc(36 * var(--u));
  border: 0;
  border-radius: calc(46 * var(--u));
  background: #ececef;
  color: var(--ink);
  font-family: inherit;
  font-weight: var(--w-medium);
  font-size: calc(46 * var(--u));
  line-height: 1.15;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.on-party__choice-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.on-party__radio {
  flex: none;
  width: calc(58 * var(--u));
  height: calc(58 * var(--u));
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #aab1be;
}
.on-party__choice.is-picked {
  background: #e3eefb;
  font-weight: var(--w-bold);
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #337fe0;
}
.on-party__choice.is-picked .on-party__radio {
  background: #337fe0;
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #337fe0, inset 0 0 0 calc(17 * var(--u)) #fff;
}
.on-party__choice:focus-visible {
  outline: calc(5 * var(--u)) solid #337fe0;
  outline-offset: calc(4 * var(--u));
}
.on-party__choice:disabled {
  opacity: 0.6;
}

/* Who has joined, in the share sheet's footer: always in view while the host shares the link. */
.on-share__joined {
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  width: 100%;
}
.on-share__joined-title {
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7388;
}
.on-share__chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: calc(10 * var(--u));
  margin: 0;
  padding: 0;
}
.on-share__chip {
  max-width: 100%;
  padding: calc(10 * var(--u)) calc(30 * var(--u));
  border-radius: calc(40 * var(--u));
  background: #e3eefb;
  color: #1f3d7a;
  font-weight: var(--w-bold);
  font-size: calc(36 * var(--u));
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.on-share__chip.is-host {
  background: #1f3d7a;
  color: #fff;
}

/* A long call to action on the result card keeps its whole label at the same size as SHARE RESULT: tighter sides and no
   letter-spacing make PLAY AGAIN WITH EVERYONE (and the Finnish PELAA UUDELLEEN YHDESSÄ) fit at 360 px. */
.on-result .result-card__actions .btn.btn--long {
  --btn-font: calc(38 * var(--u));
  padding-inline: calc(34 * var(--u));
  letter-spacing: 0;
}
.layout-wide .on-result .result-card__actions .btn.btn--long {
  --btn-font: 20px;
}
