/* Mazos públicos — listado + detalle */

.page-public-decks {
  --pd-accent: #7dd3fc;
  --pd-surface: #12161e;
  --pd-raised: #1a2030;
  --pd-text: #e8eef5;
  --pd-muted: #8b97a8;
}

/* ========== LISTADO ========== */

.pd-list-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding: 1.75rem 0 1.5rem;
}

.pd-list-hero__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 85% 15%, rgba(125, 211, 252, 0.1), transparent 55%),
    radial-gradient(ellipse 45% 50% at 8% 90%, rgba(26, 32, 48, 0.8), transparent 60%),
    linear-gradient(180deg, #0c1018 0%, #0a0e14 100%);
}

.pd-list-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.pd-list-hero__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pd-accent);
}

.pd-list-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.65rem, 3.2vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--pd-text);
}

.pd-list-hero__lead {
  margin: 0;
  max-width: 42ch;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--pd-muted);
}

.pd-list-hero__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.pd-list-hero__count {
  margin: 0;
  font-size: 0.88rem;
  color: var(--pd-muted);
}

.pd-list-hero__count strong {
  color: var(--pd-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pd-sort {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: var(--pd-surface);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
}

.pd-sort__btn {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 0.7rem;
  border-radius: 6px;
  font: 650 0.78rem/1 Inter, system-ui, sans-serif;
  color: var(--pd-muted);
  text-decoration: none;
}

.pd-sort__btn.is-active {
  background: var(--pd-accent);
  color: #0a0e14;
}

.pd-list-section {
  padding-top: 1.5rem;
  padding-bottom: 3.5rem;
}

.pd-list-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

@media (min-width: 960px) {
  .pd-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
}

.pd-list-item {
  min-width: 0;
}

.pd-deck-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: var(--pd-surface);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.pd-deck-card:hover {
  border-color: rgba(125, 211, 252, 0.35);
  background: #151a24;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.pd-deck-card__link {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  padding: 0.9rem 0.95rem 0.55rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.pd-deck-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.pd-deck-card__fan {
  position: relative;
  width: 64px;
  height: 48px;
  flex-shrink: 0;
}

.pd-deck-card__card {
  position: absolute;
  width: 34px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.85);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  background: #1a2030;
  transition: transform 0.18s ease;
}

.pd-deck-card__card:nth-child(1) {
  left: 0;
  top: 4px;
  z-index: 1;
  transform: rotate(-8deg);
}

.pd-deck-card__card:nth-child(2) {
  left: 14px;
  top: 0;
  z-index: 2;
  transform: rotate(0deg);
}

.pd-deck-card__card:nth-child(3) {
  left: 28px;
  top: 4px;
  z-index: 3;
  transform: rotate(8deg);
}

.pd-deck-card:hover .pd-deck-card__card:nth-child(1) {
  transform: rotate(-11deg) translate(-1px, -1px);
}

.pd-deck-card:hover .pd-deck-card__card:nth-child(2) {
  transform: translateY(-2px);
}

.pd-deck-card:hover .pd-deck-card__card:nth-child(3) {
  transform: rotate(11deg) translate(1px, -1px);
}

.pd-deck-card__fan-empty {
  display: block;
  width: 34px;
  height: 48px;
  border-radius: 4px;
  background: #1a2030;
  border: 1px dashed rgba(148, 163, 184, 0.25);
}

.pd-deck-card__spark {
  position: relative;
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.pd-deck-card__spark-hole {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--pd-surface);
}

.pd-deck-card:hover .pd-deck-card__spark-hole {
  background: #151a24;
}

.pd-deck-card__name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--pd-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.pd-deck-card__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  font-size: 0.76rem;
  color: var(--pd-muted);
}

.pd-deck-card__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--pd-text);
  font-weight: 600;
}

.pd-deck-card__rating strong {
  font-variant-numeric: tabular-nums;
}

.pd-deck-card__muted {
  color: var(--pd-muted);
  font-weight: 500;
}

.pd-deck-card__dot {
  opacity: 0.45;
}

.pd-deck-card__author {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0.55rem 0.95rem 0.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-decoration: none;
  font-size: 0.76rem;
  color: var(--pd-muted);
  min-width: 0;
}

.pd-deck-card__author:hover {
  color: var(--pd-accent);
}

.pd-deck-card__author-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 8.5rem;
}

.pd-deck-card__author .user-avatar-wrap--sm {
  flex-shrink: 0;
}

.pd-deck-card__author .user-avatar--sm {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(125, 211, 252, 0.2);
  object-fit: cover;
}

.pd-deck-card__author .user-avatar-gender {
  display: none;
}

.pd-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 2rem;
}

.pd-pagination__btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #12161e;
  color: var(--pd-text);
  font: 600 0.85rem/1 Inter, system-ui, sans-serif;
  text-decoration: none;
}

.pd-pagination__btn:hover {
  border-color: rgba(125, 211, 252, 0.45);
  color: var(--pd-accent);
}

.pd-pagination__btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.pd-pagination__status {
  color: var(--pd-muted);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.pd-empty {
  text-align: center;
  padding: 4rem 1.25rem;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(18, 22, 30, 0.55);
}

.pd-empty__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pd-text);
}

.pd-empty__text {
  margin: 0 0 1.25rem;
  color: var(--pd-muted);
}

@media (prefers-reduced-motion: reduce) {
  .pd-deck-card,
  .pd-deck-card__card {
    transition: none !important;
  }

  .page-public-decks .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ========== Estrellas ========== */

.pd-stars-inline {
  display: inline-flex;
  gap: 1px;
  letter-spacing: 0;
  line-height: 1;
}

.pd-glyph {
  color: #3a4558;
  font-size: 0.95em;
}

.pd-glyph.is-on {
  color: #fbbf24;
}

.pd-stars {
  display: flex;
  gap: 0.2rem;
}

.pd-star {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: #3a4558;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.15rem;
  margin: 0;
  transition: color 0.12s ease, transform 0.12s ease;
}

.pd-star:hover,
.pd-stars:hover .pd-star.is-active,
.pd-star.is-active {
  color: #fbbf24;
}

.pd-star:hover {
  transform: scale(1.08);
}

.pd-star:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ========== DETALLE ========== */

.pd-detail-hero {
  padding: 1.15rem 0 1.1rem;
  background:
    radial-gradient(ellipse 55% 80% at 0% 0%, rgba(125, 211, 252, 0.09), transparent 55%),
    linear-gradient(180deg, #0d1219 0%, #0a0e14 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.pd-detail-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pd-back {
  align-self: flex-start;
  color: #8b97a8;
  text-decoration: none;
  font-size: 0.82rem;
}

.pd-back:hover {
  color: #7dd3fc;
}

.pd-detail-hero__panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 280px);
  gap: 1.25rem 1.75rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background:
    linear-gradient(135deg, rgba(125, 211, 252, 0.04), transparent 40%),
    #12161e;
}

.pd-detail-hero__panel:not(:has(.pd-detail-hero__aside)) {
  grid-template-columns: auto minmax(0, 1fr);
}

.pd-detail-hero__fan {
  position: relative;
  width: 168px;
  height: 118px;
  flex-shrink: 0;
}

.pd-detail-hero__card {
  position: absolute;
  width: 72px;
  height: 102px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.85);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  top: 6px;
  transition: transform 0.18s ease;
}

.pd-detail-hero__card:nth-child(1) { left: 0; transform: rotate(-12deg); z-index: 1; }
.pd-detail-hero__card:nth-child(2) { left: 22px; transform: rotate(-6deg); z-index: 2; }
.pd-detail-hero__card:nth-child(3) { left: 44px; transform: rotate(0deg); z-index: 3; }
.pd-detail-hero__card:nth-child(4) { left: 66px; transform: rotate(6deg); z-index: 2; }
.pd-detail-hero__card:nth-child(5) { left: 88px; transform: rotate(12deg); z-index: 1; }

.pd-detail-hero__fan:hover .pd-detail-hero__card:nth-child(1) { transform: rotate(-16deg) translateY(-2px); }
.pd-detail-hero__fan:hover .pd-detail-hero__card:nth-child(2) { transform: rotate(-8deg) translateY(-4px); }
.pd-detail-hero__fan:hover .pd-detail-hero__card:nth-child(3) { transform: rotate(0deg) translateY(-6px); }
.pd-detail-hero__fan:hover .pd-detail-hero__card:nth-child(4) { transform: rotate(8deg) translateY(-4px); }
.pd-detail-hero__fan:hover .pd-detail-hero__card:nth-child(5) { transform: rotate(16deg) translateY(-2px); }

.pd-detail-hero__card--gold {
  box-shadow: 0 8px 20px rgba(240, 192, 64, 0.22);
}

.pd-detail-hero__info {
  min-width: 0;
}

.pd-detail-hero__info h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: #e8eef5;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.pd-detail-hero__preview-badge {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.45rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.1);
  color: #7dd3fc;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pd-detail-hero__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0.7rem;
}

.pd-author__label {
  color: #8b97a8;
  font-size: 0.82rem;
}

.pd-author__name {
  color: #e8eef5;
  font-weight: 650;
  text-decoration: none;
  font-size: 0.92rem;
}

a.pd-author__name:hover {
  color: #7dd3fc;
}

.pd-author__avatar-link {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 50%;
  line-height: 0;
}

.pd-author__avatar-link:hover {
  outline: 2px solid rgba(125, 211, 252, 0.45);
  outline-offset: 2px;
}

.pd-detail-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.9rem;
}

.pd-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 20, 0.55);
  color: #e8eef5;
  font-size: 0.75rem;
  font-weight: 600;
}

.pd-chip--gold {
  color: #f0c040;
  border-color: rgba(240, 192, 64, 0.28);
  background: rgba(240, 192, 64, 0.08);
}

.pd-chip--muted {
  color: #8b97a8;
  font-weight: 500;
}

.pd-chip--rating strong {
  font-variant-numeric: tabular-nums;
}

.pd-author__friend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  margin-left: 0.2rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(148, 163, 184, 0.22);
  max-width: 100%;
}

.pd-detail-hero .pd-author__friend .btn {
  padding: 0.18rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.25;
}

.pd-detail-hero .pd-author__friend .btn-primary {
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(125, 211, 252, 0.3);
}

.pd-detail-hero .pd-author__friend .btn-primary:hover {
  background: rgba(125, 211, 252, 0.2);
  color: #e8eef5;
}

.pd-detail-hero .pd-author__friend .btn-outline {
  background: transparent;
  color: #8b97a8;
  border-color: rgba(148, 163, 184, 0.22);
}

.pd-detail-hero .pd-author__friend .btn-outline:hover {
  color: #e8eef5;
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(26, 32, 48, 0.6);
}

.pd-author__friend-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  background: rgba(26, 32, 48, 0.55);
  color: #7dd3fc;
  font-size: 0.68rem;
  font-weight: 600;
}

.pd-author__friend-msg {
  margin: 0;
  width: 100%;
  font-size: 0.72rem;
  color: #8b97a8;
}

.pd-author__friend-msg.is-error {
  color: #fca5a5;
}

.pd-detail-hero__aside {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  align-self: stretch;
}

.pd-detail-hero__aside .pd-star {
  font-size: 1.45rem;
  padding: 0.05rem;
}

.pd-detail-hero__aside .pd-stars {
  gap: 0.05rem;
}

.pd-rate-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  height: 100%;
  background: rgba(10, 14, 20, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0;
  max-width: none;
}

.pd-rate-box__avg,
.pd-rate-box__vote {
  min-width: 0;
}

.pd-stat__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b97a8;
  margin-bottom: 0.25rem;
}

.pd-stat__value {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  color: #e8eef5;
  font-size: 0.92rem;
}

.pd-stat__muted {
  color: #8b97a8;
  font-size: 0.8rem;
  font-weight: 400;
}

.pd-rate__hint,
.pd-rate__login {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  color: #8b97a8;
}

.pd-rate__login a {
  color: #7dd3fc;
}

.pd-detail-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0;
  padding-top: 0.1rem;
}

.pd-detail-hero__actions .btn {
  flex: 0 1 auto;
  min-width: 5.5rem;
}

.pd-share-feedback {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #7dd3fc;
}

.pd-dot {
  opacity: 0.5;
}

@media (max-width: 960px) {
  .pd-detail-hero__panel {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pd-detail-hero__aside {
    grid-column: 1 / -1;
  }

  .pd-rate-box {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    height: auto;
  }
}

@media (max-width: 640px) {
  .pd-detail-hero__panel {
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }

  .pd-detail-hero__fan {
    width: 100%;
    height: 110px;
    margin: 0 auto;
    max-width: 168px;
  }

  .pd-rate-box {
    flex-direction: column;
  }
}

/* —— Modal compartir mazo —— */
#mythSharePreview {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#mythSharePreview .msp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  animation: msp-fade 0.28s ease forwards;
}

#mythSharePreview .msp-card {
  position: relative;
  z-index: 1;
  width: min(380px, 94vw);
  max-height: min(94vh, 900px);
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.75rem 0.7rem;
  border-radius: 14px;
  background:
    linear-gradient(165deg, rgba(26, 32, 48, 0.96), rgba(12, 16, 24, 0.98));
  border: 1px solid rgba(125, 211, 252, 0.14);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  animation: msp-rise 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.04s forwards;
}

#mythSharePreview .msp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

#mythSharePreview .msp-kicker {
  margin: 0;
  font: 700 0.68rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dd3fc;
}

#mythSharePreview .msp-close {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b97a8;
  font: 500 1.35rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

#mythSharePreview .msp-close:hover {
  background: rgba(26, 32, 48, 0.9);
  color: #e8eef5;
}

#mythSharePreview .msp-preview {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.12);
  background: #0a0e14;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

#mythSharePreview .msp-img {
  display: block;
  width: 100%;
  max-height: min(72vh, 640px);
  object-fit: contain;
  background: #0a0e14;
  vertical-align: middle;
}

#mythSharePreview .msp-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

#mythSharePreview .msp-btn {
  appearance: none;
  border: 1px solid rgba(125, 211, 252, 0.14);
  background: #1a2030;
  color: #e8eef5;
  border-radius: 9px;
  min-height: 2.55rem;
  padding: 0 0.85rem;
  font: 600 0.84rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

#mythSharePreview .msp-btn:hover {
  border-color: rgba(125, 211, 252, 0.32);
  background: #222a3c;
}

#mythSharePreview .msp-btn:active {
  transform: translateY(1px);
}

#mythSharePreview .msp-btn--primary {
  grid-column: 1 / -1;
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(125, 211, 252, 0.1);
  color: #7dd3fc;
}

#mythSharePreview .msp-btn--primary:hover {
  background: rgba(125, 211, 252, 0.16);
  border-color: rgba(125, 211, 252, 0.55);
}

@keyframes msp-fade {
  to { opacity: 1; }
}

@keyframes msp-rise {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  #mythSharePreview .msp-backdrop,
  #mythSharePreview .msp-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.pd-detail-cards-section {
  padding-top: 1.35rem;
  padding-bottom: 0.35rem;
}

.pd-cards-head {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.pd-cards-head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #e8eef5;
}

.pd-cards-head__count {
  font-size: 0.8rem;
  color: #7dd3fc;
  background: #1a2030;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}

.pd-mini-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.55rem;
}

.pd-mini__link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-decoration: none;
  color: inherit;
  border-radius: 7px;
  padding: 0.28rem;
  transition: background 0.12s ease;
}

.pd-mini__link:hover {
  background: #12161e;
}

.pd-mini__img-wrap {
  position: relative;
  display: block;
  border-radius: 5px;
  overflow: hidden;
  background: #1a2030;
  aspect-ratio: 100 / 142;
}

.pd-mini__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-mini__qty {
  position: absolute;
  right: 3px;
  bottom: 3px;
  background: rgba(10, 14, 20, 0.9);
  color: #7dd3fc;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.08rem 0.3rem;
  border-radius: 3px;
  line-height: 1.2;
}

.pd-mini__id {
  font-size: 0.62rem;
  color: #8b97a8;
  letter-spacing: 0.03em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-mini__name {
  font-size: 0.72rem;
  color: #e8eef5;
  font-weight: 500;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pd-cards-note {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: #8b97a8;
}

.pd-detail-hero__gold-hint {
  color: #f0c040;
  font-size: 0.9rem;
}

/* Tablero unificado + filtros por tipo */
.pd-card-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.pd-card-filter {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #12161e;
  color: #8b97a8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pd-card-filter span {
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.pd-card-filter:hover {
  color: #e8eef5;
  border-color: rgba(125, 211, 252, 0.3);
}

.pd-card-filter.is-active {
  color: #0a0e14;
  background: #7dd3fc;
  border-color: #7dd3fc;
}

.pd-card-filter.is-active span {
  background: rgba(10, 14, 20, 0.18);
  color: #0a0e14;
}

.pd-card-filter--aliado.is-active { background: #7dd3fc; border-color: #7dd3fc; }
.pd-card-filter--talisman.is-active { background: #67e8f9; border-color: #67e8f9; }
.pd-card-filter--arma.is-active { background: #94a3b8; border-color: #94a3b8; }
.pd-card-filter--totem.is-active { background: #38bdf8; border-color: #38bdf8; }
.pd-card-filter--oro.is-active { background: #f0c040; border-color: #f0c040; }

.pd-cards-board {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #12161e;
  padding: 0.75rem;
}

.pd-cards-board .pd-mini-grid {
  gap: 0.5rem;
}

.pd-mini[hidden] {
  display: none !important;
}

.pd-mini .pd-mini__link:hover {
  background: rgba(10, 14, 20, 0.55);
}

.pd-cards-empty-filter {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: #8b97a8;
}

.pd-mini__link--static {
  cursor: default;
}

.pd-mini--gold .pd-mini__name {
  color: #f0c040;
}

/* —— Estadísticas del mazo (gráficos CSS) —— */
.pd-deck-stats-section {
  padding-top: 0.75rem;
  padding-bottom: 2rem;
}

.pd-deck-stats {
  padding: 1.25rem 1.35rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: #12161e;
}

.pd-deck-stats__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.pd-deck-stats__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.pd-deck-stats__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e8eef5;
}

.pd-deck-stats__empty-note {
  margin: 0;
  font-size: 0.85rem;
  color: #8b97a8;
}

.pd-deck-stats__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.pd-deck-stats__chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #0a0e14;
}

.pd-deck-stats__chip--ring {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.pd-deck-stats__chip-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.pd-deck-stats__chip-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8b97a8;
}

.pd-deck-stats__chip strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e8eef5;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.pd-deck-stats__chip-hint {
  font-size: 0.7rem;
  color: #8b97a8;
  line-height: 1.3;
}

.pd-ring {
  --ring: 0;
  position: relative;
  width: 3.1rem;
  height: 3.1rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(#7dd3fc calc(var(--ring) * 1%), #1a2030 0);
}

.pd-ring::after {
  content: '';
  position: absolute;
  inset: 0.38rem;
  border-radius: 50%;
  background: #0a0e14;
}

.pd-ring__value {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #e8eef5;
  font-variant-numeric: tabular-nums;
}

.pd-deck-stats__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}

.pd-deck-stats__panel {
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 14, 20, 0.45);
}

.pd-deck-stats__panel h3 {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e8eef5;
}

/* Columnas verticales (curva de coste) */
.pd-cols {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: end;
  min-height: 8.5rem;
  padding-top: 0.25rem;
}

.pd-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}

.pd-col__count {
  font-size: 0.68rem;
  font-weight: 600;
  color: #8b97a8;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pd-col__bar-wrap {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 6.25rem;
  padding: 0 0.15rem;
}

.pd-col__bar {
  display: block;
  width: 100%;
  min-height: 0;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #a5f3fc 0%, #7dd3fc 55%, #38bdf8 100%);
  transition: height 0.25s ease;
}

.pd-col__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e8eef5;
  font-variant-numeric: tabular-nums;
}

.pd-col--avg {
  position: relative;
  margin-left: 0.15rem;
  padding-left: 0.35rem;
  border-left: 1px dashed rgba(240, 192, 64, 0.35);
}

.pd-col--avg .pd-col__count {
  color: #f0c040;
  font-weight: 700;
}

.pd-col--avg .pd-col__bar {
  background: linear-gradient(180deg, #fde68a 0%, #f0c040 55%, #d4a017 100%);
}

.pd-col--avg .pd-col__label {
  color: #f0c040;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

/* Donuts */
.pd-donut-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.pd-donut {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  flex-shrink: 0;
  border-radius: 50%;
}

.pd-donut--sm {
  width: 6.25rem;
  height: 6.25rem;
}

.pd-donut__hole {
  position: absolute;
  inset: 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  border-radius: 50%;
  background: #0a0e14;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.pd-donut--sm .pd-donut__hole {
  inset: 1.15rem;
}

.pd-donut__hole strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8eef5;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.pd-donut__hole span {
  font-size: 0.65rem;
  color: #8b97a8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pd-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
  flex: 1;
  overflow: visible;
}

.pd-legend li {
  display: grid;
  grid-template-columns: 0.55rem minmax(0, 1fr) 1.5rem 2.6rem;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
}

.pd-legend__swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
}

.pd-legend__label {
  font-size: 0.78rem;
  color: #8b97a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-legend__count,
.pd-legend__share {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e8eef5;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pd-legend__share {
  color: #8b97a8;
  font-weight: 500;
}

/* Barras horizontales (ediciones) */
.pd-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
  overflow: visible;
}

.pd-bar {
  display: grid;
  grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 1.5rem 2.6rem;
  gap: 0.4rem;
  align-items: center;
  min-width: 0;
}

.pd-bar__label {
  font-size: 0.78rem;
  color: #8b97a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-bar__track {
  display: block;
  height: 0.5rem;
  border-radius: 999px;
  background: #1a2030;
  overflow: hidden;
}

.pd-bar__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #7dd3fc);
  min-width: 0;
}

.pd-bar__count,
.pd-bar__share {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e8eef5;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.pd-bar__share {
  color: #8b97a8;
  font-weight: 500;
}

.pd-bars__empty {
  margin: 0;
  font-size: 0.82rem;
  color: #8b97a8;
}

@media (max-width: 900px) {
  .pd-deck-stats__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pd-deck-stats__chip--ring {
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  .pd-deck-stats__grid {
    grid-template-columns: 1fr;
  }

  .pd-bar {
    grid-template-columns: minmax(0, 5.5rem) minmax(0, 1fr) 1.35rem 2.2rem;
  }
}

@media (max-width: 480px) {
  .pd-donut-row {
    flex-direction: column;
    align-items: stretch;
  }

  .pd-donut,
  .pd-donut--sm {
    margin: 0 auto;
  }
}

.pd-empty-inline {
  color: #8b97a8;
  padding: 1rem 0;
}

.pd-comments-section {
  padding-top: 0.5rem;
  padding-bottom: 3rem;
}

.pd-comments {
  margin-top: 0;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

@media (prefers-reduced-motion: reduce) {
  .pd-list-hero__glow--a,
  .pd-list-hero__glow--b,
  .pd-deck,
  .pd-deck__card,
  .pd-deck__cta {
    animation: none !important;
    transition: none !important;
  }

  .pd-deck:hover {
    transform: none;
  }

  .pd-deck:hover .pd-deck__card:nth-child(1),
  .pd-deck:hover .pd-deck__card:nth-child(2),
  .pd-deck:hover .pd-deck__card:nth-child(3),
  .pd-deck:hover .pd-deck__card:nth-child(4),
  .pd-deck:hover .pd-deck__card:nth-child(5) {
    transform: none;
  }
}
