/* ============================================================
   Hero Loot Vault — styles
   ============================================================ */

:root {
  --c-common: #eef4ff;
  --c-rare:   #4ad36a;
  --c-epic:   #57a3ff;
  --c-mythic: #8b63ff;
  --c-gold:   #ffd84a;
  --c-legend: #ff5136;
  --bg-1: #ff6a3d;
  --bg-2: #ff2e63;
  --bg-3: #5a189a;
  --gold: #ffc94d;
  --gem:  #4ade80;
  --ink:  #1b1b3a;
  --ui-panel-top: rgba(29, 32, 40, 0.96);
  --ui-panel-bottom: rgba(9, 11, 16, 0.98);
  --ui-panel-soft-top: rgba(24, 26, 34, 0.96);
  --ui-panel-soft-bottom: rgba(10, 12, 17, 0.98);
  --ui-border: rgba(255, 129, 76, 0.18);
  --ui-border-strong: rgba(255, 138, 85, 0.40);
  --ui-text: #f6efeb;
  --ui-text-dim: #d0c2be;
  --ui-alert-1: #ffd3b4;
  --ui-alert-2: #ff824a;
  --ui-alert-3: #5b170f;
  --ui-glow: rgba(255, 104, 46, 0.28);
  --ui-glow-strong: rgba(255, 104, 46, 0.42);
  --page-bg-desktop: url("../assets/backgrounds/forest-wide.png");
  --page-bg-mobile: url("../assets/backgrounds/mobile-forest-portrait.png");
  --page-bg-current: var(--page-bg-desktop);
  --page-bg-position: center center;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  font-family: 'Trebuchet MS', system-ui, sans-serif;
  color: var(--ui-text);
  user-select: none;
}
body {
  background-color: #05070d;
  background-image:
    linear-gradient(180deg, rgba(4, 8, 15, 0.78) 0%, rgba(7, 11, 18, 0.56) 36%, rgba(2, 4, 8, 0.84) 100%),
    var(--page-bg-current);
  background-position: center center, var(--page-bg-position);
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(118, 39, 33, 0.18), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(0, 0, 0, 0.46), transparent 42%);
}

@media (max-width: 768px) and (orientation: portrait) {
  :root {
    --page-bg-current: var(--page-bg-mobile);
    --page-bg-position: center top;
  }

  body {
    background-attachment: scroll, scroll;
  }
}

#app {
  position: relative; width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}

.seo-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.screen {
  position: absolute; inset: 0;
  display: none; flex-direction: column;
  padding: 14px;
}
.screen.active { display: flex; }

/* ----- Pills & HUD ----- */
.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px; align-items: center;
}
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(180deg, var(--ui-panel-top), var(--ui-panel-bottom));
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  padding: 8px 14px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 28px rgba(0,0,0,.28);
}
.pill .val  { font-size: 18px; letter-spacing: .08em; }

.player-pill {
  background: linear-gradient(180deg, rgba(35, 38, 48, 0.98), rgba(10, 13, 18, 0.98));
  padding: 8px 16px 8px 72px;
  position: relative;
  min-width: 140px;
  border-color: rgba(255, 131, 78, 0.24);
  overflow: visible;
}
.player-pill .avatar {
  --avatar-accent: #ff824a;
  position: absolute; left: -10px; top: -10px;
  width: 64px; height: 64px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(38, 41, 52, 0.98), rgba(14, 17, 24, 0.98));
  border: 1px solid rgba(255, 141, 88, 0.28);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(255, 106, 50, 0.18), 0 8px 18px rgba(0,0,0,.34);
  overflow: hidden;
}
.player-pill .avatar-ring {
  position: absolute;
  inset: 5px;
  border-radius: 11px;
  border: 1px solid var(--avatar-accent);
  box-shadow: 0 0 14px rgba(255, 104, 46, 0.18);
}
.player-pill .avatar-glyph {
  position: relative;
  z-index: 1;
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 125, 68, 0.24));
}
.player-pill .avatar-art {
  position: relative;
  z-index: 1;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center 24%;
  transform: scale(1.14);
  transform-origin: center 28%;
  filter: drop-shadow(0 0 8px rgba(255, 125, 68, 0.22));
}
.player-pill .nm { font-size: 13px; opacity: .82; color: var(--ui-text-dim); letter-spacing: .08em; text-transform: uppercase; }
.player-pill .lv { font-size: 18px; font-weight: 900; display: inline-flex; align-items: center; gap: 8px; letter-spacing: .08em; }
.currencies { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.menu-right { display: flex; flex-direction: column; gap: 8px; }

.currency-pill {
  min-width: 102px;
  justify-content: center;
  gap: 10px;
}

.hud-icon,
.ui-glyph {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
}
.hud-icon {
  width: 18px;
  height: 18px;
}
.hud-icon.coin,
.hud-icon.gem {
  width: 26px;
  height: 26px;
}
.currency-pill .hud-icon.coin,
.currency-pill .hud-icon.gem {
  width: 50px;
  height: 50px;
}
.ui-glyph {
  width: 20px;
  height: 20px;
}
.hud-icon::before,
.hud-icon::after,
.ui-glyph::before,
.ui-glyph::after {
  content: "";
  position: absolute;
}

.hud-icon.coin::before {
  inset: 1px;
  border-radius: 50%;
  border: 2px solid var(--ui-alert-2);
  background: radial-gradient(circle at 35% 35%, rgba(255, 214, 186, 0.34), rgba(255, 103, 40, 0.08));
  box-shadow: 0 0 12px var(--ui-glow), inset 0 0 10px rgba(255, 130, 74, 0.16);
}
.hud-icon.coin::after {
  top: 4px;
  bottom: 4px;
  left: 7px;
  right: 7px;
  border-left: 2px solid rgba(255, 236, 221, 0.9);
  border-right: 2px solid rgba(255, 236, 221, 0.9);
  border-radius: 999px;
}
.hud-icon.gem::before {
  inset: 1px 3px 2px;
  clip-path: polygon(50% 0%, 90% 35%, 72% 100%, 28% 100%, 10% 35%);
  background: linear-gradient(180deg, rgba(255, 215, 190, 0.96), rgba(255, 96, 34, 0.34));
  box-shadow: 0 0 12px var(--ui-glow);
}
.hud-icon.gem::after {
  inset: 5px 6px 7px;
  clip-path: polygon(50% 0%, 84% 35%, 66% 100%, 34% 100%, 16% 35%);
  background: rgba(255,255,255,.24);
}
.hud-icon.trophy::before {
  left: 4px;
  right: 4px;
  top: 2px;
  height: 8px;
  border: 2px solid var(--ui-alert-2);
  border-bottom: 0;
  border-radius: 4px 4px 8px 8px;
  box-shadow: 0 0 10px rgba(255, 112, 49, 0.18);
}
.hud-icon.trophy::after {
  left: 8px;
  right: 8px;
  top: 11px;
  bottom: 1px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--ui-alert-1), var(--ui-alert-2));
}
.hud-icon.gear::before {
  inset: 0;
  clip-path: polygon(
    38% 0%, 62% 0%,
    66% 10%, 78% 6%,
    86% 14%, 82% 26%,
    92% 38%, 100% 38%,
    100% 62%, 92% 62%,
    82% 74%, 86% 86%,
    78% 94%, 66% 90%,
    62% 100%, 38% 100%,
    34% 90%, 22% 94%,
    14% 86%, 18% 74%,
    8% 62%, 0% 62%,
    0% 38%, 8% 38%,
    18% 26%, 14% 14%,
    22% 6%, 34% 10%
  );
  background: linear-gradient(180deg, rgba(255, 223, 204, 0.96), rgba(255, 129, 76, 0.70));
  box-shadow: 0 0 10px rgba(255, 112, 49, 0.16);
}
.hud-icon.gear::after {
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 12, 17, 0.98) 0 58%, rgba(255, 220, 197, 0.18) 59% 100%);
  box-shadow: 0 0 0 1px rgba(255, 220, 197, 0.74);
}

.ui-glyph::before {
  inset: 2px;
  border-radius: 6px;
  border: 1px solid rgba(255, 176, 132, 0.72);
  box-shadow: 0 0 10px rgba(255, 102, 44, 0.16);
}
.ui-glyph.heroes::after {
  inset: 4px 5px 3px;
  border-radius: 8px 8px 6px 6px;
  background: radial-gradient(circle at 50% 20%, rgba(255, 226, 207, 0.96) 0 26%, transparent 29%), rgba(255, 214, 190, 0.9);
}
.ui-glyph.quests::after {
  inset: 4px 6px 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 223, 202, 0.95), rgba(255, 132, 84, 0.58));
  box-shadow: inset 0 0 0 1px rgba(44, 14, 9, 0.42);
}
.ui-glyph.shop::after {
  inset: 5px 4px 3px;
  border-radius: 3px;
  border: 2px solid rgba(255, 223, 202, 0.94);
}
.ui-glyph.raid::after {
  inset: 3px 8px 2px;
  transform: skewX(-18deg);
  background: linear-gradient(180deg, rgba(255, 218, 193, 0.96), rgba(255, 131, 78, 0.55));
}
.ui-glyph.trophy-road::after {
  inset: 5px 6px 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--ui-alert-1), var(--ui-alert-2));
}
.ui-glyph.clock::after {
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(255, 223, 202, 0.94);
}
.ui-glyph.pass::after {
  inset: 5px 3px;
  border-radius: 4px;
  border: 2px solid rgba(255, 223, 202, 0.94);
  transform: rotate(-8deg);
}
.ui-glyph.arcade::after {
  inset: 5px 4px 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 223, 202, 0.92), rgba(255, 126, 70, 0.44));
  box-shadow: inset 0 -3px 0 rgba(37, 15, 14, 0.42);
}

/* ----- Buttons ----- */
.icon-btn {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(40, 28, 28, 0.98), rgba(15, 11, 14, 0.98));
  border: 1px solid var(--ui-border-strong);
  box-shadow: 0 0 0 1px rgba(255, 102, 44, 0.08), 0 0 22px rgba(255, 102, 44, 0.16), 0 8px 20px rgba(0,0,0,.28);
  color: var(--ui-text);
  font-size: 22px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.icon-btn:hover  { transform: translateY(-1px); border-color: rgba(255, 166, 122, 0.7); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 0 0 1px rgba(255, 102, 44, 0.08), 0 0 14px rgba(255, 102, 44, 0.14), 0 4px 12px rgba(0,0,0,.24); }

.side-menu {
  display: flex; flex-direction: column; gap: 10px;
  align-self: flex-start; margin-top: 12px;
}
.side-btn {
  background: linear-gradient(180deg, var(--ui-panel-soft-top), var(--ui-panel-soft-bottom));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 10px 14px;
  color: var(--ui-text); font-weight: 900; font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 20px rgba(0,0,0,.3);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; min-width: 130px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.side-btn:hover  { transform: translateY(-1px); border-color: rgba(255, 170, 127, 0.58); }
.side-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 12px rgba(0,0,0,.28); }
.side-btn .ic    { width: 20px; height: 20px; }
.side-btn--panel {
  border-radius: 13px;
  border-color: rgba(255, 127, 76, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 102, 44, 0.08), 0 0 22px rgba(255, 102, 44, 0.16), 0 8px 20px rgba(0,0,0,.28);
}
.side-btn--capsule {
  border-radius: 999px;
}

.btn {
  background: linear-gradient(180deg, rgba(41, 24, 26, 0.98), rgba(15, 11, 16, 0.98));
  color: var(--ui-text);
  border: 1px solid var(--ui-border-strong);
  border-radius: 14px;
  padding: 10px 30px;
  font-size: 18px; font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 102, 44, 0.08), 0 0 22px rgba(255, 102, 44, 0.16), 0 8px 20px rgba(0,0,0,.28);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 1px rgba(255, 102, 44, 0.08), 0 0 14px rgba(255, 102, 44, 0.14), 0 4px 12px rgba(0,0,0,.24); }
.btn.alt,
.btn.gold { background: linear-gradient(180deg, rgba(41, 24, 26, 0.98), rgba(15, 11, 16, 0.98)); color: var(--ui-text); }
.btn.sm   { padding: 6px 14px; font-size: 14px; }

/* ----- Lobby body ----- */
#lobby .body {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}
.vault-row {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(24px, 1.8vw, 42px); flex-wrap: wrap;
  padding: 12px;
}
.vault-row.starter-guided {
  gap: 42px;
}
.vault-row.starter-guided .vault:not(.starter-pending) {
  opacity: .34;
  filter: saturate(.42) brightness(.7);
  transform: scale(.88);
}
.vault-row.starter-guided .vault:not(.starter-pending):hover,
.vault-row.starter-guided .vault:not(.starter-pending):active {
  transform: scale(.88);
}

/* ----- Chest ----- */
.vault {
  position: relative;
  width: 218px; height: 236px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: transform .15s ease;
}
.vault:hover  { transform: translateY(-4px) scale(1.02); }
.vault:active { transform: translateY(2px) scale(.98); }
.chest {
  --chest-glow: rgba(196, 117, 62, 0.28);
  width: 184px; height: 184px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,.56));
  animation: floaty 2.6s ease-in-out infinite;
  isolation: isolate;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes starter-burn {
  0%, 100% {
    filter: drop-shadow(0 0 22px rgba(255, 84, 72, 0.68)) drop-shadow(0 0 44px rgba(255, 42, 42, 0.42)) drop-shadow(0 18px 26px rgba(0,0,0,.56));
  }
  50% {
    filter: drop-shadow(0 0 34px rgba(255, 106, 92, 0.92)) drop-shadow(0 0 70px rgba(255, 32, 32, 0.58)) drop-shadow(0 22px 30px rgba(0,0,0,.6));
  }
}
@keyframes starter-callout-flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: .84; }
}
.chest::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%; bottom: 6px;
  height: 24%;
  background: radial-gradient(circle, var(--chest-glow), transparent 72%);
  filter: blur(18px);
  z-index: 0;
  opacity: .9;
}
.chest::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 14%, rgba(255,255,255,.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 34%, rgba(0,0,0,.18) 100%);
  z-index: 2;
  pointer-events: none;
}
.chest-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 52%;
  transform: scale(1.04);
  transition: transform .42s ease, filter .32s ease, opacity .28s ease;
  position: relative;
  z-index: 1;
  user-select: none;
  -webkit-user-drag: none;
}
.vault:hover .chest-image {
  transform: scale(1.08);
  filter: brightness(1.08) saturate(1.08);
}
.chest-art--smallChest,
.vault.tier-smallChest .chest { --chest-glow: rgba(178, 134, 98, 0.26); }
.chest-art--bigChest,
.vault.tier-bigChest .chest { --chest-glow: rgba(169, 130, 255, 0.32); }
.chest-art--largeChest,
.vault.tier-largeChest .chest { --chest-glow: rgba(255, 101, 45, 0.42); }
.chest-art--equipChest,
.vault.tier-equipChest .chest { --chest-glow: rgba(255, 216, 74, 0.34); }

.vault.tier-smallChest:hover .chest-image { filter: brightness(1.04) saturate(1.02); }
.vault.tier-bigChest:hover .chest-image { filter: brightness(1.08) saturate(1.06); }
.vault.tier-largeChest:hover .chest-image { filter: brightness(1.14) saturate(1.18); }
.vault.tier-equipChest:hover .chest-image { filter: brightness(1.12) saturate(1.12); }

.vault-preview {
  width: auto;
  height: auto;
  cursor: auto;
}
.vault-preview:hover,
.vault-preview:active {
  transform: none;
}

.vault.tier-smallChest { --col-light:#cfe7ff; --col-mid:#7fc5ff; --col-dark:#3a8edb; }
.vault.tier-bigChest   { --col-light:#e6c8ff; --col-mid:#a982ff; --col-dark:#6a3fc5; }
.vault.tier-largeChest { --col-light:#ffe39a; --col-mid:#ffae3a; --col-dark:#d96a14; }
.vault.tier-equipChest { --col-light:#fff2a8; --col-mid:#d7a848; --col-dark:#65411e; }

.vault .label {
  margin-top: 12px;
  background: linear-gradient(180deg, rgba(31, 33, 42, 0.96), rgba(10, 12, 17, 0.98));
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  box-sizing: border-box;
  width: min(100%, 214px);
  max-width: 100%;
  padding: 8px 14px;
  font-weight: 900; font-size: 18px; letter-spacing: .08em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 20px rgba(0,0,0,.26);
  overflow: hidden;
}
.vault .label > span:first-child {
  min-width: 0;
}
.free-vault-top {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 3;
}
.free-stack-host {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
}
.free-ad-btn {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 7px 11px;
  font-size: 10px;
  letter-spacing: .05em;
}
.free-ad-meta {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 231, 214, 0.84);
  text-align: center;
  text-shadow: 0 1px 0 rgba(0,0,0,.5);
}
.vault .info {
  position: absolute; right: 16px; top: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(180deg, rgba(41, 24, 26, 0.98), rgba(15, 11, 16, 0.98)); color: var(--ui-text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-style: italic;
  border: 1px solid var(--ui-border-strong);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 102, 44, 0.18);
}
.vault .label .hud-icon { width: 18px; height: 18px; }
.vault .label .hud-icon.coin,
.vault .label .hud-icon.gem {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 14px rgba(255, 205, 120, 0.34));
}
.vault.locked { filter: grayscale(.5) brightness(.7); }
.vault.locked .timer-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 16px;
  text-shadow: 0 2px 0 #000;
  pointer-events: none;
}
.starter-callout {
  position: absolute;
  left: 50%;
  top: -62px;
  transform: translateX(-50%) scale(.9);
  min-width: 270px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 132, 122, 0.58);
  background: linear-gradient(180deg, rgba(126, 18, 18, 0.96), rgba(56, 8, 8, 0.98));
  box-shadow: 0 0 28px rgba(255, 61, 46, 0.36), 0 10px 22px rgba(0,0,0,.34);
  color: #fff3ef;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .18em;
  text-align: center;
  text-shadow: 0 0 16px rgba(255, 205, 194, 0.28), 0 2px 0 rgba(77, 8, 8, 0.96);
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  transition: opacity .22s ease, transform .22s ease;
}
.vault.starter-pending {
  z-index: 3;
  transform: translateY(-8px) scale(1.12);
}
.vault.starter-pending:hover {
  transform: translateY(-10px) scale(1.14);
}
.vault.starter-pending:active {
  transform: translateY(-2px) scale(1.08);
}
.vault.starter-pending .starter-callout {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: starter-callout-flicker 1.18s ease-in-out infinite;
}
.vault.starter-pending .chest {
  --chest-glow: rgba(255, 42, 42, 0.72);
  animation: floaty 2.6s ease-in-out infinite, starter-burn 1.36s ease-in-out infinite;
}
.vault.starter-pending .chest::before {
  background: radial-gradient(circle, rgba(255, 50, 42, 0.84), transparent 72%);
  filter: blur(26px);
}
.vault.starter-pending .chest::after {
  background:
    radial-gradient(circle at 50% 14%, rgba(255,255,255,.24), transparent 30%),
    linear-gradient(180deg, rgba(255, 120, 120, 0.2), transparent 34%, rgba(80, 0, 0, 0.18) 100%);
}
.vault.starter-pending .chest-image {
  transform: scale(1.1);
  filter: brightness(1.18) saturate(1.26);
}
.vault.starter-pending .label {
  border-color: rgba(255, 118, 118, 0.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 18px rgba(255, 79, 66, 0.26), 0 12px 26px rgba(0,0,0,.34);
}
.vault.starter-pending .info {
  border-color: rgba(255, 118, 118, 0.7);
  box-shadow: 0 0 18px rgba(255, 79, 66, 0.3);
}
.starter-tag {
  color: #fff3ef;
  text-shadow: 0 0 14px rgba(255, 110, 96, 0.28);
}

@media (max-width: 900px) {
  .vault-row.starter-guided { gap: 18px; }
  .starter-callout {
    top: -48px;
    min-width: 218px;
    font-size: 20px;
    letter-spacing: .14em;
  }
  .vault.starter-pending {
    transform: translateY(-6px) scale(1.07);
  }
  .vault.starter-pending:hover {
    transform: translateY(-8px) scale(1.09);
  }
}

@media (max-width: 640px) {
  .vault-row.starter-guided .vault:not(.starter-pending) {
    opacity: .22;
    transform: scale(.76);
  }
  .starter-callout {
    top: -38px;
    min-width: 188px;
    padding: 6px 12px;
    font-size: 16px;
    letter-spacing: .12em;
  }
}

/* ----- Banners (footer) ----- */
.footer-row {
  display: flex; gap: 10px; justify-content: space-between; align-items: end;
}
.banner {
  background: linear-gradient(180deg, var(--ui-panel-soft-top), var(--ui-panel-soft-bottom));
  border: 1px solid var(--ui-border);
  border-radius: 18px;
  padding: 12px 18px;
  color: var(--ui-text); font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 24px rgba(0,0,0,.3);
  cursor: pointer;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.banner--capsule { border-radius: 999px; }
.banner .ui-glyph { width: 18px; height: 18px; }

/* ----- Inner screens ----- */
.screen-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.screen-header .right { margin-left: auto; }
.back-btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(31, 22, 24, 0.98), rgba(13, 10, 14, 0.98)); color: var(--ui-text);
  border: 1px solid var(--ui-border);
  font-size: 22px; font-weight: 900; cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 102, 44, 0.12), 0 8px 18px rgba(0,0,0,.26);
}
.screen-title {
  font-size: 24px; font-weight: 900;
  text-shadow: 2px 2px 0 var(--ink);
  letter-spacing: 1px;
}
.muted  { opacity: .75; font-size: 14px; }
.center { text-align: center; }

.tabs {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.tab {
  background: rgba(0,0,0,.35);
  color: #fff;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 6px 14px;
  font-weight: 800; font-size: 14px;
  cursor: pointer;
}
.tab.active {
  background: linear-gradient(180deg, #ffd76a, #ff9d2c);
  color: #4a2400; border-color: #fff;
}

.grid {
  flex: 1; overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 200px));
  justify-content: center;
  align-content: start;
  gap: 14px;
  padding: 10px 10px 30px;
}
#shopGrid {
  flex: 1;
  min-height: 0;
  width: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: row;
  max-width: 1280px;
  margin: 0 auto;
  justify-content: flex-start;
  align-items: stretch;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 18px 24px;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-color: rgba(58, 19, 18, 0.96) rgba(4, 3, 4, 0.9);
  scrollbar-width: thin;
}
#shopGrid.drag-scroll-enabled {
  touch-action: pan-x;
  cursor: grab;
}
#shopGrid.drag-scroll-enabled.is-dragging {
  cursor: grabbing;
  user-select: none;
}
#shopGrid::-webkit-scrollbar { height: 12px; }
#shopGrid::-webkit-scrollbar-track {
  background: rgba(4, 3, 4, 0.9);
  border-radius: 999px;
}
#shopGrid::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(40, 12, 12, 0.98), rgba(105, 28, 22, 0.96));
  border: 2px solid rgba(4, 3, 4, 0.9);
  border-radius: 999px;
}
.grid::-webkit-scrollbar { width: 8px; }
.grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 4px; }

/* ----- Cards ----- */
.card {
  position: relative;
  border-radius: 14px;
  background: linear-gradient(180deg, #2d3553, #1b2138);
  border: 3px solid var(--rar-color, #2a7aff);
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
  cursor: pointer;
  padding-bottom: 10px;
  display: flex; flex-direction: column;
}
.card .btn {
  flex-shrink: 0;
  margin-top: auto;
}
.card.locked { opacity: .82; filter: none; }
.card .portrait {
  aspect-ratio: 1/1;
  background: linear-gradient(180deg, var(--rar-color, #2a7aff), #1b1b3a);
  display: flex; align-items: center; justify-content: center;
  font-size: 64px; position: relative;
  border-radius: 11px 11px 0 0;
  overflow: hidden;
  padding: 8px 8px 0;
  box-sizing: border-box;
}
.card .portrait::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.4), transparent 60%);
  pointer-events: none;
}
.card.locked .portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.24), rgba(4, 6, 12, 0.72));
  z-index: 1;
}
.card .portrait-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.28));
}
.card.locked .portrait-art {
  filter: grayscale(.3) brightness(.62) drop-shadow(0 6px 12px rgba(0,0,0,.28));
}
.card .portrait-glyph {
  position: relative;
  z-index: 1;
  line-height: 1;
}
.card .portrait-lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.card.locked .portrait-lock {
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .nm {
  text-align: center; padding: 6px 4px;
  font-weight: 900; font-size: 14px; letter-spacing: .5px;
  background: rgba(0,0,0,.35);
}
.card .meta {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px;
  background: #11152a;
  font-size: 12px; font-weight: 800;
}
.card .tag {
  position: absolute; top: 6px; left: 6px;
  background: var(--rar-color, #fff); color: var(--ink);
  font-size: 10px; font-weight: 900;
  padding: 2px 6px; border-radius: 8px;
  text-transform: uppercase;
}
.card .progress {
  height: 6px; background: rgba(0,0,0,.4); position: relative;
}
.card .progress > div {
  height: 100%;
  background: linear-gradient(90deg, #6cf08e, #22c358);
  transition: width .3s;
}
.shop-card {
  background: linear-gradient(180deg, rgba(8, 4, 5, 0.98), rgba(0, 0, 0, 0.98));
  border-color: rgba(255, 39, 39, 0.42);
  overflow: hidden;
}
#shopGrid .shop-card {
  width: 100%;
  flex: 0 0 clamp(180px, 18vw, 236px);
  max-width: 236px;
}
.shop-card .portrait {
  padding: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-card .portrait::after {
  display: none;
}
.shop-card-art {
  display: block;
  width: 80%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}
.shop-card .nm,
.shop-card .meta {
  background: rgba(0, 0, 0, 0.92);
  color: #fff1e8;
}
.shop-card .meta .currency-mark {
  --currency-icon-limit: 32px;
}
.shop-card .meta .currency-inline {
  gap: 8px;
  font-size: 18px;
}
.shop-card-desc {
  min-height: 38px;
  padding: 8px 10px 0;
  background: rgba(0, 0, 0, 0.92);
  color: #ffe2c5;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}
.shop-card .meta .orig {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: #ff4b4b;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #ff2727;
  margin-right: 10px;
  opacity: .95;
}
.shop-card .meta .orig::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ff2727 12%, #ff2727 88%, transparent);
  transform: rotate(-18deg);
  box-shadow: 0 0 10px rgba(255, 39, 39, .34);
  pointer-events: none;
}
.shop-card .meta .orig .currency-mark {
  --currency-icon-limit: 46px;
}
.shop-card.deal .meta > span:last-child {
  color: #fff4c2;
  font-weight: 900;
  text-shadow: 0 0 12px rgba(255, 170, 114, .24);
}
.shop-ad-cost,
.shop-ad-meta {
  color: #fff1e8;
  font-weight: 900;
  letter-spacing: .04em;
}
.mini-game-card {
  --rar-color: #ff2727;
  border-color: rgba(255, 39, 39, 0.72);
  background: linear-gradient(180deg, #050303, #000);
  box-shadow: 0 0 0 1px rgba(255, 39, 39, 0.26), 0 14px 28px rgba(0,0,0,.42);
  overflow: hidden;
}
.mini-game-card .mini-game-portrait {
  aspect-ratio: 1 / 1;
  width: 100%;
  padding: 0;
  background: #000;
}
.mini-game-card .mini-game-portrait::after {
  display: none;
}
.mini-card-art-wrap,
.mini-card-img {
  display: block;
  width: 100%;
  height: 100%;
}
.mini-card-img {
  object-fit: cover;
  object-position: center center;
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.08) brightness(0.92);
  user-select: none;
  -webkit-user-drag: none;
}
.mini-game-card .nm {
  color: #fff0e8;
  background: #000;
  text-shadow: 0 2px 0 rgba(0,0,0,.8);
}
.mini-game-card .meta {
  color: #ffe6d4;
  background: rgba(0, 0, 0, 0.96);
  border-top: 0;
}
.mini-game-card .mini-game-status {
  background: rgba(0, 0, 0, 0.96);
  color: #fff1df;
}
.mini-game-card .btn {
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.98), rgba(0, 0, 0, 0.98));
  border-color: rgba(255, 39, 39, 0.62);
  color: #fff5ee;
  box-shadow: inset 0 0 0 1px rgba(255, 39, 39, 0.14), 0 8px 14px rgba(0,0,0,.32);
}
.mini-game-card .btn:hover {
  box-shadow: inset 0 0 0 1px rgba(255, 39, 39, 0.2), 0 0 14px rgba(255, 0, 0, 0.18);
}

/* ----- Battle Pass (legacy .tier cell styles kept for any lingering use) ----- */
.tier {
  flex: 0 0 auto;
  width: 90px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.tier .lv {
  background: rgba(0,0,0,.45);
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 900; font-size: 13px;
}
.tier-row {
  display: flex; flex-direction: column; gap: 6px; width: 100%;
}
.tier-cell {
  background: linear-gradient(180deg, #2d3553, #1b2138);
  border: 2px solid var(--rar-color, #fff);
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  position: relative;
  min-height: 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tier-cell.free    { --rar-color: #4ad36a; }
.tier-cell.premium { --rar-color: #ff5136; }
.tier-cell.locked    { opacity: .45; }
.tier-cell.claimed   { filter: grayscale(.6); opacity: .6; }
.tier-cell .ic { font-size: 28px; }
.tier-cell .v  { font-weight: 900; font-size: 12px; }
.tier-cell .badge {
  position: absolute; top: -8px; right: -6px;
  background: var(--rar-color); color: var(--ink);
  font-size: 9px; font-weight: 900;
  padding: 2px 5px; border-radius: 6px;
  border: 2px solid var(--ink);
  text-transform: uppercase;
}
.tier-cell .claim {
  margin-top: 4px;
  background: linear-gradient(180deg, #6cf08e, #22c358);
  color: #033; border: 2px solid #fff;
  border-radius: 8px;
  font-weight: 900; font-size: 11px;
  padding: 2px 8px; cursor: pointer;
}

#mini {
  --mini-bg-desktop: url("../assets/backgrounds/RaidBossBackground.png");
  --mini-bg-mobile: url("../assets/backgrounds/RaidBossBackgroundPhone.png");
  --mini-bg-current: var(--mini-bg-desktop);
  background:
    linear-gradient(180deg, rgba(3, 5, 10, 0.58), rgba(5, 5, 9, 0.34) 38%, rgba(2, 3, 6, 0.82)),
    var(--mini-bg-current);
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
}

#mini-crit,
#mini-wheel,
#mini-mem,
#mini-signal,
#mini-wall {
  --mini-stage-bg-desktop: url("../assets/backgrounds/RaidBossBackground.png");
  --mini-stage-bg-mobile: url("../assets/backgrounds/RaidBossBackgroundPhone.png");
  --mini-stage-bg-current: var(--mini-stage-bg-desktop);
  background:
    linear-gradient(180deg, rgba(3, 5, 10, 0.68), rgba(5, 5, 9, 0.48) 38%, rgba(2, 3, 6, 0.9)),
    radial-gradient(circle at 50% 18%, rgba(255, 39, 39, 0.16), transparent 34%),
    var(--mini-stage-bg-current);
  background-position: center center, center center, center center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: cover, cover, cover;
}

@media (max-width: 768px) and (orientation: portrait) {
  #mini {
    --mini-bg-current: var(--mini-bg-mobile);
    background-position: center top, center center;
  }

  #mini-crit,
  #mini-wheel,
  #mini-mem,
  #mini-signal,
  #mini-wall {
    --mini-stage-bg-current: var(--mini-stage-bg-mobile);
    background-position: center top, center top, center top;
  }
}

/* ----- Mini-game stages ----- */
.mini-stage {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
  padding: 20px;
}
.mini-emoji { font-size: 96px; }
.mini-bar {
  width: 80%; max-width: 420px; height: 36px;
  background: rgba(0,0,0,.5);
  border: 3px solid var(--ink); border-radius: 18px;
  position: relative; overflow: hidden;
}
#critTarget {
  position: absolute; top: 0; bottom: 0; left: 43%; width: 14%;
  background: linear-gradient(180deg, #6cf08e, #22c358);
}
#critIndicator {
  position: absolute; top: -4px; bottom: -4px; width: 6px;
  background: #fff; left: 0;
}
.mini-info { font-weight: 900; font-size: 18px; }

.signal-stage { gap: 16px; }
.signal-readout {
  min-height: 24px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffd8b7;
  text-align: center;
}
.signal-bar {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 17, 29, 0.94), rgba(5, 8, 15, 0.98));
}
.signal-noise {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 8%, rgba(255,255,255,.07) 9% 12%, transparent 13% 100%),
    linear-gradient(180deg, rgba(123, 179, 255, 0.06), rgba(255, 112, 49, 0.05));
  opacity: .8;
}
#signalZone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 41%;
  width: 18%;
  background: linear-gradient(180deg, rgba(117, 238, 180, 0.95), rgba(40, 176, 116, 0.92));
  box-shadow: 0 0 16px rgba(117, 238, 180, 0.26);
}
#signalIndicator {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 6px;
  left: 0;
  background: #fff3ea;
  box-shadow: 0 0 12px rgba(255,255,255,.28);
}

.wall-stage { gap: 16px; }
.wall-readout {
  min-height: 24px;
  text-align: center;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffe0b8;
}
.wall-board {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.wall-light {
  min-height: 68px;
  border-radius: 16px;
  border: 1px solid rgba(255, 188, 138, 0.28);
  background: linear-gradient(180deg, rgba(45, 20, 20, 0.96), rgba(14, 9, 12, 0.98));
  color: #f8e7dc;
  font-size: 28px;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 10px 18px rgba(0,0,0,.24);
}
.wall-light.active {
  border-color: rgba(255, 220, 133, 0.72);
  background: linear-gradient(180deg, rgba(255, 214, 132, 0.98), rgba(255, 147, 70, 0.94));
  color: #351309;
  box-shadow: 0 0 18px rgba(255, 191, 93, 0.34), 0 10px 18px rgba(0,0,0,.22);
}
.wall-light:disabled {
  opacity: .92;
  cursor: default;
}

/* Wheel */
.wheel-wrap { position: relative; width: 280px; height: 280px; }
.wheel-pointer {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: 32px; color: #ffd76a; z-index: 5;
  text-shadow: 0 0 10px #000;
}
.wheel {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 0 0 4px var(--ink), 0 8px 0 rgba(0,0,0,.3);
  position: relative;
  transition: transform 4s cubic-bezier(.2,.8,.2,1);
  background: conic-gradient(
    #ffd76a 0deg 60deg,
    #6cf08e 60deg 120deg,
    #c79bff 120deg 180deg,
    #ff9bd0 180deg 240deg,
    #7fb6ff 240deg 300deg,
    #ff5c2c 300deg 360deg
  );
}
.wheel-seg {
  position: absolute; left: 50%; top: 50%;
  transform-origin: 0 0;
  font-weight: 900; color: var(--ink);
  font-size: 18px;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

/* Memory game */
.mem-info { text-align: center; font-weight: 900; margin-bottom: 10px; }
.mem-grid {
  flex: 1; display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 6px;
  max-width: 480px; margin: 0 auto; width: 100%;
}
.mem-card {
  aspect-ratio: 1/1;
  position: relative;
  cursor: pointer;
  perspective: 600px;
}
.mem-inner {
  position: absolute; inset: 0;
  transition: transform .35s;
  transform-style: preserve-3d;
}
.mem-card.flipped .mem-inner,
.mem-card.matched .mem-inner { transform: rotateY(180deg); }
.mem-front, .mem-back {
  position: absolute; inset: 0;
  border-radius: 12px;
  border: 3px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 900;
  backface-visibility: hidden;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.mem-front { background: linear-gradient(180deg, #7fb6ff, #2a7aff); color: #fff; }
.mem-back  { background: linear-gradient(180deg, #ffd76a, #ff9d2c); transform: rotateY(180deg); }
.mem-card.matched .mem-back { background: linear-gradient(180deg, #6cf08e, #22c358); }

/* ----- Box opening overlay ----- */
#opening {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, var(--ink), #000);
  display: none;
  align-items: center; justify-content: center;
  z-index: 50; overflow: hidden;
}
#opening.active { display: flex; }
#opening .scene {
  width: 100%; height: 100%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#opening .rays {
  position: absolute; inset: 0;
  background:
    conic-gradient(from 0deg,
      transparent 0deg, rgba(255,255,255,.18) 8deg, transparent 16deg,
      transparent 24deg, rgba(255,255,255,.12) 32deg, transparent 40deg);
  animation: spin 12s linear infinite;
  opacity: 0; transition: opacity .4s;
}
#opening.with-rays .rays { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

#opening .stage {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  text-align: center;
  width: min(92vw, 760px);
}
#opening .vault-preview .chest {
  animation: none;
  transition: filter .24s ease, box-shadow .24s ease, transform .24s ease;
}
#opening .vault-preview {
  cursor: pointer;
}
#opening .vault-preview:hover .chest,
#opening .vault-preview .chest:hover {
  transform: translateY(-2px) scale(1.02);
  filter:
    drop-shadow(0 0 14px rgba(255, 112, 112, 0.42))
    drop-shadow(0 0 32px rgba(255, 78, 78, 0.38))
    drop-shadow(0 0 54px rgba(255, 52, 52, 0.22));
  box-shadow:
    0 0 0 1px rgba(255, 126, 126, 0.22),
    0 0 26px rgba(255, 88, 88, 0.26),
    0 0 52px rgba(255, 52, 52, 0.16);
}
#opening .vault-preview:hover .chest::before,
#opening .vault-preview .chest:hover::before {
  background: radial-gradient(circle, rgba(255, 74, 74, 0.78), rgba(255, 74, 74, 0.22) 48%, transparent 76%);
  filter: blur(24px);
  opacity: 1;
}
#opening .vault-preview:hover .chest-image,
#opening .vault-preview .chest:hover .chest-image {
  filter: brightness(1.08) saturate(1.08) drop-shadow(0 0 14px rgba(255, 96, 96, 0.28));
}
#opening .chest-big {
  width: clamp(250px, 32vw, 420px);
  height: clamp(250px, 32vw, 420px);
  margin-bottom: 20px;
  border-radius: 36px;
  filter: drop-shadow(0 28px 38px rgba(0,0,0,.7));
}
#opening .chest-big::before {
  left: 8%;
  right: 8%;
  bottom: 12px;
  height: 28%;
  filter: blur(24px);
}
#opening.shaking .chest-big { animation: chest-shake .38s linear; }
#opening .chest-big.is-opening .chest-image {
  animation: chest-charge .36s ease-out forwards;
  filter: brightness(1.2) saturate(1.24);
}
#opening .chest-big.is-opened .chest-image {
  animation: chest-opened .42s cubic-bezier(.2,.9,.22,1) forwards;
}
@keyframes chest-shake {
  0%, 100% { transform: translate(0,0) rotate(0) scale(1); }
  18% { transform: translate(-8px,-3px) rotate(-2.4deg) scale(1.02); }
  36% { transform: translate(8px,2px) rotate(2.1deg) scale(1.03); }
  54% { transform: translate(-6px,3px) rotate(-1.6deg) scale(1.02); }
  72% { transform: translate(6px,-2px) rotate(1.4deg) scale(1.03); }
}
@keyframes chest-charge {
  0% { transform: scale(1.04) translateY(0) rotate(0); opacity: 1; }
  45% { transform: scale(1.08) translateY(-6px) rotate(-1.2deg); opacity: 1; }
  100% { transform: scale(1.12) translateY(-10px) rotate(1.2deg); opacity: .92; }
}
@keyframes chest-opened {
  0% { transform: scale(.92) translateY(10px); opacity: .5; }
  55% { transform: scale(1.08) translateY(-10px); opacity: 1; }
  100% { transform: scale(1.12) translateY(-6px); opacity: 1; }
}

#opening.hero-reveal-active {
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.10), transparent 22%),
    radial-gradient(circle at 50% 44%, rgba(255, 87, 74, 0.24), transparent 30%),
    radial-gradient(circle at 50% 58%, rgba(137, 81, 255, 0.24), rgba(2, 4, 8, 0.98) 66%);
}
#opening.hero-reveal-active .scene {
  cursor: pointer;
}
#opening.hero-reveal-active .stage {
  width: min(94vw, 680px);
  gap: 12px;
}
#opening.hero-reveal-active .remaining-pill {
  top: 18px;
  right: 18px;
  bottom: auto;
  background: linear-gradient(180deg, rgba(34, 18, 25, 0.94), rgba(10, 9, 14, 0.98));
  border: 1px solid rgba(255, 190, 154, 0.24);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: 0 0 24px rgba(255, 94, 57, 0.12), 0 14px 24px rgba(0,0,0,.34);
}
#opening.hero-reveal-active .remaining-pill .num {
  width: 44px;
  height: 44px;
  background: linear-gradient(180deg, #ffb59b, #ff5b35);
  border-color: rgba(255,255,255,.92);
  box-shadow: 0 0 18px rgba(255, 102, 44, 0.28);
}
#opening.hero-reveal-active .tap-hint {
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffe7d8;
  text-shadow: 0 2px 0 rgba(0,0,0,.55), 0 0 18px rgba(255, 255, 255, 0.18);
}

.hero-reveal {
  position: relative;
  width: min(92vw, 620px);
  min-height: min(76vh, 660px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px 56px;
  isolation: isolate;
}
.hero-reveal__halo,
.hero-reveal__flash {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 50%;
}
.hero-reveal__halo {
  width: min(66vw, 520px);
  height: min(66vw, 520px);
  background:
    radial-gradient(circle, rgba(255,255,255,.24) 0 12%, rgba(255,255,255,.10) 18%, transparent 60%),
    radial-gradient(circle, rgba(255, 91, 59, 0.22), rgba(139, 99, 255, 0.12) 42%, transparent 72%);
  filter: blur(8px);
  opacity: .95;
  animation: hero-reveal-halo 4.8s ease-in-out infinite;
}
.hero-reveal__flash {
  width: min(44vw, 340px);
  height: min(44vw, 340px);
  background: radial-gradient(circle, rgba(255,255,255,.92) 0 18%, rgba(255,255,255,.35) 34%, transparent 72%);
  mix-blend-mode: screen;
  opacity: 0;
}
.hero-reveal__card {
  position: relative;
  width: min(100%, 460px);
  padding: 22px 18px 24px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(28, 24, 40, 0.96), rgba(11, 12, 20, 0.98));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.03),
    0 24px 40px rgba(0,0,0,.52),
    0 0 42px var(--hero-accent);
  overflow: hidden;
  text-align: center;
}
.hero-reveal__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.12), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,.04), transparent 38%, rgba(0,0,0,.20));
  pointer-events: none;
}
.hero-reveal__card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 30px;
  border: 1px solid var(--hero-accent);
  opacity: .6;
  pointer-events: none;
}
.hero-reveal__topline,
.hero-reveal__progress,
.hero-reveal__rarity {
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 900;
}
.hero-reveal__topline {
  color: #ffe9df;
  font-size: 13px;
  opacity: .88;
}
.hero-reveal__progress {
  margin-top: 6px;
  color: var(--hero-accent);
  font-size: 12px;
}
.hero-reveal__portrait {
  position: relative;
  width: min(100%, 310px);
  aspect-ratio: 1 / 1.08;
  margin: 18px auto 14px;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 24%, rgba(255,255,255,.22), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(12, 13, 22, 0.96) 70%);
  border: 1px solid var(--hero-accent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 24px rgba(255,255,255,.08),
    0 0 24px var(--hero-accent);
}
.hero-reveal__portrait::before,
.hero-reveal__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-reveal__portrait::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.18), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.08), transparent 36%);
  z-index: 2;
}
.hero-reveal__portrait::after {
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.hero-reveal__portrait--image {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px 18px 12px;
}
.hero-reveal__art {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  flex: 0 1 auto;
  align-self: flex-end;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  position: relative;
  z-index: 1;
  transform: scale(1);
  filter: saturate(1.08) contrast(1.08) brightness(.96);
}
.hero-reveal__silhouette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.18), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.92) 65%);
  mix-blend-mode: multiply;
  opacity: .88;
}
.hero-reveal__portrait--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.16), transparent 28%),
    linear-gradient(180deg, rgba(70, 36, 92, 0.96), rgba(15, 12, 24, 0.98));
}
.hero-reveal__fallbackMark {
  position: relative;
  z-index: 1;
  font-size: clamp(96px, 18vw, 160px);
  font-weight: 900;
  line-height: 1;
  color: #fff3ea;
  text-shadow:
    0 0 18px rgba(255,255,255,.28),
    0 0 38px rgba(255,255,255,.20);
}
.hero-reveal__name {
  margin-top: 6px;
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 3px 0 rgba(0,0,0,.55), 0 0 18px rgba(255,255,255,.14);
}
.hero-reveal__rarity {
  margin-top: 8px;
  font-size: 13px;
  color: var(--hero-accent);
}

#opening.hero-reveal-active .hero-reveal--impact .hero-reveal__card {
  animation: hero-reveal-impact-pop .26s ease-out both;
}
#opening.hero-reveal-active .hero-reveal--impact .hero-reveal__flash {
  animation: hero-reveal-flash .42s ease-out both;
}
#opening.hero-reveal-active .hero-reveal--silhouette .hero-reveal__portrait,
#opening.hero-reveal-active .hero-reveal--impact .hero-reveal__portrait {
  animation: hero-reveal-silhouette-spin 1.1s linear infinite;
}
#opening.hero-reveal-active .hero-reveal--silhouette .hero-reveal__art,
#opening.hero-reveal-active .hero-reveal--impact .hero-reveal__art {
  filter: grayscale(1) brightness(.05) contrast(1.35);
}
#opening.hero-reveal-active .hero-reveal--silhouette .hero-reveal__silhouette,
#opening.hero-reveal-active .hero-reveal--impact .hero-reveal__silhouette {
  opacity: 1;
}
#opening.hero-reveal-active .hero-reveal--final .hero-reveal__card {
  animation: hero-reveal-final-pop .34s cubic-bezier(.2,.9,.22,1) both;
}
#opening.hero-reveal-active .hero-reveal--final .hero-reveal__flash {
  animation: hero-reveal-flash-final .52s ease-out both;
}
#opening.hero-reveal-active .hero-reveal--final .hero-reveal__art {
  animation: hero-reveal-art-pop .4s cubic-bezier(.2,.9,.22,1) both;
  filter: saturate(1.14) brightness(1.02) contrast(1.1);
}
#opening.hero-reveal-active .hero-reveal--final .hero-reveal__silhouette {
  opacity: 0;
}
#opening.hero-reveal-active .hero-reveal--final .hero-reveal__portrait--fallback .hero-reveal__fallbackMark {
  animation: hero-reveal-final-pop .34s cubic-bezier(.2,.9,.22,1) both;
}

@keyframes hero-reveal-halo {
  0%, 100% { transform: translate(-50%, -50%) scale(.96) rotate(0deg); opacity: .78; }
  50% { transform: translate(-50%, -50%) scale(1.05) rotate(10deg); opacity: 1; }
}
@keyframes hero-reveal-silhouette-spin {
  0% { transform: scale(1.02) rotate(0deg); }
  100% { transform: scale(1.02) rotate(360deg); }
}
@keyframes hero-reveal-impact-pop {
  0% { transform: translateY(18px) scale(.88); opacity: .35; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes hero-reveal-final-pop {
  0% { transform: scale(.88); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes hero-reveal-art-pop {
  0% { transform: scale(1.08); opacity: .3; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes hero-reveal-flash {
  0% { transform: translate(-50%, -50%) scale(.24); opacity: 0; }
  35% { opacity: .94; }
  100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}
@keyframes hero-reveal-flash-final {
  0% { transform: translate(-50%, -50%) scale(.6); opacity: .08; }
  45% { opacity: .66; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}

.reward-title {
  font-size: 36px; font-weight: 900; letter-spacing: 2px;
  text-shadow: 0 4px 0 var(--ink), 0 0 25px rgba(255,255,255,.5);
  margin-bottom: 10px;
}
.reward-art {
  width: 220px; height: 220px;
  display: flex; align-items: center; justify-content: center;
  font-size: 120px;
  filter: drop-shadow(0 0 30px rgba(255,255,200,.7));
  animation: pop .35s ease-out;
}
@keyframes pop {
  0%   { transform: scale(.2); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.reward-amount {
  font-size: 56px; font-weight: 900;
  text-shadow: 0 4px 0 var(--ink);
  margin-top: -10px;
}
.reward-amount--pp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.reward-sub {
  background: linear-gradient(180deg, #7a3cdb, #3d1c70);
  border: 3px solid #fff; border-radius: 16px;
  padding: 6px 24px;
  font-size: 28px; font-weight: 900;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.progress-bar {
  width: 280px; height: 32px;
  background: rgba(0,0,0,.5);
  border: 3px solid var(--ink); border-radius: 16px;
  overflow: hidden; position: relative;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.progress-bar > .fill {
  height: 100%;
  background: linear-gradient(90deg, #6cf08e, #22c358);
  transition: width .6s ease;
}
.progress-bar > .text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
}
.upgrade-tag {
  color: #ffd76a; font-weight: 900; font-size: 18px;
  margin-top: 4px;
  text-shadow: 0 2px 0 var(--ink);
}
.remaining-pill {
  position: absolute; bottom: 30px; right: 24px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-weight: 900;
}
.remaining-pill .rp-label { font-size: 11px; opacity: .85; }
.remaining-pill .num {
  width: 40px; height: 40px;
  background: #ff5c2c; border: 3px solid #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.tap-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  font-weight: 900; font-size: 16px; letter-spacing: 1px;
  opacity: .7; animation: blink 1.4s linear infinite;
}
@keyframes blink { 50% { opacity: .25; } }

/* Summary */
.summary {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  text-align: center;
}
.summary .row {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.sum-card {
  background: linear-gradient(180deg, #2d3553, #1b2138);
  border: 3px solid #fff;
  border-radius: 12px;
  padding: 10px 8px;
  width: 112px;
  min-height: 112px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}
.sum-card .ic { font-size: 52px; }
.sum-card .v  { font-weight: 900; font-size: 14px; }
.sum-card .ic--hero,
.sum-card .ic--equipment {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.46);
}
.sum-card-hero-art,
.sum-card-equipment-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255, 120, 80, 0.28));
}
.sum-card-hero-fallback {
  font-size: 44px;
}

/* ----- Modal & Toast ----- */
.modal-bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.78);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-bg.active { display: flex; }
.modal {
  background: linear-gradient(180deg, rgba(20, 22, 29, 0.98), rgba(11, 13, 18, 0.99));
  border: 1px solid rgba(255, 133, 78, 0.34);
  border-radius: 18px;
  max-width: 420px; width: 100%;
  padding: 18px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 16px 34px rgba(0,0,0,.42);
}
.modal h2 {
  background: linear-gradient(180deg, rgba(53, 27, 25, 0.98), rgba(25, 14, 16, 0.99));
  margin: -18px -18px 14px;
  padding: 12px;
  border-radius: 14px 14px 0 0;
  font-size: 22px; letter-spacing: .08em;
  color: var(--ui-text);
}
.modal p { line-height: 1.5; margin: 8px 0; }

.toast {
  position: absolute; left: 50%; top: 80px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(28, 18, 21, 0.98), rgba(13, 10, 14, 0.99));
  color: var(--ui-text); padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 127, 71, 0.32);
  font-weight: 900; z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .25s, top .25s;
  box-shadow: 0 0 18px rgba(255, 95, 35, 0.18), 0 12px 24px rgba(0,0,0,.28);
}
.toast.show { opacity: 1; top: 96px; }

/* ----- Particles ----- */
.particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute; width: 12px; height: 12px;
  border-radius: 50%; will-change: transform, opacity;
}

/* ----- Responsive ----- */
@media (max-width: 720px) {
  .vault { width: 150px; height: 186px; }
  .chest { width: 138px; height: 138px; }
  .reward-art { font-size: 90px; width: 160px; height: 160px; }
  .reward-amount { font-size: 42px; }
  .reward-title  { font-size: 28px; }
  .vault-row { gap: 10px; }
  .side-btn  { min-width: 0; padding: 8px 10px; font-size: 12px; }
  .side-btn .ic { font-size: 18px; }
  .player-pill { min-width: 110px; }
  .banner { font-size: 13px; padding: 10px; }
  .hero-reveal { width: min(94vw, 560px); min-height: min(74vh, 620px); padding: 20px 12px 52px; }
  .hero-reveal__card { width: min(100%, 400px); border-radius: 24px; }
  .hero-reveal__portrait { width: min(100%, 280px); }
  .hero-reveal__portrait--image { padding: 16px 14px 10px; }
  .hero-reveal__name { font-size: clamp(22px, 4.4vw, 32px); }
  .hero-reveal__rarity { font-size: 12px; }
  #opening.hero-reveal-active .remaining-pill { top: 14px; right: 14px; }
}
@media (min-width: 1400px) {
  .vault-row {
    gap: clamp(34px, 2.4vw, 58px);
  }
  .vault {
    width: 232px;
  }
  .vault .label {
    width: min(100%, 224px);
  }
}
@media (max-width: 520px) {
  .vault-row { gap: 6px; }
  .vault { width: 110px; height: 146px; }
  .chest { width: 104px; height: 104px; border-radius: 20px; }
  .vault .label  { font-size: 14px; padding: 4px 10px; }
  .vault .label .hud-icon.coin,
  .vault .label .hud-icon.gem { width: 34px; height: 34px; }
  .free-vault-top { gap: 6px; left: 10px; right: 40px; }
  .free-ad-btn { min-width: 54px; padding: 5px 8px; font-size: 10px; }
  .free-ad-meta { font-size: 9px; margin-top: 4px; }
  .mem-grid { gap: 6px; }
  .mem-front, .mem-back { font-size: 28px; }
  .hero-reveal { width: 100vw; min-height: min(72vh, 560px); padding: 16px 8px 46px; }
  .hero-reveal__card { width: min(100%, 340px); padding: 18px 14px 18px; border-radius: 22px; }
  .hero-reveal__portrait { width: min(100%, 240px); border-radius: 22px; margin: 14px auto 12px; }
  .hero-reveal__portrait--image { padding: 14px 12px 10px; }
  .hero-reveal__topline { font-size: 11px; }
  .hero-reveal__name { font-size: 22px; letter-spacing: .06em; }
  .hero-reveal__rarity { font-size: 11px; letter-spacing: .14em; }
  .hero-reveal__fallbackMark { font-size: 112px; }
  #opening.hero-reveal-active .remaining-pill { top: 10px; right: 10px; }
  #opening.hero-reveal-active .tap-hint { bottom: 12px; font-size: 13px; letter-spacing: .12em; }
}

/* ============== DAILY LOGIN ============== */
#dailyLogin {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 2.4vw, 18px);
  background:
    radial-gradient(circle at 50% 16%, rgba(170, 44, 29, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(7, 5, 8, 0.95), rgba(4, 3, 5, 0.98));
  z-index: 1000;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#dailyLogin::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 30% 25%, rgba(255, 109, 70, 0.08), transparent 22%),
    radial-gradient(circle at 75% 70%, rgba(173, 34, 28, 0.06), transparent 20%);
  opacity: 0.16;
}

#dailyLogin.active { display: flex; }
#dailyLogin > * { position: relative; z-index: 1; }

.d-modal {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1040px, 100%);
  max-height: calc(100dvh - clamp(20px, 6vw, 40px));
  padding: 24px 20px 20px;
  border-radius: 24px;
  border: 1px solid rgba(236, 116, 90, 0.26);
  background: linear-gradient(180deg, rgba(22, 14, 18, 0.97), rgba(9, 7, 10, 0.99));
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 18px 44px rgba(0, 0, 0, 0.52),
    0 0 40px rgba(181, 50, 32, 0.16);
  color: #f4ece7;
  text-align: center;
  overflow: hidden;
}

.d-modal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 12%, rgba(255, 110, 72, 0.06) 13%, transparent 14% 48%, rgba(255, 110, 72, 0.04) 49%, transparent 50% 100%),
    radial-gradient(circle at 50% 0, rgba(255, 121, 84, 0.08), transparent 35%);
  opacity: 0.8;
}

.d-header {
  position: relative;
  margin-bottom: 16px;
}

.d-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f5e4db;
  text-shadow: 0 0 20px rgba(212, 71, 48, 0.24);
}

.d-sub {
  max-width: 700px;
  margin: 8px auto 0;
  color: rgba(236, 221, 214, 0.78);
  font-weight: 600;
  line-height: 1.45;
}

.d-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
  margin-bottom: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px 6px 6px 0;
}

.d-card {
  position: relative;
  min-height: 228px;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 126, 74, 0.16);
  background: linear-gradient(180deg, rgba(25, 20, 24, 0.96), rgba(11, 10, 13, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
}

.d-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 118, 74, 0.06), transparent 30%),
    radial-gradient(circle at 100% 0, rgba(255, 118, 74, 0.08), transparent 35%);
}

.d-card.is-now {
  transform: translateY(-4px);
  border-color: rgba(255, 149, 104, 0.46);
  box-shadow:
    0 0 0 1px rgba(255, 168, 122, 0.08),
    0 0 30px rgba(187, 59, 35, 0.20),
    0 16px 28px rgba(0, 0, 0, 0.36);
}

.d-card.is-past {
  opacity: 0.74;
  filter: saturate(0.76);
}

.d-card.is-future {
  opacity: 0.92;
}

.d-card__day {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 221, 214, 0.56);
}

.d-card__tag {
  align-self: flex-start;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 141, 97, 0.18);
  background: rgba(46, 18, 20, 0.86);
  color: #f0cabc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.d-card.is-now .d-card__tag {
  background: linear-gradient(180deg, #ffb08b, #ff6d46);
  border-color: rgba(255, 231, 216, 0.72);
  color: #220c08;
}

.d-card__symbol {
  margin-top: 14px;
  font-size: 34px;
  line-height: 1;
}

.d-card__title {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #f5e7df;
}

.d-card__flavor {
  margin-top: 8px;
  min-height: 56px;
  color: rgba(236, 221, 214, 0.72);
  font-size: 13px;
  line-height: 1.35;
}

.d-card__effect {
  margin-top: auto;
  padding-top: 14px;
  color: #ffbe9e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.d-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 129, 80, 0.20);
  background: linear-gradient(180deg, rgba(41, 17, 20, 0.94), rgba(14, 10, 12, 0.98));
  color: #ffd7c3;
  font-weight: 700;
}

.d-streak.muted {
  color: rgba(236, 221, 214, 0.68);
  opacity: 1;
}

#dailyClaim {
  justify-self: center;
  min-width: 280px;
  margin-top: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 136, 86, 0.36);
  background: linear-gradient(180deg, rgba(53, 22, 24, 0.98), rgba(15, 11, 14, 0.98));
  color: #f7ede8;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 24px rgba(190, 58, 37, 0.16), 0 10px 22px rgba(0,0,0,.30);
}

#dailyClaim:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 164, 121, 0.55);
}

@media (max-width: 1024px) {
  .d-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .d-card {
    min-height: 182px;
  }
}

@media (max-width: 720px) {
  #dailyLogin {
    align-items: stretch;
  }

  .d-modal {
    max-height: calc(100dvh - 16px);
    padding: 18px 14px 16px;
  }

  .d-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-right: 2px;
  }

  .d-card {
    min-height: 162px;
  }

  .d-title {
    font-size: clamp(22px, 6vw, 30px);
    letter-spacing: 0.10em;
  }

  .d-card__symbol {
    margin-top: 10px;
    font-size: 30px;
  }

  .d-card__title {
    margin-top: 10px;
    font-size: 15px;
  }

  .d-card__flavor {
    min-height: 0;
    font-size: 12px;
  }

  .d-card__effect {
    padding-top: 10px;
    letter-spacing: 0.08em;
  }

  #dailyClaim {
    width: 100%;
    min-width: 0;
    margin-top: 14px;
  }
}

/* ============== TROPHY ROAD ============== */
#trophyRoad {
  position: relative;
  overflow: hidden;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(233, 89, 66, 0.16), transparent 28%),
    radial-gradient(circle at 18% 24%, rgba(255, 112, 79, 0.08), transparent 16%),
    radial-gradient(circle at 84% 20%, rgba(255, 128, 88, 0.06), transparent 14%),
    linear-gradient(180deg, rgba(8, 5, 7, 0.98), rgba(17, 8, 10, 0.98) 42%, rgba(8, 5, 6, 0.98));
}
#trophyRoad::before,
#trophyRoad::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#trophyRoad::before {
  background:
    radial-gradient(circle at 32% 38%, rgba(255,255,255,.035), transparent 2px) 0 0 / 180px 180px,
    radial-gradient(circle at 70% 68%, rgba(255,255,255,.03), transparent 2px) 0 0 / 220px 220px;
  opacity: .46;
  animation: tr-spores 12s linear infinite;
}
#trophyRoad::after {
  background:
    linear-gradient(112deg, transparent 0 18%, rgba(163, 46, 36, 0.12) 19%, transparent 20% 48%, rgba(163, 46, 36, 0.08) 49%, transparent 50% 100%),
    linear-gradient(64deg, transparent 0 22%, rgba(255, 127, 88, 0.06) 23%, transparent 24% 100%);
  opacity: .5;
  filter: blur(10px);
}
#trophyRoad > * { position: relative; z-index: 1; }
#trophyRoad .screen-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
#trophyRoad .screen-title {
  text-align: center;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(233, 89, 66, 0.22);
}
.home-btn {
  width: 44px; height: 44px;
  border: 1px solid var(--ui-border-strong);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(31, 22, 24, 0.98), rgba(13, 10, 14, 0.98));
  color: var(--ui-text);
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(255, 102, 44, 0.14), 0 8px 18px rgba(0,0,0,.3);
}
.tr-sub {
  max-width: 960px;
  margin: 0 auto 16px;
  padding: 14px 18px;
  border-radius: 20px;
  text-align: center;
  color: #cdb9b1;
  font-weight: 700;
  line-height: 1.55;
  background: linear-gradient(180deg, rgba(31, 10, 12, 0.82), rgba(11, 7, 8, 0.9));
  border: 1px solid rgba(211, 84, 66, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.tr-track {
  position: relative;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 34px 18px 46px;
  scroll-snap-type: x mandatory;
  align-items: flex-start;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(27, 10, 12, 0.7), rgba(9, 6, 7, 0.84)),
    radial-gradient(circle at 50% 0, rgba(233, 89, 66, 0.08), transparent 70%);
  border: 1px solid rgba(200, 76, 59, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 36px rgba(0,0,0,.22);
}
.drag-scroll-enabled {
  cursor: grab;
  touch-action: pan-y;
}
.drag-scroll-enabled.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.tr-track.is-dragging {
  scroll-snap-type: none;
}
.tr-track::before,
.tr-track::after {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  border-radius: 999px;
  pointer-events: none;
}
.tr-track::before {
  top: 46%;
  height: 12px;
  background: linear-gradient(90deg, rgba(63, 20, 18, 0.18), rgba(178, 48, 40, 0.92), rgba(63, 20, 18, 0.18));
  box-shadow: 0 0 18px rgba(233, 89, 66, 0.22), 0 0 44px rgba(233, 89, 66, 0.12);
  animation: tr-vein-pulse 3.8s ease-in-out infinite;
}
.tr-track::after {
  top: calc(46% - 10px);
  bottom: calc(54% - 10px);
  border-top: 1px solid rgba(214, 84, 64, 0.24);
  border-bottom: 1px solid rgba(214, 84, 64, 0.16);
  filter: blur(4px);
}
.tr-track::-webkit-scrollbar { height: 8px; }
.tr-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }

.tr-node {
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 176px;
  position: relative;
  z-index: 1;
}
.tr-node.next { min-width: 228px; transform: translateY(-8px); }
.tr-badge {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  color: #fff1ea;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  background: linear-gradient(180deg, rgba(104, 24, 19, 0.98), rgba(38, 11, 12, 0.98));
  border: 1px solid rgba(243, 129, 98, 0.42);
  box-shadow: 0 0 22px rgba(233, 89, 66, 0.16);
  margin-bottom: 4px;
}
.tr-card {
  width: 100%;
  min-height: 226px;
  padding: 16px 14px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.04);
  background:
    linear-gradient(180deg, rgba(51, 13, 16, 0.98), rgba(15, 8, 10, 0.98)),
    radial-gradient(circle at 50% 0, rgba(255,255,255,.04), transparent 70%);
  box-shadow: 0 14px 28px rgba(0,0,0,.34);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, opacity .22s ease;
}
.tr-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(241, 110, 83, 0.16), transparent 34%),
    linear-gradient(122deg, transparent 0 19%, rgba(255,255,255,.03) 20%, transparent 22% 100%);
  pointer-events: none;
}
.tr-card::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 10px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(241, 110, 83, 0.16), transparent 72%);
  filter: blur(12px);
  pointer-events: none;
}
.tr-node:hover .tr-card {
  transform: translateY(-4px);
  border-color: rgba(246, 132, 98, 0.26);
}
.tr-node.next .tr-card {
  border-color: rgba(244, 129, 96, 0.44);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.02),
    0 0 24px rgba(233, 89, 66, 0.18),
    0 18px 34px rgba(0,0,0,.38);
  animation: tr-next-breathe 2.8s ease-in-out infinite;
}
.tr-node.claimed .tr-card {
  opacity: .56;
  filter: grayscale(.18) saturate(.88);
}
.tr-node.future .tr-card {
  opacity: .82;
}
.tr-node.reachable:not(.next) .tr-card {
  border-color: rgba(230, 113, 88, 0.28);
  box-shadow: 0 0 18px rgba(233, 89, 66, 0.1), 0 14px 28px rgba(0,0,0,.34);
}

.tr-relic {
  width: 110px;
  height: 122px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.08), transparent 24%),
    linear-gradient(180deg, rgba(68, 19, 20, 0.98), rgba(18, 8, 10, 0.98));
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.tr-relic::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.03);
}
.tr-node.next .tr-relic {
  width: 126px;
  height: 142px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 18px rgba(241, 110, 83, 0.16);
}
.tr-veins,
.tr-veins::before,
.tr-veins::after {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
  pointer-events: none;
}
.tr-veins {
  left: 12px;
  right: 12px;
  top: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(127, 44, 37, 0.9), transparent);
}
.tr-veins::before {
  left: 10px;
  right: 18px;
  bottom: -44px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(127, 44, 37, 0.88), transparent);
}
.tr-veins::after {
  width: 2px;
  top: -16px;
  bottom: -56px;
  right: 24px;
  background: linear-gradient(180deg, transparent, rgba(127, 44, 37, 0.74), transparent);
}
.tr-core {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 0 24px rgba(241, 110, 83, 0.18);
}
.tr-node.next .tr-core {
  width: 92px;
  height: 92px;
  border-radius: 28px;
}
.tr-core-glyph {
  font-size: 42px;
  line-height: 1;
  filter: drop-shadow(0 0 14px rgba(255,255,255,.08));
}
.tr-node.next .tr-core-glyph { font-size: 52px; }
.tr-core-image {
  width: 92%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 142, 90, 0.18));
}

.tr-card--coins .tr-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 248, 207, 0.26), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(255, 190, 88, 0.92), rgba(118, 52, 12, 0.96));
}
.tr-card--gems .tr-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.24), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(119, 215, 255, 0.86), rgba(11, 57, 86, 0.96));
}
.tr-card--hero .tr-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.22), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(255, 157, 97, 0.88), rgba(97, 32, 18, 0.96));
}
.tr-card--box-small .tr-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.16), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(127, 197, 255, 0.56), rgba(33, 64, 104, 0.94));
}
.tr-card--box-big .tr-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.16), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(169, 130, 255, 0.54), rgba(49, 21, 85, 0.94));
}
.tr-card--box-large .tr-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.18), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(255, 174, 58, 0.78), rgba(98, 46, 12, 0.96));
}
.tr-card--box-apex .tr-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.18), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(255, 81, 54, 0.82), rgba(88, 20, 14, 0.96));
}

.tr-state {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 8, 9, 0.88);
  border: 1px solid rgba(255,255,255,.05);
  color: #f2ddd2;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.tr-node.next .tr-state,
.tr-node.reachable:not(.claimed) .tr-state {
  background: linear-gradient(180deg, rgba(94, 24, 19, 0.98), rgba(35, 11, 12, 0.98));
  border-color: rgba(244, 129, 96, 0.34);
  box-shadow: 0 0 18px rgba(233, 89, 66, 0.12);
}
.tr-label {
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(43, 15, 16, 0.92), rgba(17, 9, 10, 0.96));
  border: 1px solid rgba(255,255,255,.05);
  color: #fff0e8;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.tr-claim {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 7px 12px;
  font-size: 10px;
  letter-spacing: .14em;
  border-radius: 10px;
  box-shadow: 0 0 14px rgba(233, 89, 66, 0.12);
}
.tr-check,
.tr-lock {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(12, 7, 8, 0.82);
  border: 1px solid rgba(255,255,255,.05);
}
.tr-check {
  color: #88f4aa;
  font-size: 18px;
}
.tr-lock {
  color: #f1dfd7;
  font-size: 16px;
  opacity: .94;
}
.tr-threshold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(40, 12, 13, 0.96), rgba(13, 8, 9, 0.98));
  border: 1px solid rgba(224, 100, 76, 0.22);
  color: #ffdfcf;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 10px 18px rgba(0,0,0,.24);
}
.tr-threshold-ic { font-size: 14px; }
.tr-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 12px auto 0;
  padding: 12px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(88, 21, 18, 0.96), rgba(23, 8, 10, 0.98));
  border: 1px solid rgba(245, 125, 92, 0.34);
  color: #fff0e6;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .08em;
  box-shadow: 0 0 22px rgba(233, 89, 66, 0.14), 0 12px 24px rgba(0,0,0,.24);
}
.tr-claim-all {
  position: fixed;
  right: 20px;
  bottom: 18px;
  z-index: 5;
}

@keyframes tr-vein-pulse {
  0%, 100% { opacity: .82; transform: translateY(-50%) scaleX(1); }
  50% { opacity: 1; transform: translateY(-50%) scaleX(1.025); }
}
@keyframes tr-next-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes tr-spores {
  from { transform: translateY(0); }
  to { transform: translateY(22px); }
}
@media (prefers-reduced-motion: reduce) {
  #trophyRoad::before,
  .tr-track::before,
  .tr-node.next .tr-card {
    animation: none;
  }
}

/* ============== PROFILE ============== */
#profile { padding: 14px; }
#profile .screen-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center; gap: 10px;
  margin-bottom: 14px;
}
#profile .screen-title {
  text-align: center;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 1px;
  text-shadow: 0 3px 0 #0c1a4a;
}

.pf-tabs,
.pf-subtabs {
  display: flex;
  gap: 8px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto 14px;
}
.pf-tab,
.pf-subtab {
  flex: 1;
  border: 3px solid #0c1a4a;
  border-radius: 14px;
  padding: 10px 12px;
  font-weight: 900;
  letter-spacing: .8px;
  color: #f7ece8;
  background: linear-gradient(180deg, rgba(40, 12, 13, 0.96), rgba(13, 8, 9, 0.98));
}
.pf-tab.active,
.pf-subtab.active {
  color: #241108;
  background: linear-gradient(180deg, #ffcf45, #ff9a2e);
}
.pf-pane[hidden] { display: none !important; }
.pf-pane--leaderboard {
  min-height: 0;
}

.pf-top {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  background: rgba(0,0,0,.25);
  padding: 14px;
  border-radius: 18px;
  border: 3px solid #0c1a4a;
  margin: 0 auto 14px;
  max-width: 720px;
  width: 100%;
}
.pf-avatar {
  --pf-avatar-accent: #7fb6ff;
  width: 100px; height: 100px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2d3553, #0f1530);
  border: 4px solid var(--pf-avatar-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(127, 182, 255, 0.18), 0 8px 18px rgba(0,0,0,.22);
}
.pf-avatar-art {
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.24));
}
.pf-avatar-glyph {
  font-size: 56px;
  line-height: 1;
}
.pf-center { display: flex; flex-direction: column; gap: 8px; }
.pf-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-lvl {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(180deg,#ffcf45,#ff9a2e);
  color: #3a1b00;
  font-weight: 900; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 3px solid #0c1a4a;
}
.pf-name {
  flex: 1; min-width: 120px;
  background: rgba(0,0,0,.35);
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 900; font-size: 18px;
}
.pf-xpbar {
  position: relative;
  height: 22px;
  background: rgba(0,0,0,.35);
  border: 2px solid #0c1a4a;
  border-radius: 12px;
  overflow: hidden;
}
.pf-xpbar > div:first-child {
  height: 100%;
  background: linear-gradient(180deg,#4ade80,#1b9f4a);
  transition: width .2s ease;
}
.pf-xptext {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px;
  text-shadow: 0 1px 0 #000;
}
.pf-id {
  opacity: .75; font-weight: 800; font-size: 13px;
}

.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.pf-equipment {
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
}
.pf-equipment-layout {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(260px, .72fr);
  gap: 16px;
  align-items: stretch;
  min-height: 0;
}
.pf-equipment-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  border: 3px solid rgba(255, 39, 39, 0.48);
  background: linear-gradient(180deg, rgba(8, 4, 5, 0.96), rgba(0, 0, 0, 0.98));
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.16), 0 18px 34px rgba(0,0,0,.38);
}
.pf-equipment-kicker {
  color: #ffb39a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
}
.pf-equipment-title {
  margin-top: 8px;
  color: #fff3eb;
  font-size: 28px;
  font-weight: 900;
}
.pf-equipment-text {
  margin-top: 10px;
  color: #ffe8d5;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}
.pf-equipment-frame {
  position: relative;
  align-self: stretch;
  min-height: min(72vh, 980px);
  border-radius: 22px;
  border: 2px solid rgba(255, 39, 39, 0.45);
  background: #000;
  overflow: hidden;
}
.pf-equipment-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.pf-equipment-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 106, .32);
  background: rgba(0, 0, 0, .56);
  color: #fff7df;
  font-size: 14px;
  font-weight: 900;
}
.pf-equipment-summary span {
  color: #ffd76a;
}
.pf-equipment-slot-map {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.pf-equipment-slot {
  appearance: none;
  position: absolute;
  width: clamp(84px, 17%, 136px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 20px;
  border: 2px dashed rgba(255, 39, 39, .18);
  background: rgba(0, 0, 0, .02);
  text-align: center;
  font: inherit;
  cursor: pointer;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.pf-equipment-slot--head { left: 50%; top: 15.6%; }
.pf-equipment-slot--handLeft { left: 21.8%; top: 37.1%; }
.pf-equipment-slot--handRight { left: 78.1%; top: 37.1%; }
.pf-equipment-slot--legs { left: 22.8%; top: 70.8%; }
.pf-equipment-slot--shoes { left: 77.2%; top: 70.8%; }
.pf-equipment-slot--body {
  left: 50%;
  top: 46.9%;
  width: clamp(72px, 13.4%, 116px);
  border-radius: 18px;
  background: rgba(0, 0, 0, .68);
  border-color: rgba(255, 39, 39, .26);
}
.pf-equipment-slot.filled {
  border-style: solid;
  border-color: var(--rar, #ffd76a);
  background: rgba(0, 0, 0, .86);
  box-shadow:
    inset 0 0 16px rgba(255,255,255,.05),
    0 0 16px color-mix(in srgb, var(--rar, #ffd76a) 32%, transparent);
}
.pf-equipment-slot-label {
  color: #ffb39a;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.pf-equipment-slot-art {
  width: min(72%, 68px);
  height: min(72%, 68px);
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .45));
}
.pf-equipment-slot-name,
.pf-equipment-slot-power,
.pf-equipment-slot-empty {
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0,0,0,.8);
  max-width: 100%;
}
.pf-equipment-slot-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pf-equipment-slot-power {
  color: #ffd76a;
}
.pf-equipment-slot-empty {
  color: #8f7a70;
}
.pf-equipment-inventory {
  margin-top: 0;
  padding: 16px;
  border-radius: 22px;
  border: 2px solid rgba(255, 39, 39, 0.34);
  background: linear-gradient(180deg, rgba(5, 3, 4, 0.92), rgba(0, 0, 0, 0.98));
  max-height: min(64vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pf-equipment-inventory::-webkit-scrollbar {
  width: 8px;
}
.pf-equipment-inventory::-webkit-scrollbar-thumb {
  background: rgba(255, 39, 39, .32);
  border-radius: 999px;
}
.pf-equipment-inventory-title {
  color: #ffe8d5;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.pf-equipment-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.pf-enhance-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 2px solid rgba(255, 215, 106, .34);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 215, 106, .12), transparent 70%),
    linear-gradient(180deg, rgba(31, 12, 8, .94), rgba(0, 0, 0, .96));
}
.pf-enhance-panel[hidden] {
  display: none;
}
.pf-enhance-copy {
  display: grid;
  gap: 4px;
  color: #ffe8d5;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}
.pf-enhance-copy b {
  color: #ffd76a;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.pf-enhance-slots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pf-enhance-slot {
  appearance: none;
  min-height: 154px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 9px;
  border-radius: 16px;
  border: 2px dashed rgba(255, 215, 106, .28);
  background: rgba(0, 0, 0, .58);
  color: #fff5e6;
  text-align: center;
  font: inherit;
  cursor: pointer;
}
.pf-enhance-slot.filled {
  border-style: solid;
  border-color: var(--rar, #ffd76a);
  box-shadow: 0 0 18px color-mix(in srgb, var(--rar, #ffd76a) 28%, transparent);
}
.pf-enhance-slot-label,
.pf-enhance-meta {
  color: #ffb39a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pf-enhance-slot-art {
  width: 62px;
  height: 62px;
  object-fit: contain;
  object-position: center center;
}
.pf-enhance-slot-name,
.pf-enhance-slot-power,
.pf-enhance-slot-empty {
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.12;
}
.pf-enhance-slot-power,
.pf-enhance-meta {
  color: #ffd76a;
}
.pf-enhance-btn {
  width: 100%;
  justify-content: center;
}
.pf-equipment-inventory-empty {
  color: #d9b7a2;
  font-size: 13px;
  font-weight: 800;
}
.pf-equipment-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 12px;
}
.pf-equipment-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 2px solid var(--rar, rgba(255,255,255,.32));
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.1), rgba(0,0,0,.82) 62%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 18px rgba(0,0,0,.28);
  position: relative;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pf-equipment-item.equipped {
  border-color: #ffd76a;
  box-shadow: inset 0 0 18px rgba(255,215,106,.08), 0 0 22px rgba(255,39,39,.18), 0 12px 22px rgba(0,0,0,.34);
}
.pf-equipment-item.enhance-selected {
  border-color: #ffd76a;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 215, 106, .22), rgba(0,0,0,.84) 64%),
    linear-gradient(180deg, rgba(40, 10, 8, .8), rgba(0,0,0,.9));
}
.pf-equipment-item-art {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(0,0,0,.4);
  padding: 8px;
}
.pf-equipment-item-name {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
}
.pf-equipment-item-rarity {
  color: var(--rar, #ffd84a);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pf-equipment-item-slot {
  color: #ffb39a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.pf-equipment-item-power,
.pf-equipment-item-state {
  color: #ffe8b4;
  font-size: 11px;
  font-weight: 900;
}
.pf-equipment-item-state {
  color: #ffb39a;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pf-equipment-item:is(:hover, :focus-visible, :active)::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 4;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 39, 39, .6);
  background: rgba(0, 0, 0, .94);
  color: #fff3d4;
  font-size: 12px;
  font-weight: 900;
  width: max-content;
  max-width: min(240px, calc(100vw - 40px));
  white-space: normal;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 0 18px rgba(255, 0, 0, .22);
  pointer-events: none;
}
@media (max-width: 520px) {
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-top  { grid-template-columns: 80px 1fr; }
  .pf-avatar { width: 72px; height: 72px; font-size: 40px; }
  .pf-equipment-layout { grid-template-columns: minmax(0, 1fr) minmax(132px, 42vw); gap: 10px; }
  .pf-equipment-card { grid-template-columns: minmax(156px, .62fr) minmax(0, 1fr); padding: 12px; gap: 10px; }
  .pf-equipment-title { font-size: 22px; }
  .pf-equipment-frame { min-height: min(62vh, 720px); }
  .pf-equipment-slot { width: clamp(56px, 18vw, 92px); border-radius: 14px; padding: 6px; }
  .pf-equipment-slot--body { width: clamp(52px, 14vw, 84px); }
  .pf-equipment-slot-art { width: min(68%, 44px); height: min(68%, 44px); }
  .pf-equipment-slot-label,
  .pf-equipment-slot-name,
  .pf-equipment-slot-power,
  .pf-equipment-slot-empty { font-size: 8px; }
  .pf-equipment-inventory { padding: 10px; max-height: min(64vh, 520px); }
  .pf-equipment-inventory-title { font-size: 10px; letter-spacing: .08em; }
  .pf-equipment-inventory-grid { grid-template-columns: 1fr; gap: 8px; }
  .pf-equipment-item { padding: 8px; gap: 5px; border-radius: 13px; }
  .pf-equipment-item-name { font-size: 10px; }
  .pf-equipment-item-rarity,
  .pf-equipment-item-power,
  .pf-equipment-item-state { font-size: 9px; }
}
.pf-leaderboard-list {
  --leaderboard-metric-color: #ffe8b4;
  display: grid;
  gap: 10px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.pf-leaderboard-list::-webkit-scrollbar {
  width: 8px;
}
.pf-leaderboard-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.2);
  border-radius: 999px;
}
.pf-leaderboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.drag-scroll-enabled-vertical {
  touch-action: pan-x;
  cursor: grab;
}
.drag-scroll-enabled-vertical.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.pf-leaderboard-card {
  display: grid;
  grid-template-columns: 56px 72px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 3px solid #0c1a4a;
  background: linear-gradient(180deg, rgba(39, 16, 18, 0.96), rgba(13, 8, 10, 0.98));
  color: #fff7e8;
}
.pf-leaderboard-attack {
  min-width: 108px;
  align-self: stretch;
}
.pf-leaderboard-rank {
  font-size: 26px;
  font-weight: 900;
  text-align: center;
  color: #ffd76a;
}
.pf-leaderboard-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid var(--rar, #7fb6ff);
  background: linear-gradient(180deg, #2d3553, #0f1530);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pf-leaderboard-avatar .portrait-art {
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.32));
}
.pf-leaderboard-avatar .portrait-glyph {
  font-size: 34px;
}
.pf-leaderboard-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pf-leaderboard-name {
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-leaderboard-meta,
.pf-leaderboard-side {
  font-size: 12px;
  font-weight: 800;
  color: var(--leaderboard-metric-color);
  opacity: 1;
  text-shadow: 0 1px 6px rgba(0,0,0,.62);
}
.pf-leaderboard-side {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--leaderboard-metric-color);
}
.pf-leaderboard-you {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: #241108;
  background: linear-gradient(180deg, #ffcf45, #ff9a2e);
}
.leader-profile-hero,
.leader-profile-summary,
.leader-profile-grid,
.leader-profile-equipment,
.leader-profile-heroes {
  max-width: 720px;
  width: 100%;
  margin: 0 auto 14px;
}
.leader-profile-hero,
.leader-profile-summary,
.leader-profile-grid > *,
.leader-profile-equipment,
.leader-profile-heroes {
  border-radius: 18px;
  border: 3px solid #0c1a4a;
  background: linear-gradient(180deg, rgba(39, 16, 18, 0.96), rgba(13, 8, 10, 0.98));
}
.leader-profile-hero,
.leader-profile-summary,
.leader-profile-equipment,
.leader-profile-heroes {
  padding: 14px;
}
.leader-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.leader-profile-tile {
  padding: 12px 10px;
  text-align: center;
}
.leader-profile-heroes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 10px;
}
.leader-profile-equipment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 14px;
  align-items: center;
}
.leader-profile-equipment-copy {
  display: grid;
  gap: 8px;
}
.leader-profile-equipment-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #fff1e8;
  font-weight: 900;
}
.leader-profile-equipment-stats span {
  padding: 7px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 215, 106, 0.22);
  background: rgba(0, 0, 0, 0.42);
}
.leader-profile-equipment-frame {
  border-radius: 18px;
  border: 2px solid rgba(255, 39, 39, 0.38);
  background: radial-gradient(circle at 50% 35%, rgba(255, 40, 40, 0.16), rgba(0, 0, 0, 0.78));
  overflow: hidden;
}
.leader-profile-equipment-art {
  display: block;
  width: 100%;
  height: auto;
}
.pf-tile {
  background: rgba(0,0,0,.3);
  border: 3px solid #0c1a4a;
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 96px;
  justify-content: center;
}
.pf-tile-label {
  font-size: 11px;
  opacity: .85;
  font-weight: 800;
  letter-spacing: .5px;
  line-height: 1.2;
}
.pf-tile-icon { font-size: 28px; line-height: 1; }
.pf-tile-value {
  font-weight: 900; font-size: 18px;
  letter-spacing: .3px;
}

/* ============== PASS REDESIGN ============== */
#pass { padding: 10px; background: linear-gradient(180deg, #4b2e8a 0%, #2a1555 100%); }

.pass-header {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 4px 6px;
  margin-bottom: 10px;
}
.pass-season {
  display: flex; flex-direction: column;
  align-self: stretch;
  justify-content: center;
  padding: 6px 14px;
  background: linear-gradient(135deg, #5b3ab2, #3a1f78);
  border: 3px solid #0c0a2a;
  border-radius: 14px;
  transform: skew(-6deg);
}
.ps-sub { font-size: 11px; opacity: .85; font-weight: 800; letter-spacing: 1px; transform: skew(6deg); }
.ps-title { font-size: 18px; font-weight: 900; letter-spacing: 1px; transform: skew(6deg); text-shadow: 0 2px 0 #1a0a3f; }

.pass-tabs {
  display: inline-flex;
  background: #1a0a3f;
  border-radius: 12px;
  padding: 4px;
  border: 3px solid #0c0a2a;
}
.ptab {
  background: transparent;
  border: none;
  color: #fff;
  font-weight: 900;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 1px;
}
.ptab.active {
  background: linear-gradient(180deg, #ff5c2c, #e03010);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.3);
}

.pass-progress-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 6px 10px;
}
.ppb-fill {
  position: relative;
  height: 26px;
  background: #1a0a3f;
  border: 3px solid #0c0a2a;
  border-radius: 14px;
  overflow: hidden;
}
.ppb-fill > div:first-child {
  height: 100%;
  background: linear-gradient(180deg, #ff5c2c, #e03010);
  transition: width .2s ease;
}
.ppb-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px;
  text-shadow: 0 1px 0 #000;
}
.ppb-level {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffcf45, #ff9a2e);
  color: #3a1b00;
  font-weight: 900; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 3px solid #0c0a2a;
}

.pass-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

#passRewardsPane {
  gap: 10px;
}
.pass-buy-col {
  flex: 0 0 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
}
.pbc-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffcf45, #ff9a2e);
  border: 3px solid #0c0a2a;
  color: #3a1b00;
  gap: 8px;
  text-align: center;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
  min-height: 270px;
}
.pbc-card.pbc-owned { background: linear-gradient(180deg, #6cf08e, #2ea84a); color: #0a2f10; }
.pbc-ic { font-size: 48px; line-height: 1; }
.pbc-label { font-weight: 900; font-size: 14px; letter-spacing: 1px; }
.pbc-sub { font-size: 11px; font-weight: 800; opacity: .9; }

.pass-track {
  flex: 1;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  align-items: center;
}
.pass-track.is-dragging {
  scroll-snap-type: none;
}
.pass-track::-webkit-scrollbar { height: 8px; }
.pass-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }
.pass-col {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
  min-width: 116px;
  align-items: center;
  flex-shrink: 0;
}
.pass-col.current .ptk-card { box-shadow: 0 0 0 3px #ffe27a inset; }
.pass-row { display: flex; justify-content: center; }
.ptk-card {
  position: relative;
  width: 108px; min-height: 116px;
  border-radius: 14px;
  border: 3px solid #0c0a2a;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 8px;
  background: linear-gradient(180deg, #6a4ac2, #3a1f78);
}
.ptk-card.premium { background: linear-gradient(180deg, #ff6fff, #9c29c7); }
.ptk-card.free    { background: linear-gradient(180deg, #5b3ab2, #2a1555); }
.ptk-card.claimed { opacity: .5; filter: grayscale(.5); }
.ptk-card.locked  { opacity: .8; }
.ptk-ic { font-size: 44px; line-height: 1; }
.ptk-v  { font-size: 13px; font-weight: 900; text-align: center; line-height: 1.1; }
.ptk-check {
  position: absolute; top: 4px; right: 6px;
  font-size: 18px; color: #6cf08e; text-shadow: 0 1px 0 #0c0a2a;
}
.ptk-lock {
  position: absolute; top: 4px; right: 6px;
  font-size: 16px; opacity: .9;
}
.ptk-claim {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, #ffcf45, #ff9a2e);
  color: #3a1b00;
  border: 2px solid #0c0a2a;
  border-radius: 8px;
  font-weight: 900;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .5px;
}
.pass-lv {
  font-weight: 900;
  font-size: 12px;
  color: #ffd76a;
  text-align: center;
  background: #1a0a3f;
  border: 2px solid #0c0a2a;
  border-radius: 10px;
  padding: 4px 6px;
}

/* Quests pane */
#passQuestsPane { flex-direction: column; padding: 0 6px; overflow-y: auto; }
.pq-top { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.pq-cols {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (max-width: 720px) { .pq-cols { gap: 10px; } }
.pq-col { display: flex; flex-direction: column; gap: 8px; }
.pq-title {
  font-weight: 900; font-size: 14px;
  color: #ffd76a;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 #0c0a2a;
  padding: 4px 0;
}
.pq-sub { font-size: 11px; opacity: .8; font-weight: 700; color: #fff; margin-left: 6px; }
.pq-list { display: flex; flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px; scroll-snap-type: x proximity; }
.pq-card {
  background: #1a0a3f;
  border: 3px solid #0c0a2a;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto auto;
  gap: 6px 10px;
  position: relative;
  min-width: clamp(260px, 34vw, 360px);
  scroll-snap-align: start;
}
.pq-card.done   { border-color: #4ad36a; box-shadow: 0 0 0 2px rgba(74,211,106,.2) inset; }
.pq-card.claimed { opacity: .5; filter: grayscale(.5); }
.pq-ic {
  grid-row: 1 / 4;
  width: 56px; height: 56px;
  background: linear-gradient(180deg, #6a4ac2, #3a1f78);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  border: 2px solid #0c0a2a;
}
.pq-text { font-weight: 800; font-size: 13px; line-height: 1.2; }
.pq-progress {
  height: 12px;
  background: #0c0a2a;
  border-radius: 6px;
  overflow: hidden;
}
.pq-progress > div {
  height: 100%;
  background: linear-gradient(180deg, #4ade80, #1b9f4a);
}
.pq-foot {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.pq-prog-n { opacity: .8; font-weight: 800; }
.pq-reward { font-weight: 900; color: #ffd76a; }
.pq-claim {
  position: absolute; bottom: 8px; right: 8px;
}

/* ============== BUY PASS MODAL ============== */
#buyPassModal {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(5, 10, 40, 0.85);
  z-index: 1100;
  padding: 16px;
}
#buyPassModal.active { display: flex; }
.bp-modal {
  position: relative;
  width: min(720px, 100%);
  background: linear-gradient(180deg, #8c5bff 0%, #4b2a96 100%);
  border: 4px solid #0c0a2a;
  border-radius: 22px;
  padding: 18px;
  color: #fff;
  text-align: center;
}
.bp-close {
  position: absolute; top: -10px; right: -10px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff5c2c, #e03010);
  border: 3px solid #0c0a2a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  font-size: 16px;
}
.bp-hero { padding: 10px 0; }
.bp-hero-row {
  font-size: 40px; letter-spacing: 4px;
  margin-bottom: 8px;
}
.bp-title {
  font-weight: 900; font-size: 24px;
  letter-spacing: 1px;
  text-shadow: 0 3px 0 #1a0a3f;
}
.bp-options {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
@media (max-width: 600px) { .bp-options { grid-template-columns: 1fr; } }
.bp-option {
  background: #1a0a3f;
  border: 3px solid #0c0a2a;
  border-radius: 16px;
  padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.bp-or {
  font-weight: 900; font-size: 18px;
  color: #ffd76a;
  text-shadow: 0 2px 0 #0c0a2a;
}
.bp-opt-title {
  font-weight: 900; font-size: 16px; letter-spacing: 1px;
}
.bp-opt-desc {
  font-size: 11px; opacity: .9; font-weight: 700;
  line-height: 1.3; text-align: center;
}
.bp-btn {
  background: linear-gradient(180deg, #ffcf45, #ff9a2e);
  color: #3a1b00;
  border: 3px solid #0c0a2a;
  border-radius: 12px;
  font-weight: 900; font-size: 18px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,.3);
}

/* ==========================================================
   MOBILE ADAPTIVE (phone-first overrides, ≤640px and ≤400px)
   ========================================================== */
@media (max-width: 640px) {
  /* --- Global scale-down --- */
  .screen { padding: 8px; }

  /* --- Top HUD --- */
  .top { gap: 6px; }
  .player-pill { padding: 6px 10px 6px 56px; min-width: 0; }
  .player-pill .avatar { width: 52px; height: 52px; left: -6px; top: -6px; }
  .player-pill .avatar-ring { inset: 4px; }
  .player-pill .avatar-glyph { font-size: 26px; }
  .player-pill .nm { font-size: 12px; }
  .player-pill .lv { font-size: 14px; }
  .pill { padding: 4px 10px; border-radius: 14px; }
  .pill .val  { font-size: 15px; }
  .currency-pill { min-width: 88px; gap: 8px; }
  .currency-pill .hud-icon { width: 18px; height: 18px; }
  .currencies { gap: 6px; }
  .icon-btn { width: 44px; height: 44px; border-radius: 12px; font-size: 20px; }

  /* --- Lobby body: stack side menus above/below vaults --- */
  #lobby .body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    padding-top: 6px;
  }
  .side-menu {
    flex-direction: row;
    align-self: stretch;
    margin-top: 0;
    gap: 6px;
    overflow-x: auto;
    padding: 2px;
  }
  .side-menu::-webkit-scrollbar { display: none; }
  .side-btn {
    flex: 1 0 auto;
    min-width: 0;
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
    border-width: 2px;
    border-radius: 12px;
  }
  .side-btn .ic { width: 16px; height: 16px; }

  /* --- Vaults tighter --- */
  .vault-row { gap: 6px; padding: 6px; }
  .vault { width: 102px; height: 136px; }
  .chest { width: 94px; height: 94px; border-radius: 18px; }
  .vault .label { margin-top: 6px; font-size: 12px; padding: 4px 10px; border-width: 2px; border-radius: 10px; }
  .vault .label .hud-icon.coin,
  .vault .label .hud-icon.gem { width: 30px; height: 30px; }
  .vault .info { width: 22px; height: 22px; right: 8px; top: 4px; font-size: 12px; }

  /* --- Footer banners --- */
  .footer-row { gap: 6px; }
  .banner { font-size: 12px; padding: 8px 10px; border-radius: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.3); flex: 1; text-align: center; }
  .banner .ui-glyph { width: 16px; height: 16px; }

  /* --- Inner screen headers --- */
  .screen-header { gap: 6px; margin-bottom: 8px; }
  .screen-title { font-size: 18px; letter-spacing: .5px; }
  .back-btn { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; }
  .home-btn { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; border-width: 2px; }
  #trophyRoad .screen-header,
  #profile    .screen-header { grid-template-columns: 40px 1fr 40px; }

  /* --- Generic grid of cards --- */
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; padding: 4px 4px 20px; }
  .card .portrait { font-size: 48px; }
  .card .nm { font-size: 12px; padding: 4px; }
  .card .meta { font-size: 11px; padding: 3px 6px; }

  /* --- Shop / heroes buttons --- */
  .btn { padding: 8px 20px; font-size: 16px; border-width: 2px; border-radius: 12px; }
  .btn.sm { padding: 5px 12px; font-size: 12px; }

  /* --- Tabs --- */
  .tab { padding: 5px 10px; font-size: 12px; }

  /* --- Pass screen header: wrap tabs + season to two rows --- */
  .pass-header {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
    padding: 2px;
  }
  .pass-header .back-btn { grid-row: 1; grid-column: 1; }
  .pass-season           { grid-row: 1; grid-column: 2; padding: 4px 10px; }
  .pass-tabs             { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
  .ps-sub   { font-size: 10px; }
  .ps-title { font-size: 14px; }
  .ptab { padding: 6px 12px; font-size: 12px; }
  .pass-progress-bar { padding: 0 4px 8px; gap: 6px; }
  .ppb-fill { height: 22px; border-width: 2px; }
  .ppb-text { font-size: 12px; }
  .ppb-level { width: 32px; height: 32px; font-size: 15px; border-width: 2px; }

  /* --- Pass rewards track --- */
  .pass-buy-col { flex: 0 0 88px; }
  .pbc-card { padding: 10px 4px; min-height: 160px; border-width: 2px; border-radius: 12px; }
  .pbc-ic { font-size: 36px; }
  .pbc-label { font-size: 12px; }
  .pbc-sub { font-size: 10px; }
  .pass-track { gap: 6px; }
  .pass-col { min-width: 76px; }
  .ptk-card { width: 72px; min-height: 82px; border-width: 2px; border-radius: 10px; padding: 4px; }
  .ptk-ic { font-size: 26px; }
  .ptk-v  { font-size: 10px; }
  .ptk-claim { font-size: 9px; padding: 2px 6px; }
  .pass-lv { font-size: 10px; padding: 3px 4px; }

  /* --- Quests pane --- */
  .pq-cols { gap: 8px; }
  .pq-title { font-size: 12px; }
  .pq-sub { font-size: 10px; display: block; margin-left: 0; margin-top: 2px; }
  .pq-card { grid-template-columns: 48px 1fr; padding: 8px; gap: 4px 8px; }
  .pq-ic { width: 48px; height: 48px; font-size: 24px; }
  .pq-text { font-size: 12px; }
  .pq-foot { font-size: 11px; }
  #btnAddQuest { font-size: 12px; padding: 6px 12px; }

  /* --- Daily login modal --- */
  #dailyLogin { padding: 6px; }
  .d-modal { max-height: calc(100dvh - 12px); padding: 14px 10px 12px; border-radius: 18px; border-width: 3px; }
  .d-title { font-size: 20px; letter-spacing: 0.08em; }
  .d-sub { font-size: 12px; }
  .d-streak { display: flex; width: 100%; justify-content: center; padding: 8px 10px; font-size: 12px; }
  .d-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 2px 2px 4px 0; }
  .d-card { min-height: 146px; padding: 10px 8px; border-width: 2px; border-radius: 14px; }
  .d-card__day { font-size: 10px; letter-spacing: 0.14em; }
  .d-card__tag { margin-top: 8px; padding: 4px 7px; font-size: 9px; }
  .d-card__symbol { margin-top: 8px; font-size: 24px; }
  .d-card__title { margin-top: 8px; font-size: 13px; }
  .d-card__flavor { margin-top: 6px; font-size: 11px; line-height: 1.25; }
  .d-card__effect { padding-top: 8px; font-size: 10px; letter-spacing: 0.05em; }
  #dailyClaim { padding: 12px 18px; font-size: 15px; }

  /* --- Trophy Road --- */
  #trophyRoad { padding: 8px; }
  #trophyRoad .screen-title { font-size: 20px; }
  .tr-sub { font-size: 12px; margin: 4px auto 10px; padding: 10px 12px; }
  .tr-track { gap: 12px; padding: 24px 10px 28px; border-radius: 22px; }
  .tr-track::before { left: 16px; right: 16px; height: 10px; }
  .tr-track::after { left: 16px; right: 16px; }
  .tr-node { min-width: 142px; gap: 8px; }
  .tr-node.next { min-width: 176px; }
  .tr-card { min-height: 196px; padding: 12px 10px 14px; border-radius: 18px; gap: 8px; }
  .tr-relic { width: 88px; height: 96px; border-radius: 22px; }
  .tr-node.next .tr-relic { width: 100px; height: 112px; }
  .tr-core { width: 62px; height: 62px; border-radius: 20px; }
  .tr-node.next .tr-core { width: 74px; height: 74px; border-radius: 22px; }
  .tr-core-glyph { font-size: 34px; }
  .tr-node.next .tr-core-glyph { font-size: 42px; }
  .tr-state { font-size: 9px; padding: 7px 10px; }
  .tr-label { font-size: 11px; padding: 7px 8px; border-radius: 12px; }
  .tr-badge { font-size: 10px; padding: 6px 10px; }
  .tr-threshold { font-size: 12px; padding: 7px 10px; gap: 6px; }
  .tr-check, .tr-lock { width: 26px; height: 26px; font-size: 14px; top: 8px; right: 8px; }
  .tr-counter { font-size: 14px; padding: 8px 12px; }

  /* --- Profile --- */
  #profile .screen-title { font-size: 18px; }
  .pf-top { padding: 10px; gap: 10px; border-width: 2px; }
  .pf-avatar { width: 84px; height: 84px; }
  .pf-name { font-size: 15px; padding: 6px 10px; min-width: 100px; }
  .pf-lvl { width: 30px; height: 30px; font-size: 15px; border-width: 2px; }
  .pf-id { font-size: 11px; }
  .pf-tile-label { font-size: 10px; }
  .pf-tile-icon { font-size: 22px; }
  .pf-tile-value { font-size: 15px; }

  /* --- Buy Pass modal --- */
  .bp-modal { padding: 14px 12px; border-width: 3px; border-radius: 18px; }
  .bp-title { font-size: 18px; }
  .bp-hero-row { font-size: 28px; letter-spacing: 2px; }
  .bp-options { gap: 8px; margin-top: 10px; }
  .bp-option { padding: 10px 8px; border-width: 2px; border-radius: 12px; gap: 4px; }
  .bp-opt-title { font-size: 14px; }
  .bp-opt-desc { font-size: 10px; }
  .bp-or { font-size: 14px; }
  .bp-btn { font-size: 15px; padding: 8px 14px; border-width: 2px; }
  .bp-close { top: -8px; right: -8px; width: 32px; height: 32px; font-size: 14px; border-width: 2px; }

  /* --- Mini-games --- */
  .mini-emoji { font-size: 64px; }
  .mini-bar { width: 94%; height: 28px; }
  .mini-info { font-size: 14px; }
  .wheel-wrap { width: 220px; height: 220px; }
  .mem-info { font-size: 13px; }

  /* --- Generic modal --- */
  .modal { padding: 16px; font-size: 14px; }
  .modal h2 { font-size: 18px; }

  /* --- Box opening overlay --- */
  .reward-title { font-size: 22px; }
  .reward-amount { font-size: 34px; }
  .reward-art { font-size: 70px; width: 130px; height: 130px; }
  .tap-hint { font-size: 14px; }

  /* --- Toast --- */
  .toast { top: -80px; padding: 10px 14px; font-size: 14px; }
  .toast.show { top: 78px; }
}

@media (max-width: 400px) {
  /* Super-tight adjustments for very small phones */
  .vault { width: 88px; height: 120px; }
  .chest { width: 82px; height: 82px; border-radius: 16px; }
  .vault .label { font-size: 11px; padding: 3px 8px; }
  .vault .label .hud-icon.coin,
  .vault .label .hud-icon.gem { width: 26px; height: 26px; }

  .side-btn { font-size: 11px; padding: 6px 8px; }
  .side-btn .ic { font-size: 14px; }

  .pf-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .pf-tile { padding: 8px 4px; min-height: 82px; }
  .pf-tile-label { font-size: 9px; }

  .d-grid { grid-template-columns: repeat(2, 1fr); }
  .d-card { min-height: 104px; }

  .tr-node { min-width: 122px; }
  .tr-node.next { min-width: 154px; }
  .tr-card { min-height: 172px; padding: 10px 8px 12px; }
  .tr-relic { width: 78px; height: 88px; border-radius: 18px; }
  .tr-node.next .tr-relic { width: 88px; height: 98px; }
  .tr-core { width: 56px; height: 56px; border-radius: 18px; }
  .tr-node.next .tr-core { width: 66px; height: 66px; }
  .tr-core-glyph { font-size: 30px; }
  .tr-node.next .tr-core-glyph { font-size: 36px; }
  .tr-label { font-size: 10px; letter-spacing: .05em; }
  .tr-threshold { font-size: 11px; }

  .pass-col { min-width: 68px; }
  .ptk-card { width: 64px; min-height: 74px; }
  .ptk-ic { font-size: 22px; }

  .banner { font-size: 11px; padding: 7px 8px; }

  .bp-hero-row { font-size: 22px; }
  .bp-title { font-size: 16px; }
}

/* Landscape phones: avoid vertical cramping */
@media (max-height: 480px) and (orientation: landscape) {
  .vault { height: 120px; }
  .chest { height: 72px; }
  .pass-progress-bar { padding-bottom: 4px; }
  .ppb-fill { height: 20px; }
  .tr-card { min-height: 146px; }
  .d-card { min-height: 92px; }
}

/* ============== HERO DETAIL ============== */
#heroDetail { padding: 14px; }
#heroDetail .screen-header {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
#heroDetail .screen-title {
  text-align: center;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 1px;
  text-shadow: 0 3px 0 #0c1a4a;
}

.hd-body {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-content: start;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
  overflow-y: auto;
}
@media (max-width: 640px) {
  .hd-body { grid-template-columns: 1fr; gap: 12px; }
}

.hd-portrait-wrap {
  background: linear-gradient(180deg, var(--rar-color, #6b6cf0) 0%, #1b1b3a 100%);
  border: 4px solid #0c1a4a;
  border-radius: 20px;
  padding: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 6px 0 rgba(0,0,0,.3);
}
.hd-portrait {
  position: relative;
  width: min(100%, 188px);
  min-height: 228px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 12px 0;
  box-sizing: border-box;
  background: radial-gradient(circle at 50% 18%, rgba(255,255,255,.24), transparent 56%), rgba(8,12,28,.24);
  font-size: 144px; line-height: 1;
  text-shadow: 0 6px 0 rgba(0,0,0,.3);
}
.hd-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.16), transparent 58%);
  pointer-events: none;
}
.hd-portrait.is-locked::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.22), rgba(4, 6, 12, 0.72));
  z-index: 1;
}
.hd-portrait-art {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.28));
}
.hd-portrait.is-locked .hd-portrait-art {
  filter: grayscale(.3) brightness(.62) drop-shadow(0 10px 18px rgba(0,0,0,.28));
}
.hd-portrait-glyph {
  position: relative;
  z-index: 0;
  font-size: 144px;
  line-height: 1;
}
.hd-portrait-lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.hd-rarity {
  font-weight: 900;
  padding: 6px 16px;
  border-radius: 999px;
  color: #1b1b3a;
  letter-spacing: 1px;
  border: 3px solid #0c1a4a;
  font-size: 14px;
}
.hd-level {
  background: rgba(0,0,0,.4);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 4px 12px;
  font-weight: 900;
  font-size: 16px;
}

.hd-side {
  display: flex; flex-direction: column; gap: 14px;
}

.hd-stats {
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(0,0,0,.3);
  border: 3px solid #0c1a4a;
  border-radius: 14px;
  padding: 14px;
}
.hd-stat-head {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}
.hd-stat-ic { font-size: 22px; line-height: 1; }
.hd-stat-label { font-weight: 900; font-size: 13px; letter-spacing: 1px; opacity: .9; }
.hd-stat-val { font-weight: 900; font-size: 18px; }
.hd-stat-next { color: #6cf08e; font-weight: 900; font-size: 14px; }
.hd-stat-bar {
  height: 10px;
  background: rgba(0,0,0,.5);
  border-radius: 5px;
  overflow: hidden;
}
.hd-stat-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #ffcf45, #ff5c2c);
  transition: width .3s;
}

.hd-upgrade {
  background: rgba(0,0,0,.3);
  border: 3px solid #0c1a4a;
  border-radius: 14px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.hd-upg-row { display: flex; flex-direction: column; gap: 4px; }
.hd-upg-bar-label { font-weight: 900; font-size: 13px; }
.hd-upg-bar {
  height: 12px;
  background: rgba(0,0,0,.5);
  border-radius: 6px;
  overflow: hidden;
}
.hd-upg-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #4ade80, #1b9f4a);
}
.hd-upg-coins { font-weight: 900; font-size: 14px; }
.hd-upg-coins.miss { color: #ff9f9f; }
.hd-upg-locked, .hd-upg-max {
  text-align: center;
  font-weight: 900;
  font-size: 16px;
  color: #ffd76a;
  letter-spacing: 1px;
  padding: 10px;
}
.btn.disabled { background: linear-gradient(180deg,#667,#334); color: #ccd; opacity: .7; cursor: not-allowed; }

/* Selected-hero star on hero list card */
.sel-star {
  position: absolute; top: 4px; right: 4px;
  background: linear-gradient(180deg, #ffcf45, #ff9a2e);
  color: #3a1b00;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid #0c1a4a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px;
  z-index: 2;
  box-shadow: 0 2px 0 rgba(0,0,0,.3);
}

/* ============================================================
   v2 — polish, boss, rarity effects, badges, transitions
   ============================================================ */

/* Notification dot */
.notif-dot {
  display: inline-block;
  width: 10px; height: 10px;
  background: linear-gradient(180deg, #ffb18b, #ff5d2c);
  border-radius: 50%;
  margin-left: 6px;
  border: 1px solid rgba(255, 236, 222, 0.72);
  box-shadow: 0 0 10px rgba(255, 95, 35, 0.7);
  animation: dot-pulse 1.5s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(255, 80, 80, 0.5); }
  50%      { transform: scale(1.2); box-shadow: 0 0 12px rgba(255, 80, 80, 0.9); }
}
.side-btn { position: relative; }
.side-btn.red { background: linear-gradient(180deg, rgba(41, 24, 26, 0.98), rgba(15, 11, 16, 0.98)); color: var(--ui-text); }

/* Free box stack badge */
.stack-badge {
  position: static;
  background: linear-gradient(180deg, #ffb18b, #ff5d2c);
  color: #160b08;
  border: 1px solid rgba(255, 236, 222, 0.72);
  border-radius: 999px;
  padding: 5px 10px;
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  z-index: 3;
  box-shadow: 0 0 14px rgba(255, 95, 35, 0.32), 0 2px 0 rgba(0,0,0,.3);
  letter-spacing: .5px;
}

/* Danger variant for buttons & modal actions */
.btn.danger {
  background: linear-gradient(180deg, rgba(51, 24, 23, 0.98), rgba(18, 11, 13, 0.98));
  color: var(--ui-text);
}

/* Rarity cards: legendary/mythic glow + sheen */
.card[style*="#ff5136"],
.card[style*="rar-color: #ff5136"] {
  animation: legend-glow 2.6s ease-in-out infinite;
}
@keyframes legend-glow {
  0%, 100% { box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 0 14px rgba(255, 81, 54, 0.35); }
  50%      { box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 0 32px rgba(255, 81, 54, 0.85); }
}

/* HUD pop animation on currency change */
@keyframes hud-pop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.3); color: #ffd76a; }
  100% { transform: scale(1); }
}
.pop { animation: hud-pop .35s ease-out; display: inline-block; }

/* +N floater for currency changes */
.hud-float {
  position: fixed;
  font-weight: 900;
  font-size: 18px;
  text-shadow: 0 2px 0 #000;
  pointer-events: none;
  z-index: 300;
  animation: hud-rise 1.1s ease-out forwards;
}
@keyframes hud-rise {
  0%   { transform: translate(-50%, 0); opacity: 1; }
  100% { transform: translate(-50%, -50px); opacity: 0; }
}

/* Screen transition: fade in when .active */
.screen.active { animation: screen-fade .22s ease-out; }
@keyframes screen-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Floating spark particles on background */
.bg-sparks {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.bg-sparks .s {
  position: absolute; bottom: -20px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd76a 0%, transparent 70%);
  animation: spark-rise linear infinite;
  opacity: .6;
}
@keyframes spark-rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: .7; }
  100% { transform: translateY(-110vh) translateX(30px); opacity: 0; }
}

/* Modal success / danger variants */
.modal.success h2 { background: linear-gradient(180deg, #6cf08e, #22c358); }
.modal.danger  h2 { background: linear-gradient(180deg, #ff7b7b, #d92020); }

/* HD: PP-to-gem convert block */
.hd-convert {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,.3);
  border: 2px solid rgba(255,255,255,.1);
  border-radius: 12px;
}
.hd-convert-row {
  display: flex; gap: 10px; align-items: center;
  font-weight: 900; font-size: 16px;
}
.hd-convert-rate { opacity: .7; font-size: 12px; }

/* Shop: deal highlight */
.card.deal {
  border-color: #ff5c2c !important;
  box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 0 20px rgba(255,92,44,.5);
  animation: deal-pulse 1.8s ease-in-out infinite;
}
@keyframes deal-pulse {
  0%, 100% { box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 0 14px rgba(255,92,44,.35); }
  50%      { box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 0 30px rgba(255,92,44,.85); }
}
.deal-badge {
  position: absolute; top: 4px; left: 4px;
  background: #ff3b3b; color: #fff;
  border: 2px solid #fff;
  border-radius: 8px;
  padding: 3px 7px;
  font-weight: 900; font-size: 11px;
  z-index: 3;
  letter-spacing: .5px;
  box-shadow: 0 2px 0 rgba(0,0,0,.3);
}
.card .orig {
  text-decoration: line-through;
  opacity: .6;
  margin-right: 6px;
  font-weight: 700;
  font-size: 11px;
}

/* Opening overlay: rarity-based ray tinting */
#opening[data-peak="2"] { background: radial-gradient(ellipse at 50% 50%, #2d1f5a, #000); }
#opening[data-peak="3"] { background: radial-gradient(ellipse at 50% 50%, #4a1f45, #000); }
#opening[data-peak="4"] {
  background: radial-gradient(ellipse at 50% 50%, #4a2f10, #000);
}
#opening[data-peak="3"] .rays,
#opening[data-peak="4"] .rays {
  background:
    conic-gradient(from 0deg,
      transparent 0deg, rgba(255,215,106,.38) 8deg, transparent 16deg,
      transparent 24deg, rgba(255,92,44,.28) 32deg, transparent 40deg);
  animation: spin 8s linear infinite;
}
#opening[data-peak="4"] {
  animation: legend-flash 2s ease-in-out infinite;
}
@keyframes legend-flash {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.2); }
}

/* Crit-Punch: dynamic target element colored */
#critTarget {
  transition: left .15s ease, width .15s ease;
}

/* ========= BOSS RAID HUB ========= */
#boss {
  --boss-bg-desktop: url("../assets/backgrounds/RaidBossBackground.png");
  --boss-bg-mobile: url("../assets/backgrounds/RaidBossBackgroundPhone.png");
  --boss-bg-current: var(--boss-bg-desktop);
  background:
    linear-gradient(180deg, rgba(4, 5, 9, 0.74), rgba(16, 2, 4, 0.42) 42%, rgba(3, 4, 8, 0.86)),
    var(--boss-bg-current);
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
}
@media (max-width: 768px) and (orientation: portrait) {
  #boss {
    --boss-bg-current: var(--boss-bg-mobile);
    background-position: center top, center center;
  }
}
#boss .screen-header {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: center;
}
.boss-energy-controls {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  grid-column: 3;
  grid-row: 1;
}
.boss-attempts-pill {
  background: linear-gradient(180deg, rgba(20, 5, 7, 0.92), rgba(6, 4, 7, 0.96));
  border: 1px solid rgba(255, 54, 54, 0.72);
  border-radius: 14px;
  padding: 6px 12px;
  font-weight: 900;
  color: #ffe9dd;
  box-shadow: 0 0 14px rgba(255, 0, 0, 0.22), inset 0 0 12px rgba(255, 44, 44, 0.08);
}
.boss-ad-btn {
  min-width: 82px;
  white-space: nowrap;
}
.boss-ad-meta {
  grid-column: 2 / 4;
  grid-row: 2;
  justify-self: end;
  font-size: 12px;
  font-weight: 800;
  color: #ff9c86;
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.18);
}
.boss-hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(22, 6, 8, 0.78), rgba(5, 4, 7, 0.92)),
    radial-gradient(circle at 12% 50%, rgba(255, 42, 42, 0.14), transparent 42%);
  border: 1px solid rgba(255, 43, 43, 0.76);
  border-radius: 18px;
  padding: 10px 14px;
  margin-bottom: 10px;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.24), 0 14px 26px rgba(0,0,0,.32);
}
.boss-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 12px;
}
.boss-tab {
  min-width: 174px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 47, 47, 0.44);
  background: linear-gradient(180deg, rgba(16, 6, 8, 0.94), rgba(4, 4, 6, 0.98));
  color: #ffe7dc;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 0 16px rgba(255, 39, 39, 0.1);
}
.boss-tab.active {
  border-color: rgba(255, 72, 72, 0.78);
  background: linear-gradient(180deg, rgba(112, 21, 21, 0.98), rgba(28, 7, 9, 0.98));
  color: #fff6ec;
  box-shadow: 0 0 22px rgba(255, 39, 39, 0.24), inset 0 0 18px rgba(255, 110, 96, 0.08);
}
.bh-portrait {
  width: 70px; height: 70px;
  background: radial-gradient(circle at 50% 30%, var(--rar, #7fb6ff), #1b1b3a);
  border: 3px solid #fff;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  overflow: hidden;
  padding: 6px 6px 0;
  box-sizing: border-box;
}
.bh-portrait-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.24));
}
.bh-portrait-glyph {
  line-height: 1;
}
.bh-name { font-weight: 900; font-size: 18px; margin-bottom: 4px; }
.bh-stats { display: flex; gap: 12px; font-weight: 800; font-size: 13px; opacity: .85; }

.boss-list {
  flex: 1; overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 6px 0 20px;
}
.boss-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(28, 7, 9, 0.82), rgba(7, 4, 7, 0.96)),
    radial-gradient(circle at 50% 0, rgba(255, 27, 27, 0.18), transparent 70%);
  border: 1px solid rgba(255, 27, 27, 0.72);
  border-radius: 18px;
  padding: 12px 10px;
  text-align: center;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.28), inset 0 0 18px rgba(255, 49, 49, 0.08), 0 18px 30px rgba(0,0,0,.38);
  overflow: hidden;
}
.boss-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 74, 74, 0.22);
  box-shadow: inset 0 0 24px rgba(255, 0, 0, 0.12);
  pointer-events: none;
  z-index: 0;
}
.boss-card.beat   { opacity: .55; filter: grayscale(.6); }
.boss-card.locked { opacity: .65; }
.boss-portrait {
  appearance: none;
  -webkit-appearance: none;
  width: 72px;
  height: 72px;
  margin: 0 auto 4px;
  padding: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255, 92, 64, 0.62), rgba(10, 4, 8, 0.96));
  border: 1px solid rgba(255, 96, 74, 0.8);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px 6px 0;
  box-sizing: border-box;
  box-shadow: inset 0 0 16px rgba(255, 60, 50, 0.1), 0 0 14px rgba(255, 0, 0, 0.2);
}
.boss-portrait-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.24));
}
.boss-portrait-glyph {
  font-size: 44px;
  line-height: 1;
}
.boss-detail {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  max-width: 860px;
}
.boss-detail-portrait {
  width: min(48vw, 280px);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  border: 2px solid rgba(255, 41, 41, 0.78);
  background: radial-gradient(circle at 50% 32%, rgba(255, 49, 49, 0.32), rgba(3, 2, 3, 0.96) 66%);
  box-shadow: 0 0 26px rgba(255, 0, 0, 0.28), inset 0 0 28px rgba(255, 45, 45, 0.1);
  overflow: hidden;
}
.boss-detail-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 14px 20px rgba(0,0,0,.45));
}
.boss-detail-glyph {
  font-size: 92px;
  line-height: 1;
}
.boss-detail-copy {
  color: #fff1e8;
  text-align: left;
}
.boss-detail-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 54, 54, 0.34);
  background: linear-gradient(180deg, rgba(12, 4, 7, 0.92), rgba(0, 0, 0, 0.82));
  box-shadow: inset 0 0 24px rgba(255, 40, 40, 0.08);
}
.boss-detail-name {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255, 38, 38, 0.5);
}
.boss-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.boss-detail-stats span,
.boss-detail-hero,
.boss-detail-reward {
  border: 1px solid rgba(255, 54, 54, 0.28);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.58);
  padding: 8px 10px;
  color: #fff1e8;
  font-weight: 900;
}
.boss-detail-reward,
.boss-detail-hero {
  margin-top: 0;
}
.boss-detail-note {
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 106, 0.34);
  background: rgba(24, 8, 6, 0.78);
  padding: 10px 12px;
  color: #ffe7be;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 800;
}
.boss-hero-picker-shell {
  display: grid;
  gap: 12px;
}
.boss-hero-picker-copy {
  color: #fff1e8;
  font-size: 13px;
  font-weight: 800;
}
.boss-hero-picker {
  display: flex;
  flex-direction: row;
  gap: 12px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(140, 34, 22, 0.96) rgba(6, 3, 4, 0.94);
}
.boss-hero-picker::-webkit-scrollbar {
  height: 10px;
}
.boss-hero-picker::-webkit-scrollbar-track {
  background: rgba(6, 3, 4, 0.94);
  border-radius: 999px;
}
.boss-hero-picker::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, rgba(58, 14, 11, 0.98), rgba(120, 32, 24, 0.96));
  border: 2px solid rgba(6, 3, 4, 0.94);
  border-radius: 999px;
}
.boss-hero-picker-card {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 10px;
  flex: 0 0 min(200px, 66vw);
  border-radius: 16px;
  border: 2px solid rgba(255, 39, 39, 0.42);
  background: linear-gradient(180deg, rgba(18, 7, 9, 0.98), rgba(0, 0, 0, 0.96));
  color: #fff1e8;
  cursor: pointer;
}
.boss-hero-picker-card.selected {
  border-color: #ffd76a;
  box-shadow: 0 0 18px rgba(255, 215, 106, 0.34);
}
.boss-hero-picker-portrait {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  border: 2px solid var(--rar, #ff5136);
  background: #000;
  overflow: hidden;
}
.boss-hero-picker-art {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}
.boss-hero-picker-name,
.boss-hero-picker-meta {
  font-weight: 900;
  text-align: center;
}
.boss-hero-picker-meta {
  color: #ffe0c8;
  font-size: 11px;
}
.boss-detail-empty {
  color: #fff1e8;
  font-weight: 900;
  padding: 14px;
}
.boss-emoji { font-size: 56px; line-height: 1; }
.boss-name  { font-weight: 900; font-size: 14px; letter-spacing: .5px; }
.boss-stat  { font-size: 12px; font-weight: 800; opacity: .85; }
.boss-reward { font-size: 11px; color: #ffd76a; font-weight: 800; line-height: 1.2; min-height: 28px; }
.boss-pred { font-size: 12px; font-weight: 800; min-height: 18px; }

/* ========= BOSS ARENA ========= */
#bossArena,
#pvpArena { background: linear-gradient(180deg, #431a20, #100408); }
.arena-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px 6px;
}
.arena-side {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.arena-name { font-weight: 900; letter-spacing: 1px; text-shadow: 0 2px 0 #000; }
.arena-hero-card {
  width: min(100%, 260px);
  margin-bottom: 4px;
  padding: 12px 14px;
  border-color: rgba(255,255,255,.28);
  background: linear-gradient(180deg, rgba(18, 26, 58, 0.96), rgba(8, 12, 28, 0.98));
  box-shadow: 0 10px 24px rgba(0,0,0,.28), 0 0 18px rgba(87, 163, 255, 0.12);
}
.arena-hero-card .bh-portrait {
  width: 88px;
  height: 88px;
  font-size: 54px;
  border-width: 4px;
  box-shadow: 0 6px 0 rgba(0,0,0,.32);
}
.arena-hero-card .bh-name {
  font-size: 16px;
}
.arena-hero-card .bh-stats {
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 12px;
}
.arena-fighter {
  transition: transform .15s ease, filter .22s ease;
}
.arena-char {
  width: 120px; height: 120px;
  background: radial-gradient(circle at 50% 30%, var(--rar, #7fb6ff), #1b1b3a);
  border: 4px solid #fff;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 76px;
  box-shadow: 0 6px 0 rgba(0,0,0,.4);
  overflow: hidden;
}
.arena-char.boss {
  background: radial-gradient(circle at 50% 30%, #ff6060, #2a0a0a);
}
.arena-boss-art {
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: contain;
  object-position: center bottom;
  transform: translateY(4px);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.28));
}
.arena-boss-glyph {
  font-size: 76px;
  line-height: 1;
}
.arena-char,
.arena-fighter {
  transition: transform .15s ease, filter .22s ease;
}
.arena-char.strike,
.arena-fighter.strike { animation: strike .24s ease-out; }
.arena-char.hit,
.arena-fighter.hit    { animation: hit .22s ease-out; filter: brightness(1.7) saturate(1.5); }
@keyframes strike {
  0%   { transform: translateX(0) rotate(0); }
  40%  { transform: translateX(30px) rotate(8deg); }
  100% { transform: translateX(0) rotate(0); }
}
.arena-side.right .arena-char.strike,
.arena-side.right .arena-fighter.strike { animation: strike-r .24s ease-out; }
@keyframes strike-r {
  0%   { transform: translateX(0) rotate(0); }
  40%  { transform: translateX(-30px) rotate(-8deg); }
  100% { transform: translateX(0) rotate(0); }
}
@keyframes hit {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.arena-vs {
  font-size: 36px; font-weight: 900;
  color: #ffd76a; text-shadow: 0 3px 0 #000;
}
.arena-hp {
  width: 140px; height: 18px;
  background: rgba(0,0,0,.6);
  border: 2px solid #000;
  border-radius: 10px;
  overflow: hidden;
}
.arena-hp > div {
  height: 100%;
  background: linear-gradient(180deg, #6cf08e, #22c358);
  transition: width .2s ease;
  width: 100%;
}
.arena-hp > div.enemy {
  background: linear-gradient(180deg, #ff7b7b, #d92020);
}
.arena-log {
  background: rgba(0,0,0,.45);
  border: 2px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 0 6px 10px;
  min-height: 120px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 13px;
  font-weight: 800;
}
.pvp-arena-stage {
  padding-inline: 18px;
}
.pvp-fighter-card {
  width: min(100%, 260px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  border: 3px solid var(--rar, #ff2727);
  background: linear-gradient(180deg, rgba(8, 4, 5, 0.98), rgba(0, 0, 0, 0.98));
  color: #fff3eb;
  box-shadow: 0 0 18px rgba(255, 0, 0, 0.18), 0 14px 24px rgba(0,0,0,.34);
}
.pvp-fighter-label {
  color: #ffb39a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
}
.pvp-fighter-portrait {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,.12);
  background: #000;
  overflow: hidden;
}
.pvp-fighter-portrait .portrait-art {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: contain;
  object-position: center bottom;
}
.pvp-fighter-name {
  font-size: 17px;
  font-weight: 900;
}
.pvp-fighter-hero,
.pvp-fighter-stats {
  font-size: 12px;
  font-weight: 800;
  color: #ffe8b4;
  text-align: center;
}
.al-entry { padding: 3px 0; opacity: .85; }
.al-entry.hero { color: #6cf08e; }
.al-entry.boss { color: #ff9a9a; }

/* Mini hub card disabled */
.btn.sm.disabled { background: #555; color: #aaa; cursor: not-allowed; opacity: .7; }

/* Daily streak pill */
.d-streak {
  background: rgba(0,0,0,.35);
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 10px;
  padding: 6px 12px;
  margin-top: 8px;
  display: inline-block;
  font-weight: 800;
}
.d-streak.muted { opacity: .7; }

/* Boss on mobile */
@media (max-width: 520px) {
  #boss .screen-header {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto auto;
  }
  .boss-energy-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    justify-content: space-between;
  }
  .boss-ad-meta {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
  }
  .boss-tabs { gap: 8px; margin-bottom: 10px; }
  .boss-tab { min-width: 0; flex: 1 1 0; padding: 9px 10px; font-size: 10px; }
  .arena-stage { grid-template-columns: 1fr; gap: 8px; padding: 10px; }
  .arena-vs { font-size: 24px; margin: 0; }
  .arena-char { width: 90px; height: 90px; font-size: 54px; }
  .arena-hp { width: 110px; }
  .boss-hero-card { padding: 8px 10px; gap: 10px; }
  .bh-portrait { width: 56px; height: 56px; font-size: 34px; }
  .arena-hero-card { width: min(100%, 220px); padding: 10px 12px; }
  .arena-hero-card .bh-portrait { width: 72px; height: 72px; font-size: 42px; }
  .arena-hero-card .bh-name { font-size: 14px; }
}

/* ============== PASS RESKIN ============== */
#pass[data-pass-view="rewards"] {
  --pass-bg-desktop: url("../assets/backgrounds/BiletFon.png");
  --pass-bg-mobile: url("../assets/backgrounds/biletFonPhone.png");
  --pass-bg-current: var(--pass-bg-desktop);
}

#pass[data-pass-view="quests"] {
  --pass-bg-desktop: url("../assets/backgrounds/questBackground.png");
  --pass-bg-mobile: url("../assets/backgrounds/questBackgroundPhone.png");
  --pass-bg-current: var(--pass-bg-desktop);
}

#pass {
  position: relative;
  overflow: hidden;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(6, 7, 12, 0.88), rgba(8, 7, 12, 0.78) 38%, rgba(5, 6, 10, 0.92)),
    var(--pass-bg-current, linear-gradient(180deg, rgba(8, 5, 7, 0.98), rgba(17, 8, 10, 0.98) 44%, rgba(8, 5, 6, 0.98)));
  background-position: center center, center center;
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
}
#pass::before,
#pass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#pass::before {
  background:
    radial-gradient(circle at 34% 42%, rgba(255,255,255,.035), transparent 2px) 0 0 / 180px 180px,
    radial-gradient(circle at 72% 70%, rgba(255,255,255,.03), transparent 2px) 0 0 / 220px 220px;
  opacity: .45;
  animation: pass-screen-spores 12s linear infinite;
}
#pass::after {
  background:
    linear-gradient(110deg, transparent 0 16%, rgba(168, 45, 36, 0.12) 17%, transparent 18% 48%, rgba(168, 45, 36, 0.08) 49%, transparent 50% 100%),
    linear-gradient(64deg, transparent 0 20%, rgba(255, 118, 82, 0.06) 21%, transparent 22% 100%);
  opacity: .52;
  filter: blur(10px);
}
#pass > * {
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) and (orientation: portrait) {
  #pass[data-pass-view="rewards"],
  #pass[data-pass-view="quests"] {
    --pass-bg-current: var(--pass-bg-mobile);
  }
}
#pass .pass-header {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 4px 6px;
  margin-bottom: 12px;
}
#pass[data-pass-view="quests"] .pass-header {
  padding-top: 0;
  margin-bottom: 6px;
}
#pass .pass-season {
  align-self: stretch;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 18px;
  border: 1px solid rgba(234, 112, 84, 0.28);
  background:
    linear-gradient(180deg, rgba(48, 13, 15, 0.96), rgba(17, 8, 10, 0.98)),
    radial-gradient(circle at 50% 0, rgba(231, 86, 62, 0.1), transparent 70%);
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 26px rgba(0,0,0,.22);
}
#pass .ps-sub {
  transform: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: #f2a37d;
  opacity: 1;
}
#pass .ps-title {
  transform: none;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff1e9;
  text-shadow: 0 0 18px rgba(231, 86, 62, 0.18);
}
#pass .pass-tabs {
  border-radius: 16px;
  padding: 4px;
  border: 1px solid rgba(233, 107, 79, 0.24);
  background: linear-gradient(180deg, rgba(35, 11, 12, 0.94), rgba(12, 8, 9, 0.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
#pass .ptab {
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #d7c3bb;
}
#pass .ptab.active {
  background: linear-gradient(180deg, rgba(100, 24, 19, 0.98), rgba(35, 11, 12, 0.98));
  color: #fff2eb;
  box-shadow: 0 0 18px rgba(231, 86, 62, 0.14);
}
#pass .home-btn {
  border: 1px solid rgba(234, 112, 84, 0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(43, 12, 14, 0.96), rgba(15, 8, 10, 0.98));
  color: #f1ddd3;
  box-shadow: 0 0 14px rgba(231, 86, 62, 0.12), 0 10px 20px rgba(0,0,0,.28);
}
#pass .pass-progress-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 6px 12px;
}
#pass[data-pass-view="quests"] .pass-progress-bar {
  padding-bottom: 6px;
}
#pass .ppb-fill {
  height: 28px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(25, 10, 11, 0.98), rgba(10, 7, 8, 0.98));
  border: 1px solid rgba(221, 95, 74, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
#pass #ppbFill {
  height: 100%;
  background:
    linear-gradient(90deg, rgba(110, 28, 21, 0.96), rgba(230, 90, 65, 0.98), rgba(255, 144, 88, 0.94));
  box-shadow: 0 0 18px rgba(231, 86, 62, 0.16);
}
#pass .ppb-text {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .12em;
  color: #fff0e8;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0,0,0,.48);
}
#pass .ppb-level {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(245, 126, 92, 0.34);
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.16), transparent 30%),
    radial-gradient(circle at 50% 50%, rgba(255, 162, 92, 0.88), rgba(86, 28, 18, 0.96));
  color: #fff3eb;
  box-shadow: 0 0 18px rgba(231, 86, 62, 0.18);
}
#pass .pass-pane {
  min-height: 0;
  overflow: hidden;
}
#pass #passRewardsPane {
  position: relative;
  gap: 12px;
}
.pass-claim-all {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 3;
}
#pass .pass-buy-col {
  flex: 0 0 136px;
  justify-content: center;
}
#pass .pbc-card {
  position: relative;
  min-height: 348px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 242px 14px 26px;
  padding-top: 242px;
  gap: 10px;
  border-radius: 22px;
  border: 1px solid rgba(235, 113, 85, 0.24);
  color: #f7e7dd;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.10) 34%, rgba(0, 0, 0, 0.62) 54%, rgba(0, 0, 0, 0.92) 72%, rgba(0, 0, 0, 0.99) 100%),
    url("../assets/UI/Bilet2.png") center / cover no-repeat;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 30px rgba(0,0,0,.28);
}
#pass .pbc-card::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(231, 86, 62, 0.16), transparent 72%);
  filter: blur(12px);
}
#pass .pbc-state {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.05);
  background: rgba(16, 8, 9, 0.86);
  color: #f3dfd5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
#pass .pbc-relic {
  width: 90px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.08), transparent 24%),
    linear-gradient(180deg, rgba(66, 18, 19, 0.98), rgba(18, 8, 10, 0.98));
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
#pass .pbc-core {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: #fff3ea;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.16), transparent 26%),
    radial-gradient(circle at 50% 50%, rgba(255, 160, 92, 0.92), rgba(91, 28, 18, 0.96));
  box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 0 24px rgba(231, 86, 62, 0.18);
}
#pass .pbc-owned .pbc-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.16), transparent 26%),
    radial-gradient(circle at 50% 50%, rgba(120, 228, 160, 0.88), rgba(18, 76, 44, 0.96));
  box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 0 24px rgba(120, 228, 160, 0.14);
}
#pass .pbc-label {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
  text-align: center;
}
#pass .pbc-sub {
  position: relative;
  z-index: 1;
  font-size: 11px;
  font-weight: 800;
  color: #ccb8b0;
  line-height: 1.45;
  text-align: center;
}
#pass .pbc-locked .pbc-sub {
  margin-top: 2px;
}
#pass #pbcActivate {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid rgba(247, 139, 103, 0.3);
  background: linear-gradient(180deg, rgba(100, 24, 19, 0.98), rgba(36, 11, 12, 0.98));
  color: #fff0e8;
  box-shadow: 0 0 18px rgba(231, 86, 62, 0.14);
}
#pass .pass-track {
  position: relative;
  flex: 1;
  gap: 12px;
  padding: 26px 14px 14px;
  align-items: stretch;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(27, 10, 12, 0.72), rgba(9, 6, 7, 0.86)),
    radial-gradient(circle at 50% 0, rgba(231, 86, 62, 0.08), transparent 70%);
  border: 1px solid rgba(200, 76, 59, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 18px 32px rgba(0,0,0,.22);
}
#pass .pass-track::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  height: 12px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(63, 20, 18, 0.18), rgba(178, 48, 40, 0.92), rgba(63, 20, 18, 0.18));
  box-shadow: 0 0 18px rgba(231, 86, 62, 0.2), 0 0 44px rgba(231, 86, 62, 0.12);
  animation: pass-track-breathe 3.8s ease-in-out infinite;
  pointer-events: none;
}
#pass .pass-col {
  position: relative;
  z-index: 1;
  gap: 10px;
  min-width: 122px;
}
#pass .pass-col.current {
  transform: translateY(-6px);
}
#pass .pass-col.current .ptk-card {
  box-shadow:
    0 0 0 1px rgba(255,255,255,.02),
    0 0 24px rgba(231, 86, 62, 0.18),
    0 16px 30px rgba(0,0,0,.32);
}
#pass .pass-row {
  justify-content: center;
}
#pass .ptk-card {
  position: relative;
  width: 112px;
  min-height: 168px;
  padding: 12px 8px 14px;
  gap: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  color: #fff0e8;
  background:
    linear-gradient(180deg, rgba(49, 13, 15, 0.98), rgba(15, 8, 10, 0.98)),
    radial-gradient(circle at 50% 0, rgba(255,255,255,.04), transparent 72%);
  box-shadow: 0 12px 24px rgba(0,0,0,.28);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, opacity .2s ease;
}
#pass .ptk-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(241, 110, 83, 0.15), transparent 34%),
    linear-gradient(124deg, transparent 0 18%, rgba(255,255,255,.03) 19%, transparent 21% 100%);
  pointer-events: none;
}
#pass .ptk-card.premium {
  border-color: rgba(245, 121, 90, 0.26);
  background:
    linear-gradient(180deg, rgba(63, 16, 18, 0.98), rgba(19, 8, 10, 0.98)),
    radial-gradient(circle at 50% 0, rgba(233, 86, 62, 0.12), transparent 72%);
}
#pass .ptk-card.free {
  border-color: rgba(231, 178, 102, 0.18);
  background:
    linear-gradient(180deg, rgba(40, 16, 14, 0.98), rgba(13, 8, 9, 0.98)),
    radial-gradient(circle at 50% 0, rgba(233, 153, 72, 0.08), transparent 72%);
}
#pass .ptk-card.avail {
  border-color: rgba(245, 131, 95, 0.34);
  box-shadow: 0 0 22px rgba(231, 86, 62, 0.12), 0 12px 24px rgba(0,0,0,.28);
  animation: pass-card-breathe 2.8s ease-in-out infinite;
}
#pass .ptk-card.claimed {
  opacity: .54;
  filter: grayscale(.2) saturate(.86);
}
#pass .ptk-card.locked {
  opacity: .82;
}
#pass .ptk-state {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(16, 8, 9, 0.88);
  border: 1px solid rgba(255,255,255,.05);
  color: #f2ddd2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#pass .ptk-card.avail .ptk-state {
  background: linear-gradient(180deg, rgba(99, 24, 19, 0.98), rgba(35, 11, 12, 0.98));
  border-color: rgba(244, 129, 96, 0.3);
  box-shadow: 0 0 14px rgba(231, 86, 62, 0.1);
}
#pass .ptk-relic {
  width: 82px;
  height: 92px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.08), transparent 24%),
    linear-gradient(180deg, rgba(66, 18, 19, 0.98), rgba(18, 8, 10, 0.98));
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
#pass .ptk-veins,
#pass .ptk-veins::before,
#pass .ptk-veins::after {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
  pointer-events: none;
}
#pass .ptk-veins {
  left: 10px;
  right: 10px;
  top: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(127, 44, 37, 0.88), transparent);
}
#pass .ptk-veins::before {
  left: 8px;
  right: 16px;
  bottom: -36px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(127, 44, 37, 0.88), transparent);
}
#pass .ptk-veins::after {
  width: 2px;
  top: -14px;
  bottom: -46px;
  right: 20px;
  background: linear-gradient(180deg, transparent, rgba(127, 44, 37, 0.72), transparent);
}
#pass .ptk-core {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin-top: 4px;
  box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 0 22px rgba(241, 110, 83, 0.16);
}
#pass .ptk-card.avail .ptk-core {
  animation: pass-relic-pulse 2.2s ease-in-out infinite;
}
#pass .ptk-ic {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.08));
}
#pass .ptk-coins .ptk-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 248, 207, 0.26), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(255, 190, 88, 0.92), rgba(118, 52, 12, 0.96));
}
#pass .ptk-gems .ptk-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.24), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(119, 215, 255, 0.86), rgba(11, 57, 86, 0.96));
}
#pass .ptk-coins .ptk-ic,
#pass .ptk-gems .ptk-ic {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
#pass .ptk-coins .ptk-ic .currency-mark {
  --currency-icon-limit: 58px;
  filter: drop-shadow(0 0 12px rgba(255, 205, 120, 0.28));
}
#pass .ptk-gems .ptk-ic .currency-mark {
  --currency-icon-limit: 58px;
  filter: drop-shadow(0 0 14px rgba(122, 224, 255, 0.32));
}
#pass .ptk-box {
  border-color: rgba(246, 152, 101, 0.26);
  background:
    linear-gradient(180deg, rgba(55, 16, 12, 0.98), rgba(16, 8, 9, 0.98)),
    radial-gradient(circle at 50% 0, rgba(240, 152, 72, 0.10), transparent 70%);
}
#pass .ptk-box .ptk-relic {
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,.08), transparent 26%),
    linear-gradient(180deg, rgba(73, 23, 15, 0.98), rgba(23, 10, 9, 0.98));
}
#pass .ptk-box .ptk-core {
  width: 64px;
  height: 64px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#pass .ptk-box-art {
  display: block;
  width: 110%;
  height: 110%;
  object-fit: contain;
  object-position: center 42%;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.28));
}
#pass .ptk-box .ptk-v {
  color: #f7ddca;
  font-size: 10px;
  line-height: 1.25;
}
#pass .ptk-hero {
  border-color: rgba(255, 39, 39, 0.58);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.03),
    0 0 28px rgba(255, 39, 39, 0.22),
    0 18px 32px rgba(0,0,0,.34);
}
#pass .ptk-hero::before {
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 85, 85, 0.22), transparent 38%),
    linear-gradient(124deg, transparent 0 18%, rgba(255,255,255,.04) 19%, transparent 21% 100%);
}
#pass .ptk-hero .ptk-core {
  overflow: hidden;
  width: 70px;
  height: 70px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 118, 118, 0.16), transparent 32%),
    #050303;
  box-shadow: inset 0 0 0 1px rgba(255, 96, 96, 0.28), 0 0 26px rgba(255, 45, 45, 0.18);
}
#pass .ptk-hero .ptk-ic {
  display: block;
  width: 100%;
  height: 100%;
}
#pass .ptk-hero-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
#pass .ptk-hero-glyph {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 30px;
}
#pass .ptk-generic .ptk-core {
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.18), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(214, 190, 180, 0.78), rgba(62, 32, 26, 0.96));
}
#pass .ptk-v {
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .08em;
}
#pass .ptk-hero .ptk-v {
  color: #fff1dc;
  text-shadow: 0 0 16px rgba(255, 84, 84, 0.22);
}
#pass .ptk-check,
#pass .ptk-lock {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(12, 7, 8, 0.82);
  border: 1px solid rgba(255,255,255,.05);
}
#pass .ptk-check {
  color: #88f4aa;
  font-size: 14px;
}
#pass .ptk-lock {
  color: #f2ddd2;
  font-size: 13px;
}
#pass .ptk-claim {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(246, 140, 102, 0.3);
  background: linear-gradient(180deg, rgba(100, 24, 19, 0.98), rgba(36, 11, 12, 0.98));
  color: #fff0e8;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  box-shadow: 0 0 14px rgba(231, 86, 62, 0.12);
}
#pass .pass-lv {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(227, 168, 102, 0.24);
  background: linear-gradient(180deg, rgba(35, 14, 13, 0.96), rgba(12, 8, 9, 0.98));
  color: #ffe1cd;
  box-shadow: 0 10px 18px rgba(0,0,0,.2);
}
#pass .pass-lv-num {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}
#pass .pass-lv-xp {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  color: #efb98f;
  text-transform: uppercase;
}
#pass #passQuestsPane {
  flex: 1;
  min-height: 0;
  max-height: 100%;
  height: 100%;
  flex-direction: column;
  padding: 0 6px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-color: rgba(58, 19, 18, 0.96) rgba(4, 3, 4, 0.9);
  scrollbar-width: thin;
}
#pass #passQuestsPane::-webkit-scrollbar {
  width: 12px;
}
#pass #passQuestsPane::-webkit-scrollbar-track {
  background: rgba(4, 3, 4, 0.9);
  border-radius: 999px;
}
#pass #passQuestsPane::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(40, 12, 12, 0.98), rgba(105, 28, 22, 0.96));
  border: 2px solid rgba(4, 3, 4, 0.9);
  border-radius: 999px;
}
#pass #passQuestsPane.drag-scroll-enabled {
  touch-action: pan-y;
  cursor: grab;
}
#pass #passQuestsPane.drag-scroll-enabled.is-dragging {
  cursor: grabbing;
  user-select: none;
}
#pass .pq-top {
  justify-content: flex-end;
  margin-bottom: 10px;
}
#pass #btnAddQuest {
  border-radius: 12px;
  border: 1px solid rgba(246, 140, 102, 0.28);
  background: linear-gradient(180deg, rgba(99, 24, 19, 0.98), rgba(35, 11, 12, 0.98));
  color: #fff0e8;
  box-shadow: 0 0 16px rgba(231, 86, 62, 0.12);
}
#pass .pq-cols {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  min-height: 0;
  width: 100%;
  min-width: 0;
  padding-bottom: 8px;
}
#pass .pq-col {
  gap: 10px;
  min-width: 0;
  width: 100%;
}
#pass .pq-title {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(233, 107, 79, 0.18);
  background: linear-gradient(180deg, rgba(34, 11, 12, 0.9), rgba(12, 8, 9, 0.96));
  color: #fff0e8;
  text-shadow: none;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#pass .pq-sub {
  color: #efb38f;
  font-size: 10px;
  letter-spacing: .08em;
}
#pass .pq-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  padding-bottom: 0;
  scroll-snap-type: none;
  overscroll-behavior: contain;
}
#pass .pq-card {
  min-width: 0;
  width: 100%;
  scroll-snap-align: none;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.04);
  background:
    linear-gradient(180deg, rgba(39, 12, 13, 0.94), rgba(12, 8, 9, 0.98)),
    radial-gradient(circle at 50% 0, rgba(231, 86, 62, 0.06), transparent 72%);
  box-shadow: 0 12px 24px rgba(0,0,0,.22);
}
#pass .pq-card.done {
  border-color: rgba(236, 121, 90, 0.28);
  box-shadow: 0 0 18px rgba(231, 86, 62, 0.08), 0 12px 24px rgba(0,0,0,.22);
}
#pass .pq-card.claimed {
  opacity: .56;
  filter: grayscale(.18);
}
#pass .pq-card.is-removing {
  animation: questCardDisappear .26s ease forwards;
  pointer-events: none;
  overflow: hidden;
}
@keyframes questCardDisappear {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-12px) scale(.96);
  }
}
#pass .pq-ic-wrap {
  grid-row: 1 / 4;
  display: grid;
  place-items: center;
}
#pass .pq-ic {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.05);
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,.14), transparent 28%),
    radial-gradient(circle at 50% 50%, rgba(255, 157, 97, 0.82), rgba(87, 29, 18, 0.96));
  box-shadow: inset 0 0 18px rgba(255,255,255,.06), 0 0 20px rgba(231, 86, 62, 0.14);
}
#pass .pq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
#pass .pq-state {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(16, 8, 9, 0.88);
  border: 1px solid rgba(255,255,255,.05);
  color: #f2ddd2;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
#pass .pq-text {
  color: #f3e2d9;
  font-size: 13px;
  line-height: 1.35;
}
#pass .pq-progress {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(12, 8, 9, 0.98), rgba(21, 8, 9, 0.98));
}
#pass .pq-progress > div {
  background: linear-gradient(90deg, rgba(104, 24, 19, 0.98), rgba(231, 86, 62, 0.98), rgba(255, 148, 88, 0.94));
}
#pass .pq-foot {
  align-items: center;
}
#pass .pq-prog-n {
  color: #d8c6bf;
}
#pass .pq-reward {
  color: #ffd8b7;
}
#pass .pq-foot-note {
  color: #c1aea7;
  font-size: 11px;
  font-weight: 700;
}
#pass .pq-claim {
  bottom: 10px;
  right: 10px;
  border-radius: 10px;
  border: 1px solid rgba(246, 140, 102, 0.28);
  background: linear-gradient(180deg, rgba(100, 24, 19, 0.98), rgba(35, 11, 12, 0.98));
  color: #fff0e8;
  box-shadow: 0 0 14px rgba(231, 86, 62, 0.12);
}

@media (max-width: 1320px) {
  #pass .pq-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #pass .pq-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
#buyPassModal {
  background: rgba(5, 6, 10, 0.84);
  backdrop-filter: blur(6px);
}
#buyPassModal .bp-modal {
  width: min(760px, 100%);
  border-radius: 26px;
  border: 1px solid rgba(237, 119, 90, 0.28);
  background:
    linear-gradient(180deg, rgba(42, 12, 14, 0.98), rgba(15, 8, 10, 0.99)),
    radial-gradient(circle at 50% 0, rgba(231, 86, 62, 0.1), transparent 72%);
  box-shadow: 0 22px 48px rgba(0,0,0,.42);
}
#buyPassModal .bp-close {
  border: 1px solid rgba(246, 140, 102, 0.3);
  background: linear-gradient(180deg, rgba(100, 24, 19, 0.98), rgba(36, 11, 12, 0.98));
  box-shadow: 0 0 16px rgba(231, 86, 62, 0.12);
}
#buyPassModal .bp-hero-row {
  text-shadow: 0 0 18px rgba(231, 86, 62, 0.18);
}
#buyPassModal .bp-title {
  color: #fff0e8;
  text-shadow: none;
}
#buyPassModal .bp-option {
  border-radius: 20px;
  border: 1px solid rgba(235, 113, 85, 0.22);
  background: linear-gradient(180deg, rgba(33, 11, 12, 0.94), rgba(12, 8, 9, 0.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
#buyPassModal .bp-or {
  color: #efb38f;
  text-shadow: none;
}
#buyPassModal .bp-opt-title {
  color: #fff0e8;
}
#buyPassModal .bp-opt-desc {
  color: #cbb8b0;
}
#buyPassModal .bp-btn {
  border-radius: 12px;
  border: 1px solid rgba(246, 140, 102, 0.28);
  background: linear-gradient(180deg, rgba(100, 24, 19, 0.98), rgba(35, 11, 12, 0.98));
  color: #fff0e8;
  box-shadow: 0 0 16px rgba(231, 86, 62, 0.12);
}

@keyframes pass-screen-spores {
  from { transform: translateY(0); }
  to { transform: translateY(18px); }
}
@keyframes pass-track-breathe {
  0%, 100% { opacity: .82; transform: translateY(-50%) scaleX(1); }
  50% { opacity: 1; transform: translateY(-50%) scaleX(1.022); }
}
@keyframes pass-card-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes pass-relic-pulse {
  0%, 100% { transform: scale(1); box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 0 22px rgba(241, 110, 83, 0.16); }
  50% { transform: scale(1.06); box-shadow: inset 0 0 18px rgba(255,255,255,.08), 0 0 30px rgba(241, 110, 83, 0.22); }
}
@media (prefers-reduced-motion: reduce) {
  #pass::before,
  #pass .pass-track::before,
  #pass .ptk-card.avail,
  #pass .ptk-card.avail .ptk-core {
    animation: none;
  }
}
@media (max-width: 720px) {
  #pass {
    padding: 8px;
  }
  #pass .pass-header {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
  }
  #pass .pass-header .back-btn { grid-column: 1; grid-row: 1; }
  #pass .pass-season { grid-column: 2; grid-row: 1; padding: 8px 10px; }
  #pass .pass-tabs { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  #pass .ptab { padding: 7px 12px; font-size: 11px; }
  #pass .pass-progress-bar { padding: 0 2px 8px; gap: 8px; }
  #pass .ppb-fill { height: 24px; }
  #pass .ppb-level { width: 36px; height: 36px; font-size: 16px; }
  #pass #passRewardsPane { gap: 8px; }
  #pass .pass-buy-col { flex: 0 0 104px; }
  #pass .pbc-card { min-height: 304px; padding: 194px 8px 18px; border-radius: 18px; }
  #pass .pbc-relic { width: 74px; height: 90px; }
  #pass .pbc-core { width: 54px; height: 54px; font-size: 26px; }
  #pass .pbc-label { font-size: 10px; }
  #pass .pbc-sub { font-size: 10px; }
  #pass .pass-track { gap: 8px; padding: 20px 8px 12px; border-radius: 22px; }
  #pass .pass-track::before { left: 14px; right: 14px; height: 10px; }
  #pass .pass-col { min-width: 86px; gap: 8px; }
  #pass .ptk-card { width: 82px; min-height: 136px; padding: 10px 6px 12px; border-radius: 16px; }
  #pass .ptk-state { font-size: 8px; padding: 6px 7px; letter-spacing: .12em; }
  #pass .ptk-relic { width: 64px; height: 72px; border-radius: 18px; }
  #pass .ptk-core { width: 46px; height: 46px; border-radius: 16px; }
  #pass .ptk-ic { font-size: 24px; }
  #pass .ptk-v { font-size: 9px; }
  #pass .ptk-coins .ptk-ic .currency-mark,
  #pass .ptk-gems .ptk-ic .currency-mark { --currency-icon-limit: 52px; }
  #pass .ptk-box .ptk-core,
  #pass .ptk-hero .ptk-core { width: 58px; height: 58px; }
  #pass .ptk-claim { font-size: 8px; padding: 4px 6px; }
  #pass .pass-lv { padding: 6px 7px; border-radius: 12px; }
  #pass .pass-lv-num { font-size: 14px; }
  #pass .pass-lv-xp { font-size: 8px; }
  #pass #passQuestsPane { padding: 0 0 72px; }
  #pass .pq-title { font-size: 12px; padding: 8px 10px; }
  #pass .pq-card { grid-template-columns: 48px 1fr; gap: 6px 8px; padding: 8px; min-width: 0; }
  #pass .pq-ic { width: 48px; height: 48px; font-size: 24px; border-radius: 14px; }
  #pass .pq-state { font-size: 8px; padding: 6px 8px; }
  #pass .pq-text { font-size: 12px; }
  #pass .pq-foot { font-size: 11px; }
  #buyPassModal .bp-modal { padding: 14px; border-radius: 20px; }
}

@media (max-width: 640px) {
  #pass .pq-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 420px) {
  #pass .pass-buy-col { flex: 0 0 92px; }
  #pass .pbc-card { min-height: 270px; padding-top: 170px; padding-bottom: 16px; }
  #pass .pass-col { min-width: 74px; }
  #pass .ptk-card { width: 72px; min-height: 124px; padding: 8px 5px 10px; }
  #pass .ptk-relic { width: 58px; height: 66px; }
  #pass .ptk-core { width: 42px; height: 42px; }
  #pass .ptk-ic { font-size: 22px; }
  #pass .ptk-v { font-size: 8px; }
  #pass .ptk-coins .ptk-ic .currency-mark,
  #pass .ptk-gems .ptk-ic .currency-mark { --currency-icon-limit: 46px; }
  #pass .ptk-box .ptk-core,
  #pass .ptk-hero .ptk-core { width: 52px; height: 52px; }
  #pass .pass-lv-num { font-size: 12px; }
  #pass .pass-lv-xp { font-size: 7px; }
}

/* ============== UI Refresh 2026-04-22 ============== */
.menu-right {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  max-width: min(100%, 520px);
}

.top-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--ui-text);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--ui-panel-soft-top), var(--ui-panel-soft-bottom));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 8px 20px rgba(0,0,0,.28);
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
}

.top-shortcut:hover { transform: translateY(-1px); border-color: rgba(255, 170, 127, 0.58); }
.top-shortcut:active { transform: translateY(2px); }
.top-shortcut .ic { width: 16px; height: 16px; }
.top-shortcut--panel {
  border-color: rgba(255, 127, 76, 0.24);
  box-shadow: 0 0 0 1px rgba(255, 102, 44, 0.08), 0 0 18px rgba(255, 102, 44, 0.14), 0 8px 18px rgba(0,0,0,.28);
}
.top-shortcut--capsule { border-radius: 999px; }

.footer-row--single {
  justify-content: flex-start;
}

.footer-row--single .banner {
  flex: 0 1 460px;
}

.currency-mark {
  --currency-icon-size: 300px;
  --currency-icon-limit: 1.38em;
  display: inline-block;
  width: min(var(--currency-icon-size), var(--currency-icon-limit));
  height: min(var(--currency-icon-size), var(--currency-icon-limit));
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  vertical-align: middle;
  image-rendering: auto;
  filter: drop-shadow(0 0 10px rgba(255, 118, 74, 0.18));
}

.currency-mark::before,
.currency-mark::after,
.hud-icon.coin::before,
.hud-icon.coin::after,
.hud-icon.gem::before,
.hud-icon.gem::after {
  display: none;
}

.hud-icon.coin,
.hud-icon.gem,
.currency-mark--coin,
.currency-mark--crystal,
.currency-mark--power {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.hud-icon.coin,
.currency-mark--coin {
  background-image: url("../assets/UI/coin.png");
}

.hud-icon.gem,
.currency-mark--crystal {
  background-image: url("../assets/UI/crystal.png");
}

.currency-mark--power {
  background-image: url("../assets/UI/IconForStrengh.png");
}

.currency-inline {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  white-space: nowrap;
  vertical-align: middle;
}

.currency-inline__icon {
  --currency-icon-size: 300px;
  --currency-icon-limit: 1.38em;
}

.mini-info .currency-mark,
.muted .currency-mark,
.boss-reward .currency-mark,
.pq-reward .currency-mark,
.hd-upg-coins .currency-mark,
.hd-convert-row .currency-mark,
.hd-convert-rate .currency-mark,
.card .orig .currency-mark,
.bp-btn .currency-mark {
  --currency-icon-limit: 1.06em;
}

.reward-art--currency {
  font-size: 0;
  width: min(70vw, 300px);
  height: min(70vw, 300px);
}

.reward-art--currency .currency-mark {
  --currency-icon-limit: min(70vw, 300px);
  filter: drop-shadow(0 0 18px rgba(255, 205, 120, 0.32));
}

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
}
.tutorial-overlay.blocks-gameplay {
  pointer-events: auto;
}
.tutorial-overlay--disclaimer {
  background:
    radial-gradient(circle at 50% 10%, rgba(151, 217, 255, .16), transparent 42%),
    linear-gradient(180deg, rgba(6, 13, 34, .24), rgba(6, 13, 34, .62));
  backdrop-filter: blur(4px);
}
.tutorial-card {
  position: fixed;
  left: var(--tutorial-left, clamp(14px, 4vw, 56px));
  top: var(--tutorial-top, auto);
  bottom: var(--tutorial-bottom, clamp(14px, 4vw, 44px));
  width: min(92vw, 620px);
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  border: 2px solid rgba(255, 39, 39, .68);
  background: linear-gradient(135deg, rgba(0,0,0,.94), rgba(35, 3, 8, .96));
  box-shadow: 0 0 28px rgba(255,0,0,.28), 0 18px 42px rgba(0,0,0,.58);
  pointer-events: auto;
}
.tutorial-card--disclaimer {
  width: min(92vw, 720px);
  display: block;
  padding: 22px 24px 20px;
  max-height: min(82vh, 640px);
  overflow: auto;
  border: 3px solid rgba(132, 205, 255, .84);
  background:
    linear-gradient(180deg, rgba(51, 157, 255, .98), rgba(17, 88, 224, .99) 58%, rgba(12, 52, 169, .99));
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.14),
    0 0 32px rgba(56, 145, 255, .24),
    0 20px 44px rgba(0,0,0,.5);
}
.tutorial-dustin {
  height: 170px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 215, 106, .46);
  background: radial-gradient(circle at 50% 18%, rgba(255,215,106,.16), rgba(0,0,0,.78) 68%);
}
.tutorial-dustin-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  transform: scale(1.28);
  transform-origin: center top;
}
.tutorial-copy {
  color: #fff6e8;
}
.tutorial-copy--disclaimer {
  color: #fef8eb;
}
.tutorial-kicker {
  color: #ffd76a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.tutorial-disclaimer-title {
  margin: 0 0 16px;
  text-align: center;
  color: #fff9df;
  font-size: clamp(28px, 4.4vw, 44px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: .05em;
  text-shadow:
    0 3px 0 rgba(7, 31, 104, .7),
    0 10px 20px rgba(0,0,0,.28);
}
.tutorial-text {
  margin: 8px 0 14px;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.42;
  text-shadow: 0 2px 10px rgba(0,0,0,.65);
}
.tutorial-text--disclaimer {
  margin: 0;
  font-size: 15px;
  line-height: 1.54;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .32);
}
.tutorial-disclaimer-lead {
  margin-bottom: 14px;
}
.tutorial-disclaimer-alert {
  margin-bottom: 10px;
  color: #fff3a5;
  font-size: 15px;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tutorial-disclaimer-list {
  margin: 0 0 14px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
.tutorial-disclaimer-list li::marker {
  color: #ffe25c;
}
.tutorial-disclaimer-note {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(5, 22, 88, .28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  font-size: 14px;
}
.tutorial-disclaimer-ok {
  display: flex;
  justify-content: center;
  min-width: 170px;
  margin: 18px auto 0;
}
.tutorial-note {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 106, .42);
  background: rgba(0, 0, 0, .52);
  color: #ffd76a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tutorial-form {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}
.tutorial-name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}
.tutorial-name-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 106, .28);
  background: rgba(0, 0, 0, .56);
  color: #fff7ef;
  font-size: 14px;
  font-weight: 700;
}
.tutorial-lang-row {
  display: flex;
  gap: 8px;
}
.tutorial-name-random {
  white-space: nowrap;
}
.tutorial-skip {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}
.tutorial-arrow {
  position: fixed;
  width: 92px;
  height: 5px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 215, 106, .05), #ffd76a);
  border-radius: 999px;
  filter: drop-shadow(0 0 10px rgba(255, 39, 39, .75));
  animation: tutorialArrowBob 0.9s ease-in-out infinite alternate;
}
.tutorial-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-right: 5px solid #ffd76a;
  border-bottom: 5px solid #ffd76a;
  transform: translateY(-50%) rotate(-45deg);
}
@keyframes tutorialArrowBob {
  from { margin-left: 0; }
  to { margin-left: 10px; }
}
@media (max-width: 620px) {
  .tutorial-card {
    right: auto;
    width: auto;
    max-width: calc(100vw - 20px);
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
  }
  .tutorial-card--disclaimer {
    padding: 18px 16px 16px;
  }
  .tutorial-dustin {
    height: 118px;
    border-radius: 16px;
  }
  .tutorial-text {
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 10px;
  }
  .tutorial-text--disclaimer {
    font-size: 13px;
    line-height: 1.45;
  }
  .tutorial-disclaimer-title {
    margin-bottom: 14px;
    font-size: clamp(24px, 8vw, 34px);
  }
  .tutorial-disclaimer-alert {
    font-size: 13px;
  }
  .tutorial-disclaimer-note {
    font-size: 12px;
  }
  .tutorial-name-row {
    grid-template-columns: 1fr;
  }
  .tutorial-arrow {
    width: 56px;
    height: 4px;
  }
}

.reward-art--equipment {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(70vw, 300px);
  height: min(70vw, 300px);
  border: 3px solid var(--rar, #ffd84a);
  border-radius: 28px;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.1), rgba(0,0,0,.7) 62%, #000 100%);
  box-shadow: inset 0 0 22px rgba(255,255,255,.08), 0 0 28px color-mix(in srgb, var(--rar, #ffd84a) 48%, transparent);
  overflow: hidden;
}

.reward-art--equipment img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  padding: 16px;
}

.sum-card .ic .currency-mark {
  --currency-icon-limit: min(22vw, 96px);
}

.portrait .currency-mark {
  --currency-icon-limit: 54px;
  filter: drop-shadow(0 0 12px rgba(255, 145, 87, 0.24));
}

.shop-card .portrait .currency-mark {
  --currency-icon-limit: min(90%, 300px);
}

#shop {
  --shop-bg-desktop: url("../assets/backgrounds/MagazineBackground.png");
  --shop-bg-mobile: url("../assets/backgrounds/MagazineBackgroundPhone.png");
  --shop-bg-current: var(--shop-bg-desktop);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(4, 6, 10, 0.84), rgba(6, 5, 8, 0.68) 42%, rgba(4, 4, 7, 0.9)),
    var(--shop-bg-current);
  background-position: center center, center center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}

#shop::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 45, 45, 0.14), transparent 34%),
    linear-gradient(90deg, rgba(0,0,0,.56), transparent 26%, transparent 74%, rgba(0,0,0,.62));
}

#shop > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 1400px) {
  #shopGrid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    max-width: 1040px;
  }
}

@media (max-width: 1100px) {
  #shopGrid {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
    max-width: 820px;
  }
}

@media (max-width: 820px) {
  #shopGrid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    max-width: 560px;
  }
}

.settings-language {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid rgba(255, 39, 39, 0.24);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.42);
}

.settings-language__title {
  margin-right: auto;
  font-weight: 900;
  color: #fff1e8;
}

@media (max-width: 768px) and (orientation: portrait) {
  #shop {
    --shop-bg-current: var(--shop-bg-mobile);
    background-position: center top, center top;
  }
}

.pf-tile-icon .currency-mark {
  --currency-icon-limit: 30px;
}

.tr-core-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tr-core-glyph .currency-mark {
  --currency-icon-limit: 42px;
}

.tr-node.next .tr-core-glyph .currency-mark {
  --currency-icon-limit: 52px;
}

.tr-card--coins .tr-core-glyph .currency-mark,
.tr-card--gems .tr-core-glyph .currency-mark {
  --currency-icon-limit: 80px;
}

.ptk-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ptk-ic .currency-mark {
  --currency-icon-limit: 34px;
}

.reward-amount--pp .currency-mark {
  --currency-icon-limit: .95em;
}

.pf-subtabs {
  flex-wrap: wrap;
}

.pf-subtab {
  min-width: 132px;
}

@media (max-width: 900px) {
  .top {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .currencies {
    justify-content: flex-start;
  }

  .menu-right {
    justify-content: flex-start;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  #shopGrid {
    display: flex;
    flex-direction: row;
    gap: 10px;
    max-width: none;
    margin: 0;
    justify-content: flex-start;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px 28px;
    touch-action: pan-x;
  }

  #shopGrid .shop-card {
    width: min(78vw, 260px);
    max-width: 260px;
    flex: 0 0 min(78vw, 260px);
  }

  .shop-card .meta .currency-mark {
    --currency-icon-limit: 34px;
  }

  .shop-card .meta .orig .currency-mark {
    --currency-icon-limit: 42px;
  }

  .boss-detail,
  .leader-profile-equipment-card {
    grid-template-columns: 1fr;
  }

  .boss-detail-portrait {
    width: min(72vw, 260px);
    margin: 0 auto;
  }

  .boss-detail-copy {
    text-align: center;
  }
  .boss-hero-picker-card {
    flex-basis: min(220px, 78vw);
  }

  .top-shortcut {
    min-height: 40px;
    padding: 0 10px;
    font-size: 9px;
    gap: 6px;
  }

  .top-shortcut .ic {
    width: 14px;
    height: 14px;
  }

  .menu-right {
    gap: 6px;
  }

  .reward-art--currency .currency-mark {
    --currency-icon-limit: min(70vw, 300px);
  }

  .ptk-ic .currency-mark {
    --currency-icon-limit: 26px;
  }

  .tr-core-glyph .currency-mark {
    --currency-icon-limit: 34px;
  }

  .tr-node.next .tr-core-glyph .currency-mark {
    --currency-icon-limit: 42px;
  }
}
