@font-face {
  font-family: Outfit;
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --latin: Outfit, "PingFang SC", "Microsoft YaHei", sans-serif;
  --han: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --ink: #181535;
  --sub: #56516f;
  --accent: #4938e2;
  --line: #d9d6ee;
  --app-width: 480px;
  --nav-height: 65px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #ecedfc; }
body { margin: 0; color: var(--ink); font: 600 15px/1.4 var(--han); }
button { font: inherit; color: inherit; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button:focus-visible { outline: 3px solid #3522dd; outline-offset: 4px; }
button, a { touch-action: manipulation; }
h1, h2, p, figure, blockquote { margin: 0; }
svg { width: 22px; height: 22px; display: block; flex: none; }
.english { font-family: var(--latin); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.app {
  position: relative;
  isolation: isolate;
  overflow: clip;
  width: min(100%, var(--app-width));
  min-height: 100svh;
  margin-inline: auto;
  background:
    radial-gradient(ellipse at 97% 30%, #e4e5ff 0, transparent 42%),
    radial-gradient(ellipse at 2% 48%, #e1fbfc 0, transparent 42%),
    linear-gradient(155deg,#fefeff 10%,#f6f5ff 65%,#fff 100%);
  box-shadow: 0 0 85px #4e51b329;
}
.ambient { pointer-events: none; position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.ambient i {
  position: absolute; top: var(--y); left: var(--x); width: var(--dot, 5px); aspect-ratio: 1;
  background: white; border-radius: 50%; box-shadow: 0 0 12px 3px var(--tint, #8a86ff94);
  animation: drift 6s var(--delay, 0s) ease-in-out infinite alternate;
}
.ambient i:nth-child(1) { --x: 10%; --y: 29%; --dot: 5px; --delay: -2s; }
.ambient i:nth-child(2) { --x: 94%; --y: 58%; --dot: 4px; --delay: -1s; --tint: #70efea; }
.ambient i:nth-child(3) { --x: 7%; --y: 66%; --delay: -4s; }
.ambient i:nth-child(4) { --x: 87%; --y: 24%; --dot: 7px; --delay: -5s; --tint: #61cef6; }
.ambient i:nth-child(5) { --x: 63%; --y: 18%; --dot: 4px; --delay: -3s; }
.ambient i:nth-child(6) { --x: 86%; --y: 83%; --dot: 5px; --delay: -2s; }
.ambient i:nth-child(7) { --x: 24%; --y: 75%; --dot: 4px; --delay: -1s; --tint: #55e4e7; }
.ambient i:nth-child(8) { --x: 14%; --y: 51%; --dot: 4px; --delay: -5s; }
@keyframes drift { from { transform: translate3d(0,0,0); opacity: .48; } to { transform: translate3d(12px,-23px,0); opacity: 1; } }

.app-header {
  padding: max(11px, env(safe-area-inset-top)) 22px 6px;
  min-height: 65px; display: flex; align-items: center; justify-content: space-between; gap: 9px;
}
.brand, .pouch-brand, .face-bottom { display: inline-flex; align-items: center; gap: 8px; }
.brand { font-size: 19px; font-weight: 900; letter-spacing: -.055em; }
.brand-gem {
  display: inline-block; width: 27px; aspect-ratio: 1; flex: none;
  clip-path: polygon(50% 0,62% 34%,97% 28%,79% 57%,90% 85%,58% 79%,42% 100%,35% 71%,4% 62%,30% 42%,28% 16%);
  background: conic-gradient(from 53deg at 51% 55%, #a7c6ff,#4d3aec,#3720bb,#bd7afb,#522cee,#c5fff2,#4e65fc,#a7c6ff);
}
.header-actions { display: flex; align-items: center; gap: 7px; }
.icon-button {
  display: grid; place-items: center; width: 43px; height: 43px; padding: 0;
  border-radius: 50%; background: #fff9; border: 1px solid #fff;
  color: #35286f; box-shadow: 0 2px 8px #52478812, inset 0 1px 2px #fff;
}
.icon-button[aria-pressed="true"] { color: #3020ca; background: #e8e1ff; }
.play { padding: 0 20px calc(var(--nav-height) + env(safe-area-inset-bottom) + 15px); outline: none; }
.loading { padding: 80px 8px; }
.app-nav {
  position: fixed; z-index: 10; inset: auto 0 0; margin-inline: auto; width: min(100%, var(--app-width));
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 4px 22px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
  border-top: 1px solid #fff; background: #fbfafff2; box-shadow: 0 -7px 30px #362fad13;
}
.app-nav button {
  min-width: 0; background: transparent; display: grid; align-content: center; justify-items: center; gap: 3px;
  font-size: 12px; color: #5b5675; position: relative;
}
.app-nav button[aria-current] { color: #3b28d1; font-weight: 800; }
.app-nav button[aria-current]::before {
  position: absolute; content: ""; width: 27px; height: 3px; border-radius: 0 0 4px 4px; top: -5px; background: #654eff;
}
.app-nav svg { width: 21px; height: 21px; }
.particles { position: fixed; z-index: 25; pointer-events: none; top: 0; left: 50%; transform: translateX(-50%); width: min(100%,var(--app-width)); height: 100svh; }

.action {
  min-height: 53px; border-radius: 17px; padding: 9px 18px; display: flex; align-items: center; justify-content: center;
  gap: 9px; width: 100%; position: relative; font-weight: 850; font-size: 17px;
}
.primary {
  color: #fff; background: linear-gradient(155deg,#725afd 0%,#5442e9 44%,#3526ca 100%);
  box-shadow: inset 0 1px 0 #cfbdffce, inset 0 -2px 2px #3521c6, 0 9px 19px #6143dc42;
  border: 1px solid #5c47e1;
}
.secondary { background: #fff9; color: #332578; border: 1px solid #d5cef9; box-shadow: inset 0 1px 0 #fff; }
.action:active:not(:disabled) { transform: translateY(2px); }
.primary:disabled { background: #c8c3df; border-color: #c8c3df; box-shadow: none; color: #413854; }
.plain { background: transparent; color: #4b3fc0; padding: 7px; text-decoration: underline; font-size: 12px; }

.home { --halo-fill: #80eafa9d; }
.home:not([data-exam="kaoyan"]) { --halo-fill: hsl(var(--pack-h) 100% 73% / .57); }
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 45px; }
.exam-picker {
  min-width: 0; display: flex; align-items: center; gap: 1px; padding: 3px;
  background: #fff8; border: 1px solid #fff; box-shadow: 0 3px 12px #2d236a13; border-radius: 13px;
}
.exam-picker button {
  padding: 5px clamp(8px,2.5vw,12px); min-height: 34px; border-radius: 10px;
  font-size: 13px; background: transparent; color: #524977; white-space: nowrap;
}
.exam-picker button[aria-pressed="true"] { background: hsl(var(--pack-h, 249) 51% 20%); color: white; box-shadow: 0 3px 9px #25195138; }
.pack-count { display: grid; justify-items: end; gap: 3px; color: var(--sub); white-space: nowrap; font-size: 11px; }
.quota-lights { display: flex; gap: 4px; }
.quota-lights i { width: 11px; height: 4px; border-radius: 4px; background: #d4cfe6; }
.quota-lights .lit { background: #684bf6; box-shadow: 0 0 6px #b9a9ff; }

.hero-stage { height: clamp(400px,64svh,540px); position: relative; isolation: isolate; display: grid; place-items: center; }
.halo, .orbital { position: absolute; pointer-events: none; }
.halo {
  inset: 4% -11% 1%;
  background:
    radial-gradient(ellipse at 74% 62%, hsl(var(--pack-h) 100% 77% / .73), transparent 49%),
    radial-gradient(ellipse at 26% 55%, var(--halo-fill), transparent 57%),
    radial-gradient(ellipse at 43% 35%, #fff 7%, transparent 70%);
  animation: aura-breathe 7s ease-in-out infinite alternate;
}
.orbital {
  width: 108%; height: 61%; top: 22%; left: -4%; border: 1px solid #fff;
  border-radius: 50%; transform: rotate(-23deg); box-shadow: 0 0 24px #a68bff56, inset 0 0 35px #fff8;
}
.orbital::before, .orbital::after { content: ""; position: absolute; inset: 7% -3%; border: 1px solid #fff9; border-radius: 50%; }
.orbital::after { inset: -11% 13%; transform: rotate(38deg); }
.pouch-shadow {
  position: absolute; width: 69%; height: 9%; bottom: 4.2%; left: 16%; border-radius: 50%;
  background: radial-gradient(ellipse,#3829846b, #4c37a122 48%,transparent 73%); transform: rotate(-7deg);
}
.hover-pouch { position: relative; width: 94%; max-width: 359px; height: 93.5%; perspective: 930px; z-index: 2; animation: float-pack 5.5s ease-in-out infinite; }
.pouch {
  --pack-h: 249; --rx: 0deg; --ry: 0deg; --glare-x: 0%; --glare-y: 0%; --glare-turn: 0deg;
  position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none;
}
button.pouch { touch-action: none; }
.pouch-wrap { position: absolute; inset: 0; display: block; transform: rotate(-5deg) rotateX(calc(var(--rx) + 3deg)) rotateY(calc(var(--ry) - 7deg)); }
.pouch-body, .pouch-cap { display: block; position: absolute; inset-inline: 0; overflow: hidden; }
.pouch-body {
  inset-block: 4% 0;
  border: 1px solid #ffffff91; border-radius: 6% 7% 5% 5% / 2% 3% 2% 2%;
  background:
    linear-gradient(95deg,#0008 0%,transparent 4%,#a6a0ff39 8%,transparent 16%,transparent 82%,#aba6fd34 91%,#030410 100%),
    linear-gradient(147deg,hsl(var(--pack-h) 75% 26%) 1%,#101337 25%,#090b22 46%,hsl(var(--pack-h) 58% 25%) 78%,#101027 98%);
  box-shadow: 7px 18px 23px #21136958, 21px 34px 38px #21146050, inset 0 1px 2px #fffe, inset 0 -1px 3px #000;
}
.pouch:not([data-exam="kaoyan"]) .pouch-body {
  background:
    linear-gradient(95deg,#0007,transparent 7%,#fff4 9%,transparent 17% 83%,#fff3 92%,#0007),
    linear-gradient(147deg,hsl(var(--pack-h) 88% 57%) 1%,hsl(var(--pack-h) 87% 37%) 29%,
      hsl(var(--pack-h) 80% 23%) 49%,hsl(var(--pack-h) 88% 51%) 81%,hsl(var(--pack-h) 80% 30%));
}
.pouch:not([data-exam="kaoyan"]) .pouch-cap {
  background: linear-gradient(172deg,hsl(var(--pack-h) 75% 28%),hsl(var(--pack-h) 86% 51%) 45%,
    hsl(var(--pack-h) 80% 19%) 58%,hsl(var(--pack-h) 85% 74%) 77%,hsl(var(--pack-h) 79% 22%) 84%);
}
.foil-mesh {
  position: absolute; inset: 0; opacity: .75;
  background:
    linear-gradient(111deg,transparent 4%,#c5b8ff48 6%,#000d 7%,transparent 9% 33%,#fff1 35%,transparent 36% 87%,#c6bcff28 88%, #03041b 90%,transparent 92%),
    linear-gradient(13deg,transparent 9%,#9d97ff4c 10%,#000 10.8%,transparent 11.5% 83%,#fff2 84%,#0008 86%,transparent 87%),
    repeating-linear-gradient(113deg,transparent 0 17px,#bfc9ff0a 18px 19px,transparent 20px 25px,#0002 26px 27px);
}
.pouch-window {
  position: absolute; z-index: 1; top: 12%; right: 6%; width: 61%; height: 65%;
  border: 1px solid #f5eaff4a; transform: skewY(-14deg) rotate(-9deg);
  background: repeating-linear-gradient(-35deg,#8f6dff1b 0 1px,transparent 1px 5px);
  -webkit-mask-image: linear-gradient(112deg,transparent 6%,#000 60%);
  mask-image: linear-gradient(112deg,transparent 6%,#000 60%);
}
.prism-cut {
  position: absolute; top: 11%; right: -13%; width: 73%; height: 82%; transform: rotate(26deg);
  filter: hue-rotate(calc((var(--pack-h) - 249) * 1deg)) drop-shadow(0 0 9px hsl(var(--pack-h) 100% 74% / .7));
}
.prism-cut i { position: absolute; display: block; inset: 0; }
.prism-cut i:nth-child(1) {
  clip-path: polygon(44% 0,95% 30%,76% 100%,31% 77%,0 52%);
  background: conic-gradient(from 170deg at 48% 49%,#2a1f9f,#4f73db,#80b8f6,#b4ffeb,#5b84f7,#b992ff,#fbd6f8,#7153fa,#2a1f9f);
  opacity: .89;
}
.prism-cut i:nth-child(2) {
  clip-path: polygon(44% 0,48% 49%,95% 30%,75% 100%,48% 49%,0 52%);
  background: conic-gradient(from 80deg at 48% 49%,#fff 3%,#b590ff 9%,#3a30b4 24%,#79dcff 44%,#fff 48%,#c8a1ff 54%,#3926b1 74%,#a1ffff 93%,#fff);
  transform: scale(.98);
}
.prism-cut i:nth-child(3) {
  clip-path: polygon(44% 0,49% 48%,95% 30%,50% 50%,75% 100%,48% 51%,0 52%,47% 49%);
  background: #fff;
}
.pouch-brand { position: absolute; z-index: 2; top: 12%; left: 10%; color: #f1eaff; font-size: 13px; font-weight: 850; }
.pouch-brand .brand-gem { width: 18px; background: conic-gradient(#fff,#a6a9ff,#f4e4ff,#9ffcff,#fff); }
.pouch-identity { z-index: 2; position: absolute; left: 9%; top: 29%; text-align: left; color: #fff; }
.pouch-identity[data-lines="1"] { top: 38%; }
.pouch-code { display: block; color: #e3dbff; font: 650 clamp(12px,3.6vw,18px)/1 var(--latin); letter-spacing: .17em; }
.pouch-title { display: grid; gap: 1px; margin: 5px 0 0; font-size: clamp(52px,18vw,82px); line-height: .99; letter-spacing: -.12em; }
.pouch-title b { font-weight: 950; text-shadow: 0 2px 2px #16073a, 1px 4px 10px #1a0c4bbf; }
.pouch-base {
  z-index: 2; display: flex; align-items: end; justify-content: space-between; gap: 8px;
  position: absolute; bottom: 12%; left: 10%; right: 9%; color: #f5ecff; font-size: 12px;
}
.pouch-base strong { font: 750 28px/.95 var(--latin); }
.barcode { width: 48px; height: 20px; opacity: .76; background: repeating-linear-gradient(90deg,#fff 0 1px,transparent 1px 3px,#fff 3px 5px,transparent 5px 6px,#fff 6px 7px,transparent 7px 12px); }

.pouch-shine {
  position: absolute; z-index: 3; inset: -38%; pointer-events: none;
  background:
    radial-gradient(ellipse 35% 23% at var(--light-x, 50%) var(--light-y, 50%),#fff6,transparent),
    conic-gradient(from 37deg at var(--light-x, 50%) var(--light-y, 50%),transparent 0deg,#a985ff16 46deg,#9bfff388 72deg,#fff9 78deg,#ff9dc962 92deg,transparent 137deg,transparent 205deg,#575aff68 231deg,transparent 270deg);
  transform: translate3d(var(--glare-x),var(--glare-y),0) rotate(var(--glare-turn));
  mix-blend-mode: screen; opacity: .6; animation: foil-glint 6s ease-in-out infinite alternate;
}
.pouch-cap {
  z-index: 4; inset-block: 0 auto; height: 14%;
  clip-path: polygon(0 5%,3% 0,6% 5%,9% 0,12% 5%,15% 0,18% 5%,21% 0,24% 5%,27% 0,30% 5%,33% 0,36% 5%,39% 0,42% 5%,45% 0,48% 5%,51% 0,54% 5%,57% 0,60% 5%,63% 0,66% 5%,69% 0,72% 5%,75% 0,78% 5%,81% 0,84% 5%,87% 0,90% 5%,93% 0,96% 5%,100% 1%,100% 83%,94% 90%,79% 86%,71% 95%,52% 88%,44% 94%,33% 86%,20% 93%,11% 88%,0 93%);
  background: linear-gradient(172deg,#201943 0%,hsl(var(--pack-h) 37% 35%) 45%,#0c0a1d 58%,#9779d4 77%,#151433 84%);
  border-radius: 3%;
}
.crimp { display: block; inset: 0 0 39%; position: absolute; background: repeating-linear-gradient(92deg,#080a2299 0 2px,#9997d973 2px 3px,#fff8 3px 4px,#2b2c55 4px 7px); }
.crimp-bottom { inset: auto 0 0; height: 7%; opacity: .65; border-top: 1px solid #cfbbff9c; }
.cap-seam { position: absolute; inset: 72% 5% auto; height: 2px; background: linear-gradient(90deg,transparent,#c2c8ff,#fff,#a6fcff,transparent); box-shadow: 0 0 10px 2px #b5a3ff; }
.glint { position: absolute; z-index: 3; display: block; pointer-events: none; width: var(--size, 23px); aspect-ratio: 1; }
.glint::before, .glint::after { content:""; position: absolute; inset: 0; }
.glint::before { background: radial-gradient(ellipse,#fff,#f1e9ffa1 36%,transparent 69%); inset: -40%; }
.glint::after { background: #fff; clip-path: polygon(50% 0,59% 40%,100% 50%,59% 58%,50% 100%,40% 58%,0 50%,40% 40%); }
.glint-a { left: 7%; top: 24%; --size: 29px; animation: star-pulse 4.5s -1s infinite alternate; }
.glint-b { right: 3%; bottom: 23%; --size: 31px; animation: star-pulse 5s -2s infinite alternate; }
.glint-c { right: 16%; top: 10%; --size: 14px; animation: star-pulse 4.5s -2s infinite alternate; }
.home-actions { text-align: center; margin: -1px auto 0; max-width: 390px; }
.tear-button svg { position: absolute; right: 16px; }
#tear-help { color: var(--sub); margin-top: 9px; font-size: 12px; }
.debug-reset { display: block; margin-inline: auto; }
@keyframes float-pack { 0%,100% { transform: translateY(2px); } 50% { transform: translateY(-9px); } }
@keyframes aura-breathe { from { transform: scale(.94) rotate(-3deg); opacity: .72; } to { transform: scale(1.05) rotate(3deg); opacity: 1; } }
@keyframes star-pulse { from { transform: scale(.64) rotate(-7deg); opacity: .46; } to { transform: scale(1.13) rotate(8deg); opacity: 1; } }
@keyframes foil-glint {
  from { transform: translate3d(calc(var(--glare-x) - 12%), calc(var(--glare-y) - 4%), 0) rotate(calc(var(--glare-turn) - 13deg)); opacity: .5; }
  to { transform: translate3d(calc(var(--glare-x) + 10%), calc(var(--glare-y) + 4%), 0) rotate(calc(var(--glare-turn) + 19deg)); opacity: .81; }
}

/* Card faces and displayed collections share the same rarity colors. */
.tier-N { --edge: #a6b3c3; --light: #e8eef6; --deep: #435066; --tone: 216; --card-base: linear-gradient(140deg,#fff 8%,#f2f6f9 46%,#d5dfeb 74%,#fffaf8); }
.tier-R { --edge: #45aeea; --light: #95e5ff; --deep: #104d7b; --tone: 202; --card-base: linear-gradient(137deg,#effcff,#8fddff 36%,#47baff 71%,#bdeeff); }
.tier-SR { --edge: #44dba5; --light: #81facd; --deep: #125c42; --tone: 158; --card-base: linear-gradient(144deg,#f8fffc,#a3f9d3 30%,#53e4aa 59%,#d5e0e8 81%,#aff9dd); }
.tier-SSR { --edge: #ffbf12; --light: #ffdc42; --deep: #684005; --tone: 47; --card-base: linear-gradient(143deg,#fffbd9,#ffed58 36%,#ffc20c 72%,#fff494); }
.tier-UR { --edge: #b498f3; --light: #ffc4f5; --deep: #482878; --tone: 268; --card-base: linear-gradient(146deg,#ff97d6,#ffe676 22%,#8ef2bd 42%,#74ddff 61%,#c29aff 81%,#ffc0ed); }
.run-progress {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px;
  min-height: 39px; margin: 0 0 7px; color: #352c65; font-weight: 800;
}
.exam-caption { color: #504178; font-size: 13px; font-weight: 800; white-space: nowrap; }
.run-ticks { display: flex; align-items: center; gap: 3px; min-width: 0; }
.run-ticks i { height: 4px; flex: 1; border-radius: 5px; background: #dbd5ee; }
.run-ticks .done { background: #7458ef; }
.run-ticks .now { background: #957bff; box-shadow: 0 0 8px #bba4ff; }
.progress-number { font: 740 19px/1 var(--latin); }
.progress-number i { font-style: normal; color: #777193; padding-inline: 3px; }
.fan-screen, .turn-screen, .spread-screen, .result-screen, .review-screen { max-width: 412px; margin-inline: auto; }
.fan-head { min-height: 56px; display: grid; place-items: start center; }
.fan-head h1 { font-size: clamp(32px,11vw,48px); font-weight: 950; letter-spacing: -.085em; }
.fan-arena {
  position: relative; display: grid; align-items: center; height: clamp(325px,53svh,485px);
  margin: 2px -6px 18px; isolation: isolate;
}
.arena-light {
  z-index: -1; position: absolute; inset: -7% -8%; border-radius: 50%;
  background:
    radial-gradient(ellipse at 47% 47%,#fff 4%,#e9ddff96 34%,transparent 67%),
    radial-gradient(ellipse at 78% 70%,#a9c4ffc2,transparent 51%),
    radial-gradient(ellipse at 28% 43%,#b9f7f4ba,transparent 55%);
}
.arena-light::after, .feature-halo::before {
  content: ""; position: absolute; inset: 12% 2%; border-radius: 50%; border: 1px solid #fff;
  transform: rotate(-18deg); box-shadow: 0 0 17px #fff9, inset 0 0 25px #b6a0ff7d;
}
.fan-grid, .spread-row { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px 7px; align-items: center; }
.fan-grid { row-gap: 19px; perspective: 900px; }
.fan-slot {
  min-width: 0; position: relative; display: block; padding: 0; text-align: left;
  background: none; aspect-ratio: .66; isolation: isolate;
}
.sleeve {
  position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 9px;
  border: 1px solid var(--edge); box-shadow: inset 0 0 5px #fff,0 7px 13px #27145d3d;
  background: var(--card-base);
  transform: rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  touch-action: pan-y;
}
.sleeve::after {
  content: ""; position: absolute; inset: 0; opacity: .42;
  background: repeating-linear-gradient(134deg,#fff0 0 4px,#fff2 4.5px 5px,#fff0 5.5px 7px);
  pointer-events: none;
}
.sleeve-beam {
  position: absolute; inset: -45%; pointer-events: none;
  transform: translate3d(var(--glare-x,0%),var(--glare-y,0%),0) rotate(var(--glare-turn,0deg));
  background:
    repeating-linear-gradient(113deg,#fff0 0 6px,#fff8 7px,#fff0 8px 15px),
    linear-gradient(108deg,#fff0 25%,#a2dfff75 37%,#fff 49%,#ffd1f2a6 54%,#fff0 66%);
  mix-blend-mode: screen;
  animation: sleeve-sweep 2.8s ease-in-out calc(var(--i,0) * -170ms) infinite alternate;
}
.sleeve .lens-mark { inset: 22% 18%; }
.sleeve .lens-mark i { border-color: #ffffffed; background: #ffffff32; }
.sleeve-chrome {
  position: absolute; inset: auto 0 0; display: block; height: 22%;
  background: linear-gradient(0deg,#ffffff85,transparent); pointer-events: none;
}
.rarity-label {
  display: inline-grid; place-items: center; align-self: start; position: relative; z-index: 2;
  padding: 2px 8px 3px; min-width: 27px; border-radius: 6px; color: #fff;
  background: var(--deep); font: 760 15px/1 var(--latin); letter-spacing: .04em; white-space: nowrap;
}
.sleeve .rarity-label, .mini-card .rarity-label {
  position: absolute; font-size: 9px; padding: 2px 4px; top: 6px; left: 5px; min-width: 16px; border-radius: 4px;
}
.sleeve .rarity-label { border: 1px solid #fff9; }
.tier-SR .sleeve, .tier-SSR .sleeve {
  box-shadow: inset 0 0 5px 1px #fff,0 0 0 1px var(--edge),0 0 14px var(--light),0 7px 13px #27145d3d;
}
.fan-slot.tier-SSR:not(.filed)::before, .fan-slot.tier-UR:not(.filed)::before, .fan-slot.tier-SR:not(.filed)::before {
  content: ""; position: absolute; inset: -23%; border-radius: 50%;
  background: radial-gradient(ellipse,var(--light) 27%,transparent 70%);
  animation: rare-pulse 1.65s ease-in-out infinite alternate;
  z-index: -1;
}
.fan-slot.tier-SSR:not(.filed)::before {
  inset: -24%; background: repeating-conic-gradient(from 5deg,#fff4b8 0deg 2deg,#ffd1677a 3deg 6deg,transparent 12deg 30deg);
  -webkit-mask-image: radial-gradient(ellipse,#000 8%,transparent 72%);
  mask-image: radial-gradient(ellipse,#000 8%,transparent 72%);
}
.tier-UR .sleeve {
  border: 2px solid transparent;
  background:
    var(--card-base) padding-box,
    conic-gradient(from var(--glare-turn,0deg),#ff5ac8,#ffd02a,#6effae,#43caff,#a45dff,#ff5ac8) border-box;
  box-shadow: inset 0 0 7px #fff,0 0 10px #ff72dc9e,0 0 16px #63e5fcc9,0 10px 22px #8152bf47;
}
.tier-UR .sleeve .lens-mark i { border-color: #fff; box-shadow: inset 0 0 6px #fff8,0 0 8px #fff5; }
.next-card { z-index: 1; }
.next-card::after { content: ""; position: absolute; inset: -4px; border: 2px solid #5541e1; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 2px #fff9; }
[data-screen="launching"] .next-card::after { opacity: 0; }
@keyframes rare-pulse { from { transform: scale(.75); opacity: .55; } to { transform: scale(1.14); opacity: .95; } }
@keyframes sleeve-sweep {
  from { translate: -13% -8%; opacity: .5; }
  to { translate: 13% 8%; opacity: .87; }
}
.fan-slot:active .sleeve-beam { animation: none; opacity: .86; }

.burst-pouch { pointer-events: none; position: absolute; z-index: 1; perspective: 900px; }
.burst-pouch .pouch-body { animation: fall-pack .91s 85ms both; }
.burst-pouch .pouch-cap {
  background:
    linear-gradient(178deg,#4d438d,#b7b5fc 49%,#fff 55%,#ab9dff 64%,#352c6b 88%);
  clip-path: polygon(0 1%,100% 1%,100% 74%,93% 89%,88% 79%,81% 94%,74% 84%,66% 99%,57% 81%,48% 94%,42% 81%,34% 87%,27% 75%,17% 95%,11% 82%,4% 94%,0 87%);
  animation: rip-cap 640ms cubic-bezier(.18,.52,.33,1) both;
}
.seam-flash { position: absolute; width: 145%; height: 18%; left: -24%; top: 7%; border-radius: 50%; background: radial-gradient(ellipse,#fff 8%,#a9fff6ba 33%,#a379f895 48%,transparent 70%); animation: flash-seam .75s both; }
[data-screen="launching"] .fan-arena { z-index: 2; }
[data-screen="launching"] .fan-head h1 { visibility: hidden; }
[data-screen="launching"] .action { visibility: hidden; }
.fan-slot.ejecting { animation: eject 710ms var(--wait) cubic-bezier(.18,.64,.29,1) both; }
@keyframes rip-cap {
  0% { transform: translate(0,0); opacity: 1; }
  33% { transform: translate(calc(var(--rip-dir) * 45px),-53px) rotate(calc(var(--rip-dir) * 16deg)); opacity: 1; }
  100% { transform: translate(calc(var(--rip-dir) * 217px),-150px) rotate(calc(var(--rip-dir) * 53deg)); opacity: 0; }
}
@keyframes fall-pack {
  0% { transform: translateY(0); opacity: 1; }
  54% { transform: translateY(53px) rotate(-5deg) scale(.88); opacity: .82; }
  100% { transform: translateY(188px) rotate(-17deg) scale(.55); opacity: 0; }
}
@keyframes flash-seam { 0% { transform: scale(.5); opacity: .72; } 19% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1.66); opacity: 0; } }
@keyframes eject {
  0% { transform: translate3d(var(--from-x), var(--from-y), 0) rotate(0) scale(.52); opacity: 0; }
  11% { opacity: 1; }
  43% { transform: translate3d(var(--arc-x),var(--arc-y),55px) rotate(var(--spin)) rotateY(40deg) scale(1.16); opacity: 1; }
  79% { transform: translate3d(0,8px,0) rotate(-3deg) scale(1.05); opacity: 1; }
  100% { transform: translate3d(0,0,0) rotate(0) scale(1); opacity: 1; }
}

.lens-mark { position: absolute; display: block; inset: 8% 6%; pointer-events: none; }
.lens-mark i {
  position: absolute; display: block; aspect-ratio: 1; border: 1px solid #fff;
  width: 90%; top: 1%; right: -30%; border-radius: 49%;
  transform: rotate(-27deg) scaleX(.77); background: #fff2; box-shadow: 0 0 16px #fff8, inset 0 0 13px #fff6;
}
.lens-mark i:nth-child(2) { width: 72%; top: 18%; right: -19%; transform: rotate(-40deg) scaleX(.61); background: transparent; }
.lens-mark i:nth-child(3) { width: 52%; top: 26%; right: -7%; transform: rotate(-46deg) scaleX(.53); background: transparent; }
.sleeve .lens-mark i { width: 99%; top: 11%; right: 3%; }
.sleeve .lens-mark i:nth-child(2) { width: 85%; top: 23%; right: 6%; }
.sleeve .lens-mark i:nth-child(3) { width: 57%; top: 37%; right: 20%; }
.card-shine {
  position: absolute; inset: -36%; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse closest-side at var(--light-x,50%) var(--light-y,50%),#ffffffe0,transparent 77%),
    linear-gradient(128deg,#fff0 40%,#fffc 49%,#fff0 57%),
    conic-gradient(from 35deg at var(--light-x,50%) var(--light-y,50%),transparent 3%,#c7b3ffe6 10%,#fff 16%,#c3fff6c2 22%,transparent 28%,transparent 61%,#ffd0f8 66%,#fff 69%,#d6fff3a8 76%,transparent 83%);
  opacity: .62; mix-blend-mode: screen;
  transform: translate3d(var(--glare-x,0%),var(--glare-y,0%),0) rotate(var(--glare-turn,0deg));
}
.tier-SSR .card-shine {
  background: linear-gradient(128deg,#fff0 39%,#fffad7de 46%,#fff 50%,#ffe79d81 54%,#fff0 62%),
    conic-gradient(from 40deg at var(--light-x,50%) var(--light-y,50%),#fffae980,transparent 16%,#ffeab9 26%,transparent 42% 61%,#fff 71%,transparent 78%);
}
.study-card.tier-UR .card-shine, .show-card.tier-UR .card-shine { animation: foil-glint 5s ease-in-out infinite alternate; }
[data-tiltable]:active .card-shine { animation: none; opacity: .87; }
[data-tiltable]:active .pouch-shine { animation: none; opacity: .83; }
.mini-card, .study-card, .show-card, .quiz-card {
  isolation: isolate; position: relative; overflow: hidden;
  background: var(--card-base); border: 1px solid #fff;
  box-shadow: inset 0 0 0 1px #fff9, inset 0 -3px 10px #a197cb30, 0 0 0 1px var(--edge), 0 12px 21px #47318135;
}
.tier-SSR:is(.mini-card, .study-card, .show-card) {
  box-shadow: inset 0 0 0 1px #fff9,0 0 0 1px var(--edge),0 0 20px var(--light),0 12px 21px #94601136;
}
.mini-card {
  display: block; width: 100%; min-width: 0; aspect-ratio: .66; border-radius: 9px;
  font-size: 10px; color: #251b40;
}
.mini-card b {
  display: block; position: absolute; z-index: 2; bottom: 11%; left: 6%; right: 5%;
  letter-spacing: -.025em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-card .lens-mark { inset: 7% 12%; }
.mini-card .card-shine { opacity: .53; }
.filed .mini-card { box-shadow: inset 0 0 0 1px #fff, 0 0 0 1px var(--edge), 0 8px 14px #4d3b8f24; }

.turn-stage {
  position: relative; display: grid; place-items: center; min-height: clamp(435px,65svh,590px);
  isolation: isolate; perspective: 920px;
}
.turn-aura, .charge-rays, .spread-bloom, .feature-halo { position: absolute; pointer-events: none; }
.turn-aura {
  z-index: -1; inset: 5% -11%;
  background:
    radial-gradient(ellipse at 50% 50%,#fffffff5 4%,#ffffff44 48%,transparent 74%),
    radial-gradient(ellipse at 79% 55%,var(--light),transparent 51%),
    radial-gradient(ellipse at 21% 46%,#bff8ff,transparent 47%);
}
.turn-aura i {
  position: absolute; inset: 9% 4%; border: 1px solid #fff; border-radius: 50%; transform: rotate(30deg);
  box-shadow: 0 0 20px #fff, inset 0 0 24px #fff7;
}
.card-holder { width: min(100%,337px); position: relative; perspective: 940px; }
.study-card, .show-card {
  --rx: 0deg; --ry: 0deg;
  width: 100%; border-radius: 23px; touch-action: none;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 170ms ease-out;
}
.study-card {
  min-height: 424px; min-height: clamp(405px,56.5svh,506px);
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  padding: 18px 20px 19px;
}
.study-card.with-sentence { touch-action: pan-y; }
.study-card::after, .show-card::after {
  content:""; pointer-events: none; position: absolute; z-index: 1; inset: 6px; border: 1px solid #fff9; border-radius: 18px;
}
.face-top, .face-bottom, .front-center, .back-content, .frequency { position: relative; z-index: 2; }
.face-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--deep); font-size: 13px; font-weight: 850; }
.face-bottom { color: var(--deep); font-size: 11px; font-weight: 780; }
.face-bottom .brand-gem { width: 16px; }
.front-center { margin: auto 0; text-align: center; padding-block: 12px; }
.front-center h1 { font-size: clamp(38px,14vw,66px); line-height: 1; }
.front-center .word-medium { font-size: clamp(29px,11vw,50px); }
.front-center .word-long { font-size: clamp(24px,9vw,43px); }
.front-center h1, .back-content h1, .quiz-word h2, .show-content strong { font-weight: 820; letter-spacing: -.055em; overflow-wrap: anywhere; }
.ipa { color: var(--deep); margin: 11px 0 17px; font: 500 20px/1.2 system-ui, sans-serif; }
.word-sound { margin-inline: auto; width: 48px; height: 48px; color: var(--deep); }
.card-glint {
  z-index: 2; pointer-events: none; display: block; position: absolute;
  top: 9%; right: 12%; width: 31px; aspect-ratio: 1;
  background: #fff; clip-path: polygon(50% 0,59% 42%,100% 50%,59% 57%,50% 100%,41% 57%,0 50%,41% 42%);
  animation: star-pulse 3.2s ease-in-out infinite alternate;
}
.back-content { display: grid; align-content: center; gap: 12px; margin-block: auto; }
.back-content h1 { font-size: clamp(33px,10.5vw,50px); line-height: 1; }
.back-content h1.word-medium { font-size: clamp(27px,9.5vw,44px); }
.back-content h1.word-long { font-size: clamp(23px,8.5vw,37px); }
.meanings { display: grid; gap: 4px; }
.meanings > span { font-size: 13px; color: var(--deep); font-weight: 800; }
.meanings strong { font-size: 25px; font-weight: 920; line-height: 1.18; }
.meaning-only .back-content { text-align: center; gap: 24px; }
.meaning-only .meanings strong { font-size: clamp(32px,12vw,56px); letter-spacing: -.075em; }
.evidence {
  background: #ffffffb9; border: 1px solid #fff; border-radius: 13px;
  padding: 11px 12px; color: #241e36;
}
.evidence figcaption { margin: 0 0 6px; color: var(--deep); font-size: 11px; font-weight: 850; }
.evidence blockquote { font-size: clamp(13px,4.15vw,18px); line-height: 1.28; font-weight: 520; overflow-wrap: anywhere; }
.evidence mark { color: #221556; background: #ffde76; border-radius: 2px; box-shadow: 0 0 6px #ffd552a3; font-weight: 780; }
.evidence p { border-top: 1px solid #6b548c2c; padding-top: 7px; margin-top: 7px; color: #524567; font-size: 12px; line-height: 1.4; }
.frequency { color: var(--deep); font-size: 13px; font-weight: 800; }
.frequency strong { font: 780 22px/.9 var(--latin); }
.turn-controls { min-height: 62px; display: grid; align-content: center; gap: 7px; text-align: center; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.destination { font-size: 12px; color: var(--sub); }
.flip-in { animation: flip-in 340ms cubic-bezier(.2,.68,.3,1) both; }
.revealed .flip-in { animation: big-reveal 550ms cubic-bezier(.14,.8,.29,1) both; }
.revealed .turn-aura i { animation: aura-pop 770ms ease-out both; }
@keyframes flip-in {
  from { transform: rotateY(-80deg) scale(.94); opacity: .48; }
  to { transform: rotateY(0) scale(1); opacity: 1; }
}
@keyframes big-reveal {
  from { transform: rotateY(-83deg) scale(.91); opacity: .75; }
  49% { transform: rotateY(10deg) scale(1.045); opacity: 1; }
  to { transform: rotateY(0) scale(1); opacity: 1; }
}
@keyframes aura-pop { from { transform: rotate(19deg) scale(.55); opacity: 1; } to { transform: rotate(43deg) scale(1.38); opacity: .45; } }
.app.ur-hit { animation: ur-hit 390ms ease-out both; }
@keyframes ur-hit {
  0%,100% { transform: translate(0,0); }
  16% { transform: translate(-3px,1px); }
  31% { transform: translate(3px,-2px); }
  47% { transform: translate(-2px,1px); }
  62% { transform: translate(2px,0); }
}

.charge-screen {
  position: fixed; z-index: 20; inset: 0; margin-inline: auto; width: min(100%, var(--app-width));
  height: 100svh; isolation: isolate; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 50%,hsl(var(--tone) 59% 32%) 0,#1a1036 40%,#08081d 78%);
  animation: charge-in .19s linear both;
}
.charge-rays {
  inset: -16%; background: repeating-conic-gradient(from 12deg at 50% 50%,transparent 0deg 10deg,var(--light) 10.3deg,transparent 11deg 17.5deg);
  -webkit-mask-image: radial-gradient(ellipse,#000 12%,transparent 58%);
  mask-image: radial-gradient(ellipse,#000 12%,transparent 58%);
  animation: focus-rays .6s cubic-bezier(.28,.59,.49,1) both;
}
.charge-orbit {
  position: absolute; width: 82%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid var(--light); box-shadow: 0 0 31px var(--light), inset 0 0 38px #fff5;
  animation: focus-rays .6s ease-out both;
}
.charge-sleeve { width: 49%; max-width: 213px; aspect-ratio: .655; position: relative; animation: charge-card .6s ease-out both; }
.charge-sleeve .sleeve { border-radius: 19px; border: 2px solid #fff; box-shadow: 0 0 38px var(--light), inset 0 0 10px #fff; }
.charge-sleeve .rarity-label { font-size: 17px; top: 12px; left: 12px; padding: 4px 7px; }
.charge-tier { position: absolute; bottom: 13%; font: 900 clamp(50px,18vw,88px)/1 var(--latin); color: #fff; letter-spacing: .11em; text-shadow: 0 0 28px var(--light); }
@keyframes charge-in { from { opacity: .52; } to { opacity: 1; } }
@keyframes focus-rays { from { transform: rotate(-14deg) scale(.55); opacity: .56; } to { transform: rotate(9deg) scale(1.12); opacity: .91; } }
@keyframes charge-card { from { transform: rotate(-8deg) scale(.78); } to { transform: rotate(3deg) scale(1.06); } }

.spread-screen { text-align: center; }
.spread-heading { padding-top: 4px; position: relative; z-index: 2; }
.spread-heading h1 { font-weight: 950; font-size: clamp(34px,12vw,53px); line-height: 1.08; letter-spacing: -.095em; }
.spread-heading em {
  font: 900 1.33em/.98 var(--latin); font-style: normal; letter-spacing: -.08em; padding-inline: 1px 4px;
  color: var(--deep); background: linear-gradient(151deg,var(--deep) 14%,var(--edge) 55%,var(--deep) 86%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.spread-stage { margin: 13px -2px 19px; position: relative; isolation: isolate; }
.spread-bloom {
  z-index: -1; inset: -8% -14% -4%;
  background:
    radial-gradient(ellipse at 50% 52%,#fff 2%,#fffc 18%,transparent 49%),
    radial-gradient(ellipse at 80% 52%,var(--light),transparent 60%),
    radial-gradient(ellipse at 11% 50%,#96f0fb,transparent 53%),
    radial-gradient(ellipse at 72% 76%,#f7c7ef,transparent 51%);
}
.spread-row { position: relative; z-index: 2; text-align: left; }
.spread-row .mini-card:nth-child(1) { transform: rotate(-7deg) translateY(5px); }
.spread-row .mini-card:nth-child(2) { transform: rotate(-3deg); }
.spread-row .mini-card:nth-child(3) { transform: translateY(-3px); }
.spread-row .mini-card:nth-child(4) { transform: rotate(3deg); }
.spread-row .mini-card:nth-child(5) { transform: rotate(7deg) translateY(5px); }
.spread-row .picked-mini { outline: 2px solid #8461ed; outline-offset: 2px; }
.spread-feature { display: grid; position: relative; place-items: center; min-height: clamp(231px,32svh,302px); perspective: 900px; }
.feature-halo { inset: -1% -5%; }
.feature-halo::after {
  content: ""; position: absolute; inset: -24% -8%;
  background: repeating-conic-gradient(from -6deg at 49% 48%,transparent 0deg 12deg,#fffd 12.5deg,#fff0 14deg 29deg);
  -webkit-mask-image: radial-gradient(ellipse,#000 10%,transparent 70%);
  mask-image: radial-gradient(ellipse,#000 10%,transparent 70%);
  animation: aura-breathe 6s ease-in-out infinite alternate;
}
.glint-d { left: 12%; top: 23%; --size: 29px; }
.glint-e { right: 9%; bottom: 19%; --size: 35px; }
.show-card {
  display: grid; align-content: space-between; z-index: 1; text-align: left;
  width: min(51%,197px); aspect-ratio: .72; border-radius: 17px; padding: 14px;
  transform: rotate(-8deg) rotateX(calc(var(--rx) + 7deg)) rotateY(calc(var(--ry) + 6deg));
  box-shadow: inset 0 0 0 1px #fff,0 0 0 1px var(--edge),0 0 34px var(--light),0 17px 23px #583d9a58;
}
.show-card::after { inset: 4px; border-radius: 12px; }
.show-content { display: grid; position: relative; z-index: 2; }
.show-content strong { font-size: clamp(23px,9vw,43px); line-height: .97; }
.show-content strong.word-medium, .show-content strong.word-long { font-size: clamp(17px,6.5vw,27px); }
.show-content span { font-size: 13px; color: var(--deep); margin-top: 6px; }
.celebrating .show-card { animation: trophy-in 620ms cubic-bezier(.16,.75,.27,1) both; }
.celebrating .spread-row { animation: lineup 500ms cubic-bezier(.16,.75,.27,1) both; }
@keyframes trophy-in {
  from { transform: translateY(35px) scale(.7) rotateY(48deg); opacity: .32; }
  to { transform: rotate(-8deg) rotateX(7deg) rotateY(6deg); opacity: 1; }
}
@keyframes lineup { from { transform: translateY(15px); opacity: .2; } to { transform: translateY(0); opacity: 1; } }

.result-heading { padding-top: 15px; }
.result-heading h1, .album-header h1, .review-head h1, .review-empty h1 {
  font-size: clamp(32px,9.5vw,45px); letter-spacing: -.08em; font-weight: 950; line-height: 1.2;
}
.result-display {
  position: relative; isolation: isolate; min-height: clamp(315px,49svh,447px);
  display: flex; align-items: center; justify-content: center; gap: 6%;
  background: radial-gradient(ellipse at 32% 50%,#ddc6ff,#ebfaff7a 46%,transparent 72%);
}
.result-feature { height: auto; width: 46%; transform: rotate(-11deg) translateY(-14px); border-radius: 16px; }
.result-feature .rarity-label { font-size: 14px; top: 12px; left: 10px; padding: 4px 6px; }
.result-feature b { font-size: 23px; }
.result-card-shadow {
  position: absolute; left: 11%; top: 25%; width: 42%; aspect-ratio: .7;
  transform: rotate(9deg); border-radius: 13px; border: 1px solid #fff;
  background: var(--card-base); box-shadow: 0 12px 23px #5444a03c;
}
.result-stat { display: grid; text-align: left; color: #30266e; }
.result-stat strong { font: 870 clamp(50px,17vw,83px)/.92 var(--latin); letter-spacing: -.12em; white-space: nowrap; }
.result-stat i { font: 700 .40em/1 var(--latin); font-style: normal; letter-spacing: -.05em; margin-left: 8px; color: #655591; }
.result-stat span { font-weight: 850; margin-top: 8px; }
.result-review { margin: 0 0 14px; color: var(--sub); text-align: center; }
.result-actions { display: grid; grid-template-columns: 1.6fr 1fr; gap: 8px; }

.album-screen { padding-top: 6px; }
.album-header { position: absolute; z-index: 1; }
.collection-dial {
  display: grid; place-items: center; margin: 16px auto 21px; border-radius: 50%; width: 155px; aspect-ratio: 1;
  background: conic-gradient(from -8deg,#6859f7,#81e7e6 var(--collected),#dfdaf2 var(--collected) 100%);
  box-shadow: 0 0 0 1px #fff,0 0 22px #b3a3fa76, inset 0 0 5px #fff;
  padding: 10px; transform: rotate(-8deg);
}
.collection-dial > div {
  transform: rotate(8deg); width: 100%; height: 100%; border-radius: inherit;
  background: radial-gradient(ellipse at 28% 9%,#fff,#f3efff 76%);
  box-shadow: inset 0 0 0 1px #fff; display: grid; align-content: center; text-align: center;
}
.collection-dial strong { font: 850 39px/.93 var(--latin); color: #271765; letter-spacing: -.06em; }
.collection-dial small { margin-left: 4px; font-size: 17px; color: #6b5f94; }
.collection-dial span { font-size: 11px; color: #594c80; margin-top: 6px; }
.album-list { display: grid; gap: 8px; }
.album-row { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 7px; min-width: 0; }
.album-row header { display: grid; gap: 2px; }
.album-row h2 { font: 840 18px/1 var(--latin); color: var(--deep); }
.album-row header span { font: 620 11px/1 var(--latin); color: #5a4d70; }
.album-cards { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #c3baec transparent; padding: 6px 4px 9px; min-width: 0; }
.album-card { display: block; background: transparent; flex: 0 0 48px; padding: 0; min-width: 0; height: 62px; border-radius: 7px; text-align: left; }
.album-card .mini-card { height: 100%; border-radius: 7px; box-shadow: 0 0 0 1px var(--edge),0 4px 8px #59408925; }
.album-card .tier-SSR.mini-card { box-shadow: 0 0 0 1px var(--edge),0 0 9px var(--light); }
.album-card .mini-card b { font-size: 8px; }
.album-cards .album-card:first-child .tier-UR .card-shine,
.album-cards .album-card:first-child .tier-SSR .card-shine,
.album-cards .album-card:first-child .tier-SR .card-shine { animation: foil-glint 4.5s ease-in-out infinite alternate; }
.album-card .rarity-label { top: 4px; left: 3px; }
.silhouette {
  overflow: hidden; position: relative; border: 1px dashed #b2a6cc;
  background: linear-gradient(143deg,#fff 7%,transparent),var(--card-base);
}
.silhouette .lens-mark { opacity: .6; }
.silhouette .lens-mark i { border-color: #fff; }
.inspection { width: min(95%,365px); border: 0; padding: 4px 10px 21px; background: transparent; overflow: visible; }
.inspection::backdrop { background: #181032b9; }
.inspect-tools { display: flex; justify-content: end; padding-bottom: 9px; }
.inspection .card-holder { margin-inline: auto; }

.review-screen { padding-top: 13px; }
.review-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.review-head span { color: var(--sub); font-size: 13px; }
.quiz-card { padding: 17px 20px; border-radius: 19px; margin-bottom: 18px; }
.quiz-card > :not(.lens-mark,.card-shine) { position: relative; z-index: 2; }
.prompt { color: var(--deep); font-size: 13px; }
.quiz-word { display: flex; align-items: center; gap: 9px; justify-content: space-between; }
.quiz-word h2 { min-width: 0; font-size: clamp(34px,12vw,56px); line-height: 1.18; }
.quiz-word h2.word-long { font-size: clamp(22px,8vw,40px); }
.quiz-word .icon-button { flex: none; margin: 0; }
.quiz-score { color: var(--deep); margin-top: 8px; }
.quiz-options { display: grid; gap: 9px; }
.quiz-option { color: #302559; display: flex; gap: 12px; align-items: center; background: #fffd; border: 1px solid #dad1f1; min-height: 48px; padding: 8px 14px; border-radius: 13px; text-align: left; }
.quiz-option span { font: 800 16px/1 var(--latin); color: #553cb7; }
.quiz-option.correct { background: #c8f5e9; border-color: #72b9a8; color: #155246; }
.quiz-option.wrong { background: #ffdfdf; border-color: #efa6a6; color: #752e4c; }
.quiz-feedback { margin: 10px 0 9px; color: #4a3b74; }
.review-empty { display: grid; justify-items: center; text-align: center; gap: 20px; padding-block: 54px 0; }
.empty-lens { position: relative; overflow: hidden; width: 126px; aspect-ratio: .78; border-radius: 21px; transform: rotate(-12deg); background: linear-gradient(141deg,#fcfaff,#d9cfff,#bdf9f5); border: 2px solid #fff; box-shadow: 0 0 0 1px #d3c8fb,0 15px 28px #41338337; }
.review-empty .action { width: min(100%,260px); }

@media (max-width: 350px) {
  .play { padding-inline: 15px; }
  .app-header { padding-inline: 16px; }
  .app-nav { padding-inline: 16px; }
  .exam-picker button { padding-inline: 7px; }
  .fan-grid, .spread-row { column-gap: 5px; }
  .fan-slot .rarity-label, .spread-row .rarity-label { left: 3px; }
  .spread-row .mini-card b { font-size: 9px; }
  .study-card { padding-inline: 15px; }
}
@media (max-height: 760px) {
  .app-header { min-height: 56px; }
  .hero-stage { height: clamp(340px,59svh,463px); }
  .turn-stage { min-height: clamp(389px,62svh,487px); padding-block: 8px; }
  .study-card { min-height: clamp(385px,55svh,480px); }
  .fan-head { min-height: 49px; }
  .spread-heading h1 { font-size: clamp(31px,10vw,44px); }
  .spread-feature { min-height: clamp(191px,31svh,245px); }
  .show-card { width: min(48%,173px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-tiltable] { --rx: 0deg !important; --ry: 0deg !important; }
  .particles { display: none; }
}

/* Full packs use the B4 controls and card finishes. */
#pending-badge { margin-left: 2px; font: 850 11px var(--latin); }
.album-screen > .exam-picker, .review-screen > .exam-picker { width: 100%; }
.review-screen > .exam-picker { margin-bottom: 16px; }
.album-tools { display: flex; gap: 8px; margin: 12px 0 11px; }
.album-tools input, .album-tools select, .settings-dialog textarea, .gate input {
  min-width: 0; min-height: 43px; border: 1px solid #dad1f1; border-radius: 13px;
  padding: 8px 12px; font: 600 16px var(--han); color: var(--ink); background: #fffd;
}
.album-tools input { flex: 1; }
.album-tools select { max-width: 38%; }
.album-track { position: relative; flex: none; height: 62px; }
.album-track .album-card { position: absolute; top: 0; width: 48px; }
.named-card b {
  position: absolute; inset: auto 3px 5px; overflow: hidden; text-overflow: ellipsis;
  font: 720 9px/1.1 var(--latin); color: var(--deep);
}
.album-empty { margin: 12px 0; color: var(--sub); }
.meaning-line { display: grid; gap: 3px; }
.meaning-line span { font-size: 13px; color: var(--deep); font-weight: 800; }
.meaning-only .meaning-line strong { font-size: clamp(25px,9.4vw,50px); overflow-wrap: anywhere; }
.meaning-only .multi-meaning strong { font-size: clamp(21px,7.3vw,32px); }
.meaning-only .back-content { gap: 15px; }
.back-word .ipa { font-size: 17px; margin: 8px 0 0; }
.inspection { max-height: 90svh; overflow-y: auto; }
.settings-dialog {
  width: min(92%, 390px); padding: 20px; border: 1px solid #fff; border-radius: 22px;
  box-shadow: 0 15px 60px #45348c3b; background: linear-gradient(150deg,#fff,#f1edff);
  color: var(--ink);
}
.settings-dialog::backdrop { background: #1810329e; }
.settings-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 15px; }
.settings-dialog h1 { font-size: 24px; }
.settings-dialog label { display: block; margin-bottom: 5px; }
.settings-dialog textarea { width: 100%; min-height: 95px; resize: vertical; overflow-wrap: anywhere; }
.settings-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 9px 0; }
.settings-actions .action { font-size: 14px; padding-inline: 8px; }
.settings-status { color: var(--sub); margin-top: 5px; }
.copy-progress { min-height: 38px; }
.toast {
  position: fixed; bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px);
  left: 50%; transform: translateX(-50%); z-index: 24; white-space: nowrap;
  color: #322269; padding: 8px 16px; background: #fcfaff; border: 1px solid #e2d8ff;
  border-radius: 24px; box-shadow: 0 5px 20px #52438e32;
}
.gate {
  --pack-h: 249;
  width: min(100%, 412px);
  margin-inline: auto;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}
.gate .brand { font-size: 19px; }
.gate .hero-stage { height: clamp(230px, 45svh, 372px); margin-block: 2px 16px; }
.gate .hover-pouch { width: min(72%, 252px); height: 82%; }
.gate .pouch-title { font-size: clamp(37px, 13vw, 61px); }
.gate .pouch-brand { top: 12%; }
.gate .pouch-identity { top: 32%; }
.gate .pouch-base { bottom: 10%; }
.gate-form { display: grid; gap: 11px; width: min(100%, 306px); margin-inline: auto; }
.gate label { font-size: 24px; font-weight: 850; letter-spacing: -.045em; }
.gate input { min-height: 50px; box-shadow: 0 5px 17px #4e39ab16; }
.gate input:focus-visible { outline: 2px solid #5839e9; outline-offset: 2px; }
.gate input[aria-invalid="true"] { border-color: #b43c67; }
.gate-retry input { animation: gate-shake .3s ease-out; }
.gate-status { color: #8d1c49; font-size: 13px; }
.shop-note { color: var(--sub); font-size: 12px; margin-top: 16px; line-height: 1.6; }
.gate .shop-note { text-align: center; }
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  25%, 75% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
}
