@import url('./challenges.css');
/*
  Friends tab. Sources: Prefabs/UI/Friends/FriendsHome.prefab (the tab), FriendsPanel.prefab (the sheets,
  a CategoryPreviewPopup variant), FriendsPlayTogether.prefab, FriendsScanner.prefab, FriendsEntry.prefab,
  FriendsRequestRow.prefab, Prefabs/UI/Hub/HubTabBanner.prefab and the 1.3.0 captures (reference 38-39,
  48-53). Sizes are canvas units via --u (see tokens.css); the phone layout follows the prefabs, the wide
  layout (.fr-page--wide and the sheet stage) is the desktop composition: the banner card spans the
  column, PLAY TOGETHER / Join / Add are three tiles in one row, the friend list and the requests sit
  side by side, and the sheets stand centred in a 720 px column.
*/

/* ---- environment: Friends has its own lakeside garden, not Home's park (docs "Friends r2") ------------ */
.hub-backdrop--friends {
  background: #9fd9f0 url('../assets/unity/Resources/Friends/Art/R2Background.webp') center 62% / cover no-repeat;
}
.hub-backdrop--friends .hub-backdrop__layer,
.hub-backdrop--friends .hub-backdrop__rays {
  display: none;
}

/* ---- the tab page and its card ------------------------------------------------------------------- */
.fr-page {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}
.fr-page--phone {
  padding: calc(19 * var(--u)) calc(20 * var(--u)) calc(15 * var(--u));
}
.fr-page--wide {
  padding: 20px 24px 28px;
}
.fr-card {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: calc(48 * var(--u));
  background: #f8f6f1;
  box-shadow: 0 calc(10 * var(--u)) calc(28 * var(--u)) rgba(0, 0, 0, 0.16);
  overflow: hidden;
}
.fr-body {
  flex: 1 1 auto;
  min-height: 0;
  background: #f8f6f1;
}

/* ---- banner (HubTabBanner): sky art, FRIENDS, subtitle, the pair behind the lower edge ------------------ */
.fr-banner {
  position: relative;
  flex: none;
  height: calc(300 * var(--u));
  overflow: hidden;
  background: #9eccec;
}
.fr-banner__art {
  position: absolute;
  left: 0;
  bottom: calc(-72 * var(--u));
  width: max(calc(1664 * var(--u)), 100%);
  aspect-ratio: 1536 / 443;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.fr-banner__title {
  position: absolute;
  left: calc(44 * var(--u));
  top: calc(48 * var(--u));
  max-width: calc(620 * var(--u));
  line-height: calc(66 * var(--u));
  font-weight: var(--w-black);
  font-size: calc(52 * var(--u));
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #1e2a44;
  white-space: nowrap;
}
.fr-banner__subtitle {
  position: absolute;
  left: calc(46 * var(--u));
  top: calc(118 * var(--u));
  /* the prefab's 500 units, but never closer than about 40 units to the pair's headphone (their box starts 490 units
     from the right edge): on a tall phone, where the banner is narrower than 1036 units, the line wraps instead of
     reaching it */
  width: min(calc(500 * var(--u)), calc(100% - 556 * var(--u)));
  text-wrap: balance;
  font-weight: var(--w-semibold);
  font-size: calc(27 * var(--u));
  line-height: calc(34 * var(--u));
  color: #1f5a99;
}
.fr-banner__robot {
  position: absolute;
  right: calc(12 * var(--u));
  top: calc(50 * var(--u));
  width: calc(478 * var(--u));
  height: calc(354 * var(--u));
}

/* ---- tab content ---------------------------------------------------------------------------------- */
.fr-home {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
  padding: calc(24 * var(--u)) calc(26 * var(--u)) calc(28 * var(--u));
}
.fr-home__top {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.fr-home__cols {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.fr-home__side {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.fr-home__main {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.fr-cta.btn {
  --btn-h: calc(106 * var(--u));
  --btn-font: calc(30.5 * var(--u));
}

/* shortcut tiles: BaseButtonBlue / BaseButtonGreen faces, 250 u high, icon left, title and detail right */
.fr-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(28 * var(--u));
}
.fr-tile {
  --face: #3d86cc;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: calc(22 * var(--u));
  height: calc(250 * var(--u));
  padding: calc(28 * var(--u)) calc(24 * var(--u)) 0 calc(28 * var(--u));
  border-radius: calc(70 * var(--u));
  text-align: left;
  color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--face) 86%, #ffffff) 0%, var(--face) 70%);
  box-shadow:
    inset 0 0 0 calc(5 * var(--u)) color-mix(in srgb, var(--face) 64%, #ffffff),
    inset 0 calc(-10 * var(--u)) 0 color-mix(in srgb, var(--face) 76%, #000000),
    0 calc(8 * var(--u)) calc(14 * var(--u)) rgba(27, 37, 89, 0.2);
  transition:
    transform var(--t-fast) var(--ease-out),
    filter var(--t-fast);
}
.fr-tile--green {
  --face: #4fcb83;
}
.fr-tile:hover:not(:disabled) {
  filter: brightness(1.04);
}
.fr-tile:active:not(:disabled) {
  transform: translateY(calc(6 * var(--u))) scale(0.99);
}
.fr-tile:disabled {
  filter: saturate(0.5) brightness(1.04);
  opacity: 0.8;
}
.fr-tile__icon {
  flex: none;
  width: calc(92 * var(--u));
  height: calc(92 * var(--u));
  margin-top: calc(45 * var(--u));
  object-fit: contain;
}
.fr-tile__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.fr-tile__title {
  display: flex;
  align-items: center;
  min-height: calc(97 * var(--u));
  font-weight: var(--w-bold);
  font-size: calc(47 * var(--u));
  line-height: 1.1;
  text-shadow: var(--on-colour-shadow);
}
.fr-tile__detail {
  display: flex;
  align-items: center;
  min-height: calc(103 * var(--u));
  margin-top: calc(1 * var(--u));
  font-weight: var(--w-regular);
  font-size: calc(35 * var(--u));
  line-height: 1.2;
  text-shadow: var(--on-colour-shadow);
}

/* Friend requests row (the slate compact BaseButton recoloured pale, with the envelope art) */
.fr-requests {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  width: 100%;
  height: calc(139 * var(--u));
  padding: 0 calc(28 * var(--u)) 0 calc(26 * var(--u));
  border-radius: 999px;
  text-align: left;
  background: #e8f1fa;
  box-shadow:
    inset 0 0 0 calc(4 * var(--u)) rgba(255, 255, 255, 0.9),
    0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(27, 37, 89, 0.1);
  transition: filter var(--t-fast);
}
.fr-requests:hover:not(:disabled) {
  filter: brightness(1.02);
}
.fr-requests__icon {
  flex: none;
  width: calc(92 * var(--u));
  height: calc(92 * var(--u));
  object-fit: contain;
}
.fr-requests__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--u));
}
.fr-requests__title {
  font-weight: var(--w-bold);
  font-size: calc(42 * var(--u));
  line-height: 1.1;
  color: var(--ink);
}
.fr-requests__subtitle {
  font-weight: var(--w-regular);
  font-size: calc(31 * var(--u));
  line-height: 1.2;
  color: var(--ink);
}
.fr-requests__badge {
  flex: none;
  display: grid;
  place-items: center;
  min-width: calc(70 * var(--u));
  height: calc(70 * var(--u));
  padding: 0 calc(10 * var(--u));
  border-radius: 999px;
  background: #feb90b;
  font-weight: var(--w-bold);
  font-size: calc(33 * var(--u));
  color: var(--ink);
}

/* FRIENDS & PRIVACY > : the text link under the requests row */
.fr-link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: calc(10 * var(--u));
  min-height: calc(64 * var(--u));
  padding: 0 calc(12 * var(--u));
  font-weight: var(--w-extrabold);
  font-size: calc(26.5 * var(--u));
  letter-spacing: var(--tmp-bold);
  text-transform: uppercase;
  color: var(--ink);
}
.fr-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.fr-link__chev {
  font-size: 1.3em;
  line-height: 1;
}

.fr-alert {
  text-align: center;
  font-weight: var(--w-semibold);
  font-size: calc(30 * var(--u));
  color: var(--ink-muted);
}
.fr-alert.is-error {
  color: var(--danger-ink);
}
.fr-offline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding: calc(34 * var(--u)) calc(40 * var(--u)) calc(34 * var(--u)) calc(52 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #fff6df;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #e6d49c;
  color: #6c5117;
}
.fr-offline__accent {
  position: absolute;
  left: 0;
  top: calc(30 * var(--u));
  bottom: calc(30 * var(--u));
  width: calc(12 * var(--u));
  border-radius: 0 calc(8 * var(--u)) calc(8 * var(--u)) 0;
  background: #c19127;
}
.fr-offline strong {
  font-weight: var(--w-semibold);
  font-size: calc(42 * var(--u));
}
.fr-offline p {
  font-size: calc(36 * var(--u));
  line-height: 1.25;
}
.fr-room {
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--u));
  padding: calc(26 * var(--u)) calc(36 * var(--u));
  border-radius: calc(36 * var(--u));
  text-align: left;
  background: #e6f8eb;
  box-shadow: inset 0 0 0 calc(3 * var(--u)) #aadab9;
  color: #235d39;
}
.fr-room strong {
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
}
.fr-room span {
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
}
.fr-room .fr-room__go {
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* the friend list (FriendsEntry rows on the neutral white surface) */
.fr-section {
  font-weight: var(--w-semibold);
  font-size: calc(30 * var(--u));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #808890;
}
.fr-friends {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
}
.fr-friend {
  display: flex;
  align-items: center;
  gap: calc(20 * var(--u));
  min-height: calc(200 * var(--u));
  padding: calc(16 * var(--u)) calc(24 * var(--u)) calc(16 * var(--u)) calc(38 * var(--u));
  border-radius: calc(60 * var(--u));
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #e4e8ec,
    0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(27, 37, 89, 0.1);
}
.fr-friend__main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  align-self: stretch;
  text-align: left;
}
.fr-friend__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--u));
}
.fr-friend__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--w-bold);
  font-size: calc(47 * var(--u));
  line-height: 1.15;
  letter-spacing: var(--tmp-bold);
  color: #27344e;
}
.fr-friend__detail {
  display: flex;
  align-items: center;
  font-weight: var(--w-semibold);
  font-size: calc(33 * var(--u));
  color: rgba(39, 52, 78, 0.78);
}
.fr-friend__detail.is-online {
  color: #0d8439;
}
.btn.fr-friend__invite:not(:disabled) {
  --btn-base: #4fcb83;
}
.btn.fr-friend__invite {
  --btn-h: calc(120 * var(--u));
  --btn-font: calc(39 * var(--u));
  flex: none;
  min-width: calc(212 * var(--u));
}
.fr-dot {
  display: inline-block;
  flex: none;
  width: calc(22 * var(--u));
  height: calc(22 * var(--u));
  margin-right: calc(10 * var(--u));
  border-radius: 50%;
  background: #2fcb6a;
  box-shadow: 0 0 0 calc(3 * var(--u)) rgba(47, 203, 106, 0.25);
}

/* avatar: the picture, else the first letter (rows: pale disc; hero: solid green disc with the cyan ring) */
.fr-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #d9f1e3;
  overflow: hidden;
}
.fr-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fr-avatar__letter {
  font-weight: var(--w-bold);
  font-size: calc(var(--size) * 0.42);
  line-height: 1;
  color: #40474d;
}
.fr-avatar--ring {
  background: #23864c;
  overflow: visible;
  box-shadow: 0 0 0 calc(var(--size) * 0.055) #4ccbf8;
}
.fr-avatar--ring img {
  border-radius: 50%;
}
.fr-avatar--ring .fr-avatar__letter {
  color: #fff;
  font-size: calc(var(--size) * 0.55);
}

/* "your first rival awaits" and the unavailable states: the searching robot on a white card */
.fr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(36 * var(--u));
}
.fr-empty__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(2 * var(--u));
  padding: calc(8 * var(--u)) calc(20 * var(--u)) 0;
  text-align: center;
}
.fr-empty__robot {
  width: calc(480 * var(--u));
  height: calc(250 * var(--u));
}
.fr-empty__card h2 {
  margin-top: calc(10 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(45 * var(--u));
  line-height: 1.15;
  color: #151a52;
}
.fr-empty__card p {
  max-width: 24em;
  text-wrap: balance;
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.25;
  color: #808890;
}
/* The hero's two actions are one group of one width: the primary (green add-friend call, a blue retry when
   offline) above the account hand-off, a quieter slate secondary that is a little lower and set smaller. */
.fr-empty__actions {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
  width: 100%;
}
.fr-empty__actions > .btn {
  width: 100%;
}
.fr-empty__action.btn {
  --btn-h: calc(92 * var(--u));
  --btn-font: calc(31 * var(--u));
  padding: 0 calc(40 * var(--u));
}
.fr-empty__actions .fr-account.btn {
  --btn-h: calc(80 * var(--u));
  --btn-font: calc(26 * var(--u));
}
/* a short phone (the window is at least half as wide as it is tall, so the 1299 units of this tab no longer
   fit above the tab bar): the first-rival robot, the gaps and the link give up height together so the account
   hand-off stays whole inside the card instead of being cut by its lower edge */
@media (max-width: 759px) and (min-aspect-ratio: 1/2) {
  .fr-home {
    gap: calc(14 * var(--u));
    padding: calc(18 * var(--u)) calc(26 * var(--u)) calc(20 * var(--u));
  }
  .fr-home__top,
  .fr-home__side,
  .fr-home__main {
    gap: calc(14 * var(--u));
  }
  .fr-home__cols {
    gap: calc(18 * var(--u));
  }
  .fr-link {
    min-height: calc(44 * var(--u));
  }
  .fr-empty {
    gap: calc(24 * var(--u));
  }
  .fr-empty__robot {
    height: calc(200 * var(--u));
  }
  .fr-empty__card h2 {
    margin-top: calc(4 * var(--u));
  }
  .fr-empty__actions {
    gap: calc(14 * var(--u));
  }
  .fr-empty__action.btn {
    --btn-h: calc(86 * var(--u));
  }
  .fr-empty__actions .fr-account.btn {
    --btn-h: calc(74 * var(--u));
  }
}
/* a phone-width window that is nearly as wide as it is tall (600 x 900): the same again, a little further */
@media (max-width: 759px) and (min-aspect-ratio: 5/8) {
  .fr-empty__robot {
    height: calc(130 * var(--u));
  }
  .fr-link {
    min-height: calc(36 * var(--u));
  }
  .fr-home {
    gap: calc(10 * var(--u));
  }
  .fr-home__top,
  .fr-home__side,
  .fr-home__main {
    gap: calc(10 * var(--u));
  }
  .fr-empty {
    gap: calc(16 * var(--u));
  }
}

/* ---- sheets (FriendsPanel: navy header band, warm body that scrolls) ------------------------------------ */
.fr-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(21 * var(--u)) calc(20 * var(--u)) calc(15 * var(--u));
}
.fr-sheet {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  border-radius: calc(48 * var(--u));
  background: #f6f9f7;
  box-shadow: 0 calc(10 * var(--u)) calc(28 * var(--u)) rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.fr-sheet__head {
  flex: none;
  display: grid;
  grid-template-columns: calc(84 * var(--u)) 1fr calc(84 * var(--u));
  align-items: center;
  column-gap: calc(20 * var(--u));
  height: calc(130 * var(--u));
  padding: 0 calc(26 * var(--u));
  background: #151a52;
  color: #fff;
}
/* the 1.3.0 Back / Close glyphs fill about two thirds of their disc */
.fr-sheet__head .icon-btn svg {
  width: 74%;
  height: 74%;
}
.fr-sheet__head .icon-btn:first-child svg {
  width: 56%;
  height: 56%;
}
.fr-sheet__head h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-weight: var(--w-semibold);
  font-size: calc(44 * var(--u));
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.fr-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  padding: calc(14 * var(--u)) calc(26 * var(--u)) calc(39 * var(--u));
}
.fr-sheet__body > * {
  flex: none;
}
.fr-actions {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
/* the two halves of a split sheet simply flow one after the other on a phone */
.app:not(.app--wide) .fr-split__a > .fr-hero {
  margin-bottom: calc(-6 * var(--u));
}
.fr-split__b .fr-actions {
  gap: calc(25 * var(--u));
}
/* MY QR CODE: the two actions sit closer, and "Renew my friend code" hangs lower (live 1.3.0) */
.fr-sheet__body .fr-actions.fr-actions--tight {
  gap: calc(16 * var(--u));
  margin-top: calc(26 * var(--u));
}
.fr-actions--tight + .fr-textlink {
  margin-top: calc(40 * var(--u));
}
.fr-split,
.fr-split__a,
.fr-split__b {
  display: contents;
}
.fr-sheet__body .fr-actions {
  margin-top: calc(17 * var(--u));
}
.fr-sheet__body .fr-split__b > *,
.fr-sheet__body .fr-split__a > * {
  flex: none;
}
/* when a sheet is taller than the screen its actions stay in reach instead of scrolling away */
.fr-sheet__body .fr-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: calc(10 * var(--u)) 0 calc(4 * var(--u));
  background: linear-gradient(180deg, rgba(246, 249, 247, 0), #f6f9f7 14%);
}
.fr-sheet__body .fr-actions.fr-actions--flow {
  position: static;
  padding: 0;
  background: none;
}
.fr-requests-stage .fr-sheet__body .fr-actions {
  position: static;
  padding: 0;
  background: none;
}
.fr-requests-empty-layout,
.fr-requests-followup { display: contents; }
.fr-privacy-stage .fr-sheet__footer {
  flex: none;
  padding: calc(18 * var(--u)) calc(26 * var(--u)) calc(28 * var(--u));
  border-top: calc(2 * var(--u)) solid #dce6e2;
}
.fr-privacy-stage .fr-sheet__footer .fr-actions {
  gap: calc(20 * var(--u));
}
.fr-privacy-stage .fr-sheet__footer .btn--block.btn {
  --btn-h: calc(130 * var(--u));
  --btn-font: calc(38 * var(--u));
}
.fr-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(26 * var(--u));
}
/* the 1.3.0 sheets: primary actions 108 u, secondary 83 u (measured on the live build at 430x932) */
.fr-sheet .btn--block.btn {
  --btn-h: calc(114 * var(--u));
  --btn-font: calc(30 * var(--u));
}
.fr-sheet .btn--slate.btn--block {
  --btn-h: calc(89 * var(--u));
  --btn-font: calc(26.5 * var(--u));
}
/* MY QR CODE / SCAN QR (and the unblock pair) */
.fr-sheet .fr-pair .btn--block.btn {
  --btn-h: calc(89 * var(--u));
  --btn-font: calc(27 * var(--u));
}
/* privacy keeps the large default button of the prefab */
.fr-sheet .fr-actions--large .btn--block.btn {
  --btn-h: calc(162 * var(--u));
  --btn-font: calc(47 * var(--u));
}
/* requests and privacy are the tall panels: the sheet stands on the whole stage, content from the top */
.fr-stage--fill .fr-sheet {
  flex: 1 1 auto;
}
.fr-stage--fill .fr-sheet__body .fr-actions {
  gap: calc(12 * var(--u));
}
.fr-stage--fill .fr-sheet__body .fr-actions.fr-actions--large {
  gap: calc(32 * var(--u));
  margin-top: calc(72 * var(--u));
}
.fr-stage--fill .fr-actions + .fr-caption {
  margin-top: calc(14 * var(--u));
  font-size: calc(35 * var(--u));
}
.fr-stage--fill .fr-caption + .fr-textlink {
  margin-top: calc(38 * var(--u));
}
.layout-wide .fr-stage--fill .fr-sheet {
  flex: 0 1 auto;
}
/* BaseButton as the 1.3.0 Friends sheets draw it: flat face inside a 5.5 u ring of the same colour, thinned
   towards white, and a soft drop shadow (no lip, no top highlight) */
.fr-sheet .btn,
.fr-together__col .btn,
.fr-scan__col .btn,
.fr-home .btn {
  --ring: color-mix(in srgb, var(--btn-base) 42%, #ffffff);
  box-shadow:
    inset 0 0 0 calc(5.5 * var(--u)) var(--ring),
    0 calc(8 * var(--u)) calc(14 * var(--u)) color-mix(in srgb, var(--btn-shadow) 30%, transparent);
}
.fr-sheet .btn:active:not(:disabled),
.fr-together__col .btn:active:not(:disabled),
.fr-scan__col .btn:active:not(:disabled),
.fr-home .btn:active:not(:disabled) {
  box-shadow:
    inset 0 0 0 calc(5.5 * var(--u)) var(--ring),
    0 calc(3 * var(--u)) calc(8 * var(--u)) color-mix(in srgb, var(--btn-shadow) 26%, transparent);
}
/* Play Together header: the Back disc rides high and the title block sits a hair lower (live 1.3.0, 430 x 932) */
.app:not(.app--wide) .fr-together .screen-header__side {
  align-self: start;
  margin-top: calc(12 * var(--u));
}
.app:not(.app--wide) .fr-together .screen-header__title {
  padding-top: calc(3 * var(--u));
  gap: calc(5 * var(--u));
}

/* white hero card: the contextual robot, headline, body */
.fr-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(2 * var(--u));
  padding: calc(26 * var(--u)) calc(30 * var(--u)) calc(25 * var(--u));
  border-radius: calc(48 * var(--u));
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #e4e7ea,
    0 calc(3 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.06);
  text-align: center;
}
.fr-hero__robot {
  width: 100%;
  height: calc(420 * var(--u));
}
.fr-hero__title {
  font-weight: var(--w-semibold);
  font-size: calc(68 * var(--u));
  line-height: 1.1;
  color: #151a52;
}
.fr-hero__kicker {
  font-weight: var(--w-semibold);
  font-size: calc(44 * var(--u));
  line-height: 1.15;
  color: #151a52;
}
.fr-hero__text {
  margin-top: calc(6 * var(--u));
  max-width: 24em;
  font-weight: var(--w-medium);
  font-size: calc(38 * var(--u));
  line-height: 1.25;
  color: #808890;
  white-space: pre-line;
}
.fr-hero--identity {
  gap: calc(16 * var(--u));
  padding-top: calc(40 * var(--u));
}
.fr-hero__pair {
  width: calc(520 * var(--u));
  height: calc(390 * var(--u));
}
.fr-caption {
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(37 * var(--u));
  line-height: 1.15;
  color: #808890;
  white-space: pre-line;
}
.fr-caption--lead {
  font-size: calc(40 * var(--u));
}
/* "Joining a game never adds someone as a friend automatically..." is set larger and bolder in 1.3.0 */
.fr-caption--consent {
  font-weight: var(--w-semibold);
  font-size: calc(42 * var(--u));
  line-height: 1.24;
}
.fr-textlink {
  align-self: center;
  min-height: calc(64 * var(--u));
  padding: 0 calc(20 * var(--u));
  font-weight: var(--w-semibold);
  font-size: calc(36 * var(--u));
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}
.fr-textlink:disabled {
  opacity: 0.5;
}
.fr-wait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(20 * var(--u)) 0;
}
.fr-wait__robot {
  width: calc(360 * var(--u));
  height: calc(380 * var(--u));
}

/* code field */
.fr-field {
  display: flex;
  flex-direction: column;
  gap: calc(12 * var(--u));
  margin-top: calc(30 * var(--u));
}
.fr-field__label {
  font-weight: var(--w-bold);
  font-size: calc(23 * var(--u));
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1b2559;
}
.fr-field__input {
  width: 100%;
  height: calc(176 * var(--u));
  padding: 0 calc(40 * var(--u));
  border: 0;
  border-radius: calc(60 * var(--u));
  background: #ececef;
  box-shadow: inset 0 calc(3 * var(--u)) calc(6 * var(--u)) rgba(27, 37, 89, 0.06);
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(42 * var(--u));
  color: #27344e;
  outline-offset: 0;
}
.fr-field__input::placeholder {
  color: #6b707b;
  opacity: 1;
}
.fr-field__input:focus {
  background: #fff;
  box-shadow: inset 0 0 0 calc(5 * var(--u)) #4a86de;
  outline: none;
}

/* feedback card (FriendsFeedbackCard) */
.fr-feedback {
  --fb-fill: #edf5fb;
  --fb-border: #c1d7e5;
  --fb-accent: #528ac1;
  --fb-ink: #25455f;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
  padding: calc(22 * var(--u)) calc(28 * var(--u)) calc(22 * var(--u)) calc(44 * var(--u));
  border-radius: calc(32 * var(--u));
  background: var(--fb-fill);
  box-shadow: inset 0 0 0 calc(3 * var(--u)) var(--fb-border);
  color: var(--fb-ink);
}
.fr-feedback--good {
  --fb-fill: #edf8ee;
  --fb-border: #b3d8b9;
  --fb-accent: #269451;
  --fb-ink: #235d39;
}
.fr-feedback--warning {
  --fb-fill: #fff6df;
  --fb-border: #e6d49c;
  --fb-accent: #c19127;
  --fb-ink: #6c5117;
}
.fr-feedback--error {
  --fb-fill: #fff0ec;
  --fb-border: #e6b8ad;
  --fb-accent: #b6443a;
  --fb-ink: #853a32;
}
.fr-feedback__accent {
  position: absolute;
  left: 0;
  top: calc(18 * var(--u));
  bottom: calc(18 * var(--u));
  width: calc(12 * var(--u));
  border-radius: 0 calc(8 * var(--u)) calc(8 * var(--u)) 0;
  background: var(--fb-accent);
}
.fr-feedback strong {
  font-weight: var(--w-semibold);
  font-size: calc(38 * var(--u));
}
.fr-feedback p {
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.25;
}

/* request tabs and cards */
.fr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(26 * var(--u));
  margin-bottom: calc(-7 * var(--u));
}
.btn.fr-tab {
  --btn-h: calc(148 * var(--u));
  --btn-font: calc(43 * var(--u));
  min-width: 0;
  text-transform: none;
}
.btn.fr-tab.btn--blue {
  --btn-base: #4a86de;
}
.fr-requestlist {
  display: flex;
  flex-direction: column;
  gap: calc(20 * var(--u));
}
.fr-request {
  display: flex;
  flex-direction: column;
  gap: calc(18 * var(--u));
  padding: calc(26 * var(--u));
  border-radius: calc(48 * var(--u));
  background: #fff;
  box-shadow:
    inset 0 0 0 calc(2 * var(--u)) #e4e8ec,
    0 calc(4 * var(--u)) calc(10 * var(--u)) rgba(27, 37, 89, 0.08);
}
.fr-request__who {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
}
.fr-request__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(6 * var(--u));
}
.fr-request__copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--w-bold);
  font-size: calc(47 * var(--u));
  letter-spacing: var(--tmp-bold);
  color: #27344e;
}
.fr-request__copy span {
  font-weight: var(--w-semibold);
  font-size: calc(33 * var(--u));
  color: rgba(39, 52, 78, 0.78);
}
.fr-request__hint {
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.25;
  color: #808890;
}
.fr-request__actions {
  display: flex;
  flex-direction: column;
  gap: calc(18 * var(--u));
}

/* my QR code */
.fr-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(20 * var(--u));
  padding: calc(34 * var(--u)) calc(30 * var(--u)) calc(26 * var(--u));
  border-radius: calc(48 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e4e7ea;
}
.fr-identity h2 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--w-bold);
  font-size: calc(69 * var(--u));
  color: #151a52;
}
.fr-qr {
  align-self: center;
  width: calc(403 * var(--u));
  height: calc(403 * var(--u));
  background: #fff;
  box-shadow: 0 0 0 calc(2 * var(--u)) #e4e7ea;
}
.fr-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.fr-qr--loading {
  background: #fff linear-gradient(90deg, #fff, #eef1f4, #fff) 0 0 / 200% 100%;
  animation: fr-shimmer 1.4s linear infinite;
}
.reduced-motion .fr-qr--loading {
  animation: none;
}
@keyframes fr-shimmer {
  to {
    background-position: -200% 0;
  }
}
.fr-code {
  text-align: center;
  font-weight: var(--w-black);
  font-size: calc(73 * var(--u));
  line-height: 1;
  letter-spacing: 0.02em;
  color: #151a52;
}

/* friend profile */
.fr-profile {
  display: flex;
  align-items: center;
  gap: calc(32 * var(--u));
  padding: calc(34 * var(--u)) calc(34 * var(--u));
  border-radius: calc(48 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e4e7ea;
}
.fr-profile__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(8 * var(--u));
}
.fr-profile__copy h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: var(--w-bold);
  font-size: calc(58 * var(--u));
  line-height: 1.1;
  color: #151a52;
}
.fr-profile__copy p {
  display: flex;
  align-items: center;
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  color: #596673;
}
.fr-profile__copy p.is-online {
  color: #0d8439;
  font-weight: var(--w-semibold);
}
.fr-card-plain {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  padding: calc(30 * var(--u)) calc(32 * var(--u));
  border-radius: calc(48 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e4e7ea;
}
.fr-label {
  font-weight: var(--w-bold);
  font-size: calc(32 * var(--u));
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #151a52;
}
.fr-heading {
  font-weight: var(--w-semibold);
  font-size: calc(38 * var(--u));
  color: #1b2559;
}
.fr-subtitle {
  margin-top: calc(9 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  color: #52756f;
}
.fr-sheet__body > .fr-label {
  margin-top: calc(14 * var(--u));
  margin-bottom: calc(11 * var(--u));
  font-size: calc(31 * var(--u));
  color: #1b2559;
}
.fr-sheet__body > .fr-heading {
  margin-top: calc(14 * var(--u));
}
.fr-sheet__body > .fr-heading + .fr-note {
  font-size: calc(36 * var(--u));
  color: #52756f;
}
.fr-note {
  font-weight: var(--w-medium);
  font-size: calc(32 * var(--u));
  line-height: 1.3;
  color: #6b7480;
  white-space: pre-line;
}
.fr-note--lines {
  color: #52756f;
}
.fr-note--card {
  padding: calc(26 * var(--u)) calc(32 * var(--u));
  border-radius: calc(36 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e4e7ea;
}
.fr-h2h__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(12 * var(--u));
  text-align: center;
}
.fr-h2h__grid div {
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
  min-width: 0;
}
.fr-h2h__grid b {
  font-weight: var(--w-black);
  font-size: calc(84 * var(--u));
  line-height: 1;
  color: #151a52;
}
.fr-h2h__grid span {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  line-height: 1.2;
  color: #596673;
}
.fr-topics {
  display: flex;
  flex-direction: column;
}
.fr-topic {
  display: flex;
  align-items: center;
  gap: calc(24 * var(--u));
  padding: calc(18 * var(--u)) 0;
  border-top: calc(2 * var(--u)) solid #eceff2;
}
.fr-topic:first-child {
  border-top: 0;
}
.fr-topic__disc {
  --accent: #2fcb6a;
  flex: none;
  display: grid;
  place-items: center;
  width: calc(110 * var(--u));
  height: calc(110 * var(--u));
  border-radius: 50%;
  background: var(--accent);
  font-weight: var(--w-bold);
  font-size: calc(48 * var(--u));
  color: #fff;
}
.fr-topic__disc img {
  width: 66%;
  height: 66%;
  object-fit: contain;
}
.fr-topic__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
}
.fr-topic__copy strong {
  font-weight: var(--w-semibold);
  font-size: calc(38 * var(--u));
  color: #151a52;
}
.fr-topic__copy span {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: #808890;
}
.fr-topic__bar {
  display: block;
  height: calc(14 * var(--u));
  margin-top: calc(6 * var(--u));
  border-radius: 999px;
  background: #e6e9ed;
  overflow: hidden;
}
.fr-topic__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.fr-topic__value {
  flex: none;
  font-weight: var(--w-bold);
  font-size: calc(44 * var(--u));
  color: #151a52;
}

/* privacy */
.fr-switches {
  display: flex;
  flex-direction: column;
  padding: calc(28 * var(--u)) calc(40 * var(--u)) calc(26 * var(--u));
  border-radius: calc(48 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e9ecef;
}
.fr-switchrow {
  display: flex;
  align-items: center;
  gap: calc(62 * var(--u));
  padding: calc(36 * var(--u)) 0;
}
.fr-switchrow__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
}
.fr-switchrow__copy strong {
  font-weight: var(--w-semibold);
  font-size: calc(46 * var(--u));
  line-height: 1.15;
  color: #1b2559;
}
.fr-switchrow__help {
  font-weight: var(--w-regular);
  font-size: calc(37 * var(--u));
  line-height: 1.2;
  color: #52756f;
}
.fr-switchrow__state {
  font-weight: var(--w-bold);
  font-size: calc(30 * var(--u));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #52756f;
}
.fr-switch {
  flex: none;
  position: relative;
  width: calc(176 * var(--u));
  height: calc(102 * var(--u));
  border-radius: 999px;
  background: #cbd1d8;
  box-shadow: inset 0 calc(4 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, 0.12);
  transition: background var(--t-med) var(--ease-out);
}
.fr-switch.is-on {
  background: #0d8439;
}
.fr-switch:disabled {
  opacity: 0.55;
}
.fr-switch__handle {
  position: absolute;
  top: calc(8 * var(--u));
  left: calc(8 * var(--u));
  width: calc(86 * var(--u));
  height: calc(86 * var(--u));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 calc(4 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, 0.28);
  transition: transform var(--t-med) var(--ease-out);
}
.fr-switch.is-on .fr-switch__handle {
  transform: translateX(calc(74 * var(--u)));
}
.fr-blocked {
  display: flex;
  flex-direction: column;
  gap: calc(14 * var(--u));
}
.fr-blockedrow {
  display: flex;
  align-items: center;
  gap: calc(22 * var(--u));
  padding: calc(18 * var(--u)) calc(24 * var(--u));
  border-radius: calc(44 * var(--u));
  background: #fff;
  box-shadow: inset 0 0 0 calc(2 * var(--u)) #e4e8ec;
}
.fr-blockedrow__copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
}
.fr-blockedrow__copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--w-bold);
  font-size: calc(40 * var(--u));
  letter-spacing: var(--tmp-bold);
  color: #27344e;
}
.fr-blockedrow__copy span {
  font-weight: var(--w-medium);
  font-size: calc(28 * var(--u));
  color: #6b7480;
}
.fr-unblock .fr-pair {
  grid-template-columns: 1fr;
}

/* compact confirmations (remove / block) */
.popup.fr-confirm {
  width: min(100%, calc(900 * var(--u)));
  background: #f6f9f7;
}
.popup.fr-confirm:focus-visible {
  outline: none;
  box-shadow: 0 calc(16 * var(--u)) calc(48 * var(--u)) rgba(0, 0, 0, 0.32);
}
.fr-confirm .popup__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(18 * var(--u));
  padding: calc(48 * var(--u)) calc(44 * var(--u)) calc(20 * var(--u));
  text-align: center;
}
.fr-confirm .popup__footer {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: calc(18 * var(--u));
  padding: calc(8 * var(--u)) calc(44 * var(--u)) calc(40 * var(--u));
}
.fr-confirm__title {
  font-weight: var(--w-bold);
  font-size: calc(54 * var(--u));
  line-height: 1.15;
  color: #151a52;
}
.fr-confirm__body {
  font-weight: var(--w-medium);
  font-size: calc(36 * var(--u));
  line-height: 1.3;
  color: #596673;
  white-space: pre-line;
}
.fr-confirm .btn--block.btn {
  --btn-h: calc(100 * var(--u));
  --btn-font: calc(34 * var(--u));
}

/* ---- full-screen pages: Play Together and the scanner (the hub chrome is hidden, like Unity) ----------- */
.fr-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background-color: #c6f2d6;
  background-size: cover;
  background-position: center;
}
.fr-together__scroll,
.fr-scan__body {
  flex: 1;
  min-height: 0;
}
.fr-together__col,
.fr-scan__col {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: calc(44 * var(--u)) calc(50 * var(--u)) calc(var(--safe-bottom) + 64 * var(--u));
}
/* Play Together: the column sits 14 u lower and 17 u further from the right edge (live 1.3.0, 430 x 932) */
.app:not(.app--wide) .fr-together__col {
  padding-top: calc(58 * var(--u));
  padding-right: calc(67 * var(--u));
}
.fr-together__hero {
  align-self: center;
  width: calc(560 * var(--u));
  height: calc(420 * var(--u));
}
.fr-together__title {
  margin-top: calc(15 * var(--u));
  text-align: center;
  font-weight: var(--w-semibold);
  font-size: calc(70 * var(--u));
  line-height: 1.12;
  color: var(--ink);
}
.fr-together__body {
  margin-top: calc(19 * var(--u));
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(42 * var(--u));
  line-height: 1.2;
  color: var(--ink);
}
.fr-together__cards {
  display: flex;
  flex-direction: column;
  gap: calc(63 * var(--u));
  margin-top: calc(70 * var(--u));
}
.fr-together__col .fr-together__join.btn {
  --btn-h: calc(87 * var(--u));
  --btn-font: calc(30 * var(--u));
  margin-top: calc(61 * var(--u));
}
.fr-together__note {
  margin-top: calc(49 * var(--u));
  text-align: center;
  font-weight: var(--w-medium);
  font-size: calc(34 * var(--u));
  line-height: 1.22;
  color: #4d6a64;
}

/* the two route cards: the mode-picker card (960 x 284, saturated face, 28 u lip, robot left) */
.fr-route {
  --mode: #d991ba;
  position: relative;
  display: block;
  width: 100%;
  height: calc(268 * var(--u));
  text-align: left;
  border-radius: calc(70 * var(--u));
  transition: transform var(--t-fast) var(--ease-out);
}
.fr-route:active:not(:disabled) {
  transform: translateY(calc(6 * var(--u))) scale(0.99);
}
.fr-route:disabled {
  filter: saturate(0.55);
  opacity: 0.85;
}
.fr-route__face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--mode);
  box-shadow:
    inset 0 calc(-16 * var(--u)) 0 color-mix(in srgb, var(--mode) 74%, #1b2559),
    inset 0 0 0 calc(5 * var(--u)) color-mix(in srgb, var(--mode) 86%, #1b2559),
    0 calc(10 * var(--u)) calc(18 * var(--u)) rgba(27, 37, 89, 0.18);
}
.fr-route:hover:not(:disabled) .fr-route__face {
  filter: brightness(1.04);
}
.fr-route__robot {
  position: absolute;
  left: calc(30 * var(--u));
  bottom: calc(10 * var(--u));
  width: calc(240 * var(--u));
  height: calc(336 * var(--u));
}
.fr-route__text {
  position: absolute;
  left: calc(280 * var(--u));
  right: calc(50 * var(--u));
  top: calc(41 * var(--u));
  bottom: calc(44 * var(--u));
  display: flex;
  flex-direction: column;
  gap: calc(4 * var(--u));
}
.fr-route__title {
  display: flex;
  flex-direction: column;
  font-weight: var(--w-bold);
  font-size: calc(50 * var(--u));
  line-height: 1.09;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 calc(3 * var(--u)) 0 rgba(0, 0, 0, 0.18), var(--on-colour-shadow);
}
.fr-route__hint {
  max-width: calc(500 * var(--u));
  font-weight: var(--w-medium);
  font-size: calc(38 * var(--u));
  line-height: 1.18;
  color: #fff;
  text-shadow: var(--on-colour-shadow);
}
.fr-route__badge {
  position: absolute;
  right: calc(44 * var(--u));
  top: calc(-32 * var(--u));
  display: grid;
  place-items: center;
  min-width: calc(244 * var(--u));
  height: calc(62 * var(--u));
  padding: 0 calc(18 * var(--u));
  border-radius: 999px;
  background: #ffe577;
  color: #825b23;
  font-weight: var(--w-bold);
  font-size: calc(22 * var(--u));
  letter-spacing: 0.02em;
  box-shadow: 0 calc(4 * var(--u)) calc(8 * var(--u)) rgba(27, 37, 89, 0.16);
}

/* scanner */
.fr-scan__viewport {
  position: relative;
  align-self: center;
  width: 100%;
  max-width: calc(880 * var(--u));
  aspect-ratio: 3 / 4;
  max-height: 58vh;
  border-radius: calc(48 * var(--u));
  background: #fff;
  box-shadow: 0 calc(8 * var(--u)) calc(20 * var(--u)) rgba(27, 37, 89, 0.2);
  overflow: hidden;
}
.fr-scan__viewport.is-live {
  background: #0b1740;
}
.fr-scan__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.is-live .fr-scan__video {
  display: block;
}
.fr-scan__frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: calc(36 * var(--u));
  border: calc(8 * var(--u)) solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 999px rgba(11, 23, 64, 0.38);
}
.fr-scan__robot {
  position: absolute;
  left: 50%;
  bottom: calc(24 * var(--u));
  width: 70%;
  height: 86%;
  transform: translateX(-50%);
}
.fr-scan__status {
  margin: calc(28 * var(--u)) 0 calc(24 * var(--u));
  text-align: center;
  font-weight: var(--w-semibold);
  font-size: calc(40 * var(--u));
  line-height: 1.25;
  color: var(--ink);
}
.fr-scan__status.is-warn {
  color: var(--danger-ink);
}
.fr-scan__col .fr-actions {
  max-width: calc(880 * var(--u));
  width: 100%;
  align-self: center;
}
.fr-scan__col .btn--block.btn,
.fr-together__col .btn--block.btn {
  --btn-h: calc(100 * var(--u));
}

/* ---- wide layout (>= 760 px): desktop composition ------------------------------------------------------ */
/* Tablets and other portrait windows keep the prefab's single column; a landscape window of 1000 px and more puts
   the actions on the left (PLAY TOGETHER, the two shortcut tiles, requests, privacy) and the friend list or the
   first-rival hero with the account hand-off on the right, and the card fills the page height. */
.layout-wide .fr-card {
  flex: 0 1 auto;
  max-height: 100%;
}
.layout-wide .fr-body {
  flex: 0 1 auto;
}
/* banner: the sky art is sized by width so only its left 58 % shows (the rays, clouds and the left bush; the trophy
   and its confetti start at 59 %), placed so the bush always rises the same share of the band above the lower
   edge; the pair stands behind that edge, cut at the belly (owner rule, header robots: no legs or feet) */
.layout-wide .fr-banner {
  --fr-banner-h: 200px;
  --fr-robot-gap: 36px;
  --fr-robot-h: calc((var(--fr-banner-h) - var(--fr-robot-gap)) * 1.5);
  --fr-robot-w: calc(var(--fr-robot-h) * 1.351);
  --fr-title-size: 40px;
  --fr-title-top: calc(var(--fr-banner-h) * 0.17);
  container-type: inline-size;
  height: var(--fr-banner-h);
}
.layout-wide .fr-banner__art {
  left: 0;
  bottom: auto;
  top: calc(var(--fr-banner-h) * 0.72 - 26.875cqw);
  width: 172%;
  height: auto;
  aspect-ratio: 1536 / 443;
}
.layout-wide .fr-banner__title {
  left: 44px;
  top: var(--fr-title-top);
  max-width: calc(100% - var(--fr-robot-w) - 84px);
  font-size: var(--fr-title-size);
  line-height: calc(var(--fr-title-size) * 1.2);
}
.layout-wide .fr-banner__subtitle {
  left: 46px;
  top: calc(var(--fr-title-top) + var(--fr-title-size) * 1.2 + 4px);
  width: auto;
  max-width: calc(100% - var(--fr-robot-w) - 86px);
  font-size: 19px;
  line-height: 26px;
  text-wrap: balance;
}
.layout-wide .fr-banner__robot {
  right: 24px;
  top: calc(var(--fr-robot-gap) - var(--fr-robot-h) * 0.045);
  width: var(--fr-robot-w);
  height: var(--fr-robot-h);
}

/* tab content, single column (tablets in portrait) */
.layout-wide .fr-home {
  gap: 16px;
  padding: 20px;
}
.layout-wide .fr-home__cols,
.layout-wide .fr-home__side,
.layout-wide .fr-home__main,
.layout-wide .fr-home__top {
  gap: 16px;
}
.layout-wide .fr-cta.btn {
  --btn-h: 72px;
  --btn-font: 24px;
}
.layout-wide .fr-cta .btn__icon {
  width: 1.45em;
  height: 1.45em;
}
.layout-wide .fr-tiles {
  gap: 16px;
}
/* the two lines of a shortcut tile are one block, centred in the face (above the 10 u lip) */
.layout-wide .fr-tile {
  height: auto;
  min-height: 112px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 20px 18px;
  border-radius: 36px;
}
.layout-wide .fr-tile__icon {
  width: 52px;
  height: 52px;
  margin: 0;
}
.layout-wide .fr-tile__text {
  gap: 4px;
}
.layout-wide .fr-tile__title,
.layout-wide .fr-tile__detail {
  min-height: 0;
  margin: 0;
  padding: 0;
}
.layout-wide .fr-tile__title {
  font-size: 26px;
  line-height: 1.15;
}
.layout-wide .fr-tile__detail {
  font-size: 19px;
  line-height: 1.25;
}
.layout-wide .fr-empty__card {
  padding-top: 0;
}
.layout-wide .fr-empty__card h2,
.layout-wide .fr-empty__card p {
  text-wrap: balance;
}
.layout-wide .fr-empty__robot {
  width: calc(150px * 0.783);
  height: 150px;
}
.layout-wide .fr-home .fr-account.btn {
  --btn-h: 60px;
  --btn-font: 17px;
}
/* the first-rival hero's two actions: one width, set well inside the column so the pair reads as the end of
   the hero card, the primary above a smaller secondary */
.layout-wide .fr-empty__actions {
  width: min(100%, 400px);
  gap: 14px;
}
.layout-wide .fr-retry {
  width: min(100%, 400px);
  align-self: center;
}
.layout-wide .fr-home .fr-empty__action.btn {
  --btn-h: 62px;
  --btn-font: 19px;
  padding: 0 28px;
}
.layout-wide .fr-home .fr-empty__actions .fr-account.btn {
  --btn-h: 52px;
  --btn-font: 16px;
}

/* a tablet in portrait that is not tall enough for the whole tab (768 x 1024: the tab needs about 960 px under the
   banner): a lower banner, a smaller first-rival robot and tighter gaps keep both hero actions inside the card */
@media (min-width: 760px) and (max-height: 1100px) and (orientation: portrait) {
  .layout-wide .fr-banner {
    --fr-banner-h: 164px;
  }
  .layout-wide .fr-home {
    gap: 12px;
    padding: 16px 20px;
  }
  .layout-wide .fr-home__cols,
  .layout-wide .fr-home__side,
  .layout-wide .fr-home__main,
  .layout-wide .fr-home__top,
  .layout-wide .fr-tiles {
    gap: 12px;
  }
  .layout-wide .fr-empty__robot {
    width: calc(104px * 0.783);
    height: 104px;
  }
}

/* two columns (landscape, >= 1000 px): sizes follow the window height so a tall desktop is used, a 720 px laptop
   still fits */
@media (min-width: 1000px) and (orientation: landscape) {
  .layout-wide .fr-banner {
    --fr-banner-h: clamp(160px, 23vh, 252px);
    --fr-robot-gap: 10px;
    --fr-title-size: clamp(38px, 4.2vh, 46px);
  }
  .layout-wide .fr-banner__subtitle {
    font-size: clamp(19px, 2.1vh, 22px);
    line-height: 1.35;
  }
  .layout-wide .fr-card {
    flex: 1 1 auto;
  }
  .layout-wide .fr-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
  .layout-wide .fr-home {
    --fr-gap: clamp(12px, 1.7vh, 20px);
    flex: 1 0 auto;
    justify-content: center;
    gap: var(--fr-gap);
    padding: clamp(22px, 3vh, 36px) clamp(28px, 3vw, 44px);
  }
  .layout-wide .fr-home__cols {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(372px, 1fr);
    column-gap: clamp(28px, 3vw, 56px);
    align-items: center;
  }
  /* the two columns stand centred against each other; with a friend list both start at the top */
  .layout-wide .fr-home__side {
    container: fr-actions / inline-size;
    gap: var(--fr-gap);
  }
  .layout-wide .fr-home__cols--list {
    align-items: start;
  }
  .layout-wide .fr-home__top,
  .layout-wide .fr-tiles {
    gap: var(--fr-gap);
  }
  .layout-wide .fr-home__main {
    gap: var(--fr-gap);
  }
  .layout-wide .fr-cta.btn {
    --btn-h: clamp(56px, 7.2vh, 76px);
    --btn-font: clamp(19px, 2.3vh, 24px);
  }
  /* a narrow action column (about 1000-1150 px windows) stacks the two tiles as full-width rows, icons in line
     with the requests envelope; from 500 px they stand side by side as on the phone */
  .layout-wide .fr-tiles {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout-wide .fr-tile {
    min-height: clamp(84px, 11vh, 132px);
    justify-content: flex-start;
    padding: 12px 20px 16px 16px;
  }
  @container fr-actions (min-width: 500px) {
    .layout-wide .fr-tiles {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .layout-wide .fr-tile {
      justify-content: center;
      padding: 12px 14px 16px;
    }
  }
  /* sized so "Enter a game code" stays on one line in a 250 px tile */
  .layout-wide .fr-tile__icon {
    width: clamp(48px, 5.4vh, 56px);
    height: clamp(48px, 5.4vh, 56px);
  }
  .layout-wide .fr-tile__title {
    font-size: clamp(23px, 2.6vh, 27px);
  }
  .layout-wide .fr-tile__detail {
    font-size: clamp(17px, 1.8vh, 19px);
  }
  .layout-wide .fr-requests {
    height: clamp(72px, 8.8vh, 88px);
    gap: 14px;
    padding: 0 18px 0 16px;
  }
  .layout-wide .fr-requests__icon {
    width: clamp(48px, 5.4vh, 56px);
    height: clamp(48px, 5.4vh, 56px);
  }
  .layout-wide .fr-requests__title {
    font-size: clamp(21px, 2.5vh, 26px);
  }
  .layout-wide .fr-requests__subtitle {
    font-size: clamp(16px, 1.9vh, 19px);
  }
  .layout-wide .fr-requests__badge {
    min-width: clamp(38px, 4.6vh, 46px);
    height: clamp(38px, 4.6vh, 46px);
    font-size: clamp(18px, 2.1vh, 22px);
  }
  .layout-wide .fr-link {
    min-height: 36px;
    font-size: clamp(15px, 1.75vh, 18px);
  }
  .layout-wide .fr-empty {
    gap: clamp(16px, 2.2vh, 26px);
  }
  .layout-wide .fr-empty__robot {
    width: calc(clamp(118px, 19vh, 228px) * 0.783);
    height: clamp(118px, 19vh, 228px);
  }
  .layout-wide .fr-empty__card h2 {
    font-size: clamp(25px, 3vh, 32px);
  }
  .layout-wide .fr-empty__card p {
    font-size: clamp(16px, 1.95vh, 20px);
  }
  .layout-wide .fr-home .fr-empty__action.btn {
    --btn-h: clamp(52px, 6.4vh, 64px);
    --btn-font: clamp(16px, 1.95vh, 19px);
  }
  .layout-wide .fr-home .fr-account.btn {
    --btn-h: clamp(52px, 6.4vh, 66px);
    --btn-font: clamp(15px, 1.75vh, 18px);
  }
  .layout-wide .fr-home .fr-empty__actions .fr-account.btn {
    --btn-h: clamp(44px, 5.2vh, 54px);
    --btn-font: clamp(14px, 1.65vh, 16px);
  }
  /* the offline and open-game cards head the action column */
  .layout-wide .fr-offline,
  .layout-wide .fr-room {
    gap: 4px;
    padding: 14px 22px 14px 30px;
    border-radius: 24px;
  }
  .layout-wide .fr-offline__accent {
    top: 14px;
    bottom: 14px;
    width: 7px;
  }
  .layout-wide .fr-offline strong,
  .layout-wide .fr-room strong {
    font-size: clamp(19px, 2.3vh, 23px);
  }
  .layout-wide .fr-offline p,
  .layout-wide .fr-room span {
    font-size: clamp(15px, 1.85vh, 18px);
  }
  /* friend rows in the right column: the avatar, name and status keep their room beside INVITE */
  .layout-wide .fr-section {
    font-size: clamp(15px, 1.75vh, 18px);
  }
  .layout-wide .fr-friends {
    gap: 10px;
  }
  .layout-wide .fr-friend {
    min-height: 0;
    gap: 10px;
    padding: 10px 12px 10px 14px;
    border-radius: 30px;
  }
  .layout-wide .fr-friend__main {
    gap: 12px;
  }
  /* fixed sizes: the column is 372-400 px wide at every window height, room for "Ready when you are" */
  .layout-wide .fr-friend .fr-avatar {
    width: 54px;
    height: 54px;
  }
  .layout-wide .fr-friend .fr-avatar__letter {
    font-size: 26px;
  }
  .layout-wide .fr-friend__copy {
    gap: 2px;
  }
  .layout-wide .fr-friend__name {
    font-size: 21px;
  }
  .layout-wide .fr-friend__detail {
    font-size: 16px;
  }
  .layout-wide .fr-dot {
    width: 10px;
    height: 10px;
    margin-right: 6px;
  }
  .layout-wide .btn.fr-friend__invite {
    --btn-h: 46px;
    --btn-font: 16px;
    min-width: 0;
    padding: 0 16px;
  }
}
/* a short window (a 720-800 px laptop): the first-rival robot gives up some height so a two-line Finnish
   headline and both buttons stay inside the card */
@media (min-width: 1000px) and (orientation: landscape) and (max-height: 800px) {
  .layout-wide .fr-empty {
    gap: 14px;
  }
  .layout-wide .fr-empty__robot {
    width: calc(clamp(104px, 16vh, 228px) * 0.783);
    height: clamp(104px, 16vh, 228px);
  }
}
/* a tall desktop window (900 px and more): a taller banner and roomier actions fill the height the column gives;
   the widths stay those of the 1160 px hub column */
@media (min-width: 1000px) and (orientation: landscape) and (min-height: 860px) {
  .layout-wide .fr-banner {
    --fr-banner-h: clamp(200px, 25vh, 280px);
    --fr-robot-gap: 26px;
  }
  .layout-wide .fr-home {
    --fr-gap: clamp(16px, 2vh, 24px);
  }
  .layout-wide .fr-cta.btn {
    --btn-h: clamp(64px, 7.4vh, 80px);
  }
  .layout-wide .fr-tile {
    min-height: clamp(100px, 12vh, 140px);
  }
  .layout-wide .fr-requests {
    height: clamp(80px, 9vh, 96px);
  }
  .layout-wide .fr-link {
    min-height: 44px;
  }
  .layout-wide .fr-empty__robot {
    width: calc(clamp(160px, 22vh, 260px) * 0.783);
    height: clamp(160px, 22vh, 260px);
  }
}
/* A wide action column (500 px and more: the two shortcut tiles stand side by side, as on a 1180 x 820 tablet in landscape,
   a 1280 x 720 laptop and the desktops) has height to spare under the banner, so its rows take more of it and the
   block no longer floats with a band of empty card above and below. A narrow column stacks the tiles and keeps the
   compact rows above. */
@media (min-width: 1000px) and (orientation: landscape) {
  @container fr-actions (min-width: 500px) {
    .layout-wide .fr-cta.btn {
      --btn-h: clamp(56px, 8.4vh, 84px);
      --btn-font: clamp(19px, 2.4vh, 26px);
    }
    .layout-wide .fr-tile {
      min-height: clamp(84px, 13.6vh, 150px);
    }
    .layout-wide .fr-requests {
      height: clamp(72px, 10.4vh, 100px);
      margin-top: 2px;
    }
    .layout-wide .fr-link {
      min-height: clamp(36px, 5vh, 48px);
    }
  }
}
@media (min-width: 1000px) and (orientation: landscape) and (min-height: 801px) and (max-height: 859px) {
  @container fr-actions (min-width: 500px) {
    .layout-wide .fr-cta.btn {
      --btn-h: clamp(56px, 9.2vh, 92px);
    }
    .layout-wide .fr-tile {
      min-height: clamp(84px, 15.4vh, 160px);
    }
    .layout-wide .fr-requests {
      height: clamp(72px, 11.6vh, 112px);
      margin-top: 4px;
    }
  }
}
@media (min-width: 1000px) and (orientation: landscape) and (min-height: 860px) {
  @container fr-actions (min-width: 500px) {
    .layout-wide .fr-cta.btn {
      --btn-h: clamp(72px, 9vh, 100px);
    }
    .layout-wide .fr-tile {
      min-height: clamp(112px, 15vh, 180px);
    }
    .layout-wide .fr-requests {
      height: clamp(90px, 11.4vh, 124px);
      margin-top: 6px;
    }
    .layout-wide .fr-link {
      min-height: 48px;
    }
  }
}
/* split sheets: story on the left, form and actions on the right */
.layout-wide .fr-sheet.fr-sheet--split {
  width: min(100%, 980px);
}
.layout-wide .fr-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 28px;
  align-items: stretch;
}
.layout-wide .fr-split--center {
  align-items: center;
}
.layout-wide .fr-split__a > .fr-hero:only-child {
  flex: 1;
  justify-content: center;
}
.layout-wide .fr-split__a,
.layout-wide .fr-split__b {
  display: flex;
  flex-direction: column;
  gap: calc(16 * var(--u));
  min-width: 0;
}
.layout-wide .fr-split__b .fr-actions {
  margin-top: calc(10 * var(--u));
}
@media (min-width: 760px) and (max-width: 1199px) {
  .layout-wide .fr-split__b .fr-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .layout-wide .fr-split__b .fr-actions {
    position: static;
  }
}
.layout-wide .fr-hero__robot {
  height: calc(330 * var(--u));
}
.layout-wide .fr-requests-stage--empty .fr-hero__robot {
  height: calc(260 * var(--u));
}
.layout-wide .fr-requests-stage--empty .fr-caption + .fr-textlink {
  margin-top: calc(20 * var(--u));
}
.layout-wide .fr-hero__pair {
  width: calc(400 * var(--u));
  height: calc(300 * var(--u));
}
.layout-wide .fr-switchrow {
  padding: calc(20 * var(--u)) 0;
}
/* the hub keeps its column at 1160 px; the full-screen pages must take the whole window */
.app--wide .hub__page > .fr-overlay {
  width: auto;
  max-width: none;
  margin: 0;
}
.layout-wide .fr-qr {
  width: calc(380 * var(--u));
  height: calc(380 * var(--u));
}
.layout-wide .fr-identity {
  padding: calc(24 * var(--u)) calc(30 * var(--u)) calc(20 * var(--u));
}
.layout-wide .fr-identity h2 {
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
}
.layout-wide .fr-stage {
  justify-content: center;
  align-items: center;
  padding: 20px 24px 28px;
}
.layout-wide .fr-sheet {
  width: min(100%, 720px);
}
.layout-wide .fr-together__col,
.layout-wide .fr-scan__col {
  max-width: 760px;
  padding-top: 40px;
}
.layout-wide .fr-together__col {
  max-width: 1120px;
  padding: 24px 28px 32px;
}
.layout-wide .fr-together__hero {
  width: calc(360 * var(--u));
  height: calc(260 * var(--u));
}
.layout-wide .fr-together__cards {
  margin-top: 40px;
}
.layout-wide .fr-together__col .fr-together__join.btn {
  width: min(100%, 500px);
  align-self: center;
  margin-top: 32px;
}
.layout-wide .fr-together__note {
  margin-top: 22px;
}
@media (min-width: 1024px) {
  .layout-wide .fr-together__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }
  .layout-wide .fr-together .fr-route {
    height: 200px;
  }
}
@media (min-width: 1024px) and (max-height: 800px) {
  .layout-wide .fr-requests-stage--empty .fr-sheet { width: min(100%, 860px); }
  .layout-wide .fr-requests-stage--empty .fr-requests-empty-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
  }
  .layout-wide .fr-requests-stage--empty .fr-hero__robot { height: calc(200 * var(--u)); }
  .layout-wide .fr-requests-stage--empty .fr-hero__title { font-size: calc(52 * var(--u)); }
  .layout-wide .fr-requests-stage--empty .fr-hero__text { font-size: calc(32 * var(--u)); }
  .layout-wide .fr-requests-stage--empty .fr-requests-followup {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
  }
  .layout-wide .fr-requests-stage--empty .fr-actions,
  .layout-wide .fr-requests-stage--empty .fr-caption + .fr-textlink { margin-top: 0; }
  .layout-wide .fr-requests-stage--empty .fr-caption { font-size: calc(32 * var(--u)); }
  .layout-wide .fr-together__col { padding-top: 16px; padding-bottom: 20px; }
  .layout-wide .fr-together__hero { width: 160px; height: 112px; }
  .layout-wide .fr-together__title { font-size: 32px; }
  .layout-wide .fr-together__body { font-size: 20px; }
  .layout-wide .fr-together__cards { margin-top: 28px; }
  .layout-wide .fr-together .fr-route { height: 180px; }
  .layout-wide .fr-together__col .fr-together__join.btn { margin-top: 28px; }
}
.layout-wide .fr-scan__viewport {
  max-height: 52vh;
}
/* narrow phones: the sheet body keeps its air, long Finnish labels may wrap in the tiles */
@media (max-width: 380px) {
  .fr-tile__title {
    font-size: calc(43 * var(--u));
  }
}
/* phones: both shortcut subtitles are set one line high and one size ("Enter a game code" and "Find your people"
   never leave a lone word on a second line, and the two tiles' text blocks match). The text column is a size
   container, and the subtitle takes the prefab's 35 u or, in a narrower column, the size at which the longer of the
   two English lines just fits it (11.4 % of the column); a longer translation still wraps, balanced */
@media (max-width: 759px) {
  /* a soft light halo keeps a second banner line legible where it crosses the bush's crest */
  .fr-banner__subtitle {
    text-shadow: 0 0 calc(10 * var(--u)) rgba(255, 255, 255, 0.85), 0 0 calc(3 * var(--u)) rgba(255, 255, 255, 0.6);
  }
  .fr-tile__text {
    flex: 1 1 0;
    container-type: inline-size;
  }
  .fr-tile__detail {
    min-height: calc(80 * var(--u)); /* a one-line subtitle sits nearer its title, level with the icon */
    font-size: min(calc(35 * var(--u)), 11.4cqw);
    text-wrap: balance;
  }
}
