@font-face {
  font-family: "Agbalumo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/agbalumo-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --page: #f4f4f1;
  --surface: #ffffff;
  --surface-raised: #fbfbf9;
  --ink: #121212;
  --muted: #74746f;
  --line: #d9d9d3;
  --line-strong: #b9b9b1;
  --button: #151515;
  --button-ink: #ffffff;
  --shadow: 0 22px 60px rgb(26 26 23 / 10%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0e;
  --surface: #171718;
  --surface-raised: #1c1c1e;
  --ink: #f3f3ef;
  --muted: #8b8b84;
  --line: #303033;
  --line-strong: #4a4a4d;
  --button: #f2f2ed;
  --button-ink: #111112;
  --shadow: 0 26px 72px rgb(0 0 0 / 34%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: #0d0d0e;
    --surface: #171718;
    --surface-raised: #1c1c1e;
    --ink: #f3f3ef;
    --muted: #8b8b84;
    --line: #303033;
    --line-strong: #4a4a4d;
    --button: #f2f2ed;
    --button-ink: #111112;
    --shadow: 0 26px 72px rgb(0 0 0 / 34%);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--page);
}

body {
  min-height: 100dvh;
  transition: background-color 180ms ease, color 180ms ease;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 clamp(20px, 4vw, 54px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  font-family: "Agbalumo", cursive;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: lowercase;
}

.view-nav {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translate(-50%, -50%);
}

.view-button {
  position: relative;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 740;
  letter-spacing: .13em;
}

.view-button::after {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--ink);
  content: "";
  opacity: 0;
  transform: scaleX(.4);
  transition: opacity 140ms ease, transform 140ms ease;
}

.view-button.is-active {
  color: var(--ink);
}

.view-button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.topbar-actions,
.score {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 10px;
}

.score {
  gap: 6px;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}

.score-value {
  font-size: 15px;
  font-weight: 700;
}

.score-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .13em;
}

.theme-toggle,
.reset-progress {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 15px;
  transition: border-color 140ms ease, transform 140ms ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  transform: rotate(18deg);
}

.reset-progress:hover {
  border-color: #d17777;
  color: #b53d3d;
  transform: translateY(-1px);
}

.reset-progress svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.app {
  display: grid;
  min-height: 100dvh;
  padding: 104px 24px 46px;
  place-items: center;
}

.pack-screen {
  width: 100%;
}

.pack-view,
.error-view {
  display: grid;
  justify-items: center;
  gap: 30px;
}

.pack-status {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.pack-bank {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 30px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-style: normal;
  letter-spacing: .12em;
}

.pack-bank b {
  color: var(--ink);
  font-size: 24px;
}

.pack-bank i {
  margin-right: 4px;
  font-style: normal;
}

.pack-bank [data-pack-timer] {
  min-width: 136px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.pack-milestones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 14px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
}

.pack-milestones span + span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.purchased-queue {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
}

.purchased-queue > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.queue-chip {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
}

.queue-chip.is-gyatt {
  border-color: color-mix(in srgb, #9b70dd 55%, var(--line));
  background: linear-gradient(120deg, color-mix(in srgb, var(--surface) 82%, #f2b7ff), color-mix(in srgb, var(--surface) 84%, #aeefff));
}

.queue-chip.is-gold {
  border-color: color-mix(in srgb, #c38a25 58%, var(--line));
  background: color-mix(in srgb, var(--surface) 82%, #ffe7a3);
}

.pack-view.is-empty .pack:not(.is-opening) {
  cursor: not-allowed;
  filter: grayscale(1) opacity(.54);
  transform: perspective(800px) rotateX(0) rotateY(0);
}

.pack-view.is-empty .pack:not(.is-opening):hover {
  filter: grayscale(1) opacity(.54);
  transform: perspective(800px) rotateX(0) rotateY(0);
}

.pack-view.is-empty .pack-body {
  animation: empty-pack 640ms ease-in-out;
}

.pack {
  --pack-art: linear-gradient(145deg, #6657ff, #f47cbd 48%, #6de3ff);
  --pack-x: 50%;
  --pack-y: 50%;
  --pack-shift-x: 0px;
  --pack-shift-y: 0px;
  --pack-warp-x: 0px;
  --pack-rotate-x: 0deg;
  --pack-rotate-y: 0deg;
  --pack-shape: polygon(0 2.8%, 2% 0, 5% 2.8%, 8% 0, 11% 2.8%, 14% 0, 17% 2.8%, 20% 0, 23% 2.8%, 26% 0, 29% 2.8%, 32% 0, 35% 2.8%, 38% 0, 41% 2.8%, 44% 0, 47% 2.8%, 50% 0, 53% 2.8%, 56% 0, 59% 2.8%, 62% 0, 65% 2.8%, 68% 0, 71% 2.8%, 74% 0, 77% 2.8%, 80% 0, 83% 2.8%, 86% 0, 89% 2.8%, 92% 0, 95% 2.8%, 98% 0, 100% 2.8%, 100% 97.2%, 98% 100%, 95% 97.2%, 92% 100%, 89% 97.2%, 86% 100%, 83% 97.2%, 80% 100%, 77% 97.2%, 74% 100%, 71% 97.2%, 68% 100%, 65% 97.2%, 62% 100%, 59% 97.2%, 56% 100%, 53% 97.2%, 50% 100%, 47% 97.2%, 44% 100%, 41% 97.2%, 38% 100%, 35% 97.2%, 32% 100%, 29% 97.2%, 26% 100%, 23% 97.2%, 20% 100%, 17% 97.2%, 14% 100%, 11% 97.2%, 8% 100%, 5% 97.2%, 2% 100%, 0 97.2%);
  position: relative;
  width: 348px;
  height: 518px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 26px 23px rgb(0 0 0 / 22%));
  transform: perspective(800px) rotateX(var(--pack-rotate-x)) rotateY(var(--pack-rotate-y));
  transform-style: preserve-3d;
  transition: transform 180ms cubic-bezier(.2, .8, .2, 1), filter 180ms ease;
}

.pack:hover:not(.is-opening):not(:disabled) {
  filter: drop-shadow(0 36px 30px rgb(0 0 0 / 28%));
  transform: perspective(800px) translateY(-9px) rotateX(var(--pack-rotate-x)) rotateY(var(--pack-rotate-y));
}

.pack:active:not(.is-opening):not(:disabled) {
  transform: perspective(800px) translateY(-3px) rotateX(var(--pack-rotate-x)) rotateY(var(--pack-rotate-y)) scale(.985);
}

.pack-body,
.pack-top,
.pack-bottom {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  overflow: hidden;
  border-inline: 1px solid rgb(255 255 255 / 46%);
  transition: background-position 90ms linear, transform 620ms cubic-bezier(.55, 0, .45, 1), opacity 520ms ease;
}

.pack-body {
  inset: 0;
  height: 518px;
  clip-path: var(--pack-shape);
  background:
    linear-gradient(90deg, rgb(0 0 0 / 36%), transparent 8%, transparent 90%, rgb(0 0 0 / 40%)),
    linear-gradient(160deg, rgb(255 255 255 / 20%), transparent 27%, rgb(0 0 0 / 18%) 82%),
    #161619;
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 30%),
    inset 13px 0 18px rgb(255 255 255 / 11%),
    inset -13px 0 18px rgb(0 0 0 / 18%);
}

.pack-body::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(255 255 255 / 33%), transparent 4% 96%, rgb(255 255 255 / 20%)),
    repeating-linear-gradient(105deg, transparent 0 13px, rgb(255 255 255 / 5%) 14px, transparent 16px 31px);
  content: "";
  mix-blend-mode: screen;
  pointer-events: none;
}

.pack-body::after {
  position: absolute;
  z-index: 3;
  inset: 0;
  background:
    radial-gradient(circle at var(--pack-x) var(--pack-y), rgb(255 255 255 / 56%) 0, rgb(255 238 158 / 19%) 12%, transparent 31%),
    linear-gradient(118deg, transparent 16%, rgb(117 231 255 / 21%) 34%, rgb(255 152 234 / 28%) 45%, rgb(255 247 174 / 25%) 55%, transparent 73%);
  background-position: center, calc(var(--pack-x) - 50%) calc(var(--pack-y) - 50%);
  background-size: auto, 180% 180%;
  content: "";
  mix-blend-mode: screen;
  opacity: .84;
  pointer-events: none;
  transition: background-position 80ms linear;
}

.pack-top,
.pack-bottom {
  z-index: 6;
  height: 28px;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 33%), rgb(255 255 255 / 8%) 7%, transparent 24% 76%, rgb(255 255 255 / 10%) 92%, rgb(0 0 0 / 34%)),
    linear-gradient(180deg, rgb(255 255 255 / 18%), rgb(10 10 14 / 8%) 22%, rgb(5 5 8 / 38%) 88%, rgb(255 255 255 / 16%));
  transition: transform 620ms cubic-bezier(.2, .72, .2, 1), opacity 480ms ease;
}

.pack-top {
  top: 0;
  clip-path: polygon(0 41.67%, 2% 0, 5% 41.67%, 8% 0, 11% 41.67%, 14% 0, 17% 41.67%, 20% 0, 23% 41.67%, 26% 0, 29% 41.67%, 32% 0, 35% 41.67%, 38% 0, 41% 41.67%, 44% 0, 47% 41.67%, 50% 0, 53% 41.67%, 56% 0, 59% 41.67%, 62% 0, 65% 41.67%, 68% 0, 71% 41.67%, 74% 0, 77% 41.67%, 80% 0, 83% 41.67%, 86% 0, 89% 41.67%, 92% 0, 95% 41.67%, 98% 0, 100% 41.67%, 100% 100%, 0 100%);
  transform-origin: 15% 75%;
}

.pack-bottom {
  bottom: 0;
  clip-path: polygon(0 0, 100% 0, 100% 58.33%, 98% 100%, 95% 58.33%, 92% 100%, 89% 58.33%, 86% 100%, 83% 58.33%, 80% 100%, 77% 58.33%, 74% 100%, 71% 58.33%, 68% 100%, 65% 58.33%, 62% 100%, 59% 58.33%, 56% 100%, 53% 58.33%, 50% 100%, 47% 58.33%, 44% 100%, 41% 58.33%, 38% 100%, 35% 58.33%, 32% 100%, 29% 58.33%, 26% 100%, 23% 58.33%, 20% 100%, 17% 58.33%, 14% 100%, 11% 58.33%, 8% 100%, 5% 58.33%, 2% 100%, 0 58.33%);
  background:
    linear-gradient(90deg, rgb(0 0 0 / 33%), rgb(255 255 255 / 8%) 7%, transparent 24% 76%, rgb(255 255 255 / 10%) 92%, rgb(0 0 0 / 34%)),
    linear-gradient(0deg, rgb(255 255 255 / 18%), rgb(10 10 14 / 8%) 22%, rgb(5 5 8 / 38%) 88%, rgb(255 255 255 / 16%));
  transform-origin: 50% 25%;
}

.pack-top::before,
.pack-bottom::before {
  position: absolute;
  border-block: 1px solid rgb(255 255 255 / 54%);
  background: repeating-linear-gradient(0deg, rgb(255 255 255 / 10%) 0 2px, rgb(0 0 0 / 12%) 2px 4px);
  box-shadow: 0 2px 3px rgb(0 0 0 / 22%), inset 0 1px rgb(255 255 255 / 35%);
  content: "";
  opacity: .86;
}

.pack-top::before {
  inset: 10px 0 4px;
}

.pack-bottom::before {
  inset: 4px 0 10px;
}

.pack-top::after,
.pack-bottom::after {
  position: absolute;
  right: 12px;
  left: 12px;
  height: 1px;
  background: rgb(255 255 255 / 58%);
  box-shadow: 0 1px rgb(0 0 0 / 22%);
  content: "";
}

.pack-top::after {
  bottom: 2px;
}

.pack-bottom::after {
  top: 2px;
}

.pack-art {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(8 8 10 / 2%) 35%, rgb(5 5 8 / 68%) 100%),
    var(--pack-art);
  background-position: center, calc(50% + var(--pack-shift-x)) calc(50% + var(--pack-shift-y));
  background-size: auto, cover;
  filter: contrast(1.04) saturate(1.12);
  transition: background-position 90ms linear, filter 240ms ease;
}

.pack-crinkle {
  position: absolute;
  z-index: 2;
  inset: 13px 5px 18px;
  background-image: var(--pack-art);
  background-position: calc(50% - var(--pack-shift-x)) calc(50% - var(--pack-shift-y));
  background-size: cover;
  filter: saturate(1.25) contrast(1.08);
  mask-image: repeating-linear-gradient(108deg, #000 0 4px, transparent 7px 23px);
  -webkit-mask-image: repeating-linear-gradient(108deg, #000 0 4px, transparent 7px 23px);
  mix-blend-mode: screen;
  opacity: .28;
  pointer-events: none;
  transform: scaleX(1.018) translateX(var(--pack-warp-x));
  transition: background-position 90ms linear, transform 90ms linear;
}

.pack-mark,
.pack-number {
  position: absolute;
  z-index: 5;
  color: #ffd7e7;
  text-shadow: 0 2px 11px rgb(0 0 0 / 72%), 0 1px 1px rgb(0 0 0 / 88%);
}

.pack-mark {
  bottom: 85px;
  left: 50%;
  font-family: "Agbalumo", cursive;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  text-transform: lowercase;
  white-space: nowrap;
  transform: translateX(-50%) skewY(-2deg);
}

.pack-edition {
  position: absolute;
  z-index: 5;
  top: 50px;
  left: 50%;
  padding: 6px 10px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 999px;
  background: rgb(10 10 12 / 34%);
  color: #fff8d1;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .18em;
  text-shadow: 0 1px 5px rgb(0 0 0 / 75%);
  transform: translateX(-50%);
}

.pack:is([data-pack-kind="gold"], [data-pack-kind="gyatt-gold"]) {
  filter: drop-shadow(0 28px 26px rgb(156 105 19 / 30%));
}

.pack:is([data-pack-kind="gold"], [data-pack-kind="gyatt-gold"]) .pack-art {
  filter: sepia(.24) saturate(1.42) contrast(1.06);
}

.pack:is([data-pack-kind="gold"], [data-pack-kind="gyatt-gold"]) .pack-body {
  box-shadow:
    inset 0 0 0 2px rgb(255 221 117 / 58%),
    inset 16px 0 24px rgb(255 238 170 / 20%),
    inset -15px 0 22px rgb(92 53 4 / 28%);
}

.pack:is([data-pack-kind="gold"], [data-pack-kind="gyatt-gold"]) .pack-body::after {
  background:
    radial-gradient(circle at var(--pack-x) var(--pack-y), rgb(255 255 230 / 72%) 0, rgb(255 215 92 / 26%) 13%, transparent 32%),
    linear-gradient(145deg, rgb(255 198 44 / 32%), transparent 35% 62%, rgb(151 91 7 / 22%)),
    linear-gradient(118deg, transparent 16%, rgb(255 236 154 / 32%) 34%, rgb(255 186 65 / 26%) 48%, rgb(255 248 193 / 28%) 57%, transparent 73%);
}

.pack:is([data-pack-kind="gold"], [data-pack-kind="gyatt-gold"]) .pack-top,
.pack:is([data-pack-kind="gold"], [data-pack-kind="gyatt-gold"]) .pack-bottom {
  filter: sepia(.9) saturate(1.8) brightness(1.06);
}

.pack:is([data-pack-kind="gold"], [data-pack-kind="gyatt-gold"]) .pack-sheen::before {
  background:
    linear-gradient(118deg, rgb(255 235 161 / 32%), transparent 25% 63%, rgb(255 197 66 / 26%)),
    radial-gradient(ellipse at var(--pack-x) var(--pack-y), rgb(255 249 207 / 68%), transparent 15%, transparent 34%);
  mix-blend-mode: color-dodge;
}

.pack:is([data-pack-kind="gyatt"], [data-pack-kind="gyatt-gold"]) {
  filter: drop-shadow(0 30px 30px rgb(129 83 207 / 30%));
}

.pack:is([data-pack-kind="gyatt"], [data-pack-kind="gyatt-gold"]) .pack-body {
  box-shadow:
    inset 0 0 0 2px rgb(255 255 255 / 70%),
    inset 16px 0 25px rgb(111 225 255 / 18%),
    inset -16px 0 25px rgb(255 119 212 / 20%);
}

.pack:is([data-pack-kind="gyatt"], [data-pack-kind="gyatt-gold"]) .pack-edition {
  border-color: rgb(255 255 255 / 78%);
  color: #fff;
  box-shadow: 0 0 18px rgb(181 132 255 / 36%);
}

.pack:is([data-pack-kind="gyatt"], [data-pack-kind="gyatt-gold"]) .pack-mark {
  color: #b8e8ff;
}

.pack:is([data-pack-kind="gyatt"], [data-pack-kind="gyatt-gold"]) .pack-sheen::before {
  inset: -45%;
  background: conic-gradient(from 0deg, rgb(255 98 150 / 42%), rgb(255 225 105 / 42%), rgb(92 239 205 / 42%), rgb(102 180 255 / 42%), rgb(204 111 255 / 42%), rgb(255 98 150 / 42%));
  mix-blend-mode: color-dodge;
  opacity: .74;
  animation: gyatt-pack-warp 4.8s linear infinite;
}

.pack[data-pack-kind="gyatt-gold"] {
  filter: drop-shadow(0 30px 30px rgb(171 113 24 / 28%)) drop-shadow(0 15px 22px rgb(129 83 207 / 22%));
}

.pack[data-pack-kind="gyatt-gold"] .pack-body {
  box-shadow:
    inset 0 0 0 2px rgb(255 232 150 / 78%),
    inset 16px 0 25px rgb(111 225 255 / 18%),
    inset -16px 0 25px rgb(255 171 84 / 24%);
}

.pack[data-pack-kind="gyatt-gold"] .pack-edition {
  border-color: rgb(255 231 151 / 88%);
  color: #fff4c4;
  box-shadow: 0 0 20px rgb(255 198 75 / 35%), 0 0 18px rgb(181 132 255 / 30%);
}

.pack-number {
  right: 24px;
  bottom: 28px;
  color: rgb(255 255 255 / 82%);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
}

.pack-sheen {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: block;
  overflow: hidden;
  clip-path: var(--pack-shape);
  pointer-events: none;
}

.pack-sheen::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(93deg, rgb(255 255 255 / 48%), transparent 4% 93%, rgb(255 255 255 / 33%)),
    radial-gradient(ellipse at var(--pack-x) var(--pack-y), rgb(255 255 255 / 50%), transparent 13%, transparent 32%);
  content: "";
  mix-blend-mode: soft-light;
  opacity: .9;
}

.pack-sheen::after {
  position: absolute;
  top: -20%;
  left: -90%;
  width: 58%;
  height: 145%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 46%), rgb(175 231 255 / 16%), transparent);
  content: "";
  transform: translate3d(0, 0, 0) skewX(-17deg);
  transition: transform 540ms ease;
  will-change: transform, opacity;
}

.pack:hover:not(:disabled) .pack-sheen::after {
  transform: translate3d(365%, 0, 0) skewX(-17deg);
}

.pack:not(:hover):not(.is-opening):not(:disabled) .pack-sheen::after {
  animation: pack-idle-sheen 5.2s ease-in-out infinite;
}

.pack.is-opening {
  cursor: default;
  pointer-events: none;
}

.pack:disabled .pack-sheen::after {
  animation: none;
  opacity: 0;
}

.pack.is-opening .pack-top {
  animation: pack-rip-top 900ms cubic-bezier(.2, .8, .2, 1) both;
}

.pack.is-opening .pack-body,
.pack.is-opening .pack-bottom {
  animation: pack-rip-body 820ms cubic-bezier(.42, 0, .72, .22) 180ms both;
}

.pack.is-opening .pack-sheen {
  animation: pack-rip-sheen 700ms ease 160ms both;
}

.pack.is-loading .pack-art,
.pack.is-loading .pack-crinkle {
  filter: blur(10px) saturate(.7);
}

.primary-action,
.secondary-action {
  min-width: 154px;
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .13em;
  transition: transform 140ms ease, opacity 140ms ease, background-color 140ms ease;
}

.primary-action {
  border: 1px solid var(--button);
  background: var(--button);
  color: var(--button-ink);
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-2px);
}

.primary-action:disabled {
  cursor: default;
  opacity: .42;
  transform: none;
}

.results-view {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 26px;
  width: 100%;
}

.pack-effects {
  position: fixed;
  z-index: 60;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.pack-sparkle {
  --sparkle-color: #b8b8b0;
  position: absolute;
  top: 48%;
  left: 50%;
  width: var(--sparkle-size, 6px);
  height: var(--sparkle-size, 6px);
  border-radius: 50%;
  background: var(--sparkle-color);
  box-shadow: 0 0 16px color-mix(in srgb, var(--sparkle-color) 80%, transparent);
  opacity: 0;
  animation: sparkle-burst var(--sparkle-time, 900ms) cubic-bezier(.15, .75, .25, 1) var(--sparkle-delay, 0ms) both;
}

.pack-sparkle.is-star {
  border-radius: 1px;
  transform: rotate(45deg);
}

.collection-view {
  display: grid;
  justify-items: center;
  gap: 24px;
  width: 100%;
}

.collection-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1500px, calc(100vw - 48px));
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .12em;
}

.collection-summary,
.collection-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.collection-summary span + span {
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.collection-actions button {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .08em;
  transition: border-color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.collection-actions button:hover:not(:disabled) {
  border-color: #7fae91;
  transform: translateY(-1px);
}

.collection-actions button:disabled {
  cursor: default;
  opacity: .35;
}

.collection-actions button b {
  margin-left: 5px;
  color: #31835b;
}

.collection-tools b {
  color: var(--ink);
}

.collection-tools select {
  height: 32px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .1em;
}

.collection-notice {
  min-height: 14px;
  color: var(--muted);
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .09em;
}

.collection-notice.is-success {
  color: #31835b;
}

.collection-notice.is-error {
  color: #bc4b4b;
}

.collection-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .14em;
}

.collection-pagination {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .1em;
}

.collection-pagination button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.collection-pagination button:hover:not(:disabled) {
  border-color: var(--line-strong);
  transform: scale(1.08);
}

.collection-pagination button:disabled {
  cursor: default;
  opacity: .3;
}

.shop-view {
  display: grid;
  justify-items: center;
  gap: 26px;
  width: min(820px, calc(100vw - 48px));
  align-self: start;
}

.page-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.page-heading > span,
.shop-panel-heading span,
.grade-card-select > span,
.help-grid article > b {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .15em;
}

.page-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.055em;
}

.page-heading p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
}

.shop-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(720px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 35px rgb(20 20 18 / 5%);
}

.shop-ledger > span {
  display: grid;
  gap: 3px;
  padding: 15px 20px;
  text-align: center;
}

.shop-ledger > span + span {
  border-left: 1px solid var(--line);
}

.shop-ledger b {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

.shop-ledger i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 720;
  letter-spacing: .12em;
}

.shop-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
}

.shop-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shop-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.shop-panel-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
  letter-spacing: -.025em;
}

.shop-panel-heading > b {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.shop-products {
  display: grid;
  gap: 10px;
}

.shop-product {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface-raised);
}

.product-art {
  position: relative;
  display: grid;
  width: 74px;
  height: 92px;
  overflow: hidden;
  place-items: end center;
  padding: 0 3px 11px;
  clip-path: polygon(0 4%, 5% 0, 10% 4%, 15% 0, 20% 4%, 25% 0, 30% 4%, 35% 0, 40% 4%, 45% 0, 50% 4%, 55% 0, 60% 4%, 65% 0, 70% 4%, 75% 0, 80% 4%, 85% 0, 90% 4%, 95% 0, 100% 4%, 100% 96%, 95% 100%, 90% 96%, 85% 100%, 80% 96%, 75% 100%, 70% 96%, 65% 100%, 60% 96%, 55% 100%, 50% 96%, 45% 100%, 40% 96%, 35% 100%, 30% 96%, 25% 100%, 20% 96%, 15% 100%, 10% 96%, 5% 100%, 0 96%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 45%);
}

.product-art::before {
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 32%, rgb(255 255 255 / 60%) 47%, transparent 62%);
  content: "";
  transform: translateX(-55%);
  animation: product-sheen 3.6s ease-in-out infinite;
}

.is-gyatt .product-art {
  background: linear-gradient(145deg, #e889c8, #806ee8 48%, #54cfd3);
}

.is-gold .product-art {
  background: linear-gradient(145deg, #7d5007, #e9ad2f 48%, #fff1a4);
}

.product-art span {
  z-index: 1;
  font-family: "Agbalumo", cursive;
  font-size: 12px;
  text-shadow: 0 1px 4px rgb(0 0 0 / 55%);
}

.product-art i {
  position: absolute;
  z-index: 1;
  top: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .12em;
}

.product-copy h3 {
  margin: 0 0 4px;
  font-size: 13px;
}

.product-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .08em;
}

.shop-product button,
.grade-services button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.shop-product button {
  display: grid;
  gap: 3px;
  min-width: 98px;
  padding: 10px 12px;
  border-radius: 12px;
}

.shop-product button span,
.shop-product button b,
.grade-services button span,
.grade-services button i,
.grade-services button b {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .07em;
}

.shop-product button span {
  color: var(--muted);
  font-size: 12px;
}

.shop-product button b {
  font-size: 12px;
}

.shop-product button:hover:not(:disabled),
.grade-services button:hover:not(:disabled) {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.shop-product button:disabled,
.grade-services button:disabled {
  cursor: not-allowed;
  opacity: .34;
}

.shop-queue-summary,
.shop-notice {
  margin-top: 13px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.5;
  text-align: center;
}

.grade-card-select {
  display: grid;
  gap: 7px;
  margin-bottom: 13px;
}

.grade-card-select select {
  width: 100%;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-raised);
  color: var(--ink);
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .055em;
}

.grade-workbench {
  display: grid;
  grid-template-columns: minmax(170px, .8fr) minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
}

.grade-preview {
  display: grid;
  min-height: 325px;
  place-items: center;
  color: var(--muted);
  font: 700 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-align: center;
}

.grade-preview .card {
  width: min(225px, 100%);
}

.grade-services {
  display: grid;
  gap: 8px;
}

.grade-services button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 8px;
  padding: 12px;
  border-radius: 13px;
  text-align: left;
}

.grade-services button span {
  font-size: 12px;
  font-weight: 800;
}

.grade-services button i {
  grid-row: 2;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.grade-services button b {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-size: 12px;
}

.shop-notice.is-success {
  color: #31835b;
}

.shop-notice.is-error {
  color: #bc4b4b;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.help-grid article {
  min-height: 155px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 12px 35px rgb(20 20 18 / 5%);
}

.help-grid h2 {
  margin: 9px 0 10px;
  font-size: 15px;
  letter-spacing: -.02em;
}

.help-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .13em;
}

.results-meta b {
  color: var(--ink);
  font-weight: 700;
}

.cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 20px);
  width: min(1500px, calc(100vw - 48px));
}

.card {
  --rarity: #a5a59e;
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity) 52%, var(--line));
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 1;
  transform: perspective(900px) rotateX(0) rotateY(0) translateY(0) scale(1);
  transform-style: preserve-3d;
  transition: transform 210ms cubic-bezier(.15, .85, .2, 1), box-shadow 210ms ease;
  animation: card-arrive 680ms cubic-bezier(.12, .82, .18, 1) backwards;
  animation-delay: var(--delay, 0ms);
  cursor: zoom-in;
}

.card::before {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgb(255 255 255 / 30%), transparent 28%),
    linear-gradient(115deg, transparent 30%, rgb(255 255 255 / 13%) 46%, transparent 62%);
  content: "";
  mask: linear-gradient(#000 0 0) top / 100% 38px no-repeat, linear-gradient(#000 0 0) bottom / 100% 102px no-repeat;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 38px no-repeat, linear-gradient(#000 0 0) bottom / 100% 102px no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.card.no-arrival {
  animation: none;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover:not(.is-focused):not(.is-returning):not(.is-static) {
    z-index: 8;
    box-shadow: 0 42px 90px rgb(18 18 15 / 30%);
    transform: perspective(1050px) rotateX(var(--card-rx, 0deg)) rotateY(var(--card-ry, 0deg)) translateY(-18px) scale(1.3);
    will-change: transform;
  }

  .card:not(.is-returning):hover::before {
    opacity: .7;
  }
}

.card[data-rarity="R"] {
  --sheen-peak: .38;
  --rarity: #548cc9;
  border: 2px solid transparent;
  background:
    linear-gradient(132deg, var(--surface) 5%, color-mix(in srgb, var(--surface) 82%, #bce9ff) 31%, var(--surface) 52%, color-mix(in srgb, var(--surface) 87%, #d9c7ff) 76%, var(--surface) 96%) padding-box,
    linear-gradient(145deg, #aacdf2, #4d82bb 55%, #d9ebff) border-box;
  box-shadow: 0 18px 52px rgb(61 123 185 / 15%);
}

.card[data-rarity="SR"] {
  --sheen-peak: .58;
  --rarity: #8f68c9;
  border: 3px solid transparent;
  background:
    linear-gradient(128deg, color-mix(in srgb, var(--surface) 86%, #ebcbff), var(--surface) 22%, color-mix(in srgb, var(--surface) 78%, #bdeeff) 43%, color-mix(in srgb, var(--surface) 82%, #ffd0e9) 61%, var(--surface) 82%, color-mix(in srgb, var(--surface) 84%, #fff2ae)) padding-box,
    linear-gradient(135deg, #6a45a4, #d3b6ff 42%, #8e65cb 68%, #f1e7ff) border-box;
  box-shadow: 0 20px 58px rgb(121 77 176 / 20%);
}

.card[data-rarity="SSR"] {
  --sheen-peak: .76;
  --rarity: #c18b25;
  border: 4px solid transparent;
  background:
    linear-gradient(126deg, color-mix(in srgb, var(--surface) 78%, #ffdea1), var(--surface) 19%, color-mix(in srgb, var(--surface) 72%, #fff1b8) 38%, color-mix(in srgb, var(--surface) 80%, #ffc6ea) 54%, color-mix(in srgb, var(--surface) 78%, #c8edff) 69%, var(--surface) 88%) padding-box,
    linear-gradient(125deg, #7a5312, #ffe9a8 25%, #c89128 53%, #fff4c5 75%, #8e6118) border-box;
  box-shadow: 0 22px 70px rgb(188 132 31 / 28%), inset 0 0 0 1px rgb(255 248 211 / 48%);
}

.card[data-rarity="UR"] {
  --sheen-peak: .96;
  --rarity: #d6a943;
  border: 5px solid transparent;
  background:
    linear-gradient(124deg, color-mix(in srgb, var(--surface) 66%, #ffe189), color-mix(in srgb, var(--surface) 75%, #e6bfff) 19%, color-mix(in srgb, var(--surface) 68%, #9ff0ff) 37%, color-mix(in srgb, var(--surface) 72%, #fff7c2) 55%, color-mix(in srgb, var(--surface) 70%, #ffbfe8) 73%, color-mix(in srgb, var(--surface) 68%, #b8f7e4) 91%) padding-box,
    conic-gradient(from var(--foil-angle, 0deg), #f8d86a, #fff5c2, #e395ff, #8eeeff, #fff5c2, #f2b84b) border-box;
  box-shadow: 0 26px 85px rgb(185 130 31 / 35%), 0 0 28px rgb(165 106 229 / 18%);
}

.card[data-rarity="UR"].no-arrival {
  animation: none;
}

.card[data-rarity="R"]::after,
.card[data-rarity="SR"]::after,
.card[data-rarity="SSR"]::after,
.card[data-rarity="UR"]::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(112deg, transparent 30%, rgb(255 255 255 / 20%) 47%, transparent 63%);
  content: "";
  mask: linear-gradient(#000 0 0) top / 100% 38px no-repeat, linear-gradient(#000 0 0) bottom / 100% 102px no-repeat;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 38px no-repeat, linear-gradient(#000 0 0) bottom / 100% 102px no-repeat;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-90%);
}

.card[data-rarity="R"]::after,
.card[data-rarity="SR"]::after,
.card[data-rarity="SSR"]::after,
.card[data-rarity="UR"]::after {
  animation: rare-sheen 3.1s ease-in-out calc(var(--delay, 0ms) + 650ms) infinite;
}

.card.is-graded {
  padding: 9px;
  overflow: hidden;
  border: 1px solid rgb(177 190 202 / 82%);
  border-radius: 24px;
  background:
    linear-gradient(118deg, rgb(255 255 255 / 78%), rgb(218 228 237 / 72%) 24%, rgb(255 255 255 / 54%) 48%, rgb(199 213 224 / 70%) 73%, rgb(255 255 255 / 76%));
  box-shadow: 0 28px 72px rgb(34 48 60 / 22%), inset 0 0 0 3px rgb(255 255 255 / 48%);
}

:root[data-theme="dark"] .card.is-graded {
  border-color: rgb(130 143 154 / 76%);
  background: linear-gradient(118deg, #8e9aa4, #596570 23%, #aeb8c0 46%, #56616b 72%, #919ca5);
  box-shadow: 0 30px 76px rgb(0 0 0 / 50%), inset 0 0 0 3px rgb(255 255 255 / 18%);
}

.card.is-graded::after {
  z-index: 8;
  inset: -30%;
  border-radius: 0;
  background: linear-gradient(112deg, transparent 38%, rgb(255 255 255 / 42%) 48%, transparent 58%);
  mask: none;
  -webkit-mask: none;
  opacity: .32;
  animation: slab-glint 5.2s ease-in-out infinite;
}

.card.is-graded .card-header,
.card.is-graded .card-info {
  background: var(--surface);
}

.card.is-graded .card-header {
  border-radius: 8px 8px 0 0;
}

.card.is-graded .card-media {
  margin: 0;
  border-radius: 3px;
}

.card.is-graded .card-info {
  border-radius: 0 0 8px 8px;
}

.slab-label {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 47px;
  margin-bottom: 7px;
  padding: 7px 8px;
  overflow: hidden;
  border: 1px solid rgb(181 36 44 / 44%);
  border-top: 4px solid #b8202a;
  border-radius: 8px;
  background: rgb(255 255 255 / 88%);
  color: #17191b;
  box-shadow: inset 0 -1px 0 rgb(24 67 122 / 28%);
}

.slab-label::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: #1f4f8f;
  content: "";
}

.slab-brand {
  color: #a91f29;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .09em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.slab-description {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.slab-description b {
  overflow: hidden;
  font-size: 12px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slab-description i {
  color: #607080;
  font: 650 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: .06em;
}

.slab-label > strong {
  display: flex;
  align-items: baseline;
  color: #143b70;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.08em;
}

.slab-label > strong i {
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0;
}

.card.is-grade-10 {
  border-color: rgb(220 174 58 / 90%);
  box-shadow: 0 30px 85px rgb(190 135 26 / 30%), 0 0 28px rgb(255 218 113 / 24%), inset 0 0 0 3px rgb(255 251 222 / 66%);
}

.card.is-grade-10 .slab-label {
  border-color: rgb(195 142 18 / 58%);
  border-top-color: #c39a2f;
  background: linear-gradient(112deg, #fffdf1, #fff1b5 45%, #ffffff 67%, #f5d87a);
  box-shadow: 0 0 18px rgb(231 185 69 / 24%), inset 0 -2px 0 #a98124;
}

.card.is-grade-reveal {
  animation: grade-reveal 780ms cubic-bezier(.14, .82, .2, 1) both;
}

.card.is-static {
  cursor: default;
}

.card-header,
.card-info {
  position: relative;
  z-index: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 12px;
}

.card-labels,
.card-actions {
  display: flex;
  align-items: center;
}

.card-labels {
  gap: 7px;
}

.card-actions {
  gap: 8px;
}

.copies {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.dupe {
  padding: 3px 5px;
  border: 1px solid color-mix(in srgb, #da6d96 55%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, #ffd5e5);
  color: #a83f68;
  font: 800 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
}

.share-card {
  display: none;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.card.is-shareable .share-card:not([hidden]) {
  display: grid;
}

.share-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.rarity {
  color: var(--rarity);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

.card-id {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .08em;
}

.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  margin: 0 9px;
  border-radius: 11px;
  background: var(--surface-raised);
}

.card-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.card-image {
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.card-image.is-loaded {
  opacity: 1;
}

.scratch-cover {
  position: absolute;
  z-index: 12;
  inset: 0;
  display: none;
  overflow: hidden;
  border-radius: inherit;
  opacity: 1;
  transition: opacity 520ms cubic-bezier(.2, .75, .2, 1);
}

.card.is-scratchable .scratch-cover {
  display: block;
}

.card.has-management .scratch-cover {
  bottom: 44px;
  border-radius: inherit inherit 0 0;
}

.scratch-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: url("/assets/quarter-cursor.svg") 16 16, crosshair;
  touch-action: none;
}

.scratch-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 82%;
  gap: 8px;
  color: #f7f7f4;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 2px 12px rgb(0 0 0 / 72%);
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease, transform 180ms ease;
}

.scratch-copy b {
  font-size: clamp(18px, 2.1vw, 27px);
  letter-spacing: .16em;
}

.scratch-copy span {
  color: rgb(255 255 255 / 72%);
  font: 760 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
}

.card.is-scratching .scratch-copy {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.94);
}

.card.is-revealed .scratch-cover {
  opacity: 0;
  pointer-events: none;
}

.scratch-progress {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 9px;
  left: 10px;
  display: none;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(255 255 255 / 24%);
  pointer-events: none;
}

.card.is-scratchable:not(.is-revealed) .scratch-progress {
  display: block;
}

.scratch-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #ffffff;
  transition: width 80ms linear;
}

.card-management {
  position: relative;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-height: 44px;
  padding: 6px 8px 8px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.card-management button {
  min-width: 0;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
  font: 760 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .07em;
  white-space: nowrap;
}

.card-management button[hidden] {
  display: none;
}

.card-management button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.card-management button:disabled {
  cursor: default;
  opacity: .48;
  transform: none;
}

.card-management [data-card-sell] {
  color: #317556;
}

.card-management [data-card-sale-value] {
  margin-left: 2px;
}

.grade-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  overflow: auto;
  background: color-mix(in srgb, var(--page) 70%, transparent);
  backdrop-filter: blur(20px) saturate(.8);
  -webkit-backdrop-filter: blur(20px) saturate(.8);
  animation: overlay-in 180ms ease both;
}

.grade-dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(300px, 390px);
  align-items: center;
  gap: 34px;
  width: min(830px, calc(100vw - 48px));
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 40px 130px rgb(0 0 0 / 32%);
  animation: grade-dialog-in 320ms cubic-bezier(.14, .82, .2, 1) both;
}

.grade-close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-raised);
  color: var(--ink);
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
}

.grade-dialog .grade-preview {
  min-height: 0;
}

.grade-dialog .grade-preview .card {
  width: min(320px, 100%);
}

.grade-controls {
  display: grid;
  gap: 12px;
}

.grade-controls > span,
.grade-controls > p,
.grade-notice {
  color: var(--muted);
  font: 720 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
  line-height: 1.55;
}

.grade-controls > span b {
  color: var(--ink);
}

.grade-controls h1 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 38px);
  letter-spacing: -.05em;
}

.grade-controls > p {
  margin: -5px 0 4px;
}

.grade-notice {
  min-height: 25px;
  text-align: center;
}

.grade-notice.is-success {
  color: #31835b;
}

.grade-notice.is-error {
  color: #bc4b4b;
}

body.has-grade-modal {
  overflow: hidden;
}

.card-info {
  padding: 13px 13px 14px;
}

.card-info h2 {
  min-height: 1.25em;
  margin: 0 0 11px;
  overflow: hidden;
  font-size: inherit;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model {
  color: #2474c7;
  font-size: clamp(12px, 1.05vw, 14px);
  font-weight: 760;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, #2474c7 55%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:root[data-theme="dark"] .model {
  color: #83bfff;
  text-decoration-color: rgb(131 191 255 / 65%);
}

.model[href]::after {
  content: " ↗";
  font-size: 12px;
}

.model[href]:hover {
  text-decoration-color: currentColor;
}

.card-info h2,
.model {
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .09em;
}

.card-stats b {
  color: var(--ink);
  font-size: 12px;
}

.error-view {
  min-height: 380px;
  align-content: center;
}

.focus-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  overflow: auto;
  background: color-mix(in srgb, var(--page) 72%, transparent);
  backdrop-filter: blur(18px) saturate(.72);
  -webkit-backdrop-filter: blur(18px) saturate(.72);
  animation: overlay-in 180ms ease both;
}

.focus-slot {
  width: min(720px, calc(100vw - 40px));
  margin: auto;
}

.card.is-focused {
  z-index: 1;
  width: 100%;
  animation: focus-card-in 360ms cubic-bezier(.12, .86, .18, 1) both;
  box-shadow: 0 45px 135px rgb(0 0 0 / 42%);
  transform: none;
  cursor: zoom-out;
}

.card.is-focused:hover {
  transform: perspective(1200px) rotateX(var(--card-rx, 0deg)) rotateY(var(--card-ry, 0deg)) scale(1.018);
}

.card.is-focused .model {
  font-size: 18px;
}

.card.is-returning {
  z-index: 30;
  pointer-events: none;
  will-change: transform;
}

.card-placeholder {
  width: 100%;
  visibility: hidden;
}

body.has-focus {
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@keyframes card-arrive {
  from { opacity: 0; transform: perspective(900px) rotateZ(-4deg) translateY(64px) scale(.78); }
  58% { opacity: 1; transform: perspective(900px) rotateZ(1.2deg) translateY(-11px) scale(1.045); }
  78% { transform: perspective(900px) rotateZ(-.45deg) translateY(3px) scale(.99); }
  to { opacity: 1; transform: perspective(900px) rotateZ(0) translateY(0) scale(1); }
}

@keyframes rare-sheen {
  0%, 52% { opacity: 0; transform: translateX(-95%); }
  68% { opacity: var(--sheen-peak, .9); }
  88%, 100% { opacity: 0; transform: translateX(100%); }
}

@keyframes sparkle-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0); }
  18% { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--sparkle-x)), calc(-50% + var(--sparkle-y))) scale(0) rotate(180deg); }
}

@keyframes empty-pack {
  0%, 100% { transform: translateX(0) rotate(0); }
  22% { transform: translateX(-7px) rotate(-1.2deg); }
  48% { transform: translateX(6px) rotate(1deg); }
  72% { transform: translateX(-3px) rotate(-.5deg); }
}

@keyframes pack-rip-top {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
  28% { opacity: 1; transform: translate(-10px, -8px) rotate(-4deg) scaleX(1.025); }
  100% { opacity: 0; transform: translate(-155px, -105px) rotate(-31deg) scale(.92); }
}

@keyframes pack-rip-body {
  0% { opacity: 1; transform: translateY(0) scale(1); filter: saturate(1); }
  38% { opacity: .98; transform: translateY(9px) scale(.985, .97); filter: saturate(1.18); }
  100% { opacity: 0; transform: translateY(82px) scale(.78, .7); filter: saturate(.7); }
}

@keyframes pack-rip-sheen {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(34px); }
}

@keyframes pack-idle-sheen {
  0%, 62% { opacity: 0; transform: translate3d(0, 0, 0) skewX(-17deg); }
  70% { opacity: .15; }
  86% { opacity: .78; }
  100% { opacity: 0; transform: translate3d(365%, 0, 0) skewX(-17deg); }
}

@keyframes gyatt-pack-warp {
  0% { transform: rotate(0deg) scale(1.05, 1.28); }
  50% { transform: rotate(180deg) scale(1.28, 1.05); }
  100% { transform: rotate(360deg) scale(1.05, 1.28); }
}

@keyframes product-sheen {
  0%, 58% { opacity: 0; transform: translateX(-55%); }
  68% { opacity: .8; }
  88%, 100% { opacity: 0; transform: translateX(58%); }
}

@keyframes slab-glint {
  0%, 64% { transform: translateX(-68%) rotate(4deg); }
  86%, 100% { transform: translateX(68%) rotate(4deg); }
}

@keyframes grade-reveal {
  0% { opacity: .2; transform: perspective(900px) rotateY(-16deg) scale(.82); }
  62% { opacity: 1; transform: perspective(900px) rotateY(3deg) scale(1.05); }
  100% { opacity: 1; transform: perspective(900px) rotateY(0) scale(1); }
}

@keyframes grade-dialog-in {
  from { opacity: 0; transform: translateY(28px) scale(.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes focus-card-in {
  from { opacity: .25; transform: perspective(1000px) translateY(60px) scale(.67) rotate(-2.2deg); }
  65% { opacity: 1; transform: perspective(1000px) translateY(-8px) scale(1.035) rotate(.35deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@media (max-width: 1040px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(820px, calc(100vw - 40px));
  }

  .collection-tools {
    width: min(820px, calc(100vw - 40px));
  }

  .shop-layout {
    grid-template-columns: 1fr;
    width: min(760px, 100%);
  }

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

@media (max-width: 760px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(650px, calc(100vw - 28px));
  }

  .collection-tools {
    width: min(650px, calc(100vw - 28px));
  }

  .focus-overlay {
    padding: 12px;
  }

  .focus-slot {
    width: min(645px, calc(100vw - 24px));
  }

  .collection-tools {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .collection-actions {
    justify-content: space-between;
  }

  .grade-modal {
    align-items: start;
    padding: 12px;
  }

  .grade-dialog {
    grid-template-columns: 1fr;
    gap: 18px;
    width: calc(100vw - 24px);
    padding: 48px 18px 22px;
  }

  .grade-dialog .grade-preview .card {
    width: min(270px, 100%);
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 84px;
    padding: 0 15px;
    align-items: flex-start;
  }

  .app {
    padding: 108px 12px 30px;
  }

  .brand,
  .topbar-actions {
    margin-top: 14px;
  }

  .brand {
    font-size: 13px;
  }

  .view-nav {
    top: auto;
    bottom: 5px;
    gap: 11px;
    transform: translateX(-50%);
  }

  .view-button {
    font-size: 12px;
  }

  .topbar-actions {
    gap: 10px;
  }

  .score-label {
    display: none;
  }

  .cards {
    gap: 12px;
  }

  .card {
    border-radius: 15px;
  }

  .pack {
    width: 252px;
    height: 375px;
  }

  .pack-body {
    height: 375px;
  }

  .pack-top,
  .pack-bottom {
    height: 24px;
  }

  .pack-mark {
    bottom: 62px;
    font-size: 26px;
  }

  .pack-milestones {
    gap: 8px;
    font-size: 12px;
    letter-spacing: .055em;
  }

  .pack-milestones span + span {
    padding-left: 8px;
  }

  .shop-view,
  .help-view {
    width: calc(100vw - 24px);
  }

  .shop-ledger b {
    font-size: 16px;
  }

  .shop-ledger > span {
    padding: 12px 7px;
  }

  .shop-panel {
    padding: 16px;
    border-radius: 20px;
  }

  .grade-workbench {
    grid-template-columns: 1fr;
  }

  .grade-preview {
    min-height: 0;
  }

  .grade-preview .card {
    width: min(255px, 100%);
  }
}

@media (max-width: 420px) {
  .pack-milestones {
    flex-direction: column;
    gap: 3px;
  }

  .pack-milestones span + span {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 500px) {
  .cards {
    grid-template-columns: 1fr;
    width: min(390px, calc(100vw - 24px));
    gap: 18px;
  }

  .collection-tools {
    width: min(390px, calc(100vw - 24px));
  }

  .collection-summary {
    justify-content: space-between;
    gap: 7px;
    font-size: 12px;
  }

  .collection-summary span + span {
    padding-left: 7px;
  }

  .collection-actions {
    gap: 8px;
  }

  .collection-actions button {
    flex: 1;
    padding-inline: 8px;
  }

  .card {
    border-radius: 18px;
  }

  .focus-overlay {
    align-items: start;
    padding: 8px;
  }

  .focus-slot {
    width: calc(100vw - 16px);
  }

  .card.is-focused .model {
    font-size: 16px;
  }

  .results-meta {
    position: sticky;
    z-index: 6;
    top: 90px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--page) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .shop-product {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .product-art {
    width: 66px;
    height: 86px;
  }

  .shop-product button {
    grid-column: 1 / -1;
    grid-template-columns: 1fr auto;
    width: 100%;
    min-width: 0;
  }

  .shop-product button span,
  .shop-product button b {
    align-self: center;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .help-grid article {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
