/* Home arena: one physical screen, a live player portrait and direct game modes.
   All dimensions inside the screen follow its 4:3 container. The look is a bright
   "sticker" game UI: pastel and navy buttons with a thin edge, a solid base and a soft shadow,
   and outlined white lettering. */
/* The colours (navy slabs, theme blocks, mint, button recipe) and the three themes: arena-theme.css. */
/* On mint (a chosen tile or row, the featured offer, the main action), lettering stays navy and
   green in every theme. */
body.arcade-home-body :is(
  #arcade-main .players-screen :is(.players-character[aria-pressed='true'], .players-filters button[aria-pressed='true'], .players-profile-button),
  .arcade-cabinet :is(#arcade-panel-player, #arcade-panel-emotes, #arcade-panel-animations)
    :is(.character-emotes-link, .look-row, .emote-slot, .animation-row, .character-name-entry):is(:hover, .is-selected, :focus-visible, :has(input:focus)),
  .arcade-cabinet #arcade-panel-options .arcade-system-row:is(:hover, .is-selected, :focus-visible),
  .arcade-cabinet #arcade-panel-controls .arcade-key-row:is(:hover, .is-selected, :focus-visible, .is-demo),
  #playerProfileModal .player-profile-stat.is-primary
) {
  --block-ink: var(--home-outline); --block-muted: #4d6f63; --block-accent: #2f6e5b; --block-gloss: .6;
}
.arcade-home-body .arcade-cabinet {
  /* Menu geometry: the grid is centred between the top bar and the challenges strip, and the
     portrait spans the grid's first two rows. */
  --home-zone-top: 11.5cqh;
  --home-zone-bottom: 97cqh;
  --home-row-play: 27cqh;
  --home-row-modes: 25cqh;
  --home-row-links: 11.5cqh;
  --home-row-gap: 2.6cqh;
  --home-links-gap: 4.8cqh;
  --home-menu-height: calc(var(--home-row-play) + var(--home-row-gap) + var(--home-row-modes) + var(--home-links-gap) + var(--home-row-links));
  --home-menu-top: calc((var(--home-zone-top) + var(--home-zone-bottom) - var(--home-menu-height)) / 2);
  /* Title screen: logo, tagline and start button (about 41cqh from the logo's header box to the
     button's foot) centred between the top bar and the challenges strip. */
  --home-title-top: 23.5cqh;
}

/* Outlined white lettering. paint-order keeps the stroke outside the glyphs. */
.arcade-home-body :is(.home-game-menu .arcade-menu-name, .home-friends-menu .arcade-menu-name,
  .arcade-hud-who, .arcade-hud-level .arcade-hud-stat, .arcade-hud-coins strong,
  .arcade-challenges-title, .arcade-challenges-list li span) {
  color: var(--home-white);
  -webkit-text-stroke: .16em var(--home-outline);
  paint-order: stroke fill;
  text-shadow: 0 .09em 0 var(--home-outline);
}

/* The beach keeps playing behind the menu, softened so it reads as scenery. */
.arcade-home-body .arcade-cabinet.is-menu-ready:not(.is-demo-visible) .home-stage-frame:not(.is-playing) {
  filter: blur(3px) saturate(1.15) brightness(.92);
  transition: filter 300ms ease-out;
}
.arcade-home-body .arcade-attract-bg,
.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-attract-bg {
  background:
    linear-gradient(180deg, rgb(10 20 52 / .62), rgb(10 20 52 / 0) 17%),
    linear-gradient(0deg, rgb(10 20 52 / .5), rgb(10 20 52 / 0) 22%),
    var(--scene-tint);
}

.arcade-home-body .arcade-center,
.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-center {
  position: absolute; inset: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; max-width: none; pointer-events: none;
}
.arcade-home-body .arcade-center::before { display: none; }

/* ------------------------------------------------------------ top bar */
.arcade-home-body .home-title-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  height: 13cqh; padding: 0; border: 0; background: none; pointer-events: none;
}
/* The page heading stays for screen readers; the brand is the visible title. */
.arcade-home-body .home-title-header .arcade-page-title {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.arcade-home-body .home-title-tag { display: none; }
body.arcade-home-body .home-title-header .game-brand .game-brand-main { font-size: clamp(22px, 4.4cqw, 48px); }
.arcade-home-body .home-title-brand {
  pointer-events: auto;
  /* Four offset copies draw the outline, the fifth the drop under it. */
  filter: drop-shadow(2px 0 0 var(--home-outline)) drop-shadow(-2px 0 0 var(--home-outline))
    drop-shadow(0 2px 0 var(--home-outline)) drop-shadow(0 -2px 0 var(--home-outline))
    drop-shadow(0 .5cqh 0 var(--home-outline));
}

body.arcade-home-body .arcade-cabinet .arcade-hud-account:has(.is-display-only) {
  top: 2.2cqh; left: 3cqw; right: 3cqw; z-index: 4;
  align-items: center; gap: 1.2cqw;
}
body.arcade-home-body .arcade-cabinet .arcade-hud-account > .arcade-hud-pad {
  order: 2; top: 0; margin: 0;
  .arcade-hud-pad-tip { left: auto; right: -6px; }
}
/* Gamepad light: a small navy chip with the same edge and shadow.
   The controls below are also skinned by game-controls.css through an :is() list that holds
   ids, so they take the #arcade-main prefix and repeat its :not() in their states. */
body.arcade-home-body .arcade-cabinet #arcade-main .arcade-hud-account > .arcade-hud-pad {
  /* One height (44) and one corner (10) for the HUD's controls: gamepad, coins, guest sign-in. */
  align-items: center; height: 44px; padding: 0 1.4cqh; box-sizing: border-box;
  border: var(--btn-edge) solid var(--home-outline); border-radius: 10px;
  background: var(--home-panel); box-shadow: none; --drop-soft: var(--btn-soft);
  &:is(:hover, :focus-visible, .is-selected):not(:disabled) { background: rgb(42 58 112 / .9); }
}
body.arcade-home-body .arcade-cabinet .arcade-hud-account .arcade-hud-line {
  position: relative; align-items: center; gap: 2cqw; min-height: 9cqh;
}
body.arcade-home-body .arcade-cabinet .arcade-hud-account .arcade-hud-player {
  top: 0; margin: 0; padding: 0;
}
.arcade-home-body .arcade-hud-account .arcade-hud-tag { display: none; }
/* Guest: a small caption under the name, where a signed-in player has the XP bar. */
body.arcade-home-body .arcade-cabinet .arcade-hud-account .arcade-hud-label:has(.arcade-hud-guest) {
  display: flex; flex-direction: column; align-items: flex-start; gap: .3cqh;
}
.arcade-home-body .arcade-hud-account .arcade-hud-guest {
  padding-left: .12em;
  color: var(--screen-scene-muted); font: clamp(10px, 1.4cqw, 15px)/1 var(--game-display-font);
  letter-spacing: .03em; text-transform: uppercase; text-shadow: 0 1px 3px var(--screen-scene-shadow);
}
body.arcade-home-body .arcade-cabinet .arcade-hud-account .arcade-hud-who {
  /* Badge (up to ~15cqw with a prestige emblem) + name stay clear of the centred logo. */
  max-width: 15cqw; overflow: hidden; text-overflow: ellipsis;
  font: clamp(14px, 2.2cqw, 24px)/1.15 var(--game-display-font); letter-spacing: 0;
  /* The stroke would be clipped by overflow: hidden without some room. */
  padding: .1em .12em .18em;
}

/* Signed in: level badge, then the name over the XP bar, and the coin wallet at the far end.
   The record is display: contents so its parts join the line's grid; the badge is in the flow,
   so a prestige emblem widens it and pushes the name instead of covering it. */
body.arcade-home-body .arcade-cabinet .arcade-hud-line:has(.arcade-hud-record) {
  display: grid; grid-template-columns: auto minmax(0, max-content) 1fr auto; grid-template-rows: auto auto;
  column-gap: 1cqw; row-gap: .5cqh; align-items: center;
  .arcade-hud-player { grid-area: 1 / 2; align-self: end; }
  .arcade-hud-record { display: contents; }
  /* Invisible button over the badge, the name and the XP bar: above them, so any of them opens MON PERSO. */
  .arcade-hud-profile { position: relative; z-index: 3; inset: auto; grid-area: 1 / 1 / 3 / 3; align-self: stretch; min-height: 0; border-radius: 999px; }
  .arcade-hud-level {
    grid-area: 1 / 1 / 3 / 2;
    display: inline-flex; align-items: center; justify-content: center; gap: .3cqw;
    min-width: 8.6cqh; height: 8.6cqh; padding: 0 1.2cqh; box-sizing: border-box;
    border: var(--btn-edge) solid #2c5f93; border-radius: 999px;
    background: linear-gradient(180deg, #d6ecfb, #a9d3f2);
    box-shadow: inset 0 .35cqh 0 rgb(255 255 255 / .6), inset 0 -.7cqh 0 #7eb1d8; --drop-soft: var(--btn-soft);
    font-size: 3.8cqh; text-shadow: none;
    .arcade-hud-stat { color: var(--home-outline); font-family: var(--game-display-font); -webkit-text-stroke: 0; text-shadow: none; }
  }
  .arcade-hud-level .arcade-hud-stat small { display: none; }
  /* With a prestige: emblem and level side by side, centred on one line, so the pill holds them at
     any screen height. The pill is 8.6cqh high (38px on a 1024×640 window, 69px on 1920×1080): the
     emblem keeps whole pixels, 64px where the pill has room for it, 32px below. */
  .arcade-hud-level:has(.arcade-hud-prestige) { gap: clamp(4px, .9cqh, 8px); padding-inline: .9cqh 1.6cqh; }
  .arcade-hud-prestige { display: inline-flex; align-items: center; margin: 0; }
  @container (max-height: 699px) {
    .arcade-hud-prestige .prestige-emblem { --pe-px: 1px; }
  }
  .arcade-hud-xp {
    grid-area: 2 / 2; align-self: start;
    width: 15cqw; height: 1.7cqh; margin: 0; box-sizing: border-box;
    border: .35cqh solid var(--home-outline); border-radius: 999px;
    background: rgb(10 20 52 / .75); mask-image: none; overflow: hidden;
  }
  /* Flat accent; at 0 % a 2px sliver, so the bar never reads as an empty capsule. */
  .arcade-hud-xp i { min-width: 2px; background: var(--theme-accent); }
  :is(.arcade-hud-xp-copy, .arcade-hud-xp-gain) {
    top: calc(100% + .6cqh); right: auto; left: 0;
    font-family: var(--game-display-font);
  }
  .arcade-hud-xp-copy { color: var(--home-white); text-shadow: 0 2px var(--home-outline); }
  .arcade-hud-record:hover .arcade-hud-level, .arcade-hud-record:has(.arcade-hud-profile:focus-visible) .arcade-hud-level {
    --fx: brightness(1.12);
  }
  /* Wallet: a big coin (64 px, a whole step of its 32 px sprite) breaks out of the left of a navy
     pill, the balance in large outlined lettering. */
  .arcade-hud-coins {
    grid-area: 1 / 4 / 3 / 5; margin: 0 0 0 3cqh;
    display: inline-flex; align-items: center; gap: 0;
    height: 44px; padding: 0 1.6cqw 0 0; box-sizing: border-box;
    border: var(--btn-edge) solid var(--home-outline); border-radius: 10px;
    background: linear-gradient(180deg, var(--slab-bottom), var(--slab-base)); box-shadow: none; --drop-soft: var(--btn-soft);
  }
  .arcade-hud-coins .arcade-hud-stat { gap: .9cqw; color: var(--home-white); }
  .arcade-hud-coins .coin-icon {
    width: 64px; height: 64px; margin: -12px 0 -12px -32px; background-size: 64px 64px;
    filter: drop-shadow(0 3px 0 var(--home-outline));
  }
  .arcade-hud-coins strong { font: clamp(16px, 2.3cqw, 26px)/1 var(--game-display-font); letter-spacing: .02em; }
  .arcade-hud-coins:is(:hover, :focus-visible) { --fx: brightness(1.12); }
}

/* Guest: name on the left, sign-in on the right. Same pill, height and line as the signed-in
   wallet, in the menu's lilac pastel with navy lettering. */
body.arcade-home-body .arcade-cabinet #arcade-main .arcade-hud-account:not(:has(.arcade-hud-record)) .arcade-hud-login {
  top: 0; align-self: center; box-sizing: border-box;
  height: 44px; min-height: 0; margin: 0 0 0 auto; padding: 0 1.6cqw 0 .9cqw; gap: .7cqw;
  /* The scene controls' dark surface (coins, gamepad, bottom bar), the theme accent on its edge:
     the one action of the HUD, without a candy face of its own. */
  border: 1px solid color-mix(in srgb, var(--theme-accent) 55%, var(--screen-scene-shadow)); border-radius: 10px;
  background: color-mix(in srgb, var(--screen-scene-shadow) 88%, var(--screen-scene-mint));
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--screen-scene-shadow) 60%, transparent); --drop-soft: none;
  color: var(--screen-scene-ink); font: clamp(14px, 2cqw, 22px)/1 var(--game-display-font);
  -webkit-text-stroke: 0; text-shadow: none; text-transform: uppercase;
  transition: translate 140ms ease-out, background-color 140ms ease-out;
  &:is(:hover, :focus-visible, .is-selected):not(:disabled) {
    background: color-mix(in srgb, var(--screen-scene-shadow) 78%, var(--screen-scene-mint)); color: var(--screen-scene-ink);
    translate: 0 -1px;
  }
  &:active:not(:disabled) { transform: none; translate: 0 1px; box-shadow: none; --drop-soft: none; transition-duration: 60ms; }
  img { width: 3.6cqh; height: 3.6cqh; }
}

/* ------------------------------------------------------- live portrait */
/* Same renderer and equipment as Mon perso. */
.home-player-stage {
  position: absolute; top: var(--home-menu-top); left: 3cqw; width: 40cqw;
  height: calc(var(--home-row-play) + var(--home-row-gap) + var(--home-row-modes));
  display: grid; place-items: center; isolation: isolate;
}
.home-player-canvas { width: 38cqw; height: 38cqw; max-height: calc(100% - 3cqh); object-fit: contain; image-rendering: pixelated; z-index: 1; }
.home-player-orbit {
  position: absolute; width: 32cqw; height: 12cqh; bottom: 4cqh; border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--screen-sand-shadow) 32%, transparent), transparent 70%);
}
/* The Plop talks (home-plop-talk.js): the match's emote bubble (game.css .game-emote-bubble, its
   pop-in and its exit), anchored above the head instead of following a blob on the court. */
.home-player-stage .home-plop-bubble {
  left: 50%; top: 13cqh; z-index: 2;
  max-width: 30cqw; width: max-content;
  font-size: clamp(16px, 2.05cqw, 24px);
}

/* --------------------------------------------------------- mode grid */
/* Root grid leaves its left half to the portrait; the last row spans the screen. */
.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-menu-nav {
  /* left + right (not a cqw width): the nav's container is narrower than the screen, so 94cqw
     stopped 24px short of the HUD and the challenges strip; now all three share one right edge. */
  position: absolute; top: var(--home-menu-top); left: 3cqw; right: 3cqw; width: auto;
  max-width: none; margin: 0; padding: 0; pointer-events: auto;
}
.arcade-home-body .arcade-menu-nav .home-game-menu {
  display: grid; grid-template-columns: 43% minmax(0, 1fr);
  grid-template-rows: var(--home-row-play) var(--home-row-modes) var(--home-row-links); gap: var(--home-row-gap) 2cqw;
  padding: 0; margin: 0;
}
.home-play-slot, .home-modes-slot { grid-column: 2; min-width: 0; }
.home-modes-slot { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; }
.home-shortcuts {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6cqw;
  margin-top: calc(var(--home-links-gap) - var(--home-row-gap));
}

/* Beach controls: a lit face, a coloured base and a short soft shadow.
   Typography stays crisp; the card itself marks its selection (below). */
body.arcade-home-body .arcade-cabinet .arcade-menu-nav :is(.home-game-menu, .home-friends-menu) .arcade-menu-item {
  --card-bottom: var(--screen-panel);
  --card-base: var(--screen-shadow);
  --card-edge: var(--screen-line);
  --card-ink: var(--screen-muted);
  --card-label: var(--screen-ink);
  --card-depth: clamp(4px, .75cqh, 7px);
  --card-light: 14%;
  --card-shadow: 0 3px 6px color-mix(in srgb, var(--screen-scene-shadow) 22%, transparent);
  position: relative; height: 100%; min-height: 0;
  padding: 1.6cqh 1.6cqw calc(1.6cqh + var(--card-depth));
  border: 1px solid var(--card-edge); border-radius: clamp(10px, 1.8cqh, 16px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-bottom), var(--screen-scene-ink) var(--card-light)), var(--card-bottom));
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--screen-scene-ink) 35%, transparent),
    inset 0 calc(-1 * var(--card-depth)) 0 var(--card-base), var(--card-shadow);
  color: var(--card-label); filter: none;
  transition: translate 140ms ease-out, background-color 140ms ease-out, box-shadow 100ms ease-out, filter 160ms ease-out;
  .arcade-menu-name { color: var(--card-label); -webkit-text-stroke: 0; text-shadow: none; }
  &:active {
    transform: none; translate: 0 3px; scale: none;
    box-shadow: inset 0 -2px 0 var(--card-base), 0 1px 2px color-mix(in srgb, var(--screen-scene-shadow) 18%, transparent);
    transition-duration: 60ms;
  }
  @media (prefers-reduced-motion: reduce) { transition: none; }
}
body.arcade-home-body[data-ui-input='pointer'] .arcade-cabinet .arcade-menu-nav :is(.home-game-menu, .home-friends-menu) .arcade-menu-item:hover:not(:active),
body.arcade-home-body:not([data-ui-input='pointer']) .arcade-cabinet .arcade-menu-nav :is(.home-game-menu, .home-friends-menu) .arcade-menu-item:is(.is-selected, :focus-visible):not(:active) {
  /* A short lift and a deeper shadow: readable on the pale cards, where a lighter face is not. */
  translate: 0 -3px; filter: none;
  --card-shadow: 0 7px 12px color-mix(in srgb, var(--screen-scene-shadow) 30%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-bottom) 78%, var(--screen-scene-ink)), var(--card-bottom));
  .home-card-icon { animation: home-art-hop 420ms ease-out; }
  .home-play-icon { animation: home-art-nudge 420ms ease-out; }
  .home-shortcut-icon { animation: home-art-tilt 420ms ease-out; }
}
/* Keyboard and gamepad: no cursor, so the chosen card says it itself. A dark then cream double ring
   that reads on every card colour, a slow breath once the icon has hopped, and the other cards
   step back. */
body.arcade-home-body:not([data-ui-input='pointer']) .arcade-cabinet .arcade-menu-nav :is(.home-game-menu, .home-friends-menu) {
  .arcade-menu-item:is(.is-selected, :focus-visible):not(:active) {
    translate: 0 -5px;
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--screen-scene-ink) 35%, transparent),
      inset 0 calc(-1 * var(--card-depth)) 0 var(--card-base),
      0 0 0 3px var(--screen-scene-shadow), 0 0 0 6px var(--screen-scene-ink), var(--card-shadow);
    animation: home-card-breathe 1.1s ease-in-out 420ms infinite alternate;
  }
  &:has(.arcade-menu-item:is(.is-selected, :focus-visible)) .arcade-menu-item:not(.is-selected, :focus-visible) {
    --fx: brightness(.78) saturate(.7);
  }
}
@keyframes home-card-breathe { to { scale: 1.02; } }
@keyframes home-art-nudge { 45% { translate: .8cqw 0; scale: 1.08; } }
@keyframes home-art-hop { 40% { translate: 0 -1.4cqh; } 70% { translate: 0 .2cqh; } }
@keyframes home-art-tilt { 30% { rotate: -12deg; scale: 1.12; } 65% { rotate: 8deg; } }
@media (prefers-reduced-motion: reduce) {
  body.arcade-home-body .arcade-cabinet .arcade-menu-nav :is(.home-game-menu, .home-friends-menu) .arcade-menu-item {
    scale: none !important;
    :is(.home-card-icon, .home-shortcut-icon) { animation: none !important; }
  }
}
/* Play carries the theme accent (the scene's, not the interface's: the card sits on the scene in
   both dark and sand modes). Shell and lagoon bring the beach into the other modes. */
body.arcade-home-body .arcade-cabinet .arcade-menu-nav .home-game-menu .home-play-card,
body.arcade-home-body .arcade-cabinet .arcade-menu-nav .home-friends-menu [data-arcade-action='private'] {
  --card-bottom: var(--theme-accent);
  --card-base: color-mix(in srgb, var(--theme-accent) 65%, #000);
  --card-edge: var(--card-base);
  --card-label: var(--screen-card-ink);
  --card-ink: color-mix(in srgb, var(--card-base), #000 40%);
  --card-depth: clamp(5px, .9cqh, 8px);
}
body.arcade-home-body .arcade-cabinet .arcade-menu-nav :is(.home-game-menu, .home-friends-menu) .home-mode-card {
  --card-bottom: var(--screen-card-shell);
  --card-base: var(--screen-card-shell-base);
  --card-edge: var(--screen-card-shell-base);
  --card-label: var(--screen-card-ink);
  /* Captions in a deep tint of the card's own colour. */
  --card-ink: color-mix(in srgb, var(--card-base), #000 40%);
}
body.arcade-home-body .arcade-cabinet .arcade-menu-nav .home-game-menu [data-arcade-action='menu-online'],
body.arcade-home-body .arcade-cabinet .arcade-menu-nav .home-friends-menu [data-arcade-action='panel-join'] {
  --card-bottom: var(--screen-card-lagoon);
  --card-base: var(--screen-card-lagoon-base);
  --card-edge: var(--screen-card-lagoon-base);
}
body.arcade-home-body .arcade-cabinet .arcade-menu-nav :is(.home-game-menu, .home-friends-menu) .arcade-menu-item {
  :is(.home-card-eyebrow, .home-card-sub) { color: var(--card-ink); }
}

body.arcade-home-body .arcade-cabinet .home-game-menu .arcade-menu-name {
  letter-spacing: .02em; line-height: 1.05;
}

/* Play: the biggest target on screen. */
.arcade-home-body :is(.home-game-menu, .home-friends-menu) .home-play-card {
  display: flex; align-items: center; justify-content: space-between; text-align: left; overflow: visible;
}
.home-card-copy { display: flex; flex-direction: column; align-items: flex-start; gap: .9cqh; z-index: 1; }
/* Captions stay readable on a 1x screen: never under 12px, tracking kept light. */
.home-card-eyebrow { font: clamp(12px, 1.6cqw, 17px)/1 var(--game-display-font); letter-spacing: .04em; }
body.arcade-home-body .arcade-cabinet .home-game-menu .home-play-card .arcade-menu-name {
  font-size: clamp(30px, 6.4cqw, 68px); line-height: .95;
}
body.arcade-home-body .arcade-cabinet .home-game-menu .home-play-card .arcade-menu-format {
  display: inline-flex; align-items: center; gap: .8cqw; margin: .4cqh 0 0;
  min-height: 36px; padding: .4cqh .5cqw; border-radius: 10px;
  /* A deeper tint of the card itself: the format reads as a control without outshining PLAY. */
  background: color-mix(in srgb, var(--card-base) 28%, transparent); color: var(--card-label);
  font: clamp(14px, 2cqw, 22px)/1.15 var(--game-display-font); letter-spacing: .03em;
  cursor: pointer; transition: background-color 160ms, scale 160ms cubic-bezier(0.22, 1, 0.36, 1);
  .arcade-menu-step { display: grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: 6px; background: color-mix(in srgb, var(--card-base) 30%, transparent); color: var(--card-ink); padding-inline: .3cqw; transition: translate 160ms cubic-bezier(0.22, 1, 0.36, 1); }
  [data-arcade-publicmode-name] { display: inline-block; }
  /* The whole pill switches the format (arcade-home.js): it swells, the chevrons spread apart,
     and the new value pops in. */
  &:hover { background: color-mix(in srgb, var(--card-base) 40%, transparent); }
  &:hover [data-arcade-step='-1'] { translate: -.35cqw 0; }
  &:hover [data-arcade-step='1'] { translate: .35cqw 0; }
  &:active { scale: .96; transition-duration: 60ms; }
  &.is-switching [data-arcade-publicmode-name] { animation: home-format-pop 240ms cubic-bezier(0.22, 1, 0.36, 1); }
  @media (prefers-reduced-motion: reduce) {
    transition: none; .arcade-menu-step { transition: none; }
    &.is-switching [data-arcade-publicmode-name] { animation: none; }
  }
}
@keyframes home-format-pop { from { scale: .55; opacity: .2; } }
/* Card icons (public/images/menu): the heights below are targets; arcade-home.js shows each at
   the whole multiple of its art closest to them, so the pixels stay even. A soft drop lifts them. */
.home-card-icon {
  display: block; flex: none; width: auto; height: 11.4cqh; aspect-ratio: auto;
  image-rendering: pixelated; filter: drop-shadow(0 .5cqh 0 rgb(16 22 46 / .35));
}
.home-play-icon { margin-right: 3cqw; height: 9.5cqh; }


/* All menu controls retain the shared four-corner cursor from arcade-ui.css. */
/* Their hover and selection are the cards' too: a lift, a brighter face and a deeper shadow, with
   no frame. The start button hops on its own, so it only brightens and deepens its shadow. */
body.arcade-home-body[data-ui-input='pointer'] .arcade-cabinet #arcade-main :is(.arcade-hud-login, .arcade-hud-account > .arcade-hud-pad):hover:not(:active, :disabled),
body.arcade-home-body:not([data-ui-input='pointer']) .arcade-cabinet #arcade-main :is(.arcade-hud-login,
  .arcade-hud-account > .arcade-hud-pad):is(.is-selected, :focus-visible):not(:active) {
  translate: 0 round(-.3cqh, 1px); --fx: brightness(1.08); --drop-soft: var(--btn-soft-hover);
}

/* Training and friends: icon, name, then a quieter caption. */
.arcade-home-body :is(.home-game-menu, .home-friends-menu) .home-mode-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6cqh; text-align: center;
}
body.arcade-home-body .arcade-cabinet :is(.home-game-menu, .home-friends-menu) .home-mode-card .arcade-menu-name { font-size: clamp(13px, 2.2cqw, 24px); white-space: nowrap; }
.home-card-sub {
  font: clamp(12px, 1.45cqw, 15px)/1 var(--game-display-font); letter-spacing: .03em; white-space: nowrap;
}

/* Shortcuts: a quiet coloured face and a matching icon chip. */
.arcade-home-body .home-game-menu .home-shortcut { display: flex; align-items: center; justify-content: center; gap: 1cqw; }
body.arcade-home-body .arcade-cabinet .home-game-menu .home-shortcut .arcade-menu-name { font-size: clamp(12px, 1.85cqw, 21px); white-space: nowrap; }
/* A shared chip keeps the four illustrated shortcuts aligned. */
.home-shortcut .home-shortcut-icon {
  --chip: var(--home-steel);
  display: grid; place-items: center; flex: none;
  width: clamp(28px, 6.2cqh, 48px); height: clamp(28px, 6.2cqh, 48px); border-radius: 1.2cqh; box-sizing: border-box;
  border: 0; background: var(--shortcut-accent, var(--screen-scene-mint));
  box-shadow: none;
  color: var(--screen-bubble-ink); font-size: 2.8cqh;
}
/* All four illustrations (64×64 pixel art) share the same footprint and hover animation. */
.home-shortcut .home-shortcut-art {
  display: block; width: 92%; height: 92%; object-fit: contain;
  image-rendering: pixelated;
}
/* MON PERSO: the player's bare blob (index.js) in a 120 px frame where it fills 78×82 px, centred
   low. Enlarged and raised so it fills the chip like the other icons; the chip clips the margins. */
.home-shortcut[data-arcade-action='panel-player'] .home-shortcut-icon { position: relative; overflow: hidden; }
.home-shortcut .home-shortcut-art[data-blobby-color] {
  position: absolute; left: 50%; top: 50%;
  width: 120%; height: 120%; max-width: none;
  /* The blob's centre sits at 50% / 64% of its frame. */
  translate: -50% -64%;
}
/* The cards' pastels: mint, coral, sand, lilac. */
.home-shortcut[data-arcade-action='panel-player'] .home-shortcut-icon { --chip: #b9ead6; }
.home-shortcut[data-arcade-action='panel-shop'] .home-shortcut-icon { --chip: #ffc3b8; }
.home-shortcut[data-arcade-action='ranking'] .home-shortcut-icon { --chip: #f6dfa8; }
.home-shortcut[data-arcade-action='panel-options'] .home-shortcut-icon { --chip: #dcd0f5; }

/* Entre amis: the root's grid and cards, so the menu swaps in place. CREATE wears the accent like
   PLAY, JOIN the lagoon like the card that opened it. */
body.arcade-home-body .arcade-cabinet .arcade-menu-nav .home-friends-menu {
  display: grid; grid-template-columns: 43% minmax(0, 1fr);
  grid-template-rows: var(--home-row-play) var(--home-row-modes); gap: var(--home-row-gap) 2cqw;
  margin: 0; padding: 0;
  .home-modes-slot { grid-template-columns: 3fr 2fr; }
  /* Thinner top and bottom padding leave the scene a whole scale more room inside the card. */
  .home-play-card { padding-block: 1cqh calc(1cqh + var(--card-depth)); }
  .home-play-card .arcade-menu-name { font-size: clamp(28px, 5.6cqw, 60px); line-height: .95; }
  /* A target: arcade-home.js shows the scene at the largest whole scale the card holds. */
  .home-friends-art { height: 26cqh; }
  /* Back: the shortcuts' quiet steel, so CREATE and JOIN lead. */
  .home-back-card {
    --card-bottom: var(--screen-shortcut-face);
    --card-edge: var(--screen-shortcut-edge);
    --card-base: var(--screen-shortcut-base);
    --card-label: var(--screen-scene-ink);
    --card-light: 5%;
  }
  .home-back-icon { font-size: clamp(22px, 5cqh, 44px); color: var(--card-label); }
}

/* ------------------------------------------------------- bottom strip */
/* Flags, theme swatches and daily challenges share one row (.home-bottom-bar), so they cannot
   overlap: the two pills take their own width, the challenges the rest. On the title screen the
   row steps aside (display: contents) and the flags keep their own corner. */
.home-bottom-bar { display: contents; }
body.arcade-home-body .arcade-cabinet.is-menu-ready .home-bottom-bar {
  position: absolute; z-index: 7; inset: auto 3cqw 2.6cqh;
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center;
  gap: clamp(6px, 1cqw, 12px); pointer-events: none;
  > :is(.language-switcher, .home-theme-switcher, .arcade-challenges) {
    position: relative; inset: auto; width: auto; min-width: 0; margin: 0; pointer-events: auto;
  }
  /* One height (40) for the flags, the theme swatches and the challenges strip. */
  > :is(.language-switcher, .home-theme-switcher) { height: 40px; min-height: 0; gap: 4px; padding: 0 3px; box-sizing: border-box; }
  > .arcade-challenges { height: 40px; min-height: 0; padding: 0 12px; column-gap: 12px; box-sizing: border-box; }
  .arcade-challenges-list { min-width: 0; }
}
body.arcade-home-body .arcade-cabinet:is(.is-panel-open, .is-content-open) .home-bottom-bar,
body.has-player-profile-open .home-bottom-bar { visibility: hidden; pointer-events: none; }
/* The strip is only a call to action: the goals themselves open in the challenges panel. */
body.arcade-home-body .arcade-cabinet .home-bottom-bar :is(.arcade-challenges-time, .arcade-challenges-list) { display: none; }
body.arcade-home-body .arcade-cabinet .home-bottom-bar .arcade-challenges {
  justify-self: end; gap: 14px; font-size: clamp(14px, 1.8cqw, 20px);
}
@container (max-width: 580px) {
  body.arcade-home-body .arcade-cabinet .home-bottom-bar .arcade-challenges-pitch { display: none; }
}
/* Language: both flags in one navy pill, like the theme swatches beside it. The chosen flag sits
   on a light tint, the other one dimmed (i18n.css) until hovered. */
.arcade-home-body .arcade-attract .home-bottom-bar > .language-switcher {
  top: auto; bottom: 3cqh; left: 3cqw; gap: 1.1cqw; height: 40px; padding: 0 .9cqw; box-sizing: border-box;
  border: var(--btn-edge) solid var(--home-outline); border-radius: 999px;
  background: var(--home-panel); filter: var(--btn-soft);
}
body.arcade-home-body .arcade-cabinet #arcade-main .arcade-attract .home-bottom-bar > .language-switcher button {
  width: 32px; height: 28px; min-width: 0; min-height: 0; padding: 4px; border: 0; border-radius: 4px;
  background: none; box-shadow: none;
  &:is(:hover, :focus-visible, .is-selected) { outline: 0; background: color-mix(in srgb, var(--screen-scene-ink) 12%, transparent); }
  &[aria-pressed='true'] { background: color-mix(in srgb, var(--screen-scene-ink) 20%, transparent); }
  .language-flag { width: 24px; height: 18px; }
}
/* Theme: a navy pill right of the flags, one swatch per theme in its blocks' colour; the chosen
   one is ringed in gold. */
.arcade-home-body .arcade-attract .home-bottom-bar > .home-theme-switcher {
  display: flex; align-items: center; box-sizing: border-box;
  border: var(--btn-edge) solid var(--home-outline); border-radius: 999px;
  background: var(--home-panel); filter: var(--btn-soft);
  button {
    flex: none; width: 22px; height: 22px; padding: 0; border: 2px solid var(--home-outline); border-radius: 50%;
    background: var(--swatch); box-shadow: inset 0 -.4cqh 0 rgb(16 22 46 / .25); cursor: pointer;
    transition: scale 160ms cubic-bezier(0.22, 1, 0.36, 1);
    &:is(:hover, :focus-visible) { scale: 1.15; outline: 0; }
    &[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--home-gold), inset 0 -.4cqh 0 rgb(16 22 46 / .25); }
    @media (prefers-reduced-motion: reduce) { transition: none; }
  }
  [data-home-theme='beach'] { --swatch: #f6e7c6; }
  [data-home-theme='sunset'] { --swatch: #f8b996; }
  [data-home-theme='night'] { --swatch: #3a4f92; }
}
/* Hidden with the flags: on the title screen and under an open panel. */
.arcade-home-body .arcade-cabinet:is(:not(.is-menu-ready), .is-panel-open, .is-content-open) .arcade-attract .home-bottom-bar > .home-theme-switcher,
.has-player-profile-open .arcade-attract .home-bottom-bar > .home-theme-switcher { display: none; }

/* Daily challenges: one panel, the count in a gold chip and a progress line under each goal. */
body.arcade-home-body .arcade-cabinet .arcade-challenges {
  bottom: 2.6cqh; left: calc(21.6cqw + 22px); right: 3cqw; width: auto;
  flex-wrap: nowrap; align-items: center; justify-content: flex-start; column-gap: 1.4cqw;
  padding: 1cqh 1.4cqw; box-sizing: border-box;
  border: .45cqh solid var(--home-outline); border-radius: 1.6cqh;
  background: var(--home-panel); box-shadow: none; --drop: .6cqh;
  font: clamp(12px, 1.55cqw, 17px)/1.25 var(--game-display-font); letter-spacing: .02em; text-shadow: none;
}
body.arcade-home-body .arcade-cabinet .arcade-challenges-title {
  align-items: center; gap: .6cqw; letter-spacing: .03em;
  strong {
    padding: .3cqh .7cqw; border: .3cqh solid var(--home-outline); border-radius: 999px;
    background: var(--home-gold); color: var(--home-outline);
    -webkit-text-stroke: 0; text-shadow: none;
  }
}
body.arcade-home-body .arcade-cabinet .arcade-challenges.is-complete .arcade-challenges-title strong { background: var(--home-green); }
body.arcade-home-body .arcade-cabinet .arcade-challenges-list li {
  flex: 1 1 0; min-width: 0; align-items: center; gap: .5cqw; padding-bottom: .9cqh;
  background: linear-gradient(90deg, var(--home-green) var(--challenge-progress, 0%), rgb(255 255 255 / .16) 0) left bottom / 100% .55cqh no-repeat;
  border-radius: 2px;
  > span { overflow: hidden; text-overflow: ellipsis; -webkit-text-stroke-width: .12em; }
  > strong { color: var(--home-gold); }
  &.is-done > strong { color: var(--home-green); }
}
/* Guest: the same strip, locked, as an invitation to sign in. */
body.arcade-home-body .arcade-cabinet .arcade-challenges.is-guest {
  .arcade-challenges-title strong { background: var(--screen-raised); color: var(--screen-muted); }
  .arcade-challenges-pitch { min-width: 0; overflow: hidden; color: var(--screen-muted); text-overflow: ellipsis; white-space: nowrap; }
}
.arcade-home-body .arcade-challenges-time {
  flex: none; color: var(--home-steel); font-size: .85em; white-space: nowrap;
}
/* The whole strip opens the challenges (or signs in): a gold chevron closes it, and on hover it
   lifts and takes the slab colours of the menu buttons above, its chevron nudging right. */
body.arcade-home-body .arcade-cabinet .arcade-challenges {
  &::after {
    content: '›'; flex: none; margin-left: auto; color: var(--home-gold); font-size: 1.9em; line-height: .6;
    transition: translate 160ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  &:has(.arcade-challenges-open:is(:hover, :focus-visible, .is-selected)) {
    translate: 0 round(-.6cqh, 1px); --fx: brightness(1.08); --drop-soft: var(--btn-soft-hover);
    background: linear-gradient(180deg, var(--slab-top), var(--slab-bottom));
    &::after { translate: .4cqw 0; }
  }
  &:has(.arcade-challenges-open:active) { translate: 0 round(.2cqh, 1px); --drop-soft: var(--btn-soft-press); }
}
.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-challenges:has(.arcade-challenges-open:is(:hover, :active)) {
  transition: translate 160ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  body.arcade-home-body .arcade-cabinet .arcade-challenges::after { transition: none; }
}

/* ------------------------------------------------------- title screen */
/* The big logo holds the centre, then shrinks into the top bar when the menu opens. */
.arcade-home-body .home-title-header {
  transition: top 380ms cubic-bezier(0.22, 1, 0.36, 1), height 380ms cubic-bezier(0.22, 1, 0.36, 1);
  .game-brand .game-brand-main { transition: font-size 380ms cubic-bezier(0.22, 1, 0.36, 1); }
}
.arcade-home-body .arcade-cabinet:not(.is-menu-ready) {
  .home-title-header { top: var(--home-title-top); height: 38cqh; flex-direction: column; gap: 2.4cqh; }
  .home-title-header .game-brand .game-brand-main { font-size: clamp(56px, 14cqw, 150px); }
  .home-title-brand {
    filter: drop-shadow(4px 0 0 var(--home-outline)) drop-shadow(-4px 0 0 var(--home-outline))
      drop-shadow(0 4px 0 var(--home-outline)) drop-shadow(0 -4px 0 var(--home-outline))
      drop-shadow(0 1.2cqh 0 var(--home-outline));
  }
  .home-title-tag {
    /* Flat tag in the logo's ink: no sticker drop, so it reads as a caption, not a second button. */
    display: block; padding: .8cqh 2cqw; border: 0; border-radius: 8px;
    background: var(--home-outline); box-shadow: none; --drop: 0px;
    color: var(--home-white); font: clamp(14px, 2.4cqw, 26px)/1 var(--game-display-font); letter-spacing: .06em;
    -webkit-text-stroke: .14em var(--home-outline); paint-order: stroke fill;
  }
  .home-player-stage { display: none; }
}
.arcade-home-body .arcade-cabinet.is-menu-ready .home-player-stage { animation: home-pop-in 320ms cubic-bezier(0.22, 1, 0.36, 1) backwards; }
@keyframes home-pop-in { from { opacity: 0; scale: .7; } }
@media (prefers-reduced-motion: reduce) {
  .arcade-home-body .home-title-header, .arcade-home-body .home-title-header .game-brand .game-brand-main { transition: none; }
  .arcade-home-body .arcade-cabinet :is(.arcade-start, .home-player-stage) { animation: none; }
}
.arcade-home-body .arcade-center .arcade-start {
  /* Centred by its margins, not a transform, so the hop squashes on the button's own foot. */
  position: absolute; top: calc(var(--home-title-top) + 42cqh); left: 0; right: 0; width: fit-content;
  pointer-events: auto; white-space: nowrap;
  /* The letters' wave (game-brand.css) is the title screen's one loop: the button stays still
     (none also drops arcade-clean.css's blinking prompt). */
  animation: none;
}
/* Entrée / Ⓐ swap every 4.2s, on the wave's beat (arcade-clean.css swaps them on its own 3.2s
   beat elsewhere). A detected gamepad keeps Ⓐ only, as before. */
.arcade-home-body .arcade-cabinet:not(.is-menu-ready) .arcade-start-alt.is-key { animation: home-start-key 8.4s 1.38s step-end infinite; }
.arcade-home-body .arcade-cabinet:not(.is-menu-ready) .arcade-start-alt.is-pad { animation: home-start-pad 8.4s 1.38s step-end infinite; }
.is-gamepad .arcade-home-body .arcade-cabinet .arcade-start-alt:is(.is-key, .is-pad) { animation: none; }
@keyframes home-start-key { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes home-start-pad { 0% { opacity: 0; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .arcade-home-body .arcade-cabinet .arcade-start-alt.is-key { animation: none; opacity: 1; }
  .arcade-home-body .arcade-cabinet .arcade-start-alt.is-pad { animation: none; opacity: 0; }
  .is-gamepad .arcade-home-body .arcade-cabinet .arcade-start-alt.is-pad { opacity: 1; }
}
body.arcade-home-body .arcade-cabinet #arcade-main .arcade-center .arcade-start {
  /* Mint of SMASH! and the logo's dark ink: the button reads as part of the logo. A flat face and
     a short base, like the menu cards; the hop above carries the call. */
  --start-face: #9fd9c3; --start-base: #5e9a84;
  --start-ink: var(--home-outline); --start-stroke: 0;
  margin: 0 auto; padding: 1.4cqh 3cqw;
  border: 1px solid #2f6e5b; border-radius: 1.2cqh;
  background: var(--start-face);
  box-shadow: inset 0 -.8cqh 0 var(--start-base);
  --drop-soft: drop-shadow(0 .5cqh .8cqh rgb(6 13 9 / .3));
  color: var(--start-ink);
  &:is(:hover, :focus-visible, .is-selected):not(:disabled) {
    background: color-mix(in srgb, var(--start-face) 86%, #fff);
    color: var(--start-ink); --fx: ; --drop-soft: drop-shadow(0 .8cqh 1cqh rgb(6 13 9 / .35));
  }
  &:active:not(:disabled) {
    transform: translateY(.4cqh);
    box-shadow: inset 0 -.3cqh 0 var(--start-base); --drop-soft: var(--btn-soft-press);
  }
  :is(.arcade-start-copy, .arcade-start-chevron) {
    color: var(--start-ink); -webkit-text-stroke: var(--start-stroke) var(--home-outline); paint-order: stroke fill;
  }
  .arcade-start-copy kbd { -webkit-text-stroke: 0; text-shadow: none; }
}
.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-start { pointer-events: none; }
.arcade-home-body .arcade-center .arcade-boot { position: absolute; top: calc(var(--home-title-top) + 42cqh); left: 50%; margin: 0 !important; transform: translateX(-50%); }

/* ------------------------------------------- corner controls (outside the screen) */
/* Music, controls and support, and the training's emotes under the screen: arena-theme.css, shared
   with the online match page. */

/* Sticker drops. An outer box-shadow is painted only outside the element, so on rounded,
   fractional-pixel edges a pale hairline showed between the outline and the drop. The drop is a
   drop-shadow filter instead, cast from the element's own silhouette: the panels set --drop (its
   depth), the buttons --drop-soft (their soft shadow), and both --fx (other filter effects, e.g.
   brightness on hover). !important: the shared control skin of game-controls.css resets filter on
   these controls in every state. */
body.arcade-home-body :is(
  #arcade-main :is(.home-game-menu .arcade-menu-item, .home-friends-menu .arcade-menu-item, .arcade-start,
    .arcade-hud-login, .arcade-hud-level, .arcade-hud-coins, .arcade-hud-account > .arcade-hud-pad,
    .arcade-challenges, .home-title-tag)
) {
  filter: drop-shadow(0 var(--drop, 0px) 0 var(--home-outline)) var(--drop-soft, ) var(--fx, ) !important;
}

/* Title screen: only the logo and the start button. The player's HUD (name, level, coins, gamepad,
   sign-in) and the daily challenges slide in with the menu. */
.arcade-home-body .arcade-cabinet :is(.arcade-hud-account, .arcade-challenges) {
  transition: opacity 260ms ease-out, translate 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}
.arcade-home-body .arcade-cabinet:not(.is-menu-ready) :is(.arcade-hud-account, .arcade-challenges) {
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: none;
}
.arcade-home-body .arcade-cabinet:not(.is-menu-ready) .arcade-hud-account { translate: 0 -2cqh; }
.arcade-home-body .arcade-cabinet:not(.is-menu-ready) .arcade-challenges { translate: 0 2cqh; }
@media (prefers-reduced-motion: reduce) {
  .arcade-home-body .arcade-cabinet :is(.arcade-hud-account, .arcade-challenges) { transition: none; translate: none; }
}

/* The menu nav spans the screen and its grid leaves the first column to the portrait: only the
   menu cells take the pointer, so the portrait under them stays clickable. */
body.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-menu-nav,
.arcade-home-body .arcade-menu-nav .arcade-menu { pointer-events: none; }
.arcade-home-body .arcade-menu-nav .arcade-menu > li { pointer-events: auto; }
/* Mouse shortcuts to MON PERSO (arcade-home.js): the portrait and a guest's name. */
.arcade-home-body .arcade-cabinet.is-menu-ready .home-player-canvas,
body.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-hud-account:not(:has(.arcade-hud-record)) .arcade-hud-player {
  pointer-events: auto; cursor: pointer;
}

/* Small HUD labels stay crisp; illustration and the shared logo carry the personality. */
body.arcade-home-body :is(.arcade-hud-who, .arcade-hud-level .arcade-hud-stat,
  .arcade-hud-coins strong, .arcade-challenges-title,
  .arcade-challenges-list li span) {
  -webkit-text-stroke: 0; text-shadow: none;
  color: var(--screen-scene-ink);
}
body.arcade-home-body .arcade-cabinet .arcade-menu-nav .home-game-menu .home-shortcut {
  --shortcut-accent: var(--screen-scene-mint);
  --card-bottom: var(--screen-shortcut-face);
  --card-edge: var(--screen-shortcut-edge);
  --card-base: var(--screen-shortcut-base);
  --card-label: var(--screen-scene-ink);
  --card-depth: 3px;
  --card-light: 5%;
  border-radius: clamp(8px, 1.4cqh, 12px);
}
/* One chip for the four shortcuts: the pixel art brings the colour, the row reads as one set. */
body.arcade-home-body .arcade-cabinet .arcade-menu-nav .home-game-menu .home-shortcut {
  --shortcut-accent: color-mix(in srgb, var(--screen-scene-ink) 82%, var(--screen-shortcut-face));
}

/* The small controls share one restrained surface. The scenery always uses
   light ink; interface panels continue to follow dark / sand mode. */
body.arcade-home-body .arcade-cabinet #arcade-main :is(
  .arcade-hud-coins, .arcade-hud-account > .arcade-hud-pad,
  .home-bottom-bar > .language-switcher, .home-bottom-bar > .home-theme-switcher,
  .arcade-challenges
) {
  border: 1px solid color-mix(in srgb, var(--screen-scene-mint) 32%, var(--screen-scene-shadow));
  border-radius: clamp(8px, 1.4cqh, 12px);
  background: color-mix(in srgb, var(--screen-scene-shadow) 88%, var(--screen-scene-mint));
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--screen-scene-shadow) 60%, transparent);
  filter: none;
  color: var(--screen-scene-ink);
}
/* Language and theme stay pills: the inline padding keeps the flags' tint and the swatch ring
   clear of the rounded ends. */
body.arcade-home-body .arcade-cabinet #arcade-main .home-bottom-bar > :is(.language-switcher, .home-theme-switcher) {
  border-radius: 999px; padding: 4px 10px; gap: 6px;
}
body.arcade-home-body .arcade-cabinet #arcade-main .arcade-attract .home-bottom-bar > .language-switcher button { border-radius: 6px; }
body.arcade-home-body .arcade-cabinet #arcade-main .arcade-challenges {
  &:has(.arcade-challenges-open:is(:hover, :focus-visible, .is-selected)) {
    translate: none;
    background: color-mix(in srgb, var(--screen-scene-shadow) 78%, var(--screen-scene-mint));
  }
  .arcade-challenges-title { font-size: inherit; white-space: nowrap; }
  .arcade-challenges-list { gap: 12px; }
  .arcade-challenges-list li > span { -webkit-text-stroke: 0; }
  .arcade-challenges-pitch { font-size: inherit; }
}
/* Quiet contrast behind the name without outlining its letters. */
body.arcade-home-body .arcade-cabinet .arcade-hud-who {
  text-shadow: 0 1px 3px var(--screen-scene-shadow);
}
body.arcade-home-body .arcade-cabinet .arcade-hud-line:has(.arcade-hud-record) .arcade-hud-level {
  border: 1px solid var(--screen-card-lagoon-base);
  background: linear-gradient(180deg, var(--screen-card-lagoon), var(--screen-scene-mint));
  box-shadow: inset 0 -3px 0 var(--screen-card-lagoon-base);
}

/* On touch screens the format's entire hit area and both arrows remain generous. */
@media (pointer: coarse) {
  body.arcade-home-body .arcade-cabinet .home-game-menu .home-play-card .arcade-menu-format {
    min-height: 44px;
    .arcade-menu-step { min-width: 44px; min-height: 44px; }
  }
}
/* Compact cards favour their action label over decorative art. */
@container (max-width: 560px) {
  body.arcade-home-body .arcade-cabinet .home-game-menu .home-play-card .home-play-icon { display: none; }
  body.arcade-home-body .arcade-cabinet :is(.home-game-menu, .home-friends-menu) .home-mode-card .arcade-menu-name {
    white-space: normal; overflow-wrap: anywhere; font-size: clamp(13px, 3cqw, 17px);
  }
  body.arcade-home-body .arcade-cabinet .home-game-menu .home-shortcut {
    flex-direction: column; gap: 4px; padding: 6px 3px;
    .arcade-menu-name { font-size: 12px; }
    .home-shortcut-icon { width: 24px; height: 24px; }
  }
}
