/* Card album — multi-album set browser */

.album-shell {
  --page-max: 1120px;
}

.album-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.album-tab {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(18, 8, 32, 0.45);
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), background 180ms var(--ease);
}

.album-tab:hover,
.album-tab:focus-visible {
  border-color: rgba(240, 211, 106, 0.45);
  transform: translateY(-2px);
  outline: none;
}

.album-tab.is-active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(240, 211, 106, 0.14), rgba(42, 24, 72, 0.72));
  box-shadow: 0 10px 24px rgba(8, 2, 20, 0.35);
}

.album-tab__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.album-tab__current {
  display: inline-flex;
  align-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1020;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.album-tab__dates {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.album-tab__counts {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.album-tab.is-active .album-tab__counts {
  color: var(--ink);
}

.album-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin: 22px 0 0;
  padding: 0;
}

.album-stats > div {
  min-width: 4.5rem;
}

.album-stats dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.album-stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--gold);
}

.album-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.album-crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.album-crumbs a:hover {
  color: var(--gold);
}

.album-crumbs [aria-current="page"] {
  color: var(--ink);
}

.album-crumbs .crumb-sep {
  opacity: 0.45;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
}

.section-head p:not(.page-kicker) {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
}

.album-status {
  margin: 0;
  color: var(--muted);
  grid-column: 1 / -1;
}

.album-status.is-error {
  color: var(--danger);
}

.set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 16px;
}

.set-tile {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 12px 10px 14px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}

.set-tile:hover,
.set-tile:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(240, 211, 106, 0.45);
  background: rgba(42, 24, 72, 0.45);
  color: var(--gold);
  outline: none;
}

.set-tile__cover {
  width: min(148px, 100%);
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(8, 2, 20, 0.42);
  background:
    radial-gradient(circle at 30% 20%, rgba(246, 214, 120, 0.22), transparent 55%),
    #1a0f2e;
}

.set-tile__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms var(--ease);
}

.set-tile:hover .set-tile__cover img,
.set-tile:focus-visible .set-tile__cover img {
  transform: scale(1.04);
}

.set-tile strong {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

/* Sample C — framed tray around the set plaque + 3×3 board. */
.set-tray {
  padding: 18px 16px 22px;
  border: 1px solid rgba(240, 211, 106, 0.35);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(240, 211, 106, 0.08), transparent 40%),
    rgba(22, 10, 38, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 40px rgba(0, 0, 0, 0.35);
}

.pack-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 14px;
  align-items: center;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(240, 211, 106, 0.18);
  border-radius: 16px;
  background: rgba(8, 2, 20, 0.45);
}

.pack-cover {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 18px rgba(8, 2, 20, 0.45);
  justify-self: start;
}

.pack-copy h2 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  letter-spacing: -0.02em;
}

.pack-copy .page-kicker {
  margin: 0;
}

.pack-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .pack-header {
    grid-template-columns: auto 1fr;
  }

  .pack-steps {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.card-grid {
  --card-width: min(150px, 28vw);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, calc(var(--card-width) * 3 + 24px));
  margin: 0 auto;
  justify-items: center;
}

@media (min-width: 720px) {
  .card-grid {
    --card-width: 188px;
    gap: 16px;
    width: min(100%, calc(var(--card-width) * 3 + 32px));
  }
}

@media (min-width: 980px) {
  .card-grid {
    --card-width: 210px;
    gap: 18px;
    width: min(100%, calc(var(--card-width) * 3 + 36px));
  }
}

.trading-card {
  appearance: none;
  display: grid;
  gap: 0;
  width: 100%;
  max-width: var(--card-width);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  border-radius: 14px;
  overflow: visible;
  transition: transform 180ms var(--ease);
}

.trading-card:hover,
.trading-card:focus-visible {
  transform: translateY(-5px) rotate(-0.4deg);
  outline: none;
}

.trading-card__art {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 16px 28px rgba(8, 2, 20, 0.48);
  background: transparent;
}

.trading-card__art > img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  display: block;
}

/* Name sits in the empty ribbon banner. */
.trading-card__name {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 11%;
  margin: 0;
  color: #fff;
  font-size: clamp(8px, calc(var(--card-width) * 0.06), 24px);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-text-stroke: max(1px, calc(var(--card-width) * 0.009)) #26313d;
  paint-order: stroke fill;
  pointer-events: none;
}

/* Number centered in the white/gold outer frame strip. */
.trading-card__number {
  position: absolute;
  left: 50%;
  bottom: calc(3.35% - 2px);
  margin: 0;
  transform: translateX(-50%);
  color: #8b9199;
  font-size: clamp(9px, calc(var(--card-width) * 0.056), 18px);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Rating stars: top-center, flush with the top edge, nearly touching. */
.trading-card__stars {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: calc(var(--card-width) * -0.045 - 3px);
  pointer-events: none;
  z-index: 1;
}

.trading-card__stars img {
  width: clamp(20px, calc(var(--card-width) * 0.155), 46px);
  height: auto;
  flex: none;
}

.album-source {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 62ch;
}

.album-source a {
  font-weight: 600;
}

.card-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #140a24;
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.card-dialog::backdrop {
  background: rgba(8, 2, 20, 0.72);
  backdrop-filter: blur(4px);
}

.card-dialog__chrome {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px 0;
}

.card-dialog__figure {
  margin: 0;
  padding: 8px 18px 22px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.card-dialog__art {
  width: min(320px, 100%);
  --card-width: 320px;
  border-radius: 14px;
}

.card-dialog__art > img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

.card-dialog__figure figcaption {
  display: grid;
  gap: 4px;
  text-align: center;
  justify-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-dialog__figure strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.card-dialog__step {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(26, 15, 46, 0.9);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.card-dialog__step:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.card-dialog__step--prev { left: 8px; }
.card-dialog__step--next { right: 8px; }

.card-dialog {
  position: fixed;
}

@media (max-width: 560px) {
  .card-dialog__step {
    top: auto;
    bottom: 18px;
    transform: none;
  }
}
