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

/* safe-area insets — non-zero only on notched devices (the iOS app); 0 everywhere else, so all
   the calc()/padding rules below are no-ops on desktop & web. Keeps the game clear of the
   Dynamic Island, camera notch, and home indicator. */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
}

html, body {
  height: 100%;
  background: #14161c;
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

#wrap {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;   /* the canvas now fills the whole screen; clip any overflow */
}

#game {
  display: block;
  touch-action: none;
  border-radius: 10px;
  box-shadow: 0 0 60px rgba(0,0,0,.6);
  background: #3a3f4a;
}

/* Sign in with Apple button (native app) — follows Apple's black-button styling */
.appleBtn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 12px 0; margin: 2px 0 4px;
  border: none; border-radius: 24px; cursor: pointer;
  background: #000; color: #fff; font-size: 17px; font-weight: 600;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
}
.appleBtn:active { opacity: .85; }
/* Sign in with Google button (native app) — white, per Google's branding */
.googleBtn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 0; margin: 2px 0 4px;
  border: 1px solid #dadce0; border-radius: 24px; cursor: pointer;
  background: #fff; color: #3c4043; font-size: 16px; font-weight: 600;
  font-family: "Roboto", -apple-system, system-ui, sans-serif;
}
.googleBtn:active { background: #f7f8f8; }

#muteBtn, #pauseBtn {
  position: absolute;
  right: calc(12px + var(--sar));
  z-index: 30;
  width: 44px;
  height: 44px;
  font-size: 20px;
  border: none;
  border-radius: 10px;
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
}
#muteBtn { bottom: calc(12px + var(--sab)); }
#pauseBtn { bottom: calc(64px + var(--sab)); }
/* iOS app: the sound toggle lives in the pause menu, so hide the floating mute button and let the
   single pause button take the lower-right corner of the game field, inset above the home indicator. */
body.native-ios #muteBtn { display: none; }
body.native-ios #pauseBtn { bottom: calc(12px + var(--sab)); }
#muteBtn, #pauseBtn { display: flex; align-items: center; justify-content: center; }
#muteBtn:hover, #pauseBtn:hover { background: rgba(0,0,0,.7); }
.tips li svg { vertical-align: -3px; margin-right: 2px; }
.buyBtn svg, .miniBtn svg, .diffBtn svg { vertical-align: -2px; }

/* ---------- toasts (achievement unlocks) ---------- */
#toasts {
  position: absolute;
  top: calc(14px + var(--sat));
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2a3040, #1c212e);
  border: 1px solid rgba(255,209,102,.6);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: toastIn .3s ease-out, toastOut .4s ease-in 2.8s forwards;
}
.toast small { display: block; font-weight: 600; color: #b9c3d6; font-size: 11px; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* ---------- overlays ---------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 11, 17, .86);   /* solid-ish scrim instead of backdrop-blur — blur is very costly on phones */
  /* keep the centered panel inside the safe area (the scrim still covers the full screen) */
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
}
.overlay.hidden { display: none; }
/* while an overlay covers the menu/death screen, pause their (now-hidden) animations to save repaints */
.bgFrozen #menuOverlay *, .bgFrozen #overOverlay * { animation-play-state: paused !important; }
#lbOverlay, #achOverlay { z-index: 25; }

.panel {
  text-align: center;
  color: #fff;
  padding: 24px 24px;
  border-radius: 18px;
  background: rgba(24, 28, 40, .95);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  max-width: 360px;
  max-height: 92vh;
  max-height: calc(100dvh - 24px - var(--sat) - var(--sab));   /* respects mobile chrome + notch/home-indicator */
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;                          /* Firefox */
  scrollbar-color: rgba(255,255,255,.22) transparent;
}

/* slim custom scrollbars everywhere — no default chrome */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.32); }
::-webkit-scrollbar-corner { background: transparent; }
.panel.wide { width: 350px; position: relative; }
.panelX {
  position: sticky; top: 0; float: right;
  margin: -6px -4px 0 0;
  width: 32px; height: 32px; z-index: 10;
  border: none; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.09); color: #cdd6e6;
  font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.panelX:hover { background: rgba(255,90,90,.28); color: #fff; }

.panel h1 {
  font-size: 32px;
  letter-spacing: 2px;
  font-weight: 900;
  background: linear-gradient(180deg, #7ecbff, #2f7bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.panel h1.dead {
  background: linear-gradient(180deg, #ff9d7e, #ff2f2f);
  -webkit-background-clip: text;
  background-clip: text;
}
.panel h2 { font-size: 20px; font-weight: 900; margin-bottom: 12px; letter-spacing: 1px; }

.panel .tag { color: #b9c3d6; font-size: 14px; margin-bottom: 12px; line-height: 1.4; }

.tips {
  list-style: none;
  text-align: left;
  font-size: 12.5px;
  color: #cdd6e6;
  margin: 0 0 14px;
  line-height: 1.8;
}
.tips .good { color: #6db4ff; }
.tips .bad  { color: #ff6d6d; }

.bigBtn {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 13px 36px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #35c163, #1e9948);
  box-shadow: 0 6px 0 #14713366, 0 10px 24px rgba(0,0,0,.4);
  transition: transform .06s;
}
.bigBtn:hover { filter: brightness(1.08); }
.bigBtn:active { transform: translateY(3px); box-shadow: 0 2px 0 #14713366; }

.btnRow { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.miniBtn {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  cursor: pointer;
  color: #dfe6f2;
  background: rgba(255,255,255,.07);
}
.miniBtn:hover { background: rgba(255,255,255,.15); }
.menuBackBtn {
  display: block; width: 100%; margin: 12px 0 6px; padding: 13px 18px;
  font-size: 14px; font-weight: 800; letter-spacing: .3px; cursor: pointer;
  color: #cfd8e6; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16); border-radius: 12px;
  transition: background .15s, border-color .15s, transform .1s;
}
.menuBackBtn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.32); }
.menuBackBtn:active { transform: scale(.98); }
.closeBtn { margin-top: 14px; }

/* daily missions */
.dailyBox {
  margin-top: 12px; padding: 10px 11px 8px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,209,102,.07), rgba(0,0,0,.18));
  border: 1px solid rgba(255,209,102,.22);
  text-align: left;
}
.dailyHead {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px; font-weight: 900; letter-spacing: 2px; color: #ffd166; margin-bottom: 7px;
}
.dailySub { font-size: 9px; font-weight: 600; letter-spacing: .3px; color: #7f8aa3; }
.dailyDetails > summary {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none;
  font-size: 10.5px; font-weight: 900; letter-spacing: 1.5px; color: #ffd166;
}
.dailyDetails > summary::-webkit-details-marker { display: none; }
.dailySummary .dsL { display: inline-flex; align-items: center; gap: 6px; }
.dailySummary .dsL svg { vertical-align: -2px; opacity: .95; }
.dailySummary .dsR { font-size: 11px; font-weight: 900; letter-spacing: .3px; color: #cdd7e6;
  padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.06); }
.dailySummary .dsR.all { color: #35c163; }
.dailySummary .dsR::after { content: '▾'; margin-left: 6px; color: #8a7a45; font-size: 9px; }
.dailyDetails[open] .dailySummary .dsR::after { content: '▴'; }
.dailyBody { margin-top: 6px; }
.dailyFoot { font-size: 9px; font-weight: 600; letter-spacing: .3px; color: #7f8aa3; text-align: right; margin-top: 5px; }
.dm { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.dm + .dm { border-top: 1px solid rgba(255,255,255,.05); }
.dmIco {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
}
.dmBody { flex: 1; min-width: 0; }
.dmDs { display: block; font-size: 11.5px; font-weight: 700; color: #dfe6f2; margin-bottom: 3px; }
.dmBar { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.09); overflow: hidden; }
.dmBar > span { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #35c163, #7ecbff); transition: width .3s ease; }
.dmRw { flex: 0 0 auto; font-size: 11.5px; font-weight: 900; color: #ffd166; }
.dm.bonus .dmIco svg, .dm.bonus .dmRw svg { color: #ffd166; }   /* daily-complete bonus case */
.dm.bonus .dmBar > span { background: #ffd166; }
.dm.done { opacity: .6; }
.dm.done .dmDs { text-decoration: line-through; color: #9aa5ba; }
.dm.done .dmBar > span { background: #35c163; }
.dm.done .dmRw { color: #35c163; }

/* unified quick-nav (menu + death screen) */
/* ---- quick-nav launcher: 3×2 grid, one accent colour per destination ---- */
.navGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.overQuick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.navBtn {
  --ac: #7ecbff;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 4px 10px; border-radius: 13px; cursor: pointer;
  color: #e6ecf6; font-weight: 800; font-size: 11px; letter-spacing: .3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 9%, rgba(255,255,255,.03)), rgba(255,255,255,.015));
  border: 1px solid color-mix(in srgb, var(--ac) 26%, transparent);
  transition: transform .1s ease, background .15s, border-color .15s, box-shadow .15s;
  touch-action: manipulation;
}
.navBtn:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--ac) 20%, transparent), color-mix(in srgb, var(--ac) 6%, transparent));
  border-color: color-mix(in srgb, var(--ac) 60%, transparent);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ac) 25%, transparent);
}
.navBtn:active { transform: translateY(2px); }
.navBtn .navIco {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--ac) 32%, transparent), rgba(0,0,0,.32));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.3);
}
.navBtn .navIco svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.navBtn[data-nav="inv"]    { --ac: #7ecbff; }
.navBtn[data-nav="shop"]   { --ac: #35c163; }
.navBtn[data-nav="lb"]     { --ac: #ffd166; }
.navBtn[data-nav="ach"]    { --ac: #ff8a5c; }
.navBtn[data-nav="trade"]  { --ac: #3cffe6; }
.navBtn[data-nav="market"] { --ac: #c58bff; }
.navBtn[data-nav="friends"]{ --ac: #ff6da8; }
.navBtn.navWide { grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 10px; padding: 11px; }
.navBtn.navWide .navIco { width: 30px; height: 30px; border-radius: 9px; }
.navBtn.navWide .navIco svg { width: 18px; height: 18px; }
.navBtn.navWide .navLbl { font-size: 13px; }

.hint { margin-top: 12px; font-size: 11.5px; color: #7a8499; line-height: 1.6; }
.legalLinks { margin-top: 6px; }
.legalLinks a { color: #7a8499; text-decoration: underline; }
.buildLine { margin-top: 8px; text-align: center; font-size: 9.5px; font-weight: 600; letter-spacing: .5px; color: #4d5567; }
.legalLinks a:hover { color: #b9c3d6; }

/* ---------- difficulty ---------- */
#diffRow { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.diffBtn {
  flex: 1;
  padding: 7px 2px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.06);
  color: #cdd6e6;
  cursor: pointer;
  line-height: 1.3;
}
.diffBtn small { display: block; font-weight: 600; font-size: 8.5px; color: #8f9ab0; }
.diffBtn.sel { border-color: #35c163; background: rgba(53,193,99,.18); color: #fff; }
.diffBtn:hover { background: rgba(255,255,255,.14); }
.diffBtn.locked { opacity: .5; cursor: not-allowed; }
.diffBtn.locked:not(.sel):hover { background: rgba(255,255,255,.05); }
.diffBtn.locked.sel { opacity: .85; }
.lockedRow { position: relative; }

/* ---------- skins ---------- */
.skinLabel { font-size: 10px; font-weight: 800; letter-spacing: 2px; color: #7a8499; margin-bottom: 6px; }
#skinRow {
  display: flex;
  flex-wrap: wrap;            /* wrap into rows — never overflow the panel */
  gap: 9px;
  justify-content: center;
  margin-bottom: 16px;
  max-width: 100%;
}
.skinDot {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.skinDot.sel { border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,.5); }
.skinDot.locked { opacity: .38; cursor: default; }

/* ---------- leaderboard tabs (compact icon strip — label reveals on selection) ---------- */
#lbTabs { display: flex; flex-wrap: nowrap; gap: 5px; clear: both; align-items: center;
  margin: 8px 0 9px; padding: 6px; border-radius: 14px;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.06);
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
#lbTabs::-webkit-scrollbar { display: none; }
.lbTab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0; line-height: 1;
  padding: 8px; font-size: 12px; font-weight: 800; white-space: nowrap;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05); color: #aab3c6; cursor: pointer;
  transition: background .16s, color .16s, border-color .16s, gap .18s ease, padding .18s ease, transform .08s;
}
.lbTab svg { flex: 0 0 auto; display: block; }
.lbTab .lbTabTxt { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .2s ease, opacity .16s ease; }
.lbTab:hover { color: #eef3fb; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); }
.lbTab:active { transform: scale(.94); }
.lbTab.sel { gap: 7px; padding: 8px 14px 8px 11px;
  background: linear-gradient(180deg, #45d67c, #2ba859); border-color: rgba(150,255,190,.5);
  color: #06210f; box-shadow: 0 3px 12px rgba(45,168,89,.4), inset 0 1px 0 rgba(255,255,255,.3); }
.lbTab.sel .lbTabTxt { max-width: 130px; opacity: 1; }
/* current-board caption under the strip */
#lbCaption { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  margin: 0 2px 12px; padding: 0 2px; }
.lbCapName { font-size: 15px; font-weight: 900; color: #eef3fb; letter-spacing: .2px; }
.lbCapName svg { vertical-align: -2px; }
.lbCapDesc { font-size: 11.5px; font-weight: 700; color: #8792a6; }

/* ---------- leaderboard rows ---------- */
.lbList { display: flex; flex-direction: column; gap: 5px; }
.lbRow { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.lbRank { flex: 0 0 30px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 14px; font-weight: 900; color: #9aa5ba; background: rgba(0,0,0,.22); }
.lbRow.top .lbRank { background: rgba(0,0,0,.3); }
.lbMedal { font-size: 18px; line-height: 1; }
.lbRow.t1 { background: linear-gradient(180deg, rgba(255,207,77,.16), rgba(0,0,0,.1)); border-color: rgba(255,207,77,.4); }
.lbRow.t1 .lbRank svg { color: #ffcf4d; }
.lbRow.t2 { background: linear-gradient(180deg, rgba(198,210,230,.13), rgba(0,0,0,.1)); border-color: rgba(198,210,230,.35); }
.lbRow.t2 .lbRank svg { color: #c6d2e6; }
.lbRow.t3 { background: linear-gradient(180deg, rgba(207,138,68,.14), rgba(0,0,0,.1)); border-color: rgba(207,138,68,.38); }
.lbRow.t3 .lbRank svg { color: #cf8a44; }
.lbRow.me { background: linear-gradient(180deg, rgba(53,193,99,.18), rgba(0,0,0,.08)); border-color: rgba(53,193,99,.5); }
.lbRow.foot { margin-top: 6px; background: linear-gradient(180deg, rgba(47,123,255,.16), rgba(0,0,0,.08)); border-color: rgba(126,203,255,.4); }
.lbRow.foot .lbRank { color: #7ecbff; }
.lbWho { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lbName { font-size: 13.5px; font-weight: 800; color: #eef3fb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbName svg { vertical-align: -1px; opacity: .85; }
.lbSub { font-size: 10.5px; font-weight: 600; color: #8b93a6; }
.lbSub svg { vertical-align: -1px; opacity: .7; }
.lbDist { flex: 0 0 auto; font-size: 17px; font-weight: 900; color: #ffd166; }
.lbDist small { font-size: 11px; font-weight: 700; color: #b39a4e; margin-left: 1px; }
.lbRow.me .lbDist { color: #8fffa9; } .lbRow.me .lbDist small { color: #5fbf78; }
/* per-row troop avatar (equipped model + skin) with a rarity aura / special effect */
.lbAvatar { flex: 0 0 auto; width: 34px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.09); }
.lbAvatar img { width: 30px; height: auto; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
/* co-op rows: both players' troopers, side by side (each a bit smaller so the pair fits the same slot) */
.lbAvPair { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; }
.lbAvPair .lbAvatar { width: 26px; height: 34px; border-radius: 8px; }
.lbAvPair .lbAvatar img { width: 23px; }
.lbAv-uncommon { border-color: rgba(53,193,99,.5); box-shadow: 0 0 8px rgba(53,193,99,.32); }
.lbAv-rare { border-color: rgba(122,182,255,.55); box-shadow: 0 0 9px rgba(122,182,255,.4); }
.lbAv-epic { border-color: rgba(197,139,255,.6); box-shadow: 0 0 11px rgba(197,139,255,.5); }
.lbAv-mythic { border-color: rgba(255,59,78,.65); animation: lbGlowR 1.8s ease-in-out infinite; }
.lbAv-gold { border-color: rgba(255,207,77,.72); animation: lbGlowG 1.8s ease-in-out infinite; }
.lbAv-rainbow { animation: lbRainbow 2.4s linear infinite; }   /* wins over mythic for rainbow skins */
@keyframes lbGlowR { 0%,100% { box-shadow: 0 0 6px rgba(255,59,78,.4); } 50% { box-shadow: 0 0 14px rgba(255,59,78,.75); } }
@keyframes lbGlowG { 0%,100% { box-shadow: 0 0 6px rgba(255,207,77,.45); } 50% { box-shadow: 0 0 15px rgba(255,207,77,.8); } }
@keyframes lbRainbow {
  0% { border-color: #ff5a5a; box-shadow: 0 0 11px rgba(255,90,90,.6); }
  25% { border-color: #ffd166; box-shadow: 0 0 11px rgba(255,209,102,.6); }
  50% { border-color: #5aff8a; box-shadow: 0 0 11px rgba(90,255,138,.6); }
  75% { border-color: #5ab8ff; box-shadow: 0 0 11px rgba(90,184,255,.6); }
  100% { border-color: #c45aff; box-shadow: 0 0 11px rgba(196,90,255,.6); }
}
.youTag { font-size: 9px; font-weight: 900; color: #06210f; background: #7ecbff; padding: 1px 5px; border-radius: 6px; vertical-align: middle; }
.empty { color: #7a8499; font-size: 13px; padding: 16px 0; }

/* achievement completion header */
.achHead { margin-bottom: 12px; }
.achHeadTop { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 700; color: #b9c3d6; margin-bottom: 6px; }
.achHeadTop b { color: #fff; font-size: 17px; }
.achHeadPct { color: #ffd166; font-weight: 900; }
.achHeadBar { height: 7px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.achHeadBar > div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #35c163, #7ecbff); transition: width .5s ease; }

/* achievement rows */
.achRow {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 8px; margin-bottom: 6px; border-radius: 12px;
  text-align: left; border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.03);
}
.achRow.got { border-color: var(--tc); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.15)); box-shadow: inset 3px 0 0 var(--tc); }
.achRow.locked { opacity: .78; }
.achIco {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(110% 110% at 50% 0%, var(--tc), rgba(0,0,0,.35));
}
.achRow.locked .achIco { filter: grayscale(.7) brightness(.75); }
.achBody { flex: 1; min-width: 0; }
.achNm { font-weight: 800; font-size: 13px; color: #eef3fb; }
.achDs { font-size: 11px; color: #9aa5ba; margin-top: 1px; }
.achChk { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.achLock { flex: 0 0 auto; width: 24px; text-align: center; opacity: .5; }
.achProg { flex: 0 0 auto; width: 62px; text-align: right; }
.achPBar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; margin-bottom: 3px; }
.achPBar > div { height: 100%; border-radius: 3px; }
.achProg span { font-size: 9.5px; font-weight: 700; color: #8f9ab0; }

/* player trading */
.tradeEntry {
  width: 100%; padding: 13px; border-radius: 13px; cursor: pointer;
  font-size: 14px; font-weight: 800; letter-spacing: .5px; color: #fff;
  background: linear-gradient(135deg, rgba(126,203,255,.2), rgba(255,209,102,.12));
  border: 1px solid rgba(126,203,255,.35);
}
.tradeEntry small { display: block; font-weight: 600; font-size: 10.5px; color: #9aa5ba; letter-spacing: 0; margin-top: 3px; }
.tradeEntry:hover { border-color: rgba(126,203,255,.6); background: linear-gradient(135deg, rgba(126,203,255,.3), rgba(255,209,102,.18)); }
.tradeEntry svg { vertical-align: -3px; }

.trHome { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.trBigBtn {
  padding: 15px; border-radius: 14px; cursor: pointer; color: #fff;
  font-size: 14px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.18));
  border: 1px solid rgba(255,255,255,.14);
}
.trBigBtn:hover { border-color: rgba(126,203,255,.5); background: linear-gradient(180deg, rgba(126,203,255,.16), rgba(0,0,0,.18)); }
.trBigBtn small { display: block; font-weight: 600; font-size: 10.5px; color: #9aa5ba; letter-spacing: 0; margin-top: 3px; }
/* co-op */
.coopEntry { margin-bottom: 12px; background: linear-gradient(180deg, rgba(255,109,168,.16), rgba(0,0,0,.14)); border-color: rgba(255,109,168,.42); }
.coopEntry:hover { border-color: rgba(255,109,168,.7); background: linear-gradient(180deg, rgba(255,109,168,.26), rgba(0,0,0,.14)); }
.liveDot { display: inline-block; font-size: 8.5px; font-weight: 900; letter-spacing: 1px; color: #17121f; background: #ff5a5a; padding: 1px 6px; border-radius: 999px; margin-left: 5px; vertical-align: 2px; animation: goldPulse 1.4s ease-in-out infinite; }
.coopErr { font-size: 12px; font-weight: 700; color: #ff8a7a; margin-bottom: 8px; }
.coopLobby { text-align: center; }
.coopPlayers { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 14px; }
.coopP { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; max-width: 130px;
  padding: 12px 8px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); }
.coopP b { font-size: 13px; color: #eaf1fb; }
.coopP small { font-size: 10px; color: #8a94a8; text-transform: uppercase; letter-spacing: .5px; }
.coopVs { flex: 0 0 auto; color: #ff6da8; }
.coopReady { font-size: 12px; font-weight: 700; color: #8fffa9; margin-bottom: 8px; }
.coopReady svg { color: #8fffa9; vertical-align: -2px; }
.coopLobby .bigBtn.fullW { margin-bottom: 8px; }
.coopDunAsk { margin: 4px 0 10px; padding: 13px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(197,80,180,.14), rgba(0,0,0,.2)); border: 1px solid rgba(197,80,180,.45); }
.coopDunAsk b { display: block; font-size: 14px; color: #ffd7f4; margin-bottom: 3px; }
.coopDunAsk small { display: block; font-size: 11.5px; color: #b9a5c0; margin-bottom: 10px; }
.coopDunBtns { display: flex; flex-direction: column; gap: 7px; }
.coopDunBtns .dunGo { background: linear-gradient(180deg, #8a2ea0, #5a1a6e); border: 1px solid rgba(255,140,240,.4); }
.coopDunBtns .dunGo[disabled] { opacity: .5; cursor: default; }
.coopResult { font-size: 12.5px; font-weight: 700; color: #ffb3d4; margin: 2px 0; }
.coopResult svg { color: #ff6da8; vertical-align: -2px; }
.coopResult b { color: #fff; }
/* co-op screen — wider panel + redesigned option cards */
.coopPanel { width: min(430px, 94vw); max-width: 94vw; }
.coopHome { display: flex; flex-direction: column; gap: 12px; }
.coopBigBtn {
  display: flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  padding: 16px 18px; border-radius: 16px; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.14));
  border: 1px solid rgba(255,255,255,.14); transition: transform .1s, border-color .15s, background .15s;
}
.coopBigBtn:hover { border-color: rgba(255,109,168,.55); background: linear-gradient(180deg, rgba(255,109,168,.14), rgba(0,0,0,.14)); }
.coopBigBtn:active { transform: scale(.98); }
.coopBtnIco { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255,109,168,.35), rgba(0,0,0,.3)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.coopBtnIco.join { background: radial-gradient(120% 120% at 50% 0%, rgba(60,255,230,.28), rgba(0,0,0,.3)); }
.coopBtnIco svg { color: #ffd9ea; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.coopBtnIco.join svg { color: #baffef; }
.coopBtnTxt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.coopBtnTxt b { font-size: 16px; font-weight: 900; letter-spacing: .5px; }
.coopBtnTxt small { font-size: 11.5px; font-weight: 600; color: #9aa5ba; letter-spacing: 0; }
.coopTag { font-size: 12px; color: #b9a5c0; margin-top: 4px; text-align: center; line-height: 1.4; }
.coopTag svg { color: #ff6da8; vertical-align: -2px; }
/* roomier friend rows + buttons */
.frOffer { padding: 8px 13px; }
.frCoop { padding: 8px 12px; background: linear-gradient(180deg, rgba(255,109,168,.22), rgba(255,109,168,.08));
  border: 1px solid rgba(255,109,168,.4); color: #ffd7e8; border-radius: 9px; font-weight: 800; font-size: 12px; cursor: pointer; white-space: nowrap; }
.frCoop svg { vertical-align: -2px; color: #ff9ec5; }
.frDel { padding: 8px 11px; }

/* ---------- notifications inbox ---------- */
.notifBox { margin-top: 12px; text-align: left; }
.notifBox.hidden { display: none; }
.notifHead { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; letter-spacing: .04em; color: #ffd9a0; margin-bottom: 7px; }
.notifHead svg { opacity: .9; color: #ffcf6a; }
.notifN { min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; background: #ffab3d; color: #1a1204; font-size: 11px; font-weight: 900; }
.notifClear { margin-left: auto; background: none; border: none; color: #8b93a6; font-size: 11px; font-weight: 700; cursor: pointer; padding: 2px 4px; }
.notifClear:hover { color: #cfd7e6; }
.notifRow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.notifRow.coop { background: linear-gradient(180deg, rgba(255,109,168,.14), rgba(0,0,0,.12)); border-color: rgba(255,109,168,.32); }
.notifRow.sale { background: linear-gradient(180deg, rgba(255,209,102,.12), rgba(0,0,0,.12)); border-color: rgba(255,209,102,.28); }
.notifRow.tokens { background: linear-gradient(180deg, rgba(47,212,196,.16), rgba(0,0,0,.12)); border-color: rgba(47,212,196,.34); }
.notifRow.friendreq { background: linear-gradient(180deg, rgba(53,193,99,.15), rgba(0,0,0,.12)); border-color: rgba(53,193,99,.34); }
.notifIco.fr { width: auto; height: auto; flex: 0 0 auto; background: transparent; border-radius: 0; }
.notifJoin.accept { background: linear-gradient(180deg, #45d977, #2fae5c); color: #06210f; box-shadow: 0 2px 8px rgba(47,174,92,.42); }
.notifIco { display: inline-flex; width: 30px; height: 30px; flex: 0 0 30px; align-items: center; justify-content: center; border-radius: 9px; background: rgba(0,0,0,.28); }
.notifIco.heart svg { color: #ff6da8; }
.notifIco.coin svg { color: #ffd166; }
.notifIco.token svg { color: #2fd4c4; }
.notifTxt { flex: 1; min-width: 0; font-size: 12.5px; color: #d6deec; line-height: 1.3; }
.notifTxt b { color: #fff; }
.notifTxt .notifCoins { color: #ffd166; }
.notifJoin { flex: 0 0 auto; padding: 7px 15px; border-radius: 9px; border: none; cursor: pointer; font-weight: 900; font-size: 12px; letter-spacing: .5px;
  background: linear-gradient(180deg, #ff5aa0, #d6337a); color: #fff; box-shadow: 0 2px 8px rgba(214,51,122,.4); }
.notifJoin:hover { filter: brightness(1.08); }
.notifX { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px;
  background: rgba(255,255,255,.08); color: #9aa5ba; }
.notifX:hover { background: rgba(255,90,90,.2); color: #ffb3b3; }
.trBigBtn svg { vertical-align: -4px; }
.trHint { font-size: 11.5px; color: #9aa5ba; font-weight: 600; margin: 8px 0 6px; text-align: center; }
.trHint b { color: #eef3fb; }
.trMsg { text-align: center; padding: 8px 0; }
.trMsg p { margin: 10px 0; font-size: 13px; color: #c3ccdb; }
.trWait { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 700; color: #b9c3d6; margin: 10px 0; }
.tCode {
  font-size: 34px; font-weight: 900; letter-spacing: 9px; color: #ffd166;
  padding: 12px 6px 12px 15px; margin: 6px auto; border-radius: 13px; max-width: 270px;
  background: rgba(0,0,0,.35); border: 1px dashed rgba(255,209,102,.5);
  user-select: all;
}
.tCodeInput {
  display: block; width: 200px; margin: 8px auto; padding: 12px;
  font-size: 22px; font-weight: 900; letter-spacing: 6px; text-align: center; text-transform: uppercase;
  color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; outline: none;
}
.tCodeInput:focus { border-color: #7ecbff; }
.tradeGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 6px 0; max-height: 240px; overflow-y: auto; padding: 2px; }
.tradeGrid.ro { max-height: 150px; }
.tCard {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px 7px; border-radius: 11px; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.2));
  border: 1px solid var(--rc); position: relative;
}
.tradeGrid.ro .tCard { cursor: default; }
.tCard.sel { border-color: #35c163; box-shadow: 0 0 0 2px #35c163, 0 0 14px rgba(53,193,99,.4); }
.tCard.sel::after { content: '✓'; position: absolute; top: 3px; right: 5px; color: #35c163; font-weight: 900; font-size: 12px; }
.tSpare {
  position: absolute; top: 3px; left: 4px;
  padding: 1px 5px; border-radius: 7px;
  font-size: 9px; font-weight: 900; color: #06210f; background: #ffd166;
}
.trGift {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 100%; min-height: 66px; padding: 8px;
  color: #8f9ab0; font-size: 11px; font-weight: 700; font-style: italic;
  border: 1px dashed rgba(255,255,255,.16); border-radius: 10px;
}

/* ---- pending offers box (home + death screen) ---- */
.pendingBox { margin-top: 12px; text-align: left; }
.pendingBox.hidden { display: none; }
.pendHead { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; letter-spacing: .04em; color: #9fd0ff; margin-bottom: 7px; }
.pendHead.sub { margin-top: 12px; color: #9aa6bd; }
.pendHourglass { font-size: 12px; line-height: 1; }
.pendHead svg { opacity: .85; }
.pendN { margin-left: 2px; min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #06121f; background: #7ecbff; border-radius: 9px; }
.pendN.muted { background: rgba(255,255,255,.16); color: #cfd7e6; }
.pendRow.out {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: #b9c3d4;
}
.pendRow.out:hover { border-color: rgba(255,255,255,.28); }
.pendAct { color: #ffe08a; }
.pendMeta svg { vertical-align: -2px; opacity: .85; }
.trDecline { color: #ff9a9a !important; }

/* ---- marketplace ---- */
#marketWallet { margin-bottom: 10px; }
.mktWallet { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px;
  background: rgba(255,209,102,.1); border: 1px solid rgba(255,209,102,.28); font-size: 14px; font-weight: 800; color: #ffd166; }
.mktTabs { display: flex; gap: 6px; margin-bottom: 12px; }
.mktTab { flex: 1; padding: 9px 4px; font-size: 12.5px; font-weight: 800; cursor: pointer;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #9aa5ba; }
.mktTab { transition: background .12s ease, color .12s ease; }
.mktTab:hover { color: #cdd7e6; background: rgba(255,255,255,.08); }
.mktTab.sel { background: linear-gradient(180deg, rgba(126,203,255,.26), rgba(126,203,255,.08)); border-color: rgba(126,203,255,.5); color: #eaf6ff; }
.mktSort { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 11px; color: #8f9ab0; font-weight: 700; }
.mktSortBtn { padding: 4px 9px; font-size: 11px; font-weight: 800; cursor: pointer; border-radius: 7px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #9aa5ba; }
.mktSortBtn.sel { border-color: rgba(126,203,255,.45); color: #cfe8ff; }
.mktCount { margin-right: auto; color: #7a8499; font-weight: 800; }
.mktFilters { display: flex; gap: 6px; margin-bottom: 8px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.mktFilt { flex: 0 0 auto; padding: 5px 12px; font-size: 11.5px; font-weight: 800; cursor: pointer; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #9aa5ba; }
.mktFilt.sel { background: rgba(126,203,255,.16); border-color: rgba(126,203,255,.45); color: #dff0ff; }
/* --- Steam-style search + listing rows --- */
.mktSearch { display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  padding: 9px 12px; border-radius: 12px; background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.12); transition: border-color .14s, box-shadow .14s; }
.mktSearch:focus-within { border-color: rgba(126,203,255,.55); box-shadow: 0 0 0 3px rgba(126,203,255,.12); }
.mktSearch svg { opacity: .6; flex: 0 0 auto; }
.mktSearch input { flex: 1; min-width: 0; background: none; border: none; outline: none;
  font: inherit; font-size: 13.5px; font-weight: 700; color: #eaf1fb; }
.mktSearch input::placeholder { color: #7a8499; font-weight: 600; }
.mktSearchX { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: none; cursor: pointer;
  background: rgba(255,255,255,.08); color: #9aa5ba; font-size: 12px; line-height: 1; }
.mktSearchX:hover { background: rgba(255,90,90,.2); color: #ffb3b3; }
.mktRows { display: flex; flex-direction: column; gap: 6px; }
.mktRow { display: flex; align-items: center; gap: 11px; padding: 9px 11px 9px 10px; border-radius: 12px;
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 12%, transparent), rgba(255,255,255,.03) 42%, rgba(13,16,23,.55));
  border: 1px solid rgba(255,255,255,.08); border-left: 3px solid var(--rc);
  transition: transform .1s ease, box-shadow .12s ease, border-color .12s ease;
  animation: cardIn .2s ease-out backwards; }
.mktRow:hover { transform: translateX(2px); box-shadow: 0 6px 18px rgba(0,0,0,.4), -4px 0 14px color-mix(in srgb, var(--rc) 28%, transparent); }
.mktRowThumb { flex: 0 0 auto; width: 50px; height: 50px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 26%, transparent), rgba(0,0,0,.28) 72%);
  border: 1px solid color-mix(in srgb, var(--rc) 34%, transparent); }
.mktRowThumb svg, .mktRowThumb img, .mktRowThumb canvas { max-width: 40px; max-height: 40px; }
.mktRowMid { flex: 1 1 auto; min-width: 0; text-align: left; }
.mktRowName { font-size: 13.5px; font-weight: 900; line-height: 1.15;
  color: color-mix(in srgb, var(--rc) 55%, #eef3fb);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mktRowMeta { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 10.5px; font-weight: 800;
  color: #8792a6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mktRowRar { color: var(--rc); text-transform: uppercase; letter-spacing: .5px; flex: 0 0 auto; }
.mktRowKind { flex: 0 0 auto; }
.mktRowDot { opacity: .5; flex: 0 0 auto; }
.mktRowSeller { display: flex; align-items: center; gap: 4px; margin-top: 2px;
  font-size: 10px; font-weight: 800; color: #aeb8ca;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mktRowSeller svg { flex: 0 0 auto; vertical-align: -2px; }
.mktRowRight { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.mktRowPrice { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 900; color: #ffd166; }
.mktRowPrice svg { vertical-align: -2px; }
.mktRowExp { font-size: 9.5px; font-weight: 700; color: #7a8499; letter-spacing: .2px; }
.mktRowExp.soon { color: #ff8a5c; }
.mktRowBtn { margin-top: 2px; padding: 6px 16px; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer;
  border-radius: 8px; border: none; transition: filter .12s ease, transform .08s ease; }
.mktRowBtn.buy { background: linear-gradient(180deg, #46d778, #23a552); color: #06210f; box-shadow: 0 2px 0 #14713366; }
.mktRowBtn.buy:hover { filter: brightness(1.08); }
.mktRowBtn.buy:active { transform: translateY(1px); box-shadow: 0 1px 0 #14713366; }
.mktRowBtn.buy.broke { background: rgba(255,255,255,.08); color: #7f8ba1; cursor: not-allowed; box-shadow: none; }
.mktRowBtn.del { background: rgba(255,90,90,.14); color: #ff9a9a; border: 1px solid rgba(255,90,90,.3); }
.mktRowBtn.del:hover { background: rgba(255,90,90,.24); }
.mktGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.mktRar { font-size: 7.5px; font-weight: 900; letter-spacing: .8px; color: var(--rc); margin-top: 2px; opacity: .95; }
.mktCard { position: relative; padding: 10px 6px 8px; border-radius: 13px; text-align: center; overflow: hidden;
  background:
    radial-gradient(125% 78% at 50% 0%, color-mix(in srgb, var(--rc) 24%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(13,16,23,.92));
  border: 1px solid color-mix(in srgb, var(--rc) 42%, transparent);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  transition: transform .12s ease, box-shadow .12s ease;
  animation: cardIn .22s ease-out backwards; }
.mktCard:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(0,0,0,.5), 0 0 16px color-mix(in srgb, var(--rc) 30%, transparent); }
.mktCard .rarStripe { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--rc); box-shadow: 0 0 9px var(--rc); }
.mktCard.pick { cursor: pointer; }
.mktCard.pick.sel { outline: 2px solid #7ecbff; outline-offset: -1px; }
.mktPrev { height: 40px; display: flex; align-items: center; justify-content: center; margin-top: 4px; }
.mktName { font-size: 10px; font-weight: 800; color: #eaf1fb; line-height: 1.15; margin-top: 3px; min-height: 24px; display: flex; align-items: center; justify-content: center; }
.mktSeller {
  font-size: 9px; font-weight: 800; color: #c3cde0; margin: 3px auto 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 2px 8px 2px 4px; border-radius: 20px; max-width: 100%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mktSeller.yours { background: rgba(126,203,255,.1); border-color: rgba(126,203,255,.35); padding: 2px 8px; }
.mktAv { display: inline-flex; align-items: flex-end; height: 15px; }
.mktAv svg { vertical-align: bottom; }
.mktSeller.yours { color: #7ecbff; font-style: italic; }
.mktDupe { font-size: 9px; color: #8f9ab0; margin-top: 2px; }
.mktExpiry { font-size: 9px; font-weight: 700; color: #8a94a8; margin-top: 3px; letter-spacing: .3px; }
.mktExpiry.soon { color: #ff8a5c; }
.mktPrice { display: inline-flex; align-items: center; justify-content: center; gap: 4px; margin: 6px auto 7px; padding: 3px 10px;
  font-size: 13px; font-weight: 900; color: #ffd166; border-radius: 20px;
  background: rgba(255,209,102,.1); border: 1px solid rgba(255,209,102,.25); }
.mktBtn { width: 100%; padding: 7px 4px; font-size: 11px; font-weight: 800; cursor: pointer; border-radius: 9px; border: none; transition: filter .12s ease, transform .1s ease; }
.mktBtn.buy { background: linear-gradient(180deg, #46d778, #23a552); color: #06210f; box-shadow: 0 3px 0 #14713366; }
.mktBtn.buy:hover { filter: brightness(1.08); }
.mktBtn.buy:active { transform: translateY(2px); box-shadow: 0 1px 0 #14713366; }
.mktBtn.buy.broke { background: rgba(255,255,255,.08); color: #7f8ba1; cursor: not-allowed; }
.mktBtn.del { background: rgba(255,90,90,.14); color: #ff9a9a; border: 1px solid rgba(255,90,90,.3); }
.mktBtn.del:hover { background: rgba(255,90,90,.24); }
.mktSellBar { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding: 10px 12px; border-radius: 12px;
  background: rgba(255,209,102,.07); border: 1px solid rgba(255,209,102,.25); }
.mktSellLbl { font-size: 13px; font-weight: 700; color: #dcc98a; }
.mktSellBar input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 15px; font-weight: 800; text-align: right;
  color: #ffd166; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; outline: none; -moz-appearance: textfield; }
.mktSellBar input::-webkit-outer-spin-button, .mktSellBar input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mktSellBar input:focus { border-color: #ffd166; }
.mktList { padding: 9px 16px; font-size: 13px; }
.mktPickHint { text-align: center; margin-top: 14px; }
/* sell price popup */
.sellPreview { display: flex; justify-content: center; margin: 6px 0 12px; }
.sellCard { width: 116px; }
/* market price guide in the sell modal */
.sellGuide { max-width: 260px; margin: 0 auto 14px; text-align: center; }
.sellGuide:empty { display: none; }
.sgAvg { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #e8edf6; }
.sgAvg b { color: #ffd166; font-size: 15px; }
.sgAvg svg { color: #ffd166; vertical-align: -2px; }
.sgUse { margin-left: 4px; padding: 3px 10px; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  color: #0c1a10; background: #35c163; border: 0; border-radius: 999px; cursor: pointer; text-transform: uppercase; }
.sgUse:active { transform: scale(.94); }
.sgRange { margin-top: 4px; font-size: 11.5px; color: #8a94a8; }
.sellPriceRow { display: flex; align-items: center; gap: 8px; margin: 0 auto 16px; max-width: 240px;
  padding: 9px 12px; border-radius: 12px; background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.28); }
.sellPriceRow .mktSellLbl { font-size: 13px; font-weight: 700; color: #dcc98a; }
.sellPriceRow input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 16px; font-weight: 800; text-align: right;
  color: #ffd166; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; outline: none; -moz-appearance: textfield; }
.sellPriceRow input::-webkit-outer-spin-button, .sellPriceRow input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sellPriceRow input:focus { border-color: #ffd166; }
#sellCancelBtn { margin-top: 8px; }
.mktLoading {
  position: absolute; inset: 0; z-index: 5; border-radius: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(10,12,18,.82);
  font-size: 14px; font-weight: 700; color: #dfe6f2;
}
.mktLoading.hidden { display: none; }
.mktLoading .acctSpin { width: 34px; height: 34px; border-width: 4px; }

/* ---- Dungeon Play ---- */
.modeLabel { margin-top: 14px; }
.dungeonBtn {
  width: 100%; padding: 11px 0; margin: 0 0 6px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; line-height: 1.12;
  background: linear-gradient(135deg, #3a1550, #5a1f2e); color: #ffdff0;
  border: 1px solid rgba(180,138,255,.5); box-shadow: 0 0 18px rgba(150,60,200,.35);
}
.dungeonBtn:hover { filter: brightness(1.1); }
.dunTitle { font-size: 17px; font-weight: 900; letter-spacing: 1px; }
.dunPrice { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 900; letter-spacing: .5px; color: #ffe08a;
  background: rgba(0,0,0,.32); border: 1px solid rgba(255,209,102,.45); border-radius: 20px; padding: 2px 10px 2px 8px; }
.coinIco { display: inline-flex; align-items: center; }
.coinIco svg { vertical-align: -2px; }
#dungeonBtn2 { margin-top: 18px; }
.dunCost { font-size: 10.5px; font-weight: 700; opacity: .82; letter-spacing: .01em; text-transform: none; }
.confirmPanel { max-width: 340px; text-align: center; }
.confH { color: #d7a6ff; margin-bottom: 10px; }
.confBody { font-size: 13.5px; color: #cdd6e6; line-height: 1.5; margin-bottom: 12px; }
.confCost { font-size: 15px; font-weight: 800; color: #ffe08a; margin-bottom: 6px; }
.confWallet { font-size: 12px; color: #9aa6bd; margin-bottom: 16px; }
.confWallet b { color: #ffd166; }
#dunConfirmNo { margin-top: 6px; }
.dunChip { color: #d7a6ff; font-weight: 900; }
.gemLine { margin-top: 8px; font-size: 12.5px; font-weight: 700; color: #c9a8ff; }
.gemLine b { color: #ffd166; }
.pendRow {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  margin-bottom: 6px; padding: 10px 12px; cursor: pointer; text-align: left;
  border: 1px solid rgba(126,203,255,.3); border-radius: 12px;
  background: linear-gradient(135deg, rgba(126,203,255,.13), rgba(126,203,255,.05));
  color: #dfe6f2; font: inherit; transition: border-color .12s, transform .08s;
}
.pendRow:hover { border-color: rgba(126,203,255,.6); }
.pendRow:active { transform: scale(.99); }
.pendWho { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 5px; }
.pendWho b { color: #fff; }
.pendMeta { font-size: 11px; font-weight: 800; color: #9fb2cc; white-space: nowrap; }

/* ---- offer target banner + friends view ---- */
.trTarget { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 8px 12px;
  font-size: 12.5px; font-weight: 700; color: #cfe8ff; border-radius: 10px;
  background: rgba(126,203,255,.12); border: 1px solid rgba(126,203,255,.3); }
.trTarget b { color: #fff; }
.frWrap { text-align: left; }
.frSearch { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-radius: 13px;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.16); margin-bottom: 12px;
  transition: border-color .15s, background .15s, box-shadow .15s; }
.frSearch:focus-within { border-color: rgba(126,203,255,.55); background: rgba(0,0,0,.42); box-shadow: 0 0 0 3px rgba(126,203,255,.1); }
.frSearch svg { opacity: .55; flex: 0 0 auto; }
.frSearch input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: #eaf1fb; font-size: 14px; font-weight: 600; padding: 2px 0; }
.frSearch input::placeholder { color: #7a8499; font-weight: 500; }
.frResults { margin-bottom: 12px; }
.frLabel { font-size: 11px; font-weight: 900; letter-spacing: .06em; color: #8fa0ba; margin: 4px 0 7px; }
.frMuted { font-size: 12px; color: #7f8ba1; padding: 8px 2px; font-style: italic; }
.frRow { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 13px; margin-bottom: 7px; border-radius: 12px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.09); }
.frRow .lbAvatar { flex: 0 0 auto; width: 30px; height: 34px; }
.frRow .lbAvatar img { width: 26px; }
.frName { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #eaf1fb;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frName svg { opacity: .7; }
.frBtns { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.frAdd, .frOffer, .frDel { font: inherit; font-weight: 800; cursor: pointer; border-radius: 8px; border: 1px solid transparent; }
.frAdd { padding: 6px 12px; font-size: 12px; color: #06210f; background: #35c163; }
.frAdd:hover { filter: brightness(1.08); }
.frAdd.sent { background: rgba(255,255,255,.09); color: #8fa0b6; cursor: default; border-color: rgba(255,255,255,.12); }
.frAdd.sent:hover { filter: none; }
.frOffer { padding: 6px 11px; font-size: 12px; color: #06121f; background: #7ecbff; display: flex; align-items: center; gap: 4px; }
.frOffer:hover { filter: brightness(1.08); }
.frDel { padding: 6px 9px; font-size: 12px; color: #ff8f8f; background: rgba(255,90,90,.12); border-color: rgba(255,90,90,.28); }
.frDel:hover { background: rgba(255,90,90,.22); }
.trGift svg { opacity: .55; }
.trCoinRow {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 9px 12px; border-radius: 12px;
  background: rgba(255,209,102,.07); border: 1px solid rgba(255,209,102,.25);
}
.trCoinLbl { font-size: 12px; font-weight: 700; color: #dcc98a; }
.trCoinRow input {
  flex: 1; min-width: 0; width: 70px; padding: 7px 9px;
  font-size: 14px; font-weight: 800; text-align: right;
  color: #ffd166; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; outline: none;
  -moz-appearance: textfield;
}
.trCoinRow input::-webkit-outer-spin-button, .trCoinRow input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.trCoinRow input:focus { border-color: #ffd166; }
.trCoinMax { font-size: 11px; font-weight: 700; color: #8f9ab0; }
.tQty {
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  padding: 1px 7px; border-radius: 7px; white-space: nowrap; z-index: 2;
  font-size: 9px; font-weight: 900; color: #06210f; background: #35c163;
  box-shadow: 0 0 8px rgba(53,193,99,.6);
}
.tPrev { height: 38px; display: flex; align-items: center; justify-content: center; }
.tName { font-size: 9.5px; font-weight: 800; color: #dfe6f2; text-align: center; line-height: 1.15; }
.trCols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }

/* deal summary (review / waiting / done) */
.trPartner {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: #b9c3d6; font-weight: 600; margin: 2px 0 12px;
}
.trPartner b { color: #fff; }
.trAvatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #4f9bff, #2f6fe6);
}
.trDeal { margin: 4px 0 10px; }
.trSide { border-radius: 15px; padding: 11px 11px 13px; border: 1px solid; }
.trSide.give {
  background: linear-gradient(180deg, rgba(255,110,80,.1), rgba(0,0,0,.2));
  border-color: rgba(255,130,100,.32);
}
.trSide.get {
  background: linear-gradient(180deg, rgba(53,193,99,.12), rgba(0,0,0,.2));
  border-color: rgba(53,193,99,.38);
}
.trSideHead {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px; font-weight: 900; letter-spacing: 2.2px; margin-bottom: 9px;
}
.trSide.give .trSideHead { color: #ffab97; }
.trSide.get .trSideHead { color: #8fffa9; }
.trCount { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; color: #8f9ab0; }
.trItems { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.trItems .tCard { width: 84px; flex: 0 0 auto; cursor: default; }
.trMid { display: flex; align-items: center; gap: 10px; height: 36px; margin: -2px 0; position: relative; z-index: 2; }
.trMid::before, .trMid::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent); }
.trSwapDot {
  width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: #1b2130; border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 4px 14px rgba(0,0,0,.5);
}
.trSide.get > .trSideHead + .trItems { margin-bottom: 2px; }
.trMsg .trSide { text-align: left; margin: 10px 0; }
.trGo { margin-top: 10px; }
.trBack { margin-top: 8px; }
.trDone { width: 52px; height: 52px; margin: 4px auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #35c163; box-shadow: 0 0 26px rgba(53,193,99,.65); }
.trDoneTxt { font-size: 19px; font-weight: 900; letter-spacing: 1px; color: #8fffa9; }

/* trade-up / salvage buttons */
/* ---------- drop-rate odds + token case buy ---------- */
.oddsBtn { float: right; margin-top: -2px; padding: 4px 10px; font-size: 10.5px; font-weight: 800; cursor: pointer;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #cdd6e6; }
.oddsBtn:hover { background: rgba(255,255,255,.1); color: #fff; }
.oddsBtn svg { vertical-align: -2px; color: #ffd166; }
.oddsTable { width: 100%; border-collapse: collapse; margin: 6px 0 4px; }
.oddsTable td { padding: 8px 6px; font-size: 13.5px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.07); }
.oddsDot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 9px; vertical-align: -1px; }
.oddsPct { text-align: right; font-weight: 900; font-variant-numeric: tabular-nums; }
.oddsHint { font-size: 11.5px; color: #9aa5ba; margin: 10px 2px; line-height: 1.5; }
.oddsHint b { color: #eef3fb; }
.oddsPool { display: flex; flex-direction: column; gap: 8px; }
.oddsPoolRar { font-size: 11px; font-weight: 800; letter-spacing: .5px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.oddsPoolRar > b { margin-right: 4px; }
.oddsChip { display: inline-block; padding: 2px 8px; border-radius: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: 0; color: #d6deec; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
/* tap-a-case-for-drop-rates affordance */
.caseArt[data-odds] { cursor: pointer; }
.caseArt[data-odds]:hover { filter: drop-shadow(0 5px 10px rgba(0,0,0,.5)) brightness(1.12); }
.caseRates { margin-top: 5px; font-size: 10px; font-weight: 800; letter-spacing: .4px; color: color-mix(in srgb, var(--cc) 65%, #cbd4e4); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; opacity: .82; }
.caseRates:hover { opacity: 1; text-decoration: underline; }
.caseRates svg { color: #ffd166; }
.heroBtn.buyTok { background: linear-gradient(180deg, #2fd4c4, #159e90); border: 1px solid rgba(150,255,240,.4); color: #06231f; }
.heroBtn.buyTok svg { vertical-align: -2px; }
.heroBtn.buyTok:disabled { opacity: .45; }
/* ---------- token packs (premium currency) ---------- */
.tokPacks { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 4px; }
.tokPack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 15px 8px 12px;
  border-radius: 13px; cursor: pointer; color: #eef3fb;
  background: linear-gradient(180deg, rgba(47,212,196,.14), rgba(0,0,0,.14)); border: 1px solid rgba(47,212,196,.36); }
.tokPack:hover { border-color: rgba(47,212,196,.6); background: linear-gradient(180deg, rgba(47,212,196,.2), rgba(0,0,0,.12)); }
.tokPack:disabled { opacity: .5; cursor: default; }
.tokPack .tokAmt { font-size: 16px; font-weight: 900; display: inline-flex; align-items: center; gap: 6px; }
.tokPack .tokAmt svg { vertical-align: -3px; }
.tokPack .tokPrice { font-size: 13px; font-weight: 800; color: #4fe0d1; background: rgba(0,0,0,.3); padding: 3px 12px; border-radius: 999px; }
.tokTag { position: absolute; top: -8px; right: 8px; font-size: 8.5px; font-weight: 900; letter-spacing: .06em; color: #06231f;
  background: #2fd4c4; padding: 2px 7px; border-radius: 6px; }
.tradeUp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tuBtn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--rc); color: #fff;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 18%, transparent), rgba(0,0,0,.25));
}
.tuBtn:disabled { opacity: .4; cursor: default; filter: grayscale(.4); }
.tuRar { font-size: 10px; font-weight: 900; letter-spacing: 1px; color: var(--rc); }
.tuCost { font-size: 14px; font-weight: 900; display: flex; align-items: center; gap: 4px; }
.tuCost svg { vertical-align: -2px; }
.tuAvail { font-size: 9.5px; font-weight: 700; color: #9aa5ba; }

/* ---------- shop (premium) ---------- */
#walletLine { margin-bottom: 12px; }
.walletBar { display: flex; gap: 8px; justify-content: center; }
.walletChip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  font-weight: 800; font-size: 14px; color: #dfe6f2;
}
.walletChip b { color: #ffd166; }
.walletChip svg { vertical-align: -2px; }
.tokenChip { border-color: rgba(47,212,196,.4); background: linear-gradient(180deg, rgba(47,212,196,.12), rgba(255,255,255,.03)); }
.tokenChip b { color: #4fe0d1; }

.shopSec {
  font-size: 10px; font-weight: 800; letter-spacing: 2.5px; color: #7f8aa3;
  text-align: left; margin: 16px 2px 8px;
}
.shopSec small { letter-spacing: 0; font-weight: 600; color: #6b7793; }

/* CS-style case cards */
.caseCard {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; margin-bottom: 9px;
  border-radius: 15px;
  background:
    radial-gradient(130% 110% at 12% 0%, color-mix(in srgb, var(--cc) 20%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.24));
  border: 1px solid color-mix(in srgb, var(--cc) 42%, transparent);
}
.caseCard::after {
  content: ''; position: absolute; top: 0; left: -45%; width: 34%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.10), transparent);
  transform: skewX(-20deg); animation: heroShine 5s ease-in-out infinite;
}
.caseArt { position: relative; flex: 0 0 auto; filter: drop-shadow(0 5px 10px rgba(0,0,0,.5)); }
.caseCount {
  position: absolute; top: -4px; right: -6px;
  padding: 2px 7px; border-radius: 9px;
  font-size: 11px; font-weight: 900; color: #06210f;
  background: var(--cc); box-shadow: 0 0 10px color-mix(in srgb, var(--cc) 60%, transparent);
}
.caseInfo { flex: 1; text-align: left; min-width: 0; }
.caseName { font-size: 15px; font-weight: 900; letter-spacing: 1px; color: #fff; }
.caseDesc { font-size: 10.5px; color: #9aa5ba; font-weight: 600; margin-top: 2px; }
.caseBtns { display: flex; flex-direction: column; gap: 6px; z-index: 1; flex: 0 0 auto; }

/* loot crate hero banner */
.crateHero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px; margin-bottom: 4px;
  border-radius: 16px;
  background: linear-gradient(135deg, #3b2a60, #4d2e42 55%, #5e3a28);
  border: 1px solid rgba(255,209,102,.32);
  box-shadow: 0 10px 26px rgba(0,0,0,.4), inset 0 0 44px rgba(255,184,77,.12);
}
.crateHero::after {
  content: ''; position: absolute; top: 0; left: -45%; width: 38%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.16), transparent);
  transform: skewX(-20deg); animation: heroShine 4.2s ease-in-out infinite;
}
@keyframes heroShine { 0%,58% { left: -45%; } 100% { left: 135%; } }
.crateHeroIcon { filter: drop-shadow(0 5px 12px rgba(0,0,0,.55)); animation: crateBob 2.6s ease-in-out infinite; }
@keyframes crateBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.crateHeroInfo { flex: 1; text-align: left; }
.crateHeroTitle { font-size: 18px; font-weight: 900; letter-spacing: 1px; color: #fff; }
.crateHeroSub { font-size: 11px; color: #d8c8b4; margin-top: 3px; }
.crateHeroBtns { display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.heroBtn {
  font-size: 12px; font-weight: 800; letter-spacing: .5px;
  padding: 9px 14px; border: none; border-radius: 10px; cursor: pointer; white-space: nowrap;
}
.heroBtn.ghost { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16); color: #aab3c4; }
/* COPPA age gate modal */
.panel.ageGate { max-width: 360px; text-align: center; }
.ageMsg { font-size: 13px; line-height: 1.55; color: #c4cdda; margin: 12px 4px 18px; }
.ageMsg b { color: #fff; }
.ageBtns { display: flex; flex-direction: column; gap: 9px; }
.ageBtns .heroBtn { padding: 12px; }
.heroBtn svg { vertical-align: -2px; }
.heroBtn.open {
  color: #241a08; background: linear-gradient(180deg, #ffd76a, #f5a623);
  box-shadow: 0 4px 12px rgba(245,166,35,.5);
  animation: cratePulse 1.6s ease-in-out infinite;
}
.heroBtn.buy { color: #fff; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.22); }
.heroBtn.noBuy { display: flex; align-items: center; justify-content: center; font-size: 10.5px; letter-spacing: .3px;
  color: #d7a6ff; background: rgba(197,139,255,.12); border: 1px solid rgba(197,139,255,.4); cursor: default; box-shadow: none; animation: none; }
.caseCard.dunCase { border-color: rgba(197,139,255,.6); box-shadow: 0 0 22px rgba(150,60,200,.3); }
.heroBtn:disabled { opacity: .45; animation: none; box-shadow: none; cursor: default; }

/* item card grid */
.shopGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.itemCard {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 13px 8px 10px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(0,0,0,.22));
  border: 1px solid rgba(255,255,255,.09);
}
/* rarity aura (inventory cards set --rc; shop cards without it stay plain) */
.itemCard::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(85% 55% at 50% 0%, var(--rc), transparent 72%);
  opacity: .13;
}
.rarStripe { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--rc); z-index: 1; }
.itemCard.rar-rare  { border-color: rgba(122,182,255,.38); }
.itemCard.rar-epic  { border-color: rgba(197,139,255,.45); }
.itemCard.rar-uncommon { border-color: rgba(53,193,99,.32); }
.itemCard.rar-gold  { border-color: rgba(255,207,77,.6); box-shadow: inset 0 0 22px rgba(255,207,77,.09), 0 0 14px rgba(255,207,77,.15); }
.eqBadge {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #35c163; box-shadow: 0 0 8px rgba(53,193,99,.6);
}
.dupeBadge {
  position: absolute; top: 6px; left: 6px; z-index: 2;
  padding: 2px 6px; border-radius: 8px;
  font-size: 10px; font-weight: 900; color: #06210f;
  background: #ffd166; box-shadow: 0 0 8px rgba(255,209,102,.5);
}
.meltBtn {
  width: 100%; margin-top: 5px; padding: 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
  font-size: 10px; font-weight: 800; color: #cdd6e6; background: rgba(255,255,255,.06); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  position: relative; z-index: 1;
}
.meltBtn:hover { background: rgba(255,209,102,.16); border-color: rgba(255,209,102,.4); color: #ffd166; }
.itemCard.armed { border-color: rgba(53,193,99,.5); box-shadow: inset 0 0 18px rgba(53,193,99,.1); }
.itemCard.equipped { border-color: rgba(126,203,255,.65); box-shadow: 0 0 18px rgba(126,203,255,.25); }
.itemIcon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
}
.skinPreview {
  width: 58px; height: 60px; border-radius: 12px;
  display: flex; align-items: flex-end; justify-content: center;
  background: radial-gradient(120% 90% at 50% 15%, rgba(255,255,255,.1), rgba(0,0,0,.2));
}
.itemName {
  font-size: 12px; font-weight: 800; color: #e8edf6; text-align: center; line-height: 1.2;
  min-height: 29px; display: flex; align-items: center;
}
.cardBtn {
  width: 100%; font-size: 12px; font-weight: 800;
  padding: 8px; border: none; border-radius: 9px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, #35c163, #1e9948);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.cardBtn:disabled { opacity: .4; cursor: default; }
.cardBtn.armed, .cardBtn.equipped { background: rgba(53,193,99,.16); color: #8fffa9; cursor: default; }
.cardBtn.own { background: rgba(255,255,255,.1); }
.cardBtn svg { vertical-align: -2px; }

#nameInput {
  width: 170px;
  margin: 6px 0 2px;
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  outline: none;
}
#nameInput:focus { border-color: #35c163; }
.nameEntry { margin-bottom: 8px; }
.coopBoardNote { margin-bottom: 10px; padding: 9px 12px; border-radius: 11px; font-size: 12px; color: #ffc7e6;
  background: linear-gradient(180deg, rgba(197,80,180,.16), rgba(0,0,0,.15)); border: 1px solid rgba(197,80,180,.4); }
.coopBoardNote b { color: #fff; }
.nameEntry label { display: block; font-size: 9px; font-weight: 800; letter-spacing: 2px; color: #7f8aa3; margin-bottom: 4px; }
.lbPlace { font-size: 12px; font-weight: 800; color: #ffd166; margin: 4px 0 6px; }
.nameRow { margin-bottom: 14px; }
#menuName {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px; font-weight: 800; letter-spacing: 1px;
  text-align: center;
  color: #fff;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 11px;
  outline: none;
}
#menuName::placeholder { color: #6b7793; font-weight: 700; letter-spacing: 1px; }
#menuName:focus { border-color: #35c163; background: rgba(53,193,99,.08); }

/* account / sign-in */
.acctBox:empty { display: none; }
.acctBox { margin-bottom: 14px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.gsiBtn { display: flex; justify-content: center; min-height: 40px; }
.acctHint { font-size: 11px; color: #8a95ab; font-weight: 600; }
.acctChip {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border-radius: 11px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
}
.acctChip img, .acctChip .acctAv {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(180deg, #4f9bff, #2f6fe6);
}
.acctName { flex: 1; text-align: left; font-weight: 800; font-size: 13px; color: #eef3fb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acctNameEdit {
  flex: 1; min-width: 0; padding: 7px 9px; border-radius: 8px;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14);
  color: #fff; font-weight: 800; font-size: 13px; outline: none;
}
.acctNameEdit:focus { border-color: #35c163; background: rgba(53,193,99,.1); }
.acctNameEdit::placeholder { color: #78839b; font-weight: 700; }
.acctOut {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: #b9c2d4; cursor: pointer;
  padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05);
}
.acctOut:hover { background: rgba(255,255,255,.12); color: #fff; }
.acctDelete {
  display: block; margin: 8px auto 0; font-size: 11px; font-weight: 700; color: #ff8a8a; cursor: pointer;
  padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255,90,90,.32); background: rgba(255,90,90,.08);
}
.acctDelete:hover { background: rgba(255,90,90,.18); color: #ffb0b0; }
.heroBtn.danger { background: linear-gradient(180deg, #ff5a5a, #d43a3a); border: 1px solid rgba(255,140,140,.5); color: #fff; }
.acctBusy {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px; border-radius: 11px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  font-size: 13px; font-weight: 700; color: #cdd5e4;
}
.acctSpin {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.22); border-top-color: #7ecbff;
  animation: acctSpin .7s linear infinite;
}
@keyframes acctSpin { to { transform: rotate(360deg); } }

/* cookie consent banner */
.cookieBar {
  position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%);
  width: min(92%, 460px); z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(16,20,28,.97); border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.cookieBar.hidden { display: none; }
.cookieText { flex: 1 1 220px; font-size: 12px; line-height: 1.45; color: #c3ccdb; }
.cookieText a { color: #7ecbff; }
.cookieBtns { display: flex; gap: 8px; flex: 0 0 auto; }
.cookieBtn { font-size: 13px; font-weight: 800; padding: 9px 16px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.cookieBtn.decline { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #cdd5e4; }
.cookieBtn.decline:hover { background: rgba(255,255,255,.12); }
.cookieBtn.accept { background: linear-gradient(180deg, #3ad06e, #23a253); color: #06210f; }
.cookieBtn.accept:hover { filter: brightness(1.08); }

#overStats { margin: 2px 0 12px; color: #dfe6f2; }
.bigDist { font-size: 44px; font-weight: 900; color: #fff; line-height: 1; margin: 2px 0 12px; }
.bigDist span { font-size: 20px; color: #7a8499; font-weight: 800; margin-left: 2px; }
.chipRow { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 11px; font-weight: 800; color: #dfe6f2;
  white-space: nowrap;
}
.statGrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 12px; }
.statCard {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 9px 2px 7px;
}
.statCard svg { display: block; margin: 0 auto 4px; }
.statCard .v { font-size: 17px; font-weight: 900; color: #fff; line-height: 1.1; }
.statCard .l { font-size: 8.5px; font-weight: 800; letter-spacing: 1px; color: #7a8499; margin-top: 2px; }
.bestLine { font-size: 12px; color: #aab4c8; }
#overStats .newbest {
  display: inline-block;
  margin-bottom: 4px;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb300, #ff6a00);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  animation: pulse 1s infinite alternate;
}
#overLb { margin: 14px 0 4px; }
.bigBtn.fullW { width: 100%; }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
#overStats .newbest.lvlUp { background: linear-gradient(90deg, #7ea9ff, #b06bff); }
.xpLine { color: #9fb0ff; margin-top: 2px; }

/* ---------- player level bar (menu) ---------- */
.levelBar { margin: 0 0 14px; }
.lvHead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.lvNum { font-size: 13px; font-weight: 800; letter-spacing: .5px; color: #dfe6f5; display: inline-flex; align-items: center; gap: 5px; }
.lvNum svg { color: #ffd166; }
.lvXp { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; color: #7a8499; }
.lvTrack { height: 9px; border-radius: 999px; background: rgba(255,255,255,.07); box-shadow: inset 0 1px 2px rgba(0,0,0,.4); overflow: hidden; }
.lvFill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #4d8bff, #9b6bff);
  box-shadow: 0 0 10px rgba(120,150,255,.55);
  transition: width .5s cubic-bezier(.4,1.3,.5,1);
}
.lvFill.lvMax { background: linear-gradient(90deg, #ffb300, #ff6a00); box-shadow: 0 0 12px rgba(255,150,60,.6); }

/* armed rare power-ups (menu + death screen) */
.armedBar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; }
.armedBar.hidden { display: none; }
.apLbl { font-size: 10px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: #e0b64a; display: inline-flex; align-items: center; gap: 4px; }
.apLbl svg { color: #ffd54a; }
.apChip { font-size: 11px; font-weight: 800; color: #ffe6a6; display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; background: rgba(255,203,74,.12); border: 1px solid rgba(255,203,74,.4); }
.apChip svg { color: #ffd54a; }
.puPrev svg { color: var(--rc); }
.puHint { font-size: 10.5px; color: #b9a55c; margin: 0 0 10px; display: flex; align-items: center; justify-content: center; gap: 5px; text-align: center; }
.puHint svg { color: #ffd54a; }

/* ---------- mobile ---------- */
button, .skinDot, .diffBtn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
@media (max-width: 430px), (max-height: 780px) {
  .panel { padding: 16px 14px; max-width: 94vw; }
  .panel h1 { font-size: 25px; margin-bottom: 5px; }
  .panel .tag { font-size: 12.5px; margin-bottom: 8px; }
  .tips { font-size: 11px; line-height: 1.55; margin-bottom: 10px; }
  .bigBtn { padding: 12px 24px; font-size: 17px; }
  .bigDist { font-size: 34px; margin-bottom: 8px; }
  .statCard .v { font-size: 15px; }
  .hint { margin-top: 8px; }
  #skinRow { margin-bottom: 10px; }
  #diffRow { margin-bottom: 10px; }
  .btnRow { margin-top: 8px; }
}

/* ============================ START SCREEN ============================ */
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

#menuOverlay .panel {
  padding-top: 20px;
  background:
    radial-gradient(130% 85% at 50% 0%, rgba(47,123,255,.16), rgba(47,123,255,0) 58%),
    linear-gradient(180deg, #1a2033, #14161f);
  border: 1px solid rgba(120,170,255,.2);
  box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
}

.logo {
  margin: 0 0 6px;
  animation: logoFloat 3.6s ease-in-out infinite;
}
.logo svg {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.55));
}
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

#menuOverlay .tag { color: #b6c1d8; font-size: 13px; font-weight: 600; margin: 0 0 16px; }
#menuOverlay .tag b { color: #7ecbff; }

/* section labels with flanking rules */
.skinLabel {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: 2.5px; color: #7f8aa3;
  margin: 4px 0 10px;
}
.skinLabel::before, .skinLabel::after {
  content: ''; height: 1px; flex: 1; max-width: 66px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18));
}
.skinLabel::after { background: linear-gradient(90deg, rgba(255,255,255,.18), transparent); }

/* buttons get a sheen container */
.bigBtn { position: relative; overflow: hidden; }

/* the star of the show */
.playBtn {
  width: 100%;
  margin: 14px 0 6px;
  font-size: 22px;
  letter-spacing: 2px;
  padding: 16px 0;
  box-shadow: 0 6px 0 rgba(20,113,51,.5), 0 12px 30px rgba(53,193,99,.45);
  animation: playPulse 1.9s ease-in-out infinite;
}
.playBtn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(20,113,51,.5), 0 6px 16px rgba(53,193,99,.4); }
@keyframes playPulse {
  0%,100% { box-shadow: 0 6px 0 rgba(20,113,51,.5), 0 12px 26px rgba(53,193,99,.4); }
  50%     { box-shadow: 0 6px 0 rgba(20,113,51,.5), 0 14px 42px rgba(53,193,99,.72); }
}
.playBtn::after {
  content: ''; position: absolute; top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-20deg);
  animation: playShine 3.4s ease-in-out infinite;
}
@keyframes playShine { 0%,55% { left: -60%; } 100% { left: 135%; } }

/* collapsible how-to-play */
.howto { margin: 12px 0 4px; text-align: left; }
.howto > summary {
  list-style: none; cursor: pointer;
  font-size: 12px; font-weight: 800; letter-spacing: 1px; color: #9aa5ba;
  text-align: center; padding: 8px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
}
.howto > summary:hover { background: rgba(255,255,255,.1); }
.howto > summary::-webkit-details-marker { display: none; }
.howto > summary::after { content: ' ▾'; color: #6b7793; }
.howto[open] > summary::after { content: ' ▴'; }
.howto[open] > summary { margin-bottom: 8px; }
.howto .tips {
  margin: 0; padding: 11px 14px;
  background: rgba(0,0,0,.22); border-radius: 10px;
  border: 1px solid rgba(255,255,255,.05);
}

@media (max-width: 430px), (max-height: 780px) {
  .logo svg { max-width: 260px; }
  #menuOverlay .panel { padding-top: 14px; }
  .playBtn { font-size: 20px; padding: 14px 0; margin: 10px 0 4px; }
}

/* ============================ PAUSE MENU ============================ */
#pauseOverlay .panel {
  background:
    radial-gradient(130% 82% at 50% 0%, rgba(47,123,255,.14), rgba(47,123,255,0) 58%),
    linear-gradient(180deg, #1a2033, #14161f);
  border: 1px solid rgba(120,170,255,.2);
  box-shadow: 0 24px 70px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
}
.pauseTitle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 24px; letter-spacing: 4px; color: #eaf1ff; margin-bottom: 14px;
  text-shadow: 0 0 18px rgba(126,203,255,.35);
}
/* live run summary chips */
.pauseStats { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 15px; }
.psChip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.1);
  font-size: 12.5px; font-weight: 800; color: #e6edf8; font-variant-numeric: tabular-nums;
}
.psChip svg { vertical-align: -2px; }
.psChip small { font-size: 9px; font-weight: 700; color: #9aa5ba; margin-left: 1px; }
#pauseOverlay #resumeBtn { margin-bottom: 2px; }
.lbl-note {
  font-style: normal; font-weight: 600; letter-spacing: 0;
  color: #6b7793; text-transform: none; font-size: 10px;
}

/* difficulty as a tidy 2x2 grid */
.diffGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 2px 0 6px;
}
.diffGrid .diffBtn { padding: 10px 4px; font-size: 11px; }
.diffGrid .diffBtn small { font-size: 9px; margin-top: 1px; }

/* action buttons */
.pauseActions { display: flex; gap: 8px; margin-top: 14px; }
.pauseActions .miniBtn { flex: 1; padding: 11px 8px; }
.quitBtn {
  width: 100%; margin-top: 8px; padding: 11px 8px;
  color: #ff9d9d;
  background: rgba(224,68,68,.1);
  border-color: rgba(224,68,68,.3);
}
.quitBtn:hover { background: rgba(224,68,68,.2); color: #ffbcbc; }

/* ============================ LOOT CRATE (spinning reel) ============================ */
#crateOverlay { background: rgba(8,10,16,.97); z-index: 30; }
#crateReward.hidden, #crateClose.hidden { display: none; }
.cratePanel {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 20px; text-align: center; width: 100%;
}
.crateBurst {
  position: absolute; top: 40%; left: 50%; width: 340px; height: 340px;
  margin: -170px 0 0 -170px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, var(--rc, #fff), transparent 62%);
  opacity: 0; transform: scale(.2);
}
.crateBurst.go { animation: crateBurst 1.1s ease-out; }
@keyframes crateBurst { 0% { opacity: 0; transform: scale(.2); } 22% { opacity: .55; } 100% { opacity: 0; transform: scale(1.6); } }
.crateTitle {
  font-size: 13px; font-weight: 900; letter-spacing: 4px; color: #9aa5ba; z-index: 1;
}

/* the horizontal reel */
.crateReel {
  position: relative;
  width: 320px; max-width: 90vw; height: 120px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 0 30px rgba(0,0,0,.5);
}
.reelTrack {
  display: flex; gap: 8px;
  height: 100%; align-items: center; padding: 0 4px;
  will-change: transform;
}
.reelCard {
  position: relative; overflow: hidden;
  flex: 0 0 88px; width: 88px; height: 88px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.3));
  border: 1px solid rgba(255,255,255,.06);
  border-bottom: 4px solid var(--rc);
  display: flex; align-items: center; justify-content: center;
}
.reelCard::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(78% 55% at 50% 100%, var(--rc), transparent 68%);
  opacity: .2;
}
.reelCard > * { position: relative; z-index: 1; }
.reelCard.win.pop { animation: cardPop .55s cubic-bezier(.2,1.5,.4,1); box-shadow: 0 0 32px var(--rc), inset 0 0 0 2px var(--rc); z-index: 4; }
.reelCard.win.pop::after { opacity: .4; }
@keyframes cardPop { 0% { transform: scale(1.42); } 55% { transform: scale(.92); } 100% { transform: scale(1.06); } }

/* center ticker marker + edge fades */
.reelMarker {
  position: absolute; left: 50%; top: 6px; bottom: 6px; width: 3px; margin-left: -1.5px;
  background: linear-gradient(180deg, #ffd166, #ff9d3c); z-index: 3;
  box-shadow: 0 0 12px rgba(255,209,102,.7);
}
.reelMarker::before, .reelMarker::after {
  content: ''; position: absolute; left: 50%; margin-left: -7px;
  border-left: 7px solid transparent; border-right: 7px solid transparent;
}
.reelMarker::before { top: -6px; border-top: 9px solid #ffd166; }
.reelMarker::after { bottom: -6px; border-bottom: 9px solid #ffd166; }
.reelFade { position: absolute; top: 0; bottom: 0; width: 54px; z-index: 2; pointer-events: none; }
.reelFade.left  { left: 0;  background: linear-gradient(90deg, rgba(20,22,31,.95), transparent); }
.reelFade.right { right: 0; background: linear-gradient(270deg, rgba(20,22,31,.95), transparent); }

#crateReward {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: rewardPop .45s cubic-bezier(.2,1.4,.4,1);
}
@keyframes rewardPop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.rarityTag {
  font-size: 12px; font-weight: 900; letter-spacing: 3px;
  padding: 4px 14px; border-radius: 999px; border: 1.5px solid;
  background: rgba(255,255,255,.04);
}
.rewardText { font-size: 22px; font-weight: 900; color: #fff; max-width: 280px; z-index: 1; }
.goldBanner {
  font-size: 16px; font-weight: 900; letter-spacing: 5px; color: #ffcf4d;
  text-shadow: 0 0 20px rgba(255,207,77,.85);
  animation: goldPulse 1.1s ease-in-out infinite;
}
@keyframes goldPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.09); } }
.rarityTag.goldTag { background: rgba(255,207,77,.1); box-shadow: 0 0 18px rgba(255,207,77,.45); }
/* ODD (TF2-Unusual) quality */
.oddBanner {
  font-size: 14px; font-weight: 900; letter-spacing: 4px; color: var(--oc, #c58bff);
  text-shadow: 0 0 18px var(--oc, #c58bff); animation: goldPulse 1.1s ease-in-out infinite;
}
.reelCard.win.odd { box-shadow: 0 0 30px var(--rc), inset 0 0 0 2px #d8b4ff; }
.reelCard.win.odd::after { opacity: .5; background: radial-gradient(circle, rgba(216,180,255,.4), transparent 70%); }
.itemCard.odd { border-color: color-mix(in srgb, var(--oc, #c58bff) 65%, transparent);
  box-shadow: inset 0 0 20px color-mix(in srgb, var(--oc, #c58bff) 16%, transparent); }
.itemCard.odd::before { background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--oc,#c58bff) 22%, transparent), transparent 70%); }
.oddLabel {
  font-size: 9px; font-weight: 900; letter-spacing: .4px; margin-top: 1px;
  color: var(--oc, #c58bff); text-shadow: 0 0 7px var(--oc, #c58bff); position: relative; z-index: 1;
}
.dupeHint { font-size: 11.5px; color: #9aa5ba; font-weight: 600; max-width: 270px; margin: 2px auto 0; line-height: 1.35; }
.dupeChoice { display: flex; gap: 9px; justify-content: center; margin-top: 10px; }
.dupeBtn {
  padding: 11px 16px; border: none; border-radius: 11px; cursor: pointer;
  font-size: 13px; font-weight: 800; letter-spacing: .4px; color: #fff;
  display: flex; align-items: center; gap: 6px;
}
.dupeBtn svg { vertical-align: -2px; }
.dupeBtn.keep { background: linear-gradient(180deg, #35c163, #1e9948); box-shadow: 0 4px 12px rgba(53,193,99,.4); }
.dupeBtn.melt { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #dfe6f2; }
.dupeBtn.melt:hover { background: rgba(255,255,255,.18); }
#crateReward, #crateReel, #crateClose { position: relative; z-index: 1; }
#crateClose { min-width: 180px; }
.buyBtn.glow:not(:disabled) {
  background: linear-gradient(180deg, #ffb84d, #ef8f1e);
  animation: cratePulse 1.6s ease-in-out infinite;
}
@keyframes cratePulse {
  0%,100% { box-shadow: 0 0 0 rgba(255,184,77,0); }
  50% { box-shadow: 0 0 16px rgba(255,184,77,.7); }
}

/* ============================ INVENTORY ============================ */
.invMenuBtn {
  width: 100%; margin: 8px 0 2px; padding: 12px;
  font-size: 15px; font-weight: 800; letter-spacing: 1px;
  border: 1px solid rgba(126,203,255,.3); border-radius: 12px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, rgba(47,123,255,.22), rgba(47,123,255,.1));
  touch-action: manipulation;
}
.invMenuBtn small { display: block; font-weight: 600; font-size: 10px; color: #9aa5ba; letter-spacing: 0; margin-top: 2px; }
.invMenuBtn:hover { background: linear-gradient(180deg, rgba(47,123,255,.34), rgba(47,123,255,.16)); }

/* loadout header — current squad member + gun/mod */
#invWallet { margin-bottom: 12px; }
.loadout {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 15px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(126,203,255,.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.22));
  border: 1px solid rgba(126,203,255,.2);
}
.loadoutHero {
  flex: 0 0 auto; width: 62px; height: 74px; position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  border-radius: 12px;
  background: radial-gradient(80% 70% at 50% 20%, rgba(255,255,255,.1), rgba(0,0,0,.28));
}
.loadoutHero img { display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }

/* ODD-item animated aura on the inventory previews (CSS particles rising from the model) */
.oddAura { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.oddP { position: absolute; bottom: 10%; width: 7px; height: 7px; border-radius: 50%; background: var(--oc); opacity: 0; animation: oddRise 2.1s linear infinite; }
.oddP:nth-child(1) { left: 20%; animation-delay: 0s; }
.oddP:nth-child(2) { left: 36%; animation-delay: .35s; }
.oddP:nth-child(3) { left: 52%; animation-delay: .7s; }
.oddP:nth-child(4) { left: 66%; animation-delay: 1.05s; }
.oddP:nth-child(5) { left: 44%; animation-delay: 1.4s; }
.oddP:nth-child(6) { left: 74%; animation-delay: 1.75s; }
@keyframes oddRise {
  0% { transform: translateY(0) scale(.5); opacity: 0; }
  22% { opacity: .95; }
  100% { transform: translateY(-46px) scale(1.05); opacity: 0; }
}
.oddAura-flame .oddP { background: radial-gradient(circle at 50% 40%, #ffe27a, #ff6a2e); filter: blur(.5px); box-shadow: 0 0 6px #ff8a3c; animation-duration: 1.5s; }
.oddAura-smoke .oddP { background: #aab0ba; filter: blur(1.6px); width: 10px; height: 10px; animation-duration: 2.7s; }
.oddAura-venom .oddP { background: #7de030; box-shadow: 0 0 5px #8dff3c; }
.oddAura-bubbles .oddP { background: transparent; border: 1.4px solid #bfe4ff; }
.oddAura-hearts .oddP, .oddAura-sparkle .oddP, .oddAura-eyes .oddP, .oddAura-frost .oddP {
  background: transparent; border-radius: 0; width: auto; height: auto; color: var(--oc);
  font-size: 13px; line-height: 1; text-shadow: 0 0 6px var(--oc);
}
.oddAura-sparkle .oddP { animation-duration: 1.5s; }
.puIco svg { color: #ffd54a; }
.loadoutInfo { flex: 1; text-align: left; min-width: 0; }
.loName { font-size: 15px; font-weight: 900; color: #fff; letter-spacing: .5px; margin-bottom: 4px; }
.loRow { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #b9c3d6; margin-top: 3px; }
.loRow svg { flex: 0 0 auto; vertical-align: -2px; }
.loRow span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.loadoutWallet { display: flex; flex-direction: column; gap: 5px; flex: 0 0 auto; }
.loadoutWallet .walletChip { padding: 5px 10px; font-size: 12px; }

/* inventory tab strip — compact single-row pills that scroll (soft edge-fade), like the leaderboard */
#invTabs { display: flex; flex-wrap: nowrap; gap: 6px; margin-bottom: 10px; padding: 5px;
  border-radius: 13px; background: rgba(0,0,0,.24); border: 1px solid rgba(255,255,255,.06);
  overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%); }
#invTabs::-webkit-scrollbar { display: none; }
.invTab {
  flex: 0 0 auto; padding: 8px 13px; font-size: 11.5px; font-weight: 800; white-space: nowrap; line-height: 1;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05); color: #9aa5ba; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .14s, color .14s, border-color .14s, transform .08s;
}
.invTab:hover { color: #eef3fb; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); }
.invTab:active { transform: scale(.95); }
.invTab svg { opacity: .85; width: 13px; height: 13px; flex: 0 0 auto; }
.invTabTxt { white-space: nowrap; }
.tabCt { flex: 0 0 auto; font-style: normal; font-size: 8.5px; font-weight: 900; line-height: 1;
  background: rgba(255,203,74,.95); color: #1a1206; border-radius: 999px; padding: 2px 4px; min-width: 8px; text-align: center; }
.invTab.sel { background: linear-gradient(180deg, #45d67c, #2ba859); border-color: rgba(150,255,190,.5); color: #06210f;
  box-shadow: 0 3px 10px rgba(45,168,89,.35), inset 0 1px 0 rgba(255,255,255,.3); }
.invTab.sel svg { opacity: 1; }
/* inventory search bar */
.invSearch { display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  padding: 8px 11px; border-radius: 11px; background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.1); transition: border-color .14s, box-shadow .14s; }
.invSearch:focus-within { border-color: rgba(126,203,255,.5); box-shadow: 0 0 0 3px rgba(126,203,255,.1); }
.invSearch svg, .mktSearch svg { color: #8792a6; opacity: 1; }
.invSearch input { flex: 1; min-width: 0; background: none; border: none; outline: none;
  font: inherit; font-size: 13px; font-weight: 700; color: #eaf1fb; }
.invSearch input::placeholder { color: #7a8499; font-weight: 600; }
.invSearchX { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: none; cursor: pointer;
  background: rgba(255,255,255,.08); color: #9aa5ba; font-size: 12px; line-height: 1; }
.invSearchX:hover { background: rgba(255,90,90,.2); color: #ffb3b3; }
/* store tab strip — mirrors .invTab, flex so it adapts to 3 or 4 tabs */
#shopTabs { display: flex; gap: 6px; margin-bottom: 12px; }
.shopTab { min-width: 0; flex: 1; padding: 9px 4px; font-size: 10.5px; font-weight: 800;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: #9aa5ba; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 3px; overflow: hidden; }
.shopTab svg { opacity: .8; width: 11px; height: 11px; flex: 0 0 auto; }
.shopTab.sel { background: linear-gradient(180deg, rgba(53,193,99,.24), rgba(53,193,99,.1)); border-color: rgba(53,193,99,.55); color: #fff; }
.shopTab.sel svg { opacity: 1; }

.invRar { font-size: 8px; font-weight: 900; letter-spacing: 1.5px; margin-bottom: 1px; color: var(--rc); position: relative; z-index: 1; }
.invPrev { height: 56px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.invPrev img { display: block; image-rendering: auto; }
.gunShape { filter: drop-shadow(0 2px 5px rgba(0,0,0,.4)); }
.itemCard .itemName, .itemCard .cardBtn, .itemCard .itemDesc { position: relative; z-index: 1; }
.itemCard.locked { opacity: .62; }
.itemCard.locked .invPrev { filter: grayscale(.5) brightness(.9); }
.cardBtn.locked { background: rgba(255,255,255,.06); color: #8f9ab0; cursor: default; }
.cardBtn.buy { background: linear-gradient(180deg, #ffd76a, #f5a623); color: #241a08; }
.cardBtn.own { background: rgba(126,203,255,.16); color: #bfe0ff; }

/* the Collection (pokédex) */
.dexOpen {
  width: 100%; margin-top: 12px; padding: 13px; border-radius: 13px; cursor: pointer;
  font-size: 13.5px; font-weight: 800; letter-spacing: .6px; color: #fff;
  background: linear-gradient(135deg, rgba(255,209,102,.16), rgba(126,203,255,.12));
  border: 1px solid rgba(255,209,102,.35);
}
.dexOpen b { color: #ffd166; }
.dexOpen small { display: block; font-weight: 600; font-size: 10.5px; color: #9aa5ba; letter-spacing: 0; margin-top: 3px; }
.dexOpen:hover { border-color: rgba(255,209,102,.6); background: linear-gradient(135deg, rgba(255,209,102,.26), rgba(126,203,255,.18)); }
.dexOpen svg { vertical-align: -3px; }
#dexHead { margin-bottom: 4px; }
.dexGrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.dexCard {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 7px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.22));
  border: 1px solid var(--rc);
}
.dexCard::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(85% 55% at 50% 0%, var(--rc), transparent 72%);
  opacity: .12;
}
.dexCard.undisc { border-color: rgba(255,255,255,.09); }
.dexCard.undisc::before { opacity: 0; }
.dexCard.undisc .dexPrev { filter: grayscale(1) brightness(.45) contrast(.85); opacity: .8; }
.dexCard.undisc .dexName { color: #7d8699; }
.dexCard.goldCard.undisc { border-color: rgba(255,207,77,.35); }
.dexCard.goldCard.undisc .dexName { color: #b99b4a; }
.dexChk {
  position: absolute; top: 4px; right: 4px; z-index: 2;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #35c163;
}
.dexPrev { height: 40px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.dexPrev .gunShape { width: 40px; height: 30px; }
.dexName { font-size: 9.5px; font-weight: 800; color: #e6ecf6; text-align: center; line-height: 1.1; position: relative; z-index: 1; }
.dexHint { font-size: 8px; font-weight: 700; color: #6f7a90; text-align: center; line-height: 1.1; }

/* card entrance + press feel */
@keyframes cardIn { 0% { opacity: 0; transform: translateY(7px) scale(.97); } 100% { opacity: 1; transform: none; } }
.shopGrid .itemCard, .dexCard, .caseCard { animation: cardIn .22s ease-out backwards; }
.shopGrid .itemCard:nth-child(2n) { animation-delay: .04s; }
.shopGrid .itemCard:nth-child(3n) { animation-delay: .07s; }
.dexCard:nth-child(3n+2) { animation-delay: .04s; }
.dexCard:nth-child(3n) { animation-delay: .08s; }
.itemCard:active, .dexCard:active { transform: scale(.97); }

.attachIco {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 2px var(--rc, rgba(255,255,255,.18));
}
.itemDesc { font-size: 9.5px; color: #9aa5ba; margin-top: -3px; line-height: 1.2; }
