:root {
  --bg: #07090d;
  --panel: #10141d;
  --panel-2: #171d29;
  --panel-3: #20283a;
  --text: #f7f8fb;
  --muted: #9aa4b7;
  --line: rgba(255, 255, 255, 0.11);
  --blue: #42a5ff;
  --mint: #32e6a1;
  --gold: #ffd166;
  --pink: #ff5f9f;
  --red: #ff5f6d;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  --nav-height: 5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(66, 165, 255, 0.13), transparent 28rem),
    linear-gradient(225deg, rgba(50, 230, 161, 0.11), transparent 24rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.82rem 1rem;
  background: rgba(7, 9, 13, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  margin-right: auto;
}

.brand-mark {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  color: #041014;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  font-weight: 950;
}

.brand strong,
.brand em {
  display: block;
  min-width: 0;
  line-height: 1.05;
  white-space: nowrap;
}

.brand em {
  max-width: 10rem;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  font-size: 0.73rem;
  font-style: normal;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 850;
}

.wallet-button,
.button,
.text-button,
.icon-button,
.favorite-button,
.quantity-row button,
.mode-pill,
.open-button,
.proof-card button,
.bottom-nav button {
  border: 0;
  cursor: pointer;
}

.wallet-button {
  min-height: 2.45rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 900;
  flex: 0 0 auto;
}

.wallet-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--red);
}

.wallet-button.connected .wallet-dot {
  background: var(--mint);
}

main {
  width: min(1180px, 100%);
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
  overflow: hidden;
}

.hero-band,
.arena,
.detail-card,
.trust-grid article,
.inventory-card,
.activity-list,
.pack-card,
.side-panel .panel-card,
.result-card {
  background: rgba(16, 20, 29, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-band {
  display: grid;
  gap: 1rem;
  padding: clamp(1.1rem, 5vw, 2rem);
  margin-bottom: 1rem;
  overflow: hidden;
  width: min(326px, calc(100vw - 4rem));
}

.hero-band > *,
.arena > *,
.section > * {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: min(15ch, 100%);
  margin-bottom: 0;
  font-size: 2.28rem;
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: normal;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.45rem, 4vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

p {
  color: var(--muted);
  max-width: 100%;
}

.hero-band p:not(.eyebrow) {
  max-width: 44rem;
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.arena {
  display: grid;
  gap: 1rem;
  overflow: hidden;
  padding: 1rem;
  max-width: 100%;
}

.pack-stage {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.stage-toolbar,
.section-heading,
.open-panel-head,
.price-row,
.quantity-row,
.proof-card,
.pack-card-copy div,
.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stage-toolbar {
  min-height: 3rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.stage-toolbar div {
  min-width: 0;
  text-align: center;
}

.stage-toolbar span,
.price-row span,
.quantity-row span,
.proof-card span,
.pack-card-copy div,
.inventory-card small,
.activity-list em,
.reveal-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.stage-toolbar strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  width: 2.35rem;
  height: 2.35rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--panel-3);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 1.4rem;
  font-weight: 900;
}

.pack-cover-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 20rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at center, rgba(50, 230, 161, 0.18), transparent 18rem),
    #0b0f17;
}

.pack-cover {
  position: relative;
  width: min(62vw, 17rem);
  aspect-ratio: 0.66;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  transform: rotate(-2deg);
  transition: transform 240ms ease, filter 240ms ease;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.pack-cover.opening {
  transform: rotate(0deg) scale(1.04);
  filter: saturate(1.28) brightness(1.08);
}

.pack-cover span,
.mini-cover span {
  width: max-content;
  max-width: 100%;
  padding: 0.35rem 0.58rem;
  border-radius: 999px;
  background: rgba(7, 9, 13, 0.7);
  font-size: 0.72rem;
  font-weight: 950;
}

.pack-cover strong,
.mini-cover strong {
  max-width: 9ch;
  font-size: 2.35rem;
  line-height: 0.93;
}

.pack-cover small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 850;
}

.tech {
  background:
    linear-gradient(135deg, rgba(66, 165, 255, 0.72), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 22px),
    #101827;
}

.vault {
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.76), transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 18px),
    #1c1710;
}

.creator {
  background:
    linear-gradient(135deg, rgba(50, 230, 161, 0.66), transparent),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 20px),
    #101b17;
}

.tear-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.8), transparent 68%);
}

.tear-flash.active {
  animation: flash 0.55s ease;
}

@keyframes flash {
  0% {
    opacity: 0;
    transform: translateX(-70%);
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(70%);
  }
}

.reveal-window {
  position: relative;
  overflow: hidden;
  min-height: 10rem;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, #07090d, transparent 18%, transparent 82%, #07090d),
    #0b0f17;
  max-width: 100%;
}

.reveal-track {
  display: flex;
  gap: 0.72rem;
  padding: 0.85rem;
  transform: translateX(0);
}

.reveal-card {
  width: 8.2rem;
  min-height: 7.6rem;
  display: grid;
  align-content: space-between;
  flex: 0 0 auto;
  padding: 0.78rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
  font-weight: 900;
}

.target-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--mint);
  box-shadow: 0 0 22px var(--mint);
}

.open-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
}

.open-panel h2,
.section-heading h2 {
  margin-bottom: 0;
}

.favorite-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: #090b10;
  background: var(--gold);
  font-weight: 950;
}

.price-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.price-row div {
  min-width: 0;
}

.price-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.quantity-row {
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.quantity-row button {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: var(--radius);
  background: var(--panel-3);
  font-size: 1.4rem;
  font-weight: 950;
}

.quantity-row div {
  text-align: center;
}

.quantity-row strong {
  display: block;
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.mode-pill {
  min-height: 2.45rem;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 900;
}

.mode-pill.active {
  color: #061014;
  background: var(--mint);
}

.open-button {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  border-radius: var(--radius);
  color: #061014;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  font-weight: 950;
  box-shadow: 0 18px 50px rgba(50, 230, 161, 0.2);
}

.open-button:disabled,
.bottom-nav button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.proof-card {
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.proof-card strong {
  overflow-wrap: anywhere;
}

.proof-card button,
.text-button {
  min-height: 2.35rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 0.84rem;
  font-weight: 850;
}

.section {
  padding-top: 3rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading.compact {
  margin-bottom: 0.7rem;
}

.pack-grid,
.details-grid,
.trust-grid,
.inventory-grid {
  display: grid;
  gap: 1rem;
}

.pack-card {
  overflow: hidden;
  cursor: pointer;
}

.pack-card.active {
  outline: 2px solid var(--mint);
}

.mini-cover {
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
}

.mini-cover strong {
  font-size: 1.8rem;
}

.pack-card-copy {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.pack-card-copy p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.detail-card {
  padding: 1rem;
}

.item-list,
.odds-list {
  display: grid;
  gap: 0.65rem;
}

.item-row,
.odds-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.item-row div {
  min-width: 0;
}

.item-row strong,
.item-row small {
  display: block;
}

.item-row small {
  color: var(--muted);
}

.rarity-dot {
  width: 0.85rem;
  height: 0.85rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--muted);
}

.mythic {
  background: linear-gradient(145deg, var(--gold), #ff7a5c) !important;
  color: #130d00;
}

.legendary {
  background: linear-gradient(145deg, #b58cff, var(--pink)) !important;
  color: #130716;
}

.epic {
  background: linear-gradient(145deg, #7b61ff, #d7b3ff) !important;
}

.rare {
  background: linear-gradient(145deg, #42a5ff, #77d5ff) !important;
  color: #04101a;
}

.uncommon {
  background: linear-gradient(145deg, var(--mint), #b7ffd7) !important;
  color: #041014;
}

.common {
  background: #323b4d !important;
}

.odds-row {
  justify-content: space-between;
}

.trust-grid article {
  padding: 1rem;
}

.trust-grid strong,
.trust-grid span {
  display: block;
}

.trust-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.inventory-card {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
}

.inventory-card.muted {
  opacity: 0.72;
}

.chip {
  width: max-content;
  max-width: 100%;
  padding: 0.35rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 950;
}

.activity-list {
  overflow: hidden;
}

.activity-list div {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.activity-list div:last-child {
  border-bottom: 0;
}

.activity-list span {
  color: var(--muted);
}

.button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-radius: var(--radius);
  font-weight: 950;
}

.button.primary {
  color: #061014;
  background: linear-gradient(135deg, var(--mint), var(--blue));
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px var(--line);
}

.result-modal,
.side-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.result-modal.open,
.side-panel.open {
  display: block;
}

.modal-scrim,
.panel-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.66);
}

.result-card,
.panel-card {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom));
  max-height: min(80svh, 34rem);
  overflow: auto;
  padding: 1rem;
}

.result-proof {
  display: grid;
  gap: 0.3rem;
  padding: 0.8rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.result-proof span {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-actions {
  align-items: stretch;
}

.result-actions .button {
  flex: 1;
}

.panel-close {
  float: right;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.panel-list {
  display: grid;
  gap: 0.7rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.panel-list li {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: grid;
  grid-template-columns: 1fr 1fr 4.2rem 1fr 1fr;
  gap: 0.35rem;
  align-items: center;
  min-height: var(--nav-height);
  padding: 0.55rem 0.65rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(7, 9, 13, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.bottom-nav a,
.bottom-nav button {
  min-width: 0;
  min-height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 950;
}

.bottom-nav .nav-open {
  min-height: 4.2rem;
  color: #061014;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  box-shadow: 0 12px 35px rgba(50, 230, 161, 0.23);
}

@media (min-width: 720px) {
  body {
    padding-bottom: 0;
  }

  .app-header {
    padding-inline: 1.5rem;
  }

  .desktop-nav {
    display: flex;
  }

  main {
    padding: 1.5rem;
  }

  .hero-band {
    grid-template-columns: minmax(0, 0.9fr) minmax(20rem, 0.7fr);
    align-items: end;
    width: auto;
  }

  h1 {
    font-size: clamp(3.8rem, 7vw, 5rem);
  }

  .arena {
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
    align-items: stretch;
  }

  .pack-cover-wrap {
    min-height: 27rem;
  }

  .reveal-window {
    min-height: 12.5rem;
  }

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

  .details-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }

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

  .activity-list div {
    grid-template-columns: 9rem 1fr auto;
    align-items: center;
  }

  .panel-card,
  .result-card {
    left: auto;
    top: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: min(28rem, calc(100vw - 2rem));
    max-height: none;
  }

  .bottom-nav {
    display: none;
  }
}

@media (max-width: 430px) {
  main {
    padding-inline: 0.75rem;
  }

  .brand em {
    max-width: 7.6rem;
  }

  .wallet-button {
    max-width: 6.1rem;
    overflow: hidden;
  }

  .hero-band,
  .arena {
    padding: 0.85rem;
  }

  .hero-band {
    width: calc(100vw - 1.5rem);
  }

  .hero-band p:not(.eyebrow) {
    font-size: 0.96rem;
  }

  .section-heading,
  .result-actions,
  .proof-card {
    align-items: stretch;
    flex-direction: column;
  }

  .proof-card button,
  .result-actions .button {
    width: 100%;
  }

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