/* POP! Blind Box landing: the page is the jar. Colors from the game's UI (pink/purple/yellow on pastel). */
/* Game fonts, self-hosted (OFL, see fonts/): no request to a font CDN. */
@font-face { font-family: "Baloo 2"; src: url(/fonts/baloo2.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url(/fonts/fredoka.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --pink: #ff5fa2; --pink-dark: #d9427f;
  --purple: #8a5cff; --purple-dark: #6c43d6;
  --bg: #f4eeff; --bg-2: #eadffd;
  --yellow: #ffd64f; --yellow-dark: #e0b321;
  --ink: #3a2e5a; --muted: #9a90b8; --ok: #46d39a;
  --card: #ffffff; --card-edge: #e6dcff;
  --r-common: #9aa3b2; --r-rare: #4fa8ff; --r-epic: #b56bff; --r-legendary: #ffb400;
  /* accent pair: brand by default, a theme's accent while "trying" it */
  --a1: var(--pink); --a2: var(--purple);
  --display: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Fredoka", system-ui, sans-serif;
  --gutter: clamp(16px, 6vw, 96px);
  --col: 36rem;
  --shadow: 0 10px 30px rgba(90, 60, 160, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .5s;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

h1, h2, h3, .pill, .btn, .chip, .jar-card-title, .timer, .reveal h3, .rarity, .store strong { font-family: var(--display); font-weight: 800; letter-spacing: .005em; margin: 0; }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; color: var(--ink); max-width: 16ch; }
h2 em { font-style: normal; color: var(--a1); }
.intro { max-width: var(--col); color: #5d527c; margin: 1rem 0 0; }
.eyebrow { margin: 0 0 .5rem; font: 700 .85rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--a1); }

/* ---------- HUD (the game's pill bar) ---------- */
.hud {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) var(--gutter) 10px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
/* once the page scrolls, content passes under the HUD: frosted bar so pills never sit on busy text */
.hud { transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease; }
.hud.scrolled {
  background: rgba(244, 238, 255, .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 6px 24px rgba(90, 60, 160, .12);
}
.hud-logo img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 3px 0 rgba(90, 60, 160, .25); }
.pill {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .92);
  border: 2.5px solid #fff; border-radius: 999px;
  padding: 5px 13px 5px 8px;
  font-size: 1.1rem; line-height: 1; color: var(--ink);
  box-shadow: 0 4px 0 rgba(90, 60, 160, .16);
  min-width: 4.4rem; text-decoration: none;
}
.pill img { width: 22px; height: 22px; object-fit: contain; }
.pill b { font-weight: 800; font-variant-numeric: tabular-nums; }
.pill.coins b { color: var(--yellow-dark); }
.pill.figs b { color: var(--purple-dark); }
.pill.bump { animation: bump .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 40% { transform: scale(1.12); } }
.hud-tools { margin-left: auto; display: flex; gap: 6px; }
.tool {
  background: rgba(255, 255, 255, .75); border: 2px solid #fff;
  border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .85rem;
  box-shadow: 0 3px 0 rgba(90, 60, 160, .14);
}
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* toast like the game's "IM ALBUM!" ribbon */
#toast {
  position: fixed; z-index: 60; left: 50%; bottom: max(18px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px;
  max-width: min(26rem, calc(100vw - 32px));
  background: #fff; color: var(--ink);
  border: 3px solid var(--card-edge); border-radius: 18px;
  padding: 10px 16px 10px 10px;
  box-shadow: var(--shadow);
  transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
}
#toast.show { transform: translate(-50%, 0); }
#toast img { width: 48px; height: 48px; object-fit: contain; flex: none; }
#toast b { font: 800 1.1rem/1.1 var(--display); display: block; }
#toast span { font-size: .92rem; color: var(--muted); line-height: 1.3; display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, var(--a1), color-mix(in srgb, var(--a1) 78%, #000 12%));
  color: #fff; border: 0; border-radius: 16px;
  padding: 12px 24px; font-size: 1.15rem; line-height: 1;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--a1) 60%, #000 30%), 0 8px 20px rgba(90, 60, 160, .18);
  transition: transform .12s, box-shadow .12s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--a1) 60%, #000 30%); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--card-edge); border: 2px solid var(--card-edge); }
.btn.ghost:active { box-shadow: 0 1px 0 var(--card-edge); }
.btn[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 4px 0 #1f1736; border-color: var(--ink); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 16px; padding: 9px 18px 9px 12px; min-width: 12.5rem;
  box-shadow: 0 5px 0 #1f1736, 0 10px 24px rgba(58, 46, 90, .25);
  transition: transform .12s, box-shadow .12s;
}
.store:hover { transform: translateY(-2px); }
.store:active { transform: translateY(3px); box-shadow: 0 2px 0 #1f1736; }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: .72rem; opacity: .75; line-height: 1.1; text-align: left; }
.store strong { display: block; font-size: 1.2rem; line-height: 1.1; text-align: left; }

/* ---------- hero ---------- */
.hero { position: relative; padding: calc(76px + 2vh) var(--gutter) 40px; overflow: hidden; min-height: 100svh; display: grid; align-items: center; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: url(/img/background-1080.webp) center 30% / cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 30% 40%, rgba(244, 238, 255, .55), transparent 75%),
    linear-gradient(to bottom, rgba(244, 238, 255, .35), rgba(244, 238, 255, .2) 60%, var(--bg) 100%);
}
@media (min-width: 900px) { .hero-bg { background-image: url(/img/background.webp); } }
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  grid-template-areas: "copy stage" "more stage";
  gap: 0 clamp(24px, 5vw, 72px); align-items: center; align-content: center;
  max-width: 1180px; margin: 0 auto; width: 100%;
}
.hero-copy { grid-area: copy; max-width: 36rem; align-self: end; }
.hero-more { grid-area: more; max-width: 36rem; align-self: start; }
.stage { grid-area: stage; }
.logo { width: min(440px, 80vw); filter: drop-shadow(0 12px 18px rgba(120, 70, 190, .25)); margin-left: -8px; }
h1 {
  margin-top: .6rem;
  font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05;
  color: var(--ink);
}
.lede { margin: .9rem 0 0; max-width: 32rem; color: #4f4370; font-size: 1.1rem; }
.facts { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: rgba(255, 255, 255, .7); border: 2px solid #fff; border-radius: 999px; padding: 5px 12px; font-size: .9rem; font-weight: 600; color: #5d527c; }

/* the playable jar */
.stage { position: relative; width: 100%; }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.modes-mini { display: flex; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .85); border: 2px solid #fff; border-radius: 999px;
  padding: 5px 12px 5px 7px; font-size: .95rem; line-height: 1;
  box-shadow: 0 3px 0 rgba(90, 60, 160, .14); color: var(--ink);
  transition: transform .12s;
}
.chip img { width: 22px; height: 22px; object-fit: contain; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:active { transform: translateY(2px); }
.chip.shake:active img { animation: wiggle .3s; }
@keyframes wiggle { 25% { transform: rotate(-14deg); } 75% { transform: rotate(14deg); } }

.jar-wrap { position: relative; aspect-ratio: 3 / 4; width: 100%; touch-action: none; }
#jar:focus { outline: none; }
#jar:focus-visible { box-shadow: inset 0 0 0 3px var(--purple); }
#jar {
  width: 100%; height: 100%; display: block; border-radius: 28px;
  background: radial-gradient(80% 60% at 50% 35%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .15));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
  cursor: pointer;
}
.jar-wrap.shaking { animation: jarshake .45s; }
@keyframes jarshake { 20% { transform: translate(-6px, 2px) rotate(-1.5deg); } 40% { transform: translate(6px, -2px) rotate(1.5deg); } 60% { transform: translate(-4px, 1px) rotate(-1deg); } 80% { transform: translate(4px, 0) rotate(1deg); } }
.timer {
  position: absolute; top: 12px; right: 14px;
  font-size: 2rem; line-height: 1; color: var(--ink);
  background: rgba(255, 255, 255, .9); border: 2.5px solid #fff; border-radius: 16px; padding: 6px 12px;
  box-shadow: 0 4px 0 rgba(90, 60, 160, .16); font-variant-numeric: tabular-nums;
}
.timer.low { color: var(--pink-dark); animation: bump .5s infinite; }
.jar-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(86%, 20rem); text-align: center;
  background: rgba(255, 255, 255, .96); border: 3px solid var(--card-edge); border-radius: 22px;
  padding: 18px 18px 16px; box-shadow: var(--shadow);
}
.jar-card-title { font-size: 1.5rem; line-height: 1.1; color: var(--ink); }
.jar-card-text { margin: .4rem 0 .9rem; color: #5d527c; font-size: .95rem; }
.jar-card .big { font-size: 2.4rem; color: var(--a1); margin: .2rem 0 0; }

.meter { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.meter-bar {
  position: relative; flex: 1; height: 30px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); border: 2.5px solid #fff; overflow: hidden;
  box-shadow: 0 3px 0 rgba(90, 60, 160, .12);
}
.meter-fill {
  position: absolute; inset: 0; width: 0%;
  background: linear-gradient(90deg, var(--a2), var(--a1));
  transition: width .3s cubic-bezier(.3, 1.2, .5, 1);
}
.meter-fill::after { content: ""; position: absolute; inset: 3px 3px auto 3px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .35); }
.meter-label { position: absolute; inset: 0; display: grid; place-items: center; font: 800 .95rem/1 var(--display); letter-spacing: .14em; color: var(--ink); mix-blend-mode: multiply; }
.meter-box { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(90, 60, 160, .25)); }
.meter.full .meter-box { animation: bump .6s infinite; }
.stage-hint { margin: 8px 0 0; font-size: .85rem; color: #5d527c; text-align: center; }

/* ---------- blocks ---------- */
.block { position: relative; padding: clamp(72px, 12vh, 140px) var(--gutter); max-width: 1180px; margin: 0 auto; scroll-margin-top: 70px; }

.how .steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.how li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: start; counter-increment: step; background: #fff; border: 2px solid var(--card-edge); border-radius: 22px; padding: 18px; box-shadow: 0 4px 0 var(--card-edge); }
.how li img { width: 72px; height: 72px; object-fit: contain; }
.how h3 { font-size: 1.4rem; }
.how h3::before { content: counter(step) " "; color: var(--a1); }
.how p { margin: .2rem 0 0; color: #5d527c; font-size: .98rem; }
.chain { display: flex; align-items: center; gap: 2px; margin: 2rem 0 0; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.chain img { flex: none; object-fit: contain; }
.chain img:nth-child(1) { width: 34px; } .chain img:nth-child(3) { width: 40px; } .chain img:nth-child(5) { width: 46px; }
.chain img:nth-child(7) { width: 52px; } .chain img:nth-child(9) { width: 58px; } .chain img:nth-child(11) { width: 64px; }
.chain img:nth-child(13) { width: 72px; } .chain img:nth-child(15) { width: 80px; } .chain img:nth-child(17) { width: 92px; }
.chain span { color: var(--muted); font-size: 1.4rem; padding: 0 4px; }

/* season banner */
.season { padding-top: 0; }
.season-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 46%); gap: 20px; align-items: center;
  border-radius: 28px; overflow: hidden; color: #fff;
  background: linear-gradient(120deg, #3b1c6b, #7b3fe4 60%, #c43f0a);
  box-shadow: var(--shadow);
}
.season-card.upcoming { background: linear-gradient(120deg, #0b3d91, #1f6fd1 60%, #e63946); }
.season-copy { padding: clamp(22px, 4vw, 40px); }
.season-copy .eyebrow { color: var(--yellow); }
.season-copy h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.5rem); max-width: none; }
.season-copy p { margin: .6rem 0 0; color: rgba(255, 255, 255, .85); max-width: 30rem; }
.season-copy .btn { margin-top: 1rem; }
.season-art { height: 100%; min-height: 220px; }
.season-art img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.season-logo { position: absolute; right: 18px; top: 14px; width: clamp(90px, 14vw, 150px); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); }

/* themes */
.theme-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 18px; margin-top: 2rem; }
.tcard {
  position: relative; background: #fff; border: 2px solid var(--card-edge); border-radius: 24px; overflow: hidden;
  box-shadow: 0 5px 0 var(--card-edge); display: grid; grid-template-rows: auto 1fr;
}
.tcard .showcase { aspect-ratio: 1080 / 608; background: var(--bg-2); }
.tcard .showcase img { width: 100%; height: 100%; object-fit: cover; }
.tcard .badge { position: absolute; left: 12px; top: 12px; background: var(--yellow); color: #4a3a00; font: 800 .8rem/1 var(--display); letter-spacing: .1em; padding: 6px 10px; border-radius: 999px; box-shadow: 0 3px 0 var(--yellow-dark); }
.tcard-body { padding: 14px 16px 16px; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.tcard h3 { font-size: 1.35rem; line-height: 1.1; }
.tcard .series { margin: 0; color: #5d527c; font-size: .92rem; grid-column: 1; }
.tcard .series b { color: var(--ink); }
.tcard .price { grid-column: 2; grid-row: 1; font: 800 1rem/1 var(--display); color: var(--muted); }
.tcard .btn { grid-column: 2; grid-row: 2; padding: 9px 16px; font-size: 1rem; }
.tcard .btn::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
.tcard .btn[aria-pressed="true"]::before { background: var(--ok); }

.gallery-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 3rem; }
.gallery-head h3 { font-size: 1.5rem; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cats .chip { padding: 5px 12px; font-size: .9rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); gap: 12px; margin-top: 1rem; }
@media (max-width: 599px) { .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; } .gcard { padding: 8px; border-radius: 14px; } .gcard b { font-size: .92rem; } .gcard span { font-size: .74rem; } }
.gcard {
  background: #fff; border: 2px solid var(--card-edge); border-radius: 18px; padding: 12px 12px 12px;
  display: grid; gap: 6px; text-align: left; box-shadow: 0 3px 0 var(--card-edge);
  transition: transform .15s;
  border-color: color-mix(in srgb, var(--acc, var(--card-edge)) 35%, var(--card-edge));
}
.gcard:hover { transform: translateY(-3px); }
.gcard[aria-pressed="true"] { outline: 3px solid var(--acc, var(--a1)); outline-offset: -3px; }
.gcard .strip { aspect-ratio: 3 / 1; width: 100%; object-fit: contain; }
.gcard .strip.missing { background: linear-gradient(120deg, var(--acc, var(--bg-2)), var(--bg-2)); border-radius: 12px; opacity: .5; }
.gcard b { font: 800 1.05rem/1.15 var(--display); color: var(--ink); }
.gcard span { font-size: .82rem; color: var(--muted); }
.gcard .tag { display: inline-block; font: 700 .7rem/1 var(--display); letter-spacing: .08em; padding: 4px 7px; border-radius: 999px; background: var(--bg-2); color: var(--purple-dark); justify-self: start; }
.gcard .tag.new { background: var(--yellow); color: #4a3a00; }
.gcard .tag.season { background: #ffd9b0; color: #7a3a00; }
.live-note { margin: 1.2rem 0 0; font-size: .85rem; color: var(--muted); }

/* modes */
.mode-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 16px; margin-top: 2rem; }
.mode-card { background: #fff; border: 2px solid var(--card-edge); border-radius: 24px; padding: 20px; box-shadow: 0 5px 0 var(--card-edge); display: grid; justify-items: start; gap: 6px; }
.mode-card img { width: 96px; height: 96px; object-fit: contain; }
.mode-card h3 { font-size: 1.5rem; }
.mode-card p { margin: 0 0 .6rem; color: #5d527c; font-size: .98rem; }
.gesture { display: flex; align-items: center; gap: 16px; margin-top: 1.6rem; background: rgba(255, 255, 255, .6); border: 2px solid #fff; border-radius: 20px; padding: 14px 18px; max-width: 44rem; }
.gesture img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.gesture p { margin: 0; color: #5d527c; }

/* album */
.odds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2rem; }
.odds span { font: 700 .85rem/1 var(--display); padding: 7px 12px; border-radius: 999px; color: #fff; }
.r-common { background: var(--r-common); } .r-rare { background: var(--r-rare); } .r-epic { background: var(--r-epic); } .r-legendary { background: var(--r-legendary); color: #4a3a00 !important; }
.series-list { display: grid; gap: 16px; margin-top: 1.6rem; }
.series-row { background: #fff; border: 2px solid var(--card-edge); border-radius: 24px; padding: 16px 18px 18px; box-shadow: 0 5px 0 var(--card-edge); }
.series-row header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.series-row h3 { font-size: 1.35rem; }
.series-row header span { font: 700 .95rem/1 var(--display); color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 12px; }
.slot { position: relative; aspect-ratio: 1; border-radius: 18px; background: var(--bg); display: grid; place-items: center; border: 2px solid transparent; }
.slot img { width: 82%; height: 82%; object-fit: contain; filter: brightness(0) opacity(.15); transition: filter .4s, transform .4s; }
.slot.owned img { filter: none; }
.slot.owned { background: #fff; border-color: var(--rc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 25%, transparent); }
.slot.owned.legendary { background: radial-gradient(circle, #fff3c4, #fff); animation: glow 2s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 0 3px rgba(255, 180, 0, .3), 0 0 12px rgba(255, 180, 0, .3); } to { box-shadow: 0 0 0 3px rgba(255, 180, 0, .5), 0 0 26px rgba(255, 180, 0, .6); } }
.slot.new img { animation: landed .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes landed { from { transform: scale(.3); } }
.slot .cnt { position: absolute; right: 6px; bottom: 6px; font: 800 .75rem/1 var(--display); background: var(--rc); color: #fff; padding: 3px 6px; border-radius: 999px; }
.slot .nm { position: absolute; left: 0; right: 0; bottom: -1.2rem; text-align: center; font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slots { margin-bottom: 1.2rem; }
.honest { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: start; margin-top: 2rem; background: linear-gradient(120deg, #fff4fa, #f3edff); border: 2px solid #fff; border-radius: 24px; padding: 20px; max-width: 48rem; }
.honest img { width: 72px; height: 72px; object-fit: contain; }
.honest h3 { font-size: 1.35rem; }
.honest p { margin: .4rem 0 0; color: #5d527c; }

/* features */
.features { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 14px; }
.features li { background: #fff; border: 2px solid var(--card-edge); border-radius: 20px; padding: 16px; display: grid; gap: 4px; box-shadow: 0 3px 0 var(--card-edge); }
.features .emoji { font-size: 2rem; line-height: 1; }
.features img { width: 40px; height: 40px; object-fit: contain; }
.features b { font: 800 1.15rem/1.15 var(--display); margin-top: 4px; }
.features li > span:last-child { color: #5d527c; font-size: .92rem; }

/* cta + footer */
.cta { text-align: center; display: grid; justify-items: center; }
.cta h2 { max-width: none; }
.cta .intro { margin-left: auto; margin-right: auto; }
.cta .stores { justify-content: center; }
.cta-art { width: min(100%, 48rem); border-radius: 28px; box-shadow: var(--shadow); margin-bottom: 2rem; }
.foot { text-align: center; padding: 30px var(--gutter) max(30px, env(safe-area-inset-bottom)); color: var(--muted); font-size: .9rem; }
.foot p { margin: .3rem 0 0; }
.foot-note { font-size: .78rem; }

/* ---------- reveal (blind box opening) ---------- */
.reveal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.reveal-bg { position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 45%, rgba(90, 50, 160, .85), rgba(30, 15, 60, .96)); }
.reveal-box { position: relative; width: min(92vw, 26rem); text-align: center; color: #fff; }
.rays {
  position: absolute; left: 50%; top: 42%; width: 140vmax; height: 140vmax; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 255, 255, .12) 0 7deg, transparent 7deg 18deg);
  opacity: 0; pointer-events: none; transition: opacity .4s;
  animation: spin 24s linear infinite;
}
.rays.on { opacity: 1; }
.rays.legendary { background: repeating-conic-gradient(from 0deg, rgba(255, 214, 79, .35) 0 7deg, transparent 7deg 18deg); }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.reveal-capsule { position: relative; background: none; border: 0; padding: 0; margin: 0 auto; width: min(60vw, 260px); }
.reveal-capsule img { width: 100%; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .45)); }
.reveal-capsule.shake img { animation: capshake .7s ease-in-out; }
@keyframes capshake { 10%, 50%, 90% { transform: rotate(-10deg) translateX(-6px); } 30%, 70% { transform: rotate(10deg) translateX(6px); } 100% { transform: scale(1.25); } }
.reveal-capsule.crack img { animation: crack .25s ease-in forwards; }
@keyframes crack { to { transform: scale(1.6); opacity: 0; filter: brightness(3); } }
.flash { position: absolute; inset: -40vmax; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: flash .5s ease-out; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.reveal-figure { display: grid; justify-items: center; gap: 4px; }
.figure-ring {
  width: min(64vw, 300px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 45%, #fff) 0%, color-mix(in srgb, var(--rc) 20%, transparent) 55%, transparent 72%);
  animation: landed .7s cubic-bezier(.3, 1.6, .5, 1);
}
.figure-ring img { width: 86%; height: 86%; object-fit: contain; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .4)); }
.figure-ring.legendary img { filter: drop-shadow(0 0 22px rgba(255, 214, 79, .9)) drop-shadow(0 16px 20px rgba(0, 0, 0, .4)); animation: floaty 2.4s ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translateY(-4px); } to { transform: translateY(6px); } }
.rarity { display: inline-block; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; background: var(--rc); color: #fff; padding: 6px 12px; border-radius: 999px; }
.rarity.legendary { color: #4a3a00; }
.reveal h3 { font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.05; margin-top: 4px; }
.reveal .series { margin: 0; color: rgba(255, 255, 255, .8); }
.reveal .gain { margin: 4px 0 10px; font: 800 1.1rem/1 var(--display); color: var(--yellow); }
.reveal-hint { margin: 14px 0 0; color: rgba(255, 255, 255, .75); font-weight: 600; }

/* pops (score, combo) */
.pop {
  position: fixed; z-index: 40; pointer-events: none;
  font: 800 1.5rem/1 var(--display); color: #fff;
  -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill;
  animation: pop 1s ease-out forwards;
}
.pop.big { font-size: 2.2rem; color: var(--yellow); }
@keyframes pop { from { transform: translate(-50%, 0) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -10px) scale(1.1); opacity: 1; } to { transform: translate(-50%, -70px); opacity: 0; } }

/* ---------- layout ---------- */
@media (max-width: 899px) {
  .hero { padding-top: calc(70px + 1vh); min-height: 0; }
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: "copy" "stage" "more"; gap: 18px; }
  .hero-copy, .hero-more { text-align: center; margin: 0 auto; }
  h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); margin-top: .2rem; }
  .logo { margin: 0 auto; width: min(300px, 62vw); }
  .lede { margin-left: auto; margin-right: auto; font-size: 1rem; }
  .stores, .facts { justify-content: center; }
  .stage { max-width: 440px; margin: 0 auto; }
  .hud { gap: 6px; }
  .pill { min-width: 0; padding: 4px 9px 4px 7px; font-size: 1rem; }
  .pill img { width: 18px; height: 18px; }
  .hud-logo { display: none; }
  .season-card { grid-template-columns: 1fr; }
  .season-art { min-height: 180px; order: -1; }
  .season-art img { object-position: center; }
  .season-logo { right: 12px; top: 10px; }
  .slots { gap: 6px; }
  .slot { border-radius: 14px; }
  .honest { grid-template-columns: 1fr; }
  .honest img { width: 56px; height: 56px; }
}
@media (max-width: 420px) {
  .tool { padding: 5px 8px; font-size: .76rem; }
  .hud { gap: 4px; }
  .pill { font-size: .92rem; padding: 4px 8px 4px 6px; gap: 5px; }
  .modes-mini .chip span { display: none; }
  .modes-mini .chip { padding: 5px 8px; }
  .modes-mini .chip[aria-pressed="true"] span { display: inline; }
  .chip.shake span { display: none; }
  .chip.shake { padding: 5px 8px; }
  .slot .nm { display: none; }
  .slots { margin-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pill.bump, .jar-wrap.shaking, .meter.full .meter-box, .slot.owned.legendary, .slot.new img, .rays, .figure-ring, .figure-ring.legendary img, .timer.low { animation: none; }
  .reveal-capsule.shake img { animation: none; }
  .reveal-capsule.crack img { animation-duration: .01s; }
  .pop { animation-duration: .01s; }
  .flash.on { animation: none; }
  .meter-fill { transition: none; }
}

/* theme detail (paid themes: look, don't play) */
.theme-detail {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 0;
  border-radius: 28px; background: #fff; color: var(--ink); overflow: auto;
  box-shadow: 0 30px 80px rgba(58, 46, 90, .35), 0 0 0 4px var(--acc, var(--a1, #ff5fa2));
}
.theme-detail::backdrop { background: rgba(43, 35, 80, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.theme-detail[open] { animation: td-in .28s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes td-in { from { transform: translateY(16px) scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .theme-detail[open] { animation: none; } }
.theme-detail .showcase img { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 608; object-fit: cover; }
.td-copy { padding: 18px 22px 22px; display: grid; gap: 10px; }
.td-copy h3 { margin: 0; font-size: 1.6rem; }
.td-copy .price { justify-self: start; }
.td-copy .series { margin: 0; }
.td-figs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.td-figs li { padding: 4px 11px; border-radius: 999px; font-size: .9rem; font-weight: 700; color: #fff; background: #9aa3b2; }
.td-figs li.r1 { background: #4fa8ff; } .td-figs li.r2 { background: #b56bff; }
.td-figs li.r3 { background: linear-gradient(120deg, #ffb400, #ffd64f); color: #5a3d00; }
.td-unlock { margin: 4px 0 0; color: var(--muted, #9a90b8); }
.td-stores { margin-top: 4px; }
.td-close {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer;
  box-shadow: 0 3px 0 rgba(90, 60, 160, .2);
}

/* teaser limit: three Mystery capsules on the page, then the stores */
.mystery-left { margin: 8px 0 0; text-align: center; font: 700 .9rem/1.2 var(--display); color: var(--a2, #8a5cff); letter-spacing: .02em; }
.limit-cta {
  margin-top: 12px; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border-radius: 22px; background: linear-gradient(135deg, #fff, #f4eeff); border: 3px solid #fff;
  box-shadow: 0 8px 0 rgba(90, 60, 160, .14), 0 0 0 3px var(--a2, #8a5cff);
}
.limit-cta[hidden] { display: none; }
.limit-cta > img { width: 56px; height: 56px; flex: none; }
.limit-cta h3 { margin: 0 0 4px; font-size: 1.25rem; }
.limit-cta p { margin: 0 0 10px; font-size: .95rem; }
.limit-cta .stores { margin: 0; }

/* taster over: the jar card turns into the store card */
.jar-card.done { width: min(92%, 24rem); }
.jar-card.done .stores { justify-content: center; margin-top: 1rem; }
.jar-card.done .store { min-width: 0; }
