:root {
  color-scheme: dark;
  --bg-0: #06070c;
  --bg-1: #0b1020;
  --bg-2: #14112b;
  --panel: rgba(15, 18, 33, 0.82);
  --panel-strong: rgba(18, 22, 40, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1ff;
  --text-soft: #b9bfd7;
  --text-faint: #7f87aa;
  --gold: #ffd36b;
  --gold-strong: #ffb300;
  --pink: #ff58c5;
  --violet: #7459ff;
  --cyan: #5ed8ff;
  --green: #70e9a6;
  --red: #ff7f7f;
  --shadow-xl: 0 42px 120px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 22px 64px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 14px 30px rgba(0, 0, 0, 0.24);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 88, 197, 0.18), transparent 28%),
    radial-gradient(circle at 80% 12%, rgba(94, 216, 255, 0.14), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(116, 89, 255, 0.22), transparent 34%),
    linear-gradient(180deg, #080912 0%, #09070d 38%, #05060b 100%);
}

body {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body.modal-open {
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

button {
  font: inherit;
}

.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cloud,
.spark {
  position: absolute;
}

.cloud {
  border-radius: 999px;
  filter: blur(40px);
}

.cloud-left {
  width: 520px;
  height: 520px;
  left: -160px;
  top: -60px;
  background: radial-gradient(circle, rgba(255, 211, 107, 0.16), rgba(255, 211, 107, 0));
}

.cloud-right {
  width: 620px;
  height: 620px;
  right: -220px;
  bottom: -200px;
  background: radial-gradient(circle, rgba(116, 89, 255, 0.18), rgba(116, 89, 255, 0));
}

.spark {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 18px rgba(255, 211, 107, 0.45);
  animation: drift 13s linear infinite;
}

.spark-one {
  top: 18%;
  left: 62%;
}

.spark-two {
  top: 72%;
  left: 20%;
  animation-duration: 16s;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 18px 112px;
}

.shell.is-muted {
  pointer-events: none;
  filter: blur(6px);
}

.app-screen {
  display: none;
}

.app-screen.is-active {
  display: block;
}

.app-screen[data-screen="pack"] .hero-panel,
.collection-screen {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.hero-panel,
.info-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.hero-panel {
  border-radius: 42px;
  padding: 28px;
}

.pack-dashboard {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pack-support-card,
.collection-jump-card {
  min-height: 100%;
}

.collection-jump-card {
  appearance: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.collection-jump-card:hover,
.collection-jump-card:focus-visible {
  transform: translateY(-2px);
}

.collection-jump-copy {
  display: grid;
  gap: 8px;
}

.collection-jump-copy strong,
.collection-hero-copy h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.collection-jump-copy strong {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.collection-jump-copy p {
  margin: 0;
}

.collection-jump-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 211, 107, 0.18), rgba(255, 88, 197, 0.12));
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.eyebrow,
.metric-label,
.badge,
.label,
.box-badge {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

.eyebrow,
.metric-label,
.label {
  color: var(--gold);
}

.hero-copy h1,
.stage-copy h2,
.metric strong,
.reward-bloom-copy strong,
.readout strong,
.modal-copy h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 8ch;
  font-size: clamp(3.4rem, 5.8vw, 6rem);
  line-height: 0.9;
}

.hero-subline,
.copy,
.history-list span {
  color: var(--text-soft);
  line-height: 1.62;
}

.stage-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(255, 211, 107, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(14, 18, 33, 0.98), rgba(9, 11, 21, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-shell::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.stage-topline,
.card-title-row,
.telegram-meta,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stage-copy,
.stage-topline,
.stage-actions {
  position: relative;
  z-index: 2;
}

.pill,
.badge,
.lang-switch,
.box-badge {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.pill,
.badge {
  padding: 8px 12px;
  color: var(--text-soft);
}

.status-cluster {
  display: flex;
  gap: 8px;
}

.status-cluster span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff7d0, #ffb300);
  opacity: 0.18;
}

.status-cluster span:first-child {
  opacity: 0.78;
}

.stage-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(2.4rem, 3.4vw, 3.4rem);
}

.stage-copy p {
  max-width: 54ch;
}

.box-stage {
  position: relative;
  min-height: 560px;
  margin: 18px 0 10px;
  display: grid;
  place-items: center;
}

.stage-noise,
.stage-grid,
.stage-glow,
.stage-ring,
.pack-shadow,
.star-stream {
  position: absolute;
  pointer-events: none;
}

.stage-noise {
  inset: 0;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.7) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px),
    radial-gradient(circle at 40% 76%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px);
  background-size: 220px 220px;
}

.stage-grid {
  inset: 2% 5%;
  border-radius: 28px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.86), transparent 78%);
}

.stage-glow {
  border-radius: 50%;
  filter: blur(24px);
}

.glow-a {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 88, 197, 0.24), rgba(255, 88, 197, 0));
  left: 10%;
  top: 14%;
}

.glow-b {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(94, 216, 255, 0.18), rgba(94, 216, 255, 0));
  right: 8%;
  bottom: 8%;
}

.stage-ring {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ring-a {
  width: min(78%, 470px);
  aspect-ratio: 1;
}

.ring-b {
  width: min(56%, 330px);
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.7;
}

.pack-shadow {
  bottom: 12%;
  width: min(320px, 72vw);
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0) 72%);
  filter: blur(8px);
}

.star-stream {
  inset: 0;
}

.star-stream span {
  position: absolute;
  left: 50%;
  top: 52%;
  width: var(--size);
  height: var(--size);
  margin-left: calc(var(--size) / -2);
  margin-top: calc(var(--size) / -2);
  background: linear-gradient(180deg, #fff2c7, #ffb300);
  clip-path: polygon(50% 0%, 61% 35%, 100% 50%, 61% 65%, 50% 100%, 39% 65%, 0% 50%, 39% 35%);
  opacity: 0;
  transform: translate(var(--tx), var(--ty)) rotate(var(--rotation)) scale(0.2);
  filter: drop-shadow(0 0 12px rgba(255, 211, 107, 0.7));
  animation: starDive 860ms ease forwards;
  animation-delay: var(--delay);
}

.surprise-box {
  position: relative;
  z-index: 2;
  width: min(340px, 76vw);
  height: min(500px, 84vw);
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
}

.pack-shell.is-charging {
  animation: packCharge 620ms ease forwards;
}

.pack-shell.is-opening {
  animation: packLift 760ms cubic-bezier(.18, .82, .24, 1) forwards;
}

.pack-back-card,
.pack-front {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none;
}

.pack-back-card {
  inset: 4% 12%;
  background:
    linear-gradient(180deg, rgba(24, 29, 50, 0.94), rgba(13, 16, 29, 0.96)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 40%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(26px) scale(0.94);
  opacity: 0;
  transition: transform 660ms cubic-bezier(.18, .82, .24, 1), opacity 360ms ease;
}

.pack-shell.is-opening .pack-back-card {
  transform: translateY(-18px) scale(0.96);
  opacity: 1;
}

.pack-front {
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #11172d 0%, #111933 20%, #0b0f22 72%, #070a14 100%);
  box-shadow: var(--shadow-xl);
  transition: transform 620ms cubic-bezier(.18, .82, .24, 1), opacity 520ms ease;
}

.pack-front::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(6, 7, 12, 0.08), rgba(6, 7, 12, 0.24)),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 30%);
  pointer-events: none;
}

.pack-shell.is-opening .pack-front {
  transform: translateY(34px) scale(0.93);
  opacity: 0.12;
}

.pack-foil,
.pack-seal,
.pack-edge-glow {
  position: absolute;
  pointer-events: none;
}

.pack-cover-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.01);
  pointer-events: none;
}

.pack-foil {
  inset: -10% -24%;
  background:
    linear-gradient(120deg, transparent 22%, rgba(255, 255, 255, 0.1) 36%, transparent 48%, rgba(255, 211, 107, 0.18) 58%, transparent 72%),
    linear-gradient(160deg, transparent 10%, rgba(94, 216, 255, 0.16) 38%, transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.8;
  animation: foilShift 6s linear infinite;
}

.pack-seal {
  left: 50%;
  top: -2px;
  width: 64%;
  height: 20%;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(255, 211, 107, 0.9), rgba(255, 179, 0, 0.58)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 30%, rgba(255, 255, 255, 0.12) 70%, transparent);
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
  box-shadow: 0 12px 30px rgba(255, 179, 0, 0.32);
  transition: transform 620ms cubic-bezier(.18, .82, .24, 1), opacity 360ms ease;
}

.pack-shell.is-opening .pack-seal {
  transform: translateX(-50%) translateY(-42px) rotate(-8deg);
  opacity: 0;
}

.pack-art {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pack-orb,
.pack-burst,
.pack-silhouette {
  display: none;
}

.pack-edge-glow {
  inset: 3% 8%;
  border-radius: 30px;
  background: radial-gradient(circle, rgba(255, 211, 107, 0.18), rgba(255, 211, 107, 0));
  filter: blur(22px);
  opacity: 0.84;
}

.pack-shell.is-charging .pack-edge-glow,
.pack-shell.is-opening .pack-edge-glow {
  animation: glowPulse 620ms ease forwards;
}

.reward-bloom {
  position: absolute;
  z-index: 3;
  inset: 3% 0 auto;
  height: 78%;
  pointer-events: none;
  overflow: visible;
}

.reward-bloom-card {
  position: absolute;
  left: 50%;
  top: 4%;
  width: min(220px, 34vw);
  padding: 10px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(27, 31, 53, 0.98), rgba(17, 20, 35, 0.98));
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translate3d(-50%, 190px, 0) rotate(0deg) scale(0.56);
  will-change: transform, opacity;
  transform-origin: center top;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint;
  pointer-events: auto;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 720ms cubic-bezier(.12, .84, .24, 1),
    opacity 220ms ease,
    box-shadow 220ms ease;
  cursor: pointer;
}

.reward-bloom-card.is-revealing {
  opacity: 1;
  transform: translate3d(-50%, 4px, 0) rotate(var(--reveal-rotation, 0deg)) scale(1.08);
  z-index: 6;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 20px 54px rgba(0, 0, 0, 0.34),
    var(--shadow-xl);
}

.reward-bloom-card.is-docked {
  opacity: 1;
  transform:
    translate3d(calc(-50% + var(--dock-x, 0px)), var(--dock-y, 0px), 0)
    rotate(var(--dock-rotation, 0deg))
    scale(var(--dock-scale, 1));
  z-index: 2;
}

.reward-bloom.is-interactive .reward-bloom-card.is-docked:hover,
.reward-bloom.is-interactive .reward-bloom-card.is-docked:focus-visible {
  transform:
    translate3d(calc(-50% + var(--dock-x, 0px)), calc(var(--dock-y, 0px) - 16px), 0)
    rotate(var(--dock-rotation, 0deg))
    scale(calc(var(--dock-scale, 1) + 0.04));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.34);
}

.card-sleeve::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.reward-bloom-card img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.reward-bloom-copy {
  display: grid;
  gap: 5px;
  padding: 12px 4px 4px;
}

.reward-bloom-copy span {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.reward-bloom-copy strong {
  font-size: 1.16rem;
}

.reward-bloom-card.is-featured {
  width: min(236px, 37vw);
}

.reward-bloom-card.is-featured.is-revealing {
  transform: translate3d(-50%, -8px, 0) rotate(0deg) scale(1.16);
  box-shadow:
    0 0 0 1px rgba(255, 211, 107, 0.18),
    0 0 50px rgba(255, 179, 0, 0.24),
    var(--shadow-xl);
}

.reward-bloom-card.is-featured.is-docked {
  z-index: 3;
}

.reward-bloom-card.rarity-epic {
  box-shadow:
    0 0 0 1px rgba(255, 88, 197, 0.16),
    0 0 34px rgba(255, 88, 197, 0.2),
    var(--shadow-xl);
}

.reward-bloom-card.rarity-rare {
  box-shadow:
    0 0 0 1px rgba(94, 216, 255, 0.16),
    0 0 34px rgba(94, 216, 255, 0.18),
    var(--shadow-xl);
}

.readout {
  display: grid;
  gap: 4px;
}

.readout strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

.stage-status-copy {
  margin: 2px 0 0;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.action-row {
  margin-top: 18px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.modal-close,
.lang-button {
  appearance: none;
  border: 0;
}

.primary-button,
.secondary-button,
.modal-close {
  cursor: pointer;
  border-radius: 999px;
  padding: 15px 22px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.primary-button {
  min-width: 240px;
  color: #06070c;
  background: linear-gradient(135deg, #fff0ad, #ffb300 54%, #ff7a00 100%);
  box-shadow:
    0 12px 26px rgba(255, 179, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.secondary-button,
.modal-close {
  min-width: 220px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.topup-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(9, 13, 24, 0.9);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.primary-button:hover,
.secondary-button:hover,
.modal-close:hover,
.gallery-item:hover,
.gallery-item:focus-visible,
.collection-slot.is-unlocked:hover,
.collection-slot.is-unlocked:focus-visible {
  transform: translateY(-2px);
}

.topup-button:hover,
.topup-button:focus-visible {
  border-color: rgba(255, 211, 107, 0.34);
  box-shadow: 0 16px 30px rgba(255, 179, 0, 0.14);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}

.info-panel {
  display: grid;
  gap: 14px;
}

.info-card {
  border-radius: 28px;
  padding: 18px;
}

.collection-screen {
  display: grid;
  gap: 18px;
}

.collection-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.collection-hero-copy {
  display: grid;
  gap: 8px;
}

.collection-hero-copy h2 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
}

.collection-hero-copy p {
  max-width: 54ch;
  margin: 0;
}

.collection-toolbar {
  display: grid;
  gap: 14px;
}

.segmented-tabs,
.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented-button,
.filter-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.segmented-button.is-active,
.filter-chip.is-active {
  color: var(--text);
  border-color: rgba(255, 211, 107, 0.28);
  background: linear-gradient(135deg, rgba(255, 211, 107, 0.18), rgba(255, 88, 197, 0.08));
  box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.08);
}

.segmented-button:hover,
.segmented-button:focus-visible,
.filter-chip:hover,
.filter-chip:focus-visible {
  transform: translateY(-1px);
  color: var(--text);
}

.collection-summary {
  margin-top: 0;
}

.card-title-row {
  flex-wrap: wrap;
}

.card-title-row h2 {
  margin: 0;
  font-size: 1.02rem;
}

.collection-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.mini-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.mini-button:hover,
.mini-button:focus-visible {
  transform: translateY(-1px);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.telegram-meta {
  flex-wrap: wrap;
}

.tester-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tester-tools[hidden] {
  display: none !important;
}

.tester-wallet {
  display: grid;
  gap: 4px;
}

.tester-wallet strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
}

.lang-button {
  cursor: pointer;
  min-width: 42px;
  padding: 7px 10px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lang-button.is-active {
  background: linear-gradient(135deg, rgba(255, 211, 107, 0.22), rgba(255, 88, 197, 0.18));
  color: var(--text);
}

.metrics-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.metric,
.rarity-row,
.collection-group,
.gallery-item,
.empty-card,
.history-list li {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.metric {
  padding: 15px;
  border-radius: 18px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
}

.upgrade-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(16, 19, 34, 0.96), rgba(9, 11, 22, 0.96));
}

.upgrade-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.upgrade-panel-head h3 {
  margin: 4px 0 0;
  font-size: 1rem;
}

.upgrade-panel-head .copy {
  margin: 8px 0 0;
}

.upgrade-points-card {
  min-width: 110px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.upgrade-points-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
}

.upgrade-button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.upgrade-button {
  min-width: 0;
  width: 100%;
  padding-inline: 14px;
}

.box-grid,
.rarity-summary,
.collection-groups {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.box-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.box-card,
.collection-group,
.empty-card,
.gallery-item {
  border-radius: 22px;
}

.box-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(16, 19, 34, 0.96), rgba(9, 11, 22, 0.96));
}

.box-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.08), transparent 34%);
  pointer-events: none;
}

.box-card-head,
.box-card-meta,
.rarity-row-head,
.collection-group-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.box-card-head,
.collection-group-head {
  align-items: flex-start;
}

.box-card-head h3,
.collection-group-head h3,
.gallery-copy h3,
.history-list strong {
  margin: 0;
  font-size: 1rem;
}

.box-card-head p,
.collection-group-head p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.45;
}

.box-card-meta {
  margin-top: 12px;
  flex-wrap: wrap;
  color: var(--text-faint);
  font-size: 0.76rem;
}

.box-card-chances {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.box-card-chances span {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.box-action {
  width: 100%;
  min-width: 0;
}

.box-card.is-premium {
  box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.2);
}

.box-card.is-daily {
  box-shadow: inset 0 0 0 1px rgba(112, 233, 166, 0.18);
}

.empty-card {
  padding: 18px 16px;
  display: grid;
  gap: 6px;
}

.quick-status {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.status-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.status-chip.is-good {
  background: rgba(112, 233, 166, 0.1);
  color: var(--green);
}

.rarity-row {
  padding: 12px 14px;
  border-radius: 18px;
}

.rarity-row-head {
  align-items: center;
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.reward-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.reward-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.rarity-common .reward-progress span {
  background: var(--green);
}

.rarity-rare .reward-progress span {
  background: var(--cyan);
}

.rarity-epic .reward-progress span {
  background: var(--pink);
}

.rarity-legendary .reward-progress span {
  background: var(--gold);
}

.collection-group {
  padding: 14px;
}

.collection-group-head {
  margin-bottom: 12px;
}

.collection-group-head > span {
  color: var(--text-faint);
  font-size: 0.78rem;
  white-space: nowrap;
}

.collection-grid,
.reward-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.collection-slot,
.gallery-item {
  position: relative;
  overflow: hidden;
}

.collection-slot,
.gallery-item {
  appearance: none;
  display: grid;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, rgba(15, 18, 33, 0.98), rgba(9, 11, 22, 0.98));
  text-align: left;
}

.collection-slot::before,
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.1), transparent 32%);
  pointer-events: none;
}

.collection-slot.is-unlocked,
.gallery-item {
  cursor: pointer;
}

.collection-slot-thumb,
.gallery-thumb {
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.04);
}

.collection-slot-thumb img,
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.locked-thumb {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
}

.collection-slot-copy,
.gallery-copy {
  padding: 12px;
  display: grid;
  gap: 4px;
}

.collection-slot-copy span,
.gallery-copy small,
.vault-tier {
  color: var(--text-faint);
  font-size: 0.72rem;
}

.collection-slot-copy strong {
  font-size: 0.92rem;
}

.gallery-item {
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.vault-tier {
  padding: 6px 10px;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rarity-common .vault-tier {
  color: #08210f;
  background: rgba(112, 233, 166, 0.9);
}

.rarity-rare .vault-tier {
  color: #042130;
  background: rgba(94, 216, 255, 0.92);
}

.rarity-epic .vault-tier {
  color: #260321;
  background: rgba(255, 88, 197, 0.9);
}

.rarity-legendary .vault-tier {
  color: #231400;
  background: rgba(255, 211, 107, 0.94);
}

.reward-gallery {
  margin-top: 14px;
}

.collection-gallery {
  margin-top: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.preview-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.preview-gallery .gallery-item,
.preview-gallery .empty-card {
  flex: 0 0 min(172px, 48vw);
  scroll-snap-align: start;
}

.hub-gallery {
  margin-top: 16px;
}

.hub-gallery.reward-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hidden-panel {
  display: none !important;
}

.compact-box-grid {
  margin-top: 14px;
}

.compact-box-grid .box-card-chances span:nth-child(n+3) {
  display: none;
}

.compact-rarity-summary {
  margin-top: 0;
}

.compact-rarity-summary .rarity-row {
  padding: 10px 12px;
}

.gallery-copy h3 {
  font-size: 0.96rem;
}

.gallery-copy small {
  line-height: 1.4;
}

.history-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 18px;
}

.history-list li > div {
  min-width: 0;
}

.history-list li > span:last-child {
  color: var(--text-faint);
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 8;
  transform: translateX(-50%);
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 11, 22, 0.86);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.bottom-nav-button {
  appearance: none;
  border: 0;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    transform 180ms ease,
    color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.bottom-nav-button.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 211, 107, 0.18), rgba(255, 88, 197, 0.14));
  box-shadow: inset 0 0 0 1px rgba(255, 211, 107, 0.1);
}

.bottom-nav-button:hover,
.bottom-nav-button:focus-visible {
  transform: translateY(-1px);
}

.bottom-nav.is-disabled {
  pointer-events: none;
  opacity: 0.72;
}

.hub-modal,
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(14px);
  overscroll-behavior: contain;
}

.hub-modal {
  z-index: 9;
}

.modal {
  z-index: 10;
}

.hub-modal.hidden,
.modal.hidden {
  display: none;
}

.hub-modal-card,
.modal-card {
  width: min(980px, 100%);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(180deg, rgba(18, 22, 40, 0.98), rgba(11, 14, 25, 0.98));
  box-shadow: var(--shadow-xl);
}

.hub-modal-card {
  max-height: min(82svh, 82vh);
  overflow: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.hub-modal-card .card-title-row {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: -20px -20px 0;
  padding: 20px 20px 16px;
  background: rgba(18, 22, 40, 0.95);
  backdrop-filter: blur(12px);
}

.hub-modal-card .collection-groups,
.hub-modal-card .history-list {
  margin-top: 16px;
}

.modal-card {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
  padding: 22px;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  transition:
    opacity 260ms ease,
    transform 420ms cubic-bezier(.18, .82, .24, 1);
}

.modal.is-revealed .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-burst {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 211, 107, 0.12);
  color: var(--gold);
}

.modal-copy h2 {
  margin: 12px 0 10px;
  font-size: clamp(2rem, 2.8vw, 2.9rem);
}

.modal-status {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
}

.modal-actions {
  margin-top: 22px;
}

.modal-image-wrap {
  position: relative;
  min-height: 480px;
  border-radius: 24px;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.modal-image-wrap img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  display: block;
  border-radius: 18px;
}

.modal-image-glow {
  position: absolute;
  inset: auto 12% 7% 12%;
  height: 18%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 211, 107, 0.24), rgba(255, 211, 107, 0));
  filter: blur(24px);
  pointer-events: none;
}

.modal[data-rarity="epic"] .modal-card {
  box-shadow:
    0 0 0 1px rgba(255, 88, 197, 0.1),
    0 0 34px rgba(255, 88, 197, 0.12),
    var(--shadow-xl);
}

.modal[data-rarity="rare"] .modal-card {
  box-shadow:
    0 0 0 1px rgba(94, 216, 255, 0.1),
    0 0 34px rgba(94, 216, 255, 0.12),
    var(--shadow-xl);
}

.modal-pack-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.modal-pack-item {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-pack-thumb {
  aspect-ratio: 0.72;
  background: rgba(255, 255, 255, 0.03);
}

.modal-pack-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-pack-copy {
  padding: 8px 8px 10px;
  display: grid;
  gap: 3px;
}

.modal-pack-copy span,
.modal-pack-copy strong {
  font-size: 0.72rem;
}

.modal-pack-copy span {
  color: var(--text-soft);
}

@keyframes packCharge {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-9px) scale(1.012);
  }
  100% {
    transform: translateY(-3px) scale(1.005);
  }
}

@keyframes packLift {
  0% {
    transform: translateY(0);
  }
  35% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0% {
    transform: scale(0.94);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes rewardCardBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, 150px) rotate(0deg) scale(0.68);
  }
  18% {
    opacity: 1;
  }
  72% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--burst-x, 0px)), var(--burst-y, 0px))
      rotate(var(--burst-rotation, 0deg))
      scale(var(--burst-scale, 1));
  }
  100% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--burst-x, 0px)), var(--burst-y, 0px))
      rotate(var(--burst-rotation, 0deg))
      scale(var(--burst-scale, 1));
  }
}

@keyframes foilShift {
  from {
    transform: translateX(-18%) rotate(0deg);
  }
  to {
    transform: translateX(18%) rotate(0deg);
  }
}

@keyframes burstSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes starDive {
  0% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rotation)) scale(0.28);
  }
  16% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(22px, -28px, 0);
  }
}

@media (max-width: 1120px) {
  .pack-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .collection-jump-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 12px 10px 108px;
    gap: 12px;
  }

  .hero-panel,
  .info-card {
    border-radius: 24px;
    padding: 14px;
  }

  .stage-shell {
    padding: 16px;
    border-radius: 24px;
  }

  .pack-dashboard {
    grid-template-columns: 1fr;
  }

  .collection-jump-card,
  .collection-hero {
    display: grid;
  }

  .collection-jump-cta {
    justify-self: flex-start;
  }

  .stage-shell::before {
    inset: 8px;
    border-radius: 18px;
  }

  .hero-copy h1 {
    font-size: clamp(2.5rem, 12vw, 3.8rem);
  }

  .hero-subline,
  .copy,
  .history-list span {
    font-size: 0.9rem;
  }

  .box-stage {
    min-height: 430px;
  }

  .surprise-box {
    width: min(280px, 82vw);
    height: min(420px, 122vw);
  }

  .reward-bloom {
    width: 100%;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .modal-close {
    width: 100%;
    min-width: 0;
  }

  .metrics-card,
  .collection-grid,
  .reward-gallery {
    grid-template-columns: 1fr;
  }

  .upgrade-panel-head,
  .upgrade-button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .metric strong {
    font-size: 1.55rem;
  }

  .box-card-head,
  .collection-group-head,
  .box-card-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .history-list li {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .history-list li > span:last-child {
    white-space: normal;
  }

  .mini-button {
    min-height: 40px;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    border-radius: 24px 24px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .modal-card {
    min-height: min(90svh, 90vh);
    max-height: min(90svh, 90vh);
    overflow: auto;
    grid-template-columns: 1fr;
    padding: 14px 12px 18px;
  }

  .modal-image-wrap {
    min-height: auto;
    max-height: none;
    align-items: flex-start;
    padding: 10px;
  }

  .modal-image-wrap img {
    width: 100%;
    height: auto;
  }

  .modal-pack-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reward-bloom {
    inset: 7% 0 auto;
    height: 68%;
  }

  .reward-bloom-card {
    width: min(176px, 46vw);
    padding: 8px;
  }

  .reward-bloom-card.is-featured {
    width: min(188px, 50vw);
  }

  .reward-bloom-copy {
    padding: 9px 2px 2px;
  }

  .reward-bloom-copy strong {
    font-size: 0.92rem;
  }

  .collection-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    width: calc(100% - 20px);
    grid-template-columns: repeat(2, 1fr);
  }
}
