/* Fondos de la mesa del Duelo (tienda del perfil, kind 'table'). Clase tb-<nombre> en cada mitad de la mesa (.side)
   y en la vista previa de la tienda. El dibujo va en ::before, por detrás de las cartas, con un velo oscuro para que se lean. */
.tb { position: relative; isolation: isolate; }
.tb::before, .tb::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; }
.tb::after { background: linear-gradient(#0000004d, #0000004d); } /* velo */
.tb-clasica::before, .tb-clasica::after { content: none; }

/* Pista de césped: franjas de corte y la línea blanca de la pista */
.tb-cesped::before { background: linear-gradient(90deg, transparent 0 calc(100% - 6px), #ffffff55 calc(100% - 6px) calc(100% - 3px), transparent calc(100% - 3px)),
  repeating-linear-gradient(90deg, #1f5f2c 0 34px, #256d33 34px 68px); }
/* Pista de tierra: arena con marcas de cascos */
.tb-tierra::before { background: radial-gradient(circle at 20% 30%, #5a3a1d 0 2px, transparent 3px) 0 0 / 26px 22px, radial-gradient(circle at 70% 70%, #8a6236 0 2px, transparent 3px) 0 0 / 34px 28px,
  linear-gradient(180deg, #7a5530, #5e3f21); }
/* Pizarra: verde de tiza con flechas de jugada */
.tb-pizarra::before { background: radial-gradient(ellipse at 30% 40%, #ffffff12, transparent 60%), radial-gradient(ellipse at 75% 65%, #ffffff0d, transparent 55%), #1d3229; }
.tb-pizarra::after { background: linear-gradient(#0000002e, #0000002e), repeating-linear-gradient(-35deg, transparent 0 46px, #ffffff10 46px 48px); }
/* Noche estrellada */
.tb-noche::before { background: radial-gradient(circle at 12% 20%, #fff 0 1px, transparent 2px) 0 0 / 90px 70px, radial-gradient(circle at 60% 55%, #fde68a 0 1px, transparent 2px) 0 0 / 120px 90px,
  radial-gradient(circle at 35% 80%, #c7d2fe 0 1.2px, transparent 2px) 0 0 / 70px 110px, radial-gradient(ellipse at 80% 0%, #3730a355, transparent 60%), linear-gradient(180deg, #0b1030, #151b45); }

/* ---------- Animados ---------- */
/* Escenario de live: focos de colores que barren el escenario */
.tb-live::before { background: conic-gradient(from 200deg at 15% -10%, transparent 0 18deg, #f472b655 22deg, transparent 30deg 360deg), conic-gradient(from 130deg at 85% -10%, transparent 0 18deg, #38bdf855 22deg, transparent 30deg 360deg),
  radial-gradient(ellipse at 50% 120%, #a855f766, transparent 60%), linear-gradient(180deg, #1a0b2e, #2e1065); background-size: 100% 100%; animation: tb-live 5s ease-in-out infinite alternate; }
@keyframes tb-live { from { filter: hue-rotate(0deg) brightness(1); } to { filter: hue-rotate(70deg) brightness(1.25); } }
/* Sakura: pétalos que caen sobre un rosa suave */
.tb-sakura::before { background: radial-gradient(ellipse 4px 3px at 20% 30%, #fbcfe8 0 60%, transparent 70%) 0 0 / 80px 90px, radial-gradient(ellipse 3px 2px at 70% 60%, #f9a8d4 0 60%, transparent 70%) 0 0 / 110px 120px,
  radial-gradient(ellipse 5px 3px at 45% 85%, #fce7f3 0 60%, transparent 70%) 0 0 / 140px 100px, linear-gradient(180deg, #4a1d33, #3b1428); animation: tb-fall 9s linear infinite; }
@keyframes tb-fall { to { background-position: 80px 90px, -110px 120px, 140px 100px, 0 0; } }
/* Aurora: bandas de luz que ondulan */
.tb-aurora::before { background: linear-gradient(120deg, transparent 20%, #22d3ee33 35%, transparent 50%, #a78bfa33 65%, transparent 80%), linear-gradient(180deg, #04121f, #0b2233); background-size: 300% 100%, 100% 100%;
  animation: tb-aurora 10s ease-in-out infinite alternate; }
@keyframes tb-aurora { from { background-position: 0% 0, 0 0; } to { background-position: 100% 0, 0 0; } }

@media (prefers-reduced-motion: reduce) { .tb::before { animation: none !important; } }
