/* Carpeta digital / sobres — portal Myths */

.page-binder,
.page-binder * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.page-binder select,
.page-binder input,
.page-binder textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* Pantalla dedicada: carpeta 60% / inventario 40% (sin chrome del portal) */
.page-binder:not(.page-binder-public) .site-header,
.page-binder:not(.page-binder-public) .site-footer,
.page-binder:not(.page-binder-public) .site-status-board {
  display: none !important;
}

.page-binder main {
  padding: 0;
  margin: 0;
}

.bd-workspace {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 35% 45%, rgba(125, 211, 252, 0.05), transparent 60%),
    var(--bg-base);
}

.bd-workspace--readonly .bd-main {
  grid-template-columns: 1fr;
}

.bd-workspace--readonly .bd-stage {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.bd-workspace--readonly .bd-binder {
  width: min(90%, 680px);
}

/* Vista pública: header del portal + barra de contexto */
.page-binder-public {
  overflow: hidden;
}

.page-binder-public main {
  padding-top: var(--header-height, 64px);
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-binder-public.has-status-board main {
  padding-top: calc(var(--header-height, 64px) + var(--status-board-height, 0px));
}

.bd-public-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--color-border);
  background: #0c1018;
}

.bd-public-bar__back {
  color: #e8eef5;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.bd-public-bar__back:hover {
  color: #7dd3fc;
}

.bd-public-bar__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.bd-public-bar__sep {
  opacity: 0.5;
}

.bd-public-bar__edit {
  font-size: 0.78rem;
  color: #7dd3fc;
  text-decoration: none;
}

.bd-public-bar__edit:hover {
  text-decoration: underline;
}

.page-binder-public .bd-workspace {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
}

/* Wallet suelto (página carpeta standalone); en lobby se mueve a la barra lateral */
.bd-workspace > .bd-wallet-chip {
  position: absolute;
  top: 0.65rem;
  left: 0.75rem;
  z-index: 30;
}

.bd-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem 0.25rem 0.35rem;
  border-radius: 10px;
  background: #12161e;
  border: 1px solid #1a2030;
}

.bd-wallet-chip strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  color: #e8eef5;
  min-width: 1.25rem;
  line-height: 1;
}

.bd-wallet-chip strong.is-pulse {
  animation: bdCoinPulse 0.5s ease;
}

.bd-wallet-chip strong.is-spend {
  animation: bdCoinSpend 0.5s ease;
}

.bd-wallet-chip.is-pulse .bd-coin--wallet {
  animation: bdCoinIconPop 0.55s ease;
}

.bd-wallet-chip.is-gain .bd-coin--wallet {
  animation: bdCoinIconGain 0.65s ease;
}

.bd-wallet-chip.is-spend .bd-coin--wallet {
  animation: bdCoinIconSpend 0.55s ease;
}

.bd-coin--wallet {
  width: 1.55rem;
  height: 1.55rem;
  vertical-align: middle;
}

.bd-main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); /* 60% / 40% */
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.bd-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0.75rem 1rem 0.85rem;
  box-sizing: border-box;
}

.bd-binder {
  position: relative;
  width: 90%;
  max-width: min(90%, 738px);
  max-height: calc(100% - 3.25rem);
  min-width: 0;
  min-height: 0;
  flex: 0 1 auto;
}

/* Paginador bajo la carpeta */
.bd-pager {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  padding: 0.3rem;
  border-radius: 12px;
  background: #12161e;
  border: 1px solid #1a2030;
}

/* Botón flotante + lightbox de portadas */
.bd-cover-btn {
  display: none;
  position: fixed;
  top: 0.85rem;
  left: calc(var(--lb-rail, 13.25rem) + 0.85rem);
  z-index: 60;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.4rem 0.65rem 0.4rem 0.5rem;
  border: none;
  border-radius: 10px;
  background: rgba(12, 16, 24, 0.72);
  color: rgba(200, 208, 219, 0.88);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.bd-cover-btn.is-visible {
  display: inline-flex;
}

.bd-page-theme-btn.is-visible {
  top: 3.35rem;
}

.bd-cover-btn:hover {
  background: rgba(18, 24, 34, 0.88);
  color: #e8eef5;
}

.bd-cover-btn i {
  font-size: 1rem;
  color: rgba(125, 211, 252, 0.85);
}

.bd-cover-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.bd-cover-overlay[hidden] {
  display: none !important;
}

.bd-cover-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 14, 0.72);
  border: none;
}

.bd-cover-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  max-height: min(34rem, calc(100dvh - 2.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.1rem 1.15rem 1.2rem;
  border: none;
  border-radius: 16px;
  background: #12161e;
  box-shadow: none;
  overflow: hidden;
}

.bd-cover-overlay__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bd-cover-overlay__kicker {
  margin: 0 0 0.2rem;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.9);
}

.bd-cover-overlay__head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #e8eef5;
}

.bd-cover-overlay__close {
  appearance: none;
  margin: 0;
  padding: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #8b97a8;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.bd-cover-overlay__close:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #e8eef5;
}

.bd-cover-overlay__sub {
  margin: 0;
  font-size: 0.82rem;
  color: #8b97a8;
}

.bd-cover-overlay__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.65rem;
  overflow: auto;
  min-height: 0;
  padding: 0.1rem 0.05rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 211, 252, 0.28) transparent;
}

.bd-cover-opt {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  margin: 0;
  padding: 0.45rem;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  transition: background 0.15s ease;
}

.bd-cover-opt:hover {
  background: rgba(255, 255, 255, 0.055);
}

.bd-cover-opt.is-active {
  background: rgba(125, 211, 252, 0.1);
}

.bd-cover-opt img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.bd-cover-opt span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #c8d0db;
  line-height: 1.25;
}

.bd-cover-opt.is-active span {
  color: #7dd3fc;
}

.bd-cover-opt em {
  font-style: normal;
  font-size: 0.68rem;
  color: #8b97a8;
}

.bd-cover-opt.is-active em {
  color: rgba(125, 211, 252, 0.85);
}

.bd-page-theme-swatch {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.06), transparent 45%),
    linear-gradient(180deg, var(--swatch-top, #171c27), var(--swatch-bot, #10151d));
}

.bd-catalog-card__art--theme {
  aspect-ratio: 3 / 4;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.bd-catalog-card__theme-swatch {
  display: block;
  width: 72%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(180deg, var(--swatch-top, #171c27), var(--swatch-bot, #10151d));
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

/* —— Confirmación de compra (tienda) —— */
.bd-buy-confirm {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.bd-buy-confirm[hidden] {
  display: none !important;
}

.bd-buy-confirm.is-open {
  opacity: 1;
  pointer-events: auto;
}

.bd-buy-confirm__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(5, 8, 12, 0.62);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.bd-buy-confirm.is-open .bd-buy-confirm__backdrop {
  opacity: 1;
}

.bd-buy-confirm__panel {
  position: relative;
  z-index: 1;
  width: min(22.5rem, 100%);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.55rem 1.45rem 1.35rem;
  border: none;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(125, 211, 252, 0.1), transparent 55%),
    #12161e;
  box-shadow: none;
  color: #e8eef5;
  text-align: center;
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}

.bd-buy-confirm.is-open .bd-buy-confirm__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.bd-buy-confirm.is-open .bd-buy-confirm__kicker {
  animation: bdBuyKickerIn 0.5s ease both;
  animation-delay: 0.06s;
}

.bd-buy-confirm.is-open .bd-buy-confirm__panel h2 {
  animation: bdBuyFadeUp 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.1s;
}

.bd-buy-confirm.is-open .bd-buy-confirm__detail {
  animation: bdBuyFadeUp 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.16s;
}

.bd-buy-confirm.is-open .bd-buy-confirm__price {
  animation: bdBuyPriceIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.2s;
}

.bd-buy-confirm.is-open .bd-buy-confirm__actions {
  animation: bdBuyFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 0.26s;
}

.bd-buy-confirm__kicker {
  margin: 0;
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.85);
}

.bd-buy-confirm__panel h2 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #e8eef5;
}

.bd-buy-confirm__detail {
  margin: 0.1rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #8b97a8;
}

.bd-buy-confirm__detail[hidden] {
  display: none !important;
}

.bd-buy-confirm__price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  align-self: center;
  margin: 0.55rem 0 0.15rem;
  padding: 0.55rem 0.95rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.bd-buy-confirm__price[hidden] {
  display: none !important;
}

.bd-buy-confirm__price .bd-coin {
  width: 1.15rem;
  height: 1.15rem;
}

.bd-buy-confirm__price strong {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #e8eef5;
  font-variant-numeric: tabular-nums;
}

.bd-buy-confirm__price-label {
  font-size: 0.78rem;
  color: #8b97a8;
}

.bd-buy-confirm__actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.bd-buy-confirm__btn {
  appearance: none;
  flex: 1;
  margin: 0;
  padding: 0.72rem 0.9rem;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.bd-buy-confirm__btn:active {
  transform: scale(0.98);
}

.bd-buy-confirm__btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #c8d0db;
}

.bd-buy-confirm__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #e8eef5;
}

.bd-buy-confirm__btn--primary {
  background: rgba(125, 211, 252, 0.16);
  color: #7dd3fc;
}

.bd-buy-confirm__btn--primary:hover {
  background: rgba(125, 211, 252, 0.24);
  color: #b8e7fc;
}

.bd-buy-confirm__btn:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.45);
  outline-offset: 2px;
}

@keyframes bdBuyFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bdBuyKickerIn {
  from {
    opacity: 0;
    letter-spacing: 0.22em;
  }
  to {
    opacity: 1;
    letter-spacing: 0.1em;
  }
}

@keyframes bdBuyPriceIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-buy-confirm,
  .bd-buy-confirm__backdrop,
  .bd-buy-confirm__panel,
  .bd-buy-confirm__btn {
    transition: none !important;
  }

  .bd-buy-confirm__kicker,
  .bd-buy-confirm__panel h2,
  .bd-buy-confirm__detail,
  .bd-buy-confirm__price,
  .bd-buy-confirm__actions {
    animation: none !important;
  }

  .bd-buy-confirm__panel {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .bd-cover-btn {
    left: 0.75rem;
    top: 4.1rem;
  }

  .bd-page-theme-btn.is-visible {
    top: 6.55rem;
  }
}

.bd-pager__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  margin: 0;
  padding: 0 0.4rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #e8eef5;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.bd-pager__btn:hover:not(:disabled) {
  background: #1a2030;
  color: #7dd3fc;
}

.bd-pager__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bd-pager__select-wrap {
  display: inline-flex;
  margin: 0 0.15rem;
}

.bd-pager__select {
  appearance: none;
  min-width: 7.5rem;
  max-width: 11rem;
  height: 2.1rem;
  padding: 0 1.6rem 0 0.65rem;
  border-radius: 8px;
  border: 1px solid #1a2030;
  background:
    linear-gradient(45deg, transparent 50%, #8b97a8 50%) calc(100% - 14px) / 5px 5px no-repeat,
    linear-gradient(135deg, #8b97a8 50%, transparent 50%) calc(100% - 9px) / 5px 5px no-repeat,
    #0c1018;
  color: #e8eef5;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.bd-pager__select:hover:not(:disabled),
.bd-pager__select:focus {
  border-color: rgba(125, 211, 252, 0.4);
  outline: none;
}

.bd-pager__select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bd-pager__mute {
  margin-left: 0.25rem;
  border-left: 1px solid #1a2030;
  border-radius: 0 8px 8px 0;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8b97a8;
}

.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;
}

.bd-inv-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0.85rem 0.9rem 1rem;
  border-left: 1px solid var(--color-border);
  background: transparent;
  box-sizing: border-box;
}

.bd-inv-col__head {
  flex: 0 0 auto;
}

.bd-inv-col__head h2 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  color: #e8eef5;
}

.bd-inv-col__head p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.bd-inv-col.is-drop-ok {
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.35);
}

/* Cuadrícula fija: celdas 5:7; tamaño --bd-inv-cell lo calcula JS (sin overflow) */
.bd-inv-col .bd-inv {
  --bd-inv-cols: 6;
  --bd-inv-rows: 10;
  --bd-inv-gap: 0.28rem;
  --bd-inv-pad: 0.35rem;
  --bd-inv-cell: 0px;
  --bd-inv-cell-h: 0px;
  display: grid !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: var(--bd-inv-pad);
  gap: var(--bd-inv-gap);
  justify-content: center;
  align-content: center;
  grid-template-columns: repeat(var(--bd-inv-cols), var(--bd-inv-cell));
  grid-template-rows: repeat(var(--bd-inv-rows), var(--bd-inv-cell-h));
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid #1a2030;
  background: #0a0e14;
}

.bd-inv-col .bd-inv > * {
  position: relative;
  min-width: 0 !important;
  min-height: 0 !important;
  width: 100%;
  height: 100% !important;
  padding: 0 !important;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 6px;
}

.bd-inv-col .bd-inv > * > img,
.bd-inv-col .bd-inv > * > .bd-inv-pack__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

.bd-inv-col .bd-inv > * > .bd-inv-pack__art {
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.bd-inv-col .bd-inv > * > .bd-inv-card__marks {
  position: absolute;
  inset: 0.2rem 0.2rem auto 0.2rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.15rem;
  pointer-events: none;
}

.bd-inv-col .bd-inv > * > .bd-inv-card__marks .bd-inv-card__alt {
  position: static;
  margin-left: auto;
}

/* Sobres: badge suelto arriba-derecha */
.bd-inv-col .bd-inv > * > .bd-inv-card__alt {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  z-index: 2;
  margin-left: 0;
}

.bd-inv.is-drop-ok {
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}

.bd-inv-col .bd-sac {
  flex: 0 0 5.6rem;
  width: 5.6rem;
  margin: 0;
}

.bd-trade-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  min-width: 0;
}

.bd-sac {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 0;
  padding: 0.45rem 0.5rem 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  color: #8b97a8;
  cursor: default;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bd-sac__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  min-width: 0;
}

.bd-sac__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b97a8;
}

.bd-sac__count {
  font-size: 0.72rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #c8d0db;
  min-width: 1.1rem;
  text-align: right;
}

.bd-sac__reward {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 1.35rem;
  padding: 0.2rem 0.3rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.bd-sac__reward strong {
  font-size: 0.95rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: #c8d0db;
  line-height: 1;
}

.bd-sac__reward .bd-coin--inline {
  width: 0.95rem;
  height: 0.95rem;
}

.bd-sac__cta {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  min-height: 1rem;
  color: rgba(139, 151, 168, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-sac.has-selection {
  border-color: rgba(252, 211, 77, 0.35);
  background: rgba(252, 211, 77, 0.06);
  color: #f5e6b8;
  cursor: pointer;
}

.bd-sac.has-selection .bd-sac__label,
.bd-sac.has-selection .bd-sac__cta {
  color: #f5e6b8;
}

.bd-sac.has-selection .bd-sac__count,
.bd-sac.has-selection .bd-sac__reward strong {
  color: #fde68a;
}

.bd-sac.has-selection .bd-sac__reward {
  background: rgba(252, 211, 77, 0.1);
}

.bd-sac.has-selection:hover {
  border-color: rgba(252, 211, 77, 0.5);
  background: rgba(252, 211, 77, 0.1);
}

.bd-sac.is-drop-ok {
  border-color: rgba(252, 211, 77, 0.55);
  background: rgba(252, 211, 77, 0.1);
  color: #fcd34d;
}

.bd-sac.is-drop-ok .bd-sac__label,
.bd-sac.is-drop-ok .bd-sac__cta,
.bd-sac.is-drop-ok .bd-sac__count,
.bd-sac.is-drop-ok .bd-sac__reward strong {
  color: #fde68a;
}

.bd-trade-side {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.4rem 0.45rem 0.45rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.bd-trade-side__label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b97a8;
}

.bd-trade-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.28rem;
}

.bd-trade-slot {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.55);
  overflow: hidden;
  min-width: 0;
}

.bd-trade-slot.is-filled {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.14);
  cursor: grab;
}

.bd-trade-slot.is-filled:active {
  cursor: grabbing;
}

.bd-trade-slot[data-drop="trade-offer"].is-drop-ok {
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(125, 211, 252, 0.08);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.12);
}

.bd-trade-slot.is-preview .bd-trade-slot__empty {
  opacity: 0;
}

.bd-trade-slot__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  pointer-events: none;
  opacity: 0.72;
  filter: brightness(1.08);
  z-index: 1;
}

.bd-trade-slot.is-filled.is-preview > img:not(.bd-trade-slot__preview) {
  opacity: 0.25;
}

.bd-trade-slot img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  pointer-events: none;
}

.bd-trade-slot__empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(139, 151, 168, 0.45);
  font-size: 1rem;
  font-weight: 500;
  pointer-events: none;
}

.bd-trade-slot[data-side="want"] {
  cursor: pointer;
}

.bd-trade-slot[data-side="want"]:hover {
  border-color: rgba(125, 211, 252, 0.4);
  background: rgba(125, 211, 252, 0.06);
}

.bd-trade-slot.is-dragging-source {
  opacity: 0.35;
}

.bd-trade-slot.is-dragging-source img {
  opacity: 0.5;
}

/* Modal buscar Necesito — minimalista sin bordes */
.bd-trade-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.bd-trade-modal__back {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 12, 0.68);
}

.bd-trade-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 400px);
  max-height: min(86vh, 540px);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.15rem 1.1rem 1rem;
  border: 0;
  border-radius: 0;
  background: #12161e;
  box-shadow: none;
}

.bd-trade-modal__dialog h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8b97a8;
}

.bd-trade-modal__search {
  position: relative;
}

.bd-trade-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.15rem 0.55rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #e8eef5;
  font: inherit;
  font-size: 0.95rem;
  outline: none;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.bd-trade-modal__input::placeholder {
  color: #8b97a8;
  opacity: 0.75;
}

.bd-trade-modal__input:focus {
  background: transparent;
  box-shadow: inset 0 -1px 0 rgba(125, 211, 252, 0.45);
}

.bd-trade-modal__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 2;
  max-height: 280px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: #0a0e14;
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 211, 252, 0.35) rgba(255, 255, 255, 0.04);
}

.bd-trade-modal__menu::-webkit-scrollbar {
  width: 8px;
}

.bd-trade-modal__menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0;
}

.bd-trade-modal__menu::-webkit-scrollbar-thumb {
  background: rgba(125, 211, 252, 0.35);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.bd-trade-modal__menu::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 211, 252, 0.5);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.bd-trade-modal__menu[hidden] {
  display: none;
}

.bd-trade-modal__menu button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.35rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bd-trade-modal__menu button:hover,
.bd-trade-modal__menu button:focus-visible,
.bd-trade-modal__menu button.is-active {
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.bd-trade-modal__menu button.is-active .bd-trade-modal__menu-name,
.bd-trade-modal__menu button:hover .bd-trade-modal__menu-name {
  color: #e8eef5;
}

.bd-trade-modal__menu img {
  width: 34px;
  height: 48px;
  object-fit: cover;
  border-radius: 0;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.03);
}

.bd-trade-modal__menu-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.bd-trade-modal__menu-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: #c8d0db;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-trade-modal__menu-ed {
  font-size: 0.68rem;
  color: #8b97a8;
  letter-spacing: 0.02em;
}

.bd-trade-modal__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.bd-trade-modal__actions button {
  appearance: none;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8b97a8;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.bd-trade-modal__actions button:hover {
  color: #7dd3fc;
  background: transparent;
}

.bd-trade-modal__actions .bd-trade-modal__danger {
  margin-right: auto;
  color: #8b97a8;
  background: transparent;
}

.bd-trade-modal__actions .bd-trade-modal__danger:hover {
  color: #fca5a5;
  background: transparent;
}

.bd-inv-slot {
  border-radius: 7px;
  border: 1px dashed rgba(26, 32, 48, 0.95);
  background: rgba(18, 22, 30, 0.55);
  pointer-events: none;
}

.bd-inv-pack {
  cursor: pointer;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  border: 1px solid rgba(125, 211, 252, 0.28);
  background: #0a0e14;
}

.bd-inv-pack:hover {
  border-color: rgba(125, 211, 252, 0.55);
  transform: translateY(-1px);
}

.bd-inv-pack:active {
  cursor: pointer;
}

.bd-inv-pack__art {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  background-color: #12161e;
  background-image: var(--bd-pack-art);
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Compat: rail antiguo (por si queda markup residual) */
.bd-rail {
  display: none;
}

.bd-rail__scroll {
  display: none;
}

.bd-rail__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.bd-stat {
  min-width: 0;
  padding: 0.45rem 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.bd-stat__label {
  display: block;
  font-size: 0.62rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bd-stat__value {
  font-size: 1rem;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.bd-stat__value.is-pulse {
  animation: bdCoinPulse 0.45s ease;
}

@keyframes bdCoinPulse {
  0% { transform: scale(1); color: var(--color-text); }
  40% { transform: scale(1.18); color: #86efac; }
  100% { transform: scale(1); }
}

@keyframes bdCoinIconPop {
  0% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(1.28) rotate(-8deg); }
  70% { transform: scale(0.94) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes bdCoinIconGain {
  0% { transform: scale(1); filter: brightness(1); }
  30% { transform: scale(1.35); filter: brightness(1.35); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes bdCoinIconSpend {
  0% { transform: scale(1); }
  40% { transform: scale(0.82) rotate(12deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Moneda */
.bd-coin {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  background: var(--bd-coin, none) center / contain no-repeat;
  vertical-align: -0.2em;
}

.bd-coin--lg {
  width: 2.55rem;
  height: 2.55rem;
}

.bd-coin--inline {
  width: 1em;
  height: 1em;
  margin: 0 0.1em;
}

.bd-wallet {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.2rem 0.65rem;
  align-items: center;
  padding: 0.7rem 0.75rem;
  background:
    linear-gradient(135deg, rgba(252, 211, 77, 0.08), transparent 55%),
    var(--bg-panel);
  border: 1px solid rgba(252, 211, 77, 0.22);
  border-radius: var(--radius-lg);
}

.bd-wallet .bd-coin--lg {
  grid-row: 1 / span 2;
}

.bd-wallet__main {
  min-width: 0;
}

.bd-wallet__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fcd34d;
}

.bd-wallet__value {
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.bd-wallet__value.is-pulse {
  animation: bdCoinPulse 0.45s ease;
}

.bd-wallet__meta {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.bd-wallet__mute {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: start;
  min-width: 2rem;
}

.bd-value {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.bd-value__btn {
  align-self: flex-start;
}

.bd-value__btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.bd-value__result {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.bd-value__result strong {
  color: var(--color-text);
  font-size: 0.95rem;
}

.bd-value__result.is-error {
  color: #fca5a5;
}

/* Tienda — botón del rail + lightbox */
.bd-shop-launch {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background:
    linear-gradient(120deg, rgba(125, 211, 252, 0.08), transparent 55%),
    var(--bg-panel);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.bd-shop-launch:hover {
  border-color: rgba(125, 211, 252, 0.5);
  background:
    linear-gradient(120deg, rgba(125, 211, 252, 0.12), transparent 55%),
    #121826;
}

.bd-shop-launch:active {
  transform: scale(0.99);
}

.bd-shop-launch__art {
  width: 2.6rem;
  height: 3.4rem;
  flex-shrink: 0;
  border-radius: 5px;
  background:
    var(--bd-pack-art, none) center / contain no-repeat,
    #12161e;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}

.bd-shop-launch__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.bd-shop-launch__text strong {
  font-size: 0.95rem;
  color: var(--color-text);
}

.bd-shop-launch__text span {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.bd-shop-launch__badge {
  flex-shrink: 0;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.1);
}

.bd-shop-launch__badge[hidden] {
  display: none !important;
}

.bd-shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1900;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
}

.bd-shop-overlay[hidden] {
  display: none !important;
}

.bd-shop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 10, 0.82);
  cursor: pointer;
}

.bd-shop-modal {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(94vh, 640px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  background: #0c1018;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
  animation: bdShopIn 0.28s cubic-bezier(0.22, 0.9, 0.36, 1);
}

@keyframes bdShopIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bd-shop__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(10, 14, 20, 0.75);
  color: var(--color-text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.bd-shop__close:hover {
  color: #fff;
  border-color: rgba(125, 211, 252, 0.45);
}

.bd-shop-showcase {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(280px, 1.05fr);
  min-height: 480px;
}

.bd-shop-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 0.75rem 1.25rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(125, 211, 252, 0.1), transparent 70%),
    linear-gradient(165deg, #151c2a 0%, #0a0e14 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.bd-shop-carousel {
  position: relative;
  width: min(240px, 70%);
  aspect-ratio: 2 / 3;
  outline: none;
  cursor: grab;
}

.bd-shop-carousel:active {
  cursor: grabbing;
}

.bd-shop-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateX(28%) scale(0.88);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.bd-shop-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

.bd-shop-slide.is-prev {
  opacity: 0.25;
  transform: translateX(-55%) scale(0.82);
  z-index: 1;
}

.bd-shop-slide.is-next {
  opacity: 0.25;
  transform: translateX(55%) scale(0.82);
  z-index: 1;
}

.bd-shop-slide__art {
  width: 100%;
  height: 100%;
  background: var(--bd-pack-art, none) center / contain no-repeat;
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.65));
  animation: bdShopPackFloat 3.2s ease-in-out infinite;
}

.bd-shop-slide:not(.is-active) .bd-shop-slide__art {
  animation: none;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.4)) brightness(0.65);
}

.bd-shop-slide__shadow {
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: 70%;
  height: 18px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(2px);
  pointer-events: none;
}

.bd-shop-slide.is-active .bd-shop-slide__shadow {
  animation: bdShopShadowPulse 3.2s ease-in-out infinite;
}

.bd-shop-nav {
  position: absolute;
  top: 42%;
  z-index: 4;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 20, 0.7);
  color: #e8eef5;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.bd-shop-nav:hover {
  border-color: rgba(125, 211, 252, 0.45);
  color: #7dd3fc;
}

.bd-shop-nav--prev { left: 0.55rem; }
.bd-shop-nav--next { right: 0.55rem; }

.bd-shop-dots {
  display: flex;
  gap: 0.4rem;
  margin-top: 1rem;
}

.bd-shop-dots button {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

.bd-shop-dots button.is-active {
  background: #7dd3fc;
  transform: scale(1.25);
}

.bd-shop-hint-swipe {
  margin: 0.65rem 0 0;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.bd-shop-selected {
  margin-bottom: 1rem;
}

.bd-shop-selected h3 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.bd-shop-selected p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.bd-shop-selected .bd-edition-count {
  margin-top: 0.35rem;
  font-size: 0.72rem;
}

@keyframes bdShopPackFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes bdShopShadowPulse {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 0.55; transform: translateX(-50%) scaleX(0.88); }
}

.bd-shop-panel {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.5rem 1.35rem;
  background: #10151f;
  overflow: auto;
}

.bd-shop-panel__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  padding-right: 2.5rem;
}

.bd-shop-panel__kicker {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dd3fc;
}

.bd-shop-panel__head h2 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: 0.02em;
}

.bd-shop__wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(252, 211, 77, 0.35);
  border-radius: 999px;
}

.bd-shop__wallet strong {
  font-variant-numeric: tabular-nums;
  color: #fde68a;
  font-size: 1.05rem;
  min-width: 1.25rem;
}

.bd-shop__wallet strong.is-pulse,
.bd-shop__wallet strong.is-spend {
  animation: bdCoinSpend 0.5s ease;
}

@keyframes bdCoinSpend {
  0% { transform: scale(1); color: #fde68a; }
  35% { transform: scale(1.22); color: #fca5a5; }
  100% { transform: scale(1); color: #fde68a; }
}

.bd-shop-panel .bd-edition-label {
  margin-bottom: 0.3rem;
}

.bd-shop-panel .bd-edition-row {
  margin-bottom: 0.25rem;
}

.bd-shop-panel .bd-edition-count {
  display: block;
  margin: 0 0 1rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.bd-shop-offers {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
}

.bd-shop-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bd-shop-offer:hover {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.04);
}

.bd-shop-offer--paid {
  border-color: rgba(252, 211, 77, 0.22);
  background: rgba(252, 211, 77, 0.04);
}

.bd-shop-offer--paid:hover {
  border-color: rgba(252, 211, 77, 0.4);
}

.bd-shop-offer--free {
  opacity: 0.78;
}

.bd-shop-offer--free.is-ready {
  opacity: 1;
  border-color: rgba(125, 211, 252, 0.2);
  background: rgba(125, 211, 252, 0.04);
}

.bd-shop-offer--free.is-waiting:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
}

.bd-shop-offer__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.bd-shop-offer__info strong {
  font-size: 0.92rem;
  color: var(--color-text);
}

.bd-shop-offer__info > span {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.bd-shop-offer__action {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.bd-shop-offer__action .btn {
  min-width: 6.5rem;
  justify-content: center;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.bd-shop-offer.is-purchase-pulse {
  animation: bdBuyOfferPulse 0.55s ease;
}

.bd-shop-offer.is-purchase-ok {
  animation: bdBuyOfferOk 0.55s ease;
}

.bd-shop-offer__action .btn.is-buying,
.bd-shop-claim.is-buying {
  pointer-events: none;
  transform: scale(0.97);
  opacity: 0.92;
  background-image: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.12) 45%,
    transparent 70%
  );
  background-size: 220% 100%;
  animation: bdBuyBtnShimmer 0.85s linear infinite;
}

.bd-shop-offer__action .btn.is-success,
.bd-shop-claim.is-success {
  pointer-events: none;
  transform: scale(1.04);
  border-color: rgba(125, 211, 252, 0.45);
  background: rgba(125, 211, 252, 0.22);
  color: #e8eef5;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.18);
  animation: bdBuyBtnSuccess 0.45s ease;
}

.bd-shop-offer__action .btn.is-fail,
.bd-shop-claim.is-fail {
  pointer-events: none;
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
  animation: bdBuyBtnFail 0.4s ease;
}

.bd-shop-claim.is-buying {
  color: #9ec9e8;
}

.bd-shop-slide.is-bought-pop .bd-shop-slide__art {
  animation: bdPackBoughtPop 0.58s cubic-bezier(0.22, 1.2, 0.36, 1) !important;
}

.bd-shop-slide.is-bought-pop .bd-shop-slide__shadow {
  animation: bdPackBoughtShadow 0.58s ease;
}

@keyframes bdBuyOfferPulse {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(0.985);
  }
  70% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bdBuyOfferOk {
  0% {
    background: rgba(125, 211, 252, 0.04);
  }
  40% {
    background: rgba(125, 211, 252, 0.12);
  }
  100% {
    background: rgba(252, 211, 77, 0.04);
  }
}

@keyframes bdBuyBtnShimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -40% 0;
  }
}

@keyframes bdBuyBtnSuccess {
  0% {
    transform: scale(0.96);
  }
  55% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1.04);
  }
}

@keyframes bdBuyBtnFail {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  75% {
    transform: translateX(3px);
  }
}

@keyframes bdPackBoughtPop {
  0% {
    transform: scale(1) translateY(0);
  }
  40% {
    transform: scale(1.06) translateY(-8px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes bdPackBoughtShadow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  40% {
    transform: scale(0.88);
    opacity: 0.35;
  }
}

.bd-free-timer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
  min-width: 6.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.bd-free-timer__caption {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.bd-free-timer__value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #c8d0db;
  line-height: 1.1;
}

.bd-shop-claim {
  appearance: none;
  min-width: 6.5rem;
  padding: 0.42rem 0.75rem;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 8px;
  background: transparent;
  color: #7dd3fc;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bd-shop-claim:hover:not(:disabled) {
  background: rgba(125, 211, 252, 0.1);
  border-color: rgba(125, 211, 252, 0.45);
}

.bd-shop-claim:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bd-price {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fde68a;
  font-size: 1.05rem;
}

.bd-price.is-free {
  color: var(--color-primary);
  font-weight: 650;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Catálogo + inventario de sobres (página Tienda) */
.bd-shop-page {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: min(960px, 100%);
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  box-sizing: border-box;
}

.bd-shop-page__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.bd-shop-page__head h2 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  color: #e8eef5;
}

.bd-shop-page__sub {
  margin: 0;
  color: #8b97a8;
  font-size: 0.9rem;
}

.bd-shop-section__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: #e8eef5;
}

.bd-shop-section__hint {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  color: #8b97a8;
}

.bd-shop-catalog,
.bd-sealed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.75rem;
}

.bd-catalog-card,
.bd-sealed-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0.7rem;
  border-radius: 14px;
  border: 1px solid #1a2030;
  background: #0c1018;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.bd-catalog-card:hover:not(:disabled),
.bd-sealed-card:hover {
  border-color: rgba(125, 211, 252, 0.35);
  background: #101622;
  transform: translateY(-1px);
}

.bd-catalog-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bd-catalog-card__art,
.bd-sealed-card__art {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background:
    var(--bd-pack-art) center / cover no-repeat,
    #12161e;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.bd-catalog-card__icon {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  background: #12161e;
  border: 1px dashed #1a2030;
  color: #7dd3fc;
  font-size: 2rem;
}

.bd-catalog-card__body,
.bd-sealed-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 4.2rem;
}

.bd-catalog-card__body strong,
.bd-sealed-card__body strong {
  font-size: 0.86rem;
  color: #e8eef5;
}

.bd-catalog-card__meta,
.bd-sealed-card__body span {
  font-size: 0.72rem;
  color: #8b97a8;
}

.bd-catalog-card__price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.bd-catalog-card__badge {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8b97a8;
  background: #1a2030;
}

.bd-catalog-card__badge.is-ready {
  color: #0a0e14;
  background: #7dd3fc;
}

.bd-sealed-empty {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: #8b97a8;
}

.bd-sealed-empty[hidden] {
  display: none !important;
}

.bd-shop-sealed--modal {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #1a2030;
}

.page-lobby .bd-shop-sealed--modal {
  display: none;
}

@media (max-width: 760px) {
  .bd-shop-catalog,
  .bd-sealed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bd-shop-showcase {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .bd-shop-hero {
    min-height: 280px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 0.5rem 1rem;
  }

  .bd-shop-carousel {
    width: 150px;
  }

  .bd-shop-offer {
    flex-direction: column;
    align-items: stretch;
  }

  .bd-shop-offer__action {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Chips de gasto / ganancia de monedas */
.bd-spend-fx {
  position: fixed;
  inset: 0;
  z-index: 2500;
  pointer-events: none;
  overflow: hidden;
}

.bd-spend-chip,
.bd-gain-chip {
  position: fixed;
  width: 1.45rem;
  height: 1.45rem;
  margin: 0;
  background: var(--bd-coin, none) center / contain no-repeat;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
  offset-rotate: 0deg;
  offset-distance: 0%;
  will-change: offset-distance, transform, opacity;
}

.bd-spend-chip {
  animation: bdCoinFly 0.58s cubic-bezier(0.33, 0.1, 0.25, 1) forwards;
}

.bd-gain-chip {
  animation: bdCoinFly 0.62s cubic-bezier(0.28, 0.12, 0.22, 1) forwards;
}

/* Un solo viaje continuo (offset-path); sin keyframe de “parada” en el camino */
@keyframes bdCoinFly {
  0% {
    opacity: 0;
    offset-distance: 0%;
    transform: scale(0.55);
  }
  14% {
    opacity: 1;
  }
  78% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    offset-distance: 100%;
    transform: scale(0.42);
  }
}

.bd-page-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.bd-page-meta .btn-sm {
  min-width: 2rem;
  padding: 0.2rem 0.45rem;
}

.bd-open-panel {
  padding: 0.85rem 0.9rem;
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.bd-open-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.bd-open-panel h2 {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
}

.bd-open-panel__hint {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.bd-cooldown {
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--bg-elevated);
  font-size: 0.72rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.bd-cooldown.is-ready {
  border-color: rgba(125, 211, 252, 0.35);
  color: var(--color-primary);
}

.bd-edition-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.bd-edition-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.bd-select {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.45rem 0.55rem;
  color: var(--color-text);
  background: var(--bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.85rem;
}

.bd-edition-count {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.bd-open-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bd-open-actions .btn {
  font-size: 0.8rem;
  padding: 0.4rem 0.65rem;
}

.bd-open-note {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.bd-toast {
  position: fixed;
  left: 50%;
  bottom: max(1.1rem, env(safe-area-inset-bottom, 0px) + 0.75rem);
  transform: translateX(-50%);
  z-index: 4500;
  margin: 0;
  max-width: min(24rem, calc(100vw - 1.5rem));
  padding: 0.7rem 1.05rem;
  border: 0;
  border-radius: 0;
  background: rgba(18, 22, 30, 0.96);
  color: #c8d0db;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.35;
  text-align: center;
  box-shadow: none;
  pointer-events: none;
  animation: bd-toast-in 0.28s ease;
}

.page-lobby .bd-toast {
  left: calc(var(--lb-rail) + (100vw - var(--lb-rail)) / 2);
}

.bd-toast[hidden] {
  display: none !important;
}

.bd-toast.is-ok {
  color: #7dd3fc;
}

.bd-toast:not(.is-ok) {
  color: #f0b4b4;
}

@keyframes bd-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(0.45rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-toast {
    animation: none;
  }
}

/* Toast progreso / logro: mismo lenguaje visual que la página de logros */
.bd-ach-pop {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  left: 50%;
  z-index: 4600;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem 1rem;
  width: min(24rem, calc(100vw - 1.5rem));
  padding: 0.95rem 2.35rem 0.95rem 1rem;
  border-radius: 16px;
  border: none;
  background: rgba(18, 22, 30, 0.96);
  color: #c8d0db;
  box-shadow: none;
  transform: translate(-50%, -1.25rem);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-lobby .bd-ach-pop {
  left: calc(var(--lb-rail) + (100vw - var(--lb-rail)) / 2);
}

.bd-ach-pop[hidden] {
  display: none !important;
}

.bd-ach-pop.is-visible {
  pointer-events: auto;
  animation: bd-ach-pop-in 0.35s ease forwards;
}

.bd-ach-pop.is-leaving {
  animation: bd-ach-pop-out 0.28s ease forwards;
}

.bd-ach-pop.is-done {
  border: none;
  background: rgba(18, 28, 38, 0.97);
  box-shadow: none;
}

.bd-ach-pop__glow {
  display: none;
}

.bd-ach-pop__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  border: none;
  background: rgba(125, 211, 252, 0.14);
  color: #7dd3fc;
  font-size: 1.25rem;
}

.bd-ach-pop.is-done .bd-ach-pop__icon {
  background: rgba(125, 211, 252, 0.2);
}

.bd-ach-pop__body {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.bd-ach-pop__kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.75);
}

.bd-ach-pop__title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  color: #e8eef5;
}

.bd-ach-pop__meta {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(139, 151, 168, 0.95);
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.bd-ach-pop.is-done .bd-ach-pop__meta {
  color: rgba(125, 211, 252, 0.9);
  font-weight: 500;
}

.bd-ach-pop__bar {
  margin-top: 0.4rem;
  height: 4px;
  border-radius: 99px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bd-ach-pop__bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #7dd3fc;
  box-shadow: none;
  transition: width 0.55s ease;
}

.bd-ach-pop__link {
  position: relative;
  align-self: center;
  margin: 0;
  padding: 0.2rem 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: rgba(125, 211, 252, 0.85);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.bd-ach-pop__link:hover {
  color: #7dd3fc;
  background: transparent;
}

.bd-ach-pop__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(139, 151, 168, 0.85);
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  pointer-events: auto;
}

.bd-ach-pop__close:hover {
  color: #e8eef5;
  background: rgba(255, 255, 255, 0.04);
}

@keyframes bd-ach-pop-in {
  from {
    opacity: 0;
    transform: translate(-50%, -0.85rem);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes bd-ach-pop-out {
  to {
    opacity: 0;
    transform: translate(-50%, -0.65rem);
  }
}

.lb-nav__btn.is-ach-flash {
  animation: lb-ach-nav-flash 1.1s ease;
}

@keyframes lb-ach-nav-flash {
  0%, 100% {
    background: transparent;
  }
  35% {
    background: rgba(125, 211, 252, 0.1);
    color: #7dd3fc;
  }
}

@media (max-width: 720px) {
  .page-lobby .bd-ach-pop {
    left: 50%;
    top: calc(3.6rem + env(safe-area-inset-top));
  }
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-muted);
}
.btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-hover);
}

@media (max-width: 960px) {
  .bd-main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
  .bd-stage {
    min-height: 0;
    padding: 0.75rem;
  }
  .bd-inv-col {
    border-left: 0;
    border-top: 1px solid var(--color-border);
    max-height: none;
  }
}

.bd-binder__chrome {
  --bd-spine-w: 1.25rem;
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: visible;
  border: 1px solid var(--color-border);
  background: #0d121a;
  box-shadow: var(--shadow-soft);
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
}

.bd-binder__chrome.is-showing-cover {
  border-color: rgba(212, 175, 55, 0.22);
}

.bd-binder__chrome.is-showing-cover .bd-binder__spine,
.bd-binder__chrome:has(.bd-binder__stage.is-turning) .bd-binder__spine {
  opacity: 0;
}

/* Lomo detrás de las hojas: se ve por el canal izquierdo, no tapa el volteo */
.bd-binder__spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--bd-spine-w);
  z-index: 0;
  pointer-events: none;
  border-radius: 14px 0 0 14px;
  opacity: 1;
  transition: opacity 0.18s ease;
  background:
    linear-gradient(
      90deg,
      #121018 0%,
      #1c1724 42%,
      #15121c 78%,
      rgba(21, 18, 28, 0.35) 100%
    );
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.04),
    inset 2px 0 6px rgba(0, 0, 0, 0.35);
}

.bd-binder__stage {
  --bd-turn: 0;
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 0;
  border-radius: 14px;
  /* Perspectiva lejana → menos “zoom” al voltear */
  perspective: 3400px;
  perspective-origin: 0% center;
  background: transparent;
  touch-action: pan-y;
  overflow: visible;
}

.bd-sheet {
  transform-style: preserve-3d;
}

.bd-sheet--under {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
}

/* Sombra de lomo: crece con --bd-turn (peso al voltear). */
.bd-sheet--under::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, calc(0.08 + var(--bd-turn) * 0.42)) 0%,
    rgba(0, 0, 0, calc(var(--bd-turn) * 0.18)) 38%,
    transparent 72%
  );
  opacity: calc(0.35 + var(--bd-turn) * 0.65);
}

.bd-sheet--front {
  position: relative;
  z-index: 2;
  border-radius: 14px;
  transform-origin: left center;
  /* Solo giro: sin scale/translateZ para que el borde derecho no se “meta”
     y deje ver hueco al pasar hoja/portada. */
  transform: rotateY(calc(var(--bd-turn) * -90deg));
  transition: none;
  box-shadow:
    calc(var(--bd-turn) * -8px) 0 16px rgba(0, 0, 0, calc(var(--bd-turn) * 0.22));
}

/* Grosor del borde al girar (canto de hoja). */
.bd-sheet--front::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3%;
  bottom: 3%;
  width: calc(1px + var(--bd-turn) * 5px);
  z-index: 6;
  pointer-events: none;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(40, 48, 60, 0.85) 45%,
    rgba(8, 10, 14, 0.95) 100%
  );
  box-shadow:
    1px 0 3px rgba(0, 0, 0, calc(var(--bd-turn) * 0.35)),
    inset 1px 0 0 rgba(255, 255, 255, calc(var(--bd-turn) * 0.08));
  opacity: calc(var(--bd-turn) * 0.92);
}

/* Portada: canto ancho (en reposo y al abrir). */
.bd-binder__chrome.is-showing-cover .bd-sheet--front::before {
  top: 1.5%;
  bottom: 1.5%;
  width: 14px;
  opacity: 0.95;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(
    90deg,
    rgba(232, 210, 150, 0.22) 0%,
    rgba(90, 72, 48, 0.92) 28%,
    rgba(36, 28, 22, 0.98) 62%,
    rgba(12, 10, 12, 1) 100%
  );
  box-shadow:
    2px 0 8px rgba(0, 0, 0, 0.45),
    inset 1px 0 0 rgba(255, 230, 180, 0.12),
    inset -1px 0 0 rgba(0, 0, 0, 0.5);
}

.bd-binder__stage.is-opening-cover .bd-sheet--front::before {
  width: calc(10px + var(--bd-turn) * 18px);
  opacity: calc(0.85 + var(--bd-turn) * 0.15);
}

.bd-binder__stage.is-settling .bd-sheet--front {
  transition:
    transform 0.42s cubic-bezier(0.25, 0.7, 0.15, 1),
    box-shadow 0.42s ease;
}

/* Abrir portada: un poco más de peso en el settle. */
.bd-binder__stage.is-opening-cover.is-settling .bd-sheet--front {
  transition:
    transform 0.58s cubic-bezier(0.22, 0.65, 0.12, 1),
    box-shadow 0.58s ease;
}

.bd-binder__stage.is-opening-cover.is-turning .bd-sheet--under .bd-sheet__paper {
  filter: brightness(calc(0.9 + var(--bd-turn) * 0.1));
}

.bd-sheet--front,
.bd-sheet__paper {
  overflow: visible;
}

.bd-sheet__paper {
  position: relative;
  border-radius: 14px;
  /* Extra arriba para que las cartas al salir del labio no se corten.
     Padding izquierdo deja hueco visual al lomo; el color cubre todo el papel. */
  padding: 1.1rem 0.75rem 0.8rem;
  padding-left: calc(0.75rem + var(--bd-spine-w, 1.25rem));
  background-color: var(--bd-page-bot, #10151d);
  background-image:
    linear-gradient(115deg, var(--bd-page-sheen, rgba(255,255,255,0.03)) 0%, transparent 42%),
    linear-gradient(
      180deg,
      var(--bd-page-top, #171c27) 0%,
      var(--bd-page-bot, #10151d) 100%
    );
  background-origin: border-box;
  background-clip: border-box;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Rosa: rosa vivo (magenta claro) */
.bd-binder[data-page-theme='rose'] {
  --bd-page-top: #8f4568;
  --bd-page-bot: #4a2240;
  --bd-page-sheen: rgba(255, 170, 210, 0.28);
}

.bd-binder[data-page-theme='azure'] {
  --bd-page-top: #1c2a38;
  --bd-page-bot: #121820;
  --bd-page-sheen: rgba(125, 211, 252, 0.08);
}

/* Rojo: sangre / carmesí (sin tinte magenta) */
.bd-binder[data-page-theme='crimson'] {
  --bd-page-top: #4a1818;
  --bd-page-bot: #1a0a0a;
  --bd-page-sheen: rgba(255, 72, 72, 0.12);
}

/* Blanco: papel claro */
.bd-binder[data-page-theme='white'] {
  --bd-page-top: #f4f6f9;
  --bd-page-bot: #e2e6ee;
  --bd-page-sheen: rgba(255, 255, 255, 0.45);
}

.bd-sheet__paper.is-cover {
  background-color: #0a0e14;
  background-image: none;
  background-clip: border-box;
  background-origin: border-box;
}

.bd-sheet__paper.is-cover .bd-grid.is-sizing {
  visibility: hidden;
  pointer-events: none;
}

.bd-sheet__cover {
  position: absolute;
  z-index: 3;
  overflow: hidden;
  background: #0a0e14;
  /* Cubre el papel completo (incluye franja del lomo) */
  top: -1.1rem;
  right: -0.75rem;
  bottom: -0.8rem;
  left: calc(-0.75rem - var(--bd-spine-w, 1.25rem));
  border-radius: 14px;
}

.bd-sheet__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.bd-sheet--under .bd-sheet__paper.is-cover {
  filter: none;
}

.bd-sheet--under .bd-sheet__paper {
  position: absolute;
  inset: 0;
  background-color: var(--bd-page-bot, #10151d);
  background-image:
    linear-gradient(115deg, var(--bd-page-sheen, rgba(255,255,255,0.03)) 0%, transparent 42%),
    linear-gradient(
      180deg,
      var(--bd-page-top, #171c27) 0%,
      var(--bd-page-bot, #10151d) 100%
    );
  background-origin: border-box;
  background-clip: border-box;
  filter: brightness(0.92);
}

/* Reverso no se usa: el giro termina a 90° */
.bd-sheet__back {
  display: none;
}

/* Zona de arrastre (bordes) — hint tipo esquina de papel */
.bd-sheet__curl {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 5.5rem;
  z-index: 5;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: grab;
  background: transparent;
  touch-action: none;
  opacity: 1;
  color: #c8d0db;
  overflow: hidden;
}

.bd-sheet__curl--next {
  right: 0;
  border-radius: 0 14px 14px 0;
}

.bd-sheet__curl--prev {
  left: 0;
  border-radius: 14px 0 0 14px;
}

.bd-sheet__curl::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.18s ease, box-shadow 0.18s ease;
  pointer-events: none;
}

.bd-sheet__curl--next::before {
  border-radius: 0 14px 14px 0;
  background: linear-gradient(
    245deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(0, 0, 0, 0.22) 42%,
    transparent 78%
  );
  box-shadow: inset -10px 0 18px rgba(0, 0, 0, 0.18);
}

.bd-sheet__curl--prev::before {
  border-radius: 14px 0 0 14px;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(0, 0, 0, 0.22) 42%,
    transparent 78%
  );
  box-shadow: inset 10px 0 18px rgba(0, 0, 0, 0.18);
}

.bd-sheet__curl:hover::before,
.bd-sheet__curl:focus-visible::before,
.bd-binder__stage.is-turning .bd-sheet__curl::before {
  opacity: 1;
}

.bd-sheet__curl:hover,
.bd-sheet__curl:active,
.bd-binder__stage.is-turning .bd-sheet__curl {
  background: transparent;
  cursor: grabbing;
}

/* Pasó el umbral de commit: un poco más de lift en la esquina. */
.bd-binder__stage.is-commit-ready .bd-sheet__curl::before {
  opacity: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset -12px 0 22px rgba(0, 0, 0, 0.28);
}

.bd-binder__stage.is-commit-ready .bd-sheet--under::after {
  opacity: calc(0.55 + var(--bd-turn) * 0.45);
}

.bd-binder__stage.is-turning {
  user-select: none;
}

.bd-binder__stage.is-turning .bd-grid {
  pointer-events: none;
}

.bd-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  min-width: 0;
}

@media (max-width: 640px) {
  .bd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bd-binder__head { flex-direction: column; align-items: flex-start; }
}

.bd-slot {
  position: relative;
  aspect-ratio: 5 / 7;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, transparent 28%),
    #0b1018;
  overflow: visible;
  cursor: default;
  padding: 0;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  touch-action: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* Boca superior de la funda (labio plástico) */
.bd-slot__lip {
  position: absolute;
  left: 0%;
  right: 0%;
  top: 0px;
  height: 10px;
  z-index: 3;
  border-radius: 10px 10px 2px 2px;
  background: linear-gradient(180deg, rgba(180, 200, 220, 0.22), rgba(80, 100, 120, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  pointer-events: none;
  opacity: 0.85;
  transform-origin: 50% 0%;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.bd-slot.is-lip-seat .bd-slot__lip {
  animation: bdLipSeat 0.32s cubic-bezier(0.25, 0.8, 0.2, 1);
}

@keyframes bdLipSeat {
  0% { transform: scaleY(1); }
  40% { transform: scaleY(1.35); opacity: 1; }
  100% { transform: scaleY(1); }
}

.bd-slot__pocket {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 9px;
  background:
    repeating-linear-gradient(
      -14deg,
      transparent,
      transparent 5px,
      rgba(255, 255, 255, 0.015) 5px,
      rgba(255, 255, 255, 0.015) 6px
    );
}

.bd-slot.is-filled {
  border-color: rgba(255, 255, 255, 0.14);
  cursor: grab;
}

.bd-slot.is-filled:active { cursor: grabbing; }

/* Carta detrás del plástico (siempre visible, sin trucos de opacity) */
.bd-slot.is-filled .bd-slot__card {
  filter: saturate(0.94) contrast(0.98);
  box-shadow: none;
}

.bd-slot__alt {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  z-index: 2;
  padding: 0.1rem 0.28rem;
  border-radius: 3px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(10, 14, 20, 0.82);
  color: #c4b5fd;
  pointer-events: none;
}

.bd-slot.is-drop-ok {
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(125, 211, 252, 0.2),
    0 0 0 2px rgba(125, 211, 252, 0.12);
}

.bd-slot.is-drop-ok .bd-slot__lip {
  opacity: 1;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.35), rgba(125, 211, 252, 0.08));
  transform: scaleY(1.15);
}

.bd-slot.is-drop-deny {
  /* Solo borde estático: bdShake se reiniciaba en cada pointermove y tiraba el FPS */
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(248, 113, 113, 0.18),
    0 0 0 2px rgba(248, 113, 113, 0.1);
}

/* Hueco de origen: opacidad fija (sin pulse infinito durante el drag) */
.bd-slot.is-dragging-source .bd-slot__card,
.bd-inv-card.is-dragging-source img {
  opacity: 0.4;
  pointer-events: none;
}

.bd-slot.is-dragging-source {
  cursor: grabbing;
}

.bd-slot.is-dragging-source .bd-slot__plastic,
.bd-slot.is-dragging-source .bd-slot__plastic-grain {
  opacity: 0.35;
}

.bd-slot.is-await-insert .bd-slot__pocket {
  background: #0a0e14;
}

.bd-slot__card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  border-radius: 8px;
  transform-origin: center top;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  -webkit-user-drag: none;
}

/* Carta deslizándose en la funda (gesto del usuario) */
.bd-slot.is-sleeve-guide {
  z-index: 6;
  overflow: visible;
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(125, 211, 252, 0.15),
    0 0 0 2px rgba(125, 211, 252, 0.1);
}

.bd-slot.is-sleeve-guide .bd-slot__pocket {
  overflow: visible;
}

.bd-slot.is-sleeve-guide .bd-slot__plastic,
.bd-slot.is-sleeve-guide .bd-slot__plastic-grain {
  opacity: 1;
}

.bd-slot.is-sleeve-guide .bd-slot__lip {
  opacity: 1;
  transform: scaleY(1.2);
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.4), rgba(125, 211, 252, 0.1));
}

.bd-slot.is-sleeve-deep {
  border-color: rgba(110, 231, 183, 0.55);
}

.bd-slot__card.is-sliding {
  transform: translateY(-100%);
  will-change: transform;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/*
 * Funda plástica realista: especular suave + leve iridiscencia.
 * Sin color-dodge agresivo ni ocultar la carta.
 */
.bd-slot__plastic {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: 9px;
  overflow: hidden;
  opacity: 0;
}

.bd-slot.is-filled .bd-slot__plastic {
  opacity: 1;
}

/* Vidrio / PVC: reflejo de ambiente */
.bd-slot__plastic::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      168deg,
      rgba(255, 255, 255, 0.38) 0%,
      rgba(255, 255, 255, 0.1) 12%,
      rgba(255, 255, 255, 0.02) 26%,
      transparent 45%
    ),
    linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.18) 0%,
      transparent 22%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 6px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Franja especular que sigue el cursor (como luz en PVC) */
.bd-slot__plastic::after {
  content: '';
  position: absolute;
  inset: -30%;
  background: linear-gradient(
    calc(105deg + var(--fx, 0.4) * 40deg),
    transparent 36%,
    rgba(255, 255, 255, 0.14) 47%,
    rgba(200, 230, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.08) 53%,
    transparent 64%
  );
  transform: translate(
    calc((var(--fx, 0.45) - 0.5) * 36%),
    calc((var(--fy, 0.3) - 0.5) * 28%)
  );
  mix-blend-mode: soft-light;
  opacity: 0.75;
  transition: transform 80ms linear;
}

.bd-slot.is-filled:hover .bd-slot__plastic::after {
  opacity: 1;
}

/* Idle: brillo PVC un poco más suave cuando no hay hover (JS mueve --fx/--fy). */
.bd-binder__stage.is-pvc-idle .bd-slot.is-filled:not(:hover) .bd-slot__plastic::after {
  opacity: 0.55;
  transition: transform 220ms linear, opacity 0.35s ease;
}

/* Textura casi invisible del PVC */
.bd-slot__plastic-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: 9px;
  opacity: 0;
  background: repeating-linear-gradient(
    -12deg,
    transparent 0 5px,
    rgba(255, 255, 255, 0.018) 5px 6px
  );
}

.bd-slot.is-filled .bd-slot__plastic-grain {
  opacity: 1;
}

/* Brillo al insertar (barra que cruza) */
.bd-slot__shine {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: 9px;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.4) 48%,
    transparent 62%
  );
  transform: translateX(-120%);
  opacity: 0;
}

.bd-slot.is-inserting .bd-slot__shine {
  opacity: 1;
  animation: bdShine 0.55s ease forwards;
}

@keyframes bdShine {
  to { transform: translateX(120%); opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .bd-slot.is-inserting .bd-slot__shine,
  .bd-slot.is-lip-seat .bd-slot__lip {
    animation: none;
  }

  .bd-slot.is-inserting .bd-slot__shine {
    opacity: 0;
  }
}

.bd-slot__idx {
  position: absolute;
  top: 0.35rem;
  left: 0.35rem;
  font-size: 0.65rem;
  color: rgba(139, 151, 168, 0.5);
  pointer-events: none;
  z-index: 4;
  -webkit-user-select: none;
  user-select: none;
}

/* Carpeta embebida (perfil) / readonly: sin selección de texto al arrastrar */
.bd-workspace--readonly,
.bd-workspace--readonly * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.bd-workspace--readonly select {
  -webkit-user-select: none;
  user-select: none;
}

.bd-drop-zone {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: var(--bg-panel);
  color: var(--color-text-muted);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bd-drop-zone strong {
  color: var(--color-text);
  font-size: 0.95rem;
}

.bd-drop-zone span { font-size: 0.8rem; }

.bd-panel {
  padding: 1rem 1.1rem 1.15rem;
  background: var(--bg-panel);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bd-panel.is-drop-ok {
  border-color: rgba(125, 211, 252, 0.4);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.15);
}

.bd-panel__head h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.bd-panel__head p {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.bd-inv {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.28rem;
  overflow: hidden;
  min-height: 4rem;
  padding: 0.15rem;
}

.bd-inv-card {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: 7px;
  overflow: hidden;
  padding: 0;
  cursor: grab;
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, transform 0.15s ease;
  touch-action: none;
  user-select: none;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.bd-inv-card.is-selected {
  border-color: rgba(125, 211, 252, 0.85);
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.45),
    0 0 12px rgba(125, 211, 252, 0.18);
  transform: translateY(-1px);
}

.bd-inv-card.is-selected::after {
  content: '';
  position: absolute;
  top: 0.28rem;
  left: 0.28rem;
  z-index: 3;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 0 2px rgba(10, 14, 20, 0.75);
  pointer-events: none;
}

.bd-inv-card:active { cursor: grabbing; }

.bd-inv-card.is-reflowing {
  z-index: 3;
  will-change: transform;
  pointer-events: none;
}

.bd-inv-card.is-hole-settle {
  z-index: 3;
  animation: bdInvHoleSettle 0.38s cubic-bezier(0.22, 1.25, 0.36, 1) both;
  pointer-events: none;
}

@keyframes bdInvHoleSettle {
  0% {
    transform: scale(0.82);
    opacity: 0.55;
    filter: brightness(1.2);
  }
  60% {
    transform: scale(1.06);
    opacity: 1;
    filter: brightness(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    filter: none;
  }
}

.bd-inv-pack-ghost {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.bd-inv-pack-ghost.is-leaving {
  animation: bdInvPackLeave 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

@keyframes bdInvPackLeave {
  0% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: brightness(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.55) rotate(-8deg) translateY(8px);
    filter: brightness(1.35);
  }
}

.bd-inv-card.is-entering {
  z-index: 2;
  animation: bdInvEnter 0.5s cubic-bezier(0.22, 1.15, 0.36, 1) both;
  animation-delay: calc(var(--bd-inv-enter-i, 0) * 42ms);
  pointer-events: none;
}

@keyframes bdInvEnter {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.78);
    filter: brightness(1.25);
  }
  55% {
    opacity: 1;
    transform: translateY(3px) scale(1.06);
    filter: brightness(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-inv-card.is-entering {
    animation: none;
    pointer-events: auto;
  }
  .bd-inv-pack-ghost.is-leaving {
    animation: none;
    opacity: 0;
  }
  .bd-inv-card.is-hole-settle {
    animation: none;
  }
  .bd-inv-card.is-reflowing {
    transition: none !important;
    transform: none !important;
  }
}

.bd-inv-card img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  display: block;
  pointer-events: none;
}

.bd-inv-card__marks {
  position: absolute;
  top: 0.22rem;
  left: 0.22rem;
  right: 0.22rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 0.15rem;
  pointer-events: none;
}

.bd-inv-card__alt {
  margin-left: auto;
  padding: 0.1rem 0.28rem;
  border-radius: 3px;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(10, 14, 20, 0.88);
  color: #c4b5fd;
  line-height: 1.2;
  max-width: 100%;
}

.bd-inv-card.is-achievement {
  box-shadow:
    0 0 0 1px rgba(212, 168, 74, 0.55),
    0 0 14px rgba(255, 200, 90, 0.2);
}

.bd-inv-card.is-achievement.is-selected {
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.45),
    0 0 12px rgba(125, 211, 252, 0.18),
    0 0 0 1px rgba(212, 168, 74, 0.4),
    0 0 14px rgba(255, 200, 90, 0.16);
}

.bd-inv-card__ach,
.bd-inv-card__binder {
  padding: 0.1rem 0.28rem;
  border-radius: 3px;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bd-inv-card__ach {
  color: #1a1408;
  background: linear-gradient(180deg, #f5e0a8, #d4a84a 55%, #b8862e);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.bd-inv-card__binder {
  color: #d7e2ec;
  background: rgba(12, 18, 28, 0.9);
}

.bd-inv-card.is-in-binder {
  box-shadow:
    0 0 0 1px rgba(139, 151, 168, 0.45),
    0 0 0 1px rgba(212, 168, 74, 0.28);
}

.bd-inv-card.is-in-binder.is-selected {
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.45),
    0 0 12px rgba(125, 211, 252, 0.18);
}

.bd-empty {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.bd-ledger {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 14rem;
  overflow: auto;
}

.bd-ledger li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.bd-ledger li:last-child { border-bottom: 0; }

.bd-ledger__delta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.bd-ledger__delta.is-pos { color: #6ee7b7; }
.bd-ledger__delta.is-neg { color: #fca5a5; }

/* Drag ghost: tamaño real de funda (no miniatura) */
.bd-drag-ghost {
  position: fixed;
  z-index: 3000;
  width: 120px;
  height: 168px;
  border-radius: 9px;
  overflow: visible;
  pointer-events: none;
  margin: 0;
  padding: 0;
  will-change: left, top, width, height, transform;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.65));
}

.bd-drag-ghost__card {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #0a0e14;
  transform: rotate(var(--bd-tilt, -4deg));
  transition: transform 0.12s ease;
}

.bd-drag-ghost.is-over-slot .bd-drag-ghost__card {
  --bd-tilt: -1deg;
  border-color: rgba(125, 211, 252, 0.45);
}

.bd-drag-ghost img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bd-drag-ghost[hidden] { display: none !important; }

.bd-drag-ghost.is-sleeved {
  opacity: 0;
  pointer-events: none;
}

body.is-bd-dragging,
body.is-bd-animating {
  cursor: grabbing !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

body.is-bd-dragging .bd-slot,
body.is-bd-dragging .bd-inv-card,
body.is-bd-dragging .bd-drop-zone {
  cursor: grabbing;
}

/* Drag: congelar foil PVC (evita repaint de mix-blend en todos los slots). */
body.is-bd-dragging .bd-slot__plastic::after,
body.is-bd-dragging .bd-slot__plastic-grain {
  transition: none !important;
  opacity: 0.35;
}
body.is-bd-dragging .bd-binder__stage.is-pvc-idle .bd-slot.is-filled:not(:hover) .bd-slot__plastic::after {
  opacity: 0.35;
}

body.is-bd-shop-open {
  overflow: hidden;
}

/* Pack overlay */
.bd-pack-overlay {
  --bd-pack-ease: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 12, 0.9);
  padding: 1rem;
  overflow: auto;
  opacity: 0;
  transition: opacity 0.38s var(--bd-pack-ease);
}

.bd-pack-overlay[hidden] { display: none !important; }

.bd-pack-overlay.is-open {
  opacity: 1;
}

.bd-pack-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
  transition-duration: 0.32s;
}

.bd-pack-overlay.is-gl {
  background-color: #070b14;
  background-image:
    radial-gradient(ellipse 70% 58% at 50% 42%, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.88) 100%),
    var(--bd-pack-bg, none);
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}

.bd-gl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  cursor: pointer;
  background: transparent;
}

.bd-gl-canvas[hidden] { display: none !important; }

.bd-gl-foil {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  pointer-events: none;
  display: block;
  background: transparent;
}


.bd-gl-foil[hidden] { display: none !important; }

.bd-pack-overlay.is-gl .bd-pack-stage {
  z-index: 2;
  pointer-events: none;
  position: absolute;
  inset: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.55rem;
}

.bd-pack-overlay.is-gl .bd-pack-kicker {
  display: none !important;
}

.bd-pack-overlay.is-gl .bd-pack-hint-gl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.1rem;
  width: 100%;
  margin: 0;
  pointer-events: none;
  z-index: 3;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
  animation: bdPackUiIn 0.5s var(--bd-pack-ease) both;
}

/* Botón Aceptar en el hueco central del círculo de cartas */
.bd-pack-overlay.is-gl .bd-pack-actions {
  pointer-events: auto;
  position: relative;
  z-index: 4;
  margin: 0;
  animation: bdPackUiIn 0.55s var(--bd-pack-ease) 0.06s both;
}

.bd-pack-overlay.is-gl .bd-pack-summary {
  pointer-events: none;
  position: relative;
  z-index: 4;
  margin: 0;
  max-width: 14rem;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--color-text-muted);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  animation: bdPackUiIn 0.5s var(--bd-pack-ease) both;
}

/* Fallback DOM: botón al centro del anillo */
.bd-pack-stage:has(.bd-reveal--circle:not([hidden])) {
  position: relative;
}

.bd-pack-stage:has(.bd-reveal--circle:not([hidden])) .bd-pack-actions:not([hidden]) {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  margin: 0;
  pointer-events: auto;
  animation: bdPackUiInCenter 0.55s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)) 0.06s both;
}

.bd-pack-stage:has(.bd-reveal--circle:not([hidden])) .bd-pack-summary:not([hidden]) {
  position: absolute;
  left: 50%;
  top: calc(50% - 2.6rem);
  z-index: 8;
  margin: 0;
  max-width: 14rem;
  text-align: center;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
  animation: bdPackUiInCenter 0.5s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

@keyframes bdPackUiInCenter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.bd-pack-hint-gl {
  margin: 0.5rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

@keyframes bdPackUiIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.bd-pack-hint-gl[hidden] { display: none !important; }

.bd-pack-overlay.is-gl .bd-pack-dom { display: none; }

.bd-pack-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bd-pack-fx span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7dd3fc;
  opacity: 0;
  animation: bdSpark 0.9s ease forwards;
}

@keyframes bdSpark {
  0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); }
}

.bd-pack-stage {
  position: relative;
  width: min(960px, 100%);
  text-align: center;
}

.bd-pack-kicker {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.bd-pack {
  position: relative;
  width: min(210px, 52vw);
  aspect-ratio: 2 / 3;
  margin: 0 auto 1.35rem;
  perspective: 1000px;
  cursor: pointer;
  outline: none;
  transform-origin: 50% 60%;
  animation:
    bdPackEnter 0.72s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)) both,
    bdPackFloat 2.8s ease-in-out 0.72s infinite;
  filter:
    drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35))
    drop-shadow(0 26px 36px rgba(0, 0, 0, 0.55));
}

@keyframes bdPackEnter {
  0% {
    opacity: 0;
    transform: translateY(36px) scale(0.88) rotateX(10deg);
    filter:
      blur(2px)
      drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35))
      drop-shadow(0 26px 36px rgba(0, 0, 0, 0.55));
  }
  60% {
    opacity: 1;
    filter:
      blur(0)
      drop-shadow(0 10px 8px rgba(0, 0, 0, 0.35))
      drop-shadow(0 26px 36px rgba(0, 0, 0, 0.55));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
  }
}

@keyframes bdPackFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.015); }
}

.bd-pack__glow {
  position: absolute;
  inset: -12%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.2), transparent 68%);
  filter: blur(10px);
  animation: bdGlowPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bdGlowPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.94); }
  50% { opacity: 0.95; transform: scale(1.06); }
}

.bd-pack__face {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  padding: 0 0.6rem 0.85rem;
  color: #e8eef5;
  background:
    var(--bd-pack-art, none) center / contain no-repeat,
    transparent;
  border: none;
  box-shadow: none;
  overflow: hidden;
  transition: transform 0.55s ease, opacity 0.4s ease, filter 0.4s ease;
}

.bd-pack__seal,
.bd-pack__mark {
  display: none;
}

.bd-pack__edition {
  display: none;
}

.bd-pack__hint {
  font-size: 0.72rem;
  color: #e8eef5;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  background: rgba(10, 14, 20, 0.45);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.bd-pack__tear {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 42%, rgba(255,255,255,0.55) 50%, transparent 58%);
  transform: translateX(-120%);
  opacity: 0;
}

.bd-pack.is-ripping .bd-pack__tear {
  opacity: 1;
  animation: bdTear 0.58s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}

.bd-pack.is-ripping .bd-pack__face {
  filter: brightness(1.22) saturate(1.08);
  animation: bdPackShake 0.58s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.bd-pack.is-opening .bd-pack__face {
  transform: rotateY(92deg) scale(0.78) translateZ(-20px);
  opacity: 0;
  transition:
    transform 0.62s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity 0.45s ease,
    filter 0.4s ease;
}

.bd-pack.is-opening .bd-pack__glow {
  opacity: 0;
  animation: none;
  transition: opacity 0.35s ease;
}

.bd-pack.is-opening {
  animation: bdPackOpenExit 0.55s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
  pointer-events: none;
}

@keyframes bdPackOpenExit {
  to {
    transform: translateY(-8px) scale(0.92);
    filter:
      blur(1px)
      drop-shadow(0 8px 6px rgba(0, 0, 0, 0.3))
      drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
  }
}

@keyframes bdTear {
  0% { transform: translateX(-120%) skewX(-8deg); }
  100% { transform: translateX(120%) skewX(-8deg); }
}

@keyframes bdPackShake {
  0%, 100% { transform: rotate(0deg) scale(1); }
  18% { transform: rotate(-2.4deg) scale(1.025); }
  42% { transform: rotate(2.8deg) scale(1.04); }
  68% { transform: rotate(-1.6deg) scale(1.02); }
  88% { transform: rotate(0.8deg) scale(1.01); }
}

.bd-reveal {
  /* Solo para el giro 2.5D; layout en círculo plano */
  perspective: 900px;
  margin: 0 auto;
}

.bd-reveal--circle {
  position: relative;
  width: min(520px, 92vw);
  height: min(480px, 68vh);
  min-height: 300px;
  display: block;
  overflow: visible;
}

.bd-reveal--circle::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 72%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.12), transparent 70%);
  pointer-events: none;
}

.bd-reveal[hidden] { display: none !important; }

.bd-reveal-card {
  --tx: 0px;
  --ty: 0px;
  --deal-delay: 0ms;
  width: min(112px, 18vw);
  aspect-ratio: 5 / 7;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  border-radius: 9px;
  transform-style: preserve-3d;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.55);
  cursor: pointer;
  transition: none;
  pointer-events: none;
}

.bd-reveal-card.is-dealt {
  --idle-dur: 3.2s;
  --idle-delay: 0s;
  --idle-x: 0px;
  --idle-y: -5px;
  opacity: 1;
  pointer-events: auto;
  animation:
    bdRevealDealIn 0.55s cubic-bezier(0.22, 1.2, 0.36, 1) var(--deal-delay, 0ms) both,
    bdRevealIdleFloat var(--idle-dur) ease-in-out calc(var(--deal-delay, 0ms) + 0.55s + var(--idle-delay)) infinite;
}

@keyframes bdRevealDealIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1);
  }
}

@keyframes bdRevealIdleFloat {
  0%, 100% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) translate(0, 0);
  }
  50% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) translate(var(--idle-x), var(--idle-y));
  }
}

@keyframes bdRevealIdleFloatFlip {
  0%, 100% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotateY(180deg) translate(0, 0);
  }
  50% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotateY(180deg) translate(var(--idle-x), var(--idle-y));
  }
}

.bd-reveal-card.is-dealt.is-flipped {
  z-index: 6;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  animation:
    bdRevealFlipBounce 0.42s cubic-bezier(0.4, 0.0, 0.2, 1) forwards,
    bdRevealIdleFloatFlip var(--idle-dur) ease-in-out 0.42s infinite;
}

.bd-reveal-card.is-dealt.is-flipped:hover {
  filter: brightness(1.04);
}

/* Giro fluido: un solo arco + aterrizaje suave (sin pico/valle bruscos). */
@keyframes bdRevealFlipBounce {
  0% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotateY(0deg) scale(1);
  }
  45% {
    transform: translate(-50%, -50%) translate(var(--tx), calc(var(--ty) - 16px)) rotateY(90deg) scale(1.08);
  }
  70% {
    transform: translate(-50%, -50%) translate(var(--tx), calc(var(--ty) - 10px)) rotateY(180deg) scale(1.06);
  }
  86% {
    transform: translate(-50%, -50%) translate(var(--tx), calc(var(--ty) + 3px)) rotateY(180deg) scale(0.985);
  }
  100% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotateY(180deg) scale(1);
  }
}

.bd-reveal-card__face {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  overflow: hidden;
  backface-visibility: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.55),
    0 4px 10px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.bd-reveal-card__back {
  background:
    linear-gradient(145deg, #1e293b, #0f172a 55%, #172554);
}

.bd-reveal-card__back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bd-reveal-card__front {
  transform: rotateY(180deg);
  background: #0a0e14;
}

.bd-reveal-card__front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bd-reveal-card__badge {
  position: absolute;
  left: 0.3rem;
  right: 0.3rem;
  bottom: 0.3rem;
  padding: 0.18rem 0.3rem;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  background: rgba(10, 14, 20, 0.88);
  color: #6ee7b7;
}

.bd-reveal-card__badge.is-dup { color: #fcd34d; }
.bd-reveal-card__badge.is-alt { color: #c4b5fd; }

/* Aura de logro: bloom suave + corona (sin rectángulo) */
.bd-reveal-card.is-achievement {
  overflow: visible;
  z-index: 4;
}

.bd-reveal-card.is-achievement .bd-reveal-card__face {
  z-index: 2;
}

.bd-reveal-card__ach-aura {
  position: absolute;
  inset: -42%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 58% 52% at 50% 48%,
      rgba(255, 230, 150, 0.0) 0%,
      rgba(255, 210, 100, 0.0) 34%,
      rgba(255, 196, 80, 0.28) 52%,
      rgba(232, 160, 40, 0.22) 68%,
      rgba(180, 110, 20, 0.08) 82%,
      transparent 100%
    );
  box-shadow: none;
  filter: blur(1px);
  animation: bdAchAuraPulse 2.4s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bd-reveal-card__ach-aura::before,
.bd-reveal-card__ach-aura::after {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 220, 130, 0.0) 18deg,
    rgba(255, 210, 100, 0.35) 28deg,
    transparent 48deg,
    transparent 70deg,
    rgba(255, 230, 160, 0.28) 82deg,
    transparent 105deg,
    transparent 140deg,
    rgba(255, 200, 90, 0.3) 155deg,
    transparent 180deg,
    transparent 220deg,
    rgba(255, 230, 140, 0.22) 240deg,
    transparent 265deg,
    transparent 300deg,
    rgba(255, 210, 100, 0.28) 320deg,
    transparent 345deg,
    transparent 360deg
  );
  filter: blur(6px);
  opacity: 0.85;
  animation: bdAchRaysSpin 7s linear infinite;
}

.bd-reveal-card__ach-aura::after {
  inset: 8%;
  opacity: 0.45;
  filter: blur(10px);
  animation-duration: 11s;
  animation-direction: reverse;
}

.bd-reveal-card.is-flipped .bd-reveal-card__ach-aura {
  opacity: 1;
}

.bd-reveal-card__ach {
  position: absolute;
  top: 0.28rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1408;
  background: linear-gradient(180deg, #f5e0a8, #d4a84a 55%, #b8862e);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  pointer-events: none;
  white-space: nowrap;
}

@keyframes bdAchAuraPulse {
  0%, 100% {
    transform: scale(1);
    filter: blur(1px) brightness(1);
  }
  50% {
    transform: scale(1.08);
    filter: blur(1.5px) brightness(1.2);
  }
}

@keyframes bdAchRaysSpin {
  to { transform: rotate(360deg); }
}

.bd-reveal-card.is-achievement.is-flipped,
.bd-reveal-card.is-achievement.is-new.is-flipped,
.bd-reveal-card.is-achievement.is-alt.is-flipped,
.bd-reveal-card.is-achievement.is-new.is-alt.is-flipped {
  box-shadow:
    0 0 28px 6px rgba(255, 200, 90, 0.28),
    0 16px 36px rgba(0, 0, 0, 0.55);
}

.bd-reveal-card.is-new.is-flipped {
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.35), 0 12px 28px rgba(0, 0, 0, 0.45);
}

.bd-reveal-card.is-alt.is-flipped {
  box-shadow: 0 0 0 1px rgba(196, 181, 253, 0.45), 0 12px 28px rgba(0, 0, 0, 0.45);
}

.bd-reveal-card.is-new.is-alt.is-flipped {
  box-shadow:
    0 0 0 1px rgba(196, 181, 253, 0.5),
    0 0 0 2px rgba(110, 231, 183, 0.25),
    0 12px 28px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .bd-reveal-card__ach-aura,
  .bd-reveal-card__ach-aura::before,
  .bd-reveal-card__ach-aura::after,
  .bd-pack,
  .bd-pack__glow,
  .bd-pack-overlay,
  .bd-pack-summary,
  .bd-pack-actions,
  .bd-pack-hint-gl,
  .bd-reveal-card,
  .bd-reveal-card.is-dealt,
  .bd-reveal-card.is-dealt.is-flipped {
    animation: none !important;
    transition: none !important;
  }

  .bd-reveal-card.is-dealt {
    opacity: 1;
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty));
    pointer-events: auto;
  }

  .bd-reveal-card.is-dealt.is-flipped {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) rotateY(180deg);
  }

  .bd-pack-overlay {
    opacity: 1;
  }
}

.bd-pack-summary {
  margin: 1rem 0 0;
  color: var(--color-text);
  font-size: 0.95rem;
  animation: bdPackUiIn 0.5s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

.bd-pack-summary[hidden] { display: none !important; }

.bd-pack-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
  animation: bdPackUiIn 0.55s var(--bd-pack-ease, cubic-bezier(0.22, 1, 0.36, 1)) 0.06s both;
}

.bd-pack-actions[hidden] { display: none !important; }

/* Sello TCG: aceptar cartas del sobre */
.bd-pack-accept {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(240px, 78vw);
  padding: 0.85rem 1.75rem 0.95rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #f8f1de;
  background:
    linear-gradient(180deg, rgba(255, 236, 180, 0.14), transparent 42%),
    linear-gradient(165deg, #2a2116 0%, #15110c 48%, #1c160f 100%);
  box-shadow:
    0 0 0 1px rgba(212, 175, 90, 0.55),
    0 0 0 3px rgba(20, 16, 10, 0.95),
    0 0 0 4px rgba(196, 154, 72, 0.35),
    0 12px 28px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 236, 190, 0.22),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  isolation: isolate;
  overflow: hidden;
}

.bd-pack-accept[hidden] { display: none !important; }

.bd-pack-accept__edge {
  position: absolute;
  inset: 5px;
  border-radius: 2px;
  border: 1px solid rgba(232, 196, 112, 0.28);
  background:
    radial-gradient(ellipse 70% 90% at 50% -10%, rgba(255, 220, 140, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.bd-pack-accept__edge::before,
.bd-pack-accept__edge::after {
  content: '';
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1.5px solid rgba(232, 196, 112, 0.55);
  pointer-events: none;
}

.bd-pack-accept__edge::before {
  top: 3px;
  left: 3px;
  border-right: none;
  border-bottom: none;
}

.bd-pack-accept__edge::after {
  right: 3px;
  bottom: 3px;
  border-left: none;
  border-top: none;
}

.bd-pack-accept__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
}

.bd-pack-accept__kicker {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232, 196, 112, 0.78);
  font-weight: 600;
}

.bd-pack-accept__label {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
}

.bd-pack-accept:hover {
  transform: translateY(-1px) scale(1.02);
  filter: brightness(1.06);
  box-shadow:
    0 0 0 1px rgba(232, 196, 112, 0.75),
    0 0 0 3px rgba(20, 16, 10, 0.95),
    0 0 0 4px rgba(212, 175, 90, 0.5),
    0 16px 32px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 236, 190, 0.28),
    inset 0 -10px 18px rgba(0, 0, 0, 0.35);
}

.bd-pack-accept:active {
  transform: translateY(1px) scale(0.99);
  filter: brightness(0.96);
}

.bd-pack-accept:focus-visible {
  outline: 2px solid rgba(125, 211, 252, 0.7);
  outline-offset: 3px;
}

.bd-pack-overlay.is-gl .bd-pack-accept {
  min-width: min(260px, 82vw);
}
