/* Chunky game lettering and tactile controls. Keep the brand's own lettering,
   the shared screen palette and the four-corner keyboard/gamepad cursor. */
/* Bungee (OFL, public/fonts/Bungee-OFL.txt): the latin subset. It is about a fifth wider than
   Lilita One, which every size here was set for; size-adjust scales it once so the labels keep
   their room. */
@font-face {
  font-family: 'Bungee';
  src: url('/fonts/Bungee-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  size-adjust: 90%;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Nunito (OFL, public/fonts/Nunito-OFL.txt): the variable latin subset, 200 to 1000. */
@font-face {
  font-family: 'Nunito';
  src: url('/fonts/Nunito-latin.woff2') format('woff2');
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Two voices: Bungee for capitals, buttons and figures; Nunito for lowercase text (names,
   values, sentences, and what the Plops say in their bubbles, game.css .game-emote-bubble). */
:root {
  --game-display-font: 'Bungee', 'Jersey 15', sans-serif;
  --game-text-font: 'Nunito', sans-serif;
}
/* Lowercase text reads in Nunito: Bungee has capitals only, too wide for a sentence. Three id
   exclusions: the screens' own font rules carry ids. */
body :where(
  .arcade-challenges-pitch, .character-guest-copy, .character-emote-bubble, .character-animation-chip,
  .look-row-value strong, .emote-slot-text, .emote-catalog-text,
  .shop-item-copy strong, .shop-detail-copy h3, .shop-detail-status,
  .players-character-name, .players-presence, .players-name-row h2, .players-status, .players-footer-hint,
  .arcade-system-label, .arcade-system-value, .arcade-key-name, .training-key-or,
  .profile-link-text, .network-unit, .emote-guest-copy
):not(#_):not(#_):not(#_) {
  font-family: var(--game-text-font); font-weight: 800; letter-spacing: 0;
}
/* One scale for the Nunito text, in container units (cqh: the screen or the panel) so a 1024×640
   window and a 1920×1080 one read alike: a title for the name a screen is about, a name for the
   things in a list, a line for what they say. Names keep the 800 weight, sentences and statuses take 700. The shop cards are
   their own containers (shop-card): their sizes follow the card's width (cqw). */
body :where(.shop-detail-copy h3, .players-name-row h2):not(#_):not(#_):not(#_) {
  font-size: clamp(20px, 3.85cqh, 30px); line-height: 1.05;
}
body :where(.look-row-value strong, .arcade-system-label, .emote-slot-text, .emote-catalog-text, .arcade-key-name):not(#_):not(#_):not(#_) {
  font-size: clamp(15px, 2.7cqh, 21px); line-height: 1.1;
}
body :where(.arcade-system-value, .training-key-or):not(#_):not(#_):not(#_) { font-size: clamp(13px, 2.3cqh, 18px); }
body .players-character-name:not(#_):not(#_):not(#_) { font-size: clamp(14px, 2.4cqh, 19px); }
/* COMMANDES: a reference screen of six tall rows, read from across the room. */
body .arcade-key-name:not(#_):not(#_):not(#_) { font-size: clamp(17px, 3.2cqh, 24px); }
body :where(.character-guest-copy, .shop-detail-status, .players-status, .players-presence, .players-footer-hint,
  .arcade-challenges-pitch, .training-key-or, .emote-guest-copy):not(#_):not(#_):not(#_) {
  font-weight: 700;
}
/* The guest banner's sentence opens on its label in capitals (MODE INVITÉ): that one stays Bungee. */
body .emote-guest-copy strong:not(#_):not(#_):not(#_) { font-family: var(--game-display-font); font-weight: 400; }
body .emote-guest-copy:not(#_):not(#_):not(#_) { font-size: clamp(14px, 2.4cqh, 18px); line-height: 1.3; }
/* The shop's action holds a long label in narrow windows (« Créer un compte »): it wraps in two
   balanced lines instead of being cut. */
body .shop-buy [data-shop-buy-label]:not(#_):not(#_):not(#_) { min-width: 0; white-space: normal; text-wrap: balance; line-height: 1.05; }
body .character-guest-copy:not(#_):not(#_):not(#_) { font-size: clamp(14px, 2.4cqh, 19px); line-height: 1.3; }
body .shop-detail-status:not(#_):not(#_):not(#_) { font-size: clamp(13px, 2.1cqh, 16px); }
body .players-status:not(#_):not(#_):not(#_) { font-size: clamp(14px, 2.3cqh, 18px); }
/* Shop cards: the name leads, the price follows a step smaller (the struck price stays at .8em).
   The featured deal keeps its big capitals and price. */
body .shop-panel:not(.is-featured) .shop-item-copy > strong:not(#_):not(#_):not(#_) { font-size: clamp(14px, 11cqw, 19px); }
body .shop-panel:not(.is-featured) .shop-item-copy > .shop-price:not(.is-owned):not(#_):not(#_):not(#_) { font-size: clamp(16px, 12cqw, 21px); }
body .shop-panel.is-featured .shop-catalog > li:not(:first-child) .shop-item-copy > strong:not(#_):not(#_):not(#_) { font-size: clamp(14px, 2.6cqh, 19px); }
body .shop-panel.is-featured .shop-catalog > li:not(:first-child) .shop-item-copy > .shop-price:not(.is-owned):not(#_):not(#_):not(#_) { font-size: clamp(16px, 2.9cqh, 21px); }
/* The featured card's big name is set in capitals: it stays a title. */
body .shop-panel.is-featured .shop-catalog > li:first-child .shop-item-copy > strong:not(#_):not(#_):not(#_) {
  font-family: var(--game-display-font); font-weight: 400; letter-spacing: .015em;
}

/* Titles are slightly smaller: this face has much fuller, wider letters. */
body .arcade-page-header .arcade-page-title {
  font-family: var(--game-display-font);
  font-size: clamp(20px, 3.5cqh, 34px);
  letter-spacing: .015em;
}
body .arcade-page-header .arcade-page-back {
  font-family: var(--game-display-font);
  font-size: clamp(14px, 2.5cqh, 19px);
  letter-spacing: .015em;
}

/* One stable width across menu levels, including the longer online labels.
   Dimensions follow the 4:3 screen, not the browser window. */
.arcade-home-body .arcade-cabinet.is-menu-ready .arcade-menu-nav {
  width: min(66cqw, 470px);
  max-width: 100%;
  margin-top: clamp(12px, 3cqh, 26px);
  padding: 0;
}
.arcade-home-body .arcade-menu-nav .arcade-menu {
  width: 100%;
  gap: clamp(8px, 1.6cqh, 13px);
}
.arcade-home-body .arcade-menu .arcade-menu-item {
  width: 100%;
  min-height: clamp(34px, 7.2cqh, 58px);
  padding: .5cqh clamp(12px, 2.5cqw, 24px);
  gap: clamp(8px, 1.6cqw, 16px);
  border: 2px solid var(--screen-scene-shadow);
  border-radius: 2px;
  background: var(--screen-raised);
  color: var(--screen-ink);
  box-shadow: inset 0 2px color-mix(in srgb, var(--screen-ink) 18%, transparent),
    inset 0 -3px color-mix(in srgb, var(--screen-shadow) 45%, transparent),
    0 5px 0 var(--screen-scene-shadow);
  transition: background-color 120ms ease, transform 100ms ease, box-shadow 100ms ease;
}
.arcade-home-body .arcade-menu .arcade-menu-name {
  font: clamp(16px, 3.7cqh, 29px)/1.1 var(--game-display-font);
  letter-spacing: .015em;
  text-shadow: none;
}
.arcade-home-body .arcade-menu .arcade-menu-item:is(:hover, .is-selected, :focus-visible) {
  color: var(--screen-ink);
  background: color-mix(in srgb, var(--screen-accent) 16%, var(--screen-raised));
}
/* The primary action keeps its colour regardless of focus. */
.arcade-home-body .arcade-menu .arcade-menu-item:is([data-arcade-action='menu-play'], [data-arcade-action='menu-online'], [data-arcade-action='public']) {
  color: var(--screen-accent-ink);
  background: var(--screen-accent);
}
.arcade-home-body .arcade-menu .arcade-menu-item:is([data-arcade-action='menu-play'], [data-arcade-action='menu-online'], [data-arcade-action='public']):hover {
  background: color-mix(in srgb, var(--screen-accent) 90%, var(--screen-ink));
}
.arcade-home-body .arcade-menu .arcade-menu-item:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px color-mix(in srgb, var(--screen-shadow) 20%, transparent),
    0 2px 0 var(--screen-scene-shadow);
}
.arcade-home-body .arcade-menu .arcade-menu-bullet {
  width: clamp(18px, 3.8cqh, 28px);
  height: clamp(18px, 3.8cqh, 28px);
}
.arcade-home-body .arcade-menu .arcade-menu-format,
.arcade-home-body .arcade-menu .arcade-menu-item.is-selected .arcade-menu-format,
.arcade-home-body .arcade-menu .arcade-menu-item.is-selected .arcade-menu-step {
  color: inherit;
  text-shadow: none;
  font: clamp(12px, 2.5cqh, 19px)/1 var(--game-display-font);
  letter-spacing: 0;
}
.arcade-home-body .arcade-menu .arcade-menu-format { margin-left: auto; }
.arcade-home-body .arcade-menu .arcade-menu-step { padding-inline: 3px; }
.arcade-home-body .arcade-start-copy {
  font: clamp(20px, 4cqh, 32px)/1.15 var(--game-display-font);
  letter-spacing: .02em;
}

/* Apply the same touch to explicit panel CTAs; settings remain flat rows. */
.arcade-home-body #arcade-panel-player .character-done,
.arcade-home-body #arcade-panel-account .account-submit,
.arcade-home-body .join-lobby-submit,
.arcade-home-body .arcade-tutorial-invite-start {
  font-family: var(--game-display-font);
  font-size: clamp(18px, 3.2cqh, 25px);
  font-weight: 400;
  letter-spacing: .02em;
  border: 2px solid var(--screen-shadow);
  border-radius: 2px;
  color: var(--screen-accent-ink);
  background: var(--screen-accent);
  box-shadow: inset 0 2px color-mix(in srgb, var(--screen-ink) 25%, transparent),
    0 4px 0 var(--screen-shadow);
  transition: background-color 120ms ease, transform 100ms ease, box-shadow 100ms ease;
}
.arcade-home-body #arcade-panel-player .character-done:is(:hover, .is-selected, :focus-visible),
.arcade-home-body #arcade-panel-account .account-submit:is(:hover, .is-selected, :focus-visible),
.arcade-home-body .join-lobby-submit:is(:hover, .is-selected, :focus-visible),
.arcade-home-body .arcade-tutorial-invite-start:is(:hover, .is-selected, :focus-visible) {
  color: var(--screen-accent-ink);
  background: color-mix(in srgb, var(--screen-accent) 90%, var(--screen-ink));
  border-color: var(--screen-shadow);
}
.arcade-home-body #arcade-panel-player .character-done:active,
.arcade-home-body #arcade-panel-account .account-submit:active,
.arcade-home-body .join-lobby-submit:active,
.arcade-home-body .arcade-tutorial-invite-start:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--screen-shadow);
}
@container (max-height: 320px) {
  .arcade-home-body .arcade-menu .arcade-menu-item { min-height: 26px; }
  .arcade-home-body .arcade-menu-nav .arcade-menu { gap: 7px; }
  .arcade-home-body .arcade-menu .arcade-menu-name { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .arcade-home-body .arcade-menu .arcade-menu-item { transition: none; }
}

/* Home controls share a single skin, including controls mounted by JS. The
   component list is explicit: never skin invisible hit areas or the brand.
   The controls that home-arena.css and its neighbours (shop, players, character, options, panels)
   restyle keep their own hover and press: this skin's states skip them. The :where() adds no
   specificity, so the other controls keep their states exactly as before. */
body.arcade-home-body :is(
  .arcade-start, .arcade-hud-login, .controls-card-close, .language-switcher button, .arcade-hud-pad,
  .arcade-page-header .arcade-page-back,
  #arcade-panel-player .character-done,
  #arcade-panel-player .character-guest-login,
  #arcade-panel-player .character-profile-trigger,
  #arcade-panel-player .character-prestige-button,
  #arcade-panel-account .account-submit,
  #arcade-panel-account .account-forgot,
  .emote-guest-cta, .join-lobby-submit, .arcade-tutorial-invite-start,
  .shop-buy, .shop-launch-go, .shop-filter, .challenges-tab, .shop-pager-step,
  #arcade-panel-options .arcade-legal :is(a, button), .cookie-btn
) {
  --control-depth: 4px;
  border: 2px solid var(--screen-shadow);
  border-radius: 2px;
  background: var(--control-face, var(--screen-raised));
  color: var(--control-ink, var(--screen-ink));
  box-shadow: inset 0 2px color-mix(in srgb, var(--screen-ink) 20%, transparent),
    inset 0 -2px color-mix(in srgb, var(--screen-shadow) 30%, transparent),
    0 var(--control-depth) 0 var(--screen-shadow);
  font-family: var(--game-display-font);
  font-weight: 400;
  letter-spacing: .015em;
  line-height: 1.15;
  text-shadow: none;
  text-decoration: none;
  opacity: 1;
  filter: none;
  transform: none;
  translate: none;
  transition: background-color 120ms ease, transform 100ms ease, box-shadow 100ms ease;

  &:is(:hover, :focus-visible, .is-selected):not(:disabled, .is-disabled, [aria-disabled='true']):not(:where(
    .arcade-start, .arcade-hud-login, .language-switcher button, .arcade-hud-pad, .arcade-page-back,
    .character-done, .character-guest-login, .character-profile-trigger, .character-prestige-button,
    .shop-buy, .shop-filter, .challenges-tab, .shop-pager-step, .arcade-legal :is(a, button),
    .join-lobby-submit, .arcade-tutorial-invite-start, .account-submit, .account-forgot, .shop-launch-go,
    .cookie-btn, .controls-card-close
  )) {
    background: color-mix(in srgb, var(--control-face, var(--screen-raised)) 88%, var(--screen-ink));
    color: var(--control-ink, var(--screen-ink));
    border-color: var(--screen-shadow);
    outline: none;
    filter: none;
    transform: none;
  }
  &:active:not(:disabled, .is-disabled, [aria-disabled='true']):not(:where(
    .arcade-start, .arcade-hud-login, .language-switcher button, .arcade-hud-pad, .arcade-page-back,
    .character-done, .character-guest-login, .character-profile-trigger, .character-prestige-button,
    .shop-buy, .shop-filter, .challenges-tab, .shop-pager-step, .arcade-legal :is(a, button),
    .join-lobby-submit, .arcade-tutorial-invite-start, .account-submit, .account-forgot, .shop-launch-go,
    .cookie-btn, .controls-card-close
  )) {
    transform: translateY(3px);
    translate: none;
    box-shadow: inset 0 1px color-mix(in srgb, var(--screen-shadow) 20%, transparent),
      0 1px 0 var(--screen-shadow);
  }
  &:is(:disabled, .is-disabled, [aria-disabled='true']) {
    --control-face: var(--screen-panel);
    --control-ink: var(--screen-muted);
    opacity: .6;
    cursor: default;
    transform: none;
    translate: none;
    filter: none;
    box-shadow: 0 2px var(--screen-shadow);
  }
  @media (prefers-reduced-motion: reduce) { transition: none; }
}
/* Filled CTAs. A permanent active filter is a tint, not a focus cursor. */
body.arcade-home-body :is(
  .arcade-hud-login, #arcade-panel-player .character-done,
  #arcade-panel-player .character-guest-login,
  #arcade-panel-player .character-prestige-button,
  #arcade-panel-account .account-submit, .emote-guest-cta,
  .join-lobby-submit, .arcade-tutorial-invite-start, .shop-buy, .shop-launch-go
):not(:disabled, .is-disabled, [aria-disabled='true']) {
  --control-face: var(--screen-accent);
  --control-ink: var(--screen-accent-ink);
}
body.arcade-home-body :is(.shop-filter[aria-selected='true'], .challenges-tab[aria-selected='true'], .language-switcher button[aria-pressed='true']) {
  --control-face: color-mix(in srgb, var(--screen-accent) 22%, var(--screen-raised));
  --control-ink: var(--screen-accent);
}
body.arcade-home-body #arcade-panel-options .arcade-legal .is-danger { --control-ink: var(--screen-danger); }

/* HUD and cabinet: retain their anchors and reserved 44px bottom strip. */
body.arcade-home-body .arcade-hud-login {
  min-height: clamp(32px, 5cqh, 40px);
  padding: 5px 12px;
  font-size: clamp(14px, 2.5cqh, 19px);
}
body.arcade-home-body .arcade-hud-pad { --control-ink: var(--screen-accent); }
body.arcade-home-body .controls-card-head h2 { font: 18px/1.1 var(--game-display-font); }
body.arcade-home-body .controls-card-close { min-width: 36px; min-height: 32px; justify-content: center; font-size: 20px; }
body.arcade-home-body .language-switcher { gap: 8px; }
body.arcade-home-body .language-switcher button { padding: 4px; }
body.arcade-home-body .language-flag { width: 28px; height: 21px; }
body.arcade-home-body .arcade-page-header .arcade-page-back { padding: 6px 10px; }

/* Panel actions are compact enough to fit beside the preview and form. */
body.arcade-home-body :is(
  #arcade-panel-player .character-guest-login,
  #arcade-panel-player .character-profile-trigger,
  #arcade-panel-player .character-prestige-button,
  #arcade-panel-account .account-forgot, .emote-guest-cta, .shop-launch-go
) { padding: 7px 12px; font-size: clamp(14px, 2.5cqh, 19px); }
body.arcade-home-body #arcade-panel-player .character-prestige-button.is-armed { font-size: clamp(12px, 2cqh, 16px); }
body.arcade-home-body .shop-buy { font-size: clamp(16px, 3cqh, 24px); }
body.arcade-home-body :is(.shop-filter, .challenges-tab) { padding: 6px 9px; font-size: clamp(12px, 2.3cqh, 18px); }
body.arcade-home-body :is(.shop-filters, .challenges-tabs) { gap: 8px; padding-bottom: 5px; }
body.arcade-home-body #arcade-panel-options .arcade-legal :is(a, button) { padding: 5px 8px; font-size: clamp(12px, 2cqh, 16px); }
body.arcade-home-body .cookie-btn { padding: 7px 12px; font-size: 16px; }

/* Settings and content selectors keep their flat row layout. */
body.arcade-home-body .arcade-panel :is(.arcade-system-label, .arcade-system-value, .character-emotes-link, .account-mode, .look-row-name) {
  font-family: var(--game-display-font);
  letter-spacing: .01em;
}
body.arcade-home-body .arcade-panel .arcade-system-label { font-size: .78em; }
body.arcade-home-body .arcade-panel .arcade-system-value { font-size: .65em; }
body.arcade-home-body #arcade-panel-account .account-mode { font-size: clamp(18px, 3cqh, 25px); }
body.arcade-home-body #arcade-panel-player .character-emotes-link { font-size: clamp(14px, 2.5cqh, 20px); }

body.arcade-home-body .arcade-start { padding: 10px 20px; }
body.arcade-home-body .arcade-hud-pad { padding: 5px; }
