/*
  Couch Clash (local pass-the-phone multiplayer). Geometry in canvas units from the Unity prefabs:
  LocalMultiplayerSetup / SettingsSectionCard / SegmentedChip / RoundsSelector / CategorySlot / GamePreviewSection /
  PlayerRow, NextPlayerTurn, CouchPassBar, CouchLockedMark, LocalMultiplayerRecapPopup / RecapAnswerRow,
  LocalEndSummary. Colours: CategoryPreviewTheme (ink, muted, card, outline, green, red) and BrandPalette.
*/
.couch {
  --couch-track: 0.045em;
  --c-ink: #031c26;
  --c-muted: #808890;
  --c-card: #fefefe;
  --c-outline: #e6e6e7;
  --c-green: #0d8439;
  --c-green-soft: #e0efe5;
  --c-red: #e0443a;
  --c-red-soft: #fdece9;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background-color: #c6f2d6;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.couch-fit {
  display: block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.couch-fit.is-wrapped {
  white-space: normal;
  line-height: 1.15;
  text-overflow: clip;
}


/* ---- the Couch buttons (BaseButtonView as captured in 1.3.0) ------------------------------------------------
   A flat gradient face inside a pale ring (the face colour lifted towards white), no lip, a soft drop shadow, and the
   label and icon outlined in the button's own dark edge colour. Rubik ExtraBold at its natural spacing. */
.couch .btn {
  --btn-font: calc(31 * var(--u));
  --btn-ring-top: color-mix(in srgb, var(--btn-base) 40%, #ffffff);
  --btn-ring-bottom: color-mix(in srgb, var(--btn-base) 50%, #ffffff);
  --btn-face-top: color-mix(in srgb, var(--btn-base) 90%, #ffffff);
  box-sizing: border-box;
  border: calc(6 * var(--u)) solid transparent;
  background:
    linear-gradient(180deg, var(--btn-face-top), var(--btn-base)) padding-box,
    linear-gradient(180deg, var(--btn-ring-top), var(--btn-ring-bottom)) border-box;
  box-shadow: 0 calc(6 * var(--u)) calc(14 * var(--u)) rgba(16, 64, 36, 0.2);
  text-shadow: 0 calc(3 * var(--u)) 0 var(--btn-edge);
  -webkit-text-stroke: calc(5 * var(--u)) var(--btn-edge);
  paint-order: stroke fill;
}
.couch .btn:active:not(:disabled),
.couch .btn.is-pressed {
  box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(16, 64, 36, 0.2);
}
.couch .btn--lg {
  --btn-h: calc(110 * var(--u));
  padding: 0 calc(56 * var(--u));
}
.couch .btn--compact {
  --btn-h: calc(88 * var(--u));
  --btn-font: calc(26 * var(--u));
}
.couch .btn__icon {
  width: calc(54 * var(--u));
  height: calc(54 * var(--u));
  filter: drop-shadow(calc(2 * var(--u)) 0 0 var(--btn-edge)) drop-shadow(calc(-2 * var(--u)) 0 0 var(--btn-edge))
    drop-shadow(0 calc(2 * var(--u)) 0 var(--btn-edge)) drop-shadow(0 calc(-2 * var(--u)) 0 var(--btn-edge))
    drop-shadow(0 calc(4 * var(--u)) 0 var(--btn-edge));
}
.couch .btn--green .btn__icon {
  filter: none;
}

/* ---- player avatar (AvatarContainer.prefab) ----------------------------------------------------- */
.couch-avatar {
  position: relative;
  flex: none;
  display: inline-block;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.18);
}
.couch-avatar__inner {
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: var(--c2);
  overflow: hidden;
}
.couch-avatar__img {
  max-width: none;
  max-height: none;
  position: absolute;
  left: -25%;
  top: -25%;
  width: 150%;
  height: 150%;
  object-fit: contain;
}
.couch-avatar__letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: var(--w-bold);
  font-size: calc(var(--size) * 0.46);
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}

/* ---- setup ------------------------------------------------------------------------------------------ */
.couch-setup__scroll {
  flex: 1;
  min-height: 0;
}
.couch-setup__column {
  display: flex;
  flex-direction: column;
  /* --couch-spread: the spare height useRestFit (restfit.js) shares out so a short phone's first view ends between sections */
  gap: calc(16 * var(--u) + var(--couch-spread, 0px));
  padding: calc(40 * var(--u)) calc(50 * var(--u)) calc(133 * var(--u));
}
.couch-section {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
}
.couch-section__head {
  display: flex;
  align-items: center;
  gap: calc(14 * var(--u));
  min-height: calc(48 * var(--u));
}
.couch-section__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  border-radius: 50%;
  background: var(--c-green);
  color: #fff;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  line-height: 1;
  text-shadow: var(--on-colour-shadow);
}
.couch-section__head h2 {
  font-weight: var(--w-semibold);
  font-size: calc(28 * var(--u));
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--c-ink);
  white-space: nowrap;
}
.couch-section__hint {
  font-weight: var(--w-medium);
  font-size: calc(21 * var(--u));
  color: var(--c-muted);
}
.couch-section__card {
  padding: calc(22 * var(--u)) calc(24 * var(--u));
  border-radius: calc(40 * var(--u));
  background: #fff;
  box-shadow:
    0 calc(4 * var(--u)) calc(14 * var(--u)) rgba(27, 37, 89, 0.08),
    0 0 0 calc(2 * var(--u)) rgba(255, 255, 255, 0.7);
}

/* player rows (PlayerRow.prefab: 108u row, transparent InputContainer, 100u AvatarContainer, 72u RemovePlayer) */
.couch-players {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.couch-player {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  min-height: calc(104 * var(--u));
  padding: calc(6 * var(--u)) calc(12 * var(--u)) calc(6 * var(--u)) calc(14 * var(--u));
  border-radius: calc(24 * var(--u));
  background: #fff;
  box-shadow:
    0 0 0 calc(2 * var(--u)) rgba(27, 37, 89, 0.05),
    0 calc(4 * var(--u)) calc(12 * var(--u)) rgba(27, 37, 89, 0.1);
  transition:
    box-shadow var(--t-fast),
    transform var(--t-fast) var(--ease-out);
}
.couch-player.is-dragging {
  transform: scale(1.02);
  box-shadow: 0 calc(14 * var(--u)) calc(32 * var(--u)) rgba(27, 37, 89, 0.28);
}
.couch-player__handle {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: repeat(2, calc(9 * var(--u)));
  grid-auto-rows: calc(9 * var(--u));
  gap: calc(8 * var(--u));
  place-content: center;
  width: calc(44 * var(--u));
  height: calc(88 * var(--u));
  touch-action: none;
  cursor: grab;
  border-radius: calc(16 * var(--u));
}
.couch-player__handle::before,
.couch-player__remove::before {
  content: '';
  position: absolute;
  inset: max(-10px, calc(-12 * var(--u))) max(-8px, calc(-10 * var(--u)));
}
.couch-player__handle i {
  border-radius: 50%;
  background: #b4bac4;
}
.couch-player__handle:hover i,
.couch-player__handle:focus-visible i {
  background: var(--c-muted);
}
/* the name is plain ink text on the white row; the field itself has no background (InputContainer alpha 0) */
.couch-player__name {
  flex: 1;
  min-width: 0;
  height: calc(88 * var(--u));
  padding: 0 calc(8 * var(--u)) 0 calc(14 * var(--u));
  border: 0;
  border-radius: calc(16 * var(--u));
  background: transparent;
  font-weight: var(--w-semibold);
  font-size: calc(31 * var(--u));
  color: var(--c-ink);
  /* a name too long even at the smallest size (Setup.js) ends with an ellipsis, never cut through a letter */
  text-overflow: ellipsis;
}
.couch-player__name::placeholder {
  font-style: italic;
  color: rgba(50, 50, 50, 0.5);
}
.couch-player__name:focus {
  outline: 0;
  background: #f4f6fa;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-green);
}
.couch-player__avatar {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  transition: transform var(--t-fast) var(--ease-out);
}
.couch-player__avatar:active {
  transform: scale(0.94);
}
/* RemovePlayer: the dark red square (RemoveBackground #D16A6A) is always there; the live Button layer (#FFA5A5) is
   only on the rows that can go, so the first two rows keep the dimmed, dead square (PlayerRow.SetRemovable) */
.couch-player__remove {
  --remove-face: #d16a6a;
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: calc(72 * var(--u));
  height: calc(72 * var(--u));
  border-radius: calc(10 * var(--u));
  background: var(--remove-face);
  box-shadow: 0 calc(3 * var(--u)) calc(10 * var(--u)) rgba(0, 0, 0, 0.08);
}
.couch-player__remove span {
  width: calc(34 * var(--u));
  height: calc(8 * var(--u));
  min-width: 12px;
  border-radius: calc(2 * var(--u));
  background: #fff;
  box-shadow: 0 calc(3 * var(--u)) 0 rgba(0, 0, 0, 0.5);
}
.couch-player__remove.is-live {
  --remove-face: #ffa5a5;
  cursor: pointer;
}
.couch-player__remove.is-live:active {
  transform: scale(0.92);
}
.couch-player__remove.is-dead {
  pointer-events: none;
}
.couch-add {
  margin-top: calc(20 * var(--u));
}
.couch-add img {
  width: calc(46 * var(--u));
  height: calc(46 * var(--u));
  flex: none;
}

/* chips (SegmentedChip.prefab) */
.couch-chips {
  display: flex;
  gap: calc(14 * var(--u));
}
.couch-chip {
  flex: 1 1 auto;
  min-width: 0;
  min-height: calc(98 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(10 * var(--u)) calc(16 * var(--u));
  border-radius: calc(28 * var(--u));
  background: var(--c-card);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-outline);
  color: var(--c-ink);
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  line-height: 1.25;
  text-align: center;
  transition:
    background-color var(--t-fast),
    box-shadow var(--t-fast),
    transform var(--t-fast) var(--ease-out);
}
.couch-chip:hover:not(.is-selected) {
  background: #f4faf6;
}
.couch-chip:active {
  transform: scale(0.97);
}
.couch-chip.is-selected {
  background: var(--c-green);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-green);
  color: #fff;
  font-weight: var(--w-bold);
}
.couch-chip__label {
  min-width: 0;
  text-align: center;
}
.couch-chips--radio .couch-chip__label {
  /* the label and, on the chosen chip, its check disc sit as one group in the middle of the chip */
  flex: 0 1 auto;
}
.couch-chip__sub {
  font-weight: var(--w-medium);
  font-size: calc(21 * var(--u));
  color: var(--c-muted);
}
.couch-chips--tiers {
  gap: calc(10 * var(--u));
}
.couch-chips--tiers .couch-chip {
  padding-left: calc(12 * var(--u));
  padding-right: calc(12 * var(--u));
}
.couch-chips--radio .couch-chip {
  min-height: calc(132 * var(--u));
  /* the two choices are always the same width, whichever one carries the check disc */
  flex: 1 1 0;
  flex-direction: row;
  gap: calc(12 * var(--u));
}
/* phone: both keep the same air from the rim to the check disc or the label, so the chosen chip never runs its text almost to
   the edge */
.layout-phone .couch-chips--radio .couch-chip {
  padding-left: calc(26 * var(--u));
  padding-right: calc(26 * var(--u));
}
.couch-chip__radio {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  border-radius: 50%;
  color: var(--c-green);
}
.couch-chip.is-selected .couch-chip__radio {
  background: #fff;
  box-shadow: none;
}
.couch-chip__radio svg {
  width: 70%;
  height: 70%;
  stroke-width: 2.4;
}

/* rounds / timer selector (RoundsSelector.prefab) */
.couch-number {
  display: flex;
  align-items: stretch;
  gap: calc(18 * var(--u));
}
.couch-number__chips {
  flex: 1 1 0;
  min-width: 0;
}
.couch-readout {
  flex: 0 0 calc(210 * var(--u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(96 * var(--u));
  padding: calc(8 * var(--u));
  border-radius: calc(28 * var(--u));
  background: var(--c-card);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-outline);
}
.couch-readout.is-custom {
  background: var(--c-green-soft);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-green);
}
.couch-readout__value,
.couch-readout__input {
  font-weight: var(--w-bold);
  font-size: calc(31 * var(--u));
  line-height: 1.25;
  color: var(--c-ink);
  text-align: center;
}
.couch-readout__input {
  width: 100%;
  border: 0;
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}
.couch-readout__input::-webkit-outer-spin-button,
.couch-readout__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.couch-readout__input:focus,
.couch-readout__input:focus-visible {
  outline: 0;
  box-shadow: none;
}
.couch-readout.is-custom:focus-within {
  box-shadow:
    inset 0 0 0 calc(3 * var(--u)) var(--c-green),
    0 0 0 calc(5 * var(--u)) rgba(13, 132, 57, 0.22);
}
.couch-readout__max {
  font-weight: var(--w-medium);
  font-size: calc(18 * var(--u));
  line-height: 1.3;
  color: var(--c-muted);
}

/* category slot (CategorySlot.prefab) */
.couch-slot {
  --accent: var(--c-green);
  --tint: var(--c-card);
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  width: 100%;
  min-height: calc(132 * var(--u));
  padding: calc(18 * var(--u)) calc(26 * var(--u)) calc(18 * var(--u)) calc(26 * var(--u));
  border-radius: calc(34 * var(--u));
  background: var(--c-card);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-green);
  text-align: left;
  transition: transform var(--t-fast) var(--ease-out);
}
.couch-slot.is-picked {
  padding-left: calc(20 * var(--u));
  background: var(--tint);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--accent);
}
.couch-slot:active {
  transform: scale(0.99);
}
.couch-slot__disc {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(96 * var(--u));
  height: calc(96 * var(--u));
  border-radius: 50%;
  background: var(--accent);
}
.couch-slot__disc img,
.couch-slot__disc .cat-glyph {
  width: 58%;
  height: 58%;
  object-fit: contain;
}
.couch-slot__disc .cat-glyph__letter {
  font-weight: var(--w-bold);
  font-size: calc(44 * var(--u));
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.couch-slot__labels {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
}
.couch-slot__labels b {
  font-weight: var(--w-bold);
  font-size: calc(34 * var(--u));
  line-height: 1.2;
  color: var(--c-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.couch-slot__labels span {
  font-weight: var(--w-medium);
  font-size: calc(22 * var(--u));
  line-height: 1.25;
  color: var(--c-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.couch-slot__chevron {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(30 * var(--u));
  color: var(--c-muted);
}
.couch-slot__chevron svg {
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  min-width: 14px;
}
.couch-cost {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
  height: calc(60 * var(--u));
  padding: 0 calc(16 * var(--u)) 0 calc(14 * var(--u));
  border-radius: calc(20 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-outline);
}
.couch-cost img {
  width: calc(44 * var(--u));
  height: calc(44 * var(--u));
  object-fit: contain;
}
.couch-cost b {
  font-weight: var(--w-bold);
  font-size: calc(28 * var(--u));
  color: var(--c-ink);
}




.couch-glyph {
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  min-width: 12px;
  min-height: 12px;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.3));
}
.couch-glyph--clock {
  object-fit: contain;
  filter: none;
}
.couch-glyph--check svg {
  width: 100%;
  height: 100%;
  stroke-width: 2.2;
}












/* the header keeps 168u either side of its title (TitleBlock offset -336), so the tickets pill never meets the subtitle */
.couch-header {
  grid-template-columns: calc(120 * var(--u)) 1fr calc(120 * var(--u));
  column-gap: 0;
}
/* the back button and the tickets pill sit 14u above the band's middle, the title block 5u below it (1.3.0 capture) */
.couch-header .screen-header__side {
  position: relative;
  top: calc(-14 * var(--u));
}
.couch-header .screen-header__title {
  position: relative;
  top: calc(5 * var(--u));
  gap: calc(4 * var(--u));
}
/* the 44-character English subtitle fits the 643u between those columns at its 24u (measured in the 1.3.0 capture) */
.couch-header .screen-header__title p {
  font-size: calc(24 * var(--u));
}
.couch-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));
}
/* wide: the compact pill of the Categories header (it hugs the icon and the count, no meter bar), and Back, the pill and
   the title block sit on the band's middle like there; the phone keeps the 1.3.0 capture geometry above */
.layout-wide .couch-header .screen-header__side,
.layout-wide .couch-header .screen-header__title {
  top: 0;
}
.layout-wide .couch-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);
}

/* sticky start button (BottomFade + PlayButton) */
.couch-setup__footer {
  position: relative;
  flex: none;
  padding: 0 calc(50 * var(--u)) max(calc(75 * var(--u)), calc(var(--safe-bottom) + 36 * var(--u)));
}
.couch-setup__scroll {
  /* useRestFit (restfit.js): --couch-fade is 0 at rest and grows to the 118u BottomFade as the list scrolls; --couch-shrink
     ends the window a little early when the first view must end between two sections */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--couch-fade, calc(118 * var(--u)))), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - var(--couch-fade, calc(118 * var(--u)))), transparent);
  margin-bottom: var(--couch-shrink, 0px);
  scrollbar-width: none;
}
.couch-setup__scroll::-webkit-scrollbar {
  display: none;
}
/* The scroll rail (restfit.js, the look of the avatar picker's rail): a slim track and thumb in the right margin, beside the
   cards, so a first view that ends between two sections still shows that more settings follow */
/* the scroll rail (.scroll-rail, components.css) in this panel's right margin */
.couch-rail {
  right: calc(15 * var(--u));
}
/* ---- category and avatar pickers ------------------------------------------------------------------ */
.couch-picker {
  width: min(100%, calc(960 * var(--u)));
  height: min(100%, calc(1560 * var(--u)));
}
.couch-picker .popup__header {
  padding-left: calc(130 * var(--u));
  padding-right: calc(130 * var(--u));
}
.couch-picker__back {
  position: absolute;
  top: 50%;
  left: calc(24 * var(--u));
  transform: translateY(-50%);
}
.couch-picker .popup__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(#e6f6ea, #d6f1e1);
}
.couch-picker__search {
  flex: none;
  padding: calc(8 * var(--u)) 0 0;
}
.couch-picker__list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(28 * var(--u));
  padding: calc(20 * var(--u)) calc(34 * var(--u)) calc(48 * var(--u));
}
.couch-picker__list > .cat-tile {
  flex: none;
}
.couch-picker__more {
  display: grid;
  place-items: center;
  padding: calc(16 * var(--u));
}
.couch-picker__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(60 * var(--u)) calc(30 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  color: var(--ink-soft);
  text-align: center;
}
.couch-avatar-picker .popup__body {
  padding: calc(28 * var(--u)) calc(40 * var(--u)) calc(12 * var(--u));
}
.couch-avatar-picker__group h3 {
  margin: calc(18 * var(--u)) 0 calc(14 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(26 * var(--u));
  letter-spacing: 0.14em;
  color: var(--section-grey);
}
.couch-avatar-picker__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(18 * var(--u));
}
.couch-avatar-picker__tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: calc(26 * var(--u));
  background: #eef2f8;
  transition:
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast);
}
.couch-avatar-picker__tile img {
  max-width: none;
  max-height: none;
  position: absolute;
  left: -25%;
  top: -22%;
  width: 150%;
  height: 150%;
  object-fit: contain;
}
.couch-avatar-picker__tile:hover {
  transform: translateY(calc(-3 * var(--u)));
}
.couch-avatar-picker__tile.is-selected {
  box-shadow: inset 0 0 0 calc(5 * var(--u)) var(--c-green);
}
.couch-avatar-picker__tile.is-current:not(.is-selected) {
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-outline);
}
.couch-avatar-picker__check {
  position: absolute;
  right: calc(8 * var(--u));
  top: calc(8 * var(--u));
  display: grid;
  place-items: center;
  width: calc(40 * var(--u));
  height: calc(40 * var(--u));
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  background: var(--c-green);
  color: #fff;
}
.couch-avatar-picker__check svg {
  width: 62%;
  height: 62%;
}
.couch-avatar-picker__hint {
  flex-basis: 100%;
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  color: var(--ink-soft);
}
.couch-avatar-picker .popup__footer {
  flex-direction: column;
  align-items: stretch;
  gap: calc(16 * var(--u));
  padding-bottom: calc(40 * var(--u));
}

/* ---- the hand-off (NextPlayerTurn.prefab) ----------------------------------------------------------- */
.couch-turn {
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 20 * var(--u)) calc(50 * var(--u)) calc(var(--safe-bottom) + 20 * var(--u));
}
.couch-turn__panel {
  position: relative;
  container-type: inline-size;
  width: 100%;
  max-width: calc(980 * var(--u));
  height: min(calc(1760 * var(--u)), 100%);
  display: flex;
  flex-direction: column;
  filter: drop-shadow(0 calc(18 * var(--u)) calc(30 * var(--u)) rgba(27, 37, 89, 0.22));
  animation: pop-in var(--t-slow) var(--ease-spring);
}
/* PopupBackgroundBlue1080nostar.png sliced like Unity: the arch of the white panel and the blue frame are the sprite */
.couch-turn__frame {
  position: absolute;
  inset: 0;
  --k: calc(100cqw / 1080);
  box-sizing: border-box;
  border-style: solid;
  border-color: transparent;
  border-width: calc(280 * var(--k)) calc(535 * var(--k)) calc(100 * var(--k)) calc(535 * var(--k));
  border-image-source: var(--frame);
  border-image-slice: 280 535 100 535 fill;
  border-image-width: 1;
  border-image-repeat: stretch;
  pointer-events: none;
}
.couch-turn__title {
  position: relative;
  flex: none;
  padding: calc(68 * var(--u)) calc(130 * var(--u)) 0;
  height: calc(225 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(70 * var(--u));
  line-height: 1.1;
  color: #fff;
  text-shadow:
    0 calc(4 * var(--u)) 0 rgba(8, 45, 120, 0.45),
    var(--on-colour-shadow);
  white-space: nowrap;
}
.couch-turn__inner {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 calc(80 * var(--u)) calc(70 * var(--u));
  padding: calc(20 * var(--u)) 0 calc(20 * var(--u));
}
.couch-turn__stage {
  position: relative;
  flex: 1.6 1 0;
  min-height: calc(200 * var(--u));
  max-height: calc(800 * var(--u));
  display: flex;
  justify-content: center;
}
.couch-turn__robot {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.couch-turn__shadow {
  position: absolute;
  left: 50%;
  bottom: calc(18 * var(--u));
  width: calc(240 * var(--u));
  height: calc(107 * var(--u));
  transform: translateX(-50%);
  opacity: 0.31;
  filter: brightness(0);
}
.couch-turn__info {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(20 * var(--u));
  padding-top: calc(10 * var(--u));
}
.couch-turn__lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(20 * var(--u));
}
.couch-turn__caption {
  font-weight: var(--w-bold);
  font-size: calc(55 * var(--u));
  line-height: 1.15;
  color: var(--navy);
  text-align: center;
}
.couch-turn__who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(24 * var(--u));
  max-width: 100%;
}
.couch-turn__name {
  width: 100%;
  min-width: 0;
  font-weight: var(--w-semibold);
  font-size: max(20px, calc(64 * var(--u))) !important;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.25;
  color: var(--navy);
  text-align: center;
}
.couch-turn__meta {
  width: 100%;
  font-weight: var(--w-semibold);
  font-size: calc(36 * var(--u));
  line-height: 1.3;
  color: var(--ink);
  text-align: center;
}
.couch-turn__ready {
  margin-top: auto;
}

/* ---- the quiz with the Couch banner (LocalMultiPlayerContainerView) ------------------------------- */
.couch-quiz {
  --extra: 22;
}
.couch-quiz.has-scores {
  --extra: 62;
}
/* the band grows downward for the extra rows; the question area stays where every mode keeps it */
.couch-quiz .quiz-banner__band {
  height: calc(var(--banner-h) + var(--safe-top) + var(--extra) * var(--u));
  -webkit-mask:
    linear-gradient(#000, #000) top / 100% calc(var(--safe-top) + 2px) no-repeat,
    var(--eclipse) bottom / 100% calc(var(--banner-h) + var(--extra) * var(--u)) no-repeat;
  mask:
    linear-gradient(#000, #000) top / 100% calc(var(--safe-top) + 2px) no-repeat,
    var(--eclipse) bottom / 100% calc(var(--banner-h) + var(--extra) * var(--u)) no-repeat;
}
.couch-quiz .robot-hole {
  top: calc(var(--safe-top) + (222 + var(--extra) * 0.45) * var(--u) - var(--d) / 2);
}
.couch-quiz .quiz-banner__goal {
  top: calc(var(--safe-top) + 150 * var(--u));
  right: calc(190 * var(--u));
  height: calc(76 * var(--u));
}
.couch-quiz .quiz-banner__progress {
  top: calc(var(--safe-top) + 240 * var(--u));
}
.layout-wide .couch-quiz .quiz-banner__goal {
  right: calc(var(--gutter) + 190 * var(--u));
}
.layout-wide .couch-quiz .quiz-banner__progress {
  right: calc(var(--gutter) + 200 * var(--u));
}
.couch-quiz .quiz-banner__title {
  min-width: 0;
  max-width: 100%;
  font-size: calc(52 * var(--u));
}
.couch-who {
  display: inline-flex;
  align-items: center;
  gap: calc(14 * var(--u));
  min-width: 0;
  max-width: 100%;
}
.couch-who .couch-avatar {
  box-shadow: 0 calc(2 * var(--u)) calc(6 * var(--u)) rgba(0, 0, 0, 0.25);
}
.couch-who b {
  min-width: 0;
  font-weight: var(--w-bold);
  line-height: 1.2;
}
.couch-round {
  order: 1;
  flex: 1 1 0;
  min-width: 0;
  max-width: calc(430 * var(--u));
  height: calc(66 * var(--u));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 calc(18 * var(--u));
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #fff;
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  line-height: 1;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.couch-round span {
  font-weight: var(--w-bold);
}
.couch-quiz .quiz-chip {
  order: 2;
}
.couch-scoreline {
  position: absolute;
  left: 0;
  top: calc(100% + 10 * var(--u));
  width: 100%;
  order: 3;
  font-weight: var(--w-medium);
  line-height: 1.2;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
  white-space: nowrap;
  overflow: hidden;
}
.couch-footer {
  position: relative;
  height: calc(275 * var(--u));
}
.couch-question {
  display: flex;
  flex-direction: column;
  gap: calc(32 * var(--u));
}

/* the locked-in turn (CouchLockedMark.prefab): the tapped row outlined with a "Locked in" pill, the rest at half strength */
.couch-quiz {
  --lock: url('../assets/unity/Art/UI/Icons/Adventure/LockClosed.webp');
}
.couch-quiz .answer.is-selected {
  --face: #fff;
  --lip: #c4c4c4;
  padding-right: calc(24 * var(--u) + 300 * var(--u) + 24 * var(--u));
  /* the outline is drawn inside the row: the answer column clips anything outside its edges */
  box-shadow:
    inset 0 0 0 calc(5 * var(--u)) var(--ink),
    inset 0 calc(-12 * var(--u)) 0 var(--lip),
    0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.08);
}
.couch-quiz .answer.is-selected::after {
  content: var(--locked-label);
  position: absolute;
  right: calc(24 * var(--u));
  top: 50%;
  width: calc(300 * var(--u));
  height: calc(76 * var(--u));
  padding-left: calc(24 * var(--u) + 34 * var(--u) + 12 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-58%);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-outline);
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.couch-quiz .answer.is-selected::before {
  content: '';
  position: absolute;
  right: calc(24 * var(--u) + 300 * var(--u) - 24 * var(--u) - 34 * var(--u));
  top: 50%;
  z-index: 1;
  width: calc(34 * var(--u));
  height: calc(40 * var(--u));
  transform: translateY(-58%);
  background: var(--ink);
  -webkit-mask: var(--lock) center / contain no-repeat;
  mask: var(--lock) center / contain no-repeat;
}
.couch-quiz .answers--grid .answer.is-selected,
.layout-wide .couch-quiz .answer.is-selected {
  padding-right: calc(24 * var(--u) + 88 * var(--u) + 12 * var(--u));
}
.couch-quiz .answers--grid .answer.is-selected::after,
.layout-wide .couch-quiz .answer.is-selected::after {
  width: calc(88 * var(--u));
  padding-left: 0;
  content: '';
}
.couch-quiz .answers--grid .answer.is-selected::before,
.layout-wide .couch-quiz .answer.is-selected::before {
  right: calc(24 * var(--u) + 27 * var(--u));
}
.couch-quiz .answer.is-dim {
  opacity: 0.5;
}
.couch-quiz .answer:disabled {
  cursor: default;
}

/* the slate "Pass the phone to" bar (CouchPassBar.prefab) */
.couch-pass {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(30 * var(--u));
  height: calc(190 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  padding: calc(22 * var(--u)) calc(40 * var(--u)) calc(30 * var(--u)) calc(48 * var(--u));
  border-radius: calc(64 * var(--u));
  background: var(--slate);
  box-shadow:
    inset 0 calc(-14 * var(--u)) 0 #3f4c7e,
    0 calc(8 * var(--u)) calc(20 * var(--u)) rgba(27, 37, 89, 0.28);
  color: #fff;
  animation: couch-pass-in 200ms var(--ease-out);
}
.couch-pass.has-avatar {
  padding-left: calc(34 * var(--u));
}
.couch-pass__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.couch-pass__copy span {
  font-weight: var(--w-medium);
  font-size: calc(30 * var(--u));
  line-height: 1.3;
  text-shadow: var(--on-colour-shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.couch-pass__copy b {
  font-weight: var(--w-bold);
  font-size: calc(64 * var(--u));
  line-height: 1.15;
  text-shadow: var(--on-colour-shadow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes couch-pass-in {
  from {
    opacity: 0;
    transform: translateY(calc(24 * var(--u)));
  }
}

/* the mint veil between a turn and the hand-off (CouchTurnVeil.prefab) */
.couch-veil {
  position: absolute;
  inset: 0;
  z-index: 30;
  background-color: #c6f2d6;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}
.couch-veil.is-covering {
  opacity: 1;
}
.reduced-motion .couch-veil {
  transition: none;
}

/* ---- round result and game recap (LocalMultiplayerRecapPopup.prefab) -------------------------------- */
.couch-recap {
  z-index: 45;
}
.couch-recap__header {
  --band: var(--navy);
}
.couch-recap__mountains {
  position: absolute;
  right: calc(10 * var(--u));
  bottom: 0;
  width: calc(394 * var(--u));
  aspect-ratio: 729 / 431;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right bottom;
  opacity: 0.57;
  pointer-events: none;
  z-index: -1;
}
.couch-recap__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: calc(24 * var(--u)) calc(48 * var(--u)) calc(var(--safe-bottom) + 28 * var(--u));
}
.couch-recap__scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: calc(24 * var(--u));
  padding: calc(8 * var(--u));
}
.couch-recap__card {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(34 * var(--u)) calc(28 * var(--u));
  border-radius: calc(40 * var(--u));
  background: #fff;
  box-shadow:
    0 calc(5 * var(--u)) calc(16 * var(--u)) rgba(27, 37, 89, 0.1),
    0 0 0 calc(2 * var(--u)) var(--c-outline);
  animation: card-in var(--t-med) var(--ease-out);
}
.couch-recap__card h2 {
  font-weight: var(--w-bold);
  font-size: calc(54 * var(--u));
  line-height: 1.2;
  color: var(--c-ink);
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.couch-recap__picture {
  width: calc(240 * var(--u));
  height: calc(240 * var(--u));
  border-radius: calc(36 * var(--u));
  overflow: hidden;
  background: #f4f6fa;
}
.couch-recap__picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.couch-recap__correct {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: calc(26 * var(--u)) calc(32 * var(--u)) calc(30 * var(--u));
  border-radius: calc(36 * var(--u));
  background: var(--c-green-soft);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-green);
  text-align: center;
  opacity: 0;
  transform: translateY(calc(10 * var(--u)));
  transition:
    opacity 250ms var(--ease-out),
    transform 250ms var(--ease-out);
}
.couch-recap__correct.is-shown {
  opacity: 1;
  transform: none;
}
.couch-recap__correct span {
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.25;
  color: var(--c-muted);
}
.couch-recap__correct b {
  font-weight: var(--w-bold);
  font-size: calc(52 * var(--u));
  line-height: 1.2;
  color: var(--c-green);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.couch-recap__correct p {
  font-weight: var(--w-regular);
  font-size: calc(34 * var(--u));
  line-height: 1.35;
  color: var(--ink);
}
.couch-recap__rows {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
}
.couch-recap-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(16 * var(--u));
  min-height: calc(138 * var(--u));
  padding: calc(18 * var(--u)) calc(20 * var(--u));
  border-radius: calc(36 * var(--u));
  background: var(--c-card);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-outline);
  transition:
    background-color var(--t-med),
    box-shadow var(--t-med);
}
.couch-recap-row.is-correct {
  background: var(--c-green-soft);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-green);
}
.couch-recap-row.is-wrong {
  background: var(--c-red-soft);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-red);
}
.couch-recap-row__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
}
.couch-recap-row__copy b {
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  line-height: 1.2;
  color: var(--c-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.couch-recap-row__copy span {
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.25;
  color: var(--c-ink);
  overflow-wrap: anywhere;
}
.couch-recap-row__copy span.is-none {
  font-style: italic;
  color: var(--c-muted);
}
.couch-recap-row__score {
  flex: none;
  min-width: calc(110 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(32 * var(--u));
  color: var(--section-grey);
  text-align: right;
  white-space: nowrap;
}
.couch-recap-row__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(56 * var(--u));
  height: calc(56 * var(--u));
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-green);
}
.couch-recap-row.is-wrong .couch-recap-row__mark {
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-red);
}
.couch-recap-row__mark img {
  width: 58%;
  height: 58%;
  object-fit: contain;
}
.couch-recap__dots {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: calc(10 * var(--u));
  min-height: calc(30 * var(--u));
  padding: calc(14 * var(--u)) 0;
}
.couch-recap__dots i {
  width: calc(14 * var(--u));
  height: calc(14 * var(--u));
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
  background: #cfd5dc;
  transition: transform var(--t-med) var(--ease-spring);
}
.couch-recap__dots i.is-done {
  background: var(--c-green);
}
.couch-recap__dots i.is-current {
  background: var(--c-green);
  transform: scale(1.5);
}
.couch-recap__footer {
  flex: none;
}
.couch-burst {
  position: absolute;
  left: calc(100% - 50 * var(--u));
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 3;
}
.couch-burst img {
  position: absolute;
  /* The emitter is zero-width; the global responsive image cap would hide every piece. */
  max-width: none;
  left: calc(var(--s) / -2);
  top: calc(var(--s) / -2);
  width: var(--s);
  height: var(--s);
  animation: couch-burst 1000ms var(--ease-out) var(--d) both;
}
@keyframes couch-burst {
  from {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(0.4);
  }
  55% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(var(--dx), calc(var(--dy) + 40px)) rotate(var(--r)) scale(1);
  }
}

/* ---- the final scores (LocalEndSummary.prefab) ----------------------------------------------------- */
.couch-end {
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 24 * var(--u)) calc(50 * var(--u)) calc(var(--safe-bottom) + 24 * var(--u));
}
.couch-end__card {
  --accent: #1aa047;
  --accent-ink: #07672f;
  position: relative;
  width: 100%;
  max-width: calc(910 * var(--u));
  max-height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(24 * var(--u)) 0 calc(32 * var(--u));
  border-radius: calc(56 * var(--u));
  background: var(--card-warm);
  box-shadow: 0 calc(18 * var(--u)) calc(50 * var(--u)) rgba(27, 37, 89, 0.2);
  animation: pop-in var(--t-slow) var(--ease-spring);
}
.couch-end__card.is-neutral {
  --accent: #566596;
  --accent-ink: #566596;
}
.couch-end__sheet {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(16 * var(--u));
  padding: calc(31 * var(--u)) calc(55 * var(--u)) calc(20 * var(--u));
}
.couch-end__hero {
  position: relative;
  flex: none;
  height: calc(330 * var(--u));
}
.couch-end__circle {
  position: absolute;
  left: 50%;
  top: 0;
  width: calc(330 * var(--u));
  height: 100%;
  aspect-ratio: 1;
  max-width: 100%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #dff3e5;
}
.couch-end__card.is-neutral .couch-end__circle {
  background: #e3f2eb;
}
.couch-end__robot {
  position: absolute;
  left: 50%;
  top: 0;
  width: calc(326 * var(--u));
  height: 100%;
  transform: translateX(-50%);
}
.couch-end__confetti {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.couch-end__confetti img {
  position: absolute;
  width: calc(var(--s) * var(--u));
  height: calc(var(--s) * var(--u));
  left: calc((var(--x) - var(--s) / 2) * var(--u));
  top: calc((var(--y) * -1 - var(--s) / 2) * var(--u));
  transform: rotate(var(--r));
  animation: couch-confetti 900ms var(--ease-spring) calc(var(--i) * 40ms) both;
}
@keyframes couch-confetti {
  from {
    opacity: 0;
    transform: translateY(calc(30 * var(--u))) rotate(var(--r)) scale(0.2);
  }
}
.couch-end__title {
  flex: none;
  font-weight: var(--w-semibold);
  font-size: calc(64 * var(--u));
  line-height: 1.15;
  color: var(--accent);
  text-align: center;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.couch-end__subtitle {
  flex: none;
  font-weight: var(--w-semibold);
  font-size: calc(36 * var(--u));
  line-height: 1.25;
  color: var(--accent-ink);
  text-align: center;
  text-wrap: balance;
}
.couch-pair {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(330 * var(--u));
  margin-top: calc(8 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #f0f6f3;
}
.couch-pair__side {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(10 * var(--u));
  padding: calc(22 * var(--u)) calc(12 * var(--u)) calc(18 * var(--u));
}
.couch-pair__name {
  max-width: 100%;
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  line-height: 1.2;
  color: var(--c-ink);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.couch-pair__score {
  font-weight: var(--w-bold);
  font-size: calc(100 * var(--u));
  line-height: 1;
  color: #384c72;
  font-variant-numeric: tabular-nums;
}
.couch-pair__colon {
  position: absolute;
  right: calc(-24 * var(--u));
  bottom: calc(48 * var(--u));
  width: calc(48 * var(--u));
  text-align: center;
  font-weight: var(--w-bold);
  font-size: calc(72 * var(--u));
  line-height: 1;
  color: #384c72;
}
.couch-rows {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  margin-top: calc(8 * var(--u));
}
.couch-row {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  padding: calc(18 * var(--u)) calc(24 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-outline);
}
.couch-row.is-winner {
  background: var(--c-green-soft);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--c-green);
}
.couch-row__top {
  display: flex;
  align-items: center;
  gap: calc(18 * var(--u));
  min-height: calc(104 * var(--u));
}
.couch-row__medal {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(64 * var(--u));
  height: calc(64 * var(--u));
  min-width: 26px;
  min-height: 26px;
  border-radius: 50%;
  font-weight: var(--w-bold);
  font-size: calc(42 * var(--u));
  line-height: 1;
}
.couch-row__name {
  flex: 1;
  min-width: 0;
  font-weight: var(--w-bold);
  font-size: calc(48 * var(--u));
  line-height: 1.2;
  color: var(--c-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.couch-row__crown {
  flex: none;
  width: calc(56 * var(--u));
  height: calc(56 * var(--u));
  object-fit: contain;
}
.couch-row__score {
  flex: none;
  min-width: calc(150 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(56 * var(--u));
  line-height: 1.2;
  color: var(--c-ink);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.couch-row.is-winner .couch-row__score {
  color: var(--c-green);
}
.couch-row__pips {
  display: flex;
  flex-wrap: wrap;
  gap: calc(8 * var(--u));
  padding-left: calc(82 * var(--u));
}
.couch-pip {
  display: grid;
  place-items: center;
  width: calc(48 * var(--u));
  height: calc(48 * var(--u));
  min-width: 20px;
  min-height: 20px;
  border-radius: calc(12 * var(--u));
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) var(--c-outline);
}
.couch-pip img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}
.couch-end__actions {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: calc(18 * var(--u));
  padding: calc(8 * var(--u)) calc(55 * var(--u)) 0;
}

/* ---- desktop and tablet (>= 760 px): the setup in columns that read in section order ---------------------
   The players (and the mode robot) beside the category, the Game Settings card and START GAME. Nothing is pinned over
   the form, so no fade is needed; a larger screen takes a larger unit (the header keeps the page's own). */
.layout-wide .couch-setup__scroll {
  display: flex;
  flex-direction: column;
  -webkit-mask-image: none;
  mask-image: none;
}
@media (min-width: 1400px) and (min-height: 860px) {
  .layout-wide .couch-setup__scroll {
    --u: 0.64px;
  }
}
@media (min-width: 1800px) and (min-height: 1000px) {
  .layout-wide .couch-setup__scroll {
    --u: 0.74px;
  }
}
@media (min-width: 760px) and (orientation: portrait) and (min-height: 1100px) {
  .layout-wide .couch-setup__scroll {
    --u: 0.62px;
  }
}
@media (min-width: 1000px) and (max-width: 1199px) and (max-height: 800px) and (orientation: landscape) {
  .layout-wide .couch-setup__scroll {
    --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 .couch-setup__scroll {
    --u: 0.62px;
  }
}
.layout-wide .couch-setup__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  align-items: start;
  width: min(100% - 64px, 1160px);
  margin: auto;
  padding: 28px 0;
}
.layout-wide .couch-setup__col {
  display: flex;
  flex-direction: column;
  gap: calc(24 * var(--u));
  min-width: 0;
}
/* the columns all end on one line. The last card of the shorter column (Answer Reveal, Rounds, or the Game Preview with START GAME
   under it) takes the height the other column has over it, up to a cap, so no column stops short with an empty band under it */
.layout-wide .couch-setup__columns {
  align-items: stretch;
}
.layout-wide .couch-setup__columns .couch-setup__col > .couch-section:last-of-type {
  flex: 1 1 auto;
}
.layout-wide .couch-setup__columns .couch-setup__col > .couch-section:last-of-type > .couch-section__card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: calc(var(--stretch-cap, 380) * var(--u));
}



.layout-wide .couch-setup__cta {
  padding-top: calc(8 * var(--u));
}
.layout-wide .couch-setup .couch-section__card {
  container-type: inline-size;
}
.layout-wide .couch-setup .couch-section__hint,

.layout-wide .couch-setup .couch-readout__max {
  font-size: max(13px, calc(21 * var(--u)));
  letter-spacing: 0.04em;
}
/* difficulty: three over two in a column, one row when the card is wide enough for all five */
.layout-wide .couch-setup .couch-chips--tiers {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: calc(12 * var(--u));
}
.layout-wide .couch-setup .couch-chips--tiers .couch-chip {
  grid-column: span 2;
  min-height: calc(88 * var(--u));
}
.layout-wide .couch-setup .couch-chips--tiers .couch-chip:nth-child(n + 4) {
  grid-column: span 3;
}
/* rounds and time: the four choices share a row, the readout sits under them at the same width */
.layout-wide .couch-setup .couch-number {
  flex-direction: column;
  gap: calc(12 * var(--u));
}
.layout-wide .couch-setup .couch-number__chips {
  gap: calc(12 * var(--u));
}
.layout-wide .couch-setup .couch-number__chips .couch-chip {
  flex: 1 1 0;
  min-width: max-content;
  min-height: calc(88 * var(--u));
  padding-left: calc(14 * var(--u));
  padding-right: calc(14 * var(--u));
}
.layout-wide .couch-setup .couch-readout {
  flex: none;
  min-height: calc(92 * var(--u));
}
/* answer reveal: the two choices one above the other, each label on one line */
.layout-wide .couch-setup .couch-chips--reveal {
  flex-direction: column;
  gap: calc(12 * var(--u));
}
.layout-wide .couch-setup .couch-chips--reveal .couch-chip {
  flex: none;
  min-height: calc(88 * var(--u));
  padding-left: calc(20 * var(--u));
  padding-right: calc(20 * var(--u));
}
.layout-wide .couch-setup .couch-player {
  gap: calc(16 * var(--u));
  /* a slightly taller row than the phone's 104u around an 80u disc (Setup.js), so the avatar has even air above and below */
  min-height: calc(112 * var(--u));
  padding-top: calc(10 * var(--u));
  padding-bottom: calc(10 * var(--u));
}
/* the disc is smaller than a 44 px target on a touch tablet: the button's hit area reaches past it */
.layout-wide .couch-setup .couch-player__avatar {
  position: relative;
}
.layout-wide .couch-setup .couch-player__avatar::before {
  content: '';
  position: absolute;
  inset: -4px;
}

/* the category picture beside the summary stays small enough for the values to keep whole words on a line */



@container (min-width: 560px) {
  .layout-wide .couch-setup .couch-chips--tiers {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  .layout-wide .couch-setup .couch-chips--tiers .couch-chip,
  .layout-wide .couch-setup .couch-chips--tiers .couch-chip:nth-child(n + 4) {
    grid-column: auto;
  }
}
/* a narrow column: the category slot's disc and name step down so a ticketed name still fits beside its price */
@container (max-width: 400px) {
  .layout-wide .couch-setup .couch-slot {
    gap: calc(16 * var(--u));
    padding-left: calc(18 * var(--u));
    padding-right: calc(20 * var(--u));
  }
  .layout-wide .couch-setup .couch-slot__disc {
    width: calc(80 * var(--u));
    height: calc(80 * var(--u));
  }
  .layout-wide .couch-setup .couch-slot__labels b {
    font-size: calc(30 * var(--u));
  }
}
@container (max-width: 230px) {
  .layout-wide .couch-setup .couch-number__chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.layout-wide .couch-picker {
  width: min(100%, 760px);
  height: min(100%, 860px);
}
.layout-wide .couch-avatar-picker {
  width: min(100%, 640px);
}

.layout-wide .couch-turn {
  padding: 32px;
}
.layout-wide .couch-turn__panel {
  width: min(100%, 880px);
  max-width: 880px;
  height: auto;
  max-height: 100%;
  filter: drop-shadow(0 18px 30px rgba(27, 37, 89, 0.22));
}
.layout-wide .couch-turn__title {
  height: auto;
  padding: 36px 40px 30px;
  font-size: 44px;
}
.layout-wide .couch-turn__inner {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 24px;
  margin: 0 60px 52px;
  padding: 30px 0 0;
}
.layout-wide .couch-turn__stage {
  height: 330px;
  min-height: 0;
  max-height: none;
}
.layout-wide .couch-turn__shadow {
  width: 170px;
  height: 76px;
  bottom: 10px;
}
.layout-wide .couch-turn__info {
  gap: 14px;
  padding: 0;
}
.layout-wide .couch-turn__caption {
  font-size: 30px;
}
.layout-wide .couch-turn__who {
  flex-direction: row;
  gap: 18px;
}
.layout-wide .couch-turn__who .couch-avatar {
  width: 110px;
  height: 110px;
}
.layout-wide .couch-turn__name {
  font-size: 30px !important;
}
.layout-wide .couch-turn__meta {
  /* Preserve the complete settings summary instead of FitLine's one-line ellipsis. */
  font-size: 20px !important;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  text-wrap: balance;
}
.layout-wide .couch-turn__ready {
  margin-top: 8px;
  width: 100%;
}

/* tablet: the turn card's player name at a size its narrower panel fits */
@media (min-width: 760px) and (max-width: 1199px) {
  .layout-wide .couch-turn__name { font-size: 24px !important; }
}

.layout-wide .couch-recap__body {
  max-width: 780px;
  margin: 0 auto;
}
.layout-wide .couch-end {
  padding: 32px;
}
.layout-wide .couch-end__card {
  max-width: 600px;
}

/* reduced motion: the confetti, the pass bar and the veil hold still */
.reduced-motion .couch-end__confetti img,
.reduced-motion .couch-pass,
.reduced-motion .couch-burst img {
  animation: none;
}
.reduced-motion .couch-recap__correct {
  transition: none;
}

/* TMP style=1 (Bold) labels: the Rubik asset's bold spacing is added on top of the face */
.couch-chip,
.couch-readout__value,
.couch-readout__input,
.couch-slot__labels b,
.couch-cost b,
.couch-player__name {
  letter-spacing: var(--couch-track);
}
.couch-turn__name,
.couch-end__title {
  letter-spacing: var(--tmp-bold);
}
/* The format setting extends the existing segmented-chip family. */
.couch-format-hint{font-size:calc(26 * var(--u));line-height:1.35;margin:calc(18 * var(--u)) 0 0;color:var(--ink)}
.couch-start-status{font-size:calc(25 * var(--u));line-height:1.35;margin:0 0 calc(16 * var(--u));color:var(--ink);text-align:center}







/* ---- the Game Settings card (settings-summary.js): the optional rules of the Couch Clash and Online setups folded
   behind one summary. Collapsed: the rules as small tags (a changed rule is a solid green tag) and a Change toggle; open:
   the usual chip groups under small labels. */
.party-settings {
  display: flex;
  flex-direction: column;
}
/* the tags and the Change toggle share one wrapping flow: the toggle ends the last row, at the right edge */
.party-settings__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(12 * var(--u));
  width: 100%;
  margin: calc(-6 * var(--u)) 0;
  padding: calc(6 * var(--u)) 0;
  border-radius: calc(24 * var(--u));
  text-align: left;
}
.party-settings__summary:focus-visible {
  outline: calc(3 * var(--u)) solid #0d8439;
  outline-offset: calc(6 * var(--u));
}
.party-settings__tags {
  display: contents;
}
.party-tag {
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  max-width: 100%;
  min-height: calc(60 * var(--u));
  padding: calc(8 * var(--u)) calc(20 * var(--u)) calc(8 * var(--u)) calc(9 * var(--u));
  border-radius: calc(21 * var(--u));
  background: #e3f4e8;
  color: #0a6a2e;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  line-height: 1.15;
  transition:
    background-color var(--t-med),
    color var(--t-med),
    transform var(--t-fast) var(--ease-out);
}
.party-tag__glyph {
  flex: none;
  display: grid;
  place-items: center;
  width: calc(42 * var(--u));
  height: calc(42 * var(--u));
  border-radius: calc(13 * var(--u));
  background: #0d8439;
  color: #fff;
  transition: background-color var(--t-med);
}
.party-tag__glyph .couch-glyph {
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
  min-width: 10px;
  min-height: 10px;
}
.party-tag__label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.party-tag.is-changed {
  background: #0d8439;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.party-tag.is-changed .party-tag__glyph {
  background: rgba(255, 255, 255, 0.22);
}
.party-settings__summary:active:not(:disabled) .party-tag {
  transform: scale(0.98);
}
.party-settings__toggle {
  flex: none;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: calc(8 * var(--u));
  padding: calc(8 * var(--u)) calc(4 * var(--u)) calc(8 * var(--u)) calc(8 * var(--u));
  color: #0d8439;
  font-weight: var(--w-bold);
  font-size: calc(28 * var(--u));
  line-height: 1;
}
.party-settings__toggle svg {
  width: calc(30 * var(--u));
  height: calc(30 * var(--u));
  min-width: 14px;
  min-height: 14px;
  stroke-width: 3;
  transition: transform var(--t-med) var(--ease-out);
}
.party-settings.is-open .party-settings__summary {
  justify-content: flex-end;
}
.party-settings.is-open .party-settings__tags {
  display: none;
}
.party-settings.is-open .party-settings__toggle svg {
  transform: rotate(180deg);
}
/* the open state grows the card's height (0fr to 1fr) instead of jumping; reduced motion makes it instant (--t-med 0) */
.party-settings__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-med) var(--ease-out);
}
.party-settings.is-open .party-settings__panel {
  grid-template-rows: 1fr;
}
.party-settings__inner {
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* the chips' own soft shadows reach a few units past them; keep that room inside the clip */
  margin: 0 calc(-6 * var(--u));
  padding: 0 calc(6 * var(--u));
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear var(--t-med);
}
.party-settings.is-open .party-settings__inner {
  visibility: visible;
  transition-delay: 0s;
}
.party-group {
  margin-top: calc(22 * var(--u));
  padding: calc(24 * var(--u)) 0 calc(6 * var(--u));
  border-top: calc(2 * var(--u)) solid #e9ecef;
}
.party-settings .party-group:first-child {
  margin-top: calc(10 * var(--u));
  border-top: 0;
  padding-top: 0;
}
.party-group__title {
  margin: 0 0 calc(16 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(22 * var(--u));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f6973;
}
.party-group__title span {
  font-weight: var(--w-medium);
  letter-spacing: 0;
  text-transform: none;
  color: #959ca3;
}
.party-settings__reset {
  align-self: center;
  margin: calc(22 * var(--u)) 0 calc(4 * var(--u));
  padding: calc(12 * var(--u)) calc(20 * var(--u));
  border-radius: calc(16 * var(--u));
  color: #0d8439;
  font-weight: var(--w-bold);
  font-size: calc(26 * var(--u));
  text-decoration: underline;
  text-decoration-thickness: calc(3 * var(--u));
  text-underline-offset: 0.22em;
}
.party-settings__reset:active {
  transform: scale(0.97);
}
/* a wide screen scales the canvas unit down; small text keeps the floor the setup hints use */
.layout-wide .party-tag {
  font-size: max(13px, calc(26 * var(--u)));
}
.layout-wide .party-group__title {
  font-size: max(12px, calc(22 * var(--u)));
}
.layout-wide .party-settings__toggle {
  font-size: max(14px, calc(28 * var(--u)));
}

/* the mode robot in the room a short setup leaves above its action; gone when that room is too small to hold it */
.party-mascot {
  flex: 1 1 0;
  min-height: 0;
  container-type: size;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.party-mascot__stage {
  position: relative;
  height: min(100%, calc(430 * var(--u)));
  max-width: 100%;
  aspect-ratio: 257 / 288;
}
.party-mascot__robot {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.party-mascot__shadow {
  position: absolute;
  left: 50%;
  bottom: 1%;
  width: 36%;
  transform: translateX(-50%);
  opacity: 0.31;
  filter: brightness(0);
}
@container (max-height: 110px) {
  .party-mascot__stage {
    display: none;
  }
}

/* Couch Clash: three sections; the column fills the window so the robot can take what is left of it */
.couch-setup__column {
  min-height: 100%;
}
/* the open card grows with its content: not the stretched, height-capped last card of the old settings columns */
.layout-wide .couch-setup__columns .couch-setup__col > .couch-section.couch-section--settings,
.layout-wide .couch-setup__columns .couch-setup__col > .couch-section.couch-section--settings > .couch-section__card {
  flex: 0 0 auto;
  max-height: none;
}
.layout-wide .couch-setup__columns--2 {
  min-height: 100%;
}
.layout-wide .couch-setup__col--summary {
  align-self: start;
}
