@font-face{
  font-family: 'Lilita One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/LilitaOne.woff2') format('woff2');
}

:root{
  --app-height: 100dvh;
  --app-width: 100dvw;
  --hud-font: 'Lilita One', 'Arial Rounded MT Bold', -apple-system, 'Segoe UI', sans-serif;
  --bg: #0d0d14;
  --panel: #16161f;
  --panel-border: #2a2a3a;
  --accent-orange: #ff6b35;
  --accent-purple: #8338ec;
  --accent-cyan: #7cf7ff;
  --accent-gold: #ffd166;
  --blue: #3aa0ff;
  --red: #ff4d5e;
  --text: #f2f2f7;
  --text-dim: #9a9ab0;
}

*{box-sizing:border-box; -webkit-tap-highlight-color: transparent;
  -webkit-user-select:none; -moz-user-select:none; -ms-user-select:none; user-select:none;}
input, textarea, [contenteditable="true"]{
  -webkit-user-select:text; -moz-user-select:text; -ms-user-select:text; user-select:text;
}

/* ---- themed scrollbars: the OS default looks out of place on the dark UI ---- */
::-webkit-scrollbar{ width: 9px; height: 9px; }
::-webkit-scrollbar-track{ background: rgba(255,255,255,0.04); border-radius: 8px; }
::-webkit-scrollbar-thumb{ background: linear-gradient(180deg, #8338ec, #5a24b8);
  border-radius: 8px; border: 2px solid rgba(13,13,20,0.7); background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover{ background: linear-gradient(180deg, #9a5cf0, #6c31d6);
  background-clip: padding-box; }
::-webkit-scrollbar-corner{ background: transparent; }
/* Firefox only — Chromium ignores ::-webkit-scrollbar once scrollbar-color is set,
   so keep the standard properties scoped away from it */
@supports (-moz-appearance: none){
  *{ scrollbar-width: thin; scrollbar-color: #8338ec rgba(255,255,255,0.06); }
}
html,body{margin:0; padding:0; width:var(--app-width); height:var(--app-height); max-width:100%; max-height:100%;
  min-width:0; min-height:0; overflow:hidden; overflow:clip; background:var(--bg);
  position:fixed; inset:0; overscroll-behavior:none; touch-action:manipulation;
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; color:var(--text);}

#gameCanvas{position:fixed; inset:0; width:100%; height:100%; display:block; touch-action:none;
  outline:none; -webkit-tap-highlight-color:transparent;}

/* ================= UI scale wrapper =================
   The UI is laid out inside a LOGICAL viewport (--ui-vw x --ui-vh, never
   smaller than the 1280x720 design box) and scaled up to fill the real one.
   Two details are load-bearing:
   - --app-width/--app-height are SHADOWED here, so every existing
     calc(var(--app-height) - 24px) cap in the cascade guards below becomes
     logical automatically. html/body keep the real values from :root.
   - never add will-change/contain/backface-visibility here: any compositing
     hint forces a fixed-scale raster cache and blurs every glyph. A plain
     static transform re-rasterises text at the composited scale. */
#uiRoot{
  position:fixed; top:0; left:0;
  transform-origin: 0 0;
  transform: scale(var(--ui-scale, 1));
  width: var(--ui-vw, 100dvw);
  height: var(--ui-vh, 100dvh);
  --app-width: var(--ui-vw, 100dvw);
  --app-height: var(--ui-vh, 100dvh);
  --uvw: calc(var(--ui-vw, 100dvw) / 100);  /* one logical vw */
  --uvh: calc(var(--ui-vh, 100dvh) / 100); /* one logical vh */
  pointer-events: none;
}
/* The wrapper must stay transparent to the mouse or it swallows every
   mousemove/mousedown meant for the canvas underneath (aim + pointer lock).
   #hud is full-viewport and pointer-events:none by design; the id selector
   here has to outrank the `#uiRoot > *` rule or gameplay clicks die on it. */
#uiRoot > *{ pointer-events: auto; }
#uiRoot > #hud{ pointer-events: none; }

/* ================= Screens / Menus ================= */
.screen{position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  background: radial-gradient(ellipse at 50% 20%, #1c3f7a, #0c101c 62%);
  z-index:20;}

/* inline SVG icon helper — replaces every emoji in the UI.
   flex:none on both boxes is load-bearing: inside a flex pill (the versus
   stat row, HUD pills, reward chips) an `.ic` and the `width:100%` <svg>
   inside it are both flex items, so any shrink pressure collapsed the SVG to
   a ~1px sliver while the text next to it kept full size — the icon just
   vanished. An icon is sized by its font-size (UI._fitDynamicText shrinks
   that when a pill is tight); nothing else may squash it. */
.ic{ display:inline-flex; width:1em; height:1em; vertical-align:-0.12em; flex: 0 0 auto; }
.ic svg{ width:100%; height:100%; display:block; flex: 0 0 auto; }
.ic.big{ width:1.4em; height:1.4em; }
.screen.active{display:flex;}

/* ---- near-fullscreen sub-page layout (Brawlers/Shop/Battle Pass/Settings/Invite) ----
   Fixed header (back button + title) stays outside the scrollable content, so it's
   always reachable no matter how tall the grid below it grows. */
.pagePanel{
  width: min(96vw, 940px);
  height: calc(88 * var(--uvh, 1vh));
  max-height: calc(88 * var(--uvh, 1vh));
  display:flex; flex-direction:column;
  background: linear-gradient(180deg, #1c1c2c, #101018);
  border: 3px solid rgba(255,255,255,0.14);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 0 rgba(0,0,0,0.35), 0 24px 60px rgba(0,0,0,0.55);
}
.pagePanel.small{ width: min(92vw, 440px); height: auto; max-height: calc(82 * var(--uvh, 1vh)); }
.pageHeader{ display:flex; align-items:center; gap: 14px; padding: 14px 20px; flex-shrink:0;
  background: linear-gradient(180deg, #2b2340, #1d1930);
  border-bottom: 2px solid rgba(255,255,255,0.1); }
.pageHeaderTitle{ flex:1; font-size: 21px; font-weight: 900; font-style: italic; letter-spacing: 1px;
  margin:0; text-align:left; text-shadow: 0 2px 0 rgba(0,0,0,0.4); }
.pageHeaderRight{ min-width: 1px; }
.backBtn{ background: rgba(255,255,255,0.06); border: 2px solid var(--panel-border); color: var(--text);
  font-weight: 800; padding: 9px 16px; border-radius: 10px; cursor:pointer; font-size: 13px; flex-shrink:0;
  transition: border-color 0.15s; }
.backBtn:hover{ border-color: var(--accent-cyan); }
/* The scroll container must clear the home indicator / gesture bar in every
   orientation. env() insets fold into the base padding via max(), so the
   compact overrides further down can still shrink the padding without any of
   them having to repeat the safe-area handling. */
.pageContent{ flex:1; overflow-y:auto; -webkit-overflow-scrolling: touch; text-align:center;
  padding: 18px max(22px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left)); }

.bigBtn{
  background: linear-gradient(180deg, var(--accent-orange), #e0501c);
  border: none; color: white; font-weight: 900; letter-spacing: 1px;
  font-size: 18px; padding: 16px 38px; border-radius: 12px; cursor:pointer;
  box-shadow: 0 6px 0 #a83c10, 0 10px 20px rgba(255,107,53,0.25);
  transition: transform 0.08s ease;
}
.bigBtn:active{ transform: translateY(4px); box-shadow: 0 2px 0 #a83c10; }

.ghostBtn{
  background: transparent; border: 2px solid var(--panel-border); color: var(--text-dim);
  font-weight: 700; padding: 13px 26px; border-radius: 12px; cursor:pointer; font-size: 15px;
}
.ghostBtn:hover{ color: var(--text); border-color: var(--text-dim); }

.coinDisplay{ background: rgba(255,209,102,0.12); border: 1px solid rgba(255,209,102,0.35); color: var(--accent-gold);
  font-weight: 800; padding: 6px 14px; border-radius: 20px; font-size: 14px; }
.soundBtn{ background: #1c1c28; border: 1px solid var(--panel-border); color: var(--text-dim); font-size: 11px;
  padding: 6px 10px; border-radius: 8px; cursor:pointer; font-weight:700; }
.soundBtn:hover{ color: var(--text); }

.badge{ display:none; position:absolute; top:-8px; right:-8px; background: var(--red); color:white; font-size: 10px;
  font-weight:900; width:18px; height:18px; border-radius:50%; align-items:center; justify-content:center; line-height:18px; }

/* ---- character cards ---- */
/* Card grids (skin shop, brawler list, coin packs) reflow on WIDTH only —
   never on viewport height, which says nothing about how many columns fit.
   min(100%, 168px) as the track floor is what keeps a single card from
   overflowing a viewport narrower than the floor itself. */
.cardGrid{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1024px){
  .cardGrid{ grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 10px; }
}
/* brawler poster card: rarity-tinted top with the portrait, name plate below */
.charCard{ position:relative; padding: 0; overflow:hidden; cursor:pointer;
  background: linear-gradient(180deg, #23232e, #15151f);
  border: 3px solid var(--panel-border); border-radius: 16px;
  box-shadow: 0 5px 0 rgba(0,0,0,0.32), 0 8px 18px rgba(0,0,0,0.28);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.charCard:hover{ transform: translateY(-4px) scale(1.02); border-color: var(--rc, var(--accent-cyan));
  box-shadow: 0 8px 0 rgba(0,0,0,0.28), 0 0 20px color-mix(in srgb, var(--rc, #7cf7ff) 40%, transparent); }
.charCard.selected{ border-color: var(--accent-gold);
  box-shadow: 0 5px 0 rgba(0,0,0,0.32), 0 0 0 2px rgba(255,210,74,0.35), 0 0 22px rgba(255,210,74,0.3); }
.charCardTop{ position:relative; height: 108px; display:flex; align-items:flex-end; justify-content:center;
  background:
    radial-gradient(circle at 50% 66%, color-mix(in srgb, var(--rc, #57b0ff) 34%, transparent), transparent 75%),
    linear-gradient(180deg, color-mix(in srgb, var(--rc, #57b0ff) 20%, #1c1c2a), #1a1a26); }
.charRarityTag{ position:absolute; top: 7px; left: 7px; z-index:2;
  font-family: var(--hud-font); font-size: 8.5px; letter-spacing: 1.2px; color: #10101a;
  background: var(--rc, #57b0ff); padding: 2px 8px; border-radius: 7px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.charSelectedTag{ position:absolute; top: 7px; right: 7px; z-index:2;
  font-family: var(--hud-font); font-size: 8.5px; letter-spacing: 1.2px; color:#3a2404;
  background: linear-gradient(180deg, #ffe27a, #ffb01f); padding: 2px 8px; border-radius: 7px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.charThumb{ width: 92px; height: 92px; margin-bottom: -4px;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,0.5)); transition: transform 0.15s; }
.charCard:hover .charThumb{ transform: scale(1.08) translateY(-2px); }
.charCardBody{ padding: 8px 8px 11px; }
.charName{ font-family: var(--hud-font); font-weight: 400; font-size: 16px; letter-spacing: 0.4px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.45); }
.charRole{ color: var(--text-dim); font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; margin: 1px 0 7px; }
.charCardMeta{ display:flex; align-items:center; justify-content:center; gap: 5px; flex-wrap:wrap; }
.charMetaChip{ display:inline-flex; align-items:center; gap: 4px;
  font-family: var(--hud-font); font-size: 11px; color: #ffe9a3;
  background: rgba(0,0,0,0.4); border: 1px solid rgba(255,209,102,0.3);
  border-radius: 9px; padding: 2px 8px; }
.charMetaChip.pwr{ color: var(--accent-cyan); border-color: rgba(124,247,255,0.3); }
.charMetaChip .ic{ width: 12px; height: 12px; }
/* ---- shop ---- */
.shopTabs{ display:flex; gap: 8px; justify-content:center; margin-bottom: 16px; flex-wrap: wrap; }
.shopTab{ background:#1c1c28; border:2px solid var(--panel-border); color: var(--text-dim); font-weight:800;
  padding: 8px 16px; border-radius: 10px; cursor:pointer; font-size: 13px; }
.shopTab.active{ border-color: var(--accent-cyan); color: var(--text); }
.skinCard{ position:relative; background: linear-gradient(180deg, #23232e, #17171f); border:3px solid var(--panel-border);
  border-radius: 16px; padding: 20px 10px 14px; text-align:center; box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  transition: transform 0.15s; }
.skinCard:hover{ transform: translateY(-3px); }
.skinCard.equipped{ border-color: var(--accent-gold); }
.skinCard.rarity-rare{ border-color: rgba(58,160,255,0.55); }
.skinCard.rarity-epic{ border-color: rgba(182,83,255,0.55); }
.skinCard.rarity-legendary{ border-color: rgba(255,210,74,0.65);
  background: linear-gradient(180deg, #2b2410, #17141f); }
.skinCard.rarity-evil{ border-color: rgba(255,32,56,0.7);
  background: linear-gradient(180deg, #16090d, #0d0508);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 0 14px rgba(255,32,56,0.25); }
.skinCard.equipped.rarity-rare, .skinCard.equipped.rarity-epic, .skinCard.equipped.rarity-legendary{ border-color: var(--accent-gold); }
.skinCard.equipped.rarity-evil{ border-color: #ff2038; }
.rarityTag{ position:absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 900; letter-spacing: 1px; padding: 2px 10px; border-radius: 8px; color:#fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4); }
.rarityTag.common{ background: #5a5a6a; }
.rarityTag.rare{ background: linear-gradient(180deg, #57b0ff, #1f6fd6); }
.rarityTag.epic{ background: linear-gradient(180deg, #c57aff, #8a2be2); }
.rarityTag.legendary{ background: linear-gradient(180deg, #ffd24a, #f0932a); color:#3a2404; }
.rarityTag.evil{ background: linear-gradient(180deg, #ff2038, #5a0a14); color:#fff;
  box-shadow: 0 0 10px rgba(255,32,56,0.6); animation: evilPulse 1.6s ease-in-out infinite; }
@keyframes evilPulse{ 50%{ box-shadow: 0 0 18px rgba(255,32,56,0.95); } }
.rarityTag.inlineTag{ position:static; transform:none; display:inline-block; font-size: 11px;
  padding: 3px 14px; margin-bottom: 6px; }
.skinThumbWrap{ height: 96px; display:flex; align-items:center; justify-content:center; border-radius: 10px; margin-bottom: 2px; }
.skinThumb{ width: 92px; height: 92px; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.45)); }
.skinName{ font-weight: 700; font-size: 13px; margin: 8px 0; }
.skinBtn{ width:100%; background: linear-gradient(180deg, var(--accent-orange), #e0501c); border:none; color:white;
  font-weight: 800; font-size: 12px; padding: 8px 6px; border-radius: 8px; cursor:pointer; }
.skinBtn:disabled{ background: #2a2a3a; color: var(--accent-gold); cursor:default; }

/* ---- perk badge on skin cards ---- */
.perkBadge{ display:inline-flex; align-items:center; gap: 4px; font-size: 10px; font-weight: 900;
  color: #ffe14a; background: rgba(255,209,102,0.12); border: 1px solid rgba(255,209,102,0.35);
  border-radius: 9px; padding: 2px 9px; margin-bottom: 8px; }
.perkBadge.none{ color: var(--text-dim); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); }

/* ---- hub loot-box tiles (bottom bar, between event card and PLAY) ---- */
.hubBoxes{ display:flex; gap: 10px; align-items:flex-end; flex-wrap: wrap; justify-content:center;
  min-width: 0; }
.hubBoxTile{ position:relative; display:flex; flex-direction:column; align-items:center; gap: 4px;
  /* fixed width keeps the six-tile row + event card + PLAY on ONE line at
     1280 wide: let it size to its label and a long name wraps the row, which
     shoves the whole bottom bar off the bottom edge */
  width: 110px; padding: 11px 8px 9px; border-radius: 17px; cursor:pointer; color:#fff;
  background: linear-gradient(180deg, #a8642e, #6a3d18);
  border: 3px solid #d99a55;
  box-shadow: 0 5px 0 rgba(0,0,0,0.4), 0 10px 22px rgba(0,0,0,0.35), inset 0 2px 0 rgba(255,255,255,0.22);
  transition: transform 0.12s; }
.hubBoxTile:hover{ transform: translateY(-4px) rotate(-1.5deg); }
.hubBoxTile:active{ transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.4); }
.hubBoxTile.mega{ background: linear-gradient(180deg, #b8871a, #6a4a08); border-color: #ffd24a;
  box-shadow: 0 5px 0 rgba(0,0,0,0.4), 0 0 22px rgba(255,210,74,0.35); }
.hubBoxTile.mega::after{ content:''; position:absolute; inset:-3px; border-radius: 16px; pointer-events:none;
  animation: megaPulse 1.6s ease-in-out infinite; }
@keyframes megaPulse{ 0%,100%{ box-shadow: 0 0 8px rgba(255,210,74,0.25); } 50%{ box-shadow: 0 0 22px rgba(255,210,74,0.6); } }
.boxTileIcon{ width: 52px; height: 52px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45));
  animation: boxTileBob 2.4s ease-in-out infinite; }
.hubBoxTile.mega .boxTileIcon{ animation-delay: 0.6s; }
@keyframes boxTileBob{ 0%,100%{ transform: translateY(0) rotate(-2deg); } 50%{ transform: translateY(-4px) rotate(2deg); } }
.boxTileIcon svg{ width:100%; height:100%; }
.boxTileName{ font-family: var(--hud-font); font-weight: 400; font-size: 12.5px; letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4); white-space:nowrap; }
.boxTilePrice{ display:inline-flex; align-items:center; gap: 5px; font-size: 12px; font-weight: 900;
  color: #ffe9a3; background: rgba(0,0,0,0.35); border-radius: 10px; padding: 2px 10px; white-space:nowrap; }
.hubBoxTile.ad{ background: linear-gradient(180deg, #2fae5c, #1a6a38); border-color: #6fe098; }
.hubBoxTile.gem{ background: linear-gradient(180deg, #0f7a52, #0a3d2c); border-color: #3ddc55;
  box-shadow: 0 5px 0 rgba(0,0,0,0.4), 0 0 20px rgba(61,220,85,0.4); }
.hubBoxTile.gem::after{ content:''; position:absolute; inset:-3px; border-radius: 16px; pointer-events:none;
  animation: gemPulse 1.5s ease-in-out infinite; }
@keyframes gemPulse{ 0%,100%{ box-shadow: 0 0 8px rgba(61,220,85,0.3); } 50%{ box-shadow: 0 0 20px rgba(61,220,85,0.65); } }
/* corner badge: shown on the Gem Box while it's on cooldown, so the ad-skip
   option stays visible even though the price label is busy showing the
   countdown */
.boxAdBadge{ position:absolute; top: -14px; right: -14px; z-index: 2;
  background: linear-gradient(180deg, #ffe98a, #ffa61a); color: #3a2404;
  border: 2.5px solid #8a5a00; border-radius: 12px; padding: 3px 8px;
  font-family: var(--hud-font); font-weight: 400; font-size: 12px; letter-spacing: 0.3px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.4), 0 0 10px rgba(255,180,26,0.55);
  animation: adBadgePop 1.6s ease-in-out infinite; }
@keyframes adBadgePop{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.18); } }
.hubBoxTile.ultra{ background: linear-gradient(180deg, #8a2be2, #4a1580); border-color: #c57aff;
  box-shadow: 0 5px 0 rgba(0,0,0,0.4), 0 0 24px rgba(182,83,255,0.45); }
.hubBoxTile.ultra::after{ content:''; position:absolute; inset:-3px; border-radius: 16px; pointer-events:none;
  animation: ultraPulse 1.4s ease-in-out infinite; }
@keyframes ultraPulse{ 0%,100%{ box-shadow: 0 0 10px rgba(182,83,255,0.3); } 50%{ box-shadow: 0 0 26px rgba(182,83,255,0.7); } }
.boxTilePrice.ad{ color: #c9ffdb; }
.boxTilePrice.ad.cooldown{ color: #9adbb2; opacity: 0.8; }
.hubBoxTile.evil{ background: linear-gradient(180deg, #1a0608, #050203); border-color: #ff2038;
  box-shadow: 0 5px 0 rgba(0,0,0,0.6), 0 0 26px rgba(255,32,56,0.5); }
.hubBoxTile.evil::after{ content:''; position:absolute; inset:-3px; border-radius: 16px; pointer-events:none;
  animation: evilPulse 1.3s ease-in-out infinite; }
@keyframes evilPulse{ 0%,100%{ box-shadow: 0 0 10px rgba(255,32,56,0.35); } 50%{ box-shadow: 0 0 28px rgba(255,32,56,0.85); } }
.hubBoxTile.evil .boxTileName{ color: #ff8a94; }
.hubBoxTile.evil .boxTilePrice{ color: #ffb3ba; }

/* ---- box drop-info: hover tooltip on tiles + list in the open overlay ---- */
.boxDropsTip{ position:absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 200px; padding: 10px 12px; border-radius: 12px; z-index: 5; pointer-events:none;
  background: linear-gradient(180deg, #23232e, #15151d); border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 24px rgba(0,0,0,0.55); opacity: 0; transition: opacity 0.12s, transform 0.12s;
  text-align:left; }
.boxDropsTip::after{ content:''; position:absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: rgba(255,255,255,0.2); }
.hubBoxTile:hover .boxDropsTip, .hubBoxTile:focus-visible .boxDropsTip{
  opacity: 1; transform: translateX(-50%) translateY(0); }
.dropTitle{ font-size: 11px; font-weight: 900; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--accent-gold); margin-bottom: 6px; }
.dropRow{ display:flex; align-items:center; gap: 7px; font-size: 12px; font-weight: 700;
  color: var(--text); padding: 2px 0; }
.dropRow .ic{ width: 14px; height: 14px; }
.dropRow.legend{ color: #c57aff; font-weight: 900; }
.dropChance{ min-width: 38px; text-align:right; font-size: 10px; font-weight: 900;
  color: var(--text-dim); background: rgba(0,0,0,0.4); border-radius: 7px; padding: 1px 6px; }
.dropRow.legend .dropChance{ color: #c57aff; }
.boxDropsInfo{ display:none; min-width: 230px; padding: 12px 16px; border-radius: 14px; text-align:left;
  background: linear-gradient(180deg, #23232e, #15151d); border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 24px rgba(0,0,0,0.5); }

/* Neutral interaction blocker while the CrazyGames SDK resolves an ad request. */

/* stacked/split purchase button rows (skins + brawler unlocks) */
.skinBtnRow{ display:flex; gap: 6px; }
.skinBtnRow .skinBtn{ flex:1; padding: 8px 6px; font-size: 12px; }
.skinBtnRow.vert{ flex-direction:column; }
.skinBtnRow.vert > .skinBtn{ width: 100%; }

/* gem-priced and ad-offer buttons in the rotation */
.skinBtn.gemBtn{ background: linear-gradient(180deg, #4be07a, #1fa848); border-color: #0e3f16; color: #06280f;
  box-shadow: 0 4px 0 #0d5a26; }
.skinBtn.adBtn{ background: linear-gradient(180deg, #57b0ff, #1f6fd6); border-color: #123a6a; color: #fff;
  box-shadow: 0 4px 0 #0d2a4e; }
.skinBtn.adBtn,
.bpPremiumBtn.adAlt,
.bpBuyBtn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; }
.adVideoIcon{ display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto;
  font-size:0.82em; line-height:1; }
.adVideoIcon svg{ width:1.15em; height:1.15em; display:block; }
.rewardedUsage{ color:var(--accent-gold); font-weight:900; white-space:nowrap; }
.skinBtn.adBtn:disabled,
.bpPremiumBtn.adAlt:disabled,
.bpBuyBtn:disabled,
.hubBoxTile:disabled{
  cursor:not-allowed; filter:saturate(0.35); opacity:0.62; transform:none;
  box-shadow:none;
}
.rewardedUnavailable{
  white-space:nowrap; font-size:clamp(9px, 1.15vw, 12px); letter-spacing:0;
}
.skinBtn.adBtn,
.bpPremiumBtn.adAlt,
.bpBuyBtn{ min-height:32px; }
.boxTilePrice.ad{ min-width:78px; justify-content:center; }
.boxAdBadge.rewardedUnavailable{ min-width:68px; text-align:center; }
.skinCard.adOffer{ box-shadow: 0 0 18px rgba(87,176,255,0.3); }

/* box opening overlay */
.boxOverlay{ display:none; position:fixed; inset:0; z-index: 40; align-items:center; justify-content:center;
  background: rgba(5,5,12,0.88); }
.boxOverlay.active{ display:flex; }
.boxStage{ position:relative; display:flex; flex-direction:column; align-items:center; gap: 20px; }
.boxBurst{ position:absolute; left:50%; top:40%; width: 700px; height: 700px; margin: -350px 0 0 -350px;
  pointer-events:none; opacity: 0;
  background: repeating-conic-gradient(rgba(255,210,74,0.22) 0 10deg, transparent 10deg 22deg);
  -webkit-mask-image: radial-gradient(circle, black 0%, transparent 58%);
  mask-image: radial-gradient(circle, black 0%, transparent 58%); }
.boxBurst.show{ opacity: 1; animation: burstSpin 10s linear infinite; }
/* gem rewards glow green instead of gold */
.boxBurst.gems{ background: repeating-conic-gradient(rgba(61,220,85,0.26) 0 10deg, transparent 10deg 22deg); }
.boxItem{ position:relative; width: 170px; height: 170px; cursor:pointer;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,0.6)); }
.boxItem svg{ width:100%; height:100%; }
.boxItem.bounce{ animation: boxBounce 1s ease-in-out infinite; }
.boxItem.shake{ animation: boxShake 0.65s ease-in-out; }
@keyframes boxBounce{ 0%,100%{ transform: translateY(0) rotate(-2deg); } 50%{ transform: translateY(-16px) rotate(2deg); } }
@keyframes boxShake{ 0%,100%{ transform: rotate(0); } 20%{ transform: rotate(-9deg) scale(1.04); }
  40%{ transform: rotate(9deg) scale(1.08); } 60%{ transform: rotate(-7deg) scale(1.12); } 80%{ transform: rotate(7deg) scale(1.16); } }
.boxReveal{ position:relative; display:none; flex-direction:column; align-items:center; gap: 12px; }
.boxReveal.show{ display:flex; animation: versusPopIn 0.45s cubic-bezier(0.2, 1.5, 0.4, 1); }
.boxRewardImg{ width: 170px; height: 170px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.55)); }
.boxRewardIcon{ width: 120px; height: 120px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.55)); }
.boxRewardIcon svg{ width:100%; height:100%; }
.boxRewardLabel{ font-size: 20px; font-weight: 900; text-align:center; line-height: 1.4; }
.boxRewardLabel span{ font-size: 13px; color: var(--accent-gold); font-weight: 700; }
.boxHint{ font-size: 15px; font-weight: 800; color: var(--accent-gold); animation: hintPulse2 1.1s ease-in-out infinite; }
@keyframes hintPulse2{ 0%,100%{ opacity: 0.55; } 50%{ opacity: 1; } }

/* ---- daily login reward ---- */
.dailyOverlay{ display:none; position:fixed; inset:0; z-index: 44; align-items:center; justify-content:center;
  background: rgba(5,5,12,0.88); }
.dailyOverlay.active{ display:flex; }
.dailyPanel{ position:relative; width: min(92vw, 480px); padding: 26px 22px 22px;
  border-radius: 22px; text-align:center;
  background: linear-gradient(180deg, #241f3a, #14101f);
  border: 3px solid rgba(255,209,102,0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(255,209,102,0.15);
  animation: versusPopIn 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
.dailyCloseBtn{ position:absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius:50%;
  background: rgba(255,255,255,0.08); border: 2px solid rgba(255,255,255,0.16); color: var(--text);
  font-size: 14px; cursor:pointer; }
.dailyTitle{ font-family: var(--hud-font); font-size: 26px; letter-spacing: 1px;
  color: var(--accent-gold); text-shadow: 0 2px 0 rgba(0,0,0,0.4); }
.dailySub{ font-size: 12px; color: var(--text-dim); margin: 4px 0 8px; }
.dailyResetLabel{ font-size: 11px; font-weight: 800; color: var(--accent-gold); margin-bottom: 14px; }
.dailyTrack{ display:flex; flex-wrap:wrap; gap: 8px; justify-content:center; margin-bottom: 20px; }
.dailyDay{ position:relative; width: 68px; min-height: 82px; padding: 8px 4px 7px; border-radius: 14px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 2px solid rgba(255,255,255,0.14); }
.dailyDay .dailyDayNum{ font-size: 9px; font-weight: 900; letter-spacing: 0.5px; color: var(--text-dim); }
.dailyDay .dailyDayIcon{ width: 30px; height: 30px; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.4)); }
.dailyDay .dailyDayIcon svg{ width:100%; height:100%; }
.dailyDay .dailyDayAmt{ font-size: 10px; font-weight: 800; }
.dailyDay.claimed{ opacity: 0.5; }
.dailyDay.claimed::after{ content:'✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size: 22px; font-weight: 900; color: #3ddc55; background: rgba(10,10,16,0.55); border-radius: 12px; }
.dailyDay.today{ border-color: var(--accent-gold); box-shadow: 0 0 18px rgba(255,209,102,0.5);
  animation: hintPulse2 1.1s ease-in-out infinite; }
.dailyDay.big{ background: linear-gradient(180deg, rgba(255,209,102,0.22), rgba(255,209,102,0.05));
  border-color: rgba(255,209,102,0.5); }
.dailyClaimBtn{ width: 100%; }
.dailyClaimBtn.done{ background: linear-gradient(180deg, #565669, #35354a); color: var(--text-dim);
  box-shadow: none; cursor:default; }

/* ---- help / how-to-play overlay ---- */
.helpOverlay{ display:none; position:fixed; inset:0; z-index: 47; align-items:center; justify-content:center;
  background: rgba(5,5,12,0.9); }
.helpOverlay.active{ display:flex; }
.helpPanel{ position:relative; width: min(94vw, 720px); max-height: calc(88 * var(--uvh, 1vh)); padding: 26px 22px 20px;
  border-radius: 22px; text-align:center; display:flex; flex-direction:column;
  background: linear-gradient(180deg, #241f3a, #14101f);
  border: 3px solid rgba(87,176,255,0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 40px rgba(87,176,255,0.12);
  animation: versusPopIn 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
.helpTabs{ display:flex; flex-wrap:wrap; gap: 6px; justify-content:center; margin: 14px 0 4px; flex-shrink:0; }
.helpTab{ padding: 8px 13px; border-radius: 20px; font-size: 11px; font-weight: 900; letter-spacing:0.3px;
  background: rgba(255,255,255,0.06); border: 2px solid rgba(255,255,255,0.14); color: var(--text-dim); cursor:pointer; }
.helpTab.active{ background: linear-gradient(180deg, #7cc9ff, #1a5fc0); border-color: rgba(87,176,255,0.6); color:#fff; }

/* Desktop/Mobile switch inside the Controls tab */
.ctrlModeSwitch{ display:flex; gap:8px; justify-content:center; margin-bottom:14px; }
.ctrlModeBtn{ padding:8px 16px; border-radius:20px; font-size:12px; font-weight:900;
  background: rgba(255,255,255,0.06); border:2px solid rgba(255,255,255,0.14); color: var(--text-dim); cursor:pointer; }
.ctrlModeBtn.active{ background: linear-gradient(180deg, #ffe27a, #e8891a); border-color: rgba(255,209,102,0.6); color:#3a2404; }
.ctrlPane{ display:none; }
.ctrlPane.active{ display:block; }
.helpContent{ flex:1 1 auto; min-height:0; overflow-y:auto; text-align:left; padding: 10px 6px 18px; }
.helpSection{ display:none; }
.helpSection.active{ display:block; animation: versusPopIn 0.25s cubic-bezier(0.2,1.5,0.4,1); }
.helpSection h3{ font-size: 14px; color: var(--accent-gold); margin: 16px 0 6px; letter-spacing:0.3px; }
.helpSection h3:first-child{ margin-top:0; }
.helpSection p{ font-size: 13px; line-height:1.55; color: var(--text); margin: 0 0 8px; }
.helpSection a{ color: #7cc9ff; font-weight: 800; text-decoration: none; }
.helpSection a:hover{ text-decoration: underline; }
.helpDim{ color: var(--text-dim) !important; font-size: 12px !important; }

/* keyboard-key visuals used in the Controls tab */
.keyCap{ display:flex; align-items:center; justify-content:center; border-radius:8px;
  background: linear-gradient(180deg,#3c3c52,#222230); border:2px solid rgba(255,255,255,0.25); border-bottom-width:4px;
  font-weight:900; font-size:14px; color:#fff; box-shadow:0 2px 0 rgba(0,0,0,0.4); }
.wasdPad{ display:grid; grid-template-columns:repeat(3,36px); grid-template-rows:repeat(2,36px); gap:5px; margin: 10px auto; width:fit-content; }
.wasdPad .wKey{ grid-column:2; grid-row:1; }
.wasdPad .aKey{ grid-column:1; grid-row:2; }
.wasdPad .sKey{ grid-column:2; grid-row:2; }
.wasdPad .dKey{ grid-column:3; grid-row:2; }
.keyRow{ display:flex; gap:10px; align-items:center; margin:10px 0; flex-wrap:wrap; }
.keyRow .keyCap{ min-width:36px; height:36px; padding:0 10px; flex-shrink:0; }
.keyRow p{ margin:0; flex:1; min-width:160px; }

/* mouse-aim diagram in the Controls tab */
.aimDiagram{ display:flex; align-items:center; justify-content:center; gap:8px; margin: 12px 0;
  padding: 16px 10px; border-radius:14px; background: rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.1); }
.aimDot{ width:26px; height:26px; border-radius:50%; flex-shrink:0; }
.aimDot.player{ background: #57b0ff; box-shadow:0 0 12px #57b0ff; }
.aimDot.cursor{ display:flex; align-items:center; justify-content:center; font-size:22px; }
.aimArrowSvg{ width:120px; height:24px; flex-shrink:0; }

/* mini rank-badge showcase in the Ranks tab */
.rankShowcase{ display:flex; gap:16px; justify-content:center; align-items:flex-end; margin: 12px 0 6px; flex-wrap:wrap; }
.rankShowcase .rankBadge svg{ width:44px; height:42px; }

/* icon+text rows shared by Boxes/Currencies/Daily/Battle-Pass tabs */
.helpRow{ display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.06); }
.helpRow:last-child{ border-bottom:none; }
.helpRow .ic{ width:28px; height:28px; flex-shrink:0; }
.helpRowTitle{ font-weight:900; font-size:13px; }
.helpRowDesc{ font-size:11.5px; color: var(--text-dim); line-height:1.35; }

/* ---- shop sections ---- */
.shopSection{ margin-bottom: 26px; }
.shopSectionHead{ display:flex; align-items:center; justify-content:space-between; gap: 12px;
  margin-bottom: 14px; padding: 0 2px; }
.shopSectionTitle{ margin:0; font-size: 17px; font-weight: 900; font-style: italic; letter-spacing: 1px;
  text-transform: uppercase; text-shadow: 0 2px 0 rgba(0,0,0,0.4); text-align:left; }
.rotTimer{ display:inline-flex; align-items:center; gap: 6px; font-size: 12px; font-weight: 800;
  color: var(--accent-gold); background: rgba(255,209,102,0.1); border: 1px solid rgba(255,209,102,0.3);
  border-radius: 10px; padding: 4px 12px; }
.shopHeadRight{ display:flex; align-items:center; gap: 10px; }
.rerollBtn{ display:inline-flex; align-items:center; gap: 6px; cursor:pointer;
  background: linear-gradient(180deg, #57b0ff, #1f6fd6); border: 2px solid #123a6a; color:#fff;
  font-weight: 900; font-size: 12px; padding: 6px 14px; border-radius: 10px;
  box-shadow: 0 3px 0 #0d2a4e; transition: transform 0.08s; }
.rerollBtn:hover{ transform: translateY(-1px); }
.rerollBtn:active{ transform: translateY(2px); box-shadow: 0 1px 0 #0d2a4e; }
.skinCharName{ font-size: 10px; color: var(--accent-cyan); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.5px; margin: -4px 0 6px; }
/* ---- coupon ---- */
.couponBlock{ margin-top: 22px; text-align:center; }
.couponTitle{ font-size: 13px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent-gold); margin-bottom: 10px; }
.couponRow{ display:flex; gap: 10px; justify-content:center; }
.codeInput.coupon{ width: 200px; }
.couponStatus{ margin-top: 10px; font-size: 12px; font-weight: 800; min-height: 16px; }
.couponStatus.good{ color: #3ddc55; }
.couponStatus.bad{ color: var(--red); }

/* ---- currency packs ---- */
.packGrid{ display:grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.packCard{ display:flex; flex-direction:column; align-items:center; gap: 4px; padding: 14px 8px 10px;
  background: linear-gradient(180deg, #2b2340, #1d1930); border: 3px solid rgba(255,209,102,0.35);
  border-radius: 16px; box-shadow: 0 4px 0 rgba(0,0,0,0.3); }
.packCard.gems{ border-color: rgba(61,220,85,0.4); background: linear-gradient(180deg, #142e1c, #101a14); }
.packIcon{ width: 46px; height: 46px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45)); }
.packIcon svg{ width:100%; height:100%; }
.packAmount{ font-size: 18px; font-weight: 900; }
.packWhat{ font-size: 9px; font-weight: 900; letter-spacing: 1.5px; color: var(--text-dim); margin-bottom: 4px; }
.packCard .skinBtn{ width: 100%; padding: 8px 4px; font-size: 12px; margin-top: auto; }
/* ---- shop boosts (timed 2x trophies / 2x pass XP) ---- */
.packCard.boost{ border-color: rgba(122,90,248,0.45); background: linear-gradient(180deg, #1d1730, #131020); }
.packCard.boost .packWhat{ font-size: 9px; letter-spacing: 0.6px; text-transform: uppercase; text-align: center; line-height: 1.4; }
.packCard.boostActive{ border-color: rgba(61,220,104,0.65); box-shadow: 0 0 12px rgba(61,220,104,0.28); }
.packCard.boostActive .packWhat{ color: #3ddc68; }
@media (max-width: 860px){ .packGrid{ grid-template-columns: repeat(3, 1fr); } }

/* nudge shown when a purchase failed for lack of coins/gems and we jumped here */
.pulseHighlight{ animation: coinShopPulse 0.4s ease-in-out 3; border-radius: 16px; }
@keyframes coinShopPulse{ 0%,100%{ box-shadow: none; } 50%{ box-shadow: 0 0 0 4px rgba(255,209,102,0.6), 0 0 24px rgba(255,209,102,0.5); } }

/* ---- locked brawler cards + price ---- */
.charCard.locked .charThumb{ filter: grayscale(0.9) brightness(0.6) drop-shadow(0 4px 8px rgba(0,0,0,0.45)); }
.charLockOverlay{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.charLockOverlay svg{ width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); }
.charPrice{ display:inline-flex; align-items:center; gap: 5px; font-size: 12px; font-weight: 900;
  color: var(--accent-gold); background: rgba(255,209,102,0.1); border: 1px solid rgba(255,209,102,0.3);
  border-radius: 10px; padding: 3px 11px; margin-top: 4px; }

/* ---- brawler detail screen ---- */
.detailContent{ display:flex; gap: 24px; text-align:left; align-items:flex-start; }
.detailLeft{ flex-shrink:0; display:flex; flex-direction:column; align-items:center; gap: 8px; }
.detailCanvas{ width: 300px; height: 350px; cursor: grab; border-radius: 20px;
  background: radial-gradient(circle at 50% 42%, rgba(255,255,255,0.08), transparent 65%),
              radial-gradient(ellipse 46% 8% at 50% 88%, rgba(0,0,0,0.5), transparent 72%); }
.detailHint{ font-size: 11px; color: var(--text-dim); font-weight: 700; }
.detailSkins{ width: 100%; max-width: 300px; }
/* wardrobe launcher under the model */
.detailWardrobeBtn{ display:flex; align-items:center; gap: 12px; width: 100%;
  padding: 10px 14px; border-radius: 14px; cursor:pointer; color: var(--text); text-align:left;
  background: linear-gradient(180deg, #2f2f46, #1b1b2a);
  border: 2px solid rgba(255,209,102,0.4);
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.detailWardrobeBtn:hover{ transform: translateY(-2px); border-color: #ffd24a;
  box-shadow: 0 6px 0 rgba(0,0,0,0.35), 0 0 18px rgba(255,209,102,0.35), inset 0 1px 0 rgba(255,255,255,0.12); }
.detailWardrobeBtn .dwHanger{ display:flex; width: 34px; height: 34px; flex-shrink:0;
  align-items:center; justify-content:center; color: #ffd24a; border-radius: 10px;
  background: rgba(255,209,102,0.12); border: 1px solid rgba(255,209,102,0.3); }
.detailWardrobeBtn .dwHanger svg{ width: 22px; height: 22px; transform-origin: 50% 12%;
  animation: hangerSwing 3.2s ease-in-out infinite; }
.detailWardrobeBtn .dwText{ flex:1; display:flex; flex-direction:column; min-width:0; }
.detailWardrobeBtn .dwText b{ font-family: var(--hud-font); font-weight: 400; font-size: 14px;
  letter-spacing: 1.5px; color: #ffe9a3; }
.detailWardrobeBtn .dwText i{ font-style: normal; font-size: 11px; color: var(--text-dim);
  font-weight: 700; overflow-wrap:anywhere; }
.detailWardrobeBtn .dwArrow{ font-size: 22px; font-weight: 900; color: #ffd24a; }
.detailRight{ flex:1; display:flex; flex-direction:column; gap: 14px; min-width: 0; }
.detailRole{ display:flex; align-items:center; gap: 10px; font-size: 13px; font-weight: 800;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.detailRarity{ font-family: var(--hud-font); font-weight: 400; font-size: 12px; letter-spacing: 1.5px;
  padding: 3px 12px; border-radius: 9px; border: 2px solid; }
.detailBadges{ display:flex; gap: 8px; flex-wrap:wrap; }
.detailBadge{ display:inline-flex; align-items:center; gap: 6px;
  background: linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0.28));
  border: 2px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 6px 14px;
  font-family: var(--hud-font); font-weight: 400; font-size: 13px; letter-spacing: 0.4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08); }
.detailBadge.lockBadge svg{ width: 15px; height: 15px; }
.detailStats{ display:flex; flex-direction:column; gap: 6px; }
.statRow{ display:flex; align-items:baseline; gap: 10px;
  background: linear-gradient(90deg, rgba(0,0,0,0.36), rgba(0,0,0,0.22));
  border: 1px solid rgba(255,255,255,0.1); border-left: 3px solid rgba(124,247,255,0.45);
  border-radius: 10px; padding: 8px 14px; }
.statRow.boosted{ border-left-color: #ffd24a; background: linear-gradient(90deg, rgba(255,209,102,0.12), rgba(0,0,0,0.22)); }
.statLabel{ width: 120px; font-size: 12px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.statValue{ font-family: var(--hud-font); font-size: 17px; font-weight: 400; color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,0.5); }
.statSub{ font-size: 11px; color: var(--text-dim); font-weight: 700; }
.detailSuper{ position:relative; overflow:hidden;
  background: linear-gradient(135deg, rgba(255,209,102,0.14), rgba(255,140,26,0.06));
  border: 2px solid rgba(255,209,102,0.35); border-radius: 14px; padding: 12px 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); }
.detailSuper::after{ content:''; position:absolute; top:-40%; bottom:-40%; left:-40%; width:30%;
  background: linear-gradient(100deg, transparent, rgba(255,240,200,0.14), transparent);
  transform: skewX(-20deg); animation: bannerShine 4.5s ease-in-out infinite; pointer-events:none; }
.detailSuperName{ display:flex; align-items:center; gap: 7px;
  font-family: var(--hud-font); font-weight: 400; font-size: 15px;
  color: var(--accent-gold); letter-spacing: 1px; margin-bottom: 5px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5); }
.detailSuperDesc{ font-size: 13px; line-height: 1.55; color: var(--text); }
.detailBtns{ display:flex; flex-direction:column; gap: 10px; max-width: 340px; }
@media (max-width: 760px){
  .detailContent{ flex-direction:column; align-items:center; }
  .detailRight{ width: 100%; }
}
/* short (landscape-phone) viewports: plenty of width next to the tiny
   canvas even when max-width:760 above would normally stack everything —
   keep canvas + stats/buttons side by side so SELECT/Upgrade land in that
   empty space instead of scrolled far below a lonely centered character */
@media (max-height: 640px){
  .detailContent{ flex-direction:row; align-items:flex-start; }
  .detailRight{ width:auto; }
  .detailBtns .bigBtn, .detailBtns .ghostBtn{ padding: 8px 16px; font-size: 12px; }
}


/* ---- battle pass: post-completion bonus crates ---------------------------
   Shown only once the pass is maxed. Every further BATTLEPASS_XP_PER_TIER
   earns one Golden Crate, so a finished pass keeps paying out. */
.bpBonusRow{ display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  margin: 14px 0 4px; padding: 12px 16px; border-radius: 16px;
  background: linear-gradient(180deg, #2b2410, #17141f);
  border: 3px solid rgba(255,210,74,0.65);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 0 18px rgba(255,210,74,0.18); }
.bpBonusIcon{ width: 46px; height: 46px; flex: 0 0 auto; }
.bpBonusText{ flex: 1 1 180px; text-align: left; min-width: 0; }
.bpBonusTitle{ font-weight: 900; font-style: italic; letter-spacing: 1px;
  text-transform: uppercase; font-size: 15px; color: var(--accent-gold); }
.bpBonusDesc{ font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.bpBonusBar{ height: 8px; border-radius: 6px; background: rgba(255,255,255,0.1);
  overflow: hidden; margin-top: 7px; }
.bpBonusBar > i{ display:block; height:100%; background: linear-gradient(90deg,#ffd24a,#f0932a); }
.bpBonusClaim{ flex: 0 0 auto; }
.bpBonusClaim[disabled]{ filter: saturate(0.3); opacity: 0.6; cursor: default; }
@media (pointer: coarse){ .bpBonusClaim{ min-height: 44px; } }

/* ---- aim crosshair ---------------------------------------------------------
   The pointer lock removes the OS cursor, so this IS the cursor while playing.
   Positioned from input.js in real canvas pixels via transform; left/top stay 0
   and the negative margin centres it on the point. Outside #uiRoot, so it is
   never scaled by --ui-scale. */
.aimCursor{
  position:fixed; left:0; top:0; z-index:40;
  width:30px; height:30px; margin:-15px 0 0 -15px;
  display:none; pointer-events:none;
}
.aimCursor.active{ display:block; }
.aimCursor svg{ width:100%; height:100%; display:block; }
/* no double cursor: while the crosshair is up the arrow over the arena goes away */
body.hideSystemCursor #gameCanvas{ cursor:none; }

/* ---- CrazyGames menu banner ------------------------------------------------
   A fixed 320x50 unit centred at the TOP of the menus. CrazyGames does not
   allow a banner that trims the gameplay area or shows during active play, so
   this one never touches --app-height: the canvas always owns the whole frame.
   It is a plain OVERLAY sitting in the empty gap at the top of the hub, so no
   menu element moves when an ad appears and nothing is left behind when there
   is none. #hud and the arena are untouched — it is cleared during gameplay. */
.bannerBar{
  position:fixed; top:0; left:50%; transform:translateX(-50%);
  z-index:55; width:320px; height:50px;
  display:none; align-items:center; justify-content:center;
  overflow:hidden;
  /* No background and no border of our own: the ad is the ONLY thing that
     should be visible here. A styled container paints a black 320x50 box
     whenever the slot is empty or the creative has not drawn yet, which is
     exactly what showed up in preview. */
  background:transparent; border:none;
}
.bannerBar.active{ display:flex; }
#bannerSlot{ display:flex; align-items:center; justify-content:center; width:320px; height:50px; }
/* Narrow frames have no free gap at the top of the hub, so there the menu makes
   room rather than letting the ad cover the player's name and balances. Wide
   frames keep the pure overlay and nothing moves at all. */
html.bannerNeedsRoom #uiRoot,
html.bannerUp #uiRoot{ --menu-banner-logical: calc(50px / var(--ui-scale, 1)); }
/* the result screen is excluded: shifting it down exposed a strip of the 3D
   arena around the banner, so the ad looked bolted on rather than part of the
   screen. It keeps its full-height background and pads its content instead. */
html.bannerNeedsRoom .screen:not(.resultScreen):not(.pageScreen){
  top: var(--menu-banner-logical);
  height: calc(var(--app-height) - var(--menu-banner-logical));
}
/* Full-page menus (Shop, Brawlers, Pass, Events, Leaderboard, brawler
   detail) do not slide down and leave an empty strip above themselves — QA:
   "make the game more full so the banner can appear near the top". The panel
   fills the whole frame instead and its header grows a banner-tall band at
   the top, so the ad sits INSIDE the header bar, flush with the frame top. */
html.bannerNeedsRoom .pageScreen .pagePanel:not(.small){
  height: 100%; max-height: 100%; align-self: stretch;
  border-top-left-radius: 0; border-top-right-radius: 0;
}
html.bannerNeedsRoom .pageScreen .pagePanel:not(.small) .pageHeader{
  padding-top: calc(var(--menu-banner-logical) + 8px);
}
/* wide enough (boot.js measured it): Back/title and the balances sit in the
   SAME band as the ad, left and right of it */
html.bannerNeedsRoom.bannerInHeader .pageScreen .pagePanel:not(.small) .pageHeader{
  padding-top: 0; padding-bottom: 0;
  min-height: calc(var(--menu-banner-logical) + 6px);
}
/* Settings / Invite are centred cards on a tall frame: they stay centred, but
   never taller than the space between the ad and an equal bottom margin, so
   the card can never reach up under the banner (it used to, by 13px, at
   1280x720 — and ran 13px off the bottom). */
html.bannerNeedsRoom .pageScreen .pagePanel.small{
  max-height: calc(100% - 2 * var(--menu-banner-logical) - 16px);
}
/* ...and on a short frame, where they are full-bleed anyway, they get the same
   full-height panel + header band as the big pages. */
@media (max-height: 640px), (max-width: 480px){
  html.bannerNeedsRoom .pageScreen .pagePanel.small{
    height: 100%; max-height: 100%; align-self: stretch;
    border-top-left-radius: 0; border-top-right-radius: 0;
  }
  html.bannerNeedsRoom .pageScreen .pagePanel.small .pageHeader{
    padding-top: calc(var(--menu-banner-logical) + 8px);
  }
  html.bannerNeedsRoom.bannerInHeader .pageScreen .pagePanel.small .pageHeader{
    padding-top: 0; padding-bottom: 0;
    min-height: calc(var(--menu-banner-logical) + 6px);
  }
}


/* Results with a banner up: the brown/red backdrop runs the FULL height, the
   banner sits on it, and only the card is kept clear of it. */
html.bannerUp .resultScreen{ padding-top: calc(var(--menu-banner-logical) + 10px) !important; }
/* The card is scaled by UI._fitResult() to fill the frame. While fitted it must
   not clip itself first — the screen already hides any overflow. */
.resultWrap.fitted{ max-height:none; overflow:visible; transform-origin: 50% 50%; }

/* Deliberately an OVERLAY, not a reserved band: it sits in the empty gap at the
   top of the hub between the player badge and the currency pills, so nothing
   moves when an ad appears and nothing is left behind when there is none. */

/* ================= CrazyGames embedded-frame viewport contract =================
   One JS-synchronized viewport source keeps the WebGL canvas and every DOM
   overlay on the same pixel rectangle after iframe resize, zoom, rotation and
   fullscreen changes. The document itself never scrolls; only designated
   content panels may pan internally. */
#gameCanvas,
.screen,
#hud,
.versusScreen,
.mmOverlay,
.mapPreviewOverlay,
.dailyOverlay,
.helpOverlay,
.boxOverlay,
.heroOverlay{
  width:var(--app-width);
  height:var(--app-height);
  max-width:100%;
  max-height:100%;
}
.screen{ overflow:hidden !important; overscroll-behavior:none; touch-action:manipulation; }
.pageContent,
.helpContent,
.wardrobeScroll,
.dailyPanel,
.heroOverlay{
  overscroll-behavior:contain;
  touch-action:pan-y;
}
.bpTrack{ touch-action:pan-x; overscroll-behavior-inline:contain; }
.pagePanel{
  height:min(calc(var(--app-height) - 24px), calc(88 * var(--uvh, 1vh)));
  max-height:calc(var(--app-height) - 24px);
  max-width:calc(var(--app-width) - 24px);
}
.pagePanel.small{
  max-height:calc(var(--app-height) - 24px);
}
.slotActionBox,
.mapPreviewBox,
.wardrobeBox,
.dailyPanel,
.helpPanel,
.mmBox{
  max-height:calc(var(--app-height) - 24px);
  max-width:calc(var(--app-width) - 24px);
}
.slotActionBox{ overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; }
.mapPreviewOverlay,
.dailyOverlay,
.helpOverlay,
.boxOverlay,
.heroOverlay{
  padding:max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}
body:not(.touch) .joyZone{
  display:none !important;
  pointer-events:none !important;
  visibility:hidden !important;
}
body.touch .joyZone{ visibility:visible; }

@media (max-height:640px), (max-width:480px){
  .pagePanel,
  .pagePanel.small{
    width:var(--app-width);
    height:var(--app-height);
    max-width:100%;
    max-height:100%;
    border-radius:0;
  }
  .pageHeader{
    padding:max(7px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 7px max(10px, env(safe-area-inset-left));
  }
  .pageContent{ padding-bottom:max(14px, env(safe-area-inset-bottom)); }
}

/* ---- leaderboard ---- */
.lbPlatformNotice{ max-width:640px; margin:0 auto 16px; padding:12px 16px; text-align:center;
  border:1px solid rgba(124,247,255,0.28); border-radius:12px; color:#c9f8ff;
  background:rgba(45,145,180,0.1); font-size:13px; font-weight:800; }
.lbList{ display:flex; flex-direction:column; gap: 8px; max-width: 640px; margin: 0 auto; }
.lbRow{ display:flex; align-items:center; gap: 12px; text-align:left;
  background: linear-gradient(180deg, #23232e, #17171f); border: 2px solid var(--panel-border);
  border-radius: 14px; padding: 9px 16px; }
.lbRow.top1{ border-color: #ffd24a; background: linear-gradient(180deg, #33290f, #1d1930); }
.lbRow.top2{ border-color: #c9ccda; }
.lbRow.top3{ border-color: #d68a4a; }
.lbRow.you{ border-color: var(--accent-cyan); box-shadow: 0 0 14px rgba(124,247,255,0.25); }
.lbRank{ width: 34px; font-size: 17px; font-weight: 900; color: var(--text-dim); text-align:center; }
.lbRow.top1 .lbRank{ color: #ffd24a; } .lbRow.top2 .lbRank{ color: #c9ccda; } .lbRow.top3 .lbRank{ color: #d68a4a; }
.lbThumb{ width: 40px; height: 40px; }
.lbAvatar{ width:40px; height:40px; flex:0 0 40px; object-fit:cover; border-radius:11px;
  border:2px solid rgba(255,255,255,0.2); background:#24243a; }
.lbAvatarGuest{ display:flex; align-items:center; justify-content:center; color:#172138;
  background:linear-gradient(180deg, #7cf7ff, #3aa8d8); font-weight:900; font-size:18px; }
.lbName{ flex:1; font-size: 14px; font-weight: 800; min-width:0; overflow-wrap:anywhere; }
.lbYouTag{ font-size: 9px; font-weight: 900; color: #06283c; background: var(--accent-cyan);
  border-radius: 7px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; }
.lbScore{ display:inline-flex; align-items:center; gap: 6px; font-size: 15px; font-weight: 900; color: var(--accent-gold); }
.lbPlatformStatus{ padding:8px 12px; text-align:center; color:var(--text-dim); font-size:11px; font-weight:700; }

/* ---- generic progress-bar primitives (used by the battle pass track) ---- */
.statBarTrack{ flex:1; height: 10px; background: rgba(255,255,255,0.08); border-radius: 6px; overflow:hidden; border:1px solid rgba(255,255,255,0.08);}
.statBarFill{ height:100%; width:0%; border-radius:6px; transition: width 0.1s linear; }
.superFill{ background: linear-gradient(90deg, #ffd166, #ff6b35); }

/* ---- battle pass: hero banner + free/premium tracks ---- */
.bpBanner{ position:relative; display:flex; align-items:center; justify-content:space-between; gap: 18px;
  margin-bottom: 20px; padding: 18px 22px; border-radius: 18px; overflow:hidden; text-align:left;
  background: linear-gradient(120deg, #3a2c6a 0%, #241d40 55%, #2b1f10 100%);
  border: 3px solid rgba(255,210,74,0.45); box-shadow: 0 8px 22px rgba(0,0,0,0.4); }
.bpBannerRays{ position:absolute; right:-140px; top:50%; width: 560px; height: 560px;
  margin-top: -280px; pointer-events:none;
  background: repeating-conic-gradient(rgba(255,210,74,0.12) 0 10deg, transparent 10deg 24deg);
  -webkit-mask-image: radial-gradient(circle, black 0%, transparent 62%);
  mask-image: radial-gradient(circle, black 0%, transparent 62%);
  animation: burstSpin 18s linear infinite; }
.bpBannerLeft{ position:relative; flex:1; min-width:0; }
.bpSeason{ font-size: 11px; font-weight: 900; letter-spacing: 3px; color: var(--accent-cyan); }
.bpTitle{ font-size: 30px; font-weight: 900; font-style: italic; letter-spacing: 1px; line-height: 1.1;
  color: var(--accent-gold); text-shadow: 0 3px 0 rgba(0,0,0,0.45); margin-bottom: 10px; }
.bpProgressRow{ display:flex; align-items:center; gap: 12px; }
.bpTierLabel{ font-weight: 900; font-size: 13px; white-space:nowrap; color:#fff; }
.bpProgressTrack{ height: 16px; flex:1; max-width: 340px; }
.bpXpLabel{ font-size: 11px; font-weight: 800; color: var(--text-dim); white-space:nowrap; }
.bpBannerRight{ position:relative; display:flex; flex-direction:column; gap: 8px; flex-shrink:0; }
/* "what premium gets you" pitch, left of the unlock buttons */
.bpPerks{ position:relative; display:flex; flex-direction:column; gap: 3px; flex-shrink:0;
  padding: 10px 14px; border-radius: 12px; background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,210,74,0.3); }
.bpPerksTitle{ font-family: var(--hud-font); font-weight:400; font-size: 11px; letter-spacing: 1.5px;
  color: #ffd24a; margin-bottom: 3px; }
.bpPerk{ display:flex; align-items:center; gap: 7px; font-size: 12px; font-weight: 800; color: #e8e8f2; }
.bpPerk .ic{ display:flex; }
.bpPerk .ic svg{ width: 14px; height: 14px; }
.bpPerk.gold{ color: #ffe9a3; }
@media (max-width: 620px){ .bpPerks{ display:none !important; } }
.bpPremiumBtn{ background: linear-gradient(180deg, #ffd24a, #f0932a); border:none; color:#3a2404;
  font-weight:900; font-size: 13px; padding: 12px 20px; border-radius: 12px; cursor:pointer;
  box-shadow: 0 4px 0 #b06a12; white-space:nowrap; }
.bpPremiumBtn:active{ transform: translateY(2px); box-shadow: 0 1px 0 #b06a12; }
.bpPremiumBtn.owned{ background:#2a2a3a; color: var(--accent-gold); box-shadow:none; cursor:default; }
.bpPremiumBtn.adAlt{ background: linear-gradient(180deg, #57b0ff, #1f6fd6); color:#fff;
  box-shadow: 0 4px 0 #0d2a4e; font-size: 12px; padding: 9px 20px; }
.bpPremiumBtn.adAlt:active{ box-shadow: 0 1px 0 #0d2a4e; }
.bpTrackWrap{ display:flex; gap: 10px; text-align:left;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.18));
  border: 1px solid rgba(255,255,255,0.07); border-radius: 18px; padding: 14px 10px 6px; }
.bpRowLabels{ display:grid; grid-template-rows: 170px 36px 170px; gap: 8px; flex-shrink:0; }
.bpRowLabel{ display:flex; align-items:center; justify-content:center; font-size: 10px; font-weight:900;
  color: var(--text-dim); writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 3px; }
.bpRowLabel.premium{ color: var(--accent-gold); text-shadow: 0 0 8px rgba(255,210,74,0.5); }
.bpTrack{ display:flex; gap: 0; overflow-x:auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth; }
.bpCol{ position:relative; display:grid; grid-template-rows: 170px 36px 170px; gap: 8px; width: 138px;
  flex-shrink:0; padding: 6px 6px 0; border-radius: 14px; }
.bpCol.current{ background: linear-gradient(180deg, rgba(255,210,74,0.1), rgba(255,210,74,0.02) 60%, transparent); }

/* tier medal on a connecting spine between the two lanes */
.bpSpine{ position:relative; display:flex; align-items:center; justify-content:center; }
.bpSpine::before{ content:''; position:absolute; left:-12px; right:-12px; top:50%; height: 7px;
  transform: translateY(-50%); background: #262633; border-radius: 4px; }
/* the golden progress line — width driven per column by --f (0..1) from
   _paintBpTrack, so the XP tween slides its tip smoothly medal to medal */
.bpSpineFill{ position:absolute; left:-12px; top:50%; height: 7px; transform: translateY(-50%);
  width: calc((100% + 24px) * var(--f, 0)); border-radius: 4px; pointer-events:none;
  background: linear-gradient(90deg, #ffd24a, #ffb31a); box-shadow: 0 0 8px rgba(255,210,74,0.35); }
.bpTierMedal{ position:relative; width: 36px; height: 36px; border-radius: 50%; display:flex;
  align-items:center; justify-content:center; font-size: 13px; font-weight: 900;
  background: linear-gradient(180deg, #2e2e3c, #202029); border: 2px solid #3c3c4e; color: var(--text-dim);
  box-shadow: 0 3px 6px rgba(0,0,0,0.4); }
.bpCol.unlocked .bpTierMedal{ background: linear-gradient(180deg, #ffe98f, #f0932a);
  border-color: #fff3c4; color: #3a2404; box-shadow: 0 3px 6px rgba(0,0,0,0.4), 0 0 10px rgba(255,210,74,0.4); }
.bpCol.current .bpTierMedal{ transform: scale(1.3);
  box-shadow: 0 0 0 3px rgba(255,210,74,0.4), 0 0 18px rgba(255,210,74,0.7);
  animation: medalPulse 1.6s ease-in-out infinite; }
@keyframes medalPulse{ 0%,100%{ box-shadow: 0 0 0 3px rgba(255,210,74,0.4), 0 0 14px rgba(255,210,74,0.55); }
  50%{ box-shadow: 0 0 0 5px rgba(255,210,74,0.25), 0 0 24px rgba(255,210,74,0.85); } }

/* reward cells */
.bpCell{ position:relative; border-radius: 16px; padding: 10px 6px 8px; text-align:center;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 6px;
  background: linear-gradient(165deg, #2b2b3a 0%, #1d1d28 55%, #191922 100%);
  border: 2px solid #343444; border-bottom-width: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  opacity: 0.55; transition: transform 0.12s, box-shadow 0.12s; }
.bpCell.premium{ background: linear-gradient(165deg, #3a2f14 0%, #262012 55%, #1e1a10 100%);
  border-color: #57431c; }
.bpCell.unlocked{ opacity: 1; }
.bpCell.locked{ opacity: 0.55; }
.bpCell.locked .bpIconWrap, .bpCell.locked .bpLabel{ filter: grayscale(0.7) brightness(0.7); }
.bpCell.claimed{ opacity: 0.6; border-color: #2fae5c; }
.bpCell.claimable{ opacity: 1; border-color: var(--accent-gold); cursor:pointer;
  background: linear-gradient(165deg, #46370f 0%, #2b2210 55%, #201a10 100%);
  animation: pulseGlow 1.4s ease-in-out infinite; }
.bpCell.claimable:hover{ transform: translateY(-4px) scale(1.04); }
.claimBadge{ position:absolute; top: -11px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  background: linear-gradient(180deg, #ffe14a, #ffb31a); color: #3a2404;
  font-size: 10px; font-weight: 900; letter-spacing: 0.6px; padding: 3px 12px; border-radius: 9px;
  border: 1px solid #fff3c4; box-shadow: 0 3px 7px rgba(0,0,0,0.45); z-index: 2; }
.bpDoneOverlay{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-size: 42px; font-weight: 900; color: #4ade80; background: rgba(8,16,10,0.5);
  border-radius: 13px; text-shadow: 0 2px 8px rgba(0,0,0,0.7); }
.bpLockOverlay{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  background: rgba(10,10,16,0.35); border-radius: 13px; }
.bpLockOverlay svg{ width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); opacity: 0.9; }

/* reward icon on a type-colored glow disc */
.bpIconWrap{ width: 84px; height: 84px; border-radius: 50%; display:flex; align-items:center;
  justify-content:center; flex:none;
  background: radial-gradient(circle at 50% 32%, rgba(255,255,255,0.14), rgba(255,255,255,0.03) 65%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.07); }
.bpIconWrap.type-coins{ background: radial-gradient(circle at 50% 32%, rgba(255,210,74,0.28), rgba(255,210,74,0.04) 68%);
  box-shadow: inset 0 0 0 2px rgba(255,210,74,0.18); }
.bpIconWrap.type-gems{ background: radial-gradient(circle at 50% 32%, rgba(61,220,85,0.26), rgba(61,220,85,0.04) 68%);
  box-shadow: inset 0 0 0 2px rgba(61,220,85,0.2); }
.bpIconWrap.type-box{ background: radial-gradient(circle at 50% 32%, rgba(224,145,63,0.28), rgba(224,145,63,0.05) 68%);
  box-shadow: inset 0 0 0 2px rgba(224,145,63,0.22); }
.bpIconWrap.type-mega{ background: radial-gradient(circle at 50% 32%, rgba(255,210,74,0.32), rgba(255,180,26,0.05) 68%);
  box-shadow: inset 0 0 0 2px rgba(255,210,74,0.3); }
.bpIconWrap.type-ultra{ background: radial-gradient(circle at 50% 32%, rgba(182,83,255,0.34), rgba(182,83,255,0.06) 68%);
  box-shadow: inset 0 0 0 2px rgba(182,83,255,0.35); }
.bpIconWrap.type-skin{ background: radial-gradient(circle at 50% 32%, rgba(87,176,255,0.24), rgba(87,176,255,0.04) 68%);
  box-shadow: inset 0 0 0 2px rgba(87,176,255,0.22); overflow:hidden; }
.bpIconWrap.type-evil{ background: radial-gradient(circle at 50% 32%, rgba(255,32,56,0.32), rgba(255,32,56,0.05) 68%);
  box-shadow: inset 0 0 0 2px rgba(255,32,56,0.4); }
.bpReward{ width: 52px; height: 52px; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.45)); }
.bpReward svg{ width:100%; height:100%; }
.bpIconWrap.type-ultra .bpReward{ filter: drop-shadow(0 0 10px rgba(182,83,255,0.9)); }
.bpIconWrap.type-mega .bpReward{ filter: drop-shadow(0 0 8px rgba(255,210,74,0.7)); }
.bpIconWrap.type-evil .bpReward{ filter: drop-shadow(0 0 10px rgba(255,32,56,0.8)); }
.bpReward.bpMystery{ display:flex; align-items:center; justify-content:center;
  font-size: 32px; font-weight: 900; color: #cfe0ff; filter: none; }
.bpLabel{ font-size: 11.5px; font-weight: 800; color: #c9c9d8; line-height: 1.25; letter-spacing: 0.2px; }
.bpCell.claimable .bpLabel{ color: #ffe9a3; }
@keyframes pulseGlow{ 0%,100%{ box-shadow: 0 4px 10px rgba(0,0,0,0.3), 0 0 8px rgba(255,209,102,0.3); }
  50%{ box-shadow: 0 4px 10px rgba(0,0,0,0.3), 0 0 20px rgba(255,209,102,0.65); } }

/* ================= HUD ================= */
#hud{ display:none; position:fixed; inset:0; pointer-events:none; z-index:10; font-weight:700;
  --hud-font: 'Lilita One', 'Arial Rounded MT Bold', -apple-system, 'Segoe UI', sans-serif; }

/* red edge flash when the player takes a hit */
.hitVignette{ position:absolute; inset:0; opacity:0; z-index:0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(255,30,45,0.5) 100%); }
.hitVignette.hit{ animation: vignetteFlash 0.45s ease-out; }
@keyframes vignetteFlash{ 0%{ opacity:1; } 100%{ opacity:0; } }

.hudTop{ position:absolute; top: max(10px, env(safe-area-inset-top)); left:0; right:0;
  display:flex; flex-direction:column; align-items:center; gap:6px; }

/* ---- scoreboard: chunky glossy team shields flanking a gold timer plaque ---- */
.scoreboard{ display:flex; align-items:center; filter: drop-shadow(0 7px 14px rgba(0,0,0,0.55));
  animation: hudDropIn 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
@keyframes hudDropIn{ from{ opacity:0; transform: translateY(-46px) scale(0.88); } to{ opacity:1; transform:none; } }
.scoreShield{ position:relative; z-index:1; width: 98px; height: 70px; background: #0d0d16;
  clip-path: polygon(50% 100%, 0 76%, 0 12%, 10% 0, 90% 0, 100% 12%, 100% 76%);
  transition: filter 0.2s; }
.scoreShield .shieldInner{ position:absolute; inset:4px; overflow:hidden;
  clip-path: polygon(50% 100%, 0 76%, 0 12%, 10% 0, 90% 0, 100% 12%, 100% 76%);
  display:flex; align-items:center; justify-content:center; gap:6px;
  font-family: var(--hud-font); font-weight: 400;
  font-size:30px; color:#fff; text-shadow: 0 3px 0 rgba(0,0,0,0.45); }
.scoreShield.blue .shieldInner{ background: linear-gradient(180deg, #7cc9ff 0%, #3d9bf0 45%, #1e63c8 100%); }
.scoreShield.red .shieldInner{ background: linear-gradient(180deg, #ff97a0 0%, #f9505f 45%, #c1233a 100%); }
/* glass highlight across the top half of each shield */
.scoreShield .shieldInner::before{ content:''; position:absolute; left:6%; right:6%; top:5%; height:42%;
  border-radius: 10px; background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.06));
  pointer-events:none; }
/* looping diagonal shine sweep */
.scoreShield .shieldInner::after{ content:''; position:absolute; top:-20%; bottom:-20%; width:34%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-22deg); animation: shieldShine 4.2s ease-in-out infinite; }
.scoreShield.red .shieldInner::after{ animation-delay: 2.1s; }
@keyframes shieldShine{ 0%{ left:-45%; } 32%{ left:115%; } 100%{ left:115%; } }
.scoreIcon{ display:flex; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.35)); }
.scoreIcon svg{ width: 24px; height: 24px; }
.scoreNum{ position:relative; display:inline-block; min-width: 22px; text-align:center; }
.scoreNum.pop{ animation: scorePop 0.5s cubic-bezier(0.2, 1.9, 0.4, 1); }
@keyframes scorePop{ 0%{ transform: scale(2.1); filter: brightness(2); } 100%{ transform: scale(1); filter:none; } }
.scoreShield.flash{ filter: brightness(1.6) saturate(1.3); }

.scorePlaque{ position:relative; z-index:2; width: 164px; height: 58px; margin: 0 -12px;
  clip-path: polygon(9% 0, 91% 0, 100% 50%, 91% 100%, 9% 100%, 0 50%);
  background: linear-gradient(180deg, #ffe08a, #f0a41f 55%, #b06a10); }
.plaqueInner{ position:absolute; inset:4px; overflow:hidden;
  clip-path: polygon(9% 0, 91% 0, 100% 50%, 91% 100%, 9% 100%, 0 50%);
  background: linear-gradient(180deg, #34364e, #1e2032 60%, #171826);
  display:flex; align-items:center; justify-content:center; }
.plaqueInner::before{ content:''; position:absolute; left:10%; right:10%; top:8%; height:38%;
  border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent); }
#matchTimer{ font-family: var(--hud-font); font-weight:400; color:#ffd24a; font-size:26px;
  letter-spacing:1.5px; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0,0,0,0.6), 0 0 14px rgba(255,210,74,0.35); }
/* final seconds: the whole plaque pulses red */
.scorePlaque.urgent{ animation: plaqueUrgent 0.8s ease-in-out infinite; }
.scorePlaque.urgent #matchTimer{ color: #ff5a64; text-shadow: 0 2px 0 rgba(0,0,0,0.6), 0 0 16px rgba(255,80,90,0.7); }
@keyframes plaqueUrgent{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.07); } }
.plaqueGem{ position:absolute; left:50%; transform:translateX(-50%); width:38px; height:21px; z-index:3;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: linear-gradient(180deg, #fff3c4 0%, #ffd24a 40%, #e08a12 100%);
  box-shadow: 0 0 10px rgba(255,210,74,0.4); }
.plaqueGem.top{ top:-9px; } .plaqueGem.bottom{ bottom:-9px; }
.scoreboard.solo .scoreShield{ display:none; }
.scoreboard.solo .scorePlaque{ margin:0; }

/* ---- mode ribbon (top-left) ---- */
.modeTag{ position:absolute; top: max(12px, env(safe-area-inset-top)); left: 14px;
  display:flex; align-items:center; gap:8px;
  background: linear-gradient(180deg, rgba(38,38,54,0.92), rgba(16,16,26,0.92));
  border: 2px solid rgba(255,255,255,0.14); border-left: 4px solid var(--accent-gold);
  border-radius: 10px; padding: 7px 14px; font-family: var(--hud-font); font-weight: 400;
  font-size: 13px; letter-spacing: 1px; text-transform: uppercase;
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 8px 18px rgba(0,0,0,0.35);
  transform: skewX(-6deg); animation: modeTagIn 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.1s backwards; }
.modeTag > *{ transform: skewX(6deg); }
@keyframes modeTagIn{ from{ opacity:0; transform: skewX(-6deg) translateX(-60px); } to{ opacity:1; transform: skewX(-6deg) translateX(0); } }
.modeIcon{ display:flex; font-size: 14px; }
.modeIcon svg{ width: 17px; height: 17px; }
.modeStats{ border-radius: 10px; font-size: 13px; text-align:center; }
.teamBlue{ color: var(--blue); } .teamRed{ color: var(--red); }
.holdWarn{ font-size:12px; font-weight:800; color:#fff; background: rgba(10,10,16,0.6);
  border-radius:8px; padding: 3px 12px; display:inline-block; margin-top:2px; }
.modeStat{ background: rgba(10,10,16,0.55); border-radius:8px; padding: 3px 12px; display:inline-block; }
.modeStat.aliveInd{ font-weight: 800; font-size: 14px; letter-spacing: 0.5px;
  border: 1px solid rgba(255,255,255,0.18); }
.modeStat.aliveInd b{ color: var(--accent-gold, #ffd24a); font-size: 16px; }

/* ---- kill feed: skewed slabs that bounce in from the right ---- */
.killFeed{ position:absolute; top: 96px; right: 14px; display:flex; flex-direction:column; gap:5px; align-items:flex-end; }
.killRow{ background: linear-gradient(90deg, rgba(14,14,22,0.55), rgba(14,14,22,0.88));
  border: 1px solid rgba(255,255,255,0.14); border-right: 3px solid var(--accent-gold);
  padding: 5px 12px; border-radius: 8px; font-size: 12px; font-weight: 800;
  transform: skewX(-6deg); box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  animation: killSlam 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes killSlam{ from{ opacity:0; transform: skewX(-6deg) translateX(70px) scale(0.8); }
  to{ opacity:1; transform: skewX(-6deg) translateX(0) scale(1); } }

/* ---- bottom-left player panel: portrait ring + glossy HP bar + skewed ammo pips ---- */
.hudBottom{ position:absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(14px, env(safe-area-inset-bottom));
  animation: panelRise 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) 0.05s backwards; }
@keyframes panelRise{ from{ opacity:0; transform: translateY(60px) scale(0.9); } to{ opacity:1; transform:none; } }

.hudPanel{ position:relative; display:flex; align-items:center; gap: 13px;
  background: linear-gradient(180deg, rgba(44,44,62,0.94), rgba(18,18,28,0.94));
  border: 2px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 11px 18px 11px 11px;
  box-shadow: 0 6px 0 rgba(0,0,0,0.4), 0 14px 30px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.12); }
/* glass streak across the panel top */
.hudPanel::before{ content:''; position:absolute; left:10px; right:10px; top:4px; height: 34%;
  border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,0.09), transparent); pointer-events:none; }
.hudPanel.dmg{ animation: panelShake 0.35s cubic-bezier(0.3, 0.1, 0.3, 1); }
@keyframes panelShake{ 0%,100%{ transform:none; } 20%{ transform: translate(-4px, 2px) rotate(-1.2deg); }
  40%{ transform: translate(4px, -2px) rotate(1.2deg); } 60%{ transform: translate(-3px, 1px); } 80%{ transform: translate(2px, -1px); } }

.hpPortraitWrap{ position:relative; flex-shrink:0; }
.hpRing{ width: 76px; height: 76px; border-radius: 50%; padding: 5px;
  background: conic-gradient(#4ade80 360deg, rgba(255,255,255,0.14) 0deg);
  box-shadow: 0 4px 14px rgba(0,0,0,0.5), 0 0 0 2px rgba(0,0,0,0.4); transition: background 0.15s linear; }
.hpRing.low{ animation: lowHpRing 0.7s ease-in-out infinite; }
@keyframes lowHpRing{ 0%,100%{ box-shadow: 0 4px 14px rgba(0,0,0,0.5), 0 0 0 2px rgba(0,0,0,0.4); }
  50%{ box-shadow: 0 4px 14px rgba(0,0,0,0.5), 0 0 18px rgba(255,60,70,0.85); } }
.hpAvatar{ width:100%; height:100%; border-radius:50%; background:#ff6b35; display:flex; align-items:center; justify-content:center;
  border: 2px solid rgba(10,10,16,0.85); box-shadow: inset 0 0 10px rgba(0,0,0,0.35); }
.hpAvatar span{ font-weight:900; font-size: 20px; color: rgba(0,0,0,0.55); }

.hudBars{ display:flex; flex-direction:column; gap: 8px; min-width: 176px; }
.hpBarTrack{ position:relative; height: 23px; border-radius: 11px; overflow:hidden;
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.45));
  border: 2px solid rgba(0,0,0,0.55); box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.15); }
.hpBarFill{ position:relative; height:100%; width:100%; border-radius: 8px;
  background: linear-gradient(180deg, #7deda8 0%, #4ade80 45%, #22a355 100%);
  transition: width 0.12s linear; }
.hpBarTrack.dmg .hpBarFill{ animation: hpHitFlash 0.3s ease-out; }
@keyframes hpHitFlash{ 0%{ filter: brightness(2.6) saturate(0.3); } 100%{ filter:none; } }
.hpBarTrack.low .hpBarFill{ animation: lowHpFill 0.7s ease-in-out infinite; }
@keyframes lowHpFill{ 0%,100%{ filter: brightness(1); } 50%{ filter: brightness(1.7); } }
/* segment notches + glass gloss over the fill */
.hpBarSegs{ position:absolute; inset:0; pointer-events:none;
  background: repeating-linear-gradient(90deg, transparent 0 23px, rgba(0,0,0,0.28) 23px 25px); }
.hpBarGloss{ position:absolute; left:2px; right:2px; top:2px; height: 42%; border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.05)); pointer-events:none; }
.hpBarText{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family: var(--hud-font); font-weight: 400; font-size: 12.5px; color:#fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.9), 0 0 4px rgba(0,0,0,0.6); letter-spacing: 0.8px; }

.ammoPips{ display:flex; gap: 6px; padding: 0 3px; }
.ammoPip{ position:relative; flex:1; height: 15px; border-radius: 4px; overflow:hidden;
  transform: skewX(-14deg);
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.45));
  border: 2px solid rgba(0,0,0,0.55); box-shadow: inset 0 2px 3px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.14); }
.ammoPipFill{ height:100%; width:0%; background: linear-gradient(180deg, #ffe89a 0%, #ffc22e 50%, #ff8c1a 100%);
  transition: width 0.1s linear; }
.ammoPip.filled{ border-color: rgba(120,70,0,0.7); }
.ammoPip.filled .ammoPipFill{ box-shadow: 0 0 10px rgba(255,190,60,0.85); }
.ammoPip.filled::after{ content:''; position:absolute; left:2px; right:2px; top:1px; height:45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), transparent); border-radius: 3px; }
.ammoPip.pop{ animation: ammoPop 0.35s cubic-bezier(0.2, 1.9, 0.4, 1); }
@keyframes ammoPop{ 0%{ transform: skewX(-14deg) scale(1.45); filter: brightness(2); }
  100%{ transform: skewX(-14deg) scale(1); filter:none; } }

.hudInfoRow{ display:flex; gap: 6px; }
.hudPill{ display:inline-flex; align-items:center; gap: 5px; background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 10px; padding: 2px 10px;
  font-family: var(--hud-font); font-weight: 400; font-size: 12px; letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.7); }
.hudPill.gems{ color: #3ddc55; }
.hudPill.gems svg{ width: 13px; height: 13px; }
.hudPill.kills{ color: #ffb0b8; }
.hudPill .ic{ width: 13px; height: 13px; }
.hudPill.pop{ animation: pillPop 0.4s cubic-bezier(0.2, 1.9, 0.4, 1); }
@keyframes pillPop{ 0%{ transform: scale(1.5); filter: brightness(2); } 100%{ transform: scale(1); filter:none; } }
@keyframes superPulse{ 0%,100%{ filter: drop-shadow(0 0 4px rgba(255,209,102,0.5)); } 50%{ filter: drop-shadow(0 0 12px rgba(255,209,102,0.95)); } }

/* ---- respawn: dark iris + spinning rays + big pop-per-second countdown ---- */
.respawnOverlay{ display:none; position:absolute; inset:0; align-items:center; justify-content:flex-start; flex-direction:column;
  padding-top: calc(11 * var(--uvh, 1vh)); gap: 10px; overflow:hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(0,0,0,0.15), rgba(0,0,0,0.5)); }
.respawnRays{ position:absolute; left:50%; top: calc(17 * var(--uvh, 1vh)); width: 340px; height: 340px; margin-left:-170px; margin-top:-170px;
  background: repeating-conic-gradient(rgba(255,255,255,0.07) 0 9deg, transparent 9deg 22deg);
  -webkit-mask-image: radial-gradient(circle, black 20%, transparent 65%);
  mask-image: radial-gradient(circle, black 20%, transparent 65%);
  border-radius:50%; animation: burstSpin 10s linear infinite; }
.respawnLabel{ position:relative; font-family: var(--hud-font); font-weight:400; font-size: 21px;
  letter-spacing: 3px; text-shadow: 0 3px 0 rgba(0,0,0,0.6); }
.respawnTimer{ position:relative; font-family: var(--hud-font); font-weight:400; font-size: 84px; line-height:1;
  color: #ffd24a; -webkit-text-stroke: 3px #3a2404;
  text-shadow: 0 6px 0 rgba(0,0,0,0.45), 0 0 30px rgba(255,209,102,0.5); }
.respawnTimer.tick{ animation: respawnTick 0.45s cubic-bezier(0.2, 1.7, 0.4, 1); }
@keyframes respawnTick{ 0%{ transform: scale(1.7); opacity: 0.4; } 100%{ transform: scale(1); opacity: 1; } }

/* ---- touch controls (floating joystick sticks) ---- */
.joyZone{ display:none; position:fixed; bottom: max(28px, env(safe-area-inset-bottom)); width: 150px; height: 150px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,0.04) 55%, rgba(255,255,255,0.1));
  border: 2px solid rgba(255,255,255,0.18); z-index: 15; pointer-events:none; }
.joyZone.left{ left: 28px; }
.joyZone.right{ right: 28px; }
/* Virtual sticks are touch-only. Desktop uses keyboard + locked/absolute mouse. */
body:not(.touch) .joyZone{ display:none !important; }
/* touch: dock the move stick ABOVE the HP panel (both live bottom-left) */
body.touch .joyZone.left{ bottom: 140px; }
.joyZone.grabbed{ border-color: rgba(255,255,255,0.35); background: radial-gradient(circle, rgba(255,255,255,0.07) 55%, rgba(255,255,255,0.16)); }
.joyStick{ position:absolute; left:50%; top:50%; width:64px; height:64px; margin:-32px 0 0 -32px;
  border-radius:50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.6), rgba(255,255,255,0.28) 70%);
  border: 2px solid rgba(255,255,255,0.45); box-shadow: 0 4px 10px rgba(0,0,0,0.35);
  transition: transform 0.02s linear; }
.joyZone.right .joyStick{ background: radial-gradient(circle at 35% 30%, rgba(255,120,110,0.75), rgba(255,80,80,0.35) 70%);
  border-color: rgba(255,140,130,0.6); }
.superBtnTouch.aiming{ transform: scale(1.12); }

.onboardingGuide,
.pointerLockHint{ position:absolute; left:50%; z-index:16; transform:translateX(-50%); pointer-events:none;
  color:#fff; text-align:center; font-family:var(--hud-font); font-weight:400; letter-spacing:0.5px;
  background:rgba(8,10,20,0.78); border:2px solid rgba(255,255,255,0.2);
  box-shadow:0 6px 18px rgba(0,0,0,0.45); backdrop-filter:blur(6px); }
.onboardingGuide{ top:18%; max-width:min(86vw, 480px); padding:10px 18px; border-radius:14px;
  color:var(--accent-gold); font-size:clamp(14px, 2.2vw, 21px); }
.pointerLockHint{ bottom:max(16px, env(safe-area-inset-bottom)); padding:6px 12px; border-radius:10px;
  font-family:-apple-system, 'Segoe UI', sans-serif; font-size:11px; opacity:0.78; }
body.mouseLocked .pointerLockHint,
body.touch .pointerLockHint{ display:none !important; }

/* ---- battle pass tier-skip row (under the reward track) ---- */
.bpBuyRow{ display:flex; align-items:center; justify-content:center; gap: 12px; margin-top: 12px; }
.bpBuyLabel{ font-size: 13px; font-weight: 800; letter-spacing: 0.6px; opacity: 0.75; text-transform: uppercase; }
.bpBuyBtn{ padding: 10px 18px; font-size: 13px; }
.bpBuyBtn .ic{ width: 15px; height: 15px; vertical-align: -2px; }

/* ---- brawler rank shield (tier badge next to trophy counts) ---- */
.rankBadge{ display:inline-flex; align-items:center; justify-content:center;
  margin-left: 6px; vertical-align: middle;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.45)); }
.rankBadge svg{ width: 26px; height: 25px; display:block; overflow:visible; flex: 0 0 auto; }
.rankBadge.big svg{ width: 42px; height: 40px; }
/* top tiers glow in their own color */
.rankBadge.tier-6{ filter: drop-shadow(0 0 5px rgba(255,120,30,0.7)); }
.rankBadge.tier-7{ filter: drop-shadow(0 0 5px rgba(180,110,255,0.7)); }
.rankBadge.ultimate{ animation: rankUltimate 3s linear infinite;
  filter: drop-shadow(0 0 7px rgba(255,210,74,0.9)); }
@keyframes rankUltimate{
  0%{ filter: drop-shadow(0 0 7px rgba(255,210,74,0.9)) hue-rotate(0deg); }
  50%{ filter: drop-shadow(0 0 11px rgba(255,120,220,0.95)) hue-rotate(150deg); }
  100%{ filter: drop-shadow(0 0 7px rgba(255,210,74,0.9)) hue-rotate(360deg); }
}
.detailBadge .rankBadge{ margin: 0 4px 0 0; }
.showcaseTrophyTop .rankBadge{ margin-left: 8px; }
/* The trophy/power artwork used to disappear from these pills entirely, which
   is most of why the stat row read as unreadably small. `.ic svg` is sized
   `width:100%`, and a percentage is CYCLIC here: the pill is a grid item whose
   width comes from the track, so `.ic`'s own width is indefinite during
   intrinsic sizing and Chrome falls back to a ~1px sliver. `em` resolves
   against font-size, which is always definite — and UI._fitDynamicText scales
   the font, so the icons still track the text when a card gets tight. */
.versusMeta .ic,
.versusMeta .ic svg{ width: 1.15em; height: 1.15em; }
.versusMeta .rankBadge{ margin: 0 2px 0 0; flex-shrink: 0; }
/* em-sized, not px: the stat row shrinks its own font to fit a narrow card
   (see UI._fitDynamicText) and a fixed-px badge would then tower over the
   digits next to it. */
.versusMeta .rankBadge svg{ width: 1.45em; height: 1.38em; }

/* ---- rank progress (result tally) ---- */
.rankProgressTrack{ width: 110px; height: 7px; border-radius: 5px; overflow:hidden;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.16); }
.rankProgressTrack.big{ width: 190px; height: 11px; }
.rankProgressFill{ height:100%; width:0%; border-radius: 5px;
  background: linear-gradient(90deg, #ffd24a, #ff8c1a); transition: width 0.1s linear; }
.rankNextLabel{ font-size: 10px; font-weight: 700; opacity: 0.65; letter-spacing: 0.3px; }

/* ---- match-end trophy tally ---- */
.trophyAnim{ position:relative; display:flex; align-items:center; justify-content:center;
  gap: 16px; margin: 10px auto 4px; padding: 12px 22px; border-radius: 16px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.14); width: fit-content; }
.trophyAnimBadge .rankBadge{ margin: 0; }
.trophyAnimBadge .rankBadge svg{ width: 58px; height: 55px; }
.trophyAnimBadge.pop{ animation: badgePop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes badgePop{ 0%{ transform: scale(0.6); } 55%{ transform: scale(1.35); } 100%{ transform: scale(1); } }
.trophyAnimRight{ display:flex; flex-direction:column; gap: 6px; align-items:flex-start; min-width: 190px; }
.trophyAnimRow{ display:flex; align-items:center; gap: 9px; font-size: 28px; font-weight: 900; }
.trophyAnimRow .ic{ width: 26px; height: 26px; }
.trophyAnimDelta{ font-size: 17px; font-weight: 900; padding: 2px 11px; border-radius: 11px;
  opacity: 0; transform: scale(0); }
.trophyAnimDelta.show{ animation: deltaPop 0.5s cubic-bezier(0.2, 1.7, 0.4, 1) forwards; }
@keyframes deltaPop{ from{ opacity: 0; transform: scale(0) rotate(-15deg); } to{ opacity: 1; transform: scale(1) rotate(0deg); } }
.trophyAnimDelta.pos{ background: rgba(38,140,60,0.85); color: #b8ffc2; box-shadow: 0 0 12px rgba(90,255,106,0.35); }
.trophyAnimDelta.neg{ background: rgba(150,35,45,0.85); color: #ffc2c6; }
.rankUpFlash{ position:absolute; top: -30px; left: 50%; opacity: 0; z-index: 2;
  transform: translateX(-50%) scale(0); font-size: 24px; font-weight: 900; font-style: italic;
  letter-spacing: 2px; color: var(--accent-gold, #ffd24a);
  text-shadow: 0 3px 0 rgba(0,0,0,0.55), 0 0 18px rgba(255,210,74,0.8); }
.rankUpFlash.show{ animation: rankUpPop 1.6s ease forwards; }
@keyframes rankUpPop{
  0%{ opacity: 0; transform: translateX(-50%) scale(0); }
  20%{ opacity: 1; transform: translateX(-50%) scale(1.35) rotate(-3deg); }
  38%{ transform: translateX(-50%) scale(1) rotate(0deg); }
  78%{ opacity: 1; }
  100%{ opacity: 0; transform: translateX(-50%) scale(1) translateY(-14px); }
}

/* ---- keybind settings ---- */
.bindBlock{ margin-top: 18px; }
/* keybinds are meaningless on touch devices — there's no keyboard to rebind */
body.touch .bindBlock{ display:none; }
.bindHint{ font-size: 12px; opacity: 0.65; margin: 4px 0 12px; }
.bindList{ display:flex; flex-direction:column; gap: 8px; max-width: 360px; margin: 0 auto 14px; }
.bindRow{ display:flex; align-items:center; justify-content:space-between; gap: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 8px 12px; }
.bindLabel{ font-weight: 800; font-size: 13px; letter-spacing: 0.5px; }
.bindKeyBtn{ min-width: 92px; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  font: 800 13px Poppins, sans-serif; letter-spacing: 1px; color: #fff;
  background: rgba(0,0,0,0.45); border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 3px 0 rgba(0,0,0,0.4); }
.bindKeyBtn:hover{ border-color: var(--accent-gold, #ffd24a); }
.bindKeyBtn.listening{ border-color: var(--accent-gold, #ffd24a); color: var(--accent-gold, #ffd24a);
  animation: superPulse 0.9s ease-in-out infinite; }
/* ---- super button: charge ring + spinning rays + burst flash when it fills ---- */
.superBtnTouch{ display:none; position:fixed; right: max(30px, env(safe-area-inset-right)); bottom: 44px;
  width: 82px; height: 82px; border-radius:50%; cursor:pointer;
  align-items:center; justify-content:center; color: rgba(255,255,255,0.65);
  z-index:15; user-select:none; }
.superBtnTouch > *{ pointer-events:none; }
.superRays{ position:absolute; inset:-30px; border-radius:50%; opacity:0; transition: opacity 0.3s;
  background: repeating-conic-gradient(rgba(255,210,74,0.55) 0 10deg, transparent 10deg 24deg);
  -webkit-mask-image: radial-gradient(circle, black 32%, transparent 68%);
  mask-image: radial-gradient(circle, black 32%, transparent 68%);
  animation: burstSpin 7s linear infinite; }
.superFillRing{ position:absolute; inset:0; border-radius:50%;
  background: conic-gradient(#ffd24a 0deg, rgba(255,255,255,0.12) 0deg);
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 5px 0 rgba(0,0,0,0.4), 0 10px 22px rgba(0,0,0,0.35); }
.superCore{ position:absolute; inset:7px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  font-size: 30px; background: linear-gradient(180deg, #3c3c50, #1d1d2a);
  border: 2px solid rgba(0,0,0,0.5); box-shadow: inset 0 2px 0 rgba(255,255,255,0.14), inset 0 -4px 8px rgba(0,0,0,0.4);
  transition: background 0.2s, color 0.2s; }
.superBurst{ position:absolute; inset:0; border-radius:50%; opacity:0;
  border: 4px solid #ffe9a3; box-shadow: 0 0 30px rgba(255,209,102,0.9); }
.superBtnTouch.ready{ color:#4a2600; animation: superBob 1.1s ease-in-out infinite; }
.superBtnTouch.ready .superRays{ opacity:1; }
.superBtnTouch.ready .superFillRing{ background: linear-gradient(180deg, #ffe9a3, #ffb01f) !important;
  border-color: #fff3c4; box-shadow: 0 5px 0 #a83c10, 0 0 28px rgba(255,209,102,0.6); }
.superBtnTouch.ready .superCore{ background: linear-gradient(180deg, #ffe27a 0%, #ffb01f 55%, #ff8c1a 100%);
  border-color: #8a4a00; box-shadow: inset 0 2px 0 rgba(255,255,255,0.5), inset 0 -4px 8px rgba(180,80,0,0.4); }
@keyframes superBob{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.07); } }
.superBtnTouch.burst .superBurst{ animation: superBurstAnim 0.55s ease-out; }
@keyframes superBurstAnim{ 0%{ opacity:1; transform: scale(0.7); } 100%{ opacity:0; transform: scale(2.1); } }
body.touch .superBtnTouch{ bottom: 172px; right: 40px; }

/* ---- quick-match (stranger matchmaking) overlay ---- */
.mmOverlay{ display:none; position:fixed; inset:0; z-index:40; align-items:center; justify-content:center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(5,5,12,0.82); }
.mmOverlay.active{ display:flex; }
/* invite-link join: same spinner as matchmaking, but opaque, because it sits
   over the hub while the squad's slots are still being filled in behind it */
.joinOverlay{ z-index: 46; background: rgba(6,8,16,0.9); }
.mmBox{ width:min(88vw, 320px); max-height:calc(92 * var(--uvh, 1vh)); display:flex; flex-direction:column; align-items:center; gap: 10px; padding: 24px 30px 22px;
  background: linear-gradient(180deg, #23233a, #12121e); border: 2px solid var(--panel-border);
  border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.6), inset 0 2px 0 rgba(255,255,255,0.08); text-align:center; }
.mmSearchRing{ position:relative; width: 54px; height: 54px; border-radius:50%;
  background: radial-gradient(circle, rgba(255,210,74,0.22) 0 20%, rgba(87,176,255,0.08) 21% 100%);
  border: 3px solid rgba(255,255,255,0.14); box-shadow: inset 0 0 16px rgba(87,176,255,0.18), 0 0 16px rgba(255,210,74,0.16); }
.mmSearchRing::before{ content:''; position:absolute; inset:-3px; border-radius:50%;
  border:3px solid transparent; border-top-color:var(--accent-gold); border-right-color:rgba(255,210,74,0.45);
  animation:mmSpin 1.1s linear infinite; }
.mmSearchRing span{ position:absolute; left:50%; top:50%; width:8px; height:8px; margin:-4px 0 0 -4px;
  border-radius:50%; background:#3ddc55; box-shadow:0 0 10px rgba(61,220,85,0.75); animation:mmPulse 1.2s ease-in-out infinite; }
@keyframes mmSpin{ to{ transform: rotate(360deg); } }
@keyframes mmPulse{ 50%{ transform:scale(1.35); opacity:0.62; } }
.mmText{ font-weight: 900; font-size: 18px; letter-spacing: 0.5px; color:#fff; text-shadow:0 2px 0 rgba(0,0,0,0.35); }
.mmSupport{ min-height:18px; font-size: 12px; font-weight: 800; color:var(--text-dim); }
.mmCountdown{ margin:2px 0 4px; padding: 7px 14px; border-radius: 11px;
  background: rgba(0,0,0,0.24); border:1px solid rgba(255,255,255,0.08);
  font-size:13px; font-weight:900; color:var(--accent-gold); }
.mmBox #mmCancel{ align-self:center; min-width: 150px; }

/* ================= Versus / match loading ================= */
.versusScreen{ display:none; position:fixed; inset:0; z-index:28; flex-direction:column;
  align-items:center; justify-content:center; gap: 22px; overflow:hidden;
  background: #0b0b12; opacity:1; transition: opacity 0.4s ease; }
.versusScreen.fadeOut{ opacity:0; pointer-events:none; }

/* diagonal split: blue left / red right, with animated stripes + gold seam */
.versusBg{ position:absolute; inset:-2%; pointer-events:none; }
.versusBg.blue{ clip-path: polygon(0 0, 60% 0, 44% 100%, 0 100%);
  background: linear-gradient(160deg, #1c4f96, #123058 70%);
}
.versusBg.red{ clip-path: polygon(60% 0, 100% 0, 100% 100%, 44% 100%);
  background: linear-gradient(200deg, #a02440, #5c1426 70%);
}
.versusBg::after{ content:''; position:absolute; inset:0;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 26px, transparent 26px 62px);
  animation: stripeDrift 5s linear infinite; }
@keyframes stripeDrift{ from{ background-position: 0 0; } to{ background-position: 124px 0; } }
.versusSeam{ position:absolute; top:-10%; bottom:-10%; left:50%; width: 10px; pointer-events:none;
  background: linear-gradient(180deg, #ffd24a, #f0932a);
  transform: translateX(-50%) rotate(8deg); transform-origin: center;
  box-shadow: 0 0 26px rgba(255,210,74,0.55); }

.versusRibbon{ position:relative; z-index:1; display:flex; align-items:center; gap: 12px;
  background: linear-gradient(180deg, #23232e, #17171f); border: 2px solid rgba(255,210,74,0.5);
  border-radius: 14px; padding: 10px 26px; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.versusRibbon .modeIcon{ font-size: 26px; }
.versusRibbon .modeIcon svg{ width: 30px; height: 30px; }
.versusModeName{ font-size: 24px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5); line-height: 1.1; }
.versusMapName{ font-size: 12px; color: var(--accent-gold); font-weight: 700; }

.versusBody{ position:relative; z-index:1; display:flex; align-items:center; gap: 22px; }
.versusTeam{ display:flex; gap: 14px; }
.versusTeam.ffa{ display:grid; grid-template-columns: repeat(4, 1fr); }
/* Card size drives the whole roster row. It grew ~13% over the original 140px
   so the trophy/power stat pills below the name can be read at a glance on a
   1080p or fullscreen screen — the cards still flex-shrink (min-width:0
   below) when the logical viewport is too narrow for six of them. */
.versusCard{ position:relative; width: 158px; border-radius: 16px; padding: 13px 10px 12px; text-align:center;
  background: linear-gradient(180deg, #23232e, #15151d);
  border: 3px solid var(--panel-border); box-shadow: 0 10px 24px rgba(0,0,0,0.45); }
.versusTeam.blue .versusCard{ border-color: #3aa0ff; }
.versusTeam.red .versusCard{ border-color: #ff4d5e; }
.versusCard.you{ border-color: var(--accent-gold); box-shadow: 0 0 26px rgba(255,209,102,0.4); }
.versusCard.fromLeft{ animation: slideL 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) backwards; }
.versusCard.fromRight{ animation: slideR 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) backwards; }
.versusCard:nth-child(1){ animation-delay: 0.05s; } .versusCard:nth-child(2){ animation-delay: 0.14s; }
.versusCard:nth-child(3){ animation-delay: 0.23s; } .versusCard:nth-child(4){ animation-delay: 0.32s; }
@keyframes slideL{ from{ opacity:0; transform: translateX(-110px) scale(0.85); } to{ opacity:1; transform:none; } }
@keyframes slideR{ from{ opacity:0; transform: translateX(110px) scale(0.85); } to{ opacity:1; transform:none; } }
.versusYouBadge{ position:absolute; top:-12px; left:50%; transform:translateX(-50%); z-index:2;
  background: linear-gradient(180deg, #ffd24a, #f0932a); color:#3a2404; font-size: 10px; font-weight:900;
  padding: 3px 10px; border-radius: 10px; letter-spacing: 1px; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
/* max-width/aspect-ratio, not a fixed height: the cards are flex items that
   shrink when six of them will not fit the logical viewport, and a fixed-size
   portrait then hangs out over the card border. */
.versusThumb{ width: 116px; max-width: 100%; height: auto; aspect-ratio: 1 / 1;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.55)); }
.versusPlayer{ font-size: 15px; font-weight: 900; min-width:0; overflow-wrap:anywhere; }
.versusChar{ font-size: 11px; color: var(--text-dim); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.versusMeta{ display:flex; justify-content:center; gap: 8px; margin-top: 8px; font-size: 13px; font-weight: 800;
  color: var(--accent-gold); }
.versusMeta span{ background: rgba(0,0,0,0.35); padding: 3px 7px; border-radius: 9px; }

.versusVsWrap{ position:relative; width: 110px; height: 110px; display:flex; align-items:center; justify-content:center;
  animation: vsPop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) 0.35s backwards; }
.versusBurst{ position:absolute; inset:0; border-radius:50%;
  background: repeating-conic-gradient(rgba(255,210,74,0.35) 0 11deg, transparent 11deg 24deg);
  -webkit-mask-image: radial-gradient(circle, black 30%, transparent 68%);
  mask-image: radial-gradient(circle, black 30%, transparent 68%);
  animation: burstSpin 9s linear infinite; }
@keyframes burstSpin{ to{ transform: rotate(360deg); } }
@keyframes vsPop{ from{ opacity:0; transform: scale(0.2) rotate(-16deg); } to{ opacity:1; transform:none; } }
.versusVs{ position:relative; font-size: 52px; font-weight: 900; font-style: italic; color: #ffd24a;
  -webkit-text-stroke: 2px #3a2404;
  text-shadow: 0 5px 0 rgba(0,0,0,0.45), 0 0 34px rgba(255,209,102,0.55); }

.versusHint{ position:relative; z-index:1; font-size: 40px; font-weight:900; color:#fff; min-height: 48px;
  text-shadow: 0 4px 0 rgba(0,0,0,0.5); }
.versusHint.pop{ animation: countPop 0.4s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes countPop{ from{ transform: scale(1.9); opacity: 0.2; } to{ transform: scale(1); opacity: 1; } }

/* GO! flash over the arena right as control unlocks */
.goFlash{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; }
.goFlash::before{ content:''; position:absolute; width: 460px; height: 460px; border-radius:50%;
  background: repeating-conic-gradient(rgba(255,210,74,0.3) 0 11deg, transparent 11deg 26deg);
  -webkit-mask-image: radial-gradient(circle, black 25%, transparent 66%);
  mask-image: radial-gradient(circle, black 25%, transparent 66%);
  animation: burstSpin 6s linear infinite; }
.goText{ position:relative; font-family: var(--hud-font, 'Lilita One', sans-serif); font-weight: 400;
  font-style: italic; font-size: 110px; letter-spacing: 2px;
  background: linear-gradient(180deg, #fff3c4 15%, #ffd24a 48%, #ff8c1a 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px #3a2404;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,0.35)) drop-shadow(0 0 26px rgba(255,209,102,0.6)); }
.goFlash.show{ animation: goPop 0.9s cubic-bezier(0.2, 1.5, 0.4, 1) forwards; }
@keyframes goPop{ 0%{ opacity:0; transform: scale(0.3) rotate(-6deg);} 25%{ opacity:1; transform: scale(1.15) rotate(1.5deg);}
  60%{ opacity:1; transform: scale(1) rotate(0deg);} 100%{ opacity:0; transform: scale(1.4);} }

/* Two teams of three at full card size need ~1160 logical px on one line.
   Below that, stack the teams instead of letting flex squeeze the cards (and
   with them the stat row) down to an unreadable size. The threshold tracks
   .versusCard's width — bump both together. */
@media (max-width: 1180px){
  .versusBody{ flex-direction:column; gap: 10px; }
  .versusVsWrap{ width: 70px; height: 70px; }
  .versusVs{ font-size: 34px; }
  .versusCard{ width: 126px; } .versusThumb{ width: 88px; }
  .versusHint{ font-size: 28px; min-height: 34px; }
}

/* ================= Result ================= */
.resultScreen{ z-index: 30; overflow:hidden; }
.resultScreen.win{ background: radial-gradient(ellipse at 50% 30%, #4a3a10, #14100a 70%); }
.resultScreen.lose{ background: radial-gradient(ellipse at 50% 30%, #3a1420, #120a0e 70%); }
.resultWrap{ position:relative; display:flex; flex-direction:column; align-items:center; gap: 14px; text-align:center; }
.resultBurst{ position:absolute; left:50%; top: 130px; width: 900px; height: 900px;
  margin: -450px 0 0 -450px; pointer-events:none;
  background: repeating-conic-gradient(rgba(255,210,74,0.12) 0 10deg, transparent 10deg 22deg);
  -webkit-mask-image: radial-gradient(circle, black 0%, transparent 60%);
  mask-image: radial-gradient(circle, black 0%, transparent 60%);
  animation: burstSpin 14s linear infinite; }
.resultScreen.lose .resultBurst{ background: repeating-conic-gradient(rgba(255,77,94,0.08) 0 10deg, transparent 10deg 22deg); }
.resultConfetti{ position:fixed; inset:0; pointer-events:none; overflow:hidden; }
.confetti{ position:absolute; top:-16px; width: 10px; height: 14px; border-radius: 2px; opacity: 0.9;
  animation: confettiFall linear infinite; }
@keyframes confettiFall{
  0%{ transform: translateY(-20px) rotate(0deg); }
  100%{ transform: translateY(calc(105 * var(--uvh, 1vh))) rotate(540deg); }
}
.resultTitle{ position:relative; font-size: 62px; font-weight: 900; font-style: italic; margin: 0; letter-spacing: 2px;
  animation: vsPop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); }
.resultTitle.win{ color: var(--accent-gold); -webkit-text-stroke: 2px #5a3a00;
  text-shadow: 0 6px 0 rgba(0,0,0,0.4), 0 0 44px rgba(255,209,102,0.55); }
.resultTitle.lose{ color: var(--red); -webkit-text-stroke: 2px #4a0a14;
  text-shadow: 0 6px 0 rgba(0,0,0,0.4); }
.resultChar{ position:relative; width: 190px; height: 190px;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.55));
  animation: versusPopIn 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) 0.1s backwards; }
.resultScreen.lose .resultChar{ filter: grayscale(0.7) drop-shadow(0 12px 22px rgba(0,0,0,0.55)); }
@keyframes versusPopIn{ from{ opacity:0; transform: scale(0.5) translateY(30px); } to{ opacity:1; transform:none; } }
.resultStats{ position:relative; display:flex; gap: 10px; justify-content:center; }
.resultStatPill{ background: rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.14); border-radius: 14px;
  padding: 8px 16px; font-size: 13px; font-weight: 700; color: var(--text); }
.resultStatPill b{ font-size: 15px; }
.resultRewards{ position:relative; display:flex; gap: 10px; justify-content:center; }
.rewardPill{ background: rgba(255,209,102,0.12); border: 2px solid rgba(255,209,102,0.4); color: var(--accent-gold);
  font-weight: 900; font-size: 14px; padding: 8px 18px; border-radius: 14px;
  animation: versusPopIn 0.4s ease 0.25s backwards; }
.resultBtns{ position:relative; display:flex; flex-direction:column; gap: 12px; align-items:center; margin-top: 8px; }
/* optional 2x coins: sits between the payout pills and MAIN MENU */
.resultDouble{ position:relative; display:flex; justify-content:center; }
.resultDouble:empty{ display:none; }
.resultDoubleBtn{ display:inline-flex; align-items:center; gap: 8px; width:auto; padding: 9px 16px;
  font-size: 14px; animation: versusPopIn 0.4s ease 0.45s backwards, doubleGlow 1.6s ease-in-out 1s infinite; }
.resultDoubleWhat{ display:inline-flex; align-items:center; gap: 4px; font-weight: 900; white-space: nowrap; }
.resultDoubled{ border-color: rgba(61,220,85,0.7); color: #7dff8f; background: rgba(61,220,85,0.14); }
.rewardPill.pop{ animation: coinPillPop 0.55s cubic-bezier(.2,1.6,.4,1); }
@keyframes coinPillPop{ 0%{ transform: scale(1); } 40%{ transform: scale(1.35); } 100%{ transform: scale(1); } }
@keyframes doubleGlow{ 0%,100%{ box-shadow: 0 0 0 rgba(255,209,102,0); } 50%{ box-shadow: 0 0 18px rgba(255,209,102,0.65); } }

@keyframes fadeIn{ from{ opacity:0; transform: translateX(10px);} to{ opacity:1; transform:none; } }

/* ================= HUB (main menu) ================= */
.hubScreen{ padding: 0; background: none; }
.hub{
  position: relative;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
  /* translucent cinematic grade — the live 3D arena idles behind the menu
     (slow orbit camera), this just tints it dusky and keeps the UI readable */
  background:
    radial-gradient(ellipse 90% 60% at 12% -10%, rgba(131,56,236,0.30), transparent 60%),
    radial-gradient(ellipse 110% 55% at 50% 114%, rgba(35,195,255,0.20), transparent 62%),
    linear-gradient(180deg, rgba(16,10,46,0.52) 0%, rgba(22,32,92,0.22) 40%, rgba(10,18,56,0.38) 100%);
}

.hubBg2{ position:absolute; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
@keyframes glowBreathe{ 0%,100%{ opacity:1; } 50%{ opacity:0.72; } }

.hubGround{ position:absolute; left:-10%; right:-10%; bottom:-140px; height: 340px;
  background: radial-gradient(ellipse at 50% 30%, rgba(124,247,255,0.14), transparent 60%),
              linear-gradient(180deg, rgba(8,10,38,0), rgba(8,10,38,0.8) 55%); }
.hubVignette{ position:absolute; inset:0;
  background: radial-gradient(ellipse at 50% 45%, transparent 56%, rgba(7,5,24,0.5) 100%); }

.hubSparks{ position:absolute; inset:0; overflow:hidden; }
.spark{ position:absolute; width:3px; height:3px; border-radius:50%; background: var(--accent-gold);
  filter: drop-shadow(0 0 5px currentColor); animation: sparkFloat linear infinite; }
.spark.cyan{ background: var(--accent-cyan); color: var(--accent-cyan); }
.spark.white{ background: #fff; color: #fff; }
.spark{ color: var(--accent-gold); }
@keyframes sparkFloat{
  0%{ transform: translateY(0) scale(1); opacity:0; }
  10%{ opacity:0.85; }
  90%{ opacity:0.4; }
  100%{ transform: translateY(-240px) scale(0.4); opacity:0; }
}

/* ---- top bar: player badge + currencies ---- */
/* z-index 3: the currency tooltips must paint OVER the hub body (same z
   would let the later-in-DOM sidebar/showcase cover them) */
.hubTopBar{ position: relative; z-index: 3; display:flex; justify-content:space-between; align-items:center;
  padding: max(14px, env(safe-area-inset-top)) 18px 0;
  animation: hudDropIn 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
/* bright glossy blue profile plate with gold trim */
.playerBadge{ position:relative; display:flex; align-items:center; gap: 11px; overflow:hidden;
  background: linear-gradient(180deg, #72c8ff 0%, #3d9bf0 48%, #1e63c8 100%);
  border: 3px solid #0d3f86; border-radius: 18px; padding: 7px 18px 7px 8px;
  box-shadow: 0 5px 0 #0a2b5e, 0 10px 22px rgba(0,0,0,0.35); }
/* glass cap on the top half */
.playerBadge::before{ content:''; position:absolute; left: 6px; right: 6px; top: 3px; height: 42%;
  border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.06));
  pointer-events:none; }
/* shine sweeping across the badge every few seconds */
.playerBadge::after{ content:''; position:absolute; top:-30%; bottom:-30%; left:-45%; width:30%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: skewX(-20deg); animation: bannerShine 6s ease-in-out infinite; pointer-events:none; }
.rankRing{ position:relative; z-index:1; width: 48px; height: 48px; border-radius: 14px;
  border: 3px solid var(--accent-gold); display:flex;
  align-items:center; justify-content:center; flex-shrink:0; color:#fff;
  font-family: var(--hud-font); font-weight: 400; font-size: 20px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.55);
  background: radial-gradient(circle at 35% 28%, #2d5da8, #132a58); }
.playerInfo{ position:relative; z-index:1; text-align:left; min-width: 0; }
.playerNameRow{ display:flex; align-items:center; gap: 7px; }
.playerName{ font-family: var(--hud-font); font-weight: 400; font-size: 20px; line-height: 1.1;
  letter-spacing: 0.6px; font-style: italic;
  background: linear-gradient(180deg, #ffffff 35%, #d8ecff 70%, #a8d4ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(13,63,134,0.9));
  white-space:nowrap; max-width: 170px; overflow-wrap:anywhere; }
/* trophy counter riding inside the badge, next to the name */
.badgeTrophies{ position:relative; z-index:1; display:flex; align-items:center; gap: 6px;
  margin-left: 6px; padding: 5px 13px 5px 9px; border-radius: 13px;
  background: linear-gradient(180deg, rgba(9,32,74,0.72), rgba(9,32,74,0.55));
  border: 2px solid rgba(255,209,102,0.55);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.4), 0 0 12px rgba(255,209,102,0.25); }
.badgeTrophies .ic{ width: 20px; height: 20px; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.4)); }
.badgeTrophyCount{ font-family: var(--hud-font); font-size: 17px; line-height:1;
  color: #ffd24a; font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5), 0 0 12px rgba(255,210,74,0.4); }
.hubCurrencies{ display:flex; align-items:center; gap: 8px; }
/* hub currency pills: dark slab + colored icon badge + glowing number */
.currencyPillWrap{ position:relative; display:flex; }
.currencyPill{ display:flex; align-items:center; gap: 8px;
  background: linear-gradient(180deg, rgba(22,22,38,0.95), rgba(10,10,20,0.95));
  border: 2px solid rgba(255,255,255,0.16);
  border-radius: 22px; padding: 4px 16px 4px 5px; font-size: 17px; min-height: 40px;
  font-family: var(--hud-font); font-weight: 400; letter-spacing: 0.5px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 8px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1); }
.currencyPill .ic{ width: 30px; height: 30px; border-radius: 50%; padding: 6px; flex-shrink:0;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 5px rgba(0,0,0,0.4); }
.currencyPill.coinDisplay{ border-color: rgba(255,180,26,0.5); color: #ffd24a;
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 16px rgba(255,180,26,0.25), inset 0 1px 0 rgba(255,255,255,0.1); }
.currencyPill.coinDisplay .ic{ background: linear-gradient(180deg, #ffd24a, #d97a10); }
.currencyPill.gemDisplay{ border-color: rgba(61,220,85,0.5); color: #6ff08a;
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 16px rgba(61,220,85,0.25), inset 0 1px 0 rgba(255,255,255,0.1); }
.currencyPill.gemDisplay .ic{ background: linear-gradient(180deg, #4ee06a, #1a8a38); }
.gemDisplay{ color: #3ddc55; }
.headerCurrencies{ display:flex; gap: 8px; align-items:center; }
.headerCurrencies .coinDisplay, .headerCurrencies .gemDisplay{
  background: linear-gradient(180deg, #2a2a3e, #1c1c2c); border: 2px solid rgba(255,255,255,0.16);
  border-radius: 20px; padding: 6px 13px; font-size: 12px; font-weight: 800; }
.headerCurrencies .coinDisplay{ color: var(--accent-gold); border-color: rgba(255,209,102,0.4); }
.headerCurrencies .gemDisplay{ color: #3ddc55; border-color: rgba(61,220,85,0.4); }
.iconBtn{ background: linear-gradient(180deg, #2a2a3e, #1c1c2c); border: 2px solid rgba(255,255,255,0.16);
  color: var(--text); width: 38px; height: 38px; border-radius: 50%; cursor:pointer; font-size: 15px;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3); }
/* draws the eye to the How to Play icon on first launch — stays lit (see
   _pulseInfoBtn) until the player actually opens it, since nothing forces
   the tutorial open in front of them anymore (CrazyGames' 1-click-to-play
   rule). Gold glow + an outward "ping" ring — a stronger, harder-to-miss
   attention cue than the old plain blue box-shadow pulse. */
.iconBtn.pulseAttention{ position:relative; animation: infoPulseGlow 1.2s ease-in-out infinite; }
.iconBtn.pulseAttention::after{ content:''; position:absolute; inset:-6px; border-radius:50%;
  border: 2.5px solid var(--accent-gold); opacity:0; pointer-events:none;
  animation: infoPulseRing 1.2s ease-out infinite; }
@keyframes infoPulseGlow{ 0%,100%{ box-shadow: 0 3px 0 rgba(0,0,0,0.3), 0 0 0 rgba(255,209,102,0); transform: scale(1); }
  50%{ box-shadow: 0 3px 0 rgba(0,0,0,0.3), 0 0 22px 7px rgba(255,209,102,0.9); transform: scale(1.16); } }
@keyframes infoPulseRing{ 0%{ transform: scale(0.85); opacity: 0.9; } 100%{ transform: scale(1.7); opacity: 0; } }
/* hover explainer on the hub coin/gem pills */
.currencyTip{ position:absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-6px);
  width: 200px; padding: 10px 12px; border-radius: 12px; z-index: 20; pointer-events:none;
  background: linear-gradient(180deg, #23232e, #15151d); border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 10px 24px rgba(0,0,0,0.55); opacity: 0; transition: opacity 0.12s, transform 0.12s;
  text-align:left; font-size: 12px; line-height: 1.4; white-space: normal; }
.currencyTip::after{ content:''; position:absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
  border: 7px solid transparent; border-bottom-color: rgba(255,255,255,0.2); }
.currencyPillWrap:hover .currencyTip{ opacity: 1; transform: translateX(-50%) translateY(0); }
.currencyTip .tipTitle{ font-size: 11px; font-weight: 900; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--accent-gold); margin-bottom: 4px; }
.gemDisplay + .currencyTip .tipTitle{ color: #6ff08a; }
.currencyTip .tipDesc{ color: var(--text); font-weight: 600; margin-bottom: 6px; }
.currencyTip .tipHint{ color: var(--text-dim); font-weight: 700; font-size: 11px; }
.currencyTip .tipHint a{ color: #7cc9ff; }

/* ---- body: colorful sidebar tiles + character showcase + friend slots ---- */
.hubBody{ position: relative; z-index: 2; flex:1; display:flex; align-items:center; padding: 0 18px; gap: 10px; }
/* margin-top (not padding on the parent) guarantees a gap under the top bar
   even when the viewport is too short for hubBody's centering to leave any —
   without it the sidebar sits flush against the top bar (Shop tile touching
   the player badge) whenever hubBody shrinks down to the sidebar's own height */
.hubSidebar{ display:flex; flex-direction:column; gap: 13px; margin-top: 16px; }
.sideTile{ position:relative; display:flex; flex-direction:column; align-items:center; gap: 4px;
  width: 86px; padding: 13px 6px 11px; border-radius: 18px; cursor:pointer; color:#fff;
  font-family: var(--hud-font); font-weight: 400; font-size: 12px; letter-spacing: 0.5px;
  border: 2px solid rgba(255,255,255,0.35); overflow:hidden;
  box-shadow: 0 5px 0 rgba(0,0,0,0.35), 0 9px 18px rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255,0.35);
  text-shadow: 0 2px 0 rgba(0,0,0,0.35); transition: transform 0.15s, box-shadow 0.15s;
  animation: tileIn 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) backwards; }
.hubSidebar .sideTile:nth-child(1){ animation-delay: 0.05s; }
.hubSidebar .sideTile:nth-child(2){ animation-delay: 0.12s; }
.hubSidebar .sideTile:nth-child(3){ animation-delay: 0.19s; }
.hubSidebar .sideTile:nth-child(4){ animation-delay: 0.26s; }
.hubSidebar .sideTile:nth-child(5){ animation-delay: 0.33s; }
@keyframes tileIn{ from{ opacity:0; transform: translateX(-70px) scale(0.8); } to{ opacity:1; transform:none; } }
/* hover shine sweep across the tile */
.sideTile::after{ content:''; position:absolute; top:-30%; bottom:-30%; left:-60%; width:45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg); transition: left 0.45s ease; pointer-events:none; }
.sideTile:hover::after{ left: 135%; }
.sideTile:hover{ transform: translateY(-4px) scale(1.05) rotate(-1.5deg); }
.sideTile:active{ transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.sideTile.shop{ background: linear-gradient(180deg, #ff8fc2 0%, #f0509a 45%, #c22a6e 100%); }
.sideTile.shop:hover{ box-shadow: 0 7px 0 rgba(0,0,0,0.35), 0 0 26px rgba(255,122,184,0.6), inset 0 2px 0 rgba(255,255,255,0.35); }
.sideTile.brawlers{ background: linear-gradient(180deg, #ffb066 0%, #ff7d2a 45%, #d24e12 100%); }
.sideTile.brawlers:hover{ box-shadow: 0 7px 0 rgba(0,0,0,0.35), 0 0 26px rgba(255,158,74,0.6), inset 0 2px 0 rgba(255,255,255,0.35); }
.sideTile.pass{ background: linear-gradient(180deg, #ffe27a 0%, #ffc22e 45%, #e8891a 100%); color: #4a2c00; text-shadow: 0 1px 0 rgba(255,255,255,0.3); }
.sideTile.pass:hover{ box-shadow: 0 7px 0 rgba(0,0,0,0.35), 0 0 26px rgba(255,210,74,0.65), inset 0 2px 0 rgba(255,255,255,0.35); }
.sideTile.ranks{ background: linear-gradient(180deg, #7cc9ff 0%, #3d9bf0 45%, #1a5fc0 100%); }
.sideTile.ranks:hover{ box-shadow: 0 7px 0 rgba(0,0,0,0.35), 0 0 26px rgba(87,176,255,0.6), inset 0 2px 0 rgba(255,255,255,0.35); }
.sideTile.daily{ background: linear-gradient(180deg, #7cffb0 0%, #2ee88a 45%, #159a54 100%); }
.sideTile.daily:hover{ box-shadow: 0 7px 0 rgba(0,0,0,0.35), 0 0 26px rgba(61,220,85,0.6), inset 0 2px 0 rgba(255,255,255,0.35); }
.sideTile .sideIcon{ display:inline-flex; width: 30px; height: 30px; filter: drop-shadow(0 3px 3px rgba(0,0,0,0.35)); }
.sideTile .sideIcon svg{ width:100%; height:100%; }

.hubCenter{ position:relative; flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; }
/* symmetric grid: the fixed side columns keep the showcased character pinned
   dead-center whether the friend slots are empty (88px "+") or filled (244px
   live teammate) — a plain flex row re-centered and shoved it sideways */
.showcaseRow{ display:grid; grid-template-columns: minmax(244px, 1fr) auto minmax(244px, 1fr);
  align-items:center; justify-items:center; gap: 40px; }
#friendSlotL{ justify-self:end; }
#friendSlotR{ justify-self:start; }
/* compensate the sidebar's width so "center of the hub" = center of the screen */
@media (min-width: 900px){ .hubCenter{ padding-right: 96px; } }

/* friend "+" slots: squad up beside the showcased character (unchanged —
   only .friendSlot.filled below grows once someone's actually in the room) */
.friendSlot{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 2px;
  width: 88px; height: 88px; border-radius: 50%; cursor:pointer;
  border: 3px dashed rgba(255,209,102,0.6); background: rgba(255,209,102,0.1);
  color: var(--accent-gold); box-shadow: 0 0 16px rgba(255,209,102,0.2);
  transition: border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s; }
.friendSlot:hover{ border-color: var(--accent-gold); color: var(--accent-gold);
  background: rgba(255,209,102,0.18);
  transform: scale(1.07); box-shadow: 0 0 28px rgba(255,209,102,0.45); }
.friendPlus{ font-size: 34px; font-weight: 900; line-height: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.friendLabel{ font-size: 11px; font-weight: 900; letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6); max-width: 78px; overflow-wrap:anywhere; }

/* once a friend has actually joined: reuses the exact same markup/classes
   as your own showcase (.showcaseTrophyTop, .showcaseSwatch, .showcaseCanvas,
   .showcaseName, .showcaseRole, ...) so it's styled 1:1 identically — no
   card, no border, no box, just floats the same way yours does */
.friendSlot.filled{ display:block; width: 244px; height:auto; flex-shrink:0;
  border: none; padding: 0; background: none; box-shadow: none; cursor: default; position:relative; }
.friendSlot.filled:hover{ color: var(--text); transform: none; }
/* leader can click a squadmate to open the kick / promote popup */
.friendSlot.filled.canManage{ cursor: pointer; }
.friendSlot.filled .friendLabel{ font-size: 13px; font-weight: 800; color: var(--text-dim);
  text-shadow: none; max-width:none; overflow:visible; white-space:normal; margin-top: 2px; }
.friendReadyTag{ display:inline-block; margin-left: 6px; vertical-align: 1px;
  font-size: 10px; font-weight: 900; color: #06283c; background: #5aff6a;
  border-radius: 7px; padding: 1px 8px; letter-spacing: 0.5px; }
/* standalone READY tag under my own showcase (mirrors the one shown on a
   ready squadmate's card) — centered on its own row, no leading margin */
.showcaseReadyRow{ text-align:center; margin-top: -4px; }
.showcaseReadyRow .friendReadyTag{ margin-left: 0; }
/* live 3D teammate canvas — same stage as the main showcase at 0.7 scale */
.friendCanvas{ position:relative; z-index:1; display:block; width: 170px; height: 221px; margin: 0 auto 2px;
  background: radial-gradient(ellipse 42% 9% at 50% 88%, rgba(0,0,0,0.5), transparent 72%);
  touch-action:none; cursor: grab; }
/* the showcase stage furniture, scaled down to teammate size */
.friendSlot.filled .showcaseSpot{ width: 245px; height: 242px; top: -20px; }
.friendSlot.filled .showcasePedestal{ top: 176px; width: 210px; height: 84px; }
.friendSlot.filled .showcasePedestal::before{ width: 185px; height: 52px; }
.friendSlot.filled .showcasePedestal::after{ width: 185px; height: 48px; }
.friendSlot.filled .showcaseSwatch{ width: 154px; height: 154px; top: 14px; }
.friendSlot.filled .showcaseName{ font-size: 26px; }
.friendSlot.filled .showcaseTrophyTop .rankBadge svg{ width: 44px; height: 42px; }
/* teammate trophy count: same gold gradient as #showcaseTrophies, smaller */
.friendTrophyCount{ font-size: 20px; font-weight: 900; font-style: italic; letter-spacing: 1px; line-height: 1;
  background: linear-gradient(180deg, #fff6d0 0%, #ffd24a 48%, #f0821a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 12px rgba(255,190,60,0.35)); }
/* readied-up squadmate: an unmistakable green glow,
   so it's obvious at a glance who's still waited on */
.friendSlot.filled.isReady .friendCanvas{
  filter: drop-shadow(0 0 3px #5aff6a) drop-shadow(0 0 16px #5aff6a) drop-shadow(0 0 30px rgba(90,255,106,0.6)); }
.friendSlot.filled.isReady .friendLabel{ color: #5aff6a; }

/* golden crown marking the party leader (own showcase + friend slots) */
.leaderCrown{ position:absolute; left:50%; top: -32px; width: 36px; height: 30px; margin-left: -18px;
  z-index:4; color: #ffd24a; pointer-events:none;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.55)) drop-shadow(0 0 12px rgba(255,210,74,0.55));
  animation: crownBob 2.6s ease-in-out infinite; }
.leaderCrown svg{ width: 100%; height: 100%; }
@keyframes crownBob{ 0%,100%{ transform: translateY(0); } 50%{ transform: translateY(-4px); } }

/* leave-team: a small red "exit door" icon button in the top bar next to
   the currencies — anything placed in the hub body pushed the loot-box row
   off short screens */
.iconBtn.leaveTeamBtn{ display:flex; align-items:center; justify-content:center; color: #ff8d99;
  border-color: rgba(255,77,94,0.55); background: linear-gradient(180deg, #3a1a24, #1f0e16);
  transition: color 0.12s, border-color 0.12s, box-shadow 0.12s; }
.iconBtn.leaveTeamBtn svg{ width: 18px; height: 18px; }
.iconBtn.leaveTeamBtn:hover{ color:#fff; border-color:#ff4d5e;
  box-shadow: 0 3px 0 rgba(0,0,0,0.3), 0 0 14px rgba(255,77,94,0.45); }

/* leader's kick / make-leader popup on a squadmate slot */
.slotActionBox{ position:relative; display:flex; flex-direction:column; gap: 12px;
  width: min(92vw, 340px); padding: 20px 20px 22px; text-align:center;
  background: linear-gradient(180deg, #23233a, #12121e);
  border: 3px solid rgba(255,255,255,0.22); border-radius: 20px;
  box-shadow: 0 10px 0 rgba(0,0,0,0.35), 0 30px 70px rgba(0,0,0,0.6);
  animation: mapBoxPop 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
.slotActionBox .mapPreviewTitle{ justify-content:center; color: var(--accent-gold); }
.regionJoinMessage{ margin:0; color:var(--text-dim); font-size:14px; line-height:1.45; }
.slotActionBtn{ display:flex; align-items:center; justify-content:center; gap: 8px; }
.slotActionCrown{ width: 20px; height: 20px; }
.ghostBtn.wide{ width:100%; }
.ghostBtn.danger{ border-color: rgba(255,77,94,0.5); color: #ff8d99; }
.ghostBtn.danger:hover{ border-color: #ff4d5e; color: #fff; }

/* transient center-screen notice ("You were removed from the team") */
/* Sits BELOW the onboarding guide banner (top:18%, ~41px tall) and clear of
   the centred scoreboard above it, so an in-match toast can never land on top
   of either. */
.partyToast{ position:fixed; left:50%; top: 26%; transform:translateX(-50%); z-index:60;
  font-family: var(--hud-font); font-size: 15px; letter-spacing: 0.5px; color: #fff;
  background: linear-gradient(180deg, #3a1219, #22090d); border: 2px solid rgba(255,77,94,0.6);
  border-radius: 14px; padding: 12px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 18px rgba(255,77,94,0.3);
  opacity: 0; pointer-events:none; transition: opacity 0.25s, transform 0.25s; }
.partyToast.show{ opacity: 1; transform: translateX(-50%) translateY(6px); }

.charShowcase{ text-align:center; position:relative;
  animation: showcasePop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) 0.1s backwards; }
@keyframes showcasePop{ from{ opacity:0; transform: scale(0.82) translateY(24px); } to{ opacity:1; transform:none; } }
/* warm stage spotlight cone dropping onto the brawler from above */
.showcaseSpot{ position:absolute; left:50%; top: -30px; width: 350px; height: 345px;
  transform: translateX(-50%); z-index:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(255,248,222,0.55), rgba(255,238,190,0.22) 60%, rgba(255,238,190,0.06) 100%);
  clip-path: polygon(42% 0, 58% 0, 90% 100%, 10% 100%);
  filter: blur(8px); animation: spotFlicker 5s ease-in-out infinite; }
@keyframes spotFlicker{ 0%,100%{ opacity: 1; } 50%{ opacity: 0.8; } }
/* golden stage disc the brawler stands on (thickness + glowing top face) */
.showcasePedestal{ position:absolute; left:50%; top: 250px; width: 300px; height: 120px;
  transform: translateX(-50%); z-index:0; pointer-events:none;
  animation: pedestalGlow 4.5s ease-in-out infinite; }
@keyframes pedestalGlow{ 0%,100%{ filter: brightness(1); } 50%{ filter: brightness(1.12); } }
/* disc side / thickness, slightly lower than the top face */
.showcasePedestal::before{ content:''; position:absolute; left:50%; top: 54%; width: 264px; height: 74px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, #e8a92e 30%, #9a6212 100%);
  box-shadow: 0 12px 34px rgba(255,190,60,0.4), 0 0 46px rgba(255,205,100,0.3); }
/* glowing cream top face */
.showcasePedestal::after{ content:''; position:absolute; left:50%; top: 46%; width: 264px; height: 68px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #fff9e0 0%, #ffeaa6 38%, #ffd069 72%, #f0b03e 100%);
  box-shadow: inset 0 -7px 14px rgba(205,125,25,0.4), inset 0 4px 10px rgba(255,255,255,0.85); }
/* gold sparkles drifting up inside the light beam */
.showcaseSparks{ position:absolute; left:50%; top: 0; width: 320px; height: 330px;
  transform: translateX(-50%); z-index:1; pointer-events:none; overflow:hidden; }

/* clothes-hanger button: opens the skin wardrobe for the shown brawler */
.wardrobeBtn{ position:absolute; left: calc(100% + 4px); top: 118px; z-index:3;
  width: 54px; height: 54px; border-radius: 16px; cursor:pointer; color: #ffd24a;
  background: linear-gradient(180deg, #2f2f46, #1b1b2a);
  border: 2px solid rgba(255,209,102,0.45);
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 8px 18px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.14);
  display:flex; align-items:center; justify-content:center;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.wardrobeBtn svg{ width: 30px; height: 30px; transform-origin: 50% 12%;
  animation: hangerSwing 3.2s ease-in-out infinite; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.35)); }
@keyframes hangerSwing{ 0%,100%{ transform: rotate(-7deg); } 50%{ transform: rotate(7deg); } }
.wardrobeBtn:hover{ transform: scale(1.12) rotate(-3deg); border-color: #ffd24a;
  box-shadow: 0 6px 0 rgba(0,0,0,0.35), 0 0 22px rgba(255,209,102,0.5), inset 0 1px 0 rgba(255,255,255,0.14); }
.wardrobeBtn:active{ transform: scale(0.96); }

/* ---- wardrobe popup: owned skins to equip + locked skins to buy ---- */
.wardrobeBox{ position:relative; display:flex; flex-direction:column; gap: 10px;
  width: min(92vw, 620px); max-height: calc(86 * var(--uvh, 1vh)); padding: 18px 20px 20px;
  background: linear-gradient(180deg, #23233a, #12121e);
  border: 3px solid rgba(255,255,255,0.22); border-radius: 20px;
  box-shadow: 0 10px 0 rgba(0,0,0,0.35), 0 30px 70px rgba(0,0,0,0.6);
  animation: mapBoxPop 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
.wardrobeScroll{ overflow-y:auto; -webkit-overflow-scrolling: touch; padding-right: 4px; }
.wardrobeSection{ display:flex; align-items:center; gap: 10px; margin: 10px 0 10px;
  font-family: var(--hud-font); font-size: 14px; letter-spacing: 2px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
.wardrobeSection.owned{ color: #ffe9a3; margin-top: 2px; }
.wardrobeSection.locked{ color: var(--text-dim); }
.wardrobeSection::after{ content:''; flex:1; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.16), transparent); }
.wardrobeGrid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.wardrobeSkin{ position:relative; display:flex; flex-direction:column; align-items:center; gap: 2px;
  padding: 10px 8px 9px; border-radius: 14px; cursor:pointer; color: var(--text); text-align:center;
  background: linear-gradient(180deg, #262638, #161622);
  border: 2px solid var(--panel-border);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.wardrobeSkin:hover{ transform: translateY(-3px) scale(1.03); }
.wardrobeSkin.r-rare{ border-color: rgba(87,176,255,0.55); }
.wardrobeSkin.r-epic{ border-color: rgba(197,122,255,0.55); }
.wardrobeSkin.r-legendary{ border-color: rgba(255,210,74,0.65);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 0 14px rgba(255,210,74,0.25); }
.wardrobeSkin.r-evil{ border-color: rgba(255,32,56,0.7); background: linear-gradient(180deg, #1d0b10, #120609);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 0 14px rgba(255,32,56,0.3); }
.wardrobeSkin.equipped{ border-color: #ffd24a;
  box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 0 0 2px rgba(255,210,74,0.35), 0 0 18px rgba(255,210,74,0.35); }
.wardrobeEq{ position:absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index:2;
  font-family: var(--hud-font); font-size: 9px; letter-spacing: 1.2px; color:#3a2404;
  background: linear-gradient(180deg, #ffe27a, #ffb01f); padding: 2px 9px; border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4); }
.wardrobeThumb{ width: 82px; height: 82px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.45)); }
.wardrobeSkin.locked .wardrobeThumb{ filter: grayscale(0.85) brightness(0.6); }
.wardrobeSkin.locked:hover .wardrobeThumb{ filter: grayscale(0.4) brightness(0.85); }
.wardrobeSkinName{ font-family: var(--hud-font); font-size: 12.5px; letter-spacing: 0.3px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.5); }
.wardrobePerk{ font-size: 9.5px; font-weight: 800; color: #ffe14a; }
.wardrobePerk.none{ color: var(--text-dim); }
.wardrobeLockHint{ display:inline-flex; align-items:center; gap: 5px; margin-top: 3px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px; color: var(--text-dim);
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 9px; padding: 2px 9px; }
.wardrobeLockHint svg{ width: 12px; height: 12px; }
.wardrobeSkin.deny{ animation: denyShake 0.35s; }
@keyframes denyShake{ 0%,100%{ transform: translateX(0); } 25%{ transform: translateX(-5px); } 50%{ transform: translateX(5px); } 75%{ transform: translateX(-3px); } }
/* no plaque — trophy count sits centered over the character, the rank
   shield hangs off its right side (doesn't shift the centering) */
.showcaseTrophyTop{ position:relative; z-index:2; display:flex; justify-content:center;
  margin-bottom: 2px; }
.showcaseTrophyRow{ position:relative; display:flex; align-items:center; gap: 7px; }
.showcaseTrophyRow .ic{ width: 21px; height: 21px; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.45)); }
.showcaseRankWrap{ position:absolute; left: calc(100% + 8px); top: 50%;
  transform: translateY(-52%) rotate(7deg); }
#showcaseTrophies{ font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: 1px; line-height: 1;
  background: linear-gradient(180deg, #fff6d0 0%, #ffd24a 48%, #f0821a 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 12px rgba(255,190,60,0.35)); }
.showcaseTrophyTop .rankBadge{ margin: 0; }
.showcaseTrophyTop .rankBadge svg{ width: 58px; height: 55px; }
.showcaseSwatch{ width: 220px; height: 220px; border-radius: 50%; position:absolute; left:50%; top: 20px;
  transform: translateX(-50%); filter: blur(38px); opacity: 0.6; z-index:0; transition: background 0.2s, box-shadow 0.2s; }
.showcaseCanvas{ position:relative; z-index:1; width: 244px; height: 309px; display:block; margin: 0 auto 2px;
  background: radial-gradient(ellipse 42% 9% at 50% 88%, rgba(0,0,0,0.5), transparent 72%); }
/* name dead-center, power pill hangs off its right side */
.showcaseNameRow{ display:flex; justify-content:center; }
.showcaseNameWrap{ position:relative; display:inline-block; }
.showcaseName{ font-family: var(--hud-font); font-size: 38px; font-weight: 400; letter-spacing: 1px; font-style: italic;
  background: linear-gradient(180deg, #ffffff 30%, #bfeaff 65%, #7cd6ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,0.5)) drop-shadow(0 0 18px rgba(124,247,255,0.45)); }
.showcasePwr{ position:absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
  display:inline-flex; align-items:center; gap: 3px; white-space:nowrap;
  font-family: var(--hud-font); font-size: 14px; font-weight: 400;
  background: rgba(0,0,0,0.45); border: 2px solid rgba(255,225,74,0.5); color: #ffe14a;
  border-radius: 12px; padding: 3px 11px; box-shadow: 0 0 12px rgba(255,225,74,0.2); }
.showcasePwr .ic{ width: 13px; height: 13px; }
.showcaseRole{ font-size: 13px; color: var(--text-dim); margin: 4px 0 10px; }

/* ---- bottom: event banner (mode + map preview) + big yellow PLAY ---- */
.hubBottom{ position: relative; z-index: 2; padding: 0 18px max(18px, env(safe-area-inset-bottom));
  display:flex; align-items:flex-end; justify-content:space-between; gap: 16px;
  animation: panelRise 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) 0.12s backwards; }
/* single-image event card: map art fills it, text overlaid on the bottom */
.eventCard{ position:relative; width: 250px; height: 132px; cursor:pointer; text-align:left;
  border: 3px solid rgba(255,255,255,0.25); border-radius: 18px; padding: 0; color: var(--text);
  overflow:hidden; background: #14141f;
  box-shadow: 0 6px 0 rgba(0,0,0,0.4), 0 12px 26px rgba(0,0,0,0.4);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.eventCard:hover{ transform: translateY(-4px) scale(1.02); border-color: #ffd24a;
  box-shadow: 0 8px 0 rgba(0,0,0,0.4), 0 0 26px rgba(255,210,74,0.4); }
.eventThumb{ position:absolute; inset:0; width:100%; height:100%; object-fit: cover; }
.eventOverlay{ position:absolute; inset:0; display:flex; flex-direction:column; justify-content:flex-end;
  padding: 10px 12px; background: linear-gradient(180deg, rgba(8,8,18,0.08) 30%, rgba(8,8,18,0.88)); }
.eventMode{ display:flex; align-items:center; gap: 8px; font-family: var(--hud-font); font-weight: 400;
  font-size: 19px; letter-spacing: 0.5px; text-shadow: 0 2px 0 rgba(0,0,0,0.55); }
.eventModeIcon{ display:inline-flex; filter: drop-shadow(0 2px 0 rgba(0,0,0,0.35)); }
.eventModeIcon svg{ width: 20px; height: 20px; }
.eventMap{ font-size: 11.5px; color: var(--accent-gold); font-weight: 800; margin-top: 2px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.6); }
/* swap arrow chip in the corner */
.eventChangeHint{ position:absolute; top: 8px; right: 8px; display:flex; align-items:center; justify-content:center;
  width: 28px; height: 28px; border-radius: 50%; font-size: 15px; font-weight: 900; color: #3a2404;
  background: linear-gradient(180deg, #ffe27a, #ffb01f); border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 0 3px 6px rgba(0,0,0,0.4); transition: transform 0.15s; }
.eventCard:hover .eventChangeHint{ transform: translateX(3px) scale(1.1); }

/* ---- event picker: mode sections, each card led by its mode-colored banner ---- */
.eventGrid{ display:flex; flex-direction:column; gap: 14px; }
.eventSectionHead{ display:flex; align-items:center; gap: 10px; margin-top: 6px; }
.eventSectionHead:first-child{ margin-top: 0; }
.eventSectionTitle{ font-family: var(--hud-font); font-size: 17px; letter-spacing: 2px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
.eventSectionTag{ font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-dim); background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px; padding: 2px 10px; }
.eventSectionHead::after{ content:''; flex:1; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.18), transparent); }
.eventGridRow{ display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.eventPickCard{ position:relative; display:flex; flex-direction:column; text-align:left; cursor:pointer; color: var(--text);
  background: linear-gradient(180deg, #262638, #14141f); border: 3px solid var(--panel-border);
  border-radius: 18px; padding: 0; overflow:hidden;
  box-shadow: 0 6px 0 rgba(0,0,0,0.35), 0 10px 24px rgba(0,0,0,0.35);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s; }
.eventPickCard:hover{ transform: translateY(-5px) scale(1.02); border-color: var(--mc, var(--accent-cyan)); }
.eventPickCard.selected{ border-color: #ffd24a;
  box-shadow: 0 6px 0 rgba(0,0,0,0.35), 0 0 0 2px rgba(255,210,74,0.35), 0 0 28px rgba(255,210,74,0.35); }
/* party-size gate: solo showdown needs a lone player, duo a party of 2 */
.eventPickCard.modeLocked{ cursor: default; }
.eventPickCard.modeLocked:hover{ transform:none; border-color: var(--panel-border); }
.eventPickCard.modeLocked .eventPickThumb,
.eventPickCard.modeLocked .eventPickBanner{ filter: grayscale(0.85) brightness(0.65); }
/* not the party leader: still visible (so you can see what's selected),
   just dimmed and non-interactive — only the leader may change the event */
.eventPickCard.notLeader{ cursor: default; opacity: 0.6; }
.eventPickCard.notLeader:hover{ transform:none; border-color: var(--panel-border); }
.eventPickLock{ position:absolute; inset:0; z-index:2; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap: 6px;
  background: rgba(8,8,16,0.55); color:#fff; font-family: var(--hud-font);
  font-size: 12px; letter-spacing: 1.2px; text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
.eventPickLock svg{ width: 30px; height: 30px; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.5)); }
/* mode-colored ribbon on top, event-slot style */
.eventPickBanner{ position:relative; display:flex; align-items:center; gap: 9px; padding: 8px 13px;
  background: var(--mc, #57b0ff); color:#fff;
  font-family: var(--hud-font); font-weight: 400; font-size: 17px; letter-spacing: 0.5px;
  text-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.eventPickBanner::after{ content:''; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent 45%, rgba(0,0,0,0.22)); }
.eventPickBanner .eventModeIcon svg{ width: 20px; height: 20px; }
.eventPickThumbWrap{ position:relative; width:100%; height: 132px; flex-shrink:0; }
.eventPickThumb{ width:100%; height:100%; object-fit: cover; display:block; border:none; border-radius:0; }
.eventPickThumbWrap::after{ content:''; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(8,8,18,0.2), transparent 30%); }
.eventPickSel{ position:absolute; top:9px; left:9px; z-index:2; font-family: var(--hud-font);
  font-size: 10px; letter-spacing: 1.5px; color:#3a2404;
  background: linear-gradient(180deg, #ffe27a, #ffb01f); padding: 4px 11px; border-radius: 9px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4); animation: selBadgePop 0.4s cubic-bezier(0.2, 1.7, 0.4, 1); }
@keyframes selBadgePop{ from{ transform: scale(0.3); opacity:0; } to{ transform: scale(1); opacity:1; } }
/* magnifier chip: opens the fullscreen map preview */
.eventPickZoom{ position:absolute; right:9px; bottom:9px; z-index:3;
  display:flex; align-items:center; justify-content:center; width: 34px; height: 34px; border-radius: 10px;
  color:#fff; background: rgba(10,10,20,0.75); border: 2px solid rgba(255,255,255,0.35);
  box-shadow: 0 3px 8px rgba(0,0,0,0.45); transition: transform 0.12s, background 0.12s, border-color 0.12s; }
.eventPickZoom svg{ width: 17px; height: 17px; }
.eventPickZoom:hover{ transform: scale(1.15); background: rgba(20,40,60,0.9); border-color: var(--accent-cyan); color: var(--accent-cyan); }
.eventPickBody{ position:relative; z-index:2; padding: 10px 14px 13px; }
.eventPickMap{ font-size: 12px; color: var(--accent-gold); font-weight: 800; margin: 0 0 6px; }
.eventPickDesc{ font-size: 11.5px; color: var(--text-dim); line-height: 1.55; }

/* ---- fullscreen map preview lightbox ---- */
.mapPreviewOverlay{ display:none; position:fixed; inset:0; z-index:42;
  align-items:center; justify-content:center; padding: calc(4 * var(--uvh, 1vh)) calc(4 * var(--uvw, 1vw));
  background: rgba(5,5,12,0.78); backdrop-filter: blur(6px); }
.mapPreviewBox{ position:relative; display:flex; flex-direction:column; gap: 12px; align-items:center;
  max-width: min(92vw, 760px); max-height: calc(90 * var(--uvh, 1vh)); padding: 18px 18px 20px;
  background: linear-gradient(180deg, #23233a, #12121e);
  border: 3px solid rgba(255,255,255,0.22); border-radius: 20px;
  box-shadow: 0 10px 0 rgba(0,0,0,0.35), 0 30px 70px rgba(0,0,0,0.6);
  animation: mapBoxPop 0.35s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes mapBoxPop{ from{ opacity:0; transform: scale(0.8) translateY(24px); } to{ opacity:1; transform:none; } }
.mapPreviewTitle{ display:flex; align-items:center; gap: 9px; font-family: var(--hud-font);
  font-size: 21px; letter-spacing: 0.5px; text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
.mapPreviewTitle b{ color: var(--accent-gold); }
.mapPreviewTitle .eventModeIcon svg{ width: 23px; height: 23px; }
.mapPreviewImg{ max-width: 100%; max-height: calc(90 * var(--uvh, 1vh) - 120px); border-radius: 12px;
  border: 2px solid rgba(0,0,0,0.55); box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
/* The close button used to hang off the corner at top/right:-14px, but every
   box that hosts it is a scroll container (see the overflow guard above), and
   CSS computes overflow-x:visible as overflow-x:auto when overflow-y is auto —
   so BOTH axes clipped and the button lost its outer 14px. Sitting just inside
   the padding box keeps the same round corner-button look and can never be
   clipped, at any scale or breakpoint. */
.mapPreviewClose{ position:absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%;
  z-index: 2; display:flex; align-items:center; justify-content:center; flex-shrink:0;
  font-size: 16px; font-weight: 900; color: #fff; cursor:pointer;
  background: linear-gradient(180deg, #ff6a76, #c1233a); border: 3px solid #ffb0b8;
  box-shadow: 0 4px 0 rgba(0,0,0,0.4), 0 8px 16px rgba(0,0,0,0.4); transition: transform 0.12s; }
.mapPreviewClose:hover{ transform: scale(1.12) rotate(90deg); }
/* keep long titles clear of the corner button instead of running under it */
.slotActionBox .mapPreviewTitle,
.wardrobeBox .mapPreviewTitle,
.mapPreviewBox .mapPreviewTitle{ padding: 0 42px; }

/* ---- in-match pause / exit ----
   Small and out of the way in the HUD's top-right corner, matching the mode
   tag opposite it. #hud is pointer-events:none, so this opts back in. */
.hudPauseBtn{ position:absolute; top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right)); z-index: 17; pointer-events:auto;
  display:flex; align-items:center; justify-content:center; width: 38px; height: 38px;
  padding: 0; border-radius: 11px; cursor:pointer; color: #dfe0f0;
  background: rgba(14,16,28,0.72); border: 2px solid rgba(255,255,255,0.22);
  box-shadow: 0 3px 0 rgba(0,0,0,0.4), 0 6px 16px rgba(0,0,0,0.35);
  backdrop-filter: blur(6px); transition: transform 0.12s, border-color 0.15s, color 0.15s; }
.hudPauseBtn svg{ width: 19px; height: 19px; display:block; }
.hudPauseBtn:hover{ color:#fff; border-color: var(--accent-gold); transform: translateY(-2px); }
.hudPauseBtn:active{ transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,0.4); }
body.touch .hudPauseBtn{ width: 34px; height: 34px; }

/* ---- in-game keyboard shortcut hints ------------------------------------
   CrazyGames requires buttons shown DURING gameplay to display the key that
   triggers them. The letter is written by UI.refreshKeyHints() from BINDS, so
   it follows a rebind and is never hardcoded in the markup. A touch device has
   no keyboard, so the badges are hidden there — as they are while empty, which
   is what the markup ships as. */
.keyHint{ position:absolute; left:50%; transform: translateX(-50%);
  padding: 1px 6px; border-radius: 6px; pointer-events:none; white-space:nowrap;
  font: 900 9px/1.55 Poppins, sans-serif; letter-spacing: 0.6px; text-transform: uppercase;
  color: #e9eaf7; background: rgba(10,12,22,0.85); border: 1.5px solid rgba(255,255,255,0.26);
  box-shadow: 0 2px 4px rgba(0,0,0,0.45); }
.keyHint:empty{ display:none; }
body.touch .keyHint{ display:none; }
.hudPauseBtn .keyHint{ top: calc(100% + 4px); }
.superBtnTouch .keyHint{ bottom: calc(100% + 7px); font-size: 10px; }
.pauseBox .regionJoinMessage:empty,
.alertBox .regionJoinMessage:empty{ display:none; }

/* PLAY: glossy gold slab with a looping shine + glow pulse */
.playBtnHub{ position:relative; overflow:hidden; min-width: 250px; padding: 20px 34px;
  font-family: var(--hud-font); font-weight: 400; font-size: 30px; font-style: italic;
  letter-spacing: 2px; color: #3a2404; cursor:pointer; white-space:nowrap;
  background: linear-gradient(180deg, #ffe98a 0%, #ffd24a 48%, #ffa61a 100%);
  border: 3px solid #8a5a00; border-radius: 16px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
  box-shadow: 0 8px 0 #a86c00, 0 14px 30px rgba(255,180,26,0.4), inset 0 2px 0 rgba(255,255,255,0.6);
  transform: skewX(-4deg); transition: transform 0.08s, box-shadow 0.08s;
  animation: playGlow 2s ease-in-out infinite; }
@keyframes playGlow{
  0%,100%{ box-shadow: 0 8px 0 #a86c00, 0 14px 30px rgba(255,180,26,0.35), inset 0 2px 0 rgba(255,255,255,0.6); }
  50%{ box-shadow: 0 8px 0 #a86c00, 0 14px 40px rgba(255,180,26,0.65), inset 0 2px 0 rgba(255,255,255,0.6); } }
.playBtnHub::before{ content:''; position:absolute; top:-30%; bottom:-30%; left:-45%; width:32%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg); animation: bannerShine 3.2s ease-in-out infinite; pointer-events:none; }
@keyframes bannerShine{ 0%{ left:-45%; } 40%{ left:130%; } 100%{ left:130%; } }
.playBtnHub:hover{ transform: skewX(-4deg) translateY(-3px) scale(1.02); }
.playBtnHub:active{ transform: skewX(-4deg) translateY(5px); box-shadow: 0 2px 0 #a86c00; animation:none; }
.playBtnHub.isReady{ font-size: 20px; background: linear-gradient(180deg, #9dffb0 0%, #5aff6a 48%, #2ecc40 100%);
  border-color: #1b7a2a; color: #06280f; animation: none; }

@media (max-width: 760px){
  .boxTileName{ display:none; }
  .hubBoxTile{ padding: 8px 10px 6px; }
  .boxTileIcon{ width: 44px; height: 44px; }
}
/* ---- compact layout for phones: short landscape (height-constrained) OR
   narrow portrait (width-constrained) — either one means "too little room
   to show the desktop layout at full size", so both trigger the same
   shrink-everything pass. This used to be max-height-only, which meant it
   NEVER fired on a normal portrait phone (390x844 is nowhere near 560px
   tall) even though that's the far more common case — every card, panel
   and paragraph below was rendering at full desktop size on real phones. ---- */
@media (max-height: 640px), (max-width: 480px){
  .hubTopBar{ padding: max(6px, env(safe-area-inset-top)) 12px 0; }
  .playerBadge{ gap: 7px; padding: 3px 12px 3px 5px; border-radius: 13px; }
  .rankRing{ width: 32px; height: 32px; font-size: 14px; border-radius: 9px; }
  .playerName{ font-size: 13px; }
  .badgeTrophies{ padding: 2px 9px 2px 7px; }
  .currencyPill{ min-height: 30px; font-size: 13px; border-radius: 16px; padding: 3px 12px 3px 4px; }
  .iconBtn{ width: 30px; height: 30px; font-size: 12px; }

  .hubBody{ padding: 0 12px; gap: 8px; }
  /* 5 stacked tiles are taller than the whole screen — fold to a 2-col grid */
  .hubSidebar{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .sideTile{ width: 60px; padding: 6px 3px 5px; font-size: 8px; border-radius: 12px; gap: 2px; }
  .sideTile .sideIcon{ width: 18px; height: 18px; }
  /* the 2-col sidebar (~134px) steals left space — pad the same amount on
     the right so the showcased brawler + invite slots sit dead-center of
     the SCREEN, not of the leftover area */
  .hubCenter{ padding-right: 134px !important; }

  .showcaseRow{ gap: 14px; grid-template-columns: minmax(96px, 1fr) auto minmax(96px, 1fr); }
  .wardrobeBtn{ left: auto; right: -8px; top: 26px; width: 32px; height: 32px; border-radius: 10px; }
  .wardrobeBtn svg{ width: 17px; height: 17px; }
  .iconBtn.leaveTeamBtn svg{ width: 14px; height: 14px; }
  .currencyTip{ width: 150px; font-size: 10px; padding: 7px 9px; left: auto; right: 0; transform: translateY(-6px); }
  .currencyTip::after{ left: auto; right: 18px; transform: none; }
  .currencyPillWrap:hover .currencyTip{ transform: translateY(0); }
  .currencyTip .tipTitle{ font-size: 9px; }
  .currencyTip .tipHint{ font-size: 9px; }
  .showcaseSpot{ width: 170px; height: 160px; }
  .showcaseSwatch{ width: 100px; height: 100px; top: 8px; }
  .showcaseCanvas{ width: 112px; height: 142px; }
  .showcaseName{ font-size: 18px; }
  .showcaseRole{ font-size: 10px; margin: 1px 0 2px; }
  .showcaseTrophyRow .ic{ width: 14px; height: 14px; }
  .showcaseTrophyTop .rankBadge svg{ width: 32px; height: 30px; }
  .friendSlot{ width: 54px; height: 54px; border-width: 2px; }
  .friendPlus{ font-size: 15px; }
  .friendLabel{ font-size: 8px; }
  .friendCanvas{ width: 86px; height: 112px; }
  .friendSlot.filled .showcaseSwatch{ width: 70px; height: 70px; }
  .friendSlot.filled .showcaseName{ font-size: 13px; }
  .friendSlot.filled .showcaseSpot{ width: 110px; height: 118px; }
  .friendTrophyCount{ font-size: 13px; }
  .friendSlot.filled .showcaseTrophyTop .rankBadge svg{ width: 26px; height: 25px; }

  .hubBottom{ padding: 0 12px max(8px, env(safe-area-inset-bottom)); gap: 10px; }
  .eventCard{ width: 150px; height: 76px; border-radius: 12px; }
  .eventMode{ font-size: 13px; }
  .eventMode .eventModeIcon svg{ width: 14px; height: 14px; }
  .eventMap{ font-size: 9px; }
  .hubBoxes{ gap: 7px; flex-wrap: nowrap; }
  .hubBoxTile{ padding: 6px 8px 5px; border-radius: 11px; }
  .boxTileIcon{ width: 32px; height: 32px; }
  .boxTileName{ display:none; }
  .boxTilePrice{ font-size: 11px; padding: 2px 8px; }
  .playBtnHub{ min-width: 130px; font-size: 17px; padding: 10px 16px; }

  /* --app-height is JS-measured from visualViewport, so it is the real visible
     height on iOS Safari too — 100vh there is the toolbars-hidden viewport and
     overflows the screen. 100dvh is only the no-JS fallback. */
  .pagePanel{ height: calc(var(--app-height, 100dvh) - 10px); max-height: none; }
  .pageContent{ padding: 10px max(14px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }

  /* ---- in-match HUD ---- */
  .hudTop{ top: max(5px, env(safe-area-inset-top)); gap: 3px; }
  .scoreShield{ width: 52px; height: 37px; }
  .scoreShield .shieldInner{ font-size: 14px; gap: 3px; }
  .scoreIcon svg{ width: 11px; height: 11px; }
  .scoreNum{ min-width: 12px; }
  .scorePlaque{ width: 84px; height: 31px; margin: 0 -8px; }
  #matchTimer{ font-size: 13px; letter-spacing: 1px; }
  .plaqueGem{ width: 19px; height: 10px; }
  .plaqueGem.top{ top: -5px; } .plaqueGem.bottom{ bottom: -5px; }
  .modeTag{ font-size: 9px; padding: 3px 8px; gap: 4px; top: max(6px, env(safe-area-inset-top)); left: 8px; }
  .modeIcon svg{ width: 11px; height: 11px; }
  .modeStat{ padding: 2px 8px; }
  .modeStat.aliveInd{ font-size: 10px; }
  .modeStat.aliveInd b{ font-size: 11px; }
  .holdWarn{ font-size: 10px; padding: 2px 8px; }
  .killFeed{ top: 48px; right: 8px; gap: 3px; }
  .killRow{ font-size: 9px; padding: 2px 7px; }
  .hudPanel{ gap: 6px; padding: 4px 8px 4px 4px; border-radius: 12px; }
  .hpRing{ width: 36px; height: 36px; padding: 3px; }
  .hpAvatar span{ font-size: 10px; }
  .hudBars{ min-width: 96px; gap: 3px; }
  .hpBarTrack{ height: 12px; border-radius: 6px; }
  .hpBarText{ font-size: 8.5px; letter-spacing: 0.4px; }
  .ammoPips{ gap: 4px; }
  .ammoPip{ height: 8px; }
  .hudPill{ font-size: 9px; padding: 1px 7px; gap: 3px; }
  .hudPill .ic, .hudPill.gems svg{ width: 10px; height: 10px; }
  .respawnLabel{ font-size: 14px; letter-spacing: 2px; }
  .respawnTimer{ font-size: 46px; }

  /* touch controls: smaller sticks, move stick docked ABOVE the HP panel,
     super button clear of the aim thumb */
  .joyZone{ width: 112px; height: 112px; bottom: max(14px, env(safe-area-inset-bottom)); }
  .joyZone.left{ left: 14px; } .joyZone.right{ right: 14px; }
  .joyStick{ width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  body.touch .joyZone.left{ bottom: 72px; left: 10px; }
  body.touch .superBtnTouch{ width: 60px; height: 60px; bottom: 122px; right: 24px; }
  body.touch .superCore{ inset: 5px; font-size: 20px; }

  /* ---- versus (match intro) ---- */
  .versusScreen{ gap: 10px; }
  .versusRibbon{ padding: 5px 15px; gap: 8px; }
  .versusRibbon .modeIcon svg{ width: 19px; height: 19px; }
  .versusModeName{ font-size: 15px; }
  .versusMapName{ font-size: 10px; }
  .versusBody{ flex-direction: row; gap: 12px; } /* beats the max-width column stack — short screens need the row */
  .versusTeam{ gap: 8px; }
  /* wide enough that the stat row fits at its own font size instead of being
     shrunk by _fitDynamicText — six of these still fit a 780px row */
  .versusCard{ width: 112px; padding: 7px 7px 7px; border-radius: 11px; }
  .versusThumb{ width: 68px; }
  .versusPlayer{ font-size: 11px; }
  .versusChar{ font-size: 8px; }
  .versusMeta{ font-size: 10px; margin-top: 4px; gap: 3px; }
  .versusVsWrap{ width: 54px; height: 54px; }
  .versusVs{ font-size: 26px; }
  .versusHint{ font-size: 16px; min-height: 20px; }

  /* ---- result screen: must fit VICTORY/DEFEAT + stats + MAIN MENU ---- */
  .screen:not(.resultScreen){ overflow-y: auto; } /* sub-pages only; results never scroll */
  .resultWrap{ gap: 4px; padding: 8px 0; margin: auto 0; }
  .resultTitle{ font-size: 24px; }
  .resultChar{ width: 64px; height: 64px; }
  .resultStatPill{ padding: 3px 9px; font-size: 9px; }
  .trophyAnim{ margin: 2px auto; padding: 5px 11px; gap: 8px; }
  .trophyAnim .rankProgressTrack.big{ height: 10px; }
  .resultScreen .playBtnHub{ min-width: 110px; font-size: 14px; padding: 8px 14px; }

  /* ---- sub-pages: Brawlers / Detail / Shop / Pass / Events / Leaderboard /
     Settings / Invite / Help — full-bleed panel + dense grids, so a short
     screen shows MANY items at once (players won't guess they can scroll) ---- */
  .pagePanel{ width: var(--app-width, 100dvw); height: var(--app-height, 100dvh);
    max-height: none; border-radius: 0; }
  .pagePanel.small{ width: min(96vw, 440px); height: auto; max-height: 96vh; border-radius: 14px; }
  .pageHeader{ padding: 5px 12px; gap: 8px; }
  .pageHeaderTitle{ font-size: 14px; }
  .backBtn{ padding: 5px 10px; font-size: 10px; }
  .pageContent{ padding: 8px max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
  .shopSection{ margin-bottom: 14px; }
  .shopSectionHead{ margin-bottom: 6px; }
  .shopSectionTitle{ font-size: 13px; margin: 0; }
  /* .cardGrid is deliberately NOT overridden here. This block also matches on
     (max-height: 640px), and a short LANDSCAPE frame — a CrazyGames embed, a
     phone on its side — is still 1000px+ wide. Forcing the phone's column
     floor on it produced a dozen 98px tracks: cards four times taller than
     they were wide, with the price and the ADS button wrapping letter by
     letter. Card grids reflow on WIDTH only; see the block below. */
  .charCard{ border-radius: 12px; border-width: 2px; }
  .charThumb{ width: 52px; height: 52px; }
  /* narrow phone cards don't have room for both corner tags side by side —
     "STARTER" and "SELECTED" would run into each other at the top, and
     dropping SELECTED to the bottom instead ran it into the character
     artwork. Stack SELECTED directly under STARTER in the same corner,
     clear of the thumbnail either way. */
  .charRarityTag{ font-size: 7.5px; padding: 2px 6px; }
  .charSelectedTag{ top: 24px; left: 7px; right: auto; font-size: 7.5px; padding: 2px 6px; }
  .skinThumbWrap{ height: 54px; }
  .skinThumb{ width: 50px; height: 50px; }
  .skinName{ font-size: 10px; margin: 4px 0; }
  .skinBtn{ font-size: 10px; }
  .packGrid{ grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 7px; }
  .packCard{ padding: 8px 5px 7px; }
  .shopTabs{ gap: 5px; margin-bottom: 8px; }
  .shopTab{ padding: 5px 10px; font-size: 10px; }
  .detailCanvas{ width: 170px; height: 198px; }
  .detailSkins{ max-width: 170px; }
  .detailRight{ gap: 7px; }
  .bpBanner{ padding: 8px 12px; gap: 10px; margin-bottom: 8px; }
  .bpTitle{ font-size: 17px; margin-bottom: 4px; }
  .bpPerks{ display: none; }
  .bpPremiumBtn{ padding: 7px 12px; font-size: 10px; }
  .bpCol{ grid-template-rows: 104px 26px 104px; width: 94px; }
  .bpRowLabels{ grid-template-rows: 104px 26px 104px; } /* keep FREE/PREMIUM labels aligned with the shrunken cells */
  .bpCell{ padding: 5px 3px; gap: 3px; border-radius: 12px; }
  .bpTrackWrap{ padding: 8px 8px 2px; }
  .eventGrid{ gap: 8px; }
  .eventGridRow{ grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
  .eventPickThumbWrap{ height: 76px; }
  .eventPickBanner{ padding: 5px 9px; font-size: 12px; gap: 6px; }
  .eventPickBanner .eventModeIcon svg{ width: 14px; height: 14px; }
  .eventPickBody{ padding: 6px 9px 8px; }
  .eventPickMap{ font-size: 10px; margin-bottom: 3px; }
  .eventPickDesc{ font-size: 9.5px; line-height: 1.4; }
  .lbList{ gap: 4px; }
  .lbRow{ padding: 4px 10px; gap: 8px; border-radius: 10px; font-size: 11px; }
  .lbPlatformNotice{ margin-bottom:6px; padding:7px 10px; font-size:10px; }
  .bindList{ gap: 5px; margin-bottom: 8px; }
  .bindRow{ padding: 4px 9px; border-radius: 9px; }
  .bindLabel{ font-size: 11px; }
  .bindKeyBtn{ min-width: 70px; padding: 5px 9px; font-size: 11px; }
  .settingsRow{ gap: 8px; }
  .codeInput{ padding: 8px; font-size: 14px; margin-bottom: 6px; }
  .inviteNote{ font-size: 11px; margin-bottom: 8px; }
  .inviteDivider{ margin: 8px 0; }
  .soundBtn.wide{ padding: 8px; font-size: 12px; }
  .helpContent{ font-size: 11px; }
  .helpTabs{ margin: 8px 0 3px; }
  .helpTab{ padding: 6px 10px; font-size: 10px; }
  /* the rules above only shrink the help container itself — every text class
     inside sets its own explicit font-size, so it never actually inherited
     the smaller size. Override each one directly, or mobile just gets
     desktop-sized paragraphs wrapping onto many lines (endless scrolling). */
  .helpSection h3{ font-size: 12px; margin: 10px 0 4px; }
  .helpSection p{ font-size: 11px; line-height: 1.4; margin: 0 0 6px; }
  .helpRow{ padding: 6px 0; gap: 8px; }
  .helpRow .ic{ width: 22px; height: 22px; }
  .helpRowTitle{ font-size: 11.5px; }
  .helpRowDesc{ font-size: 10px; line-height: 1.25; }
  .helpDim{ font-size: 10px !important; }
  .keyRow{ margin: 6px 0; gap: 6px; }
  .aimDiagram{ padding: 10px 8px; margin: 8px 0; }
  .wasdPad{ margin: 6px auto; }
  .rankShowcase{ margin: 8px 0 4px; gap: 10px; }
  .inviteStatus{ font-size: 11px; line-height: 1.4; margin-top: 8px; }
  .bindHint{ font-size: 11px; margin: 3px 0 6px; }
  .couponStatus{ font-size: 11px; }
  .detailSuperDesc{ font-size: 11.5px; line-height: 1.4; }
  .adNote{ font-size: 10px; }

  /* ---- fullscreen overlays: these don't scroll, so they MUST fit ---- */
  .dailyPanel{ padding: 12px 14px; max-height: 94vh; overflow-y: auto; }
  .dailyTitle{ font-size: 18px; }
  .dailyDay{ width: 56px; min-height: 64px; }
  .dailyTrack{ margin-bottom: 10px; }
  .helpPanel{ padding: 12px 14px; max-height: 94vh; }
  .helpContent{ overflow-y: auto; min-height: 0; }
  .boxStage{ gap: 10px; }
  .boxItem{ width: 110px; height: 110px; }
  .boxRewardImg{ width: 100px; height: 100px; }
  .boxRewardIcon{ width: 76px; height: 76px; }
  .boxRewardLabel{ font-size: 14px; }
  .boxHint{ font-size: 12px; }
  .mmBox{ width: min(92vw, 300px); gap: 8px; padding: 18px 18px 16px; }
  .mmSearchRing{ width: 48px; height: 48px; }
  .mmText{ font-size: 16px; }
  .mmSupport{ font-size: 11px; }
  .mmCountdown{ font-size: 12px; }
  /* (hero-reveal compact rules live at the END of this file — the hero
     base styles are defined below this block, so overrides must come later) */
  .wardrobeBox{ max-height: 94vh; padding: 10px 12px 12px; }
  .wardrobeGrid{ grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
  .wardrobeThumb{ width: 60px; height: 60px; }
  .mapPreviewImg{ max-height: calc(94vh - 90px); }
  .goText{ font-size: 64px; }
}

@media (max-width: 640px){
  .sideTile{ width: 62px; padding: 9px 4px; font-size: 9px; }
  .sideTile .sideIcon{ width: 22px; height: 22px; }
  .showcasePedestal{ display:none; }
  .showcaseRow{ grid-template-columns: minmax(116px, 1fr) auto minmax(116px, 1fr); gap: 18px; }
  .wardrobeBtn{ left:auto; right:-10px; top: 34px; width: 42px; height: 42px; border-radius: 12px; }
  .wardrobeBtn svg{ width: 22px; height: 22px; }
  .friendSlot{ width: 64px; height: 64px; border-width: 2px; }
  .friendPlus{ font-size: 22px; }
  .friendLabel{ font-size: 8px; }
  .friendSlot.filled{ width: 116px; }
  .friendSlot.filled .friendLabel{ font-size: 10px; }
  .friendReadyTag{ font-size: 8px; padding: 1px 6px; }
  .friendCanvas{ width: 96px; height: 125px; }
  .friendSlot.filled .showcaseSwatch{ width: 78px; height: 78px; }
  .friendSlot.filled .showcaseName{ font-size: 14px; }
  .friendSlot.filled .showcaseSpot{ width: 120px; height: 130px; }
  .friendTrophyCount{ font-size: 14px; }
  .friendSlot.filled .showcaseTrophyTop .rankBadge svg{ width: 30px; height: 28px; }
  .leaderCrown{ width: 24px; height: 20px; margin-left: -12px; top: -22px; }
  .showcaseSwatch{ width: 110px; height: 110px; }
  .showcaseCanvas{ width: 116px; height: 146px; }
  .showcaseName{ font-size: 21px; }
  .hubBody{ gap: 4px; }
  .playBtnHub{ min-width: 150px; font-size: 19px; padding: 14px 18px; }
  .pagePanel{ height: 94vh; max-height: 94vh; }
}

/* ---- misc reused-screen additions ---- */
.settingsRow{ display:flex; flex-direction:column; gap: 10px; margin: 20px 0; }
.soundBtn.wide{ width:100%; padding: 12px; font-size: 14px; }
.bigBtn.wide{ width:100%; }
.inviteNote{ color: var(--text-dim); font-size: 13px; margin-bottom: 18px; }
.inviteBlock{ margin-bottom: 10px; }
.inviteDivider{ color: var(--text-dim); font-size: 12px; margin: 14px 0; }
.roomCodeDisplay{ margin-top: 12px; background: rgba(124,247,255,0.1); border: 1px solid rgba(124,247,255,0.3);
  color: var(--accent-cyan); padding: 10px; border-radius: 10px; font-size: 16px; letter-spacing: 2px; }
.codeInput{ width:100%; background: #1c1c28; border: 2px solid var(--panel-border); color: var(--text);
  padding: 12px; border-radius: 10px; text-align:center; letter-spacing: 4px; font-weight: 800; font-size: 16px;
  margin-bottom: 10px; text-transform: uppercase; }
.inviteStatus{ font-size: 12px; color: var(--accent-gold); margin-top: 14px; line-height: 1.6; }
.inviteCopyBtn{ margin-top: 10px; }
/* fixed-height fallback when the browser blocks clipboard access — keeps the
   panel from growing past its cap (which forced the page to scroll) */
.inviteLinkField{ margin-top: 8px; margin-bottom: 0; font-size: 12px; letter-spacing: 0;
  text-align: left; text-transform: none; }
.inviteStatus code{ background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 4px; }

/* A phone in portrait gets TWO columns, not three. Three tracks inside ~350px
   of content width left each card ~105px — too narrow for the price pill and
   the ADS button to sit side by side, which is what made the shop look messy.
   Two columns keep the card wide enough that .skinBtnRow stays on one line. */
@media (max-width: 560px){
  .cardGrid{ grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ---- shop: touch ergonomics ---------------------------------------------
   CrazyGames requires a real tap target on touch: 44px is the platform
   minimum, and .skinBtn ships at 30px. Applied by pointer capability rather
   than by width so a touchscreen laptop gets it too, and a desktop mouse on a
   narrow window does not lose the compact styling it is fine with. */
@media (pointer: coarse){
  /* .skinBtn.adBtn carries its own min-height:32px at (0,2,0) — matching that
     specificity here is what makes the ad button a real tap target too */
  .skinBtn,
  .skinBtn.adBtn,
  .shopTab,
  .rerollBtn{ min-height: 44px; }
  .skinBtnRow{ gap: 8px; }
  /* Two buttons plus their icons cannot share one 44px-tall row on a narrow
     card without the labels wrapping mid-word. Stack them instead — the card
     grows, the grid reflows, nothing is clipped. */
  .skinBtnRow{ flex-wrap: wrap; }
  .skinBtnRow > .skinBtn{ flex: 1 1 100%; }
}

/* ===================== REWARD / JUICE FX ===================== */
/* one-shot pop applied by _countUp / _flyReward / _pulse */
.bump{ animation: pillPop 0.45s cubic-bezier(0.2, 1.9, 0.4, 1); }

/* coins/gems flying to a counter pill (_flyReward) */
.flyParticle{ position:fixed; z-index:90; width:26px; height:26px; pointer-events:none; will-change:transform; }
.flyParticle svg{ width:100%; height:100%; display:block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }

/* expanding ring flash (_ringBurst) — upgrades, skin switches */
.ringBurst{ position:fixed; z-index:60; border-radius:50%; pointer-events:none;
  border: 4px solid var(--rb, #ffd24a);
  box-shadow: 0 0 24px var(--rb, #ffd24a), inset 0 0 18px var(--rb, #ffd24a);
  animation: ringBurstAnim 0.55s ease-out forwards; }
@keyframes ringBurstAnim{ from{ opacity:1; transform: scale(0.35); } to{ opacity:0; transform: scale(1.6); } }

/* stat rows cascade-flash after an upgrade (stagger set inline) */
.statRow.flashUp{ animation: statFlash 0.8s ease backwards; }
@keyframes statFlash{ 0%{ filter: brightness(2.1); transform: translateX(6px); }
  100%{ filter:none; transform:none; } }

/* battle pass: tier medal + fresh premium cells pop (the XP bar itself is
   tweened by _animateBpBar, so no CSS width transition here) */
.bpTierMedal.medalPop{ animation: badgePop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }

/* skin reward cells: rarity ribbon over the thumb + character name under */
.bpCell .rarityTag{ top: 3px; z-index: 2; font-size: 8px; padding: 3px 8px; }
.bpCell.justUnlocked{ animation: badgePop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1) backwards; }

/* white flash over the hub showcase when the equipped look changes */
.showcaseFlash{ position:absolute; inset:0; z-index:6; pointer-events:none; opacity:0;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.85), transparent 65%); }
.showcaseFlash.show{ animation: vignetteFlash 0.5s ease-out; }

/* ===================== HERO REVEAL (new brawler / skin) ===================== */
/* suspense phase: dark stage, dim rays, the live 3D model as a pulsing black
   silhouette — .revealed flips everything on with a flash */
.heroOverlay{ display:none; position:fixed; inset:0; z-index:42; align-items:center; justify-content:center;
  background: radial-gradient(circle at 50% 42%, #262638, #101018 60%, #08080e); overflow:hidden; }
.heroOverlay.active{ display:flex; animation: heroFadeIn 0.35s ease; }
@keyframes heroFadeIn{ from{ opacity:0; } }

/* wrapper keeps the rays + shockwaves dead-center behind the 3D model —
   margin-centered (not transform), so the rotate animation can't shift them */
.heroModelWrap{ position:relative; display:flex; align-items:center; justify-content:center; }
.heroRays{ position:absolute; left:50%; top:50%; width:1300px; height:1300px; margin:-650px 0 0 -650px;
  background: repeating-conic-gradient(from 0deg, var(--hero,#ffd24a) 0deg 9deg, transparent 9deg 24deg);
  opacity:0.1; border-radius:50%; animation: heroRaysSpin 16s linear infinite; pointer-events:none;
  -webkit-mask-image: radial-gradient(circle, #000 18%, transparent 66%);
  mask-image: radial-gradient(circle, #000 18%, transparent 66%); }
@keyframes heroRaysSpin{ to{ transform: rotate(360deg); } }
.heroOverlay.revealed .heroRays{ opacity:0.32; }

.heroStage{ position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; }
.heroGround{ position:absolute; left:50%; top:56%; width:280px; height:56px; transform:translateX(-50%);
  border-radius:50%; background: color-mix(in srgb, var(--hero,#ffd24a) 50%, transparent);
  filter: blur(24px); opacity:0.35; pointer-events:none; }
.heroOverlay.revealed .heroGround{ opacity:0.65; }

#heroCanvas{ position:relative; width:min(64vw, 330px); height:auto;
  filter: brightness(0) drop-shadow(0 0 26px var(--hero,#ffd24a));
  animation: heroBob 1.1s ease-in-out infinite; }
.heroOverlay.revealed #heroCanvas{ filter: brightness(1) drop-shadow(0 14px 30px rgba(0,0,0,0.55));
  animation: heroLand 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes heroBob{ 0%, 100%{ transform: scale(0.93); } 50%{ transform: scale(1); } }
@keyframes heroLand{ 0%{ transform: scale(1.3); } 100%{ transform: scale(1); } }

.heroShockwave{ position:absolute; left:50%; top:50%; width:220px; height:220px; margin:-110px;
  border-radius:50%; border: 5px solid var(--hero,#ffd24a); opacity:0; pointer-events:none; }
.heroOverlay.revealed .heroShockwave{ animation: heroShock 0.7s ease-out; }
.heroOverlay.revealed .heroShockwave.two{ animation: heroShock 0.7s ease-out 0.16s; }
@keyframes heroShock{ 0%{ opacity:0.9; transform: scale(0.3); } 100%{ opacity:0; transform: scale(3); } }

.heroKind{ font-family: var(--hud-font); font-weight:400; font-size: 14px; letter-spacing: 3px; color:#10101a;
  background: var(--hero,#ffd24a); padding: 6px 20px; border-radius: 999px; margin-top: 4px;
  box-shadow: 0 4px 0 rgba(0,0,0,0.35), 0 0 24px var(--hero,#ffd24a); opacity:0; }
.heroOverlay.revealed .heroKind{ animation: heroStamp 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) 0.12s forwards; }
@keyframes heroStamp{ 0%{ opacity:0; transform: scale(2.4) rotate(-6deg); } 100%{ opacity:1; transform:none; } }

.heroName{ font-family: var(--hud-font); font-weight:400; font-size: clamp(44px, 9vw, 72px); line-height:1.05;
  color:#fff; letter-spacing: 2px; margin-top: 10px; opacity:0;
  text-shadow: 0 5px 0 rgba(0,0,0,0.4), 0 0 36px var(--hero,#ffd24a); }
.heroOverlay.revealed .heroName{ animation: heroSlam 0.5s cubic-bezier(0.15, 1.4, 0.3, 1) 0.05s forwards; }
@keyframes heroSlam{ 0%{ opacity:0; transform: scale(3); } 60%{ opacity:1; } 100%{ opacity:1; transform: scale(1); } }

.heroSub{ color: #cfd0e6; font-size: 14px; margin-top: 10px; opacity:0; }
.heroSub .ic svg{ width: 14px; height: 14px; vertical-align: -2px; }
.heroOverlay.revealed .heroSub{ animation: heroRise 0.4s ease 0.35s forwards; }
@keyframes heroRise{ from{ opacity:0; transform: translateY(14px); } to{ opacity:1; transform:none; } }

.heroCollect{ margin-top: 20px; opacity:0; pointer-events:none; }
.heroOverlay.revealed .heroCollect{ animation: heroRise 0.4s ease 0.55s forwards; pointer-events:auto; }

.heroFlash{ position:absolute; inset:0; background:#fff; opacity:0; pointer-events:none; }
.heroOverlay.revealed .heroFlash{ animation: vignetteFlash 0.55s ease-out; }

/* ---- hero reveal on small (phone) screens: the whole stage — canvas,
   stamp, name, sub, COLLECT — must fit the viewport. MUST stay at the end
   of the file: the hero base rules above would otherwise win the cascade. */
@media (max-height: 640px), (max-width: 480px){
  .heroOverlay{ overflow-y: auto; }
  #heroCanvas{ width: auto; height: min(38vh, 170px); }
  .heroGround{ width: 140px; height: 28px; }
  .heroKind{ font-size: 9px; padding: 3px 10px; margin-top: 2px; }
  .heroName{ font-size: clamp(20px, 7vh, 30px); margin-top: 3px; }
  .heroSub{ font-size: 10px; margin-top: 3px; }
  .heroCollect{ margin-top: 6px; min-width: 110px; font-size: 14px; padding: 8px 14px; }
}

/* ================= Dynamic text safety net =================
   The UI uses chunky display fonts, clipped gradients, skewed buttons and
   tight pills. These rules give dynamic labels enough measured room for glyph
   overhang, changing digit counts and narrow responsive layouts without
   changing the overall proportions. */
:where(.pageHeader, .hubTopBar, .hubCurrencies, .playerBadge, .playerInfo,
  .playerNameRow, .badgeTrophies, .currencyPill, .headerCurrencies,
  .hudPanel, .hudBars, .hudInfoRow, .scoreShield .shieldInner,
  .modeTag, .modeStats, .killRow, .resultStats, .resultRewards,
  .lbRow, .bpProgressRow, .bpBuyRow, .couponRow, .settingsRow,
  .versusRibbon, .versusBody, .versusTeam, .versusMeta,
  .showcaseNameRow, .showcaseNameWrap, .showcaseTrophyRow,
  .friendSlot.filled, .eventMode, .eventPickBanner, .mapPreviewTitle,
  .mmBox, .dailyTrack, .helpTabs){
  min-width: 0;
}

:where(.badgeTrophyCount, #showcaseTrophies, .friendTrophyCount,
  .currencyPill, .lbScore, .scoreNum, #matchTimer, .hpBarText,
  .hudPill, .modeStat, .respawnTimer, #trophyAnimCount,
  .trophyAnimDelta, .rankNextLabel, .dailyDayAmt, .packAmount,
  .boxTilePrice, .charMetaChip, .versusMeta span, .resultStatPill b,
  .rewardPill, .bpTierLabel, .bpXpLabel, .bpTierMedal){
  font-variant-numeric: tabular-nums;
  line-height: 1.18;
}

:where(.badgeTrophyCount, #showcaseTrophies, .friendTrophyCount,
  .scoreNum, #matchTimer, #trophyAnimCount, .trophyAnimDelta,
  .respawnTimer){
  display: inline-block;
  min-width: max-content;
  padding-inline: 0.05em 0.18em;
}

.badgeTrophies{
  flex: 0 0 auto;
  min-width: max-content;
  padding-right: 16px;
}
.badgeTrophyCount{ min-width: 2.4ch; text-align:right; }
#totalTrophies{ min-width: 2.8ch; }
.showcaseTrophyRow{ max-width: 100%; padding-inline: 2px 4px; }
#showcaseTrophies{ min-width: 2.6ch; text-align:center; }
.friendTrophyCount{ min-width: 2.5ch; text-align:center; }

.hubTopBar{
  gap: 12px;
  min-width: 0;
}
.playerBadge{
  flex: 1 1 auto;
  width: auto;
  max-width: min(58vw, 390px);
  min-width: 0;
  padding-right: 20px;
}
.playerInfo{ flex: 1 1 auto; }
.playerNameRow{ max-width: 100%; }
.playerName{
  display: inline-block;
  max-width: min(220px, 30vw);
  min-width: 4ch;
  padding-inline: 0.03em 0.28em;
  line-height: 1.24;
}
.rankRing span{ display:block; line-height:1.1; padding-inline: 1px; }

.hubCurrencies{
  flex: 0 1 auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.currencyPill{
  flex: 0 0 auto;
  min-width: max-content;
  padding-right: 19px;
  white-space: nowrap;
}
.currencyPill .ic{ flex: 0 0 auto; }
.headerCurrencies{
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.headerCurrencies .coinDisplay,
.headerCurrencies .gemDisplay{
  min-width: max-content;
  white-space: nowrap;
  padding-right: 16px;
}

.pageHeaderTitle{
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.18;
  padding-right: 4px;
}
:where(.backBtn, .bigBtn, .ghostBtn, .soundBtn, .skinBtn, .shopTab,
  .rerollBtn, .bpPremiumBtn, .bpBuyBtn, .playBtnHub, .bindKeyBtn,
  .dailyClaimBtn, .slotActionBtn){
  min-height: max-content;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

:where(.charName, .skinName, .wardrobeSkinName, .boxTileName, .boxTilePrice,
  .packWhat, .packAmount, .detailRole, .detailBadge, .statLabel, .statValue,
  .statSub, .detailSuperDesc, .bpLabel, .dailyDayNum, .dailyDayAmt,
  .couponStatus, .inviteStatus, .roomCodeDisplay, .helpRowTitle,
  .helpRowDesc, .mmText, .mmSupport, .mmCountdown, .eventMap,
  .eventPickMap, .eventPickDesc, .mapPreviewTitle, .resultTitle,
  .resultStatPill, .rewardPill, .boxRewardLabel, .heroKind,
  .heroName, .heroSub){
  overflow-wrap: anywhere;
}

:where(.playerName, .showcaseName, .friendPlayerName, .badgeTrophyCount,
  #showcaseTrophies, .friendTrophyCount, .scoreNum, #matchTimer,
  .hpBarText, .hudPill, .modeStat, .lbScore, .versusPlayer,
  .versusChar, .versusHint, .resultTitle, .heroName, .mmText,
  .mmCountdown){
  text-rendering: geometricPrecision;
}

.showcaseNameWrap{
  max-width: min(78vw, 460px);
  padding-inline: 0.08em 0.22em;
}
.showcaseName{
  display: block;
  max-width: 100%;
  line-height: 1.16;
  padding-inline: 0.03em 0.16em;
  white-space: nowrap;
}
.showcasePwr{
  left: calc(100% + 12px);
  min-width: max-content;
}
.friendSlot.filled .showcaseNameWrap{
  max-width: 174px;
}
.friendSlot.filled .showcaseName{
  overflow: visible;
  text-overflow: clip;
  padding-right: 0.24em;
}
.friendSlot.filled .showcasePwr{
  left: calc(100% + 7px);
}

.lbRow{ min-width: 0; }
.lbRank{ flex: 0 0 auto; }
.lbName{
  min-width: 0;
  padding-right: 0.35em;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.lbScore{
  flex: 0 0 auto;
  min-width: max-content;
  padding-left: 4px;
}

.scoreShield .shieldInner{
  padding-inline: 10px;
}
.scoreNum{
  min-width: 2ch;
  overflow: visible;
}
#matchTimer{
  min-width: 4.6ch;
  text-align:center;
}
.modeTag{
  max-width: min(46vw, 360px);
}
#modeTitle{
  min-width: 0;
  overflow-wrap: anywhere;
}
.modeStats{
  max-width: min(92vw, 460px);
  overflow-wrap: anywhere;
}
.killFeed{
  max-width: min(48vw, 360px);
}
.killRow{
  max-width: 100%;
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.hudBars{
  width: clamp(112px, 22vw, 190px);
}
.hpBarText{
  padding-inline: 6px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.hudInfoRow{
  flex-wrap: wrap;
}
.hudPill{
  min-width: max-content;
  padding-right: 11px;
}

.dailyPanel,
.helpPanel,
.wardrobeBox,
.mapPreviewBox,
.slotActionBox,
.mmBox{
  min-width: 0;
}
.dailyTrack{ align-items: stretch; }
.dailyDay{
  width: auto;
  min-width: 68px;
  padding-inline: 7px;
}
.dailyDay .dailyDayAmt{
  line-height: 1.2;
  padding-inline: 1px;
}
.mmText,
.mmSupport,
.mmCountdown{
  max-width: 100%;
  line-height: 1.24;
}
.mmCountdown{
  min-width: 12ch;
  text-align:center;
}

.versusScreen{
  padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
}
.versusRibbon{
  max-width: min(94vw, 620px);
}
.versusRibbonText{ min-width: 0; }
.versusModeName,
.versusMapName{
  overflow-wrap: anywhere;
}
.versusBody{
  max-width: 100%;
}
.versusTeam{
  min-width: 0;
}
.versusCard{
  min-width: 0;
  overflow: visible;
}
.versusPlayer,
.versusChar{
  display: block;
  min-width: 0;
  max-width: 100%;
  padding-inline: 0.08em 0.24em;
  line-height: 1.22;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
/* The stat row is a rank badge + trophy count and a power-level pill. It used
   to be a flex row of two `min-width: max-content` pills, which together need
   more width than the card's content box, so they wrapped raggedly and bled
   past the card border (the fixed-size rank SVG can't shrink, and
   _fitDynamicText only ever reduces font-size). A two-column grid gives each
   pill exactly half the row and lets both shrink, so the row is always
   contained no matter how many digits the numbers have. */
.versusMeta{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: stretch;
  gap: 5px;
  width: 100%;
}
.versusMeta span{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  padding: 3px 6px;
  line-height: 1.18;
  white-space: nowrap;
}

.resultScreen{
  overflow:hidden;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
.resultWrap{
  width: min(100%, 720px);
  margin: auto;
  padding-inline: 6px;
}
.resultTitle{
  max-width: 100%;
  /* 1.3 holds the italic stroked glyphs inside the line box; nowrap keeps it on
     one line so the text-fit sees a WIDTH overflow instead of a wrapped title */
  line-height: 1.3;
  white-space: nowrap;
  padding-inline: 0.08em 0.18em;
}
.resultStats,
.resultRewards{
  flex-wrap: wrap;
  max-width: 100%;
}
.resultStatPill,
.rewardPill{
  min-width: max-content;
  line-height: 1.22;
}
.trophyAnim{
  max-width: min(92vw, 420px);
}

@media (max-width: 760px){
  .playerBadge{ max-width: min(56vw, 300px); }
  .playerName{ max-width: min(150px, 24vw); }
  .hubCurrencies{ max-width: 44vw; }
  .currencyPill{ padding-right: 14px; }
  .headerCurrencies .coinDisplay,
  .headerCurrencies .gemDisplay{ padding-right: 13px; }
  .showcaseNameWrap{ max-width: min(62vw, 280px); }
  .killFeed{ max-width: min(54vw, 260px); }
}

@media (max-height: 640px), (max-width: 480px){
  .hubTopBar{ align-items:flex-start; gap: 6px; }
  .hubBody{
    justify-content: flex-start;
    overflow: visible;
  }
  .hubSidebar{
    flex: 0 0 auto;
  }
  .hubCenter{
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0 !important;
  }
  .showcaseRow{
    grid-template-columns: 54px minmax(108px, 1fr) 54px;
    gap: 7px;
    max-width: 100%;
  }
  .playerBadge{
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "rank name"
      "rank trophies";
    column-gap: 7px;
    row-gap: 2px;
    align-items: center;
    max-width: min(58vw, 230px);
    padding-right: 12px;
  }
  .playerBadge .rankRing{ grid-area: rank; }
  .playerBadge .playerInfo{ grid-area: name; width: 100%; }
  .playerBadge .badgeTrophies{ grid-area: trophies; justify-self:start; margin-left: 0; }
  .playerName{
    max-width: 100%;
    padding-right: 0.32em;
    line-height: 1.28;
  }
  .badgeTrophies{
    padding-right: 11px;
    gap: 4px;
  }
  .badgeTrophyCount{ min-width: 2.2ch; }
  .hubCurrencies{
    max-width: 46vw;
    gap: 5px;
  }
  .currencyPill{
    padding-right: 11px;
    letter-spacing: 0.2px;
  }
  .showcaseNameWrap{ max-width: min(54vw, 190px); }
  .showcasePwr{ left: calc(100% + 6px); }
  .friendSlot.filled .showcaseNameWrap{ max-width: 82px; }
  .friendSlot.filled .showcaseName{ padding-right: 0.28em; }
  .friendTrophyCount{ min-width: 2.3ch; }
  .hubBottom{
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 8px;
    overflow: visible;
  }
  .eventCard{
    order: 1;
    flex: 0 1 auto;
  }
  .playBtnHub{
    order: 2;
    flex: 0 0 auto;
  }
  .hubBoxes{
    order: 3;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }
  .scoreShield .shieldInner{ padding-inline: 6px; }
  .scoreNum{ min-width: 1.8ch; }
  #matchTimer{ min-width: 4.2ch; padding-right: 0.12em; }
  .modeTag{ max-width: min(44vw, 180px); }
  .killFeed{ max-width: min(52vw, 190px); }
  .hpBarText{ padding-inline: 4px; letter-spacing: 0.1px; }
  .hudPill{ padding-right: 8px; }
  .dailyDay{ min-width: 58px; }
  .versusPlayer,
  .versusChar{ padding-right: 0.28em; }
  .resultStatPill,
  .rewardPill{ min-width: 0; }
}

/* CrazyGames game frames are commonly wide but only ~450-560px tall. Keep
   the hub's three bottom groups on the compact single row; a late text-safety
   rule previously wrapped loot boxes to a clipped third row.

   These two blocks are keyed off .vpShort/.vpNarrow/.vpTight — classes boot.js
   sets from the MEASURED viewport — rather than off @media (max-height). iOS
   Safari resolves media-query heights against the LARGE viewport (toolbars
   hidden), so on an iPad whose visible frame is ~590px tall these rules could
   fail to match while the UI box was correctly sized to 590px: the hub was
   then laid out for a tall screen inside a short one and its bottom row fell
   off the frame. On desktop the class and the media query always agree, so
   Windows behaviour is unchanged. */
html.vpShort:not(.vpNarrow) .hub{ min-height:0; }
html.vpShort:not(.vpNarrow) .hubTopBar,
html.vpShort:not(.vpNarrow) .hubBottom{ flex-shrink:0; }
html.vpShort:not(.vpNarrow) .hubBody{ min-height:0; overflow:hidden; }
html.vpShort:not(.vpNarrow) .hubCenter{ min-height:0; overflow:hidden; }
html.vpShort:not(.vpNarrow) .hubBottom{
  flex-wrap:nowrap;
  justify-content:space-between;
  align-items:flex-end;
  gap:10px;
  overflow:hidden;
}
html.vpShort:not(.vpNarrow) .eventCard,
html.vpShort:not(.vpNarrow) .playBtnHub,
html.vpShort:not(.vpNarrow) .hubBoxes{ order:initial; }
html.vpShort:not(.vpNarrow) .eventCard{ flex:0 0 150px; }
html.vpShort:not(.vpNarrow) .playBtnHub{ flex:0 0 auto; }
html.vpShort:not(.vpNarrow) .hubBoxes{ width:auto; max-width:none; flex:0 1 auto; flex-wrap:nowrap; }

/* Very narrow landscape embeds still use one row, but every group has a
   bounded footprint so the right-most reward tile cannot be clipped. */
html.vpShort.vpTight:not(.vpNarrow) .hubBottom{ gap:5px; padding-inline:8px; }
html.vpShort.vpTight:not(.vpNarrow) .eventCard{ flex-basis:118px; width:118px; }
html.vpShort.vpTight:not(.vpNarrow) .playBtnHub{ min-width:108px; padding-inline:11px; font-size:14px; }
html.vpShort.vpTight:not(.vpNarrow) .hubBoxes{ gap:4px; }
html.vpShort.vpTight:not(.vpNarrow) .hubBoxTile{ min-width:0; padding:4px 5px; border-width:2px; }
html.vpShort.vpTight:not(.vpNarrow) .boxTileIcon{ width:27px; height:27px; }
html.vpShort.vpTight:not(.vpNarrow) .boxTilePrice{ padding-inline:5px; font-size:10px; }

/* ---- sidebar vertical fit -------------------------------------------------
   The sidebar is a fixed stack of five tiles. When .hubBody is shorter than
   that stack, the stack overflowed it and painted UNDER the top bar (z-index 3)
   and the reward row (z-index 2, later in the DOM) — the Shop tile vanishing
   behind the player badge and the Daily tile behind the event card.

   This is invisible to the hub's own fit check: .hubBody is flex:1 with
   align-items:center, so the overflow is absorbed by the centring and never
   grows .hub's scrollHeight. Hence a separate measurement in boot.js.

   The fold itself is the same 2-column grid the short-screen rules have always
   used at (max-height: 640px) — this just lets it fire above that breakpoint
   too, when the stack genuinely does not fit. The centre is deliberately NOT
   re-padded, matching what the <=640px rules already do. */
html.vpSideFold .hubSidebar{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
html.vpSideFold .sideTile{ width: 60px; padding: 6px 3px 5px; font-size: 8px; border-radius: 12px; gap: 2px; }
html.vpSideFold .sideTile .sideIcon{ width: 18px; height: 18px; }

/* Results are a fixed game state, not a document page. It always scales into
   the available frame and therefore never exposes browser/page scrolling. */
.resultScreen{
  overflow:hidden !important;
  overscroll-behavior:none;
  touch-action:none;
}
.resultWrap{
  max-height:100%;
  overflow:hidden;
}
@media (max-height: 640px){
  .resultScreen{ padding:6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left)); }
  .resultWrap{ gap:3px; padding:2px 0; }
  .resultTitle{ font-size:clamp(21px, 6vh, 28px); }
  .resultChar{ width:clamp(54px, 15vh, 74px); height:clamp(54px, 15vh, 74px); }
  .resultStats,
  .resultRewards{ flex-wrap:nowrap; gap:5px; }
  .resultStatPill,
  .rewardPill{ padding:3px 8px; font-size:9px; }
  .trophyAnim{ margin:1px auto; padding:4px 9px; }
  .resultBtns{ margin-top:2px; gap:4px; }
}

/* Final cascade guard for the synchronized CrazyGames iframe viewport. */
.screen,
#gameCanvas,
#hud,
.versusScreen,
.mmOverlay,
.mapPreviewOverlay,
.dailyOverlay,
.helpOverlay,
.boxOverlay,
.heroOverlay{
  width:var(--app-width);
  height:var(--app-height);
  max-width:100%;
  max-height:100%;
}
.screen{ overflow:hidden !important; overscroll-behavior:none; touch-action:manipulation; }
.pageContent,.helpContent,.wardrobeScroll,.dailyPanel,.slotActionBox{
  overscroll-behavior:contain;
  touch-action:pan-y;
}
.pagePanel{ max-height:calc(var(--app-height) - 24px); max-width:calc(var(--app-width) - 24px); }
.pagePanel.small,.slotActionBox,.mapPreviewBox,.wardrobeBox,.dailyPanel,.helpPanel,.mmBox{
  max-height:calc(var(--app-height) - 24px);
  max-width:calc(var(--app-width) - 24px);
}
body:not(.touch) .joyZone{ display:none !important; pointer-events:none !important; visibility:hidden !important; }
body.touch .joyZone{ visibility:visible; }
@media (max-height:640px), (max-width:480px){
  .pagePanel,.pagePanel.small{
    width:var(--app-width); height:var(--app-height); max-width:100%; max-height:100%; border-radius:0;
  }
}

/* Portrait phones (kept last so it beats the compact rules above): the compact (max-width:480px) sizes are tuned for short
   frames, but a tall portrait screen has height to spare while the card is
   limited by its width. A bigger title and brawler use that room instead of
   leaving the top and bottom thirds empty. */
@media (max-width: 480px) and (min-height: 641px){
  .resultTitle{ font-size: 36px; }
  .resultChar{ width: 132px; height: 132px; }
}

/* ================= lobby polish + ad deals (update 2) =================
   Everything here stays INSIDE existing boxes: badges sit within their tile
   (the tiles clip with overflow:hidden), the NEW MAP tag lives inside the
   event card, and the Daily Deals row reuses the 6-column pack grid. */
.sideTile .badge{ top: 5px; right: 5px; z-index: 2; min-width: 18px; width: auto; padding: 0 5px;
  border-radius: 9px; border: 2px solid rgba(0,0,0,0.25); box-shadow: 0 2px 0 rgba(0,0,0,0.3);
  animation: badgeBeat 1.4s ease-in-out infinite; }
.sideTile .badge.newBadge{ font-size: 8.5px; letter-spacing: 0.5px; color: #3a2404;
  background: linear-gradient(180deg, #ffe98a, #ffb01f); }
@keyframes badgeBeat{ 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.18); } }
/* idle shine sweeps across the sidebar every few seconds, staggered per tile */
.sideTile::after{ animation: sideShine 6s ease-in-out infinite; }
.sideTile:nth-child(2)::after{ animation-delay: 1.2s; }
.sideTile:nth-child(3)::after{ animation-delay: 2.4s; }
.sideTile:nth-child(4)::after{ animation-delay: 3.6s; }
.sideTile:nth-child(5)::after{ animation-delay: 4.8s; }
.sideTile:hover::after{ animation: none; }
@keyframes sideShine{ 0%, 78%{ left: -60%; } 94%, 100%{ left: 135%; } }
.sideTile .sideIcon{ animation: sideIconBob 2.8s ease-in-out infinite; }
.sideTile:nth-child(even) .sideIcon{ animation-delay: 1.4s; }
@keyframes sideIconBob{ 0%,100%{ transform: translateY(0) rotate(-4deg); } 50%{ transform: translateY(-3px) rotate(4deg); } }

.eventNewTag{ position:absolute; top: 8px; left: 8px; z-index: 2; padding: 3px 9px 4px; border-radius: 9px;
  font-family: var(--hud-font); font-size: 11px; letter-spacing: 1px; color: #3a2404;
  background: linear-gradient(180deg, #ffe98a, #ffb01f); border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 0 2px 0 rgba(0,0,0,0.35); animation: badgeBeat 1.6s ease-in-out infinite; }

/* ---- shop: Daily Deals ---- */
.dealsSection .shopSectionTitle{ color: #7dff8f; }
.packCard.deal{ position:relative; overflow:hidden;
  border-color: rgba(87,176,255,0.6); background: linear-gradient(180deg, #1b2c52, #121a33);
  box-shadow: 0 4px 0 rgba(0,0,0,0.3), 0 0 14px rgba(87,176,255,0.25); }
.packCard.deal .packAmount{ font-size: 15px; text-align:center; line-height: 1.15; min-height: 2.3em;
  display:flex; align-items:center; }
.dealRibbon{ position:absolute; top: 9px; left: -24px; width: 90px; transform: rotate(-38deg);
  text-align:center; font-family: var(--hud-font); font-size: 11px; letter-spacing: 1px; color:#fff;
  background: linear-gradient(180deg, #3ddc55, #1a9a3a); box-shadow: 0 2px 0 rgba(0,0,0,0.35); }
.packCard.deal::after{ content:''; position:absolute; top:-30%; bottom:-30%; left:-60%; width:40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-20deg); animation: sideShine 5s ease-in-out infinite; pointer-events:none; }
.packCard.deal:nth-child(2n)::after{ animation-delay: 1.6s; }
.packCard.deal:nth-child(3n)::after{ animation-delay: 3.1s; }

/* ---- daily: "+1" ad bonus under CLAIM ---- */
.dailyBonusBtn{ display:flex; align-items:center; justify-content:center; gap: 10px; width: 100%;
  margin-top: 12px; padding: 10px 14px; border-radius: 14px; cursor:pointer; color:#fff;
  font-family: var(--hud-font); font-size: 15px; letter-spacing: 0.5px; white-space: nowrap;
  background: linear-gradient(180deg, #57b0ff, #2a6fd0); border: 3px solid #123a7a;
  box-shadow: 0 5px 0 #0d2a5a, 0 0 18px rgba(87,176,255,0.45);
  animation: doubleGlow 1.6s ease-in-out infinite; }
.dailyBonusBtn .ic{ width: 18px; height: 18px; display:inline-flex; vertical-align: -3px; }
.dailyBonusBtn .ic svg{ width:100%; height:100%; }
.dailyBonusBtn .dbPlus{ display:inline-flex; align-items:center; justify-content:center; min-width: 30px; height: 30px;
  border-radius: 50%; font-size: 15px; color:#3a2404; background: linear-gradient(180deg, #ffe98a, #ffb01f);
  border: 2px solid rgba(0,0,0,0.3); }
.dailyBonusBtn .dbText{ overflow:hidden; text-overflow: ellipsis; }
.dailyBonusBtn .dbAd{ display:inline-flex; align-items:center; gap: 5px; padding: 3px 9px; border-radius: 9px;
  background: rgba(0,0,0,0.25); }
.dailyBonusBtn .dbHint{ font-size: 11px; opacity: 0.75; }
.dailyBonusBtn:active{ transform: translateY(3px); box-shadow: 0 2px 0 #0d2a5a; }
.dailyBonusBtn.locked, .dailyBonusBtn.done{ cursor: default; animation: none; box-shadow: none;
  background: linear-gradient(180deg, #3a3a52, #2a2a3c); border-color: rgba(255,255,255,0.15); color: var(--text-dim); }
.dailyBonusBtn.done .dbPlus{ background: linear-gradient(180deg, #7dff8f, #2ecc40); }
@media (max-height: 520px){ .dailyBonusBtn{ margin-top: 7px; padding: 6px 10px; font-size: 13px; }
  .dailyBonusBtn .dbPlus{ min-width: 24px; height: 24px; font-size: 12px; } }
/* 10 deals per 3-hour lineup: two even rows of five, never a ragged 6+4 */
.packGrid.dealsGrid{ grid-template-columns: repeat(5, 1fr); }
@media (max-width: 560px){ .packGrid.dealsGrid{ grid-template-columns: repeat(2, 1fr); } }
/* short landscape frames: the +1 bonus row made the daily panel scroll —
   tighten the panel so CLAIM and BONUS both fit without scrolling */
@media (max-height: 520px){
  .dailyPanel{ padding: 12px 16px 12px; }
  .dailyTitle{ font-size: 20px; }
  .dailySub{ display:none; }
  .dailyResetLabel{ margin: 2px 0 8px; }
  .dailyTrack{ gap: 6px; margin-bottom: 10px; }
  .dailyDay{ min-height: 64px; padding: 5px 4px; }
  .dailyClaimBtn{ padding-top: 9px; padding-bottom: 9px; font-size: 20px; }
}

/* ---- short-frame sidebar: bigger 2-col tiles (QA: "appears small") ----
   The CrazyGames desktop embed is ~1000x530, which lands in the
   (max-height:640px) block above and used to fold the sidebar into 60px tiles
   with 8px labels. There is plenty of vertical room for a 3-row grid of
   bigger tiles; boot.js still measures the stack and, only if THIS does not
   fit, falls back to the compact .vpSideFold tiles below. */
@media (max-height: 640px){
  html:not(.vpNarrow):not(.vpSideFold) .hubSidebar{ gap: 8px; }
  html:not(.vpNarrow):not(.vpSideFold) .sideTile{ width: 80px; padding: 9px 4px 8px; font-size: 11px; border-radius: 15px; gap: 3px; }
  html:not(.vpNarrow):not(.vpSideFold) .sideTile .sideIcon{ width: 28px; height: 28px; }
}

/* ---- hero reveal: never scroll, and use the height the frame actually has.
   QA saw a scrollbar on the brawler reveal in the ~1000x530 embed: the rays and
   shockwaves are large absolute layers, and the short-screen block made the
   overlay overflow-y:auto, so they produced a scroll range. The stage itself
   always fits — it is now sized from the frame height (--ui-vh), which also
   makes the brawler much bigger than the old fixed 170px. */
@media (max-height: 640px), (max-width: 480px){
  .heroOverlay{ overflow: hidden !important; }
  .heroModelWrap{ max-width: 100%; }
  #heroCanvas{ width: auto; height: clamp(130px, calc(var(--ui-vh, 530px) - 250px), 290px); }
  .heroGround{ width: 200px; height: 40px; }
  .heroKind{ font-size: 11px; padding: 4px 14px; }
  .heroName{ font-size: clamp(24px, 8vh, 44px); margin-top: 4px; }
  .heroSub{ font-size: 11px; margin-top: 4px; }
  .heroCollect{ margin-top: 8px; min-width: 130px; font-size: 16px; padding: 9px 18px; }
}
/* the kill feed starts BELOW the pause button and its "P" key hint (QA: the
   feed row was drawn over the button in the short embed) */
@media (max-height: 640px), (max-width: 480px){
  .killFeed{ top: calc(max(12px, env(safe-area-inset-top)) + 68px); }
}
/* portrait phones: the invite circles (64px) were wider than their 54px grid
   columns — the left one slid under the folded sidebar, the right one past the
   screen edge. Size them to their columns. */
html.vpNarrow .showcaseRow{ grid-template-columns: 48px minmax(100px, 1fr) 48px; gap: 4px; }
html.vpNarrow .friendSlot{ width: 48px; height: 48px; min-width: 0; }
html.vpNarrow .friendSlot .friendPlus{ font-size: 16px; }
html.vpNarrow .friendSlot .friendLabel{ font-size: 8px; }
/* taller frames that still fold (iPad embed ~1170x665) have room for bigger
   folded tiles than the 60px phone-landscape fallback */
@media (min-height: 641px){
  html.vpSideFold .sideTile{ width: 70px; font-size: 9.5px; border-radius: 13px; }
  html.vpSideFold .sideTile .sideIcon{ width: 22px; height: 22px; }
}
