/* ==========================================================================
   EL COFRE DIARIO — css/cofre.css
   ==========================================================================
   El del prototipo (prototipo/css/ideas/cofre.css y cofre-arte.css; specs/099
   y 100), pasado a la web el 01/11/2026 con el premio de verdad: lo sortea el
   servidor (api/_cofre.js) y lo enseña js/cofre.js. Un cofre dibujado en SVG
   (su arte, en variables con data: al final), con la tapa en 3D sobre su
   bisagra de atrás. En el panel (apaisado: el cofre a la izquierda, el texto
   y el botón a la derecha) se asoma al pasar; al abrirlo viaja a un escenario
   (un <dialog> modal), tiembla, salta el candado, se abre con un haz del
   color de su rareza y saca la carta del premio, que se da vuelta. Después,
   en el panel queda abierto y vacío, con la mini carta del premio de hoy.
   Con «reducir movimiento», todo en su estado final.
   ========================================================================== */

@layer rb-piezas {
  /* --- El arte: dibujos propios, en SVG (los arma scripts/arte-cofre.js). Aquí, el glifo del título, que está en la
     primera pantalla; el dibujo del cofre, en css/ideas/cofre-arte.css, que llega en el segundo tiempo de la carga
     (specs/100-pulido-a-fondo, contracts/carga.md) --- */
  .rb-cofre-panel,
  .rb-cofre-escenario {
    /* GLIFO: DESDE AQUÍ */
    --rb-cofre-arte-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 10.6C3 6.9 6.6 4.5 12 4.5s9 2.4 9 6.1V11H3ZM3 12.4h18v6.1A2.5 2.5 0 0 1 18.5 21h-13A2.5 2.5 0 0 1 3 18.5ZM10.4 10h3.2v5.4l-1.6 1.4-1.6-1.4Z'/%3E%3C/svg%3E");
    /* GLIFO: HASTA AQUÍ */
  }

  /* Hasta que llega su dibujo, el cofre del panel espera en su escena sin verse; con su dibujo (cofre-arte.css pone
     --rb-cofre-dibujado), entra solo, sin mover nada. Sin JavaScript, el dibujo llega con la página. */
  .rb-cofre-escena .rb-cofre {
    opacity: var(--rb-cofre-dibujado, 0);
    translate: 0 calc((1 - var(--rb-cofre-dibujado, 0)) * 6px);
    transition: opacity var(--rb-dur-larga) var(--rb-curva-llega), translate var(--rb-dur-larga) var(--rb-curva-llega);
  }

  /* --- La luz de cada rareza: --rz (su color), --rz-claro (su luz), --rz-hondo (su sombra), --rz-otro (su segundo
     tono) y --cara (el fondo de su carta). Sin rareza (el cofre del panel), la luz es de oro tibio. --- */
  .rb-cofre-panel,
  .rb-cofre-escenario {
    --rz: #ffcf5c;
    --rz-claro: #fff5d6;
    --rz-hondo: #a8620c;
    --rz-otro: #ff9b3d;
  }

  [data-rareza="comun"]:is(.rb-cofre-panel, .rb-cofre-escenario, .rb-cofre-ultimo) {
    --rz: #c4cae0;
    --rz-claro: #f4f6ff;
    --rz-hondo: #596080;
    --rz-otro: #e6ecff;
    --cara: linear-gradient(172deg, #3a3f62, #171a38 55%, #0b0d22);
    --cara-rayos: 9%;
  }

  [data-rareza="rara"]:is(.rb-cofre-panel, .rb-cofre-escenario, .rb-cofre-ultimo) {
    --rz: #4f9dff;
    --rz-claro: #d6eaff;
    --rz-hondo: #1a4aa0;
    --rz-otro: #5fe3ff;
    --cara: linear-gradient(172deg, #17408e, #0d1d4f 55%, #070d2b);
    --cara-rayos: 13%;
  }

  [data-rareza="epica"]:is(.rb-cofre-panel, .rb-cofre-escenario, .rb-cofre-ultimo) {
    --rz: #c65cff;
    --rz-claro: #ffdcfa;
    --rz-hondo: #5e1aa8;
    --rz-otro: #ff5fcf;
    --cara: linear-gradient(172deg, #5c1b8e, #2b0d50 55%, #12072c);
    --cara-rayos: 17%;
  }

  [data-rareza="legendaria"]:is(.rb-cofre-panel, .rb-cofre-escenario, .rb-cofre-ultimo) {
    --rz: #ffbe3b;
    --rz-claro: #fff4c8;
    --rz-hondo: #a35a0a;
    --rz-otro: #ff8a2e;
    --cara: linear-gradient(175deg, #7c4612, #3c1d08 40%, #170a20 88%);
    --cara-rayos: 28%;
  }

  /* ------------------------------------------------------------------------
     EL COFRE: el mueble (lo que tiembla) y, fuera de él, la sombra en el piso
     ------------------------------------------------------------------------ */
  .rb-cofre {
    --tapa: 0deg;
    --fuga: 0;
    position: relative;
    width: var(--cw, 160px);
    aspect-ratio: 200 / 170;
  }

  .rb-cofre-mueble {
    position: absolute;
    inset: 0;
    transform-origin: 50% 100%;
  }

  .rb-cofre > span,
  .rb-cofre-mueble > span {
    position: absolute;
    display: block;
    pointer-events: none;
  }

  .rb-cofre-sombra {
    left: -9%;
    right: -9%;
    bottom: -7%;
    height: 17%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(4 0 20 / 0.75), rgb(4 0 20 / 0.38) 55%, transparent);
  }

  /* La luz que se escapa, por nivel: la que dice data-fuga (plata, azul, violeta u oro), o la de su rareza. */
  .rb-cofre[data-fuga="comun"] { --luz: #d9e0f7; --luz-claro: #ffffff; }
  .rb-cofre[data-fuga="rara"] { --luz: #4f9dff; --luz-claro: #d6eaff; }
  .rb-cofre[data-fuga="epica"] { --luz: #c65cff; --luz-claro: #ffdcfa; }
  .rb-cofre[data-fuga="legendaria"] { --luz: #ffbe3b; --luz-claro: #fff4c8; }

  /* Lo de adentro: oscuro, y con la luz del premio cuando se escapa (--fuga). */
  .rb-cofre-hueco {
    left: 2.5%;
    right: 2.5%;
    top: 21%;
    height: 18.5%;
    border-radius: 7px 7px 0 0;
    background: linear-gradient(180deg, #0b0424, #12073a 70%, #1d0d52);
  }

  .rb-cofre-hueco::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(75% 130% at 50% 100%, var(--luz-claro, var(--rz-claro)), var(--luz, var(--rz)) 30%, color-mix(in srgb, var(--luz, var(--rz)) 35%, transparent) 62%, transparent);
    opacity: var(--fuga);
    transition: opacity 0.25s ease;
  }

  .rb-cofre-bisagra {
    left: 0;
    top: 0;
    width: 100%;
    height: 38.824%;
    perspective: calc(var(--cw) * 2.8);
    perspective-origin: 50% -70%;
  }

  .rb-cofre-tapa {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform-origin: 50% 100% calc(var(--cw) * -0.3);
    transform: rotateX(var(--tapa));
  }

  .rb-cofre-tapa-fuera,
  .rb-cofre-tapa-dentro {
    position: absolute;
    backface-visibility: hidden;
    background: center / 100% 100% no-repeat;
  }

  .rb-cofre-tapa-fuera {
    inset: 0;
    background-image: var(--rb-cofre-arte-tapa);
  }

  /* La tapa por dentro: un plano que va de la bisagra al labio; se ve cuando la tapa se levanta. */
  .rb-cofre-tapa-dentro {
    left: 0;
    top: 100%;
    width: 100%;
    height: calc(var(--cw) * 0.3);
    transform-origin: 50% 0;
    transform: rotateX(-90deg);
    background-image: var(--rb-cofre-arte-tapa-dentro);
  }

  /* La luz de adentro sobre el forro: más fuerte abajo, cerca de la boca, y en todo el ancho. */
  .rb-cofre-tapa-dentro::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, color-mix(in srgb, var(--rz-claro) 62%, transparent), color-mix(in srgb, var(--rz) 34%, transparent) 38%, color-mix(in srgb, var(--rz) 10%, transparent) 78%, transparent);
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .rb-cofre-caja {
    left: 0;
    top: 38.824%;
    width: 100%;
    height: 61.176%;
    background: var(--rb-cofre-arte-caja) center / 100% 100% no-repeat;
  }

  /* La luz que se escapa por la rendija, sobre el borde de la caja. */
  .rb-cofre-rendija {
    left: 2%;
    right: 2%;
    top: 31.5%;
    height: 14%;
    border-radius: 50%;
    background:
      radial-gradient(48% 22% at 50% 52%, #ffffff, transparent),
      radial-gradient(closest-side, var(--luz-claro, var(--rz-claro)), color-mix(in srgb, var(--luz, var(--rz)) 62%, transparent) 40%, transparent);
    opacity: var(--fuga);
    transition: opacity 0.25s ease;
  }

  .rb-cofre-candado {
    left: 38%;
    top: 27.059%;
    width: 24%;
    height: 34.118%;
    transform-origin: 50% 20%;
  }

  .rb-cofre-arco,
  .rb-cofre-cuerpo {
    position: absolute;
    left: 0;
    width: 100%;
    background: center / 100% 100% no-repeat;
  }

  .rb-cofre-arco {
    top: 0;
    height: 44.828%;
    background-image: var(--rb-cofre-arte-arco);
  }

  .rb-cofre-candado[data-suelto] .rb-cofre-arco {
    translate: 0 -26%;
  }

  .rb-cofre-cuerpo {
    top: 34.483%;
    height: 65.517%;
    background-image: var(--rb-cofre-arte-cuerpo);
  }

  /* El destello de la gema: una estrella de cuatro puntas que se abre una vez. */
  .rb-cofre-cuerpo::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 40%;
    width: 170%;
    aspect-ratio: 1;
    translate: -50% -50%;
    clip-path: polygon(50% 0, 54% 46%, 100% 50%, 54% 54%, 50% 100%, 46% 54%, 0 50%, 46% 46%);
    background: radial-gradient(circle, #ffffff, rgb(255 240 250 / 0.85) 18%, rgb(255 200 235 / 0) 60%);
    opacity: 0;
    scale: 0.2;
  }

  /* Sin candado (se cayó, o viene uno nuevo) y abierto y vacío: el candado no está, de golpe y sin fundido. */
  .rb-cofre[data-sin-candado] .rb-cofre-candado,
  .rb-cofre[data-vacio] .rb-cofre-candado,
  .rb-cofre[data-abierto] .rb-cofre-candado {
    opacity: 0;
  }

  /* Abierto y vacío: la tapa arriba y adentro una luz tenue, la del último premio. */
  .rb-cofre[data-vacio] {
    --tapa: 104deg;
  }

  .rb-cofre[data-vacio] .rb-cofre-hueco::after {
    background: linear-gradient(0deg, var(--rz-vacio-claro, var(--rz-claro)), var(--rz-vacio, var(--rz)) 45%, color-mix(in srgb, var(--rz-vacio, var(--rz)) 30%, #12073a));
    opacity: 0.6;
  }

  .rb-cofre[data-vacio] .rb-cofre-tapa-dentro::after {
    opacity: 0.45;
  }

  /* El brillo que cruza el cofre la primera vez que se ve, recortado a su silueta. */
  .rb-cofre-brillo {
    inset: 0;
    -webkit-mask: var(--rb-cofre-arte-silueta) center / 100% 100% no-repeat;
    mask: var(--rb-cofre-arte-silueta) center / 100% 100% no-repeat;
    background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.4) 47%, rgb(255 248 222 / 0.85) 50%, rgb(255 255 255 / 0.4) 53%, transparent 62%) 160% 0 / 260% 100% no-repeat;
    opacity: 0;
  }

  .rb-cofre[data-destello] .rb-cofre-brillo {
    animation: rb-cofre-barrido 1s cubic-bezier(0.45, 0.05, 0.3, 1) 0.05s;
  }

  .rb-cofre[data-destello] .rb-cofre-cuerpo::after {
    animation: rb-cofre-chispa 0.75s cubic-bezier(0.2, 0.7, 0.3, 1) 0.55s;
  }

  @keyframes rb-cofre-barrido {
    from {
      opacity: 1;
      background-position: 160% 0;
    }
    to {
      opacity: 1;
      background-position: -60% 0;
    }
  }

  @keyframes rb-cofre-chispa {
    0% {
      opacity: 0;
      scale: 0.2;
      rotate: 0deg;
    }
    35% {
      opacity: 1;
      scale: 1;
    }
    100% {
      opacity: 0;
      scale: 0.5;
      rotate: 45deg;
    }
  }

  /* ------------------------------------------------------------------------
     EL PANEL: apaisado, el cofre en su escena a la izquierda y lo demás a la
     derecha; la racha de la semana en la cabeza
     ------------------------------------------------------------------------ */
  .rb-cofre-glifo {
    width: 28px;
    height: 28px;
    background: currentColor;
    -webkit-mask: var(--rb-cofre-arte-glifo) center / contain no-repeat;
    mask: var(--rb-cofre-arte-glifo) center / contain no-repeat;
  }

  /* La racha: siete rombos, los días hechos en oro, hoy con su anillo y el séptimo, el del premio grande. */
  .rb-cofre-racha {
    margin-left: auto;
  }

  .rb-cofre-dias {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .rb-cofre-dias i {
    width: 9px;
    height: 9px;
    rotate: 45deg;
    border: 1px solid rgb(180 160 255 / 0.35);
    border-radius: 2px;
    background: rgb(20 16 70 / 0.8);
  }

  .rb-cofre-dias i[data-hecho] {
    border-color: #ffe9a0;
    background: linear-gradient(135deg, #fff4c8, #ffbe3b 55%, #a35a0a);
    box-shadow: 0 0 6px rgb(255 190 60 / 0.55);
  }

  .rb-cofre-dias i[data-hoy]:not([data-hecho]) {
    border: 2px solid #ffd36b;
    background: rgb(255 200 90 / 0.18);
    box-shadow: 0 0 8px rgb(255 200 90 / 0.6);
  }

  .rb-cofre-dias i[data-premio] {
    width: 12px;
    height: 12px;
    border-color: rgb(255 140 220 / 0.6);
    background: linear-gradient(135deg, rgb(255 140 220 / 0.35), rgb(150 80 255 / 0.25));
  }

  .rb-cofre-fila {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    align-items: center;
    gap: var(--rb-e-3);
  }

  .rb-cofre-escena {
    position: relative;
    display: grid;
    place-items: end center;
    height: 124px;
    padding-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--rb-borde);
    border-radius: var(--rb-radio-mediano);
    background:
      url(../imagenes/decorados/decorado-destellos-73a24e0b28.svg) 50% 0 / 172px auto no-repeat,
      radial-gradient(46% 16% at 50% 86%, rgb(170 120 255 / 0.42), transparent 75%),
      radial-gradient(60% 55% at 50% 45%, rgb(255 205 110 / 0.13), transparent 70%),
      radial-gradient(1.4px 1.4px at 14% 22%, rgb(255 255 255 / 0.7) 50%, transparent 52%),
      radial-gradient(1.2px 1.2px at 86% 30%, rgb(214 196 255 / 0.7) 50%, transparent 52%),
      linear-gradient(180deg, rgb(20 14 74 / 0.75), rgb(8 12 50 / 0.6));
    cursor: pointer;
  }

  .rb-cofre-escena .rb-cofre {
    --cw: 104px;
  }

  /* Mientras el cofre está en el escenario, su sitio queda vacío, como si lo hubieran levantado. */
  .rb-cofre[data-cofre-fuera] {
    visibility: hidden;
  }

  /* El resplandor tibio de la escena, que crece cuando el cofre está por abrirse. */
  .rb-cofre-escena::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 14%;
    bottom: 4%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(255 214 120 / 0.34), rgb(255 160 70 / 0.12) 55%, transparent);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
  }

  /* El anillo de luz que corre por el piso de la escena cuando el cofre vuelve del escenario. */
  .rb-cofre-escena::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 110px;
    height: 26px;
    translate: -50% 0;
    border: 2px solid color-mix(in srgb, var(--rz-claro) 80%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--rz);
    opacity: 0;
    pointer-events: none;
  }

  .rb-cofre-escena[data-aterriza]::after {
    animation: rb-cofre-anillo 0.8s cubic-bezier(0.15, 0.7, 0.25, 1);
  }

  @keyframes rb-cofre-anillo {
    from {
      opacity: 0.9;
      scale: 0.35;
    }
    to {
      opacity: 0;
      scale: 1.35;
    }
  }

  /* Mientras el cofre vuelve volando, el último premio y la cuenta esperan (sin mover nada): salen al aterrizar. */
  .rb-cofre-panel[data-cofre-llega] :is(.rb-cofre-ultimo, .rb-cofre-espera) {
    visibility: hidden;
  }

  /* Cuánto falta para el próximo: debajo del cofre abierto. */
  .rb-cofre-espera {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    font-size: var(--rb-t-11);
    font-weight: 600;
    color: var(--rb-texto-suave);
  }

  .rb-cofre-espera .rb-icono {
    width: 12px;
    height: 12px;
    color: var(--rz-claro);
  }

  .rb-cofre-escena:has(.rb-cofre-espera:not([hidden])) {
    padding-bottom: 20px;
  }

  .rb-cofre-lado {
    display: grid;
    gap: var(--rb-e-2);
    align-content: center;
    min-width: 0;
  }

  .rb-cofre-texto {
    font-size: var(--rb-t-13);
    line-height: 1.4;
    color: var(--rb-texto-suave);
  }

  /* El último premio: su mini carta (con su arte y el marco de su rareza) y su nombre. */
  .rb-cofre-ultimo {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--rb-e-2);
    font-size: var(--rb-t-13);
    line-height: 1.25;
  }

  .rb-cofre-mini {
    display: grid;
    place-items: center;
    width: 40px;
    aspect-ratio: 63 / 88;
    padding: 3px;
    border-radius: 6px;
    background: conic-gradient(from 210deg, var(--rz-claro), var(--rz), var(--rz-otro), var(--rz-hondo), var(--rz), var(--rz-claro));
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.5), 0 0 12px color-mix(in srgb, var(--rz) 45%, transparent);
  }

  .rb-cofre-mini-arte {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    background:
      radial-gradient(70% 60% at 50% 50%, color-mix(in srgb, var(--rz) 55%, transparent), transparent 75%),
      var(--cara, #12093a);
  }

  .rb-cofre-mini-arte .rb-cofre-arte-svg {
    width: 100%;
    height: auto;
  }

  .rb-cofre-mini-arte img {
    width: 100%;
    height: auto;
  }

  .rb-cofre-mini-arte .rb-cofre-arte-laurel {
    width: 100%;
    height: auto;
  }

  .rb-cofre-mini-arte .rb-cofre-arte-laurel span {
    padding: 1px;
    box-shadow: none;
  }

  .rb-cofre-mini-arte .rb-cofre-arte-laurel span::before {
    display: none;
  }

  .rb-cofre-ultimo-texto {
    display: grid;
    gap: 1px;
    min-width: 0;
  }

  .rb-cofre-ultimo small {
    font-size: var(--rb-t-11);
    letter-spacing: 0.01em;
    color: var(--rb-texto-apagado);
  }

  /* Hasta dos líneas: «Cristales de amatista» no cabe en una al lado de la mini carta. */
  .rb-cofre-ultimo strong {
    display: -webkit-box;
    overflow: hidden;
    font-weight: 700;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .rb-cofre-ultimo em {
    font-size: var(--rb-t-12);
    font-style: normal;
    font-weight: 700;
    color: color-mix(in srgb, var(--rz) 70%, white);
  }

  .rb-cofre-abrir {
    width: 100%;
    min-height: 44px;
    padding-inline: var(--rb-e-3);
    font-size: var(--rb-t-14);
    line-height: 1.15;
    white-space: normal;
    /* «(de ejemplo)» debajo, no al lado: el botón es flex en fila. */
    flex-direction: column;
    gap: 1px;
  }

  .rb-cofre-abrir small {
    display: block;
    font-size: var(--rb-t-11);
    font-weight: 600;
    opacity: 0.85;
  }

  .rb-cofre-nota {
    font-size: var(--rb-t-11);
    line-height: 1.35;
    color: var(--rb-texto-apagado);
  }

  /* La luz se escapa por la rendija cuando el cofre está a punto de abrirse: con el puntero o el foco. Solo si está
     cerrado: abierto y vacío no se asoma. */
  .rb-cofre-panel:has(.rb-cofre-abrir:focus-visible) .rb-cofre:not([data-vacio]) {
    --fuga: 1;
  }

  .rb-cofre-panel:has(.rb-cofre-abrir:focus-visible) .rb-cofre-escena::before {
    opacity: 1;
  }

  @media (hover: hover) and (pointer: fine) {
    .rb-cofre-panel:has(.rb-cofre-abrir:hover) .rb-cofre:not([data-vacio]),
    .rb-cofre-escena:hover .rb-cofre:not([data-vacio]) {
      --fuga: 1;
    }

    .rb-cofre-panel:has(.rb-cofre-abrir:hover) .rb-cofre-escena::before,
    .rb-cofre-escena:hover::before {
      opacity: 1;
    }
  }

  /* Y la tapa se asoma, con un muelle, y el cofre se levanta un poco (sin «reducir movimiento»). */
  @media (prefers-reduced-motion: no-preference) {
    .rb-cofre-escena .rb-cofre-tapa {
      transition: transform 0.55s cubic-bezier(0.25, 1.9, 0.4, 1);
    }

    .rb-cofre-escena .rb-cofre-mueble,
    .rb-cofre-escena .rb-cofre-sombra {
      transition: translate 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), scale 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .rb-cofre-panel:has(.rb-cofre-abrir:focus-visible) .rb-cofre-escena .rb-cofre:not([data-vacio]) .rb-cofre-tapa {
      transform: rotateX(12deg);
    }

    .rb-cofre-panel:has(.rb-cofre-abrir:focus-visible) .rb-cofre-escena .rb-cofre:not([data-vacio]) .rb-cofre-mueble {
      translate: 0 -4px;
    }

    .rb-cofre-panel:has(.rb-cofre-abrir:focus-visible) .rb-cofre-escena .rb-cofre:not([data-vacio]) .rb-cofre-sombra {
      scale: 0.9;
    }
  }

  @media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .rb-cofre-panel:has(.rb-cofre-abrir:hover) .rb-cofre-escena .rb-cofre:not([data-vacio]) .rb-cofre-tapa,
    .rb-cofre-escena:hover .rb-cofre:not([data-vacio]) .rb-cofre-tapa {
      transform: rotateX(12deg);
    }

    .rb-cofre-panel:has(.rb-cofre-abrir:hover) .rb-cofre-escena .rb-cofre:not([data-vacio]) .rb-cofre-mueble,
    .rb-cofre-escena:hover .rb-cofre:not([data-vacio]) .rb-cofre-mueble {
      translate: 0 -4px;
    }

    .rb-cofre-panel:has(.rb-cofre-abrir:hover) .rb-cofre-escena .rb-cofre:not([data-vacio]) .rb-cofre-sombra,
    .rb-cofre-escena:hover .rb-cofre:not([data-vacio]) .rb-cofre-sombra {
      scale: 0.9;
    }
  }

  /* ------------------------------------------------------------------------
     EL ESCENARIO: un diálogo a pantalla entera, con el cofre grande sobre un
     pedestal de luz, el haz, los rayos y la carta del premio
     ------------------------------------------------------------------------ */
  .rb-cofre-escenario {
    --cw: min(320px, 66vw, calc((100dvh - 190px) * 0.46));
    --kw: calc(var(--cw) * 0.78);
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: var(--rb-e-4);
    border: 0;
    overflow: hidden;
    background: transparent;
    color: var(--rb-texto);
  }

  .rb-cofre-escenario[open] {
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: center;
    justify-items: center;
    gap: var(--rb-e-3);
  }

  .rb-cofre-escenario:focus {
    outline: none;
  }

  .rb-cofre-escenario::backdrop {
    background: radial-gradient(75% 65% at 50% 55%, rgb(38 18 104 / 0.74), rgb(2 3 18 / 0.95));
    backdrop-filter: blur(7px);
  }

  .rb-cofre-escenario[data-entrando]::backdrop {
    animation: rb-cofre-fundido 0.45s ease both;
  }

  .rb-cofre-escenario[data-saliendo]::backdrop {
    animation: rb-cofre-fundido 0.45s ease reverse both;
  }

  @keyframes rb-cofre-fundido {
    from {
      opacity: 0;
    }
  }

  /* El tinte de la rareza, sobre toda la pantalla, que llega con la luz; con el premio a la vista, los bordes se
     oscurecen un poco más (la cámara enfoca la carta). */
  .rb-cofre-tinte {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(55% 50% at 50% 54%, color-mix(in srgb, var(--rz) 30%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
  }

  .rb-cofre-tinte::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(60% 60% at 50% 46%, transparent 55%, rgb(2 2 16 / 0.5));
    opacity: 0;
    transition: opacity 0.7s ease;
  }

  .rb-cofre-escenario[data-fase="abierto"] .rb-cofre-tinte,
  .rb-cofre-escenario[data-fase="revelado"] .rb-cofre-tinte {
    opacity: 1;
  }

  .rb-cofre-escenario[data-fase="revelado"] .rb-cofre-tinte::after {
    opacity: 1;
  }

  .rb-cofre-titulo {
    position: relative;
    z-index: 1;
    font-size: var(--rb-t-12);
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--rb-acento-suave);
  }

  /* Al cerrar, el título, la cruz, los botones y el tinte se van en el acto: el cofre vuela solo. */
  .rb-cofre-escenario[data-saliendo] :is(.rb-cofre-titulo, .rb-cofre-pie, .rb-cofre-cerrar, .rb-cofre-tinte) {
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  .rb-cofre-tablado {
    position: relative;
    z-index: 1;
    width: var(--cw);
    /* El alto de la carta revelada (a 1,06) y un respiro, para que no toque el título. */
    padding-top: calc(var(--cw) * 1.06);
    padding-bottom: calc(var(--cw) * 0.24);
  }

  .rb-cofre-grande {
    isolation: isolate;
    transform-origin: 50% 100%;
    cursor: default;
  }

  /* El orden de las capas, de atrás adelante: rayos, pedestal, onda y sombra (en el piso, debajo de todo); lo de
     adentro, la tapa, la boca de luz, el haz, las chispas, la carta, la caja, sus dos luces, la rendija, el candado y
     el fogonazo. La carta sale de entre la tapa y la caja: el mueble no hace capa propia (salvo al temblar, cuando
     lo de fuera de él todavía no se ve), y lo que se mueve después son sus piezas. */
  .rb-cofre-grande .rb-cofre-rayos { z-index: -4; }
  .rb-cofre-grande .rb-cofre-pedestal { z-index: -3; }
  .rb-cofre-grande .rb-cofre-onda { z-index: -2; }
  .rb-cofre-grande .rb-cofre-sombra { z-index: -1; }
  .rb-cofre-grande .rb-cofre-hueco { z-index: 1; }
  .rb-cofre-grande .rb-cofre-bisagra { z-index: 2; }
  .rb-cofre-grande .rb-cofre-boca { z-index: 3; }
  .rb-cofre-grande .rb-cofre-haz { z-index: 4; }
  .rb-cofre-grande .rb-cofre-chispas { z-index: 5; }
  .rb-cofre-grande .rb-cofre-salida { z-index: 6; }
  .rb-cofre-grande .rb-cofre-caja { z-index: 7; }
  .rb-cofre-grande .rb-cofre-luz-piso { z-index: 8; }
  .rb-cofre-grande .rb-cofre-luz { z-index: 8; }
  .rb-cofre-grande .rb-cofre-rendija { z-index: 9; }
  .rb-cofre-grande .rb-cofre-candado { z-index: 10; }
  .rb-cofre-grande .rb-cofre-fogonazo { z-index: 11; }

  /* El pedestal de luz: un círculo en el piso, con su anillo de runas, que toma el color del premio. */
  .rb-cofre-pedestal {
    left: -32%;
    right: -32%;
    bottom: -17%;
    height: 36%;
    border-radius: 50%;
    background:
      radial-gradient(closest-side, transparent 86%, rgb(200 170 255 / 0.55) 88.5%, transparent 91%),
      radial-gradient(closest-side, transparent 66%, rgb(200 170 255 / 0.22) 67.5%, transparent 69%),
      radial-gradient(closest-side, rgb(150 100 255 / 0.5), rgb(90 50 200 / 0.22) 55%, transparent 80%);
  }

  .rb-cofre-pedestal::before,
  .rb-cofre-pedestal::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
  }

  .rb-cofre-pedestal::before {
    background: repeating-conic-gradient(rgb(220 200 255 / 0.5) 0 2deg, transparent 2deg 9deg);
    -webkit-mask: radial-gradient(closest-side, transparent 74%, #000 75.5%, #000 79%, transparent 80.5%);
    mask: radial-gradient(closest-side, transparent 74%, #000 75.5%, #000 79%, transparent 80.5%);
  }

  .rb-cofre-pedestal::after {
    background:
      radial-gradient(closest-side, transparent 86%, color-mix(in srgb, var(--rz-claro) 80%, transparent) 88.5%, transparent 91%),
      radial-gradient(closest-side, color-mix(in srgb, var(--rz) 62%, transparent), color-mix(in srgb, var(--rz) 22%, transparent) 55%, transparent 80%);
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-pedestal::after {
    opacity: 1;
  }

  /* La onda que corre por el piso al abrirse (la de las épicas y las legendarias). */
  .rb-cofre-onda {
    left: -20%;
    right: -20%;
    bottom: -12%;
    height: 26%;
    border: 2px solid var(--rz-claro);
    border-radius: 50%;
    box-shadow: 0 0 18px var(--rz), inset 0 0 18px color-mix(in srgb, var(--rz) 60%, transparent);
    opacity: 0;
  }

  /* Los rayos, detrás de todo, desde la boca del cofre: unos anchos y suaves, otros finos (que giran al revés, para
     que la luz tenga profundidad), y un halo en el centro. */
  .rb-cofre-rayos {
    left: 50%;
    top: 30%;
    width: calc(var(--cw) * 3.6);
    aspect-ratio: 1;
    translate: -50% -50%;
    background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rz) 52%, transparent) 0deg, transparent 8deg 22deg, color-mix(in srgb, var(--rz) 52%, transparent) 30deg);
    -webkit-mask: radial-gradient(closest-side, #000 6%, rgb(0 0 0 / 0.5) 30%, transparent 68%);
    mask: radial-gradient(closest-side, #000 6%, rgb(0 0 0 / 0.5) 30%, transparent 68%);
    opacity: 0;
    transition: opacity 0.7s ease;
  }

  .rb-cofre-rayos::before,
  .rb-cofre-rayos::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
  }

  .rb-cofre-rayos::before {
    background: repeating-conic-gradient(from 5deg, color-mix(in srgb, var(--rz-claro) 85%, transparent) 0deg 0.8deg, transparent 0.8deg 7deg, color-mix(in srgb, var(--rz-otro) 65%, transparent) 7deg 7.6deg, transparent 7.6deg 15deg);
    -webkit-mask: radial-gradient(closest-side, #000 4%, rgb(0 0 0 / 0.4) 26%, transparent 56%);
    mask: radial-gradient(closest-side, #000 4%, rgb(0 0 0 / 0.4) 26%, transparent 56%);
  }

  .rb-cofre-rayos::after {
    background: radial-gradient(closest-side, color-mix(in srgb, var(--rz-claro) 55%, transparent), color-mix(in srgb, var(--rz) 28%, transparent) 22%, transparent 48%);
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-rayos {
    opacity: var(--rayos, 0.6);
    rotate: 22deg;
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-rayos::before {
    rotate: -34deg;
  }

  /* La legendaria llena más la pantalla: rayos más largos y un tinte más fuerte. */
  .rb-cofre-escenario[data-rareza="legendaria"] .rb-cofre-rayos {
    width: calc(var(--cw) * 4.6);
  }

  .rb-cofre-escenario[data-rareza="legendaria"] .rb-cofre-tinte {
    background: radial-gradient(62% 56% at 50% 50%, color-mix(in srgb, var(--rz) 38%, transparent), color-mix(in srgb, var(--rz-otro) 12%, transparent) 50%, transparent 76%);
  }

  /* La boca: la luz que sale de la caja, entre el borde y la tapa abierta. */
  .rb-cofre-boca {
    left: -6%;
    right: -6%;
    top: 23%;
    height: 30%;
    border-radius: 50%;
    background: radial-gradient(closest-side, #ffffff, var(--rz-claro) 22%, color-mix(in srgb, var(--rz) 70%, transparent) 48%, transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-boca {
    opacity: 1;
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-hueco::after,
  .rb-cofre-grande[data-abierto] .rb-cofre-tapa-dentro::after {
    opacity: 1;
  }

  /* Abierta, la caja está llena de luz de lado a lado: sin rincones oscuros junto a la tapa. */
  .rb-cofre-grande[data-abierto] .rb-cofre-hueco::after {
    background: linear-gradient(0deg, var(--rz-claro), var(--rz) 45%, color-mix(in srgb, var(--rz-hondo) 70%, #12073a));
  }

  /* El haz: un cono de luz que sube de la boca, con su núcleo y sus vetas. */
  .rb-cofre-haz {
    left: 4%;
    right: 4%;
    bottom: 60%;
    height: 245%;
    transform-origin: 50% 100%;
    clip-path: polygon(15% 100%, 85% 100%, 100% 0, 0 0);
    background:
      radial-gradient(42% 14% at 50% 100%, var(--rz-claro), transparent),
      linear-gradient(0deg, color-mix(in srgb, var(--rz-claro) 85%, var(--rz)) 0%, color-mix(in srgb, var(--rz) 55%, transparent) 22%, color-mix(in srgb, var(--rz) 16%, transparent) 60%, transparent 96%);
    -webkit-mask: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent);
    mask: linear-gradient(90deg, transparent, #000 24%, #000 76%, transparent);
    opacity: 0;
  }

  .rb-cofre-haz::before,
  .rb-cofre-haz::after {
    content: "";
    position: absolute;
    inset: 0;
  }

  .rb-cofre-haz::before {
    left: 34%;
    right: 34%;
    background: linear-gradient(0deg, #ffffff, color-mix(in srgb, var(--rz-claro) 70%, transparent) 30%, transparent 80%);
    -webkit-mask: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent);
    mask: linear-gradient(90deg, transparent, #000 35%, #000 65%, transparent);
    opacity: 0.75;
  }

  /* Las vetas del haz y el polvo de luz que flota en él (el script lo hace subir una vez). */
  .rb-cofre-haz::after {
    background:
      radial-gradient(1.3px 1.3px at 22% 30%, rgb(255 255 255 / 0.85) 50%, transparent 55%) 0 0 / 46px 64px,
      radial-gradient(1px 1px at 70% 72%, rgb(255 255 255 / 0.7) 50%, transparent 55%) 0 0 / 38px 52px,
      repeating-linear-gradient(0deg, transparent 0 18px, rgb(255 255 255 / 0.05) 26px, transparent 34px),
      repeating-linear-gradient(90deg, transparent 0 9%, rgb(255 255 255 / 0.1) 9% 10.5%, transparent 10.5% 17%);
    -webkit-mask: linear-gradient(0deg, #000, transparent 85%);
    mask: linear-gradient(0deg, #000, transparent 85%);
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-haz {
    opacity: var(--haz, 0.8);
  }

  /* Las dos luces sobre el frente de la caja, solo donde hay caja: la de la boca, de arriba, y la del pedestal, de
     abajo (violeta mientras está cerrado; del color del premio al abrirse). */
  .rb-cofre-luz,
  .rb-cofre-luz-piso {
    left: 0;
    top: 38.824%;
    width: 100%;
    height: 61.176%;
    -webkit-mask: var(--rb-cofre-arte-caja) center / 100% 100% no-repeat;
    mask: var(--rb-cofre-arte-caja) center / 100% 100% no-repeat;
  }

  .rb-cofre-luz {
    background: linear-gradient(180deg, color-mix(in srgb, var(--rz-claro) 70%, transparent), color-mix(in srgb, var(--rz) 22%, transparent) 26%, transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-luz {
    opacity: 0.85;
  }

  .rb-cofre-luz-piso {
    background: linear-gradient(0deg, rgb(176 132 255 / 0.5), rgb(176 132 255 / 0.12) 22%, transparent 40%);
    mix-blend-mode: screen;
  }

  .rb-cofre-luz-piso::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, color-mix(in srgb, var(--rz) 70%, transparent), color-mix(in srgb, var(--rz) 18%, transparent) 24%, transparent 42%);
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  .rb-cofre-grande[data-abierto] .rb-cofre-luz-piso::after {
    opacity: 1;
  }

  .rb-cofre-grande[data-abierto] {
    --tapa: 104deg;
  }

  /* El enfoque: con el premio a la vista, el cofre queda atrás, más oscuro y un poco desenfocado. */
  .rb-cofre-grande .rb-cofre-mueble > span {
    transition: filter 0.6s ease;
  }

  .rb-cofre-grande[data-enfoque] .rb-cofre-mueble > span:not(.rb-cofre-rendija, .rb-cofre-luz) {
    filter: brightness(0.6) saturate(0.85) blur(1.2px);
  }

  .rb-cofre-grande[data-enfoque] .rb-cofre-boca {
    opacity: 0.7;
  }

  /* Las chispas: un solo lienzo, lo justo alrededor del cofre y por encima. */
  .rb-cofre-chispas {
    position: absolute;
    left: -100%;
    top: -200%;
    width: 300%;
    height: 330%;
    pointer-events: none;
  }

  /* El fogonazo: un solo destello, cuando la tapa salta. */
  .rb-cofre-fogonazo {
    left: -40%;
    right: -40%;
    top: -60%;
    height: 170%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(255 255 255 / 0.95), color-mix(in srgb, var(--rz-claro) 60%, transparent) 30%, transparent 70%);
    opacity: 0;
  }

  /* Al saltar la tapa, la caja se hunde un poco contra el piso. */
  .rb-cofre-grande .rb-cofre-caja,
  .rb-cofre-grande .rb-cofre-luz,
  .rb-cofre-grande .rb-cofre-luz-piso {
    transform-origin: 50% 100%;
  }

  /* El rótulo de la legendaria: golpea sobre la carta y vuela a su píldora. */
  .rb-cofre-sello {
    position: fixed;
    left: var(--x, 50%);
    top: var(--y, 40%);
    z-index: 5;
    margin: 0;
    font-family: var(--rb-letra-titular);
    font-size: calc(var(--cw) * 0.15);
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    white-space: nowrap;
    background: linear-gradient(180deg, #fffbe6, #ffd25a 45%, #f0a524 62%, #fff4c8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 3px 0 #5a2c04) drop-shadow(0 0 16px rgb(255 190 60 / 0.85));
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
  }

  .rb-cofre-sello[data-visto] {
    opacity: 1;
  }

  /* ------------------------------------------------------------------------
     LA CARTA DEL PREMIO, de la familia de las cartas del podio: marco de su
     rareza, hexágono, título a mano, su rareza en una píldora, cara con rayos
     de su color y pie con su serie. Sale de la caja, sube y se da vuelta.
     ------------------------------------------------------------------------ */
  .rb-cofre-salida {
    position: absolute;
    left: -60%;
    right: -60%;
    top: -260%;
    bottom: 61.176%;
    overflow: hidden;
    /* clip: no es caja de desplazamiento, así nada la puede correr (un foco, un scrollIntoView). */
    overflow: clip;
    pointer-events: none;
  }

  .rb-cofre-salida[data-libre] {
    overflow: visible;
  }

  .rb-cofre-carta {
    --px: 50%;
    --py: 35%;
    --rx: 0deg;
    --ry: 0deg;
    --brillo: 0;
    position: absolute;
    left: 50%;
    bottom: calc(var(--cw) * 0.2);
    width: var(--kw);
    aspect-ratio: 63 / 88;
    margin-left: calc(var(--kw) / -2);
    transform-origin: 50% 100%;
    transform: translateY(calc(100% + var(--cw) * 0.26)) scale(0.55);
    perspective: calc(var(--kw) * 4.5);
    pointer-events: auto;
    touch-action: none;
    transition: scale 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .rb-cofre-carta[data-fuera] {
    transform: none;
  }

  /* Con el premio a la vista, la carta un poco adelante. */
  .rb-cofre-escenario[data-fase="revelado"] .rb-cofre-carta {
    scale: 1.06;
  }

  /* El foco (va a la carta cuando aparece): un anillo de su color, quieto, por fuera. */
  .rb-cofre-carta:focus {
    outline: none;
  }

  .rb-cofre-carta:focus-visible {
    outline: 3px solid var(--rz-claro);
    outline-offset: 6px;
    border-radius: calc(var(--kw) * 0.075);
  }

  /* El aura: la luz del premio detrás de la carta, más fuerte cuanto más rara. */
  .rb-cofre-carta::before,
  .rb-cofre-carta::after {
    content: "";
    position: absolute;
    z-index: -1;
    pointer-events: none;
  }

  .rb-cofre-carta::before {
    inset: -34% -46%;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--rz) 70%, transparent), color-mix(in srgb, var(--rz-otro) 26%, transparent) 45%, transparent 72%);
    opacity: var(--aura, 0.3);
  }

  /* Y alrededor, destellos que se quedan quietos (la magia en el aire), del color de su premio. */
  .rb-cofre-carta::after {
    inset: -16% -78% 8%;
    background: linear-gradient(160deg, #ffffff, var(--rz-claro) 30%, var(--rz) 70%, var(--rz-otro));
    -webkit-mask: url(../imagenes/decorados/decorado-destellos-73a24e0b28.svg) center / contain no-repeat;
    mask: url(../imagenes/decorados/decorado-destellos-73a24e0b28.svg) center / contain no-repeat;
    opacity: 0;
    transition: opacity 0.6s ease;
  }

  .rb-cofre-escenario[data-fase="revelado"] .rb-cofre-carta::after {
    opacity: var(--destellos, 0);
    animation: rb-cofre-destellos 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  @keyframes rb-cofre-destellos {
    from {
      scale: 0.82;
    }
  }

  .rb-cofre-carta-giro {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(calc(180deg + var(--ry)));
  }

  .rb-cofre-carta[data-cara] .rb-cofre-carta-giro {
    transform: rotateX(var(--rx)) rotateY(var(--ry));
  }

  .rb-cofre-carta-cara,
  .rb-cofre-carta-dorso {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border: calc(var(--kw) * 0.026) solid transparent;
    border-radius: calc(var(--kw) * 0.075);
    backface-visibility: hidden;
    box-shadow: 0 calc(var(--kw) * 0.08) calc(var(--kw) * 0.2) rgb(0 0 0 / 0.55), 0 0 calc(var(--kw) * 0.16) color-mix(in srgb, var(--rz) 50%, transparent);
  }

  .rb-cofre-carta-cara {
    display: grid;
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
    justify-items: center;
    gap: calc(var(--kw) * 0.018);
    padding: calc(var(--kw) * 0.045) calc(var(--kw) * 0.055) calc(var(--kw) * 0.035);
    background:
      radial-gradient(78% 30% at 50% 76%, rgb(10 6 28 / 0.55), transparent 82%) padding-box,
      radial-gradient(85% 40% at 50% 34%, color-mix(in srgb, var(--rz) 40%, transparent), transparent 74%) padding-box,
      repeating-conic-gradient(from 0deg at 50% 34%, color-mix(in srgb, var(--rz-claro) var(--cara-rayos, 12%), transparent) 0deg 2deg, transparent 2deg 9deg) padding-box,
      repeating-linear-gradient(135deg, rgb(255 255 255 / 0.025) 0 2px, transparent 2px 9px) padding-box,
      var(--cara, linear-gradient(172deg, #2a1d6a, #0c0a2e 62%, #070620)) padding-box,
      conic-gradient(from calc(210deg + var(--ry) * 2), var(--rz-claro), var(--rz), var(--rz-otro), var(--rz-hondo), var(--rz), var(--rz-claro)) border-box;
    text-align: center;
  }

  .rb-cofre-carta-cara::after {
    content: "";
    position: absolute;
    inset: calc(var(--kw) * 0.014);
    border: 1px solid color-mix(in srgb, var(--rz-claro) 40%, transparent);
    border-radius: calc(var(--kw) * 0.05);
    pointer-events: none;
  }

  .rb-cofre-carta-cara > :not(.rb-cofre-carta-holo, .rb-cofre-carta-brillo, .rb-cofre-carta-barrido) {
    position: relative;
    z-index: 1;
  }

  /* La cabeza: el hexágono con la estrella de MacroReborn, el título a mano y la rareza en su píldora oscura (con
     contraste sobre cualquier lámina). */
  .rb-cofre-carta-cabeza {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: calc(var(--kw) * 0.03);
    width: 100%;
  }

  .rb-cofre-carta-hex {
    display: grid;
    place-items: center;
    width: max(16px, calc(var(--kw) * 0.105));
    aspect-ratio: 24 / 27;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background: conic-gradient(from 200deg, var(--rz-claro), var(--rz), var(--rz-hondo), var(--rz-claro));
  }

  .rb-cofre-carta-hex::before {
    content: "";
    width: 58%;
    aspect-ratio: 1;
    clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
    background: rgb(26 12 2 / 0.75);
  }

  .rb-cofre-carta-titulo {
    overflow: hidden;
    font-family: var(--rb-letra-mano);
    font-size: max(13px, calc(var(--kw) * 0.078));
    line-height: 1;
    color: var(--rz-claro);
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .rb-cofre-carta-rareza {
    padding: calc(var(--kw) * 0.012) calc(var(--kw) * 0.035);
    border: 1px solid color-mix(in srgb, var(--rz) 60%, transparent);
    border-radius: 999px;
    background: rgb(12 6 32 / 0.8);
    font-size: max(8.5px, calc(var(--kw) * 0.04));
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rz-claro);
  }

  .rb-cofre-carta-arte {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    /* 4:3: casi la medida de los dibujos (5:4, 120 x 96), así la carta no queda vacía abajo, y con sitio para un
       nombre de dos líneas («Cristales de amatista»). */
    aspect-ratio: 4 / 3;
    margin-top: calc(var(--kw) * 0.01);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--rz) 45%, transparent);
    border-radius: calc(var(--kw) * 0.05);
    background:
      radial-gradient(60% 65% at 50% 55%, color-mix(in srgb, var(--rz) 55%, transparent), transparent 75%),
      linear-gradient(180deg, #170d4a, #0a0726);
    box-shadow: inset 0 0 calc(var(--kw) * 0.08) rgb(0 0 0 / 0.6);
  }

  /* Los rayos de la ventana, del color del premio y con luz en el centro (no rayas grises). */
  .rb-cofre-carta-arte::before {
    content: "";
    position: absolute;
    inset: -30%;
    background: repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--rz) 34%, transparent) 0deg 5deg, transparent 5deg 15deg);
    -webkit-mask: radial-gradient(closest-side, #000 10%, rgb(0 0 0 / 0.5) 45%, transparent 75%);
    mask: radial-gradient(closest-side, #000 10%, rgb(0 0 0 / 0.5) 45%, transparent 75%);
  }

  .rb-cofre-carta-arte > * {
    position: relative;
  }

  .rb-cofre-carta-tipo {
    margin-top: calc(var(--kw) * 0.012);
    font-size: max(9px, calc(var(--kw) * 0.044));
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--rz-claro) 82%, transparent);
  }

  .rb-cofre-carta-nombre {
    font-family: var(--rb-letra-titulo);
    font-size: max(13px, calc(var(--kw) * 0.094));
    font-weight: 700;
    line-height: 1.08;
    text-wrap: balance;
    text-shadow: 0 1px 8px rgb(10 5 30 / 0.9);
  }

  .rb-cofre-carta-nota {
    font-size: max(9.5px, calc(var(--kw) * 0.045));
    line-height: 1.25;
    color: rgb(240 236 255 / 0.86);
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.7);
    text-wrap: balance;
  }

  .rb-cofre-carta-pie {
    display: flex;
    align-self: end;
    justify-content: space-between;
    width: 100%;
    padding-top: calc(var(--kw) * 0.022);
    border-top: 1px solid color-mix(in srgb, var(--rz) 30%, transparent);
    font-size: max(7.5px, calc(var(--kw) * 0.036));
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--rz-claro) 72%, transparent);
    container-type: inline-size;
  }

  /* En una carta angosta (un teléfono chico, de costado), la marca sola: «· Cofre diario» la partía en dos líneas. */
  @container (max-width: 162px) {
    .rb-cofre-carta-pie-mas {
      display: none;
    }
  }

  /* La lámina: brillantina y arcoíris que corren con la luz (las épicas, un poco; las legendarias, del todo). */
  .rb-cofre-carta-holo,
  .rb-cofre-carta-brillo {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
  }

  .rb-cofre-carta-holo {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 7 -5.2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url%28%23b%29'/%3E%3C/svg%3E"),
      repeating-linear-gradient(115deg, #ff9ec4 0%, #ffe39a 7%, #9dffc9 14%, #8fdcff 21%, #c3a2ff 28%, #ff9ec4 35%);
    background-size: 160px 160px, 260% 260%;
    background-position: var(--px) var(--py), var(--px) var(--py);
    mix-blend-mode: color-dodge;
    filter: brightness(0.75) contrast(1.35) saturate(1.2);
    opacity: 0;
  }

  .rb-cofre-escenario[data-rareza="epica"] .rb-cofre-carta-holo {
    opacity: calc(0.24 + var(--brillo) * 0.22);
  }

  .rb-cofre-escenario[data-rareza="legendaria"] .rb-cofre-carta-holo {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='b'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='9'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 7 -5.2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url%28%23b%29'/%3E%3C/svg%3E"),
      repeating-conic-gradient(from 0deg at 50% 30%, rgb(255 236 170 / 0) 0deg, rgb(255 244 200 / 0.55) 2deg, rgb(255 236 170 / 0) 6deg),
      repeating-linear-gradient(115deg, rgb(255 214 110 / 0.75) 0%, rgb(255 160 120 / 0.5) 9%, rgb(160 220 255 / 0.45) 18%, rgb(255 236 150 / 0.75) 30%);
    background-size: 160px 160px, cover, 260% 260%;
    background-position: var(--px) var(--py), center, var(--px) var(--py);
    opacity: calc(0.36 + var(--brillo) * 0.3);
  }

  .rb-cofre-carta-brillo {
    background: radial-gradient(farthest-corner circle at var(--px) var(--py), rgb(255 255 255 / 0.7) 0%, rgb(255 255 255 / 0.12) 26%, rgb(0 0 0 / 0.3) 92%);
    mix-blend-mode: overlay;
    opacity: calc(var(--brillo) * 0.8);
  }

  /* El barrido: una banda de luz que cruza la cara una vez, cuando la carta termina de darse vuelta. */
  .rb-cofre-carta-barrido {
    position: absolute;
    inset: -10% -60%;
    z-index: 2;
    background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.28) 46%, rgb(255 255 255 / 0.6) 50%, rgb(255 255 255 / 0.28) 54%, transparent 62%);
    mix-blend-mode: overlay;
    opacity: 0;
    pointer-events: none;
  }

  /* El filo: un punto de luz que recorre el marco una vez (la épica y la legendaria). Solo el anillo del borde. */
  .rb-cofre-carta-filo {
    position: absolute;
    inset: 0;
    padding: calc(var(--kw) * 0.026);
    overflow: hidden;
    border-radius: calc(var(--kw) * 0.075);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    backface-visibility: hidden;
    transform: translateZ(1px);
    opacity: 0;
    pointer-events: none;
  }

  .rb-cofre-carta-filo[data-visto] {
    opacity: 1;
  }

  .rb-cofre-carta-filo i {
    position: absolute;
    inset: -40%;
    background: conic-gradient(from 0deg, transparent 0 76%, rgb(255 255 255 / 0) 78%, #ffffff 87%, var(--rz-claro) 90%, rgb(255 255 255 / 0) 96%);
  }

  /* El dorso: el emblema de MacroReborn en su cielo, con el borde del color del premio. */
  .rb-cofre-carta-dorso {
    display: grid;
    place-items: center;
    transform: rotateY(180deg);
    background:
      repeating-radial-gradient(circle at 50% 50%, rgb(180 150 255 / 0.1) 0 2px, transparent 2px 13px) padding-box,
      radial-gradient(70% 55% at 50% 50%, #3a2496, #0a0b33 75%) padding-box,
      conic-gradient(from 210deg, var(--rz-claro), var(--rz), var(--rz-hondo), var(--rz), var(--rz-claro)) border-box;
  }

  .rb-cofre-carta-emblema {
    display: grid;
    justify-items: center;
    gap: calc(var(--kw) * 0.04);
  }

  .rb-cofre-carta-emblema::before {
    content: "";
    width: calc(var(--kw) * 0.36);
    aspect-ratio: 1;
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
    background: linear-gradient(135deg, #fffbe8, #ffd25a 45%, #c77810);
    filter: drop-shadow(0 0 12px rgb(255 200 90 / 0.7));
  }

  .rb-cofre-carta-emblema b {
    font-family: var(--rb-letra-titular);
    font-size: calc(var(--kw) * 0.11);
    font-style: italic;
    font-weight: 900;
    line-height: 0.85;
    text-align: center;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff, #d9c7ff 60%, #9c7bff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  /* --- El arte de cada premio, dentro de su ventana --- */
  .rb-cofre-arte-svg {
    width: 82%;
    height: 82%;
    filter: drop-shadow(0 4px 10px rgb(0 0 0 / 0.5));
  }

  .rb-cofre-arte-ciudad {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 74% 28%, #fff7da 0 7%, rgb(255 236 180 / 0.35) 8%, transparent 16%),
      radial-gradient(1.2px 1.2px at 20% 24%, #ffffff 50%, transparent 52%),
      radial-gradient(1px 1px at 42% 14%, #ffffff 50%, transparent 52%),
      radial-gradient(1.3px 1.3px at 58% 34%, #ffffff 50%, transparent 52%),
      radial-gradient(1px 1px at 88% 48%, #ffffff 50%, transparent 52%),
      linear-gradient(180deg, #1b1f78, #4a2aa8 62%, #b04fc4);
  }

  .rb-cofre-arte-ciudad img {
    position: absolute;
    left: -30%;
    bottom: 0;
    width: 160%;
    max-width: none;
    height: auto;
  }

  .rb-cofre-arte-cristales,
  .rb-cofre-arte-gato {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
  }

  .rb-cofre-arte-cristales img {
    width: auto;
    height: 94%;
    filter: drop-shadow(0 0 14px rgb(180 120 255 / 0.65));
  }

  /* El gato de Nay: su fondo oscuro se funde con la ventana (screen) y solo queda su trazo de neón, sin marco. */
  .rb-cofre-arte-gato img {
    width: auto;
    height: 96%;
    max-height: 132px;
    mix-blend-mode: screen;
    -webkit-mask: radial-gradient(closest-side, #000 72%, transparent);
    mask: radial-gradient(closest-side, #000 72%, transparent);
    filter: brightness(1.35) saturate(1.2);
  }

  .rb-cofre-arte-laurel {
    position: relative;
    display: grid;
    place-items: center;
    height: 92%;
    aspect-ratio: 1;
  }

  .rb-cofre-arte-laurel img.rb-cofre-laurel {
    position: absolute;
    top: 6%;
    width: 38%;
    height: auto;
  }

  .rb-cofre-arte-laurel img.rb-cofre-laurel:first-child {
    left: 4%;
  }

  .rb-cofre-arte-laurel img.rb-cofre-laurel:nth-child(2) {
    right: 4%;
    scale: -1 1;
  }

  .rb-cofre-arte-laurel span {
    position: relative;
    display: grid;
    place-items: center;
    width: 52%;
    max-width: 66px;
    aspect-ratio: 1;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #fff4c8, #ffbe3b, #a35a0a, #ffbe3b, #fff4c8);
    box-shadow: 0 0 22px rgb(255 190 60 / 0.75);
  }

  .rb-cofre-arte-laurel span::before {
    content: "";
    position: absolute;
    top: -34%;
    left: 50%;
    width: 52%;
    height: 34%;
    translate: -50% 0;
    clip-path: polygon(0 100%, 0 30%, 25% 60%, 50% 0, 75% 60%, 100% 30%, 100% 100%);
    background:
      radial-gradient(circle at 50% 72%, #ff4d6d 0 10%, transparent 11%),
      linear-gradient(180deg, #fff4c8, #ffbe3b);
    filter: drop-shadow(0 0 6px rgb(255 200 80 / 0.8));
  }

  .rb-cofre-arte-laurel span img {
    width: 100%;
    height: auto;
    max-width: 60px;
    border-radius: 50%;
    background: #0c1040;
  }

  /* ------------------------------------------------------------------------
     LO DE ALREDEDOR: la ayuda para adelantar, los botones y la cruz
     ------------------------------------------------------------------------ */
  .rb-cofre-pie {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: center;
    min-height: 52px;
  }

  .rb-cofre-pie > * {
    grid-area: 1 / 1;
  }

  /* La ayuda llega despacio mientras se abre y se va de golpe: nunca se cruza con los botones. */
  .rb-cofre-saltar {
    align-self: center;
    font-size: var(--rb-t-13);
    color: var(--rb-texto-apagado);
    opacity: 0;
  }

  .rb-cofre-escenario[data-fase="esperando"] .rb-cofre-saltar,
  .rb-cofre-escenario[data-fase="abierto"] .rb-cofre-saltar {
    opacity: 1;
    transition: opacity 0.4s ease 0.5s;
  }

  .rb-cofre-saltar-tocar {
    display: none;
  }

  @media (hover: none) {
    .rb-cofre-saltar-tocar {
      display: inline;
    }

    .rb-cofre-saltar-clic {
      display: none;
    }
  }

  .rb-cofre-acciones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--rb-e-3);
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.45s;
  }

  /* Al llegar el premio se ven de golpe (la visibilidad no se anima: así se alcanzan con Tab al instante, también con
     «reducir movimiento»), y se funden un instante después. */
  .rb-cofre-escenario[data-fase="revelado"] .rb-cofre-acciones {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.35s ease 0.12s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) 0.12s;
  }

  .rb-cofre-acciones .rb-boton {
    min-height: 44px;
  }

  /* Las probabilidades, de ejemplo, con el color de cada rareza: lo que dicen los colores del escenario. */
  .rb-cofre-probabilidades {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px var(--rb-e-3);
    flex-basis: 100%;
    font-size: var(--rb-t-12);
    color: var(--rb-texto-apagado);
  }

  .rb-cofre-probabilidades b {
    font-weight: 600;
    color: var(--rb-texto-suave);
  }

  .rb-cofre-probabilidades span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
  }

  .rb-cofre-probabilidades span::before {
    content: "";
    width: 7px;
    height: 7px;
    rotate: 45deg;
    background: var(--rz);
    box-shadow: 0 0 6px var(--rz);
  }

  .rb-cofre-probabilidades span[data-rareza="comun"] { --rz: #c4cae0; }
  .rb-cofre-probabilidades span[data-rareza="rara"] { --rz: #4f9dff; }
  .rb-cofre-probabilidades span[data-rareza="epica"] { --rz: #c65cff; }
  .rb-cofre-probabilidades span[data-rareza="legendaria"] { --rz: #ffbe3b; }

  /* En una pantalla baja y apaisada (un teléfono de lado): el título a la izquierda, el escenario en el medio y los
     botones apilados a la derecha. Así el escenario queda centrado mientras se abre, y la carta tiene alto. */
  @media (orientation: landscape) and (max-height: 520px) {
    /* Manda el alto: la carta, tan ancha como el cofre (no a 0,78), para que se lea; el tablado le deja su alto
       (1,481 kw: la carta a 1,06) sobre la boca del cofre. */
    .rb-cofre-escenario {
      --cw: min(300px, 30vw, calc((100dvh - 44px) / 2.45));
      --kw: var(--cw);
    }

    .rb-cofre-escenario[open] {
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      grid-template-rows: auto;
      align-items: center;
      column-gap: var(--rb-e-6);
    }

    .rb-cofre-titulo {
      grid-column: 1;
      grid-row: 1;
      justify-self: end;
      text-align: right;
    }

    .rb-cofre-tablado {
      grid-column: 2;
      grid-row: 1;
      padding-top: calc(var(--kw) * 1.481 - var(--cw) * 0.13 + 8px);
    }

    .rb-cofre-pie {
      grid-column: 3;
      grid-row: 1;
      justify-self: start;
      justify-items: start;
    }

    /* En columna y sin envolver: si envolviera, las probabilidades (base 100 %) se irían a otra columna, fuera. */
    .rb-cofre-acciones {
      flex-direction: column;
      flex-wrap: nowrap;
      align-items: stretch;
      max-width: 260px;
    }

    .rb-cofre-probabilidades {
      flex-basis: auto;
      justify-content: flex-start;
    }

    .rb-cofre-saltar {
      text-align: left;
    }

    /* La carta es chica: su ventana, más apaisada, para que entren el nombre y el aviso. */
    .rb-cofre-carta-arte {
      aspect-ratio: 16 / 8;
    }
  }

  .rb-cofre-cerrar {
    position: absolute;
    top: var(--rb-e-3);
    right: var(--rb-e-3);
    z-index: 3;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--rb-borde-medio);
    border-radius: 50%;
    background: rgb(13 20 64 / 0.75);
    color: var(--rb-texto);
  }

  @media (hover: hover) {
    .rb-cofre-cerrar:hover {
      border-color: var(--rb-acento-claro);
      background: rgb(40 28 110 / 0.9);
    }
  }

  .rb-cofre-cerrar .rb-icono {
    width: 20px;
    height: 20px;
  }
}

/* ------------------------------------------------------------------------
   SU SITIO EN LA PORTADA: el panel, en la lateral, después de «Tu progreso»
   ------------------------------------------------------------------------ */
@layer rb-pantallas {
  .rb-cofre-panel {
    display: grid;
    gap: var(--rb-e-3);
  }

  .rb-cofre-panel .rb-panel-cabeza {
    margin-bottom: 0;
  }
}

@layer rb-piezas {
  .rb-cofre-panel,
  .rb-cofre-escenario {
    --rb-cofre-dibujado: 1;
    /* ARTE: DESDE AQUÍ */
    --rb-cofre-arte-caja: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 104'%3E%3Cdefs%3E%3ClinearGradient id='p0' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%235b34b4'/%3E%3Cstop offset='1' stop-color='%233d1f88'/%3E%3C/linearGradient%3E%3ClinearGradient id='p35' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%234c2a9e'/%3E%3Cstop offset='1' stop-color='%23331a76'/%3E%3C/linearGradient%3E%3ClinearGradient id='p68' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%233f2190'/%3E%3Cstop offset='1' stop-color='%23241258'/%3E%3C/linearGradient%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.12'/%3E%3Cstop offset='.4' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%2305001a' stop-opacity='.38'/%3E%3C/linearGradient%3E%3ClinearGradient id='ao' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%230b0230' stop-opacity='.75'/%3E%3Cstop offset='1' stop-color='%230b0230' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='ab' x1='0' y1='1' x2='0' y2='0'%3E%3Cstop offset='0' stop-color='%230b0230' stop-opacity='.6'/%3E%3Cstop offset='1' stop-color='%230b0230' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='o' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff8d6'/%3E%3Cstop offset='.2' stop-color='%23ffd866'/%3E%3Cstop offset='.48' stop-color='%23e9981a'/%3E%3Cstop offset='.66' stop-color='%23ffcf55'/%3E%3Cstop offset='1' stop-color='%238a4708'/%3E%3C/linearGradient%3E%3ClinearGradient id='oh' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23fff3c0'/%3E%3Cstop offset='.22' stop-color='%23ffd560'/%3E%3Cstop offset='.5' stop-color='%23eda21f'/%3E%3Cstop offset='.7' stop-color='%23ffc94a'/%3E%3Cstop offset='1' stop-color='%2386440a'/%3E%3C/linearGradient%3E%3CradialGradient id='rm' cx='.35' cy='.32' r='.75'%3E%3Cstop offset='0' stop-color='%23fffbe6'/%3E%3Cstop offset='.35' stop-color='%23ffd25a'/%3E%3Cstop offset='1' stop-color='%239a5208'/%3E%3C/radialGradient%3E%3Cfilter id='v' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .36' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .7 0 0 0 0 .58 0 0 0 0 1 0 0 0 1.1 -.6'/%3E%3CfeComposite operator='in' in2='SourceGraphic'/%3E%3C/filter%3E%3ClinearGradient id='sf' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%230a0226' stop-opacity='.55'/%3E%3Cstop offset='1' stop-color='%230a0226' stop-opacity='0'/%3E%3C/linearGradient%3E%3CclipPath id='c'%3E%3Cpath d='M3 0H197V88Q197 102 183 102H17Q3 102 3 88Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M3 0H197V88Q197 102 183 102H17Q3 102 3 88Z' fill='%232a145e'/%3E%3Cg clip-path='url%28%23c%29'%3E%3Crect x='3' y='0' width='194' height='35' fill='url%28%23p0%29'/%3E%3Crect x='3' y='35' width='194' height='33' fill='url%28%23p35%29'/%3E%3Crect x='3' y='68' width='194' height='34' fill='url%28%23p68%29'/%3E%3Crect x='3' y='0' width='194' height='102' filter='url%28%23v%29' opacity='.35'/%3E%3Cpath d='M3 16.0Q14.0 16.9 25.0 16.0T47.0 15.8T69.0 15.7T91.0 16.2T113.0 16.0T135.0 15.8T157.0 16.2T179.0 16.2T197.0 16.0M3 23.5Q17.4 23.8 31.8 23.5T60.7 23.8T89.5 23.3T118.4 23.4T147.2 23.7T176.1 23.7T197.0 23.1M3 30.0Q17.4 29.9 31.8 30.0T60.7 30.4T89.5 30.3T118.4 29.7T147.2 30.0T176.0 30.4T197.0 30.2M3 41.0Q17.2 41.2 31.4 41.0T59.9 41.4T88.3 41.4T116.8 40.9T145.2 40.9T173.6 41.3T197.0 40.8M3 47.5Q14.8 47.1 26.5 47.5T50.1 47.4T73.6 47.3T97.1 47.9T120.6 47.6T144.2 47.7T167.7 47.8T191.2 47.1T197.0 47.3M3 55.0Q16.8 55.0 30.6 55.0T58.2 54.9T85.8 54.7T113.4 55.4T141.0 54.6T168.6 54.9T196.2 54.9T197.0 55.1M3 61.5Q18.6 61.5 34.2 61.5T65.5 61.2T96.7 61.4T128.0 61.3T159.2 61.4T190.5 61.4T197.0 61.3M3 74.0Q16.7 74.3 30.3 74.0T57.6 73.8T84.9 74.4T112.3 74.0T139.6 74.3T166.9 74.1T194.2 74.1T197.0 74.0M3 80.0Q16.5 80.4 30.0 80.0T57.1 80.4T84.1 79.9T111.2 80.2T138.2 79.8T165.3 80.1T192.3 79.9T197.0 79.8M3 85.5Q16.0 86.1 28.9 85.5T54.8 85.8T80.7 85.1T106.7 85.8T132.6 85.1T158.5 85.4T184.4 85.2T197.0 85.1' fill='none' stroke='%2312053a' stroke-opacity='.32' stroke-width='.55' transform='translate%280 .7%29'/%3E%3Cpath d='M3 16.0Q14.0 16.9 25.0 16.0T47.0 15.8T69.0 15.7T91.0 16.2T113.0 16.0T135.0 15.8T157.0 16.2T179.0 16.2T197.0 16.0M3 23.5Q17.4 23.8 31.8 23.5T60.7 23.8T89.5 23.3T118.4 23.4T147.2 23.7T176.1 23.7T197.0 23.1M3 30.0Q17.4 29.9 31.8 30.0T60.7 30.4T89.5 30.3T118.4 29.7T147.2 30.0T176.0 30.4T197.0 30.2M3 41.0Q17.2 41.2 31.4 41.0T59.9 41.4T88.3 41.4T116.8 40.9T145.2 40.9T173.6 41.3T197.0 40.8M3 47.5Q14.8 47.1 26.5 47.5T50.1 47.4T73.6 47.3T97.1 47.9T120.6 47.6T144.2 47.7T167.7 47.8T191.2 47.1T197.0 47.3M3 55.0Q16.8 55.0 30.6 55.0T58.2 54.9T85.8 54.7T113.4 55.4T141.0 54.6T168.6 54.9T196.2 54.9T197.0 55.1M3 61.5Q18.6 61.5 34.2 61.5T65.5 61.2T96.7 61.4T128.0 61.3T159.2 61.4T190.5 61.4T197.0 61.3M3 74.0Q16.7 74.3 30.3 74.0T57.6 73.8T84.9 74.4T112.3 74.0T139.6 74.3T166.9 74.1T194.2 74.1T197.0 74.0M3 80.0Q16.5 80.4 30.0 80.0T57.1 80.4T84.1 79.9T111.2 80.2T138.2 79.8T165.3 80.1T192.3 79.9T197.0 79.8M3 85.5Q16.0 86.1 28.9 85.5T54.8 85.8T80.7 85.1T106.7 85.8T132.6 85.1T158.5 85.4T184.4 85.2T197.0 85.1' fill='none' stroke='%23c4b0ff' stroke-opacity='.24' stroke-width='.6'/%3E%3Cellipse cx='64' cy='52' rx='6' ry='2.52' fill='none' stroke='%23c9b6ff' stroke-opacity='.3' stroke-width='.6'/%3E%3Cellipse cx='64' cy='52' rx='3.72' ry='1.50' fill='none' stroke='%2312053a' stroke-opacity='.45' stroke-width='.6'/%3E%3Cellipse cx='64' cy='52' rx='1.68' ry='0.66' fill='%2312053a' fill-opacity='.55'/%3E%3Cellipse cx='136' cy='44' rx='4.5' ry='1.89' fill='none' stroke='%23c9b6ff' stroke-opacity='.3' stroke-width='.6'/%3E%3Cellipse cx='136' cy='44' rx='2.79' ry='1.13' fill='none' stroke='%2312053a' stroke-opacity='.45' stroke-width='.6'/%3E%3Cellipse cx='136' cy='44' rx='1.26' ry='0.49' fill='%2312053a' fill-opacity='.55'/%3E%3Cellipse cx='118' cy='81' rx='5' ry='2.10' fill='none' stroke='%23c9b6ff' stroke-opacity='.3' stroke-width='.6'/%3E%3Cellipse cx='118' cy='81' rx='3.10' ry='1.25' fill='none' stroke='%2312053a' stroke-opacity='.45' stroke-width='.6'/%3E%3Cellipse cx='118' cy='81' rx='1.40' ry='0.55' fill='%2312053a' fill-opacity='.55'/%3E%3Cpath d='M3 35H197M3 68H197' stroke='%2314073c' stroke-width='2.4'/%3E%3Cpath d='M3 36.9H197M3 69.9H197' stroke='%23a68cff' stroke-opacity='.3' stroke-width='.8'/%3E%3Crect x='3' y='11' width='194' height='10' fill='url%28%23ao%29'/%3E%3Crect x='3' y='78' width='194' height='12' fill='url%28%23ab%29'/%3E%3Crect x='42' y='0' width='6' height='102' fill='url%28%23sf%29'/%3E%3Crect x='176' y='0' width='6' height='102' fill='url%28%23sf%29'/%3E%3Crect x='3' y='0' width='194' height='102' fill='url%28%23l%29'/%3E%3C/g%3E%3Cpath d='M4.3 2V88Q4.3 100.6 16.5 100.8' fill='none' stroke='%23b9a3ff' stroke-opacity='.5' stroke-width='.9'/%3E%3Crect x='24' y='0' width='18' height='102' fill='url%28%23oh%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Crect x='158' y='0' width='18' height='102' fill='url%28%23oh%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M25.2 0V102M159.2 0V102' stroke='%23fffbe6' stroke-opacity='.7' stroke-width='.7'/%3E%3Cpath d='M3 0H197V11H3Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M3 1H197' stroke='%23fffbe6' stroke-width='1' stroke-opacity='.9'/%3E%3Cpath d='M3 89H197V88.5Q197 102 183 102H17Q3 102 3 88.5Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M4 90H196' stroke='%23fff8d6' stroke-width='.8' stroke-opacity='.85'/%3E%3Cpath d='M3 72V88Q3 102 17 102H32V94.5H19Q10.5 94.5 10.5 86V72Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M197 72V88Q197 102 183 102H168V94.5H181Q189.5 94.5 189.5 86V72Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M3 0H22V7.5H10.5V27H3Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M197 0H178V7.5H189.5V27H197Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Ccircle cx='33.5' cy='24.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='33' cy='24' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='33.5' cy='51.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='33' cy='51' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='33.5' cy='78.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='33' cy='78' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='167.5' cy='24.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='167' cy='24' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='167.5' cy='51.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='167' cy='51' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='167.5' cy='78.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='167' cy='78' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='7.5' cy='19.8' r='2.1' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='7' cy='19' r='1.7' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='193.5' cy='19.8' r='2.1' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='193' cy='19' r='1.7' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='7.5' cy='80.8' r='2.1' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='7' cy='80' r='1.7' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='193.5' cy='80.8' r='2.1' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='193' cy='80' r='1.7' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Cpath d='M82 0H118V22C118 34 110 41 100 46C90 41 82 34 82 22Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M86 3H114V21.5C114 31 108 36.5 100 41C92 36.5 86 31 86 21.5Z' fill='none' stroke='%238f4c08' stroke-opacity='.65' stroke-width='.9'/%3E%3Cpath d='M100 27a3.2 3.2 0 0 1 1.9 5.8l1.1 4.7h-6l1.1-4.7A3.2 3.2 0 0 1 100 27Z' fill='%232a1202'/%3E%3C/svg%3E");
    --rb-cofre-arte-tapa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 66'%3E%3Cdefs%3E%3ClinearGradient id='m' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%232a1270'/%3E%3Cstop offset='.17' stop-color='%238a66f0'/%3E%3Cstop offset='.32' stop-color='%236a43d0'/%3E%3Cstop offset='.64' stop-color='%234a27a0'/%3E%3Cstop offset='1' stop-color='%232e1772'/%3E%3C/linearGradient%3E%3ClinearGradient id='l' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23fff' stop-opacity='.12'/%3E%3Cstop offset='.4' stop-color='%23fff' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%2305001a' stop-opacity='.4'/%3E%3C/linearGradient%3E%3ClinearGradient id='b' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23000' stop-opacity='.35'/%3E%3Cstop offset='.14' stop-color='%23fff' stop-opacity='.38'/%3E%3Cstop offset='.3' stop-color='%23fff' stop-opacity='0'/%3E%3C/linearGradient%3E%3CradialGradient id='n' cx='.5' cy='.45' r='.65'%3E%3Cstop offset='0' stop-color='%23283394'/%3E%3Cstop offset='.6' stop-color='%2311165a'/%3E%3Cstop offset='1' stop-color='%23060828'/%3E%3C/radialGradient%3E%3CradialGradient id='h' cx='.5' cy='.5' r='.5'%3E%3Cstop offset='0' stop-color='%23ffe6a0' stop-opacity='.8'/%3E%3Cstop offset='.45' stop-color='%23ffb84a' stop-opacity='.25'/%3E%3Cstop offset='1' stop-color='%23ffb84a' stop-opacity='0'/%3E%3C/radialGradient%3E%3ClinearGradient id='e' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fffbe8'/%3E%3Cstop offset='.45' stop-color='%23ffd25a'/%3E%3Cstop offset='1' stop-color='%23c77810'/%3E%3C/linearGradient%3E%3ClinearGradient id='o' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff8d6'/%3E%3Cstop offset='.2' stop-color='%23ffd866'/%3E%3Cstop offset='.48' stop-color='%23e9981a'/%3E%3Cstop offset='.66' stop-color='%23ffcf55'/%3E%3Cstop offset='1' stop-color='%238a4708'/%3E%3C/linearGradient%3E%3ClinearGradient id='oh' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23fff3c0'/%3E%3Cstop offset='.22' stop-color='%23ffd560'/%3E%3Cstop offset='.5' stop-color='%23eda21f'/%3E%3Cstop offset='.7' stop-color='%23ffc94a'/%3E%3Cstop offset='1' stop-color='%2386440a'/%3E%3C/linearGradient%3E%3CradialGradient id='rm' cx='.35' cy='.32' r='.75'%3E%3Cstop offset='0' stop-color='%23fffbe6'/%3E%3Cstop offset='.35' stop-color='%23ffd25a'/%3E%3Cstop offset='1' stop-color='%239a5208'/%3E%3C/radialGradient%3E%3Cfilter id='v' x='0' y='0' width='1' height='1'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.006 .36' numOctaves='3' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 .7 0 0 0 0 .58 0 0 0 0 1 0 0 0 1 -.6'/%3E%3CfeComposite operator='in' in2='SourceGraphic'/%3E%3C/filter%3E%3ClinearGradient id='sf' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%230a0226' stop-opacity='.55'/%3E%3Cstop offset='1' stop-color='%230a0226' stop-opacity='0'/%3E%3C/linearGradient%3E%3CclipPath id='c'%3E%3Cpath d='M3 66V38C3 16 44 3 100 3S197 16 197 38V66Z'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M3 66V38C3 16 44 3 100 3S197 16 197 38V66Z' fill='url%28%23m%29'/%3E%3Cg clip-path='url%28%23c%29'%3E%3Crect x='3' y='0' width='194' height='66' filter='url%28%23v%29' opacity='.35'/%3E%3Cpath d='M10 12.0Q21.0 11.8 32.0 12.0T54.0 11.8T76.0 11.9T98.0 12.1T120.0 12.1T142.0 11.7T164.0 11.6T186.0 11.6T190.0 12.3M3 19.0Q14.8 19.1 26.5 19.0T50.0 19.0T73.5 18.6T97.0 18.7T120.5 19.1T144.0 18.6T167.5 18.6T191.0 18.7T197.0 18.7M3 36.0Q15.3 35.0 27.5 36.0T52.0 36.2T76.6 36.3T101.1 36.0T125.6 36.1T150.1 35.8T174.7 36.4T197.0 35.8M3 41.5Q14.5 42.0 26.0 41.5T49.1 41.3T72.1 41.8T95.1 41.2T118.2 41.2T141.2 41.9T164.3 41.9T187.3 41.3T197.0 41.9M3 51.5Q14.5 52.0 26.0 51.5T48.9 51.9T71.9 51.2T94.8 51.3T117.8 51.9T140.8 51.2T163.7 51.9T186.7 51.6T197.0 51.8' fill='none' stroke='%2312053a' stroke-opacity='.32' stroke-width='.55' transform='translate%280 .7%29'/%3E%3Cpath d='M10 12.0Q21.0 11.8 32.0 12.0T54.0 11.8T76.0 11.9T98.0 12.1T120.0 12.1T142.0 11.7T164.0 11.6T186.0 11.6T190.0 12.3M3 19.0Q14.8 19.1 26.5 19.0T50.0 19.0T73.5 18.6T97.0 18.7T120.5 19.1T144.0 18.6T167.5 18.6T191.0 18.7T197.0 18.7M3 36.0Q15.3 35.0 27.5 36.0T52.0 36.2T76.6 36.3T101.1 36.0T125.6 36.1T150.1 35.8T174.7 36.4T197.0 35.8M3 41.5Q14.5 42.0 26.0 41.5T49.1 41.3T72.1 41.8T95.1 41.2T118.2 41.2T141.2 41.9T164.3 41.9T187.3 41.3T197.0 41.9M3 51.5Q14.5 52.0 26.0 51.5T48.9 51.9T71.9 51.2T94.8 51.3T117.8 51.9T140.8 51.2T163.7 51.9T186.7 51.6T197.0 51.8' fill='none' stroke='%23c4b0ff' stroke-opacity='.24' stroke-width='.6'/%3E%3Cellipse cx='12' cy='38' rx='3.5' ry='1.47' fill='none' stroke='%23c9b6ff' stroke-opacity='.3' stroke-width='.6'/%3E%3Cellipse cx='12' cy='38' rx='2.17' ry='0.88' fill='none' stroke='%2312053a' stroke-opacity='.45' stroke-width='.6'/%3E%3Cellipse cx='12' cy='38' rx='0.98' ry='0.39' fill='%2312053a' fill-opacity='.55'/%3E%3Cellipse cx='186' cy='22' rx='3' ry='1.26' fill='none' stroke='%23c9b6ff' stroke-opacity='.3' stroke-width='.6'/%3E%3Cellipse cx='186' cy='22' rx='1.86' ry='0.75' fill='none' stroke='%2312053a' stroke-opacity='.45' stroke-width='.6'/%3E%3Cellipse cx='186' cy='22' rx='0.84' ry='0.33' fill='%2312053a' fill-opacity='.55'/%3E%3Cpath d='M3 29C40 23 160 23 197 29M3 46H197' stroke='%2314073c' stroke-width='2' fill='none'/%3E%3Cpath d='M3 30.8C40 24.8 160 24.8 197 30.8M3 47.8H197' stroke='%23a68cff' stroke-opacity='.25' stroke-width='.8' fill='none'/%3E%3Crect x='42' y='0' width='6' height='66' fill='url%28%23sf%29'/%3E%3Crect x='176' y='0' width='6' height='66' fill='url%28%23sf%29'/%3E%3Crect x='3' y='0' width='194' height='66' fill='url%28%23l%29'/%3E%3Crect x='24' y='0' width='18' height='66' fill='url%28%23oh%29'/%3E%3Crect x='158' y='0' width='18' height='66' fill='url%28%23oh%29'/%3E%3Crect x='24' y='0' width='18' height='66' fill='url%28%23b%29'/%3E%3Crect x='158' y='0' width='18' height='66' fill='url%28%23b%29'/%3E%3Cpath d='M24 0V66M42 0V66M158 0V66M176 0V66' stroke='%233f1e02' stroke-width='1.1'/%3E%3Cpath d='M25.2 0V66M159.2 0V66' stroke='%23fffbe6' stroke-opacity='.7' stroke-width='.7'/%3E%3C/g%3E%3Crect x='51' y='13' width='98' height='40' rx='7' fill='%233f1e02'/%3E%3Crect x='52.5' y='14.5' width='95' height='37' rx='6' fill='url%28%23n%29'/%3E%3Cpath d='M60 20L78 27L92 18M118 44L134 39L141 22' stroke='%23c9d4ff' stroke-opacity='.3' stroke-width='.5' fill='none'/%3E%3Ccircle cx='60' cy='20' r='0.7' fill='%23fff' fill-opacity='0.9'/%3E%3Ccircle cx='68' cy='41' r='0.55' fill='%23fff' fill-opacity='0.7'/%3E%3Ccircle cx='78' cy='27' r='0.9' fill='%23fff' fill-opacity='1'/%3E%3Ccircle cx='86' cy='46' r='0.5' fill='%23fff' fill-opacity='0.6'/%3E%3Ccircle cx='92' cy='18' r='0.55' fill='%23fff' fill-opacity='0.8'/%3E%3Ccircle cx='111' cy='19' r='0.6' fill='%23fff' fill-opacity='0.75'/%3E%3Ccircle cx='118' cy='44' r='0.85' fill='%23fff' fill-opacity='1'/%3E%3Ccircle cx='126' cy='27' r='0.5' fill='%23fff' fill-opacity='0.65'/%3E%3Ccircle cx='134' cy='39' r='0.65' fill='%23fff' fill-opacity='0.85'/%3E%3Ccircle cx='141' cy='22' r='0.75' fill='%23fff' fill-opacity='0.95'/%3E%3Ccircle cx='72' cy='33' r='0.4' fill='%23fff' fill-opacity='0.5'/%3E%3Ccircle cx='131' cy='31' r='0.4' fill='%23fff' fill-opacity='0.5'/%3E%3Ccircle cx='104' cy='47' r='0.45' fill='%23fff' fill-opacity='0.6'/%3E%3Ccircle cx='57' cy='30' r='0.45' fill='%23fff' fill-opacity='0.55'/%3E%3Ccircle cx='100' cy='33' r='16' fill='url%28%23h%29'/%3E%3Cpath d='M100 20.5L102.6 30.4L112.5 33L102.6 35.6L100 45.5L97.4 35.6L87.5 33L97.4 30.4Z' fill='url%28%23e%29'/%3E%3Cpath d='M87.5 33L97.4 30.4L100 20.5' fill='none' stroke='%23fffbe8' stroke-width='.6' stroke-opacity='.95'/%3E%3Crect x='52.5' y='14.5' width='95' height='37' rx='6' fill='none' stroke='url%28%23o%29' stroke-width='1.8'/%3E%3Ccircle cx='33.5' cy='20.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='33' cy='20' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='33.5' cy='42.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='33' cy='42' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='167.5' cy='20.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='167' cy='20' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Ccircle cx='167.5' cy='42.8' r='2.9' fill='%231a0636' fill-opacity='.5'/%3E%3Ccircle cx='167' cy='42' r='2.5' fill='url%28%23rm%29' stroke='%234a2402' stroke-width='.7'/%3E%3Cpath d='M3 55H197V66H3Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M3 56H197' stroke='%23fffbe6' stroke-width='.9' stroke-opacity='.9'/%3E%3Cpath d='M90 49H110V66H90Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M91.5 50.5H108.5' stroke='%23fffbe6' stroke-width='.8' stroke-opacity='.85'/%3E%3Cpath d='M3 66V38C3 16 44 3 100 3S197 16 197 38V66Z' fill='none' stroke='%23c7b3ff' stroke-opacity='.6' stroke-width='1' clip-path='url%28%23c%29'/%3E%3C/svg%3E");
    --rb-cofre-arte-tapa-dentro: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 60'%3E%3Cdefs%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%233a1d86'/%3E%3Cstop offset='1' stop-color='%23170a40'/%3E%3C/linearGradient%3E%3ClinearGradient id='p' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%2393309f'/%3E%3Cstop offset='.55' stop-color='%23611877'/%3E%3Cstop offset='1' stop-color='%232e0a44'/%3E%3C/linearGradient%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23000' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%2305001a' stop-opacity='.4'/%3E%3C/linearGradient%3E%3ClinearGradient id='o' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff8d6'/%3E%3Cstop offset='.2' stop-color='%23ffd866'/%3E%3Cstop offset='.48' stop-color='%23e9981a'/%3E%3Cstop offset='.66' stop-color='%23ffcf55'/%3E%3Cstop offset='1' stop-color='%238a4708'/%3E%3C/linearGradient%3E%3CclipPath id='q'%3E%3Crect x='14' y='13' width='172' height='41' rx='5'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M3 60V8Q3 2 9 2H191Q197 2 197 8V60Z' fill='url%28%23f%29'/%3E%3Crect x='14' y='13' width='172' height='41' rx='5' fill='url%28%23p%29'/%3E%3Cg clip-path='url%28%23q%29'%3E%3Cpath d='M-40 10l46 46M6 10l-46 46M-24 10l46 46M22 10l-46 46M-8 10l46 46M38 10l-46 46M8 10l46 46M54 10l-46 46M24 10l46 46M70 10l-46 46M40 10l46 46M86 10l-46 46M56 10l46 46M102 10l-46 46M72 10l46 46M118 10l-46 46M88 10l46 46M134 10l-46 46M104 10l46 46M150 10l-46 46M120 10l46 46M166 10l-46 46M136 10l46 46M182 10l-46 46M152 10l46 46M198 10l-46 46M168 10l46 46M214 10l-46 46M184 10l46 46M230 10l-46 46M200 10l46 46M246 10l-46 46' stroke='%231a0024' stroke-opacity='.38' stroke-width='.9'/%3E%3Cpath d='M-40 10l46 46M6 10l-46 46M-24 10l46 46M22 10l-46 46M-8 10l46 46M38 10l-46 46M8 10l46 46M54 10l-46 46M24 10l46 46M70 10l-46 46M40 10l46 46M86 10l-46 46M56 10l46 46M102 10l-46 46M72 10l46 46M118 10l-46 46M88 10l46 46M134 10l-46 46M104 10l46 46M150 10l-46 46M120 10l46 46M166 10l-46 46M136 10l46 46M182 10l-46 46M152 10l46 46M198 10l-46 46M168 10l46 46M214 10l-46 46M184 10l46 46M230 10l-46 46M200 10l46 46M246 10l-46 46' stroke='%23ffb3f0' stroke-opacity='.13' stroke-width='.5' transform='translate%280 .9%29'/%3E%3Ccircle cx='14' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='30' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='46' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='62' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='78' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='94' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='110' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='126' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='142' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='158' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='174' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='190' cy='17' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='22' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='38' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='54' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='70' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='86' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='102' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='118' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='134' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='150' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='166' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='182' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='198' cy='33' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='14' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='30' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='46' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='62' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='78' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='94' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='110' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='126' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='142' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='158' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='174' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3Ccircle cx='190' cy='49' r='.9' fill='%23ffc4f0' fill-opacity='.35'/%3E%3C/g%3E%3Crect x='14' y='13' width='172' height='41' rx='5' fill='none' stroke='%23d79bff' stroke-opacity='.32' stroke-width='.8'/%3E%3Crect x='3' y='2' width='194' height='58' fill='url%28%23s%29'/%3E%3Cpath d='M3 11V8Q3 2 9 2H191Q197 2 197 8V11Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.1' paint-order='stroke'/%3E%3Cpath d='M3 11H11V60H3ZM189 11H197V60H189Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='.9' paint-order='stroke'/%3E%3C/svg%3E");
    --rb-cofre-arte-arco: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 26'%3E%3Cdefs%3E%3ClinearGradient id='oh' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%23fff3c0'/%3E%3Cstop offset='.22' stop-color='%23ffd560'/%3E%3Cstop offset='.5' stop-color='%23eda21f'/%3E%3Cstop offset='.7' stop-color='%23ffc94a'/%3E%3Cstop offset='1' stop-color='%2386440a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12.5 26V14a11.5 11.5 0 0 1 23 0V26' fill='none' stroke='%233f1e02' stroke-width='7.4'/%3E%3Cpath d='M12.5 26V14a11.5 11.5 0 0 1 23 0V26' fill='none' stroke='url%28%23oh%29' stroke-width='5.2'/%3E%3Cpath d='M11.1 24V14a12.9 12.9 0 0 1 9.6-12.5' fill='none' stroke='%23fffbe6' stroke-opacity='.85' stroke-width='1.1'/%3E%3C/svg%3E");
    --rb-cofre-arte-cuerpo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 38'%3E%3Cdefs%3E%3ClinearGradient id='o' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff8d6'/%3E%3Cstop offset='.2' stop-color='%23ffd866'/%3E%3Cstop offset='.48' stop-color='%23e9981a'/%3E%3Cstop offset='.66' stop-color='%23ffcf55'/%3E%3Cstop offset='1' stop-color='%238a4708'/%3E%3C/linearGradient%3E%3CradialGradient id='gm' cx='.38' cy='.32' r='.8'%3E%3Cstop offset='0' stop-color='%23ffe0f3'/%3E%3Cstop offset='.38' stop-color='%23ff4fae'/%3E%3Cstop offset='1' stop-color='%239c0f68'/%3E%3C/radialGradient%3E%3ClinearGradient id='es' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23fff1b8'/%3E%3Cstop offset='.5' stop-color='%23e9a21f'/%3E%3Cstop offset='1' stop-color='%238f4c08'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M2.5 6.5a5 5 0 0 1 5-5h33a5 5 0 0 1 5 5v14c0 9.5-9.5 15.5-21.5 16.5C12 36 2.5 30 2.5 20.5Z' fill='url%28%23o%29' stroke='%233f1e02' stroke-width='1.3' paint-order='stroke'/%3E%3Cpath d='M4.4 19.5V7a3.6 3.6 0 0 1 3.6-3.6h31' fill='none' stroke='%23fffbe6' stroke-opacity='.9' stroke-width='1'/%3E%3Cpath d='M24 3.5l3.3 8.4 8.4 3.3-8.4 3.3-3.3 8.4-3.3-8.4-8.4-3.3 8.4-3.3Z' fill='url%28%23es%29' stroke='%235a2c04' stroke-opacity='.6' stroke-width='.6'/%3E%3Ccircle cx='24' cy='15.2' r='6.6' fill='%233f0828'/%3E%3Ccircle cx='24' cy='15.2' r='5.8' fill='url%28%23gm%29'/%3E%3Cpath d='M24 9.8l3.8 2.8-1.4 4.6h-4.8l-1.4-4.6Z' fill='%23fff' fill-opacity='.24'/%3E%3Ccircle cx='22' cy='13.1' r='1.5' fill='%23fff' fill-opacity='.92'/%3E%3Cpath d='M24 25.6a2.6 2.6 0 0 1 1.5 4.7l.9 3.9h-4.8l.9-3.9A2.6 2.6 0 0 1 24 25.6Z' fill='%232a1202'/%3E%3C/svg%3E");
    --rb-cofre-arte-silueta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 170'%3E%3Cpath d='M3 66V38C3 16 44 3 100 3S197 16 197 38V66Z'/%3E%3Cpath transform='translate%280 66%29' d='M3 0H197V88Q197 102 183 102H17Q3 102 3 88Z'/%3E%3C/svg%3E");
    /* ARTE: HASTA AQUÍ */
  }
}

/* En la web, un cofre por día (01/11/2026): abierto, el botón se apaga. */
@layer rb-pantallas {
  .rb-cofre-abrir:disabled {
    cursor: default;
    filter: saturate(0.35) brightness(0.8);
    box-shadow: none;
    transform: none;
  }
}
