:root {
  --paper: #f6f3ec;
  --paper-grid: rgba(120, 108, 92, 0.09);
  --ink: #221c29;
  --muted: #6e657a;
  --panel-bg: #201c2b;
  --panel-surface: #16131e;
  --panel-border: #5f5570;
  --accent: #d9c1ff;
  --accent-dark: #27163e;
  --radius: 16px;
  --holo-rainbow: linear-gradient(115deg, #ff5e99 0%, #ffd166 20%, #64f4ac 40%, #52d1ff 60%, #a580ff 80%, #ff5e99 100%);
  --holo-glitter: radial-gradient(circle at 20% 30%, #fff 1px, transparent 2px), radial-gradient(circle at 75% 25%, #fff 1.2px, transparent 2.2px), radial-gradient(circle at 45% 75%, #fff 1px, transparent 2px), radial-gradient(circle at 82% 78%, #fff 1.3px, transparent 2.3px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--paper-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--paper-grid) 1px, transparent 1px),
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.65), transparent 65%);
  background-size: 26px 26px, 26px 26px, 100% 100%;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }

/* Ceremony & Particle FX Layers */
.fx-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1400;
}

.ceremony-dim {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(16, 10, 28, 0.35), rgba(10, 6, 20, 0.82));
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.45s ease;
}
.ceremony-dim.on { opacity: 1; }

.ur-rays {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 51;
  opacity: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity 0.45s ease;
}
.ur-rays.on { opacity: 1; }
.ur-rays i {
  width: 150vmax;
  height: 150vmax;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(251, 113, 133, 0.16) 0deg 8deg,
    transparent 8deg 22deg,
    rgba(251, 191, 36, 0.14) 22deg 28deg,
    transparent 28deg 45deg
  );
  animation: spinRays 24s linear infinite;
}
@keyframes spinRays { to { transform: rotate(360deg); } }

.ceremony-flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 1500;
}
.ceremony-flash.go {
  animation: screenFlash 0.55s ease-out forwards;
}
@keyframes screenFlash {
  0%   { opacity: 0.85; }
  100% { opacity: 0; }
}

.ur-splash {
  position: fixed;
  inset: 0;
  z-index: 1450;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.75);
}
.ur-splash b {
  font-size: clamp(72px, 14vw, 130px);
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #fff1f2 0%, #fb7185 38%, #fbbf24 72%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(251, 113, 133, 0.8));
}
.ur-splash span {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: #ffe4e6;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.ur-splash.go {
  animation: urSplashAnim 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes urSplashAnim {
  0%   { opacity: 0; transform: scale(0.6); }
  22%  { opacity: 1; transform: scale(1.06); }
  75%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}

/* App Shell */
.app-shell {
  position: relative;
  z-index: 60;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 20px 32px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.app-shell.stage-shake {
  animation: stageShake 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes stageShake {
  15% { transform: translate3d(-5px, -3px, 0); }
  35% { transform: translate3d(5px, 3px, 0); }
  55% { transform: translate3d(-3px, 2px, 0); }
  75% { transform: translate3d(3px, -2px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.pack-sub-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Top Bar */
.top-bar {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 12px;
  margin-bottom: 10px;
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(34, 28, 41, 0.14);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, background 0.15s ease;
}
.chip-btn:hover { transform: translateY(-1px); background: #fff; }
.chip-btn.icon-only { padding: 6px 10px; }
.dot-online {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}
.chip-edit { opacity: 0.55; font-size: 12px; }

.brand-header { text-align: center; }
.brand-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 850;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #6b4c1e 0%, #2c2137 55%, #1e1b4b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subtitle {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.level-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(34, 28, 41, 0.1);
  border-radius: 999px;
}
.level-text { font-weight: 750; font-size: 13px; }
.score-text { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.info-btn {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid rgba(107, 76, 30, 0.45);
  background: transparent; color: #7c5823;
  font-size: 11px; font-weight: 700; font-style: italic;
  display: grid; place-items: center; padding: 0;
}
.exp-bar {
  width: 110px; height: 9px; border-radius: 999px;
  background: rgba(34, 28, 41, 0.1);
  overflow: hidden;
}
.exp-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #a855f7, #f472b6, #fbbf24);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Level-up Chest button */
.chest-btn {
  position: relative;
  border: 0;
  background: rgba(251, 191, 36, 0.16);
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  padding: 0;
  transition: transform 0.18s ease, background 0.18s ease;
}
.chest-btn.has-chest {
  background: linear-gradient(135deg, #fef08a, #f59e0b);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
  animation: chestPulse 1.6s ease-in-out infinite;
}
.chest-btn:not(.has-chest) { opacity: 0.45; }
@keyframes chestPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.chest-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1.5px solid #fff;
}

/* Main Stage */
.stage-container {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 0 20px;
}

.view { display: none; width: 100%; }
.view.active { display: flex; flex-direction: column; align-items: center; }

/* Foil Card Pack + Tearable Top Cap */
.pack-stage {
  min-height: 410px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.pack-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* Tactile CSS 3D Metallized Foil Booster Pack Stage (ported from prism-holo-pack-card) */
.pack-3d-stage {
  position: relative;
  width: 340px;
  height: 430px;
  display: grid;
  place-items: center;
  perspective: 1150px;
}

.pack-aura {
  --aura-rgb: 185, 198, 224;
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--aura-rgb), 0.72) 0%, rgba(var(--aura-rgb), 0.24) 45%, transparent 72%);
  filter: blur(28px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.pack-floor-shadow {
  position: absolute;
  bottom: 10px;
  width: 240px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(20, 14, 34, 0.38) 0%, rgba(20, 14, 34, 0.1) 55%, transparent 78%);
  filter: blur(7px);
  pointer-events: none;
}

.prism-pack {
  --pack-w: 254px;
  --pack-h: 374px;
  --pack-depth: 22px;
  --crimp-h: 6.2%;
  --pack-color: #1e3a8a;
  --pack-highlight: #3b82f6;
  --pack-shadow: #0f172a;
  position: relative;
  width: var(--pack-w);
  height: var(--pack-h);
  transform-style: preserve-3d;
  will-change: transform;
  user-select: none;
}
.prism-pack.pop-open {
  animation: packBurst 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pouch-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(calc(var(--pack-depth) / 2));
  --tooth-w: calc(var(--pack-w) / 28);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0 1px, rgba(255, 255, 255, 0.34) 1px 2px, transparent 3px) 0 var(--crimp-h) / 100% 5px no-repeat,
    linear-gradient(0deg, rgba(0, 0, 0, 0.46) 0 1px, rgba(255, 255, 255, 0.26) 1px 2px, transparent 3px) 0 calc(100% - var(--crimp-h)) / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.34) 0 1.2px, rgba(255, 255, 255, 0.24) 1.2px 2.4px, rgba(0, 0, 0, 0.08) 2.4px 4.6px) 0 0 / 100% var(--crimp-h) no-repeat,
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.34) 0 1.2px, rgba(255, 255, 255, 0.22) 1.2px 2.4px, rgba(0, 0, 0, 0.08) 2.4px 4.6px) 0 100% / 100% var(--crimp-h) no-repeat,
    linear-gradient(90deg, rgba(0, 0, 0, 0.36) 0%, rgba(255, 255, 255, 0.24) 3.4%, transparent 10%, transparent 88%, rgba(255, 255, 255, 0.14) 94.5%, rgba(0, 0, 0, 0.44) 100%) 0 50% / 100% calc(100% - 2 * var(--crimp-h)) no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 3px),
    radial-gradient(
      78% 56% at calc(44% + var(--glint-x, 0) * 3%) 47%,
      color-mix(in srgb, var(--pack-highlight) 60%, #ffffff) 0%,
      color-mix(in srgb, var(--pack-color) 80%, var(--pack-highlight)) 36%,
      var(--pack-color) 68%,
      var(--pack-shadow) 100%
    );
  mask:
    conic-gradient(from 135deg at 50% 0, transparent, #000 1deg 89deg, transparent 90deg) 0 0 / var(--tooth-w) calc(var(--tooth-w) / 2) repeat-x,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M0 0H100V5.6C100 8 97.6 7.6 97.6 10V10.6L95.3 11.4L97.6 12.2V90C97.6 92.4 100 92 100 94.4V100H0V94.4C0 92 2.4 92.4 2.4 90V12.2L4.7 11.4L2.4 10.6V10C2.4 7.6 0 8 0 5.6Z'/></svg>") 0 50% / 100% calc(100% - var(--tooth-w)) no-repeat,
    conic-gradient(from -45deg at 50% 100%, transparent, #000 1deg 89deg, transparent 90deg) 0 100% / var(--tooth-w) calc(var(--tooth-w) / 2) repeat-x;
  -webkit-mask:
    conic-gradient(from 135deg at 50% 0, transparent, #000 1deg 89deg, transparent 90deg) 0 0 / var(--tooth-w) calc(var(--tooth-w) / 2) repeat-x,
    url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'><path d='M0 0H100V5.6C100 8 97.6 7.6 97.6 10V10.6L95.3 11.4L97.6 12.2V90C97.6 92.4 100 92 100 94.4V100H0V94.4C0 92 2.4 92.4 2.4 90V12.2L4.7 11.4L2.4 10.6V10C2.4 7.6 0 8 0 5.6Z'/></svg>") 0 50% / 100% calc(100% - var(--tooth-w)) no-repeat,
    conic-gradient(from -45deg at 50% 100%, transparent, #000 1deg 89deg, transparent 90deg) 0 100% / var(--tooth-w) calc(var(--tooth-w) / 2) repeat-x;
}
.pouch-face.back {
  transform: rotateY(180deg) translateZ(calc(var(--pack-depth) / 2));
}
.pouch-face::before,
.pouch-face::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.pouch-face::before {
  background: linear-gradient(108deg, transparent 16%, rgba(255,255,255,0.08) 28%, rgba(255,255,255,0.36) 36%, rgba(255,255,255,0.08) 44%, transparent 56%);
  mask: linear-gradient(transparent 6%, #000 13% 87%, transparent 94%);
  -webkit-mask: linear-gradient(transparent 6%, #000 13% 87%, transparent 94%);
  translate: calc(var(--glint-x, 0) * 6%) 0;
  opacity: 0.85;
  mix-blend-mode: soft-light;
}
.pouch-face::after {
  background: var(--foil-shine, none) 0 0 / 100% 100%;
  opacity: 0.85;
  mask: linear-gradient(90deg, rgba(0,0,0,0.45), #000 40% 60%, rgba(0,0,0,0.45)) calc(var(--shine-pos, 50) * 1%) 0 / 250% 100%;
  -webkit-mask: linear-gradient(90deg, rgba(0,0,0,0.45), #000 40% 60%, rgba(0,0,0,0.45)) calc(var(--shine-pos, 50) * 1%) 0 / 250% 100%;
}

/* Legend / God-pack black-gold iridescent coating */
.prism-pack.god-pack .pouch-face {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.45) 0 1px, rgba(255,232,160,0.5) 1px 2px, transparent 3px) 0 var(--crimp-h) / 100% 5px no-repeat,
    linear-gradient(0deg, rgba(0,0,0,0.48) 0 1px, rgba(255,232,160,0.4) 1px 2px, transparent 3px) 0 calc(100% - var(--crimp-h)) / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, rgba(0,0,0,0.38) 0 1.2px, rgba(255,226,138,0.32) 1.2px 2.4px, transparent 2.4px 4.6px) 0 0 / 100% var(--crimp-h) no-repeat,
    repeating-linear-gradient(90deg, rgba(0,0,0,0.38) 0 1.2px, rgba(255,226,138,0.32) 1.2px 2.4px, transparent 2.4px 4.6px) 0 100% / 100% var(--crimp-h) no-repeat,
    linear-gradient(128deg, rgba(255,218,106,0.44) 0%, rgba(255,108,214,0.25) 38%, rgba(92,224,255,0.28) 68%, rgba(255,214,102,0.5) 100%),
    radial-gradient(80% 58% at 45% 46%, #3d3159 0%, #1c172e 58%, #0b0914 100%);
}

.gusset-slice {
  position: absolute;
  pointer-events: none;
}

.tear-label {
  position: absolute;
  left: 8.5%; right: 8.5%;
  top: calc(var(--crimp-h) + 1.2%);
  text-align: center;
  font: 700 10px / 1 system-ui, sans-serif;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.tear-guide {
  position: absolute;
  left: 5%; right: 5%;
  top: 11.4%;
  height: 1px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.55) 0 4px, transparent 4px 7px);
}

.pouch-foil-frame {
  position: absolute;
  left: 7.5%; right: 7.5%;
  top: 19.5%;
  bottom: calc(var(--crimp-h) + 2.8%);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.26);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.35);
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 26%, rgba(0,0,0,0.22) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px;
  color: #fff;
}
.pouch-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.brand-mark {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffffff 15%, rgba(230,238,255,0.82) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.edition-tag {
  padding: 3px 8px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.34);
  background: rgba(8,12,28,0.36);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.92);
}
.pouch-halo-ring {
  position: absolute;
  left: 50%; top: 48%;
  width: 152px; height: 152px;
  translate: -50% -50%;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 0 22px rgba(255,255,255,0.12), 0 0 0 6px rgba(255,255,255,0.04);
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, transparent 68%);
  pointer-events: none;
}
/* Rigged 3D Mascot Cover + Eye Tracking + Blink + Ouch/Sweat Reactions (ported from prism-holo-pack-card) */
.mascot-slot {
  position: relative;
  z-index: 2;
  width: 162px;
  height: 162px;
  display: grid;
  place-items: center;
  transition: scale 0.35s cubic-bezier(0.22, 1.4, 0.36, 1);
  pointer-events: none;
}
.mascot-fallback {
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.42));
}
.char-body,
.char-drop-shadow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.mascot-slot .char-body {
  filter: hue-rotate(calc(var(--hue-shift, 0) * 1deg));
}
.char-drop-shadow {
  translate: 0 4%;
  filter: brightness(0) blur(7px);
  opacity: 0.42;
}
.rig-eye {
  position: absolute;
  aspect-ratio: 1 / 1.18;
  transition: opacity 0.09s, scale 0.14s ease-out;
}
.rig-pupil {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.08s linear;
}
.rig-mouth {
  position: absolute;
  transition: opacity 0.08s, scale 0.2s ease-out;
}
.rig-ouch {
  position: absolute;
  inset: 0;
  opacity: 0;
  scale: 0.84;
  transition: opacity 0.08s, scale 0.24s cubic-bezier(0.22, 1.4, 0.36, 1);
  pointer-events: none;
}
.rig-sweat {
  position: absolute;
  opacity: 0;
  scale: 0.7;
  translate: 0 -42%;
  transition: opacity 0.18s, scale 0.3s cubic-bezier(0.22, 1.4, 0.36, 1), translate 0.48s ease-out;
  pointer-events: none;
}

.prism-pack.tugging .mascot-slot {
  scale: 0.95 1.07;
}
.prism-pack.tearing .mascot-slot {
  scale: 1.06 0.92;
  animation: wince-shake 90ms steps(2) infinite;
}
.prism-pack.tearing .rig-eye,
.prism-pack.tearing .rig-mouth {
  opacity: 0;
  scale: 1 0.1;
}
.prism-pack.tearing .rig-ouch {
  opacity: 1;
  scale: 1;
}
.prism-pack.wincing .rig-sweat {
  opacity: 1;
  scale: 1;
  translate: 0 0;
}
@keyframes wince-shake {
  50% { translate: 1.4px -0.9px; }
}
.pouch-custom-pill {
  position: relative;
  z-index: 2;
  padding: 2px 9px;
  border-radius: 99px;
  background: rgba(217,193,255,0.24);
  border: 1px solid rgba(217,193,255,0.65);
  color: #f3e8ff;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.pouch-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.pouch-foot-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255,255,255,0.22);
}
.pack-foot {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.84);
}
.pack-foot-qty {
  font-size: 12px;
  font-weight: 850;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(10,12,24,0.55);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* Back face fin + print + barcode */
.back-fin {
  position: absolute;
  left: 44.5%; width: 11%; top: 0; bottom: 0; z-index: 2;
  background:
    repeating-linear-gradient(rgba(0,0,0,0.16) 0 1px, transparent 1px 4px),
    linear-gradient(90deg, rgba(0,0,0,0.36), rgba(255,255,255,0.24) 45%, rgba(0,0,0,0.28));
}
.back-print-box {
  position: absolute;
  left: 10%; right: 10%; top: 22%;
  padding: 16px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(6,10,24,0.28);
  text-align: center;
  color: #fff;
}
.back-mark { display: block; font-size: 18px; margin-bottom: 8px; }
.back-blurb { margin: 0 0 8px; font-size: 11px; line-height: 1.5; color: rgba(255,255,255,0.85); }
.back-spec { display: block; font-size: 8px; letter-spacing: 0.14em; color: rgba(255,255,255,0.58); }
.back-barcode {
  position: absolute;
  left: 28%; right: 28%; bottom: calc(var(--crimp-h) + 6%);
  height: 32px;
  padding: 5px 8px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, #101218 0 2px, transparent 2px 3px, #101218 3px 4px, transparent 4px 7px, #101218 7px 10px, transparent 10px 12px) content-box,
    rgba(255,255,255,0.94);
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
}

/* 12-segment curling tear flap */
.tear-flap {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  z-index: 4;
}
.tear-seg {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.tear-seg-front,
.tear-seg-lining {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.tear-seg-front {
  transform: translateZ(calc(var(--pack-depth) / 2 + 0.5px));
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.34) 0 1.2px, rgba(255,255,255,0.24) 1.2px 2.4px, rgba(0,0,0,0.08) 2.4px 4.6px) 0 0 / 100% var(--crimp-h) no-repeat,
    linear-gradient(135deg, var(--pack-highlight), var(--pack-color));
}
.tear-seg-lining {
  transform: translateZ(calc(var(--pack-depth) / 2 + 0.5px)) rotateY(180deg);
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 42%, #94a3b8 72%, #e2e8f0 100%);
}
.tear-seg-shade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.grab-zone {
  position: absolute;
  inset: -10px;
  z-index: 10;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  transform: translateZ(calc(var(--pack-depth) / 2 + 4px));
}
.grab-zone:active { cursor: grabbing; }

.foil-pack {
  --tear: 0;
  --shine: 0;
  --glow-rgb: 185, 198, 224;
  position: relative;
  width: 262px;
  height: 374px;
  border-radius: 14px;
  background: linear-gradient(155deg, var(--g1, #1e1b4b), var(--g2, #312e81), var(--g3, #0f172a));
  color: #fff;
  box-shadow:
    0 24px 48px rgba(15, 23, 42, 0.28),
    0 4px 12px rgba(15, 23, 42, 0.16),
    0 0 calc(var(--shine) * 44px) rgba(var(--glow-rgb), calc(var(--shine) * 0.72)),
    inset 0 1px 1px rgba(255, 255, 255, 0.35);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transform: rotate(-1.5deg);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
  overflow: visible;
}
.foil-pack:hover:not(.dragging) {
  transform: rotate(0deg) translateY(-6px) scale(1.02);
}
.foil-pack.dragging {
  cursor: grabbing;
  transform: rotate(calc(var(--tear) * 2.5deg)) scale(1.02);
}
.foil-pack.pop-open {
  animation: packBurst 0.36s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes packBurst {
  0%   { transform: scale(1.03); filter: brightness(1.1); }
  50%  { transform: scale(1.11) translateY(-10px); filter: brightness(1.55); }
  100% { transform: scale(1.18) translateY(-22px); opacity: 0; filter: brightness(2); }
}

.pack-tear-cap {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.22));
  transform-origin: right center;
  transform:
    translateX(calc(var(--tear) * 32px))
    translateY(calc(var(--tear) * -18px))
    rotate(calc(var(--tear) * -11deg));
  z-index: 4;
  pointer-events: none;
}

.pack-glow-seam {
  position: absolute;
  top: 41px;
  left: 6px;
  height: 6px;
  width: calc(var(--tear) * (100% - 12px));
  border-radius: 999px;
  background: rgb(var(--glow-rgb));
  box-shadow:
    0 0 14px rgba(var(--glow-rgb), 0.95),
    0 0 32px rgba(var(--glow-rgb), 0.8),
    0 0 56px rgba(var(--glow-rgb), 0.55);
  opacity: calc(min(1, var(--shine) * 1.4));
  z-index: 5;
  pointer-events: none;
}

.pack-crimp {
  position: absolute;
  left: 0; right: 0;
  height: 20px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.18) 0px,
    rgba(255,255,255,0.18) 3px,
    rgba(0,0,0,0.28) 3px,
    rgba(0,0,0,0.28) 6px
  );
  border-radius: 14px 14px 0 0;
}
.pack-crimp.top { top: 0; border-bottom: 1px dashed rgba(255,255,255,0.42); }
.pack-crimp.bottom { bottom: 0; border-radius: 0 0 14px 14px; border-top: 1px solid rgba(255,255,255,0.18); }

.tear-line {
  position: absolute;
  top: 22px; left: 10px; right: 10px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
}

.pack-sheen {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(125deg, transparent 22%, rgba(255,255,255,0.22) 38%, rgba(255,255,255,0.04) 50%, transparent 66%);
  pointer-events: none;
}

.pack-body {
  position: relative;
  height: 100%;
  padding: 50px 18px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.pack-top-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pack-count-pill {
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 12px;
  font-weight: 700;
}
.pack-custom-pill {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(217, 193, 255, 0.25);
  border: 1px solid rgba(217, 193, 255, 0.55);
  color: #f3e8ff;
  font-size: 11px;
  font-weight: 700;
}

.pack-emblem {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 56px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.28), rgba(0,0,0,0.25));
  box-shadow: 0 10px 28px rgba(0,0,0,0.35), inset 0 1px 2px rgba(255,255,255,0.4);
}
.pack-title-block h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.pack-title-block p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}
.pack-rarities { display: flex; gap: 5px; }
.rarity-dot {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0,0,0,0.35);
  border: 1px solid currentColor;
}
.pack-stock-badge {
  position: absolute;
  right: -12px;
  bottom: -10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #1f1b2e;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0,0,0,0.28);
  border: 2px solid #f6f3ec;
  font-variant-numeric: tabular-nums;
}
.pack-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.empty-state {
  text-align: center;
  background: rgba(255,255,255,0.78);
  border: 1px dashed rgba(34,28,41,0.2);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 390px;
}
.empty-icon { font-size: 44px; margin-bottom: 8px; }
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* Inventory Shelf */
.shelf-wrap {
  margin-top: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}
.inventory-shelf {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(34, 28, 41, 0.1);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  overflow-x: auto;
  max-width: 100%;
}
.shelf-item {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 86px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: linear-gradient(155deg, var(--g1), var(--g2));
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.shelf-item:hover { transform: translateY(-3px); }
.shelf-item.active {
  border-color: #fbbf24;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.28);
  transform: translateY(-3px);
}
.shelf-icon { font-size: 24px; line-height: 1; }
.shelf-label { font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56px; }
.shelf-qty {
  position: absolute; top: -6px; right: -6px;
  background: #201c2b; color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 6px; border-radius: 999px;
  border: 1.5px solid #fff;
}
.shelf-size { font-size: 9px; opacity: 0.8; }

/* Result Stage: Fan Spread + Card Back Hover-Tease + 3D Flip */
.result-stage {
  width: 100%;
  max-width: 1080px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.result-meta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.result-progress {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(34,28,41,0.12);
}
.result-gain {
  font-size: 12px;
  font-weight: 700;
  color: #6d28d9;
  background: rgba(255,255,255,0.9);
  padding: 4px 12px;
  border-radius: 999px;
}

.fan-stage {
  width: 100%;
  min-height: 360px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 8px 12px;
  touch-action: none;
}

.flip-slot {
  --fan-rot: 0deg;
  --fan-y: 0px;
  --aura: rgba(156, 163, 175, 0.35);
  position: relative;
  width: 196px;
  height: 282px;
  perspective: 1100px;
  cursor: pointer;
  user-select: none;
  transform: translateY(var(--fan-y)) rotate(var(--fan-rot));
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), z-index 0s;
  animation: fanDeal 0.48s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.fan-stage.compact .flip-slot {
  width: 168px;
  height: 244px;
}
.fan-stage.single .flip-slot {
  width: 266px;
  height: 376px;
}

@keyframes fanDeal {
  from { opacity: 0; transform: translateY(60px) scale(0.75) rotate(0deg); }
  to   { opacity: 1; transform: translateY(var(--fan-y)) rotate(var(--fan-rot)); }
}

.flip-slot:hover {
  z-index: 20;
  transform: translateY(calc(var(--fan-y) - 18px)) scale(1.06) rotate(calc(var(--fan-rot) * 0.25));
}

/* High-rarity suspense tremor when hovering an unrevealed SR / SSR / UR card back */
.flip-slot.unrevealed.tease-high:hover .flip-inner {
  animation: suspenseTremor 0.14s linear infinite;
}
@keyframes suspenseTremor {
  0%   { transform: rotateY(180deg) rotateZ(-1.3deg) translateX(-1px); }
  25%  { transform: rotateY(180deg) rotateZ(1.3deg) translateX(1px); }
  50%  { transform: rotateY(180deg) rotateZ(-1deg) translateY(-1px); }
  75%  { transform: rotateY(180deg) rotateZ(1deg) translateY(1px); }
  100% { transform: rotateY(180deg) rotateZ(-1.3deg) translateX(-1px); }
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform 0.56s cubic-bezier(0.2, 0.9, 0.25, 1.08);
}
.flip-slot.revealed .flip-inner {
  transform: rotateY(0deg);
}
.flip-slot.revealed.high-flip .flip-inner {
  transition: transform 0.68s cubic-bezier(0.18, 0.95, 0.22, 1.12);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
}
.flip-front .gacha-card {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 13px;
}
.fan-stage:not(.single) .flip-front .card-art {
  height: 98px;
  font-size: 46px;
  margin: 8px 0;
}
.fan-stage:not(.single) .flip-front .card-name { font-size: 15px; }
.fan-stage:not(.single) .flip-front .card-title { font-size: 11px; }
.fan-stage:not(.single) .flip-front .card-quote { display: none; }

/* Ornate guilloché astrolabe card back with rarity breathing aura */
.flip-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.12), transparent 58%),
    linear-gradient(155deg, #241d38 0%, #161126 55%, #0e0b19 100%);
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.flip-slot.unrevealed.tease-aura .flip-back {
  border-color: var(--aura);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36), 0 0 24px var(--aura), inset 0 0 18px var(--aura);
}
.flip-slot.unrevealed:hover .flip-back {
  border-color: var(--aura);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 36px var(--aura), inset 0 0 22px var(--aura);
}
.card-back-frame {
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
}
.card-back-ring {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  font-size: 28px;
  color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 22px var(--aura);
}
.card-back-hint {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.gacha-card {
  --rx: 0deg;
  --ry: 0deg;
  --px: 50;
  --py: 50;
  --hyp: 0;
  --swipe-x: 0px;
  --swipe-y: 0px;
  --swipe-angle: 0deg;
  position: relative;
  width: 274px;
  min-height: 382px;
  border-radius: 18px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(160deg, var(--c1, #1e293b), var(--c2, #0f172a));
  border: 2px solid var(--rc, #9ca3af);
  box-shadow: 0 18px 42px rgba(0,0,0,0.32), 0 0 32px var(--rg, transparent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  transform-style: preserve-3d;
  transform:
    translate3d(var(--swipe-x), var(--swipe-y), 0)
    rotate(var(--swipe-angle))
    rotateX(var(--rx))
    rotateY(var(--ry));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  user-select: none;
}
.gacha-card.tilting,
.gacha-card.swiping {
  transition: none;
}
.gacha-card.card-enter {
  animation: cardPop 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.gacha-card.fly-left {
  transition: transform 0.26s ease-in, opacity 0.26s ease-in;
  transform: translate3d(-420px, 24px, 0) rotate(-18deg);
  opacity: 0;
}
.gacha-card.fly-right {
  transition: transform 0.26s ease-in, opacity 0.26s ease-in;
  transform: translate3d(420px, 24px, 0) rotate(18deg);
  opacity: 0;
}

/* Selective-mask holographic layers (ported from prism-holo-pack-card) */
.foil-holo,
.foil-glare,
.foil-clearcoat {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.foil-holo {
  z-index: 2;
  background: var(--holo-rainbow) calc(var(--px) * 1%) calc(var(--py) * 1%) / 380% 380%;
  mix-blend-mode: color-dodge;
  opacity: calc(0.22 + var(--hyp) * 0.56);
  filter: brightness(0.76) contrast(1.45) saturate(1.4);
}
.foil-holo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  mask: var(--holo-glitter) 0 0 / 120px 120px;
  -webkit-mask: var(--holo-glitter) 0 0 / 120px 120px;
  filter: brightness(1.85);
}
.foil-glare {
  z-index: 2;
  background: radial-gradient(
    farthest-corner circle at calc(var(--px) * 1%) calc(var(--py) * 1%),
    rgba(255, 255, 255, 0.72),
    rgba(255, 255, 255, 0.1) 38%,
    rgba(0, 0, 0, 0.24)
  );
  mix-blend-mode: overlay;
  opacity: calc(0.18 + var(--hyp) * 0.52);
}
.foil-clearcoat {
  z-index: 4;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.34),
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.68),
    inset 0 -2px 4px rgba(0, 0, 0, 0.22);
  background:
    radial-gradient(
      42% 24% at calc(var(--px) * 1%) calc(var(--py) * 1%),
      rgba(255, 255, 255, calc(0.06 + var(--hyp) * 0.34)),
      transparent
    ),
    linear-gradient(112deg, transparent 43%, rgba(255,255,255,0.28) 44%, rgba(255,255,255,0.08) 52%, transparent 53%) calc((100 - var(--px)) * 1%) 0 / 220% 100%;
}

/* N: subtle glitter inside art window only */
.gacha-card.rarity-N .foil-holo {
  opacity: calc(0.10 + var(--hyp) * 0.22);
  mask: var(--holo-glitter) 0 0 / 110px 110px;
  -webkit-mask: var(--holo-glitter) 0 0 / 110px 110px;
}
/* SSR: golden radial sunburst + rainbow holo */
.gacha-card.rarity-SSR .foil-holo {
  mix-blend-mode: overlay;
  opacity: calc(0.52 + var(--hyp) * 0.44);
  background:
    repeating-conic-gradient(
      from calc(var(--px) * 1deg) at 50% 36%,
      transparent 0 3deg,
      rgba(255, 255, 255, 0.5) 4deg 5deg,
      transparent 6deg 10deg
    ),
    var(--holo-rainbow) calc(var(--px) * 1%) calc(var(--py) * 1%) / 380% 380%;
}
/* UR: refined dark-opal iridescent sheen + subtle counter-rotating prism rays */
.gacha-card.rarity-UR {
  box-shadow: 0 20px 48px rgba(0,0,0,0.42), 0 0 22px rgba(251, 113, 133, 0.32), inset 0 0 0 1.5px rgba(255, 214, 122, 0.62);
}
.gacha-card.rarity-UR .foil-holo {
  mix-blend-mode: screen;
  opacity: calc(0.18 + var(--hyp) * 0.28);
  filter: brightness(0.95) contrast(1.15) saturate(1.22);
  background:
    repeating-conic-gradient(
      from calc(var(--px) * 1.4deg) at 50% 34%,
      rgba(255, 135, 210, 0.20) 0 3deg,
      transparent 3deg 15deg,
      rgba(120, 225, 255, 0.18) 15deg 18deg,
      transparent 18deg 30deg
    ),
    repeating-conic-gradient(
      from calc((100 - var(--py)) * 1.4deg) at 50% 56%,
      rgba(255, 220, 130, 0.16) 0 2.5deg,
      transparent 2.5deg 18deg
    ),
    var(--holo-rainbow) calc(var(--px) * 1%) calc(var(--py) * 1%) / 360% 360%;
}
.gacha-card.locked .foil-holo,
.gacha-card.locked .foil-glare,
.gacha-card.locked .foil-clearcoat {
  display: none;
}

/* Elevated matte lower nameplate above holo layer so text stays razor-sharp */
.card-top,
.card-art {
  position: relative;
  z-index: 1;
}
.card-plaque {
  position: relative;
  z-index: 3;
  background: rgba(14, 11, 24, 0.74);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
}
.gacha-card.rarity-UR .card-plaque {
  border-color: rgba(255, 214, 122, 0.48);
}
.gacha-card.locked .card-plaque {
  background: transparent;
  border-color: transparent;
  padding: 4px 0 0;
  backdrop-filter: none;
}

@keyframes cardPop {
  from { opacity: 0; transform: translateY(22px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes holoSweep {
  0%   { transform: translateX(-60%) rotate(10deg); }
  100% { transform: translateX(60%) rotate(10deg); }
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.rarity-pill {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  color: var(--rc);
  background: rgba(0,0,0,0.45);
  border: 1px solid var(--rc);
}
.new-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  background: #f43f5e;
  color: #fff;
}
.count-pill {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255,255,255,0.16);
}
.card-art {
  position: relative;
  height: 186px;
  margin: 10px 0;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(28, 22, 42, 0.72), rgba(8, 7, 14, 0.96));
  display: grid;
  place-items: center;
  font-size: 64px;
  overflow: hidden;
  isolation: isolate;
}
.card-art img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Crisp full-bleed 4:3 center-safe framing: fills both 4:3 small cards and 1:1 zoomed inspect views edge-to-edge */
.card-rig-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.card-rig-wrap .art-fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.card-inspect-modal .gacha-card {
  width: 300px;
  min-height: 455px;
}
.card-inspect-modal .card-art {
  height: 252px;
}
.card-rig-eye {
  position: absolute;
  aspect-ratio: 1 / 1.18;
  transition: opacity 0.1s, transform 0.15s ease;
  pointer-events: none;
}
.card-rig-mouth {
  position: absolute;
  transition: opacity 0.1s, transform 0.15s ease;
  pointer-events: none;
}
.card-rig-joy {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.84);
  transition: opacity 0.12s ease, transform 0.28s cubic-bezier(0.22, 1.4, 0.36, 1);
  pointer-events: none;
}
.gacha-card:not(.locked):hover .card-rig-eye,
.gacha-card:not(.locked):hover .card-rig-mouth {
  opacity: 0;
  transform: scale(0.7);
}
.gacha-card:not(.locked):hover .card-rig-joy {
  opacity: 1;
  transform: scale(1);
}

/* Dynamic & Interactive Art Window Layers for SSR & UR */
.art-subject {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  transition: transform 0.12s ease-out, filter 0.25s ease;
  will-change: transform;
}
.gacha-card.rarity-SSR:not(.locked) .art-subject {
  animation: ssrFloat 3.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 8px rgba(251, 191, 36, 0.34));
}
.gacha-card.rarity-UR:not(.locked) .art-subject {
  animation: urFloat 2.8s ease-in-out infinite;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 9px rgba(251, 113, 133, 0.32));
}
.gacha-card.tilting.rarity-SSR:not(.locked) .art-subject,
.gacha-card.tilting.rarity-UR:not(.locked) .art-subject {
  animation: none;
  transform:
    translate3d(calc((var(--px, 50) - 50) * -0.22px), calc((var(--py, 50) - 50) * -0.22px), 26px)
    scale(1.1);
}
.gacha-card.pulse-pop .art-subject {
  animation: subjectPop 0.48s cubic-bezier(0.22, 1.5, 0.36, 1) !important;
}

@keyframes ssrFloat {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-6px) scale(1.04); }
}
@keyframes urFloat {
  0%, 100% { transform: translateY(0px) rotate(-2deg) scale(1.02); }
  50% { transform: translateY(-8px) rotate(2deg) scale(1.08); }
}
@keyframes subjectPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.26) rotate(-6deg); }
  70%  { transform: scale(0.95) rotate(3deg); }
  100% { transform: scale(1); }
}

.art-orbit {
  position: absolute;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 224, 145, 0.34);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.14);
  z-index: 1;
  pointer-events: none;
  animation: orbitSpin 16s linear infinite;
}
.art-orbit.outer {
  width: 138px;
  height: 138px;
  border-style: solid;
  border-color: rgba(251, 135, 165, 0.24) transparent rgba(120, 215, 255, 0.24) transparent;
  box-shadow: none;
  animation: orbitSpinRev 11s linear infinite;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitSpinRev { to { transform: rotate(-360deg); } }

/* Rising ambient stardust inside SSR / UR art window */
.art-sparks {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 18% 82%, rgba(255, 245, 200, 0.9), transparent),
    radial-gradient(2.5px 2.5px at 78% 72%, rgba(255, 210, 110, 0.85), transparent),
    radial-gradient(1.8px 1.8px at 42% 90%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(2px 2px at 64% 85%, rgba(251, 113, 133, 0.85), transparent),
    radial-gradient(2px 2px at 28% 65%, rgba(92, 230, 255, 0.8), transparent);
  background-size: 100% 100%;
  animation: sparkRise 3.2s linear infinite;
  opacity: 0.85;
}
@keyframes sparkRise {
  0%   { transform: translateY(18px); opacity: 0; }
  25%  { opacity: 0.95; }
  80%  { opacity: 0.85; }
  100% { transform: translateY(-38px); opacity: 0; }
}

/* Interactive cursor energy ripple on SSR / UR inspect */
.art-ripple {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 235, 160, 0.9);
  transform: translate(-50%, -50%) scale(0.4);
  pointer-events: none;
  z-index: 6;
  animation: artRippleOut 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes artRippleOut {
  0%   { opacity: 0.95; transform: translate(-50%, -50%) scale(0.3); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(5.2); }
}

/* Animated flowing border aura for SSR & UR */
.gacha-card.rarity-SSR:not(.locked) {
  animation: ssrBorderPulse 3s ease-in-out infinite;
}
.gacha-card.rarity-UR:not(.locked) {
  animation: urBorderPulse 2.4s ease-in-out infinite;
}
@keyframes ssrBorderPulse {
  0%, 100% { box-shadow: 0 18px 42px rgba(0,0,0,0.34), 0 0 24px rgba(251, 191, 36, 0.42); }
  50%      { box-shadow: 0 18px 46px rgba(0,0,0,0.38), 0 0 42px rgba(251, 191, 36, 0.78); }
}
@keyframes urBorderPulse {
  0%, 100% { box-shadow: 0 20px 48px rgba(0,0,0,0.42), 0 0 18px rgba(251, 113, 133, 0.34), inset 0 0 0 1.5px rgba(255, 214, 122, 0.58); }
  50%      { box-shadow: 0 20px 52px rgba(0,0,0,0.46), 0 0 30px rgba(192, 132, 252, 0.48), inset 0 0 0 1.5px rgba(255, 232, 165, 0.78); }
}

.fan-stage:not(.single) .art-orbit { width: 76px; height: 76px; }
.fan-stage:not(.single) .art-orbit.outer { width: 96px; height: 96px; }
.card-name { margin: 0; font-size: 20px; font-weight: 850; }
.card-title { margin: 3px 0 6px; font-size: 13px; color: rgba(255,255,255,0.8); }
.card-era { font-size: 11px; color: rgba(255,255,255,0.58); }
.card-quote {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.88);
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 8px;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* Buttons */
.btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: #271b3d; color: #fff; }
.btn.secondary { background: rgba(255, 255, 255, 0.85); color: var(--ink); border: 1px solid rgba(34,28,41,0.12); }
.btn.danger { background: #fee2e2; color: #b91c1c; }
.btn.full { width: 100%; }

/* Collection / Trophies / Market / Leaderboard */
.section-head {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.section-head h2 { margin: 0; font-size: 22px; }
.muted { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.collection-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.binder-tabs, .filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  border: 1px solid rgba(34, 28, 41, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.pill.active {
  background: #271b3d;
  color: #fff;
  border-color: #271b3d;
}
.fav-filter-pill {
  border-color: rgba(225, 29, 72, 0.28);
  color: #be123c;
}
.fav-filter-pill.active {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
}

.collection-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
}
.collection-grid .gacha-card {
  width: 100%;
  min-height: 240px;
  padding: 13px;
}
.collection-grid .card-art { height: 96px; font-size: 44px; margin: 8px 0; }
.collection-grid .card-name { font-size: 15px; }
.collection-grid .card-quote { display: none; }

.gacha-card.locked {
  background: rgba(34, 28, 41, 0.08);
  border: 1.5px dashed rgba(34, 28, 41, 0.22);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
}
.gacha-card.locked .card-art { background: rgba(34, 28, 41, 0.06); filter: grayscale(1); opacity: 0.45; }

.pager {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Trophies */
.trophy-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.trophy-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(34,28,41,0.1);
}
.trophy-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.trophy-card.unlocked {
  border-color: #eab308;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
  box-shadow: 0 8px 20px rgba(234, 179, 8, 0.14);
}
.trophy-icon {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 24px;
  background: rgba(34,28,41,0.06);
  flex-shrink: 0;
}
.trophy-card:not(.unlocked) .trophy-icon { filter: grayscale(1); opacity: 0.48; }
.trophy-info { min-width: 0; flex: 1; }
.trophy-info h4 { margin: 0 0 3px; font-size: 15px; }
.trophy-info p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.trophy-tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px; font-weight: 750;
  padding: 3px 9px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.trophy-card.unlocked .trophy-tag { background: #fef08a; color: #854d0e; }
.trophy-card:not(.unlocked) .trophy-tag { background: rgba(34,28,41,0.08); color: var(--muted); }
.trophy-prog {
  height: 5px;
  border-radius: 999px;
  background: rgba(34,28,41,0.08);
  overflow: hidden;
}
.trophy-prog i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5cf6, #eab308);
  transition: width 0.3s ease;
}
.combo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.combo-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34,28,41,0.06);
  color: var(--muted);
}
.combo-chip.owned {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
  font-weight: 650;
}

/* Market */
.score-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: #271b3d;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.market-free-card {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffbeb, #ffffff);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.12);
  margin-bottom: 18px;
}
.market-free-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.market-free-icon { font-size: 36px; }
.market-free-info h3 { margin: 0 0 3px; font-size: 17px; }

.market-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.market-item {
  border-radius: 16px;
  padding: 16px;
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(34,28,41,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.market-pack-thumb {
  width: 72px; height: 96px;
  border-radius: 10px;
  background: linear-gradient(155deg, var(--g1), var(--g2));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}
.market-item h4 { margin: 0; font-size: 16px; }
.market-item p { margin: 0; font-size: 12px; color: var(--muted); }

/* Leaderboard */
.lb-table-wrap {
  width: 100%;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(34,28,41,0.1);
  border-radius: 18px;
  overflow: auto;
}
.lb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lb-table th, .lb-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(34,28,41,0.07);
}
.lb-table th { font-size: 12px; color: var(--muted); background: rgba(34,28,41,0.03); }
.lb-table tr.me { background: rgba(139, 92, 246, 0.1); font-weight: 700; }
.panel-flag {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(109, 40, 217, 0.12);
  color: #6d28d9;
  font-weight: 700;
}

/* Bottom Dock */
.bottom-dock {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #221c2e;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  margin-top: 12px;
}
.dock-btn {
  position: relative;
  border: 0;
  background: transparent;
  color: #d6cee3;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dock-btn:hover { color: #fff; }
.dock-btn.active { background: #3b2f52; color: #fff; }
.dock-dot {
  position: absolute;
  top: 6px; right: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #f43f5e;
  box-shadow: 0 0 0 2px #221c2e;
}

.bottom-meta {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
}

/* Integrated Floating Pack Control Panel */
.panel-host {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  z-index: 1000;
  max-width: calc(100vw - 28px);
  color-scheme: dark;
  color: #f7f4ff;
}
.panel-nav { display: flex; justify-content: flex-end; gap: 6px; }
.panel-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #706781;
  border-radius: 22px;
  padding: 7px 14px;
  background: #211c31;
  color: #f4eeff;
  font-size: 13px;
  font-weight: 650;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}
.panel-pill-btn[aria-pressed="true"] { border-color: #bea3eb; background: #513963; color: #fff; }
.panel-body {
  width: 296px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 76px);
  overflow: auto;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid #655971;
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font-size: 13px;
}
.panel-selectors { display: grid; grid-template-columns: 1fr 78px; gap: 9px; }
.panel-selectors label { display: grid; gap: 4px; font-size: 12px; color: #cec5da; }
.panel-body select, .panel-body input[type="number"] {
  border: 1px solid #5b5267;
  color: #f8f4ff;
  background: var(--panel-surface);
  border-radius: 7px;
  padding: 6px 8px;
  width: 100%;
  min-width: 0;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.panel-head b { font-size: 13px; }
.panel-link { border: 0; background: transparent; color: #cab4eb; font-size: 12px; padding: 2px 4px; }
.odds-row { display: grid; grid-template-columns: 48px 1fr 86px; align-items: center; gap: 8px; margin: 5px 0; }
.odds-tag-btn {
  border: 1px solid color-mix(in srgb, var(--c) 50%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 15%, #191722);
  color: var(--c);
  font-weight: 800;
  font-size: 12px;
  padding: 4px;
}
.odds-val { position: relative; }
.odds-val span { position: absolute; right: 8px; top: 6px; color: #ada3ba; pointer-events: none; font-size: 12px; }
.odds-val input { padding-right: 22px !important; text-align: right; font-variant-numeric: tabular-nums; }
.panel-total { display: block; margin: 8px 0; font-size: 12px; color: #bcb1c9; }
.panel-total.bad { color: #ffaaa6; }
.panel-claim-btn {
  width: 100%; border: 0; border-radius: 9px; padding: 9px;
  background: var(--accent); color: var(--accent-dark); font-weight: 750; font-size: 13px;
}
.panel-claim-btn:disabled { background: #51475c; color: #c5bdcc; cursor: default; }
.panel-msg { color: #c4e7cf; font-size: 12px; margin: 8px 0 0; }
.panel-msg:empty { display: none; }
.panel-refill { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: #cec5da; }
.panel-refill input { accent-color: #c7a8f8; }
.panel-small { display: block; font-size: 11px; line-height: 1.5; margin: 8px 0 0; color: #b5aabd; }

/* Modals */
dialog.modal {
  border: 0; padding: 0; background: transparent;
  max-width: min(440px, calc(100vw - 24px)); width: 100%;
}
dialog.modal::backdrop { background: rgba(15, 12, 24, 0.55); backdrop-filter: blur(4px); }
.modal-card {
  background: #fff; color: var(--ink);
  border-radius: 18px; padding: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font-size: 18px; }
.close-x {
  border: 0; background: rgba(34,28,41,0.08); color: var(--ink);
  width: 30px; height: 30px; border-radius: 50%; font-size: 14px;
}
.modal-body { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.field input { border: 1px solid rgba(34,28,41,0.18); border-radius: 10px; padding: 9px 12px; color: var(--ink); width: 100%; }
.inline-row { display: flex; gap: 8px; }
.divider { border: 0; border-top: 1px solid rgba(34,28,41,0.1); margin: 4px 0; }
.modal-msg { margin: 0; font-size: 12px; color: #15803d; min-height: 16px; }
.modal-msg.error { color: #b91c1c; }

.auth-chip {
  background: #271b3d !important;
  color: #fff !important;
  border-color: #271b3d !important;
}
.account-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(39, 27, 61, 0.05);
  border: 1px solid rgba(39, 27, 61, 0.1);
}
.account-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.account-label { font-size: 11px; color: var(--muted); }
.account-meta strong { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-meta small { font-size: 11px; color: var(--muted); }
.account-actions { flex-shrink: 0; }

.auth-shared-note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(34, 28, 41, 0.06);
}
.auth-tab {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  background: transparent;
  color: var(--muted);
}
.auth-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

dialog.card-inspect-dialog {
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  background: transparent;
}
dialog.card-inspect-dialog[open] {
  display: grid;
  place-items: center;
}
.card-inspect-modal {
  position: relative; background: transparent; box-shadow: none; padding: 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}

/* Toasts */
.toast-stack {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%);
  z-index: 2000; display: grid; gap: 8px; pointer-events: none;
}
.toast {
  background: #201c2b; color: #fff; border: 1px solid #6b5e80;
  padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 650;
  box-shadow: 0 10px 28px rgba(0,0,0,0.3);
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .top-bar { grid-template-columns: 1fr; text-align: center; }
  .player-chip { justify-content: center; margin-top: 4px; }
  .top-spacer { display: none; }
}
