/* =========================================================================
   EVOCLASH.IO — full UI stylesheet (menu + HUD)
   ========================================================================= */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: #16100a;
  font-family: 'Arial Black', 'Segoe UI', Arial, sans-serif;
  /* NOTE: touch-action stays default here — setting `none` on body would
     also kill touch scrolling in the menus (it intersects down the tree).
     The canvas + touch controls opt out individually below. */
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
}

button { font-family: inherit; cursor: pointer; border: none; }
button:active { transform: translateY(1px); }

#game-canvas { position: fixed; inset: 0; display: block; touch-action: none; }
#menu-main { -webkit-overflow-scrolling: touch; }
#name-input { user-select: text; -webkit-user-select: text; }

/* ===================================================== loading screen == */
#loading {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background:
    radial-gradient(ellipse at 50% 30%, #3a1f12 0%, #1a0d06 70%);
  color: #fff;
}
#loading .title { font-size: clamp(34px, 7vw, 64px); color: #ff7a18; letter-spacing: 2px;
  text-shadow: 0 4px 0 #5e2400, 0 0 24px rgba(255, 122, 24, .35); }
#loading .bar { width: min(60vw, 340px); height: 14px; border-radius: 8px; background: rgba(255,255,255,.12); overflow: hidden; }
#loading .fill { height: 100%; width: 0%; background: linear-gradient(90deg, #ff7a18, #ffd24a); transition: width .15s; }

/* ============================================================== menu == */
#menu {
  position: fixed; inset: 0; z-index: 20;
  display: flex;
  background:
    radial-gradient(ellipse 120% 80% at 50% -12%, rgba(255,170,60,.12), transparent 60%),
    radial-gradient(ellipse 95% 75% at 50% 118%, rgba(42,84,168,.24), transparent 62%),
    linear-gradient(180deg, #0d1426 0%, #0a1020 55%, #070a14 100%);
  color: #e6ebf5;
}
/* hex-arena backdrop (matches the in-game floor, navy-tinted) — sits behind
   all menu content; absolutely positioned so it is NOT a flex item */
#menu::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='168' height='97'><g fill='none' stroke='%235a82c8' stroke-width='4'><path d='M42 0 84 24.25v48.5L42 97 0 72.75v-48.5zM126 0l42 24.25v48.5L126 97l-42-24.25v-48.5z'/></g></svg>");
  background-size: 82px 47px;
  opacity: .05;
}
/* a soft glow halo directly behind the centerpiece warrior */
#menu::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 360px; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 420px 300px at 50% 60px, rgba(255,160,50,.12), transparent 70%);
}
#sidebar, #menu-body { position: relative; z-index: 1; }
#sidebar { z-index: 3; }

/* ------------------------------------------------------- sidebar rail -- */
#sidebar {
  width: 112px; min-width: 112px; height: 100%;
  background: linear-gradient(180deg, rgba(16,22,42,.96), rgba(9,13,26,.97));
  border-right: 1px solid rgba(120,150,220,.12);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 8px; z-index: 3; box-shadow: 4px 0 26px rgba(0,0,0,.5);
}
#rail-logo { display: flex; flex-direction: column; align-items: center; line-height: 1; padding: 4px 0 12px; }
#rail-logo span:first-child { font-size: 17px; font-weight: 900; color: #fff; letter-spacing: 1px; }
#rail-logo span:last-child { font-size: 9px; font-weight: 900; color: #ffd24a; letter-spacing: 4px; margin-left: 3px; margin-top: 2px; }
#rail-nav { flex: 1; width: 100%; display: flex; flex-direction: column; gap: 5px; }
.side-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; cursor: pointer; position: relative; padding: 9px 4px;
  border-radius: 14px; transition: background .14s, transform .12s;
}
.side-btn:hover { background: rgba(120,150,220,.10); }
.side-btn.active {
  background: linear-gradient(180deg, rgba(255,180,60,.22), rgba(255,150,30,.08));
  box-shadow: inset 0 0 0 1.5px rgba(255,200,90,.5), 0 4px 16px rgba(255,160,40,.22);
}
.side-icon { width: 36px; height: 36px; filter: drop-shadow(0 3px 2px rgba(0,0,0,.5)); transition: transform .14s; }
.side-icon svg { width: 100%; height: 100%; }
.side-btn:hover .side-icon { transform: translateY(-2px) scale(1.08); }
.side-btn.active .side-icon { transform: scale(1.05); }
.side-label { font-size: 11px; font-weight: 900; color: #c2cce0; text-shadow: 0 1px 0 rgba(0,0,0,.6); }
.side-btn.active .side-label { color: #ffe2a8; }
.nav-badge { /* red count on a sidebar nav item when free rewards are waiting */
  position: absolute; top: 4px; right: 8px; min-width: 18px; height: 18px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: #ff4a4a; color: #fff; font-size: 11px; font-weight: 900; line-height: 1;
  border: 2px solid #121a30; box-shadow: 0 0 8px rgba(255,74,74,.85);
  z-index: 4; pointer-events: none; animation: navPulse 1.5s ease-in-out infinite;
}
@keyframes navPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }

/* ------------------------------------------------------------ center body -- */
#menu-body { flex: 1; height: 100%; display: flex; flex-direction: column; position: relative; min-width: 0; }
#app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 4px; min-height: 56px; }
#event-banner {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: linear-gradient(135deg, rgba(40,52,86,.7), rgba(18,24,42,.7));
  border: 1px solid rgba(120,150,220,.25); border-radius: 12px; padding: 8px 14px;
  transition: transform .12s, box-shadow .12s;
}
#event-banner:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
#event-banner .ev-art { width: 28px; height: 28px; flex: none; }
#event-banner .ev-art svg { width: 100%; height: 100%; }
#event-banner .ev-txt { display: flex; flex-direction: column; line-height: 1.25; }
#event-banner b { color: #ffd6a0; font-size: 12px; letter-spacing: .5px; }
#event-banner span { color: #9fb0d8; font-size: 10px; font-family: Arial; }
#topbar-right { display: flex; align-items: center; gap: 10px; }
#server-box {
  display: flex; align-items: center; gap: 6px;
  background: rgba(20,28,48,.7); border: 1px solid rgba(120,150,220,.25); border-radius: 10px; padding: 4px 10px;
}
.srv-globe { width: 18px; height: 18px; display: block; flex: none; }
.srv-globe svg { width: 100%; height: 100%; }
#server-box select {
  background: transparent; color: #dfe6f5; border: none; outline: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 700; padding: 4px 2px;
}
#server-box select option { background: #131a2e; color: #dfe6f5; }
.top-ico {
  width: 40px; height: 40px; border-radius: 11px; position: relative;
  background: rgba(20,28,48,.7); border: 1px solid rgba(120,150,220,.25);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, background .12s, box-shadow .12s;
}
.top-ico svg { width: 22px; height: 22px; }
.top-ico:hover { transform: translateY(-2px); background: rgba(40,54,90,.85); box-shadow: 0 5px 14px rgba(0,0,0,.4); }
.ico-dot { /* numeric notification badge; shown by Menu.refreshBadges() */
  position: absolute; top: 3px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: #ff4a4a; box-shadow: 0 0 6px rgba(255,74,74,.9);
  color: #fff; font-size: 10px; font-weight: 900; line-height: 16px; text-align: center; display: none;
}

/* logo lives at the top of the home screen content, so it shares the card's
   horizontal center (fixes the logo-vs-card misalignment) */
#logo { text-align: center; margin: 2px auto 14px; pointer-events: none; }
.logo-crest { width: 96px; height: 96px; margin: 0 auto -10px; }
.logo-crest img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)) drop-shadow(0 0 18px rgba(255,170,60,.3)); }
.logo-word {
  font-size: 30px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(180deg, #fff 0%, #ffe2a0 45%, #ff9a2a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(120,60,0,.4)) drop-shadow(0 0 14px rgba(255,160,40,.35));
}
.logo-sub { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 11px; font-weight: 900; color: #9fb0d8; letter-spacing: 6px; margin-top: 2px; }
.logo-sub i { width: 26px; height: 2px; display: inline-block; background: linear-gradient(90deg, transparent, #6a7aa8); }
.logo-sub i:last-child { background: linear-gradient(90deg, #6a7aa8, transparent); }

#menu-content { flex: 1; display: flex; min-height: 0; }
#menu-main { flex: 1; height: 100%; overflow-y: auto; padding: 14px 18px 18px; scrollbar-width: thin; min-width: 0; }
#menu-main::-webkit-scrollbar { width: 8px; }
#menu-main::-webkit-scrollbar-thumb { background: rgba(120,150,220,.3); border-radius: 4px; }
.screen { max-width: 880px; margin: 0 auto; }
.home-screen { max-width: 660px; }

/* --------------------------------------------------------- home screen -- */
.home-card {
  margin: 0 auto; max-width: 620px;
  background: linear-gradient(180deg, rgba(24,32,56,.82), rgba(14,20,38,.86));
  border: 1px solid rgba(120,150,220,.22); border-radius: 18px;
  padding: 20px 26px; box-shadow: 0 16px 44px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}
.hc-player { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hc-badge { position: relative; width: 52px; height: 52px; flex: none; background: none; border: 0; padding: 0; cursor: pointer; transition: transform .15s, filter .15s; }
.hc-badge:hover { transform: scale(1.08); filter: brightness(1.15); }
.hc-badge:focus-visible { outline: 3px solid #ffd24a; outline-offset: 2px; border-radius: 8px; }
.hc-badge svg { width: 100%; height: 100%; }
.hc-badge span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; }
.hc-info { flex: 1; min-width: 0; }
.hc-name-row { display: flex; align-items: center; gap: 8px; }
#name-input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: #fff; font-family: inherit; font-size: 20px; font-weight: 900; padding: 2px 0;
  border-bottom: 2px solid transparent;
}
#name-input:focus { border-bottom-color: rgba(255,200,90,.5); }
.name-edit { width: 26px; height: 26px; background: rgba(120,150,220,.12); border-radius: 7px; display: flex; align-items: center; justify-content: center; flex: none; transition: background .12s; }
.name-edit svg { width: 15px; height: 15px; }
.name-edit:hover { background: rgba(120,150,220,.28); }
.hc-lvl-row { display: flex; align-items: center; justify-content: space-between; margin: 9px 0 5px; }
.hc-lvl { font-size: 12px; font-weight: 900; color: #6fb8ff; letter-spacing: 1px; }
.hc-xptext { font-size: 11px; color: #9fb0d8; font-family: Arial; }
.hc-xpbar { height: 8px; background: rgba(8,12,24,.8); border-radius: 5px; overflow: hidden; border: 1px solid rgba(120,150,220,.18); }
.hc-xpfill { height: 100%; background: linear-gradient(90deg, #3fa8e8, #6fd0ff); border-radius: 5px; box-shadow: 0 0 8px rgba(80,180,255,.6); transition: width .3s; }
.hc-modes { display: flex; gap: 4px; justify-content: center; background: rgba(8,12,24,.55); border-radius: 12px; padding: 5px; margin: 16px 0; }
.hmode {
  flex: 1; padding: 9px 6px; font-size: 12px; font-weight: 900; letter-spacing: .4px; white-space: nowrap;
  color: #9fb0d8; background: transparent; border: none; border-radius: 9px;
  transition: color .12s, background .12s, transform .12s;
}
.hmode:hover { color: #fff; background: rgba(120,150,220,.1); }
.hmode.sel { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); background: linear-gradient(180deg, #ffd24a, #f0a020); box-shadow: 0 3px 10px rgba(255,170,40,.4); }

/* Monster-Hunt difficulty selector (easy / normal / hard) */
.hunt-diffs { display: flex; gap: 8px; justify-content: center; margin: 2px 0 8px; }
.hd-btn {
  flex: 1; max-width: 132px; padding: 7px 6px; border-radius: 10px; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; gap: 1px; line-height: 1.2;
  background: linear-gradient(180deg, rgba(20,28,48,.85), rgba(10,15,28,.9));
  border: 2px solid rgba(120,150,220,.25); transition: transform .12s, box-shadow .12s, filter .12s, border-color .12s;
}
.hd-btn:hover { transform: translateY(-2px); }
.hd-btn .hd-name { font-size: 13px; font-weight: 900; color: #fff; letter-spacing: .5px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.hd-btn .hd-sub { font-size: 8px; font-weight: 900; letter-spacing: .5px; color: #8fa0c8; }
.hd-btn.sel { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc), 0 4px 16px var(--acc); filter: brightness(1.06); background: linear-gradient(180deg, rgba(42,54,88,.92), rgba(10,15,28,.92)); }
.hd-btn.sel .hd-sub { color: var(--acc); }
.hd-btn.locked { opacity: .5; filter: grayscale(.5); cursor: not-allowed; }
.hd-btn.locked:hover { transform: none; }

/* Monster-Hunt stage rail */
.hunt-rail { display: flex; gap: 8px; justify-content: center; margin: 4px 0 6px; }
.hunt-tile {
  flex: 1; max-width: 96px; position: relative; cursor: pointer; text-align: center;
  padding: 8px 4px 6px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(20,28,48,.85), rgba(10,15,28,.9));
  border: 2px solid var(--acc); transition: transform .12s, box-shadow .12s, filter .12s;
}
.hunt-tile:hover { transform: translateY(-2px); }
.hunt-tile.sel { box-shadow: 0 0 0 2px #fff, 0 4px 16px var(--acc); filter: brightness(1.1); }
.hunt-tile.cleared { border-color: #ffd24a; }
.hunt-tile.locked { opacity: .45; filter: grayscale(.6); cursor: not-allowed; border-color: rgba(120,150,220,.3); }
.ht-orb {
  width: 38px; height: 38px; border-radius: 50%; margin: 0 auto 4px;
  box-shadow: 0 0 12px var(--acc), inset 0 -3px 6px rgba(0,0,0,.45);
}
.hunt-tile.locked .ht-orb { box-shadow: none; }
.ht-name { font-size: 10px; font-weight: 900; color: #fff; letter-spacing: .3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht-sub { font-size: 8px; font-weight: 900; color: var(--acc); letter-spacing: 1px; }
.hunt-tile.locked .ht-sub { color: #8fa0c8; }
.ht-badge {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900;
  background: #1a2436; border: 2px solid var(--acc); color: #fff;
}
.hunt-tile.cleared .ht-badge { background: #ffd24a; border-color: #b8780f; color: #2a1206; }
.hunt-hint { text-align: center; font-size: 10px; color: #8fa0c8; font-family: Arial; margin-bottom: 6px; }
@media (max-width: 760px) { .hunt-tile .ht-name { font-size: 9px; } .ht-orb { width: 32px; height: 32px; } }
.hc-play-row { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 6px 0 4px; }
.hc-hex { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hc-hex-l { font-size: 9px; color: #8fa0c8; letter-spacing: 1px; font-weight: 900; }
#play-btn {
  flex: none; min-width: 240px; padding: 18px 30px;
  font-size: 36px; font-weight: 900; color: #fff; letter-spacing: 2px; font-style: italic;
  background: linear-gradient(180deg, #ffda5e 0%, #ffba32 48%, #ff9a18 100%);
  border: none; border-radius: 14px; text-shadow: 0 1px 0 rgba(0,0,0,.32), 0 3px 6px rgba(0,0,0,.4);
  box-shadow: 0 6px 0 #b86a08, 0 12px 30px rgba(255,170,40,.5), inset 0 2px 0 rgba(255,255,255,.6);
  transition: transform .1s, box-shadow .1s, filter .1s;
}
#play-btn:hover { filter: brightness(1.07); transform: translateY(-2px); box-shadow: 0 8px 0 #b86a08, 0 16px 38px rgba(255,170,40,.65), inset 0 2px 0 rgba(255,255,255,.6); }
#play-btn:active { transform: translateY(5px); box-shadow: 0 2px 0 #b86a08, inset 0 2px 0 rgba(255,255,255,.5); }

.hexwrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hexagon {
  width: 50px; height: 56px; display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.5);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hex-green  { background: linear-gradient(180deg, #5ab040, #2e7a1e); }
.hex-green2 { background: linear-gradient(180deg, #8ad070, #4e9a3e); }
.hex-red    { background: linear-gradient(180deg, #6e1410, #3a0a08); }
.hex-blue   { background: linear-gradient(180deg, #3fa8e8, #1c6ec0); }
.hex-gold   { background: linear-gradient(180deg, #ffd24a, #d98a10); color: #fff; }
.hex-label  { font-size: 8px; color: #8fa0c8; letter-spacing: 1px; }

/* gold + gem currency buttons (PLAY-button styling, glowing) */
.wallet-row { display: flex; justify-content: center; gap: 16px; margin-top: 14px; }
.wallet-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 10px; border-radius: 10px;
  font-size: 17px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.45);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.wallet-btn .wb-ico { width: 28px; height: 28px; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.wallet-btn .wb-ico svg { width: 100%; height: 100%; display: block; }
.wallet-btn .wb-val { min-width: 30px; }
.wallet-btn .wb-plus {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; font-size: 17px; line-height: 1;
  background: rgba(255,255,255,.28); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.wb-gold {
  background: linear-gradient(180deg, #ffc23a, #d98a10);
  border: 2px solid #8a5a08;
  box-shadow: 0 4px 0 #8a5a08, 0 6px 20px rgba(255,180,40,.45), inset 0 2px 0 rgba(255,255,255,.4);
}
.wb-gem {
  background: linear-gradient(180deg, #4ab8ff, #1c7ad0);
  border: 2px solid #145a9e;
  box-shadow: 0 4px 0 #145a9e, 0 6px 20px rgba(60,170,255,.5), inset 0 2px 0 rgba(255,255,255,.4);
}
.wb-gold:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 6px 0 #8a5a08, 0 10px 26px rgba(255,180,40,.65), inset 0 2px 0 rgba(255,255,255,.4); }
.wb-gem:hover  { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 6px 0 #145a9e, 0 10px 26px rgba(60,170,255,.7), inset 0 2px 0 rgba(255,255,255,.4); }
.wallet-btn:active { transform: translateY(2px); }
.wb-gold:active { box-shadow: 0 2px 0 #8a5a08, inset 0 2px 0 rgba(255,255,255,.4); }
.wb-gem:active  { box-shadow: 0 2px 0 #145a9e, inset 0 2px 0 rgba(255,255,255,.4); }

#battle-actions { display: flex; justify-content: center; gap: 14px; margin-top: 18px; }
.act-btn {
  flex: 1; max-width: 200px; padding: 12px 14px; border-radius: 14px;
  display: flex; align-items: center; gap: 10px; color: #fff; text-align: left;
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.act-ico { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.act-ico svg { width: 100%; height: 100%; display: block; }
.act-txt { display: flex; flex-direction: column; line-height: 1.2; }
.act-txt b { font-size: 14px; font-weight: 900; letter-spacing: .5px; }
.act-txt span { font-size: 10px; color: rgba(255,255,255,.72); font-family: Arial; }
.act-boost   { background: linear-gradient(135deg, rgba(216,56,40,.92), rgba(150,20,10,.85)); box-shadow: 0 5px 16px rgba(216,56,40,.3); }
.act-invite  { background: linear-gradient(135deg, rgba(40,160,96,.92), rgba(20,90,52,.85)); box-shadow: 0 5px 16px rgba(40,170,90,.3); }
.act-discord { background: linear-gradient(135deg, rgba(88,101,242,.95), rgba(60,70,180,.9)); box-shadow: 0 5px 16px rgba(88,101,242,.35); }
.act-btn:hover { transform: translateY(-3px); filter: brightness(1.1); }
.act-boost:hover   { box-shadow: 0 9px 22px rgba(216,56,40,.5); }
.act-invite:hover  { box-shadow: 0 9px 22px rgba(40,170,90,.5); }
.act-discord:hover { box-shadow: 0 9px 22px rgba(88,101,242,.6); }
.act-btn:active { transform: translateY(0); }

.home-foot { text-align: center; margin-top: 28px; padding-bottom: 6px; }
.foot-social { display: flex; justify-content: center; gap: 12px; margin-bottom: 10px; }
.soc-btn { width: 34px; height: 34px; border-radius: 9px; background: rgba(20,28,48,.7); border: 1px solid rgba(120,150,220,.2); display: flex; align-items: center; justify-content: center; transition: transform .12s, background .12s; }
.soc-btn svg { width: 18px; height: 18px; }
.soc-btn:hover { transform: translateY(-2px); background: rgba(40,54,90,.9); }
.foot-legal { font-size: 10px; color: #6a7798; font-family: Arial; }
.foot-legal span { cursor: pointer; }
.foot-legal span:hover { color: #aeb8d6; }

/* --------------------------------------------------------- right column -- */
#menu-right {
  width: 272px; min-width: 272px; height: 100%; padding: 8px 14px 16px 2px;
  display: flex; flex-direction: column; gap: 14px; overflow-y: auto; scrollbar-width: thin;
}
#menu-right::-webkit-scrollbar { width: 6px; }
#menu-right::-webkit-scrollbar-thumb { background: rgba(120,150,220,.3); border-radius: 4px; }
#champions-panel, #howtowin, #controls {
  background: linear-gradient(180deg, rgba(24,32,56,.82), rgba(14,20,38,.86));
  border: 1px solid rgba(120,150,220,.22); border-radius: 14px; padding: 12px;
}
.ctl-list { display: flex; flex-direction: column; }
.ctl-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-top: 1px solid rgba(120,150,220,.12); }
.ctl-row:first-child { border-top: none; }
.ctl-ico { width: 28px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center;
  background: rgba(120,150,220,.10); border-radius: 8px; }
.ctl-ico svg { width: 22px; height: 22px; }
.ctl-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ctl-txt b { font-size: 12px; font-weight: 900; color: #e8edf7; letter-spacing: .3px; }
.ctl-txt span { font-size: 10.5px; color: #9aa6c4; font-family: Arial; font-weight: 700; }
.ctl-foot { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(120,150,220,.12);
  font-size: 9.5px; color: #8593b5; font-family: Arial; font-weight: 700; text-align: center; line-height: 1.45; }
.ctl-foot b { color: #c2cce0; }
.tc-head { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 8px; }
.tc-trophy { width: 22px; height: 22px; } .tc-trophy svg { width: 100%; height: 100%; }
.tc-title { font-size: 13px; font-weight: 900; color: #c9d4ee; letter-spacing: .5px; }
.tc-row { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid rgba(120,150,220,.12); cursor: pointer; transition: background .12s; border-radius: 8px; }
.tc-row:hover { background: rgba(120,150,220,.07); }
.tc-side { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tc-side svg { width: 22px; height: 22px; flex: none; }
.tc-right { justify-content: flex-end; }
.tc-meta { display: flex; flex-direction: column; min-width: 0; }
.tc-right .tc-meta { align-items: flex-end; }
.tc-name { font-size: 11px; font-weight: 700; color: #e2e8f5; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 72px; }
.tc-tag { font-size: 7px; font-weight: 900; letter-spacing: 1px; }
.tc-tag.dm { color: #4fcf86; } .tc-tag.tm { color: #5aa8ff; }
.tc-mid { text-align: center; padding: 0 2px; }
.tc-period { display: block; font-size: 9px; font-weight: 900; color: #ffd24a; letter-spacing: 1px; }
.tc-num { font-size: 18px; font-weight: 900; color: #fff; }
.tc-chev { width: 15px; height: 15px; opacity: .55; } .tc-chev svg { width: 100%; height: 100%; }

#howtowin { position: relative; min-height: 150px; }
.htw-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.htw-icon { width: 18px; height: 18px; flex: none; } .htw-icon svg { width: 100%; height: 100%; }
.htw-title { font-size: 13px; font-weight: 900; color: #fff; letter-spacing: .5px; }
.htw-name { font-size: 12px; color: #4fcf86; font-weight: 900; letter-spacing: 1px; margin: 4px 0 6px; }
.htw-text { font-size: 11px; line-height: 1.5; color: #c2cce0; font-family: Arial; font-weight: 700; max-width: 80%; }
.htw-art { position: absolute; right: 12px; bottom: 32px; width: 54px; height: 54px; opacity: .9; filter: drop-shadow(0 0 10px rgba(80,180,255,.5)); }
.htw-art svg { width: 100%; height: 100%; }
.htw-dots { display: flex; gap: 6px; margin-top: 12px; }
.htw-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(120,150,220,.3); transition: background .2s, width .2s; }
.htw-dots i.on { width: 18px; border-radius: 4px; background: #ffd24a; }
.htw-dots i { cursor: pointer; }
.htw-dots i:hover { background: rgba(255,210,74,.7); transform: scale(1.3); }
.htw-tip { cursor: pointer; }
.htw-next { margin-left: auto; cursor: pointer; background: none; border: none; color: #ffd24a; font-weight: 900; font-size: 18px; line-height: 1; padding: 2px 5px; border-radius: 6px; transition: transform .12s, background .15s; }
.htw-next:hover { transform: translateX(2px); background: rgba(255,210,74,.15); }

/* ------------------------------------------------------------- tabs etc -- */
.tab-row { display: flex; justify-content: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tab-btn {
  position: relative;
  padding: 9px 22px; font-size: 13px; font-weight: 900; color: #fff; letter-spacing: .5px;
  background: linear-gradient(180deg, #c82e1e, #951a0e); border: 2px solid #5e0e06;
  border-radius: 8px; box-shadow: 0 3px 0 #5e0e06; text-shadow: 0 2px 0 rgba(0,0,0,.4);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.tab-badge {
  position: absolute; top: -7px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ff4a4a; color: #fff; font-size: 10px; font-weight: 900; line-height: 1;
  border-radius: 9px; border: 2px solid #121a30; box-shadow: 0 0 8px rgba(255,74,74,.8);
  animation: navPulse 1.5s ease-in-out infinite;
}
.tab-btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 5px 0 #5e0e06; }
.tab-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 #5e0e06; }
.tab-btn.sel { background: linear-gradient(180deg, #e07818, #b85a08); border-color: #6e3404; box-shadow: 0 3px 0 #6e3404; }
.tab-btn.sel:hover { box-shadow: 0 5px 0 #6e3404; }
.tab-btn.ico { padding: 6px 18px; }
.tab-btn.ico svg { width: 26px; height: 26px; display: block; filter: drop-shadow(0 2px 1px rgba(0,0,0,.4)); }
.tab-btn.ico.sel svg { transform: scale(1.08); }
.panel-body { animation: fadein .18s; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

.section-title { text-align: center; font-size: 14px; color: #ffd24a; letter-spacing: 2px; margin: 12px 0 8px; position: relative; }
.section-title::before, .section-title::after {
  content: ''; position: absolute; top: 50%; width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, #b8742a);
}
.section-title::before { left: 6px; }
.section-title::after { right: 6px; transform: scaleX(-1); }

/* ------------------------------------------------------------ profile -- */
.profile-grid { display: grid; grid-template-columns: 1fr 230px; gap: 18px; }
.rank-box {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  background: rgba(20,13,8,.7); border-radius: 12px; padding: 12px;
}
.rank-mid { flex: 1; max-width: 360px; text-align: center; }
.rank-name { color: #ffd24a; font-size: 13px; margin-bottom: 5px; }
.rank-bar { height: 18px; background: #0e0903; border-radius: 9px; border: 2px solid #3a2412; overflow: hidden; }
.rank-fill { height: 100%; background: linear-gradient(90deg, #5ab040, #8ad070); border-radius: 7px; transition: width .3s; }
.rank-pct { font-size: 10px; color: #b89a7a; margin-top: 4px; font-family: Arial; }

.mastery-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-top: 12px; }
.mastery { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.m-hex { font-size: 26px; color: #6e3a1a; }
.m-mid { flex: 1; }
.m-bar { position: relative; height: 16px; background: #0e0903; border: 1px solid #3a2412; border-radius: 8px; overflow: hidden; }
.m-fill { height: 100%; background: linear-gradient(90deg, #b8742a, #e0a04a); }
.m-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #fff; text-shadow: 0 1px 2px #000; }
.m-name { font-size: 10px; color: #ffd24a; margin-top: 2px; letter-spacing: .5px; }
.m-chest { opacity: .7; flex: none; line-height: 0; }
.m-chest svg { width: 34px; height: 34px; }
.m-chest.claimed { opacity: .28; }
.m-claim { background: none; border: none; padding: 0; cursor: pointer; flex: none; line-height: 0; animation: pulse 1.4s infinite; }
.m-claim svg { width: 38px; height: 38px; filter: drop-shadow(0 0 6px rgba(255,210,74,.85)); }
/* a FULL mastery bar becomes one big, obvious CLAIM button */
.mastery { transition: background .12s, transform .12s; border-radius: 10px; }
.mastery.ready { cursor: pointer; padding: 5px 6px; background: rgba(255,210,74,.09); }
.mastery.ready:hover { background: rgba(255,210,74,.18); transform: translateY(-1px); }
.mastery.ready:active { transform: translateY(1px); }
.m-bar.ready { height: 18px; border-color: #ffd24a; cursor: pointer; animation: mReady 1.25s ease-in-out infinite; }
.m-bar.ready .m-fill { background: linear-gradient(90deg, #5dff9a, #ffd24a); }
.m-bar.ready .m-count { font-size: 10px; font-weight: 900; color: #1a1206; letter-spacing: .4px; text-shadow: 0 1px 0 rgba(255,255,255,.45); }
@keyframes mReady { 0%,100% { box-shadow: 0 0 0 1px rgba(255,210,74,.45), 0 0 9px rgba(255,210,74,.3); } 50% { box-shadow: 0 0 0 1px rgba(255,210,74,.85), 0 0 22px rgba(255,210,74,.7); } }
.mastery.ready .m-claim svg { width: 42px; height: 42px; }

.duel-badge { text-align: center; font-size: 44px; background: rgba(20,13,8,.7); border-radius: 12px; padding: 14px; }
.duel-rating { font-size: 26px; color: #ffd24a; text-shadow: 0 2px 0 #6e4a08; }
.awards-row { display: flex; justify-content: space-between; gap: 4px; background: rgba(20,13,8,.7); border-radius: 12px; padding: 10px; }
.award { text-align: center; }
.award-ico { font-size: 22px; filter: grayscale(.4); }
.award-n { font-size: 11px; color: #b89a7a; }
.best-box { background: rgba(20,13,8,.7); border-radius: 12px; padding: 12px; text-align: center; }
.best-score { font-size: 30px; color: #ffd24a; text-shadow: 0 2px 0 #6e4a08; margin-bottom: 8px; }
.best-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.best-cell { font-size: 16px; }
.best-v { font-size: 12px; color: #cdc4b8; }

/* quests */
.quests-head { display: flex; align-items: center; gap: 10px; max-width: 600px; margin: 0 auto 12px; }
.qh-title { font-size: 16px; font-weight: 900; color: #fff; letter-spacing: 1px; flex: 1; }
.qh-ready { font-size: 11px; font-weight: 900; color: #1a1208; background: linear-gradient(180deg, #ffe07a, #f0b020); padding: 3px 10px; border-radius: 20px; box-shadow: 0 0 12px rgba(255,190,50,.5); animation: navPulse 1.5s ease-in-out infinite; }
.qh-reset { font-size: 11px; font-weight: 800; color: #8a96b8; font-family: Arial; }
.quests { display: flex; flex-direction: column; gap: 9px; max-width: 600px; margin: 0 auto; }
.quest { display: flex; align-items: center; gap: 14px; background: rgba(16,24,44,.82); border: 1px solid rgba(120,150,220,.14); border-left: 4px solid #4a8ff0; border-radius: 10px; padding: 11px 14px; }
.quest.q-easy { border-left-color: #4fcf86; }
.quest.q-med  { border-left-color: #4a8ff0; }
.quest.q-hard { border-left-color: #e0a83a; }
.quest.q-ready { box-shadow: 0 0 0 1.5px rgba(255,210,74,.5), 0 0 16px rgba(255,180,40,.22); }
.quest.q-claimed { opacity: .55; }
.q-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-top { display: flex; align-items: center; gap: 10px; }
.q-name { flex: 1; font-size: 13px; font-weight: 700; color: #e6ebf5; }
.q-rew { font-size: 12px; font-weight: 900; white-space: nowrap; }
.q-rew.gold { color: #ffd24a; } .q-rew.gem { color: #6fd0ff; }
.q-bar { position: relative; width: 100%; height: 15px; background: rgba(8,12,24,.85); border: 1px solid rgba(120,150,220,.2); border-radius: 8px; overflow: hidden; }
.q-fill { height: 100%; background: linear-gradient(90deg, #3f6bd0, #6a9ae8); border-radius: 8px; transition: width .3s; }
.quest.q-ready .q-fill { background: linear-gradient(90deg, #f0b020, #ffe07a); }
.q-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.6); }
.q-claim { padding: 8px 14px; font-size: 12px; flex: none; }
.q-done { color: #5ab040; font-size: 20px; flex: none; }
.quests-note { text-align: center; font-size: 10px; color: #6a7798; margin-top: 14px; font-family: Arial; }

/* account */
.account { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.acc-row { display: flex; justify-content: space-between; background: rgba(20,13,8,.8); border-radius: 8px; padding: 10px 14px; font-size: 12px; }
.acc-row span { color: #b89a7a; }

/* --------------------------------------------------------------- shop -- */
.shop-wallet { display: flex; justify-content: space-between; align-items: center; max-width: 700px; margin: 0 auto 12px; font-size: 14px; color: #ffd24a; }
.sw-title { color: #fff; letter-spacing: 2px; }
.chest-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 14px; max-width: 760px; margin: 0 auto; }
.chest-card {
  position: relative;
  background: linear-gradient(160deg, rgba(30,18,10,.95), rgba(14,8,4,.95));
  border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 12px 14px;
  box-shadow: inset 0 0 30px rgba(0,0,0,.4);
}
.chest-card.has-chest { border-color: rgba(255,74,74,.4); }
/* red "ready to open" notification, matching the sidebar nav badges */
.chest-notif {
  position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 11px; background: #ff4a4a; color: #fff; font-size: 12px; font-weight: 900; line-height: 1;
  border: 2px solid #1a0e06; box-shadow: 0 0 10px rgba(255,74,74,.9);
  z-index: 6; pointer-events: none; animation: navPulse 1.5s ease-in-out infinite;
}
.chest-head { display: flex; justify-content: space-between; align-items: center; }
.chest-name { font-size: 15px; font-weight: 900; color: var(--hue); text-shadow: 0 1px 0 #000; }
.chest-items { font-size: 11px; color: #ffd24a; }
.chest-mid { display: grid; grid-template-columns: 1fr auto; align-items: center; margin: 8px 0; position: relative; }
/* picture-first layout: art centred and dominant; odds appear as an ⓘ popover */
.chest-mid:has(.art-first) { grid-template-columns: 1fr; justify-items: center; }
.chest-art.art-first svg { width: 112px; height: 112px; }
.chest-items-tag { font-size: 10px; font-weight: 900; letter-spacing: 1px; color: #8fa0c8; margin-top: 2px; }
.chest-info { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #4a5680; background: #1a2240;
  color: #aeb8d6; font-size: 12px; font-weight: 900; font-style: italic; font-family: Georgia, serif; cursor: pointer;
  line-height: 1; transition: filter .15s, border-color .15s; }
.chest-info:hover { filter: brightness(1.3); }
.chest-info[aria-expanded="true"] { border-color: #ffd24a; color: #ffd24a; }
.chest-odds.pop { position: absolute; top: 2px; right: 2px; z-index: 5; background: rgba(10,14,28,0.96);
  border: 1px solid #3a4a7a; border-radius: 10px; padding: 9px 12px; box-shadow: 0 8px 22px rgba(0,0,0,0.5); }
.chest-odds { display: flex; flex-direction: column; gap: 3px; }
.chest-odds[hidden] { display: none; }
.odds-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.odds-row i { width: 4px; height: 12px; border-radius: 2px; }
.odds-name { width: 76px; font-weight: 900; }
.odds-row b { color: #fff; }
.chest-art { display: flex; align-items: center; justify-content: center; }
.chest-art svg { width: 96px; height: 96px; filter: drop-shadow(0 5px 5px rgba(0,0,0,.45)); }
.chest-owned { position: absolute; right: 2px; bottom: -2px; font-size: 13px; color: #fff; text-shadow: 0 1px 0 #000; }
.chest-btns { display: flex; gap: 10px; }
.chest-btns button { flex: 1; padding: 8px; font-size: 13px; font-weight: 900; border-radius: 7px; color: #fff; transition: transform .12s, filter .12s, box-shadow .12s; }
.chest-open { background: linear-gradient(180deg, #5a5a5a, #3a3a3a); border: 1px solid #222; box-shadow: 0 3px 0 #222; }
.chest-open:not([disabled]) { background: linear-gradient(180deg, #5ab040, #2e7a1e); border-color: #1c5226; box-shadow: 0 3px 0 #1c5226; }
.chest-open:not([disabled]):hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: 0 5px 0 #1c5226; }
.chest-open[disabled] { opacity: .55; cursor: not-allowed; }
.chest-buy { background: linear-gradient(180deg, #4a4a52, #2e2e36); border: 1px solid #1a1a20; box-shadow: 0 3px 0 #1a1a20; color: #ffd24a; }
.chest-buy:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 5px 0 #1a1a20; }
.chest-btns button:active { transform: translateY(1px); }
.chest-open { display: flex; align-items: center; justify-content: center; gap: 6px; }   /* hold OPEN + the FREE tag */
.chest-open .free-tag {
  padding: 1px 6px; border-radius: 6px; background: #ffd24a; color: #1a2e12;
  font-size: 10px; font-weight: 900; letter-spacing: .5px; line-height: 1.5;
}
.chest-open.has-free { animation: chestFreeGlow 1.6s ease-in-out infinite; }   /* draws the eye to the free open */
.chest-open.has-free:hover { animation: none; }
@keyframes chestFreeGlow {
  0%, 100% { box-shadow: 0 3px 0 #1c5226, 0 0 0 rgba(90,176,64,0); }
  50% { box-shadow: 0 3px 0 #1c5226, 0 0 16px rgba(90,176,64,.75); }
}

/* free resources: tiered reward cards with ad cooldown */
.res-col { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.res-card2 {
  position: relative; width: min(380px, 90%);
  background: linear-gradient(150deg, #2a0e08 0%, #180704 55%, #120503 100%);
  border: 2px solid #4e4e56; border-radius: 6px; padding: 10px 14px 16px;
  box-shadow: 0 8px 22px rgba(0,0,0,.55), inset 0 0 40px rgba(0,0,0,.5);
}
.res-head {
  font-size: 15px; font-weight: 900; color: #fff; letter-spacing: 1px;
  padding-bottom: 6px; border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #e83a2a, transparent) 1;
}
.res-mid { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.res-rows { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.res-row { display: flex; align-items: center; gap: 8px; opacity: .42; }
.res-row.cur { opacity: 1; }
.res-arrow { width: 22px; color: #e83a2a; font-size: 16px; filter: drop-shadow(0 0 4px rgba(232,58,42,.6)); }
.res-amt { font-size: 17px; color: #fff; min-width: 64px; text-align: right; }
.res-row:not(.cur) .res-amt { font-size: 14px; color: #b8a890; }
.res-ico { font-size: 15px; }
.res-lvl { font-size: 12px; font-weight: 900; color: #e8e0d0; letter-spacing: .5px; }
.res-row:not(.cur) .res-lvl { color: #8a7a6a; }
.res-medal { width: 86px; height: 86px; filter: drop-shadow(0 0 14px rgba(216,58,240,.35)) drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.res-card2[data-res="gold"] .res-medal { filter: drop-shadow(0 0 14px rgba(255,210,74,.4)) drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.res-medal svg { width: 100%; height: 100%; }
.res-ad-btn {
  position: absolute; right: 14px; bottom: -14px; min-width: 110px;
  padding: 9px 16px; font-size: 14px; font-weight: 900; color: #fff; border-radius: 8px;
  background: linear-gradient(180deg, #5ab040, #2e7a1e); border: 2px solid #1c5226;
  box-shadow: 0 4px 0 #1c5226, 0 8px 14px rgba(0,0,0,.45); letter-spacing: 1px;
}
.res-ad-btn.wait {
  background: linear-gradient(180deg, #6a6a72, #46464e); border-color: #26262c;
  box-shadow: 0 4px 0 #26262c, 0 8px 14px rgba(0,0,0,.45);
  color: #d8d8e0; cursor: default; font-family: Consolas, monospace; font-size: 15px;
}
.res-ad-btn.wait::after { content: ' 📺'; font-size: 11px; }

/* loadout (choose weapon + skin per evolution) */
.ld-banner {
  max-width: 560px; margin: 0 auto 16px; text-align: center;
  padding: 9px 18px; font-size: 14px; font-weight: 900; color: #fff; letter-spacing: .5px;
  background: linear-gradient(180deg, #e07818, #b85a08); border: 2px solid #6e3404;
  border-radius: 8px; box-shadow: 0 3px 0 #6e3404; text-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.ld-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; max-width: 780px; margin: 0 auto; align-items: start; }
.ld-left, .ld-right { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.ld-stat { font-size: 12px; font-weight: 900; color: #e8e0d0; letter-spacing: .5px; text-align: center; }
.ld-stat.center { margin-top: 10px; }
.ld-stat-ghost { opacity: .45; }
.ld-bar { position: relative; height: 14px; margin-top: 5px; background: #0e0903; border: 1px solid #3a2412; border-radius: 7px; overflow: hidden; }
.ld-fill { height: 100%; background: linear-gradient(90deg, #b8742a, #ffd24a); }
.ld-fill.gold { background: linear-gradient(90deg, #caa030, #ffe98a); }
.ld-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #fff; text-shadow: 0 1px 2px #000; }
.ld-hint { font-size: 9px; color: #8a7a6a; font-family: Arial; font-weight: 700; margin-top: 6px; max-width: 200px; }

.wpn-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: linear-gradient(180deg, #1c1c22, #101014); border: 2px solid #3a3a44;
  border-radius: 8px; padding: 8px 10px; cursor: pointer; transition: border-color .1s;
}
.wpn-card:hover { border-color: #8a8a96; }
.wpn-card.sel { border-color: #ffd24a; box-shadow: 0 0 12px rgba(255,210,74,.35); }
.wpn-card.locked { cursor: not-allowed; }
.wpn-card.locked canvas { opacity: .8; }
.wpn-dmg {
  position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 900; color: #fff;
  background: #3a3a44; border-radius: 4px; padding: 1px 6px;
}
.wpn-card.sel .wpn-dmg { background: #b8742a; }
.wpn-card canvas { width: 100%; height: auto; display: block; }
.wpn-name { font-size: 10px; font-weight: 900; color: #cdc4b8; letter-spacing: 1px; }
.wpn-name.locked { color: #8a93a6; }
.wpn-prog { position: relative; width: 100%; height: 12px; background: rgba(8,12,24,.85); border: 1px solid rgba(120,150,220,.25); border-radius: 6px; overflow: hidden; margin-top: 2px; }
.wpn-prog-fill { height: 100%; background: linear-gradient(90deg, #d98a10, #ffd24a); border-radius: 6px; }
.wpn-prog span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 900; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.7); }
.wpn-try { margin-top: 5px; width: 100%; padding: 5px 6px; font-size: 9px; font-weight: 900; letter-spacing: .5px;
  color: #1a1206; background: linear-gradient(180deg, #ffe07a, #f0b020); border: none; border-radius: 6px; cursor: pointer; box-shadow: 0 2px 0 #b8742a; }
.wpn-try:hover { filter: brightness(1.08); }
.wpn-try.on { background: none; box-shadow: none; color: #5ab040; cursor: default; }
.wpn-card.trialing { border-color: #5ab040; box-shadow: 0 0 12px rgba(90,176,64,.4); }

.ld-plate {
  height: 64px; border-radius: 8px; position: relative;
  background:
    radial-gradient(circle 3px at 10px 10px, #55555f 3px, transparent 4px),
    radial-gradient(circle 3px at calc(100% - 10px) 10px, #55555f 3px, transparent 4px),
    radial-gradient(circle 3px at 10px calc(100% - 10px), #55555f 3px, transparent 4px),
    radial-gradient(circle 3px at calc(100% - 10px) calc(100% - 10px), #55555f 3px, transparent 4px),
    linear-gradient(160deg, #2e2e36, #1a1a20);
  border: 2px solid #3a3a44; box-shadow: inset 0 0 18px rgba(0,0,0,.5);
}
.ld-plate-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; opacity: .5; }

.ld-hero {
  position: relative; text-align: center; width: 180px;
  background: linear-gradient(180deg, #20160c, #120a05); border: 3px solid #e83a2a;
  border-radius: 10px; padding: 8px; box-shadow: 0 0 18px rgba(232,58,42,.3);
}
.ld-hero-name {
  font-size: 13px; font-weight: 900; color: #fff; letter-spacing: 1px;
  background: linear-gradient(180deg, #c82e1e, #951a0e); border-radius: 5px; padding: 3px 0; margin-bottom: 2px;
}
.ld-hero-dmg { font-size: 10px; color: #ffd24a; margin: 2px 0; }
.ld-hero .evo-num { position: absolute; left: 10px; bottom: 10px; }

.ld-skins { display: flex; gap: 12px; justify-content: center; margin: 20px 0 16px; flex-wrap: wrap; }
.ld-skin {
  text-align: center; padding: 6px; cursor: pointer; width: 130px;
  background: linear-gradient(180deg, #20160c, #120a05); border: 2px solid #3a2412; border-radius: 10px;
}
.ld-skin.sel { border-color: #ffd24a; box-shadow: 0 0 12px rgba(255,210,74,.35); }
.ld-skin.locked { opacity: .6; }
.ld-skin:hover { filter: brightness(1.15); }
.ld-skin-name { font-size: 10px; font-weight: 900; color: #fff; background: linear-gradient(180deg, #c82e1e, #951a0e); border-radius: 4px; padding: 2px 0; }
.ld-skin-sub { font-size: 9px; color: #b89a7a; font-family: Arial; font-weight: 700; }
.ld-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 10px; }

/* -------------------------------------------------------- collections -- */
.coll-title { text-align: center; font-size: 16px; color: #fff; letter-spacing: 3px; margin-bottom: 12px; }
.evo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; max-width: 760px; margin: 0 auto; }
.evo-card {
  background: linear-gradient(180deg, #20160c, #120a05);
  border: 2px solid #3a2412; border-radius: 10px; padding: 8px; text-align: center;
  transition: transform .1s, border-color .1s;
}
.evo-card.unlocked { border-color: #b8742a; }
.evo-card.unlocked:hover { transform: translateY(-3px); border-color: #ff7a18; }
.evo-card.equipped { border-color: #e83a2a; box-shadow: 0 0 14px rgba(232,58,42,.25); }
.evo-card.event { border-color: #5a3d8a; opacity: .85; }
.evo-card.event .evo-name { color: #c9a8f0; }
.coll-count { text-align: center; font-size: 11px; color: #ffd24a; letter-spacing: 1.5px; margin-bottom: 10px; }
.evo-name { font-size: 11px; font-weight: 900; color: #cdc4b8; letter-spacing: 1px; margin-bottom: 4px; }
.evo-card.unlocked .evo-name { color: #fff; }
.evo-art { position: relative; }
.evo-lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 30px; opacity: .9; }
.evo-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.evo-num {
  width: 24px; height: 27px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: #fff; background: #3a2412;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.evo-card.unlocked .evo-num { background: #b8742a; }
.evo-req { font-size: 9px; color: #8a7a6a; font-family: Arial; }
.evo-gear { background: none; font-size: 15px; color: #b89a7a; }
.evo-gear:hover { color: #fff; }

.emote-slots { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.emote-slot {
  width: 56px; height: 56px; font-size: 26px; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #1d1208; border: 2px solid #4a2a14; border-radius: 10px; cursor: pointer;
}
.emote-slot.sel { border-color: #ff7a18; box-shadow: 0 0 10px rgba(255,122,24,.5); }
.slot-key { position: absolute; top: 2px; left: 5px; font-size: 9px; color: #ffd24a; }
.slot-hint { font-size: 10px; color: #8a7a6a; font-family: Arial; max-width: 170px; }

.cos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; max-width: 720px; margin: 0 auto; }
.cos-card {
  text-align: center; padding: 12px 8px; border-radius: 10px; cursor: pointer; position: relative;
  background: linear-gradient(180deg, #20160c, #120a05); border: 2px solid #3a2412;
}
.cos-card.r-common { border-color: #3fae6a44; }
.cos-card.r-rare { border-color: #3f6bd066; }
.cos-card.r-epic { border-color: #a13fd066; }
.cos-card.r-legendary { border-color: #e0883a99; box-shadow: 0 0 12px rgba(224,136,58,.2); }
.cos-card:hover { filter: brightness(1.2); }
.cos-card.locked { opacity: .55; }
.cos-card.sel { border-color: #ff7a18; box-shadow: 0 0 12px rgba(255,122,24,.45); }
.cos-art { font-size: 34px; height: 44px; display: flex; align-items: center; justify-content: center; }
.cos-name { font-size: 10px; color: #cdc4b8; margin-top: 4px; }
.cos-eq { font-size: 8px; color: #ff7a18; letter-spacing: 1px; margin-top: 2px; }
.blood-dot { display: inline-block; width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(0,0,0,.4); }

.skin-row { display: flex; gap: 12px; justify-content: center; margin: 14px 0; }
.skin-card { text-align: center; padding: 8px; border: 2px solid #3a2412; border-radius: 10px; cursor: pointer; font-size: 11px; color: #cdc4b8; }
.skin-card.sel { border-color: #ff7a18; }
.skin-card.locked { opacity: .6; }
.skin-card:hover { filter: brightness(1.15); }

/* -------------------------------------------------------- tournaments -- */
.tour-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.tour-title span { font-size: 18px; font-weight: 900; color: #fff; letter-spacing: 1px; text-transform: uppercase; }
.tour-region { font-size: 10px; color: #ff7a18; letter-spacing: 2px; }
.tour-modes { display: flex; gap: 8px; }
.pill-btn {
  padding: 7px 16px; font-size: 11px; font-weight: 900; color: #fff; border-radius: 7px;
  background: linear-gradient(180deg, #4a4a52, #2e2e36); border: 1px solid #1a1a20; box-shadow: 0 3px 0 #1a1a20;
  text-transform: uppercase; transition: transform .12s, filter .12s, box-shadow .12s;
}
.pill-btn:hover { transform: translateY(-2px); filter: brightness(1.12); box-shadow: 0 5px 0 #1a1a20; }
.pill-btn:active { transform: translateY(1px); box-shadow: 0 2px 0 #1a1a20; }
.pill-btn.sel-green { background: linear-gradient(180deg, #5ab040, #2e7a1e); border-color: #1c5226; box-shadow: 0 3px 0 #1c5226; }
.pill-btn.sel-green:hover { box-shadow: 0 5px 0 #1c5226; }
.tour-table { width: 100%; border-collapse: collapse; max-width: 800px; margin: 0 auto; }
.tour-table th {
  font-size: 11px; color: #ffd24a; letter-spacing: 1px; text-align: left; padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.tour-table td { font-size: 12px; color: #cdc4b8; padding: 8px 10px; font-family: Arial; font-weight: 700; }
.tour-table tbody tr:nth-child(odd) { background: rgba(255,255,255,.025); }
.tour-table tbody tr:hover { background: rgba(255,255,255,.06); }
.t-name { color: #fff !important; }
.t-score { color: #ffd24a !important; }
.me-row { background: rgba(63,107,208,.25) !important; outline: 1px solid #3f6bd0; }
.champ-list { max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.champ-list-row { display: flex; align-items: center; gap: 12px; background: rgba(20,13,8,.8); border-radius: 8px; padding: 9px 14px; }
.cl-day { font-size: 10px; color: #ffd24a; min-width: 70px; letter-spacing: 1px; }
.cl-name { font-size: 13px; color: #fff; }

/* ------------------------------------------------------------ settings -- */
.settings { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(20,13,8,.85); border-radius: 10px; padding: 12px 16px; font-size: 13px; color: #fff;
}
.set-row input[type=range] { width: 170px; accent-color: #ff7a18; }
.set-row input[type=checkbox] { width: 20px; height: 20px; accent-color: #e83a2a; }
.set-row select { background: #2a190c; color: #fff; border: 1px solid #5e3a1c; border-radius: 5px; font-family: inherit; padding: 5px 10px; }
.lang-row { display: flex; gap: 8px; }
.lang-btn { padding: 7px 12px; font-size: 12px; font-weight: 900; color: #fff; background: #2a190c; border: 2px solid #4a2a14; border-radius: 7px; }
.lang-btn.sel { border-color: #ff7a18; }
.set-keys { background: rgba(20,13,8,.85); border-radius: 10px; padding: 12px 16px; font-size: 12px; color: #cdc4b8; font-family: Arial; display: flex; flex-direction: column; gap: 6px; }
.set-keys b { color: #ffd24a; font-family: 'Arial Black'; letter-spacing: 1px; }

/* --------------------------------------------------------- shared btns -- */
.btn-red, .btn-green, .btn-grey {
  padding: 10px 26px; font-size: 14px; font-weight: 900; color: #fff; border-radius: 8px;
  letter-spacing: .5px; text-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.btn-red, .btn-green, .btn-grey { transition: transform .12s, filter .12s, box-shadow .12s; }
.btn-red { background: linear-gradient(180deg, #e83a2a, #b81e12); border: 2px solid #6e0e06; box-shadow: 0 4px 0 #6e0e06; }
.btn-green { background: linear-gradient(180deg, #5ab040, #2e7a1e); border: 2px solid #1c5226; box-shadow: 0 4px 0 #1c5226; }
.btn-grey { background: linear-gradient(180deg, #4a4a52, #2e2e36); border: 2px solid #1a1a20; box-shadow: 0 4px 0 #1a1a20; }
.btn-red:hover, .btn-green:hover, .btn-grey:hover { filter: brightness(1.12); transform: translateY(-2px); }
.btn-red:hover { box-shadow: 0 6px 0 #6e0e06, 0 8px 18px rgba(232,58,42,.4); }
.btn-green:hover { box-shadow: 0 6px 0 #1c5226, 0 8px 18px rgba(74,168,72,.4); }
.btn-grey:hover { box-shadow: 0 6px 0 #1a1a20, 0 8px 18px rgba(0,0,0,.4); }
.btn-red:active, .btn-green:active, .btn-grey:active { transform: translateY(2px); }
.btn-red.big { font-size: 20px; padding: 14px 36px; }
.btn-gold { padding: 10px 22px; font-size: 14px; font-weight: 900; border-radius: 8px; letter-spacing: .4px; cursor: pointer;
  color: #2a1c06; text-shadow: 0 1px 0 rgba(255,255,255,.22);
  background: linear-gradient(180deg, #ffd24a, #f0a020); border: 2px solid #b8780f; box-shadow: 0 4px 0 #9a6608;
  transition: transform .12s, filter .12s, box-shadow .12s; }
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 6px 0 #9a6608, 0 8px 18px rgba(255,200,80,.4); }
.btn-gold:active { transform: translateY(2px); box-shadow: 0 1px 0 #9a6608; }
/* little chest art used as an icon inside buttons (UNLOCK PERMANENTLY / FROM CHESTS) */
.btn-chest-ico { display: inline-block; width: 26px; height: 25px; vertical-align: middle; margin: -4px 6px -4px 0; }
.btn-chest-ico .chest-svg { width: 100%; height: 100%; display: block; overflow: visible; }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* -------------------------------------------------------------- BAZAAR -- */
.bazaar { max-width: 820px; margin: 0 auto; }
.bz-feat { margin-bottom: 8px; }
.bz-feat-h { font-size: 13px; font-weight: 900; color: #ffd24a; letter-spacing: .5px; margin: 2px 0 9px; text-shadow: 0 0 10px rgba(255,200,80,.4); }
.bz-feat-h span { font-size: 10px; color: #9fb0d8; font-weight: 700; }
.bz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.bz-cats { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 12px; }
.bz-cat { padding: 7px 14px; border-radius: 9px; font-size: 12px; font-weight: 900; color: #aeb8d6; cursor: pointer;
  background: rgba(20,28,48,.7); border: 1px solid rgba(120,150,220,.18); transition: transform .12s, color .12s, background .12s; }
.bz-cat:hover { color: #fff; transform: translateY(-1px); }
.bz-cat.sel { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); background: linear-gradient(180deg,#ffd24a,#f0a020); border-color: #b8780f; box-shadow: 0 2px 0 #9a6608; }
.bz-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 12px 8px 10px; border-radius: 11px; background: linear-gradient(160deg, rgba(26,34,58,.92), rgba(12,18,34,.92));
  border: 1.5px solid rgba(120,150,220,.16); }
.bz-card.r-rare { border-color: rgba(63,107,208,.66); }
.bz-card.r-epic { border-color: rgba(161,63,208,.66); box-shadow: 0 0 12px rgba(161,63,208,.18); }
.bz-card.r-legendary { border-color: #e0883a; box-shadow: 0 0 14px rgba(224,136,58,.3); }
.bz-card.owned { opacity: .7; }
.bz-feat .bz-card { border-color: rgba(255,210,74,.55); box-shadow: 0 0 12px rgba(255,200,80,.2); }
.bz-ico { height: 38px; display: flex; align-items: center; justify-content: center; font-size: 27px; }
.bz-ico .blood-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-block; }
.bz-ico .trail-swatch { width: 46px; height: 14px; }
.bz-skin { width: 24px; height: 24px; border-radius: 50%; display: inline-block; border: 2px solid #000; box-shadow: inset -2px -2px 4px rgba(0,0,0,.4); }
.bz-art { width: 50px; height: 45px; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
/* inline gold/gem icon (SVG) used in text + buttons so it renders on every device (no tofu) */
.coin-i { width: 1.05em; height: 1.05em; vertical-align: -0.16em; display: inline-block; flex: none; }

/* ===================================================== LOCKER — live-preview shop == */
.locker { display: flex; gap: 16px; align-items: stretch; max-width: 1040px; margin: 0 auto; }
.lk-stage { flex: 0 0 322px; display: flex; flex-direction: column; gap: 9px;
  background: radial-gradient(ellipse at 50% 36%, rgba(70,100,180,.24), rgba(10,14,28,.5) 68%), linear-gradient(180deg, rgba(18,26,48,.92), rgba(10,14,26,.92));
  border: 1px solid rgba(120,150,220,.22); border-radius: 16px; padding: 12px; }
.lk-top { display: flex; justify-content: space-between; align-items: center; font-weight: 900; }
.lk-pname { color: #eaf0fb; font-size: 14px; }
.lk-coins { color: #ffd24a; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
#lk-canvas { width: 100%; height: 300px; display: block; }
.lk-evorow { display: flex; align-items: center; justify-content: center; gap: 10px; }
.lk-evobtn { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; line-height: 1; font-weight: 900; color: #cfe0ff; background: rgba(40,55,95,.7); border: 1px solid rgba(120,160,255,.3); cursor: pointer; }
.lk-evobtn:hover { filter: brightness(1.2); }
.lk-evoname { font-weight: 900; color: #ffd24a; font-size: 14px; letter-spacing: .5px; min-width: 120px; text-align: center; }
.lk-selbar { min-height: 44px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(120,150,220,.16); padding-top: 9px; }
.lk-hint { color: #8fa0c8; font-size: 12px; font-family: Arial; font-weight: 700; text-align: center; width: 100%; }
.lk-selinfo { flex: 1; min-width: 0; }
.lk-selnm { display: block; color: #fff; font-weight: 900; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-selrar { font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.lk-act { flex: none; padding: 9px 15px; border-radius: 9px; font-weight: 900; font-size: 13px; cursor: pointer; border: none; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); transition: filter .1s, transform .1s; }
.lk-act.equip { background: linear-gradient(180deg,#5ab040,#2e7a1e); box-shadow: 0 3px 0 #1c5226; }
.lk-act.eqd { background: rgba(40,90,52,.5); color: #7ee0a0; cursor: default; text-shadow: none; }
.lk-act.chest { background: linear-gradient(180deg,#7a4ec8,#3f2270); box-shadow: 0 3px 0 #2a1850; color: #ffe6a8; font-size: 11px; }
.lk-act.buy { color: #8b93a8; background: linear-gradient(180deg, rgba(40,52,86,.95), rgba(22,30,54,.95)); box-shadow: 0 3px 0 rgba(8,12,24,.8); display: inline-flex; align-items: center; gap: 5px; }
.lk-act.buy.afford { color: #ffd24a; box-shadow: 0 3px 0 rgba(8,12,24,.8), 0 0 12px rgba(255,210,74,.34); }
.lk-act:not(.eqd):hover { filter: brightness(1.1); transform: translateY(-1px); }

.lk-side { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lk-tabs { display: flex; gap: 7px; margin-bottom: 10px; }
.lk-tab { flex: 1; padding: 8px 6px; border-radius: 9px; font-size: 11.5px; font-weight: 900; color: #aeb8d6; cursor: pointer; background: rgba(20,28,48,.7); border: 1px solid rgba(120,150,220,.18); }
.lk-tab.on { color: #1a1206; background: linear-gradient(180deg,#ffd24a,#f0a020); border-color: #b8780f; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; align-content: start; overflow-y: auto; max-height: 64vh; padding: 2px; }
.lk-tile { position: relative; min-height: 66px; border-radius: 11px; cursor: pointer; padding: 4px;
  background: linear-gradient(160deg, rgba(26,34,58,.9), rgba(12,18,34,.9)); border: 1.5px solid rgba(120,150,220,.16);
  display: flex; align-items: center; justify-content: center; transition: transform .1s, border-color .1s, box-shadow .1s; }
.lk-tile:hover { transform: translateY(-2px); }
.lk-tile.r-rare { border-color: rgba(63,107,208,.6); }
.lk-tile.r-epic { border-color: rgba(161,63,208,.6); }
.lk-tile.r-legendary { border-color: #e0883a; box-shadow: 0 0 10px rgba(224,136,58,.25); }
.lk-tile.eqd { background: linear-gradient(160deg, rgba(40,90,52,.6), rgba(18,40,26,.6)); }
.lk-tile.sel { border-color: #ffd24a !important; box-shadow: 0 0 0 2px #ffd24a, 0 0 14px rgba(255,210,74,.5); transform: translateY(-2px); }
.lk-tile.locked .lk-tile-ico { opacity: .5; }
.lk-tile-ico { width: 100%; height: 58px; font-size: 26px; display: flex; align-items: center; justify-content: center; }
.lk-tile-ico canvas { width: 100%; height: 100%; }
.lk-tile-ico .trail-swatch { width: 46px; height: 13px; }
.lk-tile-ico .aura-swatch { width: 34px; height: 34px; }
.lk-tile-ico .blood-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-block; }
.lk-none { color: #6a7494; font-size: 24px; }
.lk-badge { position: absolute; top: 3px; right: 3px; width: 17px; height: 17px; border-radius: 50%; font-size: 10px; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.lk-badge.eq { background: #3fae6a; color: #fff; }
.lk-badge.lock, .lk-badge.chest { background: rgba(0,0,0,.55); font-size: 9px; }
@media (max-width: 760px) {
  .locker { flex-direction: column; }
  .lk-stage { flex: none; width: 100%; }
  #lk-canvas { height: 224px; }
  .lk-grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); }
}
.bz-name { font-size: 11px; font-weight: 900; color: #eaf0fb; line-height: 1.15; min-height: 26px; display: flex; align-items: center; }
/* calm navy look (like the Chests buy button), kept slim. Muted when you can't afford it;
   gold + glow when you CAN, so affordable skins read as "obtainable". */
.bz-buy { width: 100%; padding: 4px 4px; border-radius: 7px; font-size: 11px; font-weight: 900; color: #8b93a8; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.5); background: linear-gradient(180deg, rgba(40,52,86,.95), rgba(22,30,54,.95));
  border: 1px solid rgba(8,12,24,.8); box-shadow: 0 2px 0 rgba(8,12,24,.8); transition: filter .1s, transform .1s, box-shadow .1s; }
.bz-buy .bz-coin { filter: grayscale(.6) opacity(.7); }
.bz-buy.afford { color: #ffd24a; border-color: rgba(255,210,74,.55); box-shadow: 0 2px 0 rgba(8,12,24,.8), 0 0 12px rgba(255,210,74,.34); }
.bz-buy.afford .bz-coin { filter: none; }
.bz-buy:hover { filter: brightness(1.08); transform: translateY(-1px); }
.bz-buy:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(8,12,24,.8); }
.bz-was { color: rgba(255,255,255,.6); font-size: 9px; }
.bz-have { width: 100%; padding: 5px 4px; border-radius: 7px; font-size: 11px; font-weight: 900; color: #7ee0a0; background: rgba(40,90,52,.4); }
/* legendary / chest-only: shown in the Bazaar but not for sale — tap to jump to the chests that drop it */
.bz-chest { width: 100%; padding: 4px 4px; border-radius: 7px; font-size: 10px; font-weight: 900; color: #ffe6a8; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,.55); background: linear-gradient(180deg,#7a4ec8,#3f2270); border: 1px solid rgba(224,136,58,.55);
  box-shadow: 0 2px 0 #2a1850; transition: filter .1s, transform .1s, box-shadow .1s; letter-spacing: .3px; }
.bz-chest:hover { filter: brightness(1.14); transform: translateY(-1px); }
.bz-chest:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a1850; }
.bz-card.chest-only { border-color: #e0883a; box-shadow: 0 0 13px rgba(224,136,58,.26); }
.bz-card.chest-only .bz-ico { filter: drop-shadow(0 0 6px rgba(224,136,58,.45)); }

/* TRY-before-you-buy bar (Bazaar + Collections) — red rewarded-ad button */
.try-bar {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 540px; margin: 0 auto 14px;
  padding: 9px 14px; border-radius: 12px; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(135deg, rgba(216,56,40,.94), rgba(150,20,10,.88));
  border: 1px solid rgba(255,150,120,.3); box-shadow: 0 4px 14px rgba(216,56,40,.3);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.try-bar .try-ad { width: 30px; height: 22px; flex: none; }
.try-bar .try-ad svg { width: 100%; height: 100%; display: block; }
.try-bar .try-txt { font-size: 12.5px; font-weight: 900; letter-spacing: .3px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.try-bar[disabled] { cursor: default; filter: grayscale(.35); opacity: .72;
  background: linear-gradient(135deg, rgba(86,62,58,.85), rgba(48,32,28,.85)); box-shadow: none; }
.try-bar:not([disabled]):hover { transform: translateY(-2px); box-shadow: 0 7px 20px rgba(216,56,40,.5); }
.try-bar.armed { animation: tryPulse 1.5s ease-in-out infinite; }
@keyframes tryPulse { 0%,100% { box-shadow: 0 4px 14px rgba(216,56,40,.32); } 50% { box-shadow: 0 4px 24px rgba(255,90,60,.62); } }
.bz-card, .cos-card { transition: box-shadow .12s, transform .12s; }
.try-pick { box-shadow: 0 0 0 2px #ff7a5a, 0 0 16px rgba(255,90,60,.55) !important; transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .try-bar.armed { animation: none; } }

/* --------------------------------------------------------------- modal -- */
#modal-root { display: none; position: fixed; inset: 0; z-index: 60; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; }
.modal-box {
  background: linear-gradient(180deg, #241509, #140b05);
  border: 2px solid #5e3a1c; border-radius: 14px; padding: 24px 28px;
  max-width: min(640px, 92vw); max-height: 86vh; overflow-y: auto;
  text-align: center; color: #e8e8e8; box-shadow: 0 20px 60px rgba(0,0,0,.7);
  animation: popin .2s;
}
@keyframes popin { from { transform: scale(.85); opacity: 0; } }
.modal-box h3 { font-size: 20px; margin-bottom: 12px; letter-spacing: 1px; }
.modal-box p { font-size: 13px; font-family: Arial; color: #cdc4b8; margin-bottom: 16px; }
.modal-btns { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.changelog { text-align: left; font-family: Arial; font-size: 13px; margin-bottom: 16px; }
.changelog ul { margin: 8px 0 0 18px; color: #cdc4b8; }

.reward-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 14px 0 20px; }
.reward-card {
  position: relative; overflow: hidden; opacity: 0;
  width: 110px; padding: 14px 6px; border-radius: 10px; border: 2px solid;
  background: rgba(0,0,0,.4);
}
@keyframes reveal { 0% { transform: scale(.8) translateY(8px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; opacity: 1; } }
.reward-card.r-common { border-color: #3fae6a; }
.reward-card.r-rare { border-color: #3f6bd0; box-shadow: 0 0 12px rgba(63,107,208,.35); }
.reward-card.r-epic { border-color: #a13fd0; box-shadow: 0 0 14px rgba(161,63,208,.4); }
.reward-card.r-legendary { border-color: #e0883a; box-shadow: 0 0 20px rgba(224,136,58,.6); }
/* each card materialises when its flying icon lands on it (JS adds .revealed) */
.reward-card.revealed { animation: reveal .4s both; }
.reward-card.revealed.r-epic { animation: reveal .4s both, rwGlowE 1.8s .5s ease-in-out infinite; }
.reward-card.revealed.r-legendary { animation: reveal .4s both, rwGlowL 1.8s .5s ease-in-out infinite; }
@keyframes rwGlowE { 0%,100% { box-shadow: 0 0 14px rgba(161,63,208,.4); } 50% { box-shadow: 0 0 24px rgba(161,63,208,.75); } }
@keyframes rwGlowL { 0%,100% { box-shadow: 0 0 20px rgba(224,136,58,.55); } 50% { box-shadow: 0 0 30px rgba(255,196,80,.9); } }
/* shine sweep across each card as it pops in */
.reward-shine {
  position: absolute; inset: -2px; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%);
  transform: translateX(-150%) skewX(-12deg);
}
.reward-card.revealed .reward-shine { animation: rwShine .8s .15s ease-out backwards; }
@keyframes rwShine { 0% { transform: translateX(-150%) skewX(-12deg); } 100% { transform: translateX(150%) skewX(-12deg); } }
.reward-ico { position: relative; z-index: 1; font-size: 34px; min-height: 50px; display: flex; align-items: center; justify-content: center; }
/* real cosmetic art / swatches shown in chest rewards (and their flying clones) */
.reward-ico .reward-art, .cs-fly .reward-art { width: 56px; height: 52px; object-fit: contain; display: block; filter: drop-shadow(0 2px 5px rgba(0,0,0,.55)); }
.reward-ico .trail-swatch, .cs-fly .trail-swatch { width: 56px; height: 18px; }
.reward-ico .aura-swatch, .cs-fly .aura-swatch { width: 42px; height: 42px; }
.reward-ico .bz-skin, .cs-fly .bz-skin { width: 42px; height: 42px; border-width: 3px; }
.reward-ico .blood-dot, .cs-fly .blood-dot { width: 34px; height: 34px; border-radius: 50%; display: inline-block; }
.cs-fly { display: flex; align-items: center; justify-content: center; }
.reward-label { font-size: 11px; color: #fff; margin: 6px 0 4px; }
.reward-rar { font-size: 8px; letter-spacing: 1px; opacity: .8; }
.r-common .reward-rar { color: #3fae6a; } .r-rare .reward-rar { color: #6a9ae8; }
.r-epic .reward-rar { color: #c97ee8; } .r-legendary .reward-rar { color: #e0883a; }

/* ------------------------------------------------- chest opening seq -- */
.chest-seq { position: relative; }
/* single-window reveal: the chest stays put and the cards section opens BELOW it */
.cs-reveal { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.chest-seq.done .cs-reveal { opacity: 1; pointer-events: auto; }
.chest-seq.done .cs-stage { transform: scale(.9); }   /* chest settles a touch as the rewards slide in */
/* COLLECT waits until the last item has landed */
.cs-reveal .btn-red { opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.chest-seq.ready .cs-reveal .btn-red { opacity: 1; pointer-events: auto; }
/* flying loot: each item icon launches small from the chest and grows as it falls to its card slot */
.cs-fly-layer { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.cs-fly {
  position: absolute; font-size: 34px; line-height: 1; opacity: .95;
  transform: translate(-50%, -50%) scale(.22); filter: drop-shadow(0 0 9px var(--ray));
  transition: left .52s cubic-bezier(.45,.05,.5,1), top .52s cubic-bezier(.5,0,.6,1), transform .52s cubic-bezier(.3,1.35,.5,1);
  will-change: left, top, transform;
}
.cs-fly.go { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.cs-fly.land { opacity: 0; transition: opacity .2s ease; }
/* the opening burst overflows the box — clip it (kills the scrollbars); allow scroll only after reveal */
.modal-box.chest-modal { overflow: hidden; }
.modal-box.chest-modal.revealed { overflow-y: auto; }
.cs-stage {
  position: relative; height: 212px; display: flex; align-items: center; justify-content: center;
  margin: 6px 0 2px; transition: transform .45s ease;
}
.cs-open-label {
  font-family: 'Arial Black', Arial; font-weight: 900; font-size: 17px; letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,.6); animation: csLabel .5s .25s backwards;
}
@keyframes csLabel { from { opacity: 0; transform: translateY(8px); } }

/* the chest itself: rattle (anticipation) then a punchy scale-pop on burst */
.cs-burst-art {
  position: relative; z-index: 3; transform-origin: 50% 82%;
  animation: csRattle .5s ease-in-out, csPop .55s .5s cubic-bezier(.2,1.7,.4,1) both;
}
.cs-burst-art .chest-svg { width: 152px; height: auto; overflow: visible; }
@keyframes csRattle {
  0%,100% { transform: translateX(0) rotate(0); }
  14% { transform: translateX(-3px) rotate(-2deg); }
  28% { transform: translateX(3px) rotate(2deg); }
  42% { transform: translateX(-3px) rotate(-2.3deg); }
  58% { transform: translateX(3px) rotate(2.3deg); }
  74% { transform: translateX(-2px) rotate(-1.5deg); }
  88% { transform: translateX(2px) rotate(1.5deg); }
}
@keyframes csPop { 0% { transform: scale(1); } 38% { transform: scale(1.17); } 72% { transform: scale(.96); } 100% { transform: scale(1); } }

/* lid hinges up + tilts as it bursts open (2D, no 3D dependency) */
.cs-burst-art .cs-lid {
  transition: none;
  animation: csLid .8s .5s cubic-bezier(.3,1.25,.45,1) forwards;
}
@keyframes csLid {
  0% { transform: translateY(0) rotate(0) scaleY(1); }
  55% { transform: translateY(-34px) rotate(-11deg) scaleY(1.05); }
  100% { transform: translateY(-29px) rotate(-8deg) scaleY(1.03); }
}
/* interior glow swells before, then flares huge as the lid lifts */
.cs-burst-art .cs-glow {
  transform-box: fill-box; transform-origin: 50% 50%;
  animation: csGlowBuild .5s ease-in both, csGlowFlare .85s .5s ease-out both;
}
@keyframes csGlowBuild { 0% { opacity: .3; transform: scaleY(1); } 100% { opacity: .9; transform: scaleY(1.35); } }
@keyframes csGlowFlare { 0% { opacity: .9; transform: scaleY(1.35) scaleX(1); } 32% { opacity: 1; transform: scaleY(3.4) scaleX(1.28); } 100% { opacity: .82; transform: scaleY(2.5) scaleX(1.12); } }
.cs-burst-art .cs-aura { animation: csAura .9s .5s ease-out both; }
@keyframes csAura { 0% { opacity: .16; } 30% { opacity: .55; } 100% { opacity: .3; } }
.cs-burst-art .cs-gem, .cs-burst-art .cs-spark { animation: none; }   /* own FX take over */

/* god-rays fan out behind the chest on burst */
.cs-rays {
  position: absolute; left: 50%; top: 47%; width: 300px; height: 300px; z-index: 1;
  transform: translate(-50%,-50%) rotate(0) scale(.25); opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, var(--ray) 0deg 5deg, transparent 5deg 17deg);
  border-radius: 50%;
  -webkit-mask: radial-gradient(closest-side, #000 22%, rgba(0,0,0,.5) 46%, transparent 72%);
          mask: radial-gradient(closest-side, #000 22%, rgba(0,0,0,.5) 46%, transparent 72%);
  animation: csRays 1.5s .5s ease-out both;
}
@keyframes csRays {
  0% { opacity: 0; transform: translate(-50%,-50%) rotate(0) scale(.25); }
  28% { opacity: .5; }
  100% { opacity: .28; transform: translate(-50%,-50%) rotate(38deg) scale(1.05); }
}
/* white pop of light at the moment of burst */
.cs-flash {
  position: absolute; left: 50%; top: 46%; width: 230px; height: 230px; z-index: 4;
  transform: translate(-50%,-50%) scale(.3); opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, #fff 0%, var(--ray) 26%, transparent 64%);
  border-radius: 50%; animation: csFlash .6s .5s ease-out both;
}
@keyframes csFlash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); } 18% { opacity: .95; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.55); } }
/* sparks fly outward from the chest mouth */
.cs-sparks { position: absolute; left: 50%; top: 49%; width: 0; height: 0; z-index: 5; pointer-events: none; }
.cs-spk {
  position: absolute; left: 0; top: 0; width: var(--sz); height: var(--sz); margin: calc(var(--sz) / -2);
  border-radius: 50%; background: var(--ray); box-shadow: 0 0 8px 1px var(--ray);
  opacity: 0; animation: csSpark 1s calc(.5s + var(--d)) ease-out both;
}
.cs-spk.big { background: #fff; box-shadow: 0 0 11px 2px var(--ray); }
@keyframes csSpark {
  0% { opacity: 0; transform: translate(0,0) scale(.4); }
  16% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.65); }
}
@media (prefers-reduced-motion: reduce) {
  .cs-burst-art, .cs-burst-art .cs-lid, .cs-burst-art .cs-glow, .cs-rays, .cs-flash, .cs-spk { animation-duration: .01s; }
}
/* keep the single chest window compact on short screens (landscape phones) */
@media (max-height: 580px) { .cs-stage { height: 150px; } .cs-burst-art .chest-svg { width: 118px; } }

/* ----------------------------------------------- boost promo (WATCH AD) -- */
.boost-promo { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 14px; }
.bp-char { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.bp-cv { display: block; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.bp-start .bp-cv { opacity: .92; }
.bp-end { position: relative; }
.bp-end::before {   /* gold aura behind the boosted final form */
  content: ''; position: absolute; left: 50%; top: 44%; width: 150px; height: 150px; z-index: 0;
  transform: translate(-50%,-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255,200,80,.45) 0%, rgba(255,170,40,.16) 45%, transparent 70%);
  animation: bpAura 2.4s ease-in-out infinite;
}
@keyframes bpAura { 0%,100% { opacity: .7; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.12); } }
.bp-end .bp-cv { position: relative; z-index: 1; animation: bpFloat 2.8s ease-in-out infinite; }
.bp-end .bp-tag { position: relative; z-index: 1; }
@keyframes bpFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.bp-tag { font-size: 10px; font-weight: 900; letter-spacing: .5px; color: #9fb0d8; text-transform: uppercase; }
.bp-tag-gold { color: #ffd24a; text-shadow: 0 0 10px rgba(255,200,80,.7); }
.bp-arrow { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 80px; padding: 0 2px; }
.bp-bolt { font-size: 22px; line-height: 1; filter: drop-shadow(0 0 7px rgba(255,210,74,.95)); animation: bpBolt 1.1s ease-in-out infinite; }
@keyframes bpBolt { 0%,100% { transform: scale(1) rotate(-4deg); } 50% { transform: scale(1.2) rotate(4deg); } }
.bp-mult { font-size: 14px; font-weight: 900; color: #ffd24a; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.bp-arrow-line { width: 62px; height: 8px; margin: 2px 0; position: relative; background: linear-gradient(90deg, rgba(255,210,74,.18), #ffd24a); border-radius: 4px; }
.bp-arrow-line::after { content: ''; position: absolute; right: -2px; top: 50%; transform: translateY(-50%); border-left: 10px solid #ffd24a; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.bp-faster { font-size: 8px; font-weight: 900; letter-spacing: .5px; color: #7fe0a0; white-space: nowrap; }
.bp-text { font-size: 13px; }
.bp-hint { opacity: .72; font-size: 11px; }
.bp-btns { display: flex; gap: 12px; justify-content: center; align-items: stretch; margin-top: 4px; }
.bp-btns .bp-watch { flex: none; min-width: 188px; max-width: 230px; cursor: pointer; }
.bp-btns .bp-no { padding: 0 22px; }
@media (max-width: 600px) {
  .boost-promo { gap: 0; }
  .bp-arrow { min-width: 60px; }
  .bp-btns { flex-direction: column; align-items: center; }
  .bp-btns .bp-no { padding: 12px 22px; }
}

/* ------------------------------------------------- death / revive modal -- */
.rv-hero { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 10px 0 6px; }
.rv-art { position: relative; }
.rv-art::before { content: ''; position: absolute; left: 50%; top: 46%; width: 120px; height: 120px; transform: translate(-50%,-50%); border-radius: 50%; z-index: 0; background: radial-gradient(circle, rgba(255,90,74,.32) 0%, rgba(255,60,40,.1) 45%, transparent 70%); }
.rv-cv { position: relative; z-index: 1; display: block; filter: drop-shadow(0 6px 9px rgba(0,0,0,.6)); }
.rv-info { text-align: left; }
.rv-name { font-size: 21px; font-weight: 900; letter-spacing: .5px; text-shadow: 0 2px 4px rgba(0,0,0,.55); }
.rv-lvl { font-size: 13px; font-weight: 900; color: #cdd6e6; margin-top: 1px; }
.rv-keep { font-size: 11px; color: #7ec97e; font-weight: 900; margin-top: 4px; }
.rv-text { font-size: 13px; }
.rv-sub { opacity: .82; font-size: 11px; }
.rv-btns { display: flex; gap: 12px; justify-content: center; align-items: stretch; margin: 6px 0 10px; flex-wrap: wrap; }
.rv-btns .rv-revive { flex: none; min-width: 196px; max-width: 232px; cursor: pointer; }
.rv-respawn { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; padding: 8px 22px; }
.rv-respawn-sub { font-size: 10px; opacity: .82; font-weight: 900; }
.rv-leave { width: 100%; max-width: 388px; }
/* kid-first death-screen hierarchy: big free action, small optional ad row */
.rv-main { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 388px;
  margin: 4px auto 10px; padding: 13px 22px; font-size: 17px; line-height: 1.1; }
.rv-main .rv-respawn-sub { font-size: 10.5px; opacity: .85; font-weight: 800; text-transform: none; letter-spacing: .2px; }
.rv-alt { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 388px; margin: 0 auto 10px; padding: 8px 14px;
  background: rgba(255,255,255,0.05); border: 1.5px solid #3a4a7a; border-radius: 10px; cursor: pointer;
  color: #cfd8f0; text-align: left; transition: border-color .15s, background .15s; }
.rv-alt:hover { border-color: #6a7ab0; background: rgba(255,255,255,0.09); }
.rv-alt-ico svg { width: 30px; height: 24px; display: block; }
.rv-alt-txt { display: flex; flex-direction: column; line-height: 1.2; }
.rv-alt-txt b { font-size: 12.5px; color: #fff; }
.rv-alt-txt span { font-size: 10.5px; color: #8fa0c8; }
@media (max-width: 600px) {
  .rv-hero { gap: 9px; }
  .rv-btns { flex-direction: column; align-items: center; }
  .rv-btns .rv-revive, .rv-respawn { width: 100%; max-width: 300px; }
}

/* --------------------------------------------------------------- toast -- */
#toast {
  position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%) translateY(20px);
  background: rgba(15, 9, 4, .95); border: 1px solid #ff7a18; color: #fff;
  font-size: 13px; font-weight: 900; padding: 11px 22px; border-radius: 9px;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 80;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================================================================ HUD == */
#hud { display: none; position: fixed; inset: 0; pointer-events: none; z-index: 10; font-family: 'Arial Black', Arial; }

#hud-lb {
  position: absolute; top: 0; left: 0; min-width: 240px;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.35));
  padding: 6px 10px 8px; border-bottom-right-radius: 10px;
}
.lb-row { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 13px; }
/* active buff cards (top-left, under the leaderboard) */
#hud-buffs { position: absolute; top: 150px; left: 8px; z-index: 6; display: flex; flex-direction: column; gap: 7px; pointer-events: none; }
.buff-card { display: flex; align-items: center; gap: 9px; width: 196px; padding: 7px 9px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(16,22,40,.94), rgba(10,14,26,.94));
  border: 1px solid rgba(255,255,255,.08); border-left: 4px solid var(--bc); box-shadow: 0 3px 12px rgba(0,0,0,.45);
  animation: buffIn .25s ease-out; }
@keyframes buffIn { from { transform: translateX(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.buff-ico { width: 30px; height: 30px; flex: none; color: var(--bc); display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.08); border-radius: 8px; }
.buff-ico svg { width: 20px; height: 20px; display: block; }
.buff-info { flex: 1; min-width: 0; }
.buff-top { display: flex; justify-content: space-between; align-items: baseline; }
.buff-name { font-weight: 900; font-size: 12px; color: #fff; letter-spacing: .5px; }
.buff-time { font-weight: 900; font-size: 11px; color: var(--bc); font-family: Arial; }
.buff-sub { font-size: 9.5px; color: #aeb8d0; font-family: Arial; font-weight: 700; margin: 1px 0 3px; }
.buff-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,.13); overflow: hidden; }
.buff-bar i { display: block; height: 100%; background: var(--bc); border-radius: 3px; transition: width .2s linear; }
@media (max-width: 600px) { #hud-buffs { top: 92px; } .buff-card { width: 152px; padding: 5px 7px; gap: 7px; } .buff-ico { width: 24px; height: 24px; } .buff-ico svg { width: 16px; height: 16px; } .buff-name { font-size: 11px; } .buff-sub { font-size: 8.5px; } }
.lb-row.me { background: rgba(63,107,208,.3); border-radius: 4px; padding: 2px 4px; }
.lb-rank { color: #8a8f98; min-width: 22px; }
.lb-av { width: 24px; height: 24px; flex: none; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.55)); }
.lb-av-fb { border-radius: 5px; }
.lb-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.lb-score { color: #aab; font-family: Arial; font-weight: 700; }

#hud-top { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; }
#hud-teams { display: flex; align-items: center; gap: 14px; }
.team-bar { position: relative; width: 240px; height: 26px; background: #1a0d08; border: 2px solid #3a3f48; border-radius: 5px; overflow: hidden; transform: skewX(-12deg); }
.team-fill { height: 100%; background: linear-gradient(180deg, #e83a2a, #a81e12); transition: width .3s; }
.team-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; text-shadow: 0 2px 2px #000; transform: skewX(12deg); }
.team-shield { font-size: 30px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.team-shield.blue { color: #2f6fe0; }
.team-shield.red { color: #d03240; }
#hud-timer { font-size: 26px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 10px rgba(0,0,0,.6); }

#hud-feed { position: absolute; top: 64px; left: 50%; transform: translateX(-50%); text-align: center; font-size: 13px; text-shadow: 0 2px 2px #000; }
#hud-feed div { padding: 1px 0; }

#hud-minimap-wrap {
  position: absolute; top: 0; right: 0; padding: 0;
  border-left: 2px solid rgba(255,255,255,.15); border-bottom: 2px solid rgba(255,255,255,.15);
  border-bottom-left-radius: 8px; overflow: hidden;
}
#hud-minimap { display: block; }

#hud-bottom { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; }
#hud-level {
  width: 46px; height: 46px; border-radius: 50%; z-index: 2;
  background: radial-gradient(circle at 35% 30%, #ffe98a, #e0a018 70%);
  border: 3px solid #8a6a10; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #5e3a04; text-shadow: 0 1px 0 rgba(255,255,255,.4);
  box-shadow: 0 3px 8px rgba(0,0,0,.5);
}
#hud-xp {
  position: relative; width: min(300px, 34vw); height: 18px; margin-left: -8px;
  background: rgba(10, 20, 30, .75); border: 2px solid #cfe6f5; overflow: hidden;
  clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%);
}
#hud-xp-fill { height: 100%; width: 0%; background: linear-gradient(180deg, #d83828, #a01c10); transition: width .2s; }
#hud-xp-hilt { width: 12px; height: 34px; background: linear-gradient(180deg, #ffd24a, #b8742a); border-radius: 3px; margin-left: -6px; z-index: 1; box-shadow: 0 2px 4px rgba(0,0,0,.5); }

#hud-ping {
  position: absolute; right: 10px; bottom: 8px; text-align: right;
  font-size: 12px; color: #cdd6e0; font-family: Consolas, monospace; text-shadow: 0 1px 2px #000;
  background: rgba(0,0,0,.35); padding: 4px 8px; border-radius: 6px;
}

#hud-boost {
  display: none; position: absolute; left: 12px; bottom: 12px;
  font-size: 12px; color: #ffd24a; background: rgba(0,0,0,.5);
  border: 1px solid #ffd24a; border-radius: 7px; padding: 6px 10px;
}

#hud-banner {
  display: none; position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%);
  text-align: center; text-shadow: 0 3px 0 #000;
}
.banner-big { font-size: 64px; font-weight: 900; color: #ffd24a; letter-spacing: 2px;
  text-shadow: 0 4px 16px rgba(0,0,0,.75), 0 0 26px currentColor;
  animation: bossReveal .75s cubic-bezier(.18,.9,.22,1.1) both, bossGlow 1.4s ease-in-out .75s infinite; }
.banner-sub { font-size: 18px; color: #fff; margin-top: 6px; animation: fadein .5s .35s both; }
/* boss name slams in big-and-blurry, overshoots, then settles with a pulsing glow */
@keyframes bossReveal {
  0%   { opacity: 0; transform: scale(2.4); filter: blur(5px); }
  55%  { opacity: 1; transform: scale(.92); filter: blur(0); }
  72%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes bossGlow {
  0%, 100% { text-shadow: 0 4px 16px rgba(0,0,0,.75), 0 0 16px currentColor; }
  50%      { text-shadow: 0 4px 16px rgba(0,0,0,.75), 0 0 38px currentColor, 0 0 64px currentColor; }
}

/* ----- monster-hunt HUD ----- */
#hud-hp {
  display: none; position: absolute; bottom: 64px; left: 50%; transform: translateX(-50%);
  width: min(340px, 42vw); height: 22px; align-items: center; justify-content: center;
  background: rgba(8,12,20,.8); border: 2px solid rgba(255,255,255,.25); border-radius: 6px; overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
}
#hud-hp-fill { position: absolute; left: 0; top: 0; height: 100%; width: 100%;
  background: linear-gradient(180deg,#5ad06a,#2e9a3e); transition: width .15s, background .2s; }
#hud-hp-num { position: relative; font-size: 12px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; letter-spacing: .5px; }

#hud-stage {
  display: none; position: absolute; top: 8px; left: 12px;
  font-size: 12px; font-weight: 900; color: #ffd24a; letter-spacing: 1px;
  background: rgba(0,0,0,.5); border: 1px solid rgba(255,210,74,.5); border-radius: 7px; padding: 5px 10px;
}

#hud-boss {
  display: none; position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
  width: min(560px, 70vw); text-align: center;
}
#hud-boss-head { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-bottom: 3px; }
#hud-boss-name { font-size: 18px; font-weight: 900; color: #fff; letter-spacing: 2px; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0,0,0,.6); }
#hud-boss-title { font-size: 11px; color: #cdd6e0; font-style: italic; font-family: Arial; }
#hud-boss-enrage { display: none; font-size: 11px; font-weight: 900; color: #ff3a3a; letter-spacing: 1px; animation: pulse 0.8s infinite; }
#hud-boss-bar { height: 16px; background: rgba(8,8,12,.85); border: 2px solid rgba(0,0,0,.7); border-radius: 5px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.6), inset 0 0 8px rgba(0,0,0,.5); }
#hud-boss-fill { height: 100%; width: 100%; background: linear-gradient(180deg,#ff7a18,#a01c10); transition: width .2s; }
#hud-boss-pips { display: flex; justify-content: center; gap: 6px; margin-top: 5px; }
#hud-boss-pips i { width: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); }
#hud-boss-pips i.on { background: #ffd24a; box-shadow: 0 0 6px rgba(255,210,74,.6); }

/* ============================================================= results == */
#results {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 4, 2, .68); animation: fadein .4s;
}
.rs-box {
  text-align: center; background: linear-gradient(180deg, rgba(30,18,10,.97), rgba(12,7,4,.97));
  border: 2px solid #5e3a1c; border-radius: 16px; padding: 34px 48px;
  box-shadow: 0 24px 80px rgba(0,0,0,.8); color: #fff; animation: popin .3s;
}
.rs-title { font-size: 38px; color: #ff5a4a; letter-spacing: 2px; text-shadow: 0 3px 0 #4e0a04; }
.rs-title.win { color: #ffd24a; text-shadow: 0 3px 0 #6e4a08; }
.rs-sub { font-size: 14px; color: #cdc4b8; margin-top: 6px; font-family: Arial; font-weight: 700; }
.rs-stats { display: flex; gap: 30px; justify-content: center; margin: 24px 0 14px; }
.rs-v { font-size: 26px; color: #fff; }
.rs-l { font-size: 10px; color: #b89a7a; letter-spacing: 1px; margin-top: 3px; }
.rs-earn { font-size: 18px; color: #ffd24a; margin-bottom: 22px; }
.rs-rewards { margin: 4px auto 20px; padding: 10px 20px; border-radius: 12px; display: inline-block;
  background: linear-gradient(180deg, rgba(255,210,74,.14), rgba(255,170,40,.05)); border: 1px solid rgba(255,200,90,.32); }
.rs-rew-title { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #b89a7a; margin-bottom: 6px; }
.rs-rew-row { display: flex; gap: 24px; justify-content: center; }
.rs-rew { font-size: 23px; font-weight: 900; text-shadow: 0 2px 3px rgba(0,0,0,.5); }
.rs-rew.gold { color: #ffd24a; } .rs-rew.gem { color: #6fd0ff; }
.rs-x2 { color: #1a6b2e; font-size: 14px; }
/* "GET 200% GOLD" watch-ad button */
.rs-double-wrap { margin: 0 0 18px; }
.rs-double { display: inline-flex; align-items: stretch; padding: 0; border: none; border-radius: 10px; overflow: hidden;
  cursor: pointer; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); letter-spacing: .5px;
  background: linear-gradient(180deg, #ffd24a, #e0941a); box-shadow: 0 4px 0 #a8650c, 0 6px 16px rgba(0,0,0,.45);
  transition: transform .1s, box-shadow .1s, filter .1s; }
.rs-double:hover { filter: brightness(1.07); transform: translateY(-1px); }
.rs-double:active { transform: translateY(3px); box-shadow: 0 1px 0 #a8650c; }
.rs-double:disabled { opacity: .55; cursor: default; }
.rs-ad-tag { display: inline-flex; align-items: center; padding: 12px 14px; background: linear-gradient(180deg, #c2871c, #8f5c0e);
  border-right: 1px solid rgba(0,0,0,.22); box-shadow: inset -1px 0 0 rgba(255,255,255,.14); }
.rs-double-txt { display: inline-flex; align-items: center; padding: 12px 22px; font-size: 16px; }
.rs-double.done { display: inline-block; padding: 12px 24px; border-radius: 10px; font-size: 15px; font-weight: 900;
  background: rgba(90,176,64,.18); border: 1px solid rgba(90,176,64,.5); color: #7ee08a; }
.rs-ad-tag svg { width: 26px; height: 20px; display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
.rs-double-coin { display: inline-flex; }
.rs-double-coin svg { width: 19px; height: 19px; display: block; }
/* results: "stop the arrow" watch-ad multiplier mini-game */
.rs-mult { max-width: 320px; margin: 6px auto 18px; }
.rs-mult-cap { font-size: 9px; font-weight: 900; letter-spacing: 1px; color: #b89a7a; margin-bottom: 9px; }
.rs-mult-cap b { color: #ffd24a; }
.rs-mult-track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 5px;
  border-radius: 12px; background: rgba(13,20,38,.55); border: 1px solid rgba(120,150,220,.22); box-shadow: inset 0 2px 6px rgba(0,0,0,.4); }
.rs-mult-cell { padding: 9px 0; text-align: center; font-size: 16px; font-weight: 900; color: #fff; border-radius: 7px;
  text-shadow: 0 1px 2px rgba(0,0,0,.6); transition: transform .1s; }
.rs-mult-cell.c2 { background: linear-gradient(180deg, #f0823a, #d2541e); }
.rs-mult-cell.c3 { background: linear-gradient(180deg, #eaa81c, #c4860c); }   /* darker amber so the white number reads (consistent) */
.rs-mult-cell.c5 { background: linear-gradient(180deg, #4fd06a, #25a047); }
.rs-mult-cell.landed { animation: rsLand .5s cubic-bezier(.3,1.5,.5,1) both; box-shadow: 0 0 16px rgba(255,255,255,.6); position: relative; z-index: 2; }
@keyframes rsLand { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-8px) scale(1.28); filter: brightness(1.65); } 100% { transform: translateY(-3px) scale(1.12); filter: brightness(1.25); } }
/* the multiplier you hit pops up off the bar */
.rs-mult-pop { position: absolute; pointer-events: none; z-index: 6; font-weight: 900; font-size: 26px; color: #fff;
  text-shadow: 0 2px 0 #1a1206, 0 0 12px rgba(255,210,74,.9); animation: rsPopUp 1s cubic-bezier(.2,1.2,.4,1) forwards; }
.rs-mult-pop.jackpot { font-size: 34px; color: #ffe24a; text-shadow: 0 2px 0 #6e2a00, 0 0 16px rgba(90,224,90,.9); }
@keyframes rsPopUp {
  0%   { transform: translate(-50%, 4px) scale(.3); opacity: 0; }
  25%  { transform: translate(-50%, -12px) scale(1.3); opacity: 1; }
  60%  { transform: translate(-50%, -24px) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -44px) scale(1); opacity: 0; }
}
.rs-mult-needle { position: absolute; left: 8%; bottom: -10px; width: 0; height: 0; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 13px solid #fff;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); animation: rsSweep .8s ease-in-out infinite alternate; }
.rs-mult-needle.locked { animation: none; filter: drop-shadow(0 0 6px #fff); }
@keyframes rsSweep { from { left: 8%; } to { left: 92%; } }
.rs-mult .rs-double { display: flex; width: 100%; margin-top: 13px; }
.rs-mult .rs-double-txt { flex: 1; justify-content: center; gap: 7px; }
.rs-btns { display: flex; gap: 14px; justify-content: center; }

/* ====================================================== touch controls == */
#touch-controls { display: none; position: fixed; inset: 0; pointer-events: none; z-index: 12; }
#joy-zone {
  position: absolute; left: 0; top: 14%; width: 55%; height: 86%;
  pointer-events: auto; touch-action: none;
}
#joy-base {
  display: none; position: fixed; width: 124px; height: 124px;
  margin: -62px 0 0 -62px; border-radius: 50%;
  background: rgba(255,255,255,0.07); border: 2px solid rgba(255,255,255,0.28);
  pointer-events: none; z-index: 13;
}
#joy-knob {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px;
  margin: -27px 0 0 -27px; border-radius: 50%;
  background: rgba(255,255,255,0.34); border: 2px solid rgba(255,255,255,0.55);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
#btn-attack, #btn-sprint, #btn-emote {
  position: fixed; pointer-events: auto; touch-action: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; user-select: none; -webkit-user-select: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 2px 0 rgba(255,255,255,0.25);
}
#btn-attack {
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(64px + env(safe-area-inset-bottom));
  width: 96px; height: 96px; font-size: 44px;
  background: radial-gradient(circle at 35% 30%, #f06a5a, #b81e12 75%);
  border: 3px solid #6e0e06;
}
#btn-sprint {
  right: calc(128px + env(safe-area-inset-right));
  bottom: calc(120px + env(safe-area-inset-bottom));
  width: 68px; height: 68px; font-size: 30px;
  background: radial-gradient(circle at 35% 30%, #6a9ae8, #2456b0 75%);
  border: 3px solid #16306e;
}
#btn-emote {
  right: calc(34px + env(safe-area-inset-right));
  bottom: calc(178px + env(safe-area-inset-bottom));
  width: 50px; height: 50px; font-size: 24px;
  background: radial-gradient(circle at 35% 30%, #4a4a55, #26262e 75%);
  border: 2px solid #16161c;
}
#btn-attack:active, #btn-sprint:active, #btn-emote:active { transform: scale(0.9); filter: brightness(1.2); }

/* ---------------------------------------------------------- responsive -- */
@media (max-width: 1080px) { #menu-right { display: none; } }

/* tablets / small laptops / landscape phones (width) */
@media (max-width: 760px) {
  #sidebar { width: 92px; min-width: 92px; }
  #rail-logo span:first-child { font-size: 14px; }
  #rail-logo span:last-child { font-size: 8px; }
  .side-icon { width: 30px; height: 30px; }
  .side-label { font-size: 9px; }
  #app-topbar { padding: 10px 10px 2px; min-height: 48px; }
  #event-banner { padding: 6px 10px; }
  #event-banner b { font-size: 11px; }
  .top-ico { width: 36px; height: 36px; }
  .top-ico svg { width: 19px; height: 19px; }
  .logo-crest { width: 72px; height: 72px; margin-bottom: -8px; }
  .logo-word { font-size: 24px; }
  .logo-sub { font-size: 9px; letter-spacing: 4px; }
  #menu-main { padding-left: 12px; padding-right: 12px; }
  .logo-crest { width: 76px; height: 76px; }
  .home-card { padding: 16px 16px; }
  .profile-grid { grid-template-columns: 1fr; }
  .chest-grid { grid-template-columns: 1fr; }
  #play-btn { font-size: 28px; min-width: 180px; padding: 14px 22px; }
  .hexagon { width: 44px; height: 49px; font-size: 18px; }
  .hmode { font-size: 11px; padding: 8px 4px; }
  #battle-actions { gap: 8px; }
  .act-btn { padding: 10px 10px; gap: 7px; }
  .act-txt b { font-size: 12px; }
  .act-ico { width: 26px; height: 26px; }
  .ld-grid { grid-template-columns: 1fr; }
  .ld-right { display: none; }            /* decorative locked plates */
  .ld-left { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .ld-left .ld-stat { width: 100%; }
  .ld-center { display: flex; flex-direction: column; align-items: center; }
  .tour-table th, .tour-table td { padding: 6px 5px; font-size: 10px; }
  .tab-btn { padding: 8px 14px; font-size: 11px; }
  .mastery-cols { grid-template-columns: 1fr; }
  .quest { flex-wrap: wrap; }
  .modal-box { padding: 16px 14px; }
  /* HUD */
  .team-bar { width: 120px; height: 20px; }
  .team-shield { font-size: 20px; }
  #hud-timer { font-size: 18px; }
  #hud-lb { min-width: 150px; padding: 4px 6px 5px; }
  .lb-row { font-size: 10px; gap: 5px; }
  .lb-name { max-width: 96px; }
  #hud-minimap { width: 110px; height: 110px; }
  #hud-feed { top: 50px; font-size: 10px; }
  #hud-level { width: 38px; height: 38px; font-size: 16px; }
  #hud-xp { height: 14px; width: 36vw; }
  #hud-xp-hilt { height: 26px; width: 9px; }
  #hud-ping { display: none; }
  .banner-big { font-size: 42px; }
  .banner-sub { font-size: 13px; }
  .rs-box { padding: 20px 18px; max-width: 94vw; }
  .rs-title { font-size: 26px; }
  .rs-stats { gap: 16px; flex-wrap: wrap; }
  .rs-v { font-size: 19px; }
}

/* phones in PORTRAIT: rail becomes a bottom tab bar */
@media (orientation: portrait) and (max-width: 700px) {
  #menu { flex-direction: column; }
  #menu-body { order: 1; flex: 1; min-height: 0; }
  #sidebar {
    order: 2; flex-direction: row; width: 100%; min-width: 0; gap: 2px;
    height: calc(60px + env(safe-area-inset-bottom));
    padding: 4px 6px env(safe-area-inset-bottom);
    border-right: none; border-top: 1px solid rgba(120,150,220,.14);
    box-shadow: 0 -4px 18px rgba(0,0,0,.6);
  }
  #rail-logo { display: none; }
  #rail-nav { flex-direction: row; gap: 2px; }
  .side-btn { flex: 1; padding: 5px 2px; border-radius: 10px; }
  .side-icon { width: 26px; height: 26px; }
  .side-label { font-size: 7px; letter-spacing: 0; }
  #menu-right { display: none; }
  /* logo flows in-line (no overlap with the topbar); drop secondary icons */
  #topbar-right .top-ico { display: none; }
  #app-topbar { padding: 10px 12px 2px; }
  #logo { margin: 4px auto 10px; }
  .logo-crest { width: 64px; height: 64px; margin-bottom: -8px; }
  .logo-word { font-size: 24px; }
  #battle-actions { flex-wrap: wrap; }
  .act-btn { max-width: none; flex: 1 1 42%; }
  .ld-skins { gap: 8px; }
  .ld-skin { width: 102px; }
  .emote-slots .slot-hint { width: 100%; text-align: center; max-width: none; }
  /* in-game: lift bottom HUD above the thumb zone, shift off the attack button */
  #hud-bottom { bottom: calc(150px + env(safe-area-inset-bottom)); left: 44%; }
  #hud-xp { width: 40vw; }
}

/* very short landscape (phones rotated): compress vertical space */
@media (orientation: landscape) and (max-height: 480px) {
  #sidebar { width: 76px; min-width: 76px; }
  #rail-logo { padding: 2px 0 6px; }
  #rail-logo span:first-child { font-size: 12px; }
  .side-icon { width: 24px; height: 24px; }
  .side-label { font-size: 7px; }
  #app-topbar { min-height: 40px; padding: 6px 10px 0; }
  #event-banner { display: none; }
  .top-ico { width: 32px; height: 32px; }
  .logo-crest { width: 50px; height: 50px; margin-bottom: -6px; }
  .logo-word { font-size: 19px; }
  .logo-sub { font-size: 8px; letter-spacing: 3px; }
  #logo { margin: 2px auto 8px; }
  .home-card { padding: 10px 14px; }
  .hc-player { margin-bottom: 8px; }
  .hc-modes { margin: 8px 0; }
  .hmode { padding: 6px 4px; font-size: 10px; }
  .hc-play-row { gap: 14px; }
  #play-btn { font-size: 22px; padding: 9px 18px; min-width: 140px; }
  .hexagon { width: 36px; height: 40px; font-size: 14px; }
  #battle-actions { margin-top: 8px; }
  .home-foot { display: none; }
  /* in-game */
  #hud-bottom { bottom: 8px; }
  #hud-minimap { width: 90px; height: 90px; }
  #btn-attack { width: 78px; height: 78px; font-size: 34px; bottom: calc(46px + env(safe-area-inset-bottom)); }
  #btn-sprint { width: 56px; height: 56px; font-size: 24px; right: calc(106px + env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); }
  #btn-emote { width: 42px; height: 42px; font-size: 19px; bottom: calc(140px + env(safe-area-inset-bottom)); }
}

/* tiny phones */
@media (max-width: 400px) {
  #play-btn { font-size: 22px; min-width: 140px; }
  .hmode { font-size: 10px; padding: 8px 2px; }
  .reward-card { width: 88px; }
  .cos-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
  .evo-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 9px; }
}

/* ====================================== NAVY / GOLD THEME OVERRIDES ======== *
   Re-skins the secondary screens (Profile / Shop / Collections / Tournaments /
   Settings / modals) from the old brown palette to the new navy+gold theme.
   Appended last so it only changes COLORS — layout & responsive sizing above
   still win for their own properties. */
.section-title { color: #ffd24a; }
.section-title::before, .section-title::after { background: linear-gradient(90deg, transparent, #3f6bd0); }

/* tabs: navy default, gold selected */
.tab-btn {
  background: linear-gradient(180deg, rgba(34,46,78,.92), rgba(20,28,50,.92));
  border: 1px solid rgba(120,150,220,.28); box-shadow: 0 3px 0 rgba(8,12,24,.7); color: #c2cce0;
}
.tab-btn:hover { box-shadow: 0 5px 0 rgba(8,12,24,.7); }
.tab-btn:active { box-shadow: 0 2px 0 rgba(8,12,24,.7); }
.tab-btn.sel { background: linear-gradient(180deg, #ffd24a, #f0a020); border-color: #b8780f; color: #fff; box-shadow: 0 3px 0 #9a6608; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.tab-btn.sel:hover { box-shadow: 0 5px 0 #9a6608; }
.tab-btn.ico.sel svg { filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }

/* profile */
.rank-box, .duel-badge, .awards-row, .best-box { background: rgba(16,24,44,.7); }
.rank-name { color: #ffd24a; }
.rank-bar { background: rgba(8,12,24,.85); border-color: rgba(120,150,220,.2); }
.rank-fill { background: linear-gradient(90deg, #3fa8e8, #6fd0ff); }
.rank-pct { color: #8fa0c8; }
.m-hex { color: #2e426e; }
.m-bar { background: rgba(8,12,24,.85); border-color: rgba(120,150,220,.2); }
.m-fill { background: linear-gradient(90deg, #c8920f, #ffd24a); }
.m-name { color: #ffd24a; }
.duel-rating, .best-score { color: #ffd24a; }
.best-v { color: #c2cce0; }
.award-n { color: #8fa0c8; }
.quest { background: rgba(16,24,44,.82); }
.q-name { color: #e6ebf5; }
.q-bar { background: rgba(8,12,24,.85); border-color: rgba(120,150,220,.2); }
.q-fill { background: linear-gradient(90deg, #3f6bd0, #6a9ae8); }
.quests-note { color: #6a7798; }
.acc-row { background: rgba(16,24,44,.82); }
.acc-row span { color: #8fa0c8; }

/* shop */
.shop-wallet { color: #ffd24a; }
.sw-title { color: #fff; }
.chest-card { background: linear-gradient(160deg, rgba(26,36,62,.95), rgba(12,18,34,.95)); border-color: rgba(120,150,220,.16); }
.chest-buy { background: linear-gradient(180deg, rgba(40,52,86,.95), rgba(22,30,54,.95)); border-color: rgba(8,12,24,.8); box-shadow: 0 3px 0 rgba(8,12,24,.8); }

/* collections */
.coll-count { color: #ffd24a; }
.coll-title { color: #fff; }
.evo-card { background: linear-gradient(180deg, #16203a, #0d1424); border: 2px solid rgba(120,150,220,.18); }
.evo-card.unlocked { border-color: rgba(255,200,90,.4); }
.evo-card.unlocked:hover { border-color: #ffd24a; }
.evo-card.equipped { border-color: #ff9a2a; box-shadow: 0 0 14px rgba(255,150,40,.3); }
.evo-card.event { border-color: rgba(120,150,220,.3); }
.evo-name { color: #aeb8d6; }
.evo-card.unlocked .evo-name { color: #fff; }
.evo-num { background: #2e426e; }
.evo-card.unlocked .evo-num { background: linear-gradient(180deg, #ffd24a, #d98a10); color: #1a1206; }
.evo-req { color: #8fa0c8; }
.evo-gear { color: #8fa0c8; }
.evo-gear:hover { color: #fff; }
.cos-card { background: linear-gradient(180deg, #16203a, #0d1424); border-color: rgba(120,150,220,.18); }
.cos-name { color: #aeb8d6; }
.cos-eq { color: #ff9a2a; }
.emote-slot { background: rgba(16,24,44,.82); border-color: rgba(120,150,220,.3); }
.emote-slot.sel { border-color: #ffd24a; box-shadow: 0 0 10px rgba(255,200,90,.4); }
.slot-key { color: #ffd24a; }
.slot-hint { color: #8fa0c8; }

/* loadout */
.ld-banner { background: linear-gradient(180deg, #ffd24a, #f0a020); border-color: #b8780f; color: #1a1206; box-shadow: 0 3px 0 #9a6608; text-shadow: 0 1px 0 rgba(255,255,255,.3); }
.ld-stat { color: #c2cce0; }
.ld-bar { background: rgba(8,12,24,.85); border-color: rgba(120,150,220,.2); }
.ld-hint { color: #8fa0c8; }
.wpn-card { background: linear-gradient(180deg, #1a2440, #10182c); border-color: rgba(120,150,220,.25); }
.wpn-card:hover { border-color: #8fa8e0; }
.wpn-card.sel { border-color: #ffd24a; }
.wpn-dmg { background: #2e426e; }
.wpn-card.sel .wpn-dmg { background: linear-gradient(180deg, #ffd24a, #d98a10); color: #1a1206; }
.wpn-name { color: #aeb8d6; }
.ld-hero { background: linear-gradient(180deg, #18223c, #0f1626); border-color: #ff9a2a; box-shadow: 0 0 18px rgba(255,150,40,.22); }
.ld-hero-name { background: linear-gradient(180deg, #ffd24a, #f0a020); color: #1a1206; }
.ld-plate { background: radial-gradient(circle 3px at 10px 10px, #3a4e7a 3px, transparent 4px), radial-gradient(circle 3px at calc(100% - 10px) 10px, #3a4e7a 3px, transparent 4px), radial-gradient(circle 3px at 10px calc(100% - 10px), #3a4e7a 3px, transparent 4px), radial-gradient(circle 3px at calc(100% - 10px) calc(100% - 10px), #3a4e7a 3px, transparent 4px), linear-gradient(160deg, #1c2845, #111a30); border-color: rgba(120,150,220,.25); }
.ld-skin { background: linear-gradient(180deg, #16203a, #0d1424); border-color: rgba(120,150,220,.2); }
.ld-skin.sel { border-color: #ffd24a; }
.ld-skin-name { background: linear-gradient(180deg, #ffd24a, #f0a020); color: #1a1206; }
.ld-skin-sub { color: #8fa0c8; }
.skin-card { border-color: rgba(120,150,220,.2); color: #aeb8d6; }
.skin-card.sel { border-color: #ffd24a; }

/* tournaments */
.tour-title span { color: #fff; }
.tour-region { color: #ffd24a; }
.tour-table th { color: #ffd24a; border-bottom-color: rgba(120,150,220,.2); }
.tour-table td { color: #c2cce0; }
.tour-table tbody tr:hover { background: rgba(120,150,220,.07); }
.t-name { color: #fff !important; }
.t-score { color: #ffd24a !important; }
.me-row { background: rgba(63,107,208,.28) !important; outline-color: #3f6bd0; }
.champ-list-row { background: rgba(16,24,44,.82); }
.cl-day { color: #ffd24a; }

/* settings */
.set-row { background: rgba(16,24,44,.85); }
.set-row select { background: #131a2e; color: #dfe6f5; border-color: rgba(120,150,220,.3); }
.set-keys { background: rgba(16,24,44,.85); color: #c2cce0; }
.set-keys b { color: #ffd24a; }
.lang-btn { background: #131a2e; border-color: rgba(120,150,220,.3); }
.lang-btn.sel { border-color: #ffd24a; }

/* modal + results */
.modal-box { background: linear-gradient(180deg, #1a2440, #0f1626); border-color: rgba(120,150,220,.3); }
.modal-box p { color: #c2cce0; }
.changelog ul { color: #c2cce0; }
.rs-box { background: linear-gradient(180deg, rgba(26,36,62,.97), rgba(12,18,34,.97)); border-color: rgba(120,150,220,.3); }
.rs-l { color: #8fa0c8; }
.rs-sub { color: #c2cce0; }

/* primary CTA buttons -> gold (match PLAY); grey -> navy secondary */
.btn-red { background: linear-gradient(180deg, #ffd24a, #f0a020); border: 2px solid #b8780f; box-shadow: 0 4px 0 #9a6608; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.btn-red:hover { box-shadow: 0 6px 0 #9a6608, 0 8px 18px rgba(255,170,40,.45); }
.btn-grey { background: linear-gradient(180deg, rgba(48,62,96,.95), rgba(26,36,62,.95)); border-color: rgba(8,12,24,.8); box-shadow: 0 4px 0 rgba(8,12,24,.8); }
.btn-grey:hover { box-shadow: 0 6px 0 rgba(8,12,24,.8), 0 8px 18px rgba(0,0,0,.4); }

/* =========================================================== CUSTOM ROOMS == */
/* battle-screen entry bar */
.party-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 10px auto 2px; max-width: 460px; width: 100%;
  padding: 8px 10px 8px 14px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(40,70,130,.34), rgba(20,32,60,.34));
  border: 1px solid rgba(120,160,230,.26);
}
.pb-label { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .5px; color: #cfe0ff; }
.pb-label svg { width: 20px; height: 20px; }
.pb-btns { display: flex; gap: 8px; }
.pb-btn { font-size: 12px; letter-spacing: .5px; padding: 9px 14px; border-radius: 10px; color: #fff;
  transition: transform .12s, filter .12s, box-shadow .12s; }
.pb-btn.create { background: linear-gradient(180deg, #ffd24a, #f0a020); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); box-shadow: 0 3px 0 #9a6608; }
.pb-btn.join { background: linear-gradient(180deg, rgba(58,84,140,.95), rgba(30,44,80,.95)); box-shadow: 0 3px 0 rgba(8,12,24,.7); border: 1px solid rgba(120,160,230,.3); }
.pb-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.pb-btn:active { transform: translateY(1px); }

/* overlay shell */
#party {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: radial-gradient(ellipse 120% 90% at 50% -10%, rgba(255,170,60,.10), transparent 60%),
              linear-gradient(180deg, rgba(7,12,22,.92), rgba(5,8,16,.95));
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.party-box {
  position: relative; width: 100%; max-width: 880px; max-height: 94vh; overflow-y: auto;
  background: linear-gradient(180deg, #19233e, #0e1526);
  border: 1px solid rgba(130,165,235,.3); border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  padding: 22px 24px 20px; color: #e6ebf5;
}
.party-load { text-align: center; padding: 60px 10px; color: #cfe0ff; font-size: 16px; letter-spacing: 1px; }
.party-x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,.06); color: #9fb0c8; font-size: 15px; border: 1px solid rgba(255,255,255,.08); }
.party-x:hover { background: rgba(232,58,42,.22); color: #fff; }

.party-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-right: 36px; }
.party-title { font-size: 20px; letter-spacing: 1px; color: #ffd24a; display: flex; align-items: baseline; gap: 10px; }
.party-title span { font-size: 12px; letter-spacing: 1.5px; color: #cfe0ff; background: rgba(60,90,150,.4); padding: 3px 9px; border-radius: 8px; }
.party-priv { font-size: 11px; font-family: Arial; padding: 5px 11px; border-radius: 9px; white-space: nowrap; }
.party-priv.public { background: rgba(63,174,106,.2); color: #7ee0a0; border: 1px solid rgba(63,174,106,.4); }
.party-priv.private { background: rgba(120,150,220,.16); color: #b8c8ee; border: 1px solid rgba(120,150,220,.3); }

/* invite panel */
.party-invite { background: rgba(10,16,30,.6); border: 1px solid rgba(255,210,74,.22); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.pi-label { font-size: 11px; letter-spacing: 2px; color: #9fb0c8; margin-bottom: 8px; }
.pi-row { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.pi-code { flex: 1 1 160px; min-width: 140px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; letter-spacing: 8px; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,210,74,.14), rgba(255,170,40,.06));
  border: 1px dashed rgba(255,210,74,.5); border-radius: 11px; padding: 8px 6px 8px 14px; }
.pi-code:hover { background: rgba(255,210,74,.2); }
.pi-btn { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #dfe8ff; padding: 0 14px;
  background: linear-gradient(180deg, rgba(58,84,140,.9), rgba(30,44,80,.9)); border: 1px solid rgba(120,160,230,.34); border-radius: 11px; }
.pi-btn svg { width: 16px; height: 16px; }
.pi-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.pi-hint { font-size: 11px; font-family: Arial; color: #8fa0c8; margin-top: 8px; }

/* players */
.party-players { margin-bottom: 14px; }
.pp-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; letter-spacing: 2px; color: #9fb0c8; margin-bottom: 9px; }
.pp-head b { color: #ffd24a; }
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.pcard { position: relative; background: linear-gradient(180deg, rgba(36,52,90,.5), rgba(18,28,52,.5));
  border: 1px solid rgba(120,150,220,.22); border-radius: 14px; padding: 10px 8px 9px; text-align: center; overflow: hidden; }
.pcard.me { border-color: rgba(255,210,74,.6); box-shadow: 0 0 0 1px rgba(255,210,74,.25), 0 6px 16px rgba(0,0,0,.3); cursor: pointer; }
.pcard.me:hover { background: linear-gradient(180deg, rgba(46,66,112,.6), rgba(22,34,62,.6)); }
.pcard.empty { border-style: dashed; border-color: rgba(120,150,220,.22); background: rgba(16,24,44,.3); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 150px; color: #6f80a0; }
.pcard.empty[data-add] { cursor: pointer; }
.pcard.empty[data-add]:hover { border-color: rgba(255,210,74,.45); color: #cfe0ff; }
.pc-empty-ico { font-size: 30px; line-height: 1; opacity: .6; margin-bottom: 6px; }
.pcard-av-wrap { position: relative; width: 100%; display: flex; justify-content: center; }
.pcard-av { width: 100%; max-width: 110px; height: auto; }
.pcard-edit { position: absolute; right: 50%; transform: translateX(46px); bottom: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #ffd24a; color: #1a1206; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pcard-edit svg { width: 13px; height: 13px; }
.pcard-name { font-size: 13px; color: #fff; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-meta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 3px; }
.pcard-rank { position: relative; width: 22px; height: 22px; display: inline-block; }
.pcard-rank svg { width: 22px; height: 22px; }
.pcard-rank i { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 900; color: #fff; font-style: normal; padding-top: 1px; }
.pcard-lvl { font-size: 10px; font-family: Arial; color: #9fb0c8; }
.pcard-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 6px; }
.ptag { font-size: 8.5px; font-family: Arial; font-weight: 700; letter-spacing: .5px; padding: 2px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 3px; }
.ptag svg { width: 11px; height: 11px; }
.ptag.host { background: rgba(255,210,74,.22); color: #ffd24a; }
.ptag.you { background: rgba(63,168,232,.22); color: #8fd0ff; }
.ptag.bot { background: rgba(120,150,220,.18); color: #b8c8ee; }
.ptag.ready { background: rgba(63,174,106,.22); color: #7ee0a0; }
.ptag.wait { background: rgba(150,160,180,.16); color: #aab4c8; }
.pteam { position: absolute; top: 8px; left: 8px; font-size: 8.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 7px; border-radius: 6px; color: #fff; }
.pteam[data-team] { cursor: pointer; }
.pteam.blue { background: linear-gradient(180deg, #4a8ae8, #2456b0); }
.pteam.red { background: linear-gradient(180deg, #e85a4a, #b02424); }
.pcard-kick { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 6px; font-size: 11px; z-index: 2;
  background: rgba(232,58,42,.22); color: #ff9a90; border: 1px solid rgba(232,58,42,.3); }
.pcard-kick:hover { background: rgba(232,58,42,.5); color: #fff; }

/* host settings */
.party-settings { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px 14px; margin-bottom: 14px;
  background: rgba(10,16,30,.5); border: 1px solid rgba(120,150,220,.2); border-radius: 14px; }
.ps-field { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #cfe0ff; }
.ps-field > span { color: #9fb0c8; letter-spacing: .5px; }
.ps-field b { color: #fff; }
.p-sel { background: #131a2e; color: #dfe6f5; border: 1px solid rgba(120,150,220,.3); border-radius: 8px; padding: 6px 8px; font-family: inherit; }

/* segmented toggle + steppers (shared with create modal) */
.pc-toggle { display: inline-flex; background: rgba(16,24,44,.7); border: 1px solid rgba(120,150,220,.25); border-radius: 10px; padding: 3px; gap: 3px; }
.pt-opt { font-size: 11px; padding: 7px 12px; border-radius: 8px; color: #aab8d6; background: transparent; }
.pc-toggle.small .pt-opt { padding: 5px 9px; font-size: 10px; }
.pt-opt.sel { background: linear-gradient(180deg, #ffd24a, #f0a020); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.pc-step { display: inline-flex; align-items: center; gap: 10px; }
.pc-step b { min-width: 24px; text-align: center; font-size: 17px; color: #ffd24a; }
.pc-step button { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; color: #dfe8ff; background: rgba(58,84,140,.7); border: 1px solid rgba(120,160,230,.3); }
.pc-step.small button { width: 26px; height: 26px; font-size: 15px; }
.pc-step button:hover { filter: brightness(1.15); }

/* foot */
.party-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid rgba(120,150,220,.14); padding-top: 12px; }
.pf-status { font-size: 12px; font-family: Arial; color: #9fb0c8; flex: 1 1 180px; }
.pf-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-btns .btn-red, .pf-btns .btn-green, .pf-btns .btn-grey { padding: 11px 18px; font-size: 14px; border-radius: 11px; }
.pf-btns .btn-red.big { font-size: 16px; padding: 12px 26px; }
.party-note { font-size: 10.5px; font-family: Arial; color: #6f80a0; text-align: center; margin-top: 12px; }

/* create / join modal innards */
.pc-modal { font-family: Arial; }
.pc-mode { font-size: 13px; letter-spacing: 1.5px; color: #ffd24a; font-family: 'Arial Black', Arial; margin-bottom: 12px; }
.pc-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pc-field.col { flex-direction: column; align-items: stretch; gap: 8px; }
.pc-field > span { font-size: 12px; color: #9fb0c8; letter-spacing: .5px; }
.pc-line { font-size: 12px; color: #9fb0c8; margin-bottom: 12px; }
.pc-note { font-size: 11px; color: #8fa0c8; line-height: 1.5; margin-top: 4px; }
.pc-note b { color: #cfe0ff; }
.pj-code { width: 100%; text-align: center; font-size: 26px; font-weight: 900; letter-spacing: 8px; padding: 12px;
  background: rgba(10,16,30,.7); border: 1px dashed rgba(255,210,74,.5); border-radius: 11px; color: #fff; text-transform: uppercase; }
.pj-code::placeholder { color: rgba(255,255,255,.2); letter-spacing: 6px; }

/* dress-up */
.pd-box { max-width: 760px; }
.pd-main { display: flex; gap: 18px; align-items: flex-start; }
.pd-preview { flex: 0 0 200px; display: flex; flex-direction: column; align-items: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,170,60,.12), transparent 65%); border-radius: 16px; padding: 8px; }
.pd-preview canvas { width: 100%; max-width: 200px; height: auto; }
.pd-pname { font-size: 15px; letter-spacing: 1px; color: #ffd24a; margin-top: 2px; }
.pd-cols { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pd-sec-t { font-size: 11px; letter-spacing: 2px; color: #9fb0c8; margin-bottom: 7px; }
.pd-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.pd-evo { flex: 0 0 auto; width: 80px; border-radius: 11px; padding: 5px; text-align: center; cursor: pointer;
  background: rgba(24,36,64,.5); border: 1px solid rgba(120,150,220,.2); }
.pd-evo.sel { border-color: #ffd24a; background: rgba(255,210,74,.12); }
.pd-evo canvas { width: 100%; height: auto; }
.pd-evo span { display: block; font-size: 8px; letter-spacing: .3px; color: #cfe0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-skins, .pd-wpns { display: flex; gap: 9px; flex-wrap: wrap; }
.pd-skin { width: 86px; border-radius: 11px; padding: 5px; text-align: center; cursor: pointer; background: rgba(24,36,64,.5); border: 1px solid rgba(120,150,220,.2); }
.pd-skin.sel { border-color: #ffd24a; background: rgba(255,210,74,.12); }
.pd-skin.locked { opacity: .55; cursor: not-allowed; }
.pd-skin canvas { width: 100%; height: auto; }
.pd-skin span, .pd-wpn span { display: block; font-size: 9px; color: #aab8d6; margin-top: 2px; }
.pd-wpn { width: 100px; border-radius: 11px; padding: 6px; text-align: center; cursor: pointer; background: rgba(24,36,64,.5); border: 1px solid rgba(120,150,220,.2); }
.pd-wpn.sel { border-color: #ffd24a; background: rgba(255,210,74,.12); }
.pd-wpn.locked { opacity: .55; cursor: not-allowed; }
.pd-wpn canvas { width: 100%; height: auto; }
.pd-hint { font-size: 11px; font-family: Arial; color: #8fa0c8; text-align: center; margin: 14px 0 6px; }

@media (max-width: 760px) {
  .party-box { padding: 16px 14px 16px; border-radius: 16px; }
  .party-title { font-size: 17px; }
  .pi-code { font-size: 22px; letter-spacing: 5px; }
  .party-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
  .pcard.empty { min-height: 128px; }
  .pf-status { flex-basis: 100%; text-align: center; }
  .pf-btns { width: 100%; justify-content: center; }
  .pd-main { flex-direction: column; align-items: center; }
  .pd-preview { flex-basis: auto; width: 160px; }
  .pd-cols { width: 100%; }
  .party-bar { flex-direction: column; gap: 8px; max-width: 320px; }
  .pb-btns { width: 100%; }
  .pb-btn { flex: 1; }
}

/* ===================================================== session warriors == */
.warrior-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.warrior-card { position: relative; background: linear-gradient(180deg, rgba(36,52,90,.5), rgba(18,28,52,.5)); border: 1px solid rgba(120,150,220,.22); border-radius: 14px; padding: 8px; text-align: center; cursor: pointer; transition: transform .12s, border-color .12s, box-shadow .12s; }
.warrior-card:hover { transform: translateY(-3px); border-color: rgba(255,210,74,.55); box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.warrior-card.active { border-color: rgba(63,174,106,.7); box-shadow: 0 0 0 1px rgba(63,174,106,.3), 0 4px 14px rgba(0,0,0,.3); }
.warrior-card.owned { border-color: rgba(255,210,74,.75); box-shadow: 0 0 0 1px rgba(255,210,74,.35), 0 4px 14px rgba(0,0,0,.3); }
.wc-art { position: relative; width: 100%; display: flex; justify-content: center; }
.wc-art canvas { width: 100%; max-width: 122px; height: auto; }
.wc-ad { position: absolute; top: 2px; right: 2px; font-size: 9px; font-weight: 900; color: #1a1206; background: linear-gradient(180deg,#ffd24a,#f0a020); padding: 2px 6px; border-radius: 6px; }
.wc-on { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%; background: #3fae6a; color: #fff; font-weight: 900; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.wc-on.own { background: linear-gradient(180deg,#ffd24a,#f0a020); color: #2a1c06; box-shadow: 0 0 8px rgba(255,200,80,.6); }
.wc-name { font-size: 12px; color: #fff; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 9.5px; font-family: Arial; }
.wc-lv { color: #ffd24a; font-weight: 700; }
.wc-state { color: #8fa0c8; letter-spacing: .5px; }
.wc-state.on { color: #7ee0a0; }
.wd-art { display: flex; justify-content: center; margin: 6px 0 10px; background: radial-gradient(ellipse at 50% 45%, rgba(255,170,60,.14), transparent 65%); border-radius: 14px; }
.wd-art canvas { width: 200px; max-width: 74vw; height: auto; }
/* warrior detail modal: status badge + buttons that wrap on small screens */
.wd-btns { flex-wrap: wrap; }
.wd-btns .btn-green, .wd-btns .btn-gold, .wd-btns .btn-grey { flex: 1 1 auto; }
.wd-badge { width: 100%; text-align: center; padding: 9px; border-radius: 10px; font-weight: 900; font-size: 13px; letter-spacing: .4px; }
.wd-badge.own { color: #2a1c06; background: linear-gradient(180deg,#ffd24a,#f0a020); box-shadow: 0 0 14px rgba(255,200,80,.35); }
.wd-badge.run { color: #7ee0a0; background: rgba(40,90,52,.45); }

/* ===================================================== TRAINING mode == */
.tut-launch { margin: 10px auto 0; display: block; padding: 9px 18px; border-radius: 11px; cursor: pointer;
  font-weight: 900; font-size: 13px; letter-spacing: .4px; color: #dff3ff;
  background: linear-gradient(180deg, rgba(46,86,150,.92), rgba(26,50,94,.92)); border: 1.5px solid rgba(120,180,255,.4);
  box-shadow: 0 3px 0 rgba(10,24,48,.7); transition: transform .12s, filter .12s; }
.tut-launch span { opacity: .7; font-weight: 700; }
.tut-launch:hover { filter: brightness(1.12); transform: translateY(-2px); }
.tut-launch:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(10,24,48,.7); }

/* hide match-HUD clutter while training (keep level + xp bar) */
body.tut-mode #hud-lb, body.tut-mode #hud-top, body.tut-mode #hud-minimap-wrap, body.tut-mode #hud-ping { display: none !important; }

#tut-overlay { position: fixed; inset: 0; z-index: 60; pointer-events: none; font-family: 'Arial Black', Arial, sans-serif; }
#tut-overlay button { pointer-events: auto; }
#tut-skip { position: absolute; top: 14px; right: 16px; padding: 7px 14px; border-radius: 10px; cursor: pointer;
  font-weight: 900; font-size: 12px; color: #cdd8ee; background: rgba(18,26,46,.82); border: 1px solid rgba(120,150,220,.3); }
#tut-skip:hover { filter: brightness(1.15); }

#tut-card { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); width: min(580px, 94vw);
  background: linear-gradient(160deg, rgba(24,34,62,.97), rgba(11,17,34,.97)); border: 1.5px solid rgba(132,172,255,.42);
  border-radius: 16px; padding: 14px 18px 15px; box-shadow: 0 12px 34px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.07); }
#tut-card.pop { animation: tutCardPop .4s cubic-bezier(.34,1.56,.5,1); }
@keyframes tutCardPop { 0% { transform: translateX(-50%) translateY(20px) scale(.94); opacity: 0; } 100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; } }
#tut-dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 9px; }
.tut-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(150,170,210,.3); transition: all .2s; }
.tut-dot.cur { background: #ffd24a; box-shadow: 0 0 10px rgba(255,210,74,.7); transform: scale(1.25); }
.tut-dot.done { background: #5dff9a; }
#tut-card-row { display: flex; align-items: center; gap: 15px; }
#tut-ico { font-size: 36px; flex: none; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  border-radius: 15px; background: linear-gradient(160deg, rgba(96,136,224,.3), rgba(40,60,120,.3));
  border: 1px solid rgba(150,185,255,.35); filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
#tut-title { font-size: 21px; color: #ffd24a; letter-spacing: .5px; text-shadow: 0 0 12px rgba(255,200,80,.3); }
#tut-desc { font-size: 15px; color: #eef3ff; font-family: Arial; font-weight: 700; margin-top: 4px; line-height: 1.35; }

#tut-reward { position: absolute; left: 50%; top: 38%; transform: translate(-50%,-50%); text-align: center; opacity: 0; }
#tut-reward.show { animation: tutReward 2s ease-out forwards; }
@keyframes tutReward {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
  14% { opacity: 1; transform: translate(-50%,-50%) scale(1.16); }
  26% { transform: translate(-50%,-50%) scale(1); }
  80% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.05) translateY(-22px); }
}
.tr-check { width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 56px; color: #06210f; background: radial-gradient(circle at 40% 35%, #9dffc4, #3fd06a);
  box-shadow: 0 0 0 6px rgba(93,255,154,.25), 0 0 40px rgba(93,255,154,.6); }
#tut-reward-msg { font-size: 26px; color: #5dff9a; text-shadow: 0 2px 12px rgba(93,255,154,.6); letter-spacing: 1px; }

#tut-hint { position: absolute; left: 50%; top: 63%; transform: translateX(-50%); padding: 8px 16px; border-radius: 10px;
  font-family: Arial; font-weight: 800; font-size: 13px; color: #fff; background: rgba(180,40,30,.92); opacity: 0; transition: opacity .2s; white-space: nowrap; }
#tut-hint.show { opacity: 1; }

#tut-done { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(6,10,20,.72); }
#tut-done.show { display: flex; animation: tutFade .3s ease; }
@keyframes tutFade { from { opacity: 0; } to { opacity: 1; } }
.td-box { pointer-events: auto; text-align: center; width: min(440px, 92vw); padding: 26px 24px;
  background: linear-gradient(160deg, rgba(22,32,58,.98), rgba(10,16,32,.98)); border: 2px solid rgba(255,210,74,.5);
  border-radius: 20px; box-shadow: 0 16px 50px rgba(0,0,0,.6); animation: tutCardPop .4s cubic-bezier(.34,1.56,.5,1); }
.td-burst { font-size: 64px; animation: tutBounce 1.4s ease-in-out infinite; }
@keyframes tutBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.td-title { font-size: 24px; color: #ffd24a; margin: 6px 0; letter-spacing: .5px; text-shadow: 0 0 16px rgba(255,200,80,.4); }
.td-sub { font-size: 13px; font-family: Arial; font-weight: 700; color: #cfe0ff; line-height: 1.4; margin-bottom: 16px; }
/* trial payoff: the reward strip on the completion card */
.td-reward { background: rgba(255,210,74,0.08); border: 1.5px solid rgba(255,210,74,0.4); border-radius: 12px; padding: 10px 12px; margin-bottom: 16px; }
.td-reward-t { display: block; font-size: 9px; font-weight: 900; letter-spacing: 2px; color: #ffd24a; margin-bottom: 6px; }
.td-reward-row { display: flex; gap: 18px; justify-content: center; align-items: center; }
.td-r-item { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 15px; font-weight: 900; }
.td-r-item svg { width: 34px; height: 34px; }
.td-r-item .coin-i { width: 22px; height: 22px; }
.td-reward-hint { font-size: 10.5px; color: #aeb8d6; margin-top: 6px; font-family: Arial; }
.td-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* touch devices: pin the card to the TOP so it never covers the joystick / attack button / XP bar */
@media (pointer: coarse) { #tut-card { top: calc(58px + env(safe-area-inset-top)); bottom: auto; } #tut-reward { top: 46%; } }
@media (max-width: 600px) { #tut-card { width: 95vw; padding: 11px 13px; } #tut-ico { font-size: 30px; width: 50px; height: 50px; } #tut-title { font-size: 18px; } #tut-desc { font-size: 13.5px; } }
@media (prefers-reduced-motion: reduce) { #tut-card.pop, #tut-reward.show, .td-box, .td-burst { animation: none; } #tut-reward.show { opacity: 1; } }

/* ===================================================== boost hex glow == */
.hc-boost { position: relative; cursor: pointer; }
.hc-boost .hexagon { position: relative; z-index: 1; transition: transform .13s ease, filter .13s ease; }
.hc-boost .hc-hex-l { transition: color .13s ease; }
/* hover/press affordance so it clearly reads as a button (works empty or ready) */
.hc-boost:hover .hexagon { transform: translateY(-3px) scale(1.1); filter: brightness(1.14) drop-shadow(0 5px 7px rgba(0,0,0,.45)); }
.hc-boost:active .hexagon { transform: translateY(-1px) scale(1.04); }
.hc-boost:hover .hc-hex-l { color: #ffd24a; }
/* NOT armed yet -> a gentle "tap me" breathing glow (clearly a call-to-action, NOT the active/on state) */
.hc-hex.boost-idle { cursor: pointer; }
.hc-hex.boost-idle .hexagon { animation: boostIdle 2s ease-in-out infinite; }
@keyframes boostIdle {
  0%, 100% { filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
  50%      { filter: drop-shadow(0 0 6px rgba(255,200,80,.55)) brightness(1.06); }
}
.hc-hex.boost-idle .hc-hex-l { color: #ffcf5a; white-space: nowrap; font-size: 8px; letter-spacing: .3px; }
.hc-hex.boost-ready .hc-hex-l { color: #ffd24a; }   /* "ACTIVE" pops gold when the boost is on */
.hc-hex.boost-ready { cursor: pointer; }
.hc-hex.boost-ready .hexagon { animation: boostPulse 1.1s ease-in-out infinite; }
@keyframes boostPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(255,210,74,.7)); }
  50%      { filter: drop-shadow(0 0 12px rgba(255,210,74,1)) drop-shadow(0 0 20px rgba(255,170,40,.75)); }
}
.boost-ring { display: none; }
/* hexagon-shaped sweeping light that traces the BOOSTS hex outline exactly.
   A bigger concentric hexagon (same clip-path as .hexagon) holds a spinning
   conic-gradient streak; the opaque gold hex on top covers the centre, so only
   a hexagonal rim of travelling light shows. */
.hc-hex.boost-ready .boost-ring {
  display: block; position: absolute; left: 50%; top: 28px; width: 64px; height: 70px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 0;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  filter: drop-shadow(0 0 4px rgba(255,220,110,.9));
}
.hc-hex.boost-ready .boost-ring::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 170%; height: 170%;
  transform: translate(-50%, -50%) rotate(0deg);
  background: conic-gradient(from 0deg, transparent 0 60%, rgba(255,240,150,.85) 75%, #ffffff 82%, rgba(255,240,150,.85) 89%, transparent 100%);
  animation: boostSpin 1.15s linear infinite;
}
@keyframes boostSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (max-width: 760px) {
  .hc-hex.boost-ready .boost-ring { width: 56px; height: 61px; top: 25px; }
}
@media (orientation: landscape) and (max-height: 480px) {
  .hc-hex.boost-ready .boost-ring { width: 46px; height: 50px; top: 20px; }
}

/* ======================================================== RANKED LEADERBOARD == */
.rank-badge { display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.rank-mini  { display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }

.lb-screen { max-width: 880px; margin: 0 auto; }
.lb-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.lb-title span { font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 1px; text-transform: uppercase; }
.lb-region { font-size: 10px; color: #ffd24a; letter-spacing: 2px; margin-top: 2px; }
.lb-modes { display: flex; gap: 7px; flex-wrap: wrap; }
.lb-mode {
  padding: 8px 15px; font-size: 11px; font-weight: 900; color: #cfd8ee; border-radius: 8px; cursor: pointer;
  background: linear-gradient(180deg, #1d2949, #131c33); border: 1px solid rgba(120,150,220,.25);
  box-shadow: 0 3px 0 rgba(0,0,0,.35); text-transform: uppercase; transition: transform .12s, filter .12s, box-shadow .12s;
}
.lb-mode:hover { transform: translateY(-2px); filter: brightness(1.15); }
.lb-mode.sel { background: linear-gradient(180deg, #ffd24a, #f0a020); color: #1a1206; border-color: #b8780f; box-shadow: 0 3px 0 #9a6608; }

/* hero rank card */
.lb-hero {
  display: flex; align-items: center; gap: 22px; padding: 18px 24px; border-radius: 16px;
  background: linear-gradient(180deg, #18223c, #0e1626);   /* fallback if color-mix unsupported */
  background:
    radial-gradient(120% 140% at 12% 0%, color-mix(in srgb, var(--rkc) 18%, transparent), transparent 60%),
    linear-gradient(180deg, #18223c, #0e1626);
  border: 1px solid color-mix(in srgb, var(--rkc) 45%, rgba(120,150,220,.3));
  box-shadow: 0 0 26px color-mix(in srgb, var(--rkc) 22%, transparent), inset 0 1px 0 rgba(255,255,255,.05);
  margin-bottom: 14px;
}
.lb-hero-badge { flex: 0 0 auto; animation: lbFloat 4s ease-in-out infinite; }
@keyframes lbFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.lb-hero-info { flex: 1 1 auto; min-width: 0; }
.lb-hero-sub { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #8fa0c8; }
.lb-hero-tier { font-size: 30px; font-weight: 900; letter-spacing: 1px; line-height: 1.05; margin: 2px 0 10px; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.lb-hero-tier .lb-div { font-size: 20px; opacity: .85; }
.lb-hero-bar { position: relative; height: 16px; border-radius: 9px; background: rgba(0,0,0,.35); overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.lb-hero-fill { height: 100%; border-radius: 9px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.lb-hero-rp { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); letter-spacing: 1px; }
.lb-hero-stats { display: flex; gap: 26px; margin-top: 12px; flex-wrap: wrap; }
.lb-hero-stats > div { display: flex; flex-direction: column; }
.lb-hero-stats b { font-size: 17px; color: #fff; font-weight: 900; }
.lb-hero-stats span { font-size: 9px; color: #8fa0c8; letter-spacing: 1.5px; margin-top: 1px; }

/* tier legend */
.lb-legend { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 14px; padding: 10px; border-radius: 12px; background: rgba(13,20,38,.6); border: 1px solid rgba(120,150,220,.15); }
.lb-leg { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; opacity: .55; transition: opacity .2s, transform .2s; }
.lb-leg.on { opacity: 1; transform: translateY(-2px); }
.lb-leg-n { font-size: 9px; font-weight: 900; letter-spacing: 1px; color: #aeb8d6; }
.lb-leg.on .lb-leg-n { color: #fff; }

/* ladder list (rl-row namespaced to avoid clashing with the in-match HUD .lb-row) */
.lb-ladder-head, .rl-row { display: grid; grid-template-columns: 34px 40px 1fr auto 70px; align-items: center; gap: 10px; }
.lb-ladder-head { padding: 4px 14px 6px; font-size: 9px; font-weight: 900; letter-spacing: 1.5px; color: #8fa0c8; }
.lb-ladder-head span:last-child, .rl-row .lb-rp { text-align: right; }
.lb-ladder { max-height: 46vh; overflow-y: auto; border-radius: 12px; border: 1px solid rgba(120,150,220,.15); }
.lb-ladder::-webkit-scrollbar { width: 7px; }
.lb-ladder::-webkit-scrollbar-thumb { background: rgba(120,150,220,.3); border-radius: 4px; }
.rl-row { padding: 7px 14px; border-bottom: 1px solid rgba(120,150,220,.08); }
.rl-row:nth-child(even) { background: rgba(255,255,255,.018); }
.rl-row:hover { background: rgba(120,150,220,.08); }
.lb-pos { font-size: 14px; font-weight: 900; color: #8fa0c8; text-align: center; }
.rl-row.top .lb-pos { color: #ffd24a; }
.rl-row.t1 { background: linear-gradient(90deg, rgba(255,210,74,.14), transparent); }
.rl-row.t2 { background: linear-gradient(90deg, rgba(207,224,242,.12), transparent); }
.rl-row.t3 { background: linear-gradient(90deg, rgba(224,136,58,.12), transparent); }
.lb-bdg { display: flex; justify-content: center; }
.lb-nm { font-size: 13px; font-weight: 800; color: #e6ecf8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: Arial; }
.lb-nm i { font-style: normal; font-size: 9px; color: #ffd24a; letter-spacing: 1px; }
.lb-tier { font-size: 10px; font-weight: 900; letter-spacing: .5px; }
.lb-rp { font-size: 13px; font-weight: 900; color: #fff; }
.rl-row.me { background: linear-gradient(90deg, rgba(63,107,208,.34), rgba(63,107,208,.12)) !important; outline: 1px solid #4a7bff; border-radius: 8px; }
.rl-row.me .lb-nm { color: #fff; }
.lb-gap { text-align: center; color: #5a688c; font-weight: 900; letter-spacing: 3px; padding: 2px 0; font-size: 14px; }

/* home-card RANKED chip */
.hc-rank {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 2px; padding: 7px 12px; cursor: pointer;
  border-radius: 11px; background: linear-gradient(180deg, rgba(24,34,60,.9), rgba(14,22,38,.9));
  border: 1px solid color-mix(in srgb, var(--rkc) 40%, rgba(120,150,220,.28));
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--rkc) 14%, transparent); transition: transform .12s, filter .12s;
}
.hc-rank:hover { transform: translateY(-1px); filter: brightness(1.1); }
.hc-rank-b { flex: 0 0 auto; display: flex; }
.hc-rank-tx { flex: 1 1 auto; min-width: 0; text-align: left; }
.hc-rank-tx b { font-size: 13px; font-weight: 900; letter-spacing: .5px; }
.hc-rank-bar { display: block; height: 5px; border-radius: 3px; background: rgba(0,0,0,.4); margin-top: 4px; overflow: hidden; }
.hc-rank-bar i { display: block; height: 100%; border-radius: 3px; }
.hc-rank-go { flex: 0 0 auto; font-size: 9px; font-weight: 900; letter-spacing: 1px; color: var(--rkc); }

/* results-screen RANKED change card */
.rs-rank {
  display: flex; align-items: center; gap: 16px; max-width: 380px; margin: 4px auto 16px; padding: 12px 16px; text-align: left;
  border-radius: 14px; background: linear-gradient(180deg, rgba(24,34,60,.92), rgba(13,20,38,.92));
  border: 1px solid color-mix(in srgb, var(--rkc) 45%, rgba(120,150,220,.3));
  box-shadow: 0 0 22px color-mix(in srgb, var(--rkc) 20%, transparent);
}
.rs-rank.promo { animation: rsPromo 1.4s ease-out 1; }
@keyframes rsPromo {
  0% { box-shadow: 0 0 0 color-mix(in srgb, var(--rkc) 60%, transparent); }
  40% { box-shadow: 0 0 34px color-mix(in srgb, var(--rkc) 75%, transparent); }
  100% { box-shadow: 0 0 22px color-mix(in srgb, var(--rkc) 20%, transparent); }
}
.rs-rk-badge { flex: 0 0 auto; }
.rs-rk-info { flex: 1 1 auto; min-width: 0; }
.rs-rk-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rs-rk-ttl { font-size: 9px; font-weight: 900; letter-spacing: 1.5px; color: #8fa0c8; }
.rs-rk-tag { font-size: 9px; font-weight: 900; letter-spacing: 1px; padding: 2px 7px; border-radius: 20px; }
.rs-rk-tag.up { color: #0b2a12; background: #7ee08a; }
.rs-rk-tag.down { color: #fff; background: #c0414a; }
.rs-rk-label { font-size: 20px; font-weight: 900; letter-spacing: .5px; margin: 1px 0 7px; }
.rs-rk-bar { height: 12px; border-radius: 7px; background: rgba(0,0,0,.4); overflow: hidden; border: 1px solid rgba(255,255,255,.08); }
.rs-rk-fill { height: 100%; width: 0; border-radius: 7px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.rs-rk-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
.rs-rk-rp { font-size: 10px; font-weight: 800; color: #aeb8d6; letter-spacing: .5px; }
.rs-rk-delta { font-size: 14px; font-weight: 900; }
.rs-rk-delta.up { color: #7ee08a; } .rs-rk-delta.down { color: #ff7a6a; }

/* deathmatch revive: subtle "leave match" link-button under the modal buttons */
.rev-leave { display: block; margin: 12px auto 0; background: none; border: none; cursor: pointer;
  font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #8fa0c8; text-decoration: underline; opacity: .8; }
.rev-leave:hover { color: #ff8a7a; opacity: 1; }

/* profile RANKED showcase (per-mode badge cards) */
.pr-ranked-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pr-ranked-link { background: none; border: none; cursor: pointer; color: #ffd24a; font-weight: 900; font-size: 11px; letter-spacing: 1px; }
.pr-ranked-link:hover { filter: brightness(1.15); text-decoration: underline; }
.pr-ranked { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.pr-rank-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; cursor: pointer;
  border-radius: 14px; background: linear-gradient(180deg, #18223c, #0e1626);
  background: radial-gradient(120% 140% at 14% 0%, color-mix(in srgb, var(--rkc) 16%, transparent), transparent 60%), linear-gradient(180deg, #18223c, #0e1626);
  border: 1px solid color-mix(in srgb, var(--rkc) 42%, rgba(120,150,220,.28));
  box-shadow: 0 0 16px color-mix(in srgb, var(--rkc) 15%, transparent); transition: transform .12s, filter .12s; }
.pr-rank-card:hover { transform: translateY(-2px); filter: brightness(1.08); }
.pr-rank-badge { flex: 0 0 auto; }
.pr-rank-meta { flex: 1 1 auto; min-width: 0; }
.pr-rank-mode { font-size: 9px; font-weight: 900; letter-spacing: 1.5px; color: #8fa0c8; }
.pr-rank-tier { font-size: 19px; font-weight: 900; letter-spacing: .5px; margin: 1px 0 7px; }
.pr-rank-bar { height: 8px; border-radius: 5px; background: rgba(0,0,0,.4); overflow: hidden; border: 1px solid rgba(255,255,255,.07); }
.pr-rank-bar i { display: block; height: 100%; border-radius: 5px; }
.pr-rank-rp { font-size: 10px; font-weight: 800; color: #aeb8d6; margin-top: 4px; letter-spacing: .4px; }
.pr-rank-pos { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 900; color: #fff; background: rgba(0,0,0,.32); padding: 2px 8px; border-radius: 20px; }
@media (max-width: 760px) { .pr-ranked { grid-template-columns: 1fr; } }

/* ===================================================== juiced chest art (v2) == */
.chest-v2 .cs-lid { transform-box: fill-box; transform-origin: 50% 96%; transition: transform .3s cubic-bezier(.34, 1.56, .5, 1); }
.chest-v2 .cs-gem { transform-box: fill-box; transform-origin: 50% 37%; animation: chGem 2.6s ease-in-out infinite; }
.chest-v2 .cs-glow { animation: chGlow 2.4s ease-in-out infinite; }
.chest-v2 .cs-aura { opacity: .16; transition: opacity .3s; }
.chest-v2 .cs-shine { opacity: 0; }
.chest-v2 .cs-spark { transform-box: fill-box; transform-origin: center; opacity: 0; animation: chSpark 2.4s ease-in-out infinite; }
.chest-v2 .cs-spark.s2 { animation-delay: .6s; }
.chest-v2 .cs-spark.s3 { animation-delay: 1.2s; }
.chest-v2 .cs-spark.s4 { animation-delay: 1.8s; }
@keyframes chGem  { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: 1; transform: scale(1.09); } }
@keyframes chGlow { 0%, 100% { opacity: .42; } 50% { opacity: .72; } }
@keyframes chSpark{ 0%, 100% { opacity: 0; transform: scale(.35); } 50% { opacity: .9; transform: scale(1.1); } }
/* idle bob — shop art only (keeps the small masteries grid calm) */
.chest-art .chest-v2 { animation: chBob 3.2s ease-in-out infinite; }
@keyframes chBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.m-chest .cs-spark, .m-claim .cs-spark { display: none; }
/* hover juice: lid pops open, interior lights up, a shine sweeps across */
.chest-card:hover .chest-v2 .cs-lid, .m-claim:hover .cs-lid, .m-chest:hover .cs-lid { transform: translateY(-7px) rotate(-5deg); }
.chest-card:hover .chest-v2 .cs-aura, .m-claim:hover .cs-aura, .m-chest:hover .cs-aura { opacity: .34; }
.chest-card:hover .chest-v2 .cs-glow, .m-claim:hover .cs-glow, .m-chest:hover .cs-glow { opacity: .95; }
.chest-card:hover .chest-v2 .cs-shine, .m-claim:hover .cs-shine, .m-chest:hover .cs-shine { animation: chShine .65s ease-out; }
@keyframes chShine { 0% { opacity: 0; transform: translateX(0) skewX(-16deg); } 25% { opacity: .85; } 100% { opacity: 0; transform: translateX(125px) skewX(-16deg); } }
@media (prefers-reduced-motion: reduce) {
  .chest-v2 .cs-gem, .chest-v2 .cs-glow, .chest-v2 .cs-spark, .chest-art .chest-v2 { animation: none; }
}

/* collections: animated speed-trail preview swatch */
.trail-swatch { display: inline-block; width: 54px; height: 16px; border-radius: 8px; background-size: 220% 100%;
  box-shadow: 0 0 10px rgba(255,255,255,.28), inset 0 0 4px rgba(255,255,255,.4); animation: trailFlow 1.5s linear infinite; }
@keyframes trailFlow { from { background-position: 0 0; } to { background-position: 220% 0; } }
.trail-rainbow { box-shadow: 0 0 13px rgba(180,120,255,.55); }
/* aura preview swatch: glowing core + spinning conic ring in the aura's colours */
.aura-swatch { position: relative; display: inline-block; width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--a1) 0%, var(--a1) 22%, transparent 55%);
  box-shadow: 0 0 12px var(--a1); }
.aura-swatch::before { content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--a2), transparent 60%);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 60%, #000 78%, transparent 82%);
          mask: radial-gradient(circle, transparent 56%, #000 60%, #000 78%, transparent 82%);
  animation: auraSpin 3.2s linear infinite; }
@keyframes auraSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .aura-swatch::before { animation: none; } }
.cos-art { position: relative; }
.cos-lock { position: absolute; right: 3px; bottom: 1px; font-size: 11px; filter: drop-shadow(0 1px 1px #000); }

/* home: BATTLE WORLD picker — art cards, one always selected, choice persists */
.hc-worlds { margin: 6px 0 2px; }
.hc-worlds-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.hc-worlds-t { font-size: 9px; font-weight: 900; letter-spacing: 1.5px; color: #8fa0c8; }
.hc-worlds-sub { font-size: 10.5px; font-weight: 700; color: #ffd24a; }
.hc-worlds-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.world-card { position: relative; height: 74px; padding: 0; border-radius: 11px; overflow: hidden; cursor: pointer;
  border: 2px solid #2a3354; background-color: #12172c;
  /* zoom into a themed CORNER of the arena art — the centre of every map is the
     neutral tan combat clearing, the identity lives in the border */
  background-size: 260%; background-position: 12% 14%;
  box-shadow: 0 3px 0 rgba(0,0,0,0.45); transition: transform .15s, border-color .15s, box-shadow .15s, filter .15s; }
.world-card:hover { transform: translateY(-2px); filter: brightness(1.12); }
.world-card:focus-visible { outline: 3px solid #ffd24a; outline-offset: 2px; }
.world-card:active { transform: translateY(1px); }
.world-card.sel { border-color: #ffd24a; box-shadow: 0 0 0 1px #ffd24a, 0 3px 10px rgba(255,210,74,0.35); }
.world-card .wc-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 4px 4px; font-size: 10px; font-weight: 900;
  letter-spacing: .5px; text-transform: uppercase; color: #fff; text-align: center; line-height: 1.1;
  background: linear-gradient(180deg, rgba(6,8,18,0) 0%, rgba(6,8,18,0.85) 55%); text-shadow: 0 1px 2px #000; pointer-events: none; }
.world-card .wc-check { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: #ffd24a; color: #1c2340; font-size: 12px; font-weight: 900; line-height: 18px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.5); pointer-events: none; }
@media (max-width: 760px) { .world-card { height: 64px; } }
@media (prefers-reduced-motion: reduce) { .world-card, .world-card:hover, .world-card:active { transform: none; transition: none; } }
@media (prefers-reduced-motion: reduce) { .trail-swatch { animation: none; } }

@media (max-width: 760px) {
  .lb-hero { flex-direction: column; text-align: center; gap: 12px; padding: 16px; }
  .lb-hero-stats { justify-content: center; gap: 18px; }
  .lb-hero-tier { font-size: 26px; }
  .lb-ladder-head, .rl-row { grid-template-columns: 26px 32px 1fr 58px; }
  .lb-tier { display: none; }
  .lb-legend { flex-wrap: wrap; }
  .lb-leg { flex-basis: 30%; }
  .rs-rank { max-width: 92vw; }
}
