/* La carta del gachapon, igual en todas las páginas: el álbum, la portada («Ver carta») y el overlay.
   El HTML lo escribe carta.js. --color-tier es el color de su tier.
   Las imágenes que se publican en Discord la dibujan aparte, en un lienzo (dibujarCarta en compartir.js): lo que
   cambie aquí se cambia allí en el mismo cambio, para que la carta se vea igual en la web y en Discord.
   Estilo de Gokudō (diseño B, «callejón de neón», 07/11/2026): el dibujo arriba, en cuadrado; debajo, el nombre en
   letra de rótulo y el rol con su familia; la tier en una placa inclinada y el kamon de la familia en un círculo. La
   tier es el brillo: D y C mate, B con canto de color, A con neón, S holográfica y S+ en oro. Todo va en cqw
   (centésimas del ancho) para que escale sola en el álbum, en el overlay y en la portada. */
.carta-g { position: relative; container-type: inline-size; aspect-ratio: 5 / 7; border-radius: 4px; overflow: hidden; background: #0C0D13;
  box-shadow: inset 0 0 0 1px #23242F, 0 10px 22px rgba(0, 0, 0, .5); }
.carta-g .arte { position: absolute; left: 0; top: 0; width: 100%; height: 71.43%; object-fit: cover; }
.carta-g .velo { position: absolute; left: 0; right: 0; top: 0; height: 71.43%; background: linear-gradient(180deg, rgba(7,8,12,0) 70%, rgba(12,13,19,.9) 100%); }
.carta-g .rareza { position: absolute; top: 4.5cqw; left: 4.5cqw; min-width: 17cqw; height: 11cqw; padding: 0 2.6cqw; border-radius: 0; background: var(--color-tier); color: #07080C;
  font-family: var(--rotulo); font-weight: 400; font-size: 7.4cqw; transform: skewX(-12deg); box-shadow: 0 1cqw 3cqw rgba(0,0,0,.55); }
.carta-g .logo { position: absolute; top: 4cqw; right: 4cqw; width: 15cqw; height: 15cqw; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 .6cqw #07080C, 0 0 0 1.2cqw var(--color-tier), 0 1cqw 3cqw rgba(0,0,0,.6); }
/* El panel de abajo: el dibujo acaba a 100cqw (la carta mide 140cqw de alto) */
.carta-g .pie { position: absolute; left: 6cqw; right: 6cqw; top: 101cqw; bottom: 4cqw; display: flex; flex-direction: column; justify-content: center; gap: .6cqw; }
.carta-g .nick { font-family: var(--rotulo); font-weight: 400; font-size: 10.5cqw; line-height: 1.1; color: #E7DFD2; transform: skewX(-10deg); transform-origin: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carta-g.nombre-largo .nick { font-size: 7.6cqw; }
.carta-g .rol { font-size: 4.6cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #A7A3B3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carta-g .bonus { font-size: 4.6cqw; font-weight: 800; color: #E7DFD2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carta-g .cantidad { position: absolute; right: 5cqw; bottom: 5cqw; padding: .6cqw 2.4cqw; background: #E0303A; color: #07080C; font-family: var(--rotulo); font-size: 5.4cqw; transform: skewX(-12deg); }
/* La que no se tiene: apagada */
.carta-g.falta { box-shadow: inset 0 0 0 1px #23242F; }
.carta-g.falta .arte, .carta-g.falta .logo, .carta-g.falta .rareza { filter: grayscale(1) brightness(.35); }
.carta-g.falta .nick, .carta-g.falta .rol, .carta-g.falta .bonus { color: #5A5866; }
/* El brillo de cada tier: el canto va por encima del dibujo (::after) y el resplandor, por fuera */
.carta-g:not(.fullart)::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 1px #23242F; }
.carta-g[data-tier="B"]:not(.falta)::after { box-shadow: inset 0 0 0 1px #23242F, inset 0 -1.6cqw 0 var(--tier-B); }
.carta-g[data-tier="A"]:not(.falta, .fullart)::after { box-shadow: inset 0 0 0 1.6cqw var(--tier-A); }
.carta-g[data-tier="S"]:not(.falta, .fullart)::after { box-shadow: inset 0 0 0 1.6cqw #E0303A; }
.carta-g[data-tier="SP"]:not(.falta, .fullart)::after { box-shadow: inset 0 0 0 1.6cqw #EBD28A; }
.carta-g[data-tier="A"]:not(.falta) { box-shadow: 0 0 16px rgba(217, 164, 65, .45), 0 10px 22px rgba(0, 0, 0, .5); }
.carta-g[data-tier="S"]:not(.falta) { box-shadow: 0 0 26px rgba(224, 48, 58, .6), 0 10px 22px rgba(0, 0, 0, .5); }
.carta-g[data-tier="SP"]:not(.falta) { box-shadow: 0 0 30px rgba(235, 210, 138, .55), 0 10px 22px rgba(0, 0, 0, .5); }
.carta-g[data-tier="S"] .rareza { background: #E0303A; }
.carta-g[data-tier="SP"] .rareza { background: linear-gradient(135deg, #EBD28A, #B8955A); font-size: 6.4cqw; }
/* Las S y S+, holográficas: un reflejo que cruza el dibujo */
.carta-g[data-tier="S"]:not(.falta) .velo, .carta-g[data-tier="SP"]:not(.falta) .velo {
  background: linear-gradient(115deg, transparent 22%, rgba(255,255,255,.16) 38%, rgba(120,220,255,.14) 46%, rgba(255,120,200,.12) 54%, transparent 70%),
    linear-gradient(180deg, rgba(7,8,12,0) 70%, rgba(12,13,19,.9) 100%); }

/* ---------- Carta «full art» ----------
   Las de mayor rango (de momento, las BOOST S+) llevan el dibujo a carta completa: un filo de oro, la placa de la tier
   y el kamon arriba, y las estrellas, el nombre, lo que hace y el multiplicador abajo, sobre el dibujo. El dibujo es
   public/cartas/fullart/ID.webp (1000×1400). */
.carta-g.fullart .arte { height: 100%; }
.carta-g.fullart .velo { height: 100%; background: linear-gradient(180deg, rgba(7,8,12,.62) 0%, rgba(7,8,12,0) 18%, rgba(7,8,12,0) 56%, rgba(7,8,12,.94) 88%); }
.carta-g.fullart:not(.falta) { box-shadow: 0 0 34px rgba(235, 210, 138, .6), 0 10px 22px rgba(0, 0, 0, .5); }
.carta-g.fullart::after { content: ''; position: absolute; inset: 2.4cqw; border: .8cqw solid #EBD28A; border-radius: 1.4cqw; pointer-events: none;
  box-shadow: 0 0 0 .4cqw rgba(7, 8, 12, .8), inset 0 0 0 .4cqw rgba(7, 8, 12, .55); }
.carta-g.fullart .rareza { top: 6cqw; left: 6cqw; }
.carta-g.fullart .logo { top: 6cqw; right: 6cqw; width: 13cqw; height: 13cqw; box-shadow: 0 0 0 .6cqw #07080C, 0 0 0 1.2cqw #EBD28A; }
.carta-g.fullart .pie { top: auto; left: 8cqw; right: 8cqw; bottom: 7.5cqw; }
.carta-g.fullart .pie::before { font-size: 4cqw; letter-spacing: .9cqw; color: #EBD28A; text-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .9); }
.carta-g.fullart[data-tier="SP"] .pie::before { content: '★★★★★★'; }
.carta-g.fullart[data-tier="S"] .pie::before { content: '★★★★★'; }
.carta-g.fullart[data-tier="A"] .pie::before { content: '★★★★'; }
.carta-g.fullart[data-tier="B"] .pie::before { content: '★★★'; }
.carta-g.fullart .nick { font-size: 10cqw; color: #F5EFE2; text-shadow: 0 .4cqw 1.4cqw rgba(0, 0, 0, .95); }
/* Los nombres largos también caben a carta completa («TEMPORADA 2», «SHINIGAMI»…) */
.carta-g.fullart.nombre-largo .nick { font-size: 7.6cqw; }
.carta-g.fullart .rol { color: #EBD28A; text-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .9); }
.carta-g.fullart .bonus { color: #F5EFE2; text-shadow: 0 .3cqw .8cqw rgba(0, 0, 0, .9); }
.carta-g.fullart .cantidad { right: 8cqw; bottom: 8cqw; }
.carta-g.fullart.falta::after { border-color: #5A5866; }
.carta-g.fullart.falta .pie::before, .carta-g.fullart.falta .nick, .carta-g.fullart.falta .rol, .carta-g.fullart.falta .bonus { color: #5A5866; }

/* ---------- Cartas LEGACY (de la familia Shinigami) ----------
   De colección: salen de vez en cuando como carta extra de un sobre. A carta completa, con «LEGACY» en una placa de oro
   en lugar de la tier y, debajo del nombre, solo su título. Mientras no tengan su dibujo vertical, llevan el que haya. */
.carta-g.fullart[data-tier="LEGACY"] .rareza { min-width: 0; height: 9cqw; padding: 0 3.2cqw; font-size: 4.4cqw; letter-spacing: .6cqw; background: #EBD28A; }
.carta-g.fullart.legacy .arte { object-position: 50% 30%; }

/* ---------- Cartas de premio: JEFE y TEMPORADA ----------
   Estéticas, como las LEGACY: el jefe (oyabun) de una familia que se ha juntado entera, con la placa en bermellón, y la
   conmemorativa de una temporada, en oro. Mientras no tengan su dibujo vertical, el jefe lleva el personaje de la familia */
.carta-g.fullart:is([data-tier="JEFE"], [data-tier="TEMPORADA"]) .rareza { min-width: 0; height: 9cqw; padding: 0 3.2cqw; font-size: 4.4cqw; letter-spacing: .6cqw; }
.carta-g.fullart[data-tier="JEFE"] .rareza { background: #E0303A; color: #F5EFE2; }
.carta-g.fullart[data-tier="TEMPORADA"] .rareza { background: #EBD28A; }
.carta-g.fullart.jefe .arte { object-position: 50% 22%; }
.carta-g.fullart.temporada .arte { object-fit: contain; background: #0C0D13; }
