@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  color-scheme: dark;
  --bg: #281E41;
  --panel: #35294f;
  --cream: #fff4df;
  --muted: #b9aecb;
  --pink: #ff9bc7;
  --yellow: #f7d887;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--cream);
  font-family: 'Nunito', system-ui, sans-serif;
  background-image: radial-gradient(circle at 50% 35%, rgba(116,82,150,.23), transparent 38%);
}
button, input { font: inherit; }
.topbar {
  width: min(1180px, calc(100% - 40px)); margin: 0 auto; height: 82px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { color: var(--cream); text-decoration: none; font-weight: 900; letter-spacing: .15em; font-size: 1.05rem; }
.wordmark span { color: var(--pink); }
.collection-button {
  border: 1px solid rgba(255,244,223,.35); color: var(--cream); background: rgba(255,255,255,.06);
  border-radius: 999px; padding: 10px 17px; cursor: pointer; font-weight: 800;
}
.collection-button span {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 7px;
  border-radius: 50%; background: var(--pink); color: #281E41; font-size: .75rem;
}
.stage { width: min(720px, calc(100% - 36px)); margin: 28px auto 20px; text-align: center; }
.eyebrow { color: var(--yellow); font: 500 .68rem 'DM Mono', monospace; letter-spacing: .22em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1.05; margin: 0; font-weight: 900; letter-spacing: -.04em; }
.subhead { color: var(--muted); margin: 13px 0 0; font-size: 1rem; }
.unbox-area {
  width: min(440px, 100%); aspect-ratio: 1 / 1; margin: 15px auto 8px;
  display: grid; place-items: center; position: relative;
}
.product-frame, .product-video, .figure-reveal img {
  display: block; width: 100%; height: 100%; object-fit: contain; grid-area: 1 / 1;
}
.product-video { background: transparent; }
.hidden { display: none !important; }
.figure-reveal { grid-area: 1 / 1; width: 100%; height: 100%; display: grid; place-items: center; }
.figure-reveal img { filter: brightness(0); transition: filter .45s ease; }
.figure-reveal img.lit { filter: brightness(1); }
.card-reveal { animation: cardPop .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cardPop { from { opacity: 0; transform: scale(.82) rotate(-3deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.control-panel { width: min(440px, 100%); margin: 0 auto; text-align: left; }
.slider-label, .range-ends { display: flex; justify-content: space-between; align-items: center; }
.slider-label { color: var(--cream); font: 500 .72rem 'DM Mono', monospace; letter-spacing: .12em; }
#sliderValue { color: var(--pink); }
input[type="range"] { width: 100%; margin: 17px 0 8px; accent-color: var(--pink); cursor: grab; }
input[type="range"]:active { cursor: grabbing; }
.range-ends { color: #988ba9; font: .6rem 'DM Mono', monospace; letter-spacing: .1em; }
.hint { text-align: center; color: var(--muted); font-size: .83rem; margin: 17px 0 0; }
.primary-button {
  margin: 16px auto 0; border: 0; border-radius: 999px; padding: 14px 23px;
  background: var(--pink); color: #281E41; font-weight: 900; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); transition: transform .2s, filter .2s;
}
.primary-button:hover { transform: translateY(-2px); filter: brightness(1.06); }
.primary-button span { margin-left: 12px; }
footer { color: #81758f; text-align: center; padding: 32px 12px 22px; font: .58rem 'DM Mono', monospace; letter-spacing: .17em; }
footer span { color: var(--pink); padding: 0 7px; }
.modal {
  position: fixed; inset: 0; z-index: 10; background: rgba(12,8,21,.78);
  display: grid; place-items: center; padding: 18px;
}
.modal-panel {
  width: min(650px, 100%); max-height: min(82vh, 800px); overflow: auto;
  background: #332748; border: 1px solid rgba(255,255,255,.12); border-radius: 24px;
  padding: 22px; box-shadow: 0 24px 90px rgba(0,0,0,.4);
}
.modal-header { display: flex; align-items: center; gap: 12px; }
.modal-header h2 { font-size: 1.45rem; margin: 0; flex: 1; }
.close-button, .text-button { border: 0; color: var(--cream); background: transparent; cursor: pointer; }
.close-button { font-size: 1.8rem; line-height: 1; }
.text-button { color: var(--pink); font-weight: 800; }
.modal-copy { color: var(--muted); margin: 7px 0 18px; font-size: .9rem; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); gap: 13px; }
.collection-item { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 8px; background: rgba(255,255,255,.04); color: var(--cream); cursor: pointer; }
.collection-item img { width: 100%; aspect-ratio: 1; object-fit: contain; display: block; }
.collection-item span { display: block; padding: 5px 0 2px; font-size: .75rem; font-weight: 800; }
.empty-state { text-align: center; color: var(--muted); padding: 38px 10px; }
.card-detail { text-align: center; }
.card-detail img { display: block; width: min(340px, 100%); max-height: 55vh; object-fit: contain; margin: 0 auto; }
.owned-name { color: var(--pink); font-weight: 900; }
@media (max-width: 520px) {
  .topbar { height: 68px; width: calc(100% - 28px); }
  .wordmark { font-size: .88rem; }
  .collection-button { padding: 8px 12px; font-size: .82rem; }
  .stage { margin-top: 25px; }
  .unbox-area { width: min(390px, 100%); margin-top: 13px; }
  .subhead { font-size: .9rem; }
  .modal-panel { padding: 18px; border-radius: 19px; }
}
