/* =========================================
   FICHAS Y RESULTADOS DE LOS JUEGOS
   Lo de frontend.css que solo usan las vistas de lottery/. Lo pide cada
   vista con @pushOnce y carga justo despues de frontend.css.
========================================= */

.numeric-game--la-quiniela {
    --public-game-accent: var(--color-juego-la-quiniela);
    --public-game-accent-dark: var(--color-juego-la-quiniela-oscuro);
    --public-game-accent-soft: var(--color-juego-la-quiniela-suave);
}

.numeric-game--el-quinigol {
    --public-game-accent: var(--color-juego-el-quinigol);
    --public-game-accent-dark: var(--color-juego-el-quinigol-oscuro);
    --public-game-accent-soft: var(--color-juego-el-quinigol-suave);
}

.numeric-game--lototurf {
    --public-game-accent: var(--color-juego-lototurf);
    --public-game-accent-dark: var(--color-juego-lototurf-oscuro);
    --public-game-accent-soft: var(--color-juego-lototurf-suave);
}

.numeric-game--quintuple-plus {
    --public-game-accent: var(--color-juego-quintuple-plus);
    --public-game-accent-dark: var(--color-juego-quintuple-plus-oscuro);
    --public-game-accent-soft: var(--color-juego-quintuple-plus-suave);
}

.public-game-eyebrow {
    margin: 0 0 8px;
    color: var(--public-game-accent-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.public-game-copy {
    border: 1px solid #e3e8e4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.public-game-section__header p,
.public-game-copy p {
    color: #64748b;
    line-height: 1.55;
}

.public-game-section {
    padding: 24px 0;
}

.public-game-section--faq {
    padding-bottom: 18px;
}

.public-game-section__header {
    max-width: 780px;
    margin-bottom: 18px;
}

.public-game-section__header h2,
.public-game-copy h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 1.55rem;
    line-height: 1.18;
}

.public-game-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    gap: 20px;
    align-items: stretch;
}

.public-game-copy {
    padding: 22px;
}

.public-game-copy p {
    margin: 0;
}

.public-game-faq-list {
    display: grid;
    gap: 10px;
}

.public-game-faq {
    border: 1px solid #e3e8e4;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.public-game-faq summary {
    cursor: pointer;
    padding: 15px 18px;
    color: #111827;
    font-weight: 800;
}

.public-game-faq summary:focus-visible {
    outline: 2px solid rgba(47, 138, 62, 0.26);
    outline-offset: 2px;
}

.public-game-faq p {
    margin: 0;
    padding: 0 18px 16px;
    color: #4b5563;
    line-height: 1.58;
}

@media (max-width: 860px) {
    .public-game-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .public-game-copy {
        padding: 18px;
    }

}

/* Bonoloto, con su color de colores-juegos.css: la ficha, sus dos paginas de
   resultados y la del resultado de una fecha. */
.numeric-game--bonoloto {
    --bonoloto-official: var(--color-juego-bonoloto);
    --bonoloto-official-dark: var(--color-juego-bonoloto-oscuro);
    --bonoloto-official-soft: var(--color-juego-bonoloto-suave);
    --bonoloto-extra: var(--color-juego-bonoloto-oscuro);
    --bonoloto-extra-soft: var(--color-juego-bonoloto-suave);
}

.euromillones-stars {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.euromillones-page .bonoloto-extra-ball.euromillones-star {
    border-color: rgba(200, 157, 18, 0.28);
    background: #fffdf2;
    color: #8a6400;
}

/* Tarjeta de El Millon, en la ficha y en la pagina del sorteo. La caja es la
   de Donde ha tocado (.donde-ha-tocado); aqui solo el codigo y los botones,
   colocados como los de la tarjeta del Joker. */
.euromillones-page .el-millon-card {
    margin-top: 14px;
}

.euromillones-page .el-millon-card__code {
    margin: 0;
    color: var(--bonoloto-official-dark);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.euromillones-page .el-millon-card__pendiente {
    margin: 0;
    color: #6b7280;
    font-size: 1.05rem;
    font-weight: 700;
}

.euromillones-page .el-millon-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

@media (max-width: 759px) {
    .euromillones-page .el-millon-card__actions .bonoloto-result-card__button {
        width: 100%;
    }
}

.bonoloto-hero {
    padding: 12px 0 22px;
}

/* Tres columnas a la misma altura: titulo y entradilla, proximo sorteo y
   cierre, y JUGAR con el bote debajo. Las dos de la derecha miden lo que su
   contenido y el texto se queda con el resto, asi que nada se ensancha. Una
   columna que no sale no deja hueco: es flex, no una rejilla con sitios fijos.
   --hero-hueco es la separacion entre columnas y --hero-raya la de las rayas
   que las separan. */
.bonoloto-hero__layout {
    --hero-hueco: 1.5rem;
    --hero-raya: rgba(47, 138, 62, 0.16);
    display: flex;
    align-items: center;
    gap: var(--hero-hueco);
    padding: 18px 24px;
    border: 1px solid rgba(47, 138, 62, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(47, 138, 62, 0.1), rgba(255, 255, 255, 0.96) 44%),
        #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

/* La columna de la derecha. En el HTML el bote va antes que JUGAR (el orden
   de movil); en escritorio se invierte para que JUGAR quede arriba. Puede
   estrecharse si no cabe -el bote parte su importe-, pero nunca por debajo
   de la imagen de JUGAR ni de la palabra mas larga (min-content). */
.bonoloto-hero__lateral {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.4rem;
    min-width: min-content;
}

.bonoloto-hero__content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.bonoloto-hero h1 {
    margin: 0 0 6px;
    max-width: 860px;
    color: #102018;
    font-size: 2rem;
    line-height: 1.08;
}

.bonoloto-hero__lead {
    margin: 0;
    max-width: 760px;
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.5;
}

.bonoloto-hero__actions,
.bonoloto-final-cta__buttons {
    width: 100%;
}

/* La imagen oficial de JUGAR no se estira (153x45: se veria borrosa y el
   doble de alta); va centrada en su columna. El boton propio, que es CSS,
   si ocupa todo el ancho de la columna. */
.bonoloto-hero__actions .selae-cta-buttons {
    justify-content: center;
}

.bonoloto-final-cta__buttons .selae-cta-buttons {
    justify-content: flex-start;
}

.bonoloto-final-cta__buttons .selae-cta-buttons__link {
    width: auto;
    max-width: 220px;
}

.bonoloto-final-cta__buttons .selae-cta-buttons__image {
    max-width: 220px;
}

.bonoloto-hero__actions .selae-cta-buttons {
    gap: 8px;
}

.bonoloto-hero__actions .selae-cta-buttons__link {
    width: auto;
    max-width: 168px;
    border-radius: 7px;
}

.bonoloto-hero__actions .selae-cta-buttons__image {
    width: auto;
    max-width: 168px;
    max-height: 48px;
    border-radius: 7px;
}

/* La columna del proximo sorteo y del cierre de venta, sin recuadro: una raya
   a la izquierda la separa del titulo. Cada dato en una linea, el rotulo a la
   izquierda y el valor a la derecha, sin partirse. Si no caben juntos
   (pantallas muy estrechas), el valor baja entero bajo el rotulo. */
.bonoloto-hero__datos {
    flex: none;
    padding-left: var(--hero-hueco);
    border-left: 1px solid var(--hero-raya);
}

.bonoloto-hero__lista {
    margin: 0;
}

.bonoloto-hero__dato,
.bonoloto-hero__bote {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.15rem 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(47, 138, 62, 0.1);
}

.bonoloto-hero__dato:last-child {
    border-bottom: 0;
}

.bonoloto-hero__dato dt,
.bonoloto-hero__bote dt {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
}

.bonoloto-hero__dato dd,
.bonoloto-hero__bote dd {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.25;
    white-space: nowrap;
}

/* La fecha, la hora y el cierre, en semi-negrita y gris muy oscuro, como en la
   tarjeta de la portada. La fecha y el cierre van enteros si caben y, si no,
   con el dia abreviado (partials/en-una-linea): el valor baja entero bajo el
   rotulo y solo se abrevia si tampoco cabe ahi. */
.bonoloto-hero__dato dd {
    color: var(--text);
    font-weight: 600;
}

/* La fecha con el hipodromo de la Apuesta Hipica detras. El hipodromo se queda
   con lo que sobra de la linea de la fecha, entero o en su forma corta
   (partials/en-una-linea). Si ahi no cabe ni la forma corta, baja a
   una linea suya: el punto va en el hueco de delante del hipodromo y, en el
   borde de la linea, se corta (overflow-x: clip), asi que ninguna linea empieza
   por "·". */
.bonoloto-hero__dato dd:has(> .bonoloto-hero__detalle) {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: var(--hueco-del-punto);
    overflow-x: clip;
}

/* En letra normal: acompana a la fecha y no es el dato. */
.bonoloto-hero__detalle {
    position: relative;
    flex: 1 1 0;
    font-weight: 400;
}

.bonoloto-hero__detalle::before {
    content: "·";
    position: absolute;
    right: 100%;
    width: var(--hueco-del-punto);
    text-align: center;
}

/* El bote, bajo JUGAR: el rotulo encima del importe, centrados en su columna,
   sin raya y con el importe en el verde del juego. Si la columna se estrecha,
   el importe se parte. */
.bonoloto-hero__bote {
    margin: 0;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0;
    border-bottom: 0;
    text-align: center;
}

.bonoloto-hero__bote dd {
    color: var(--bonoloto-official, #2f8a3e);
    font-weight: 800;
    white-space: normal;
}

.bonoloto-note {
    color: #64748b;
    line-height: 1.55;
}

.bonoloto-section {
    padding: 24px 0;
}

.bonoloto-section--soft {
    background: #f7faf8;
    border-top: 1px solid #edf2ef;
    border-bottom: 1px solid #edf2ef;
}

.bonoloto-section--faq {
    padding-bottom: 18px;
}

.bonoloto-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    gap: 22px;
    align-items: center;
}

.bonoloto-panel,
.bonoloto-final-cta {
    border: 1px solid #e3e8e4;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

.bonoloto-panel {
    padding: 22px;
}

.bonoloto-panel h2,
.bonoloto-copy h2,
.bonoloto-section__header h2,
.bonoloto-final-cta h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 1.55rem;
    line-height: 1.18;
}

.bonoloto-panel p,
.bonoloto-copy p,
.bonoloto-section__header p,
.bonoloto-final-cta p {
    margin: 0;
    color: #4b5563;
    line-height: 1.62;
}

.bonoloto-copy p + p,
.bonoloto-panel p + p {
    margin-top: 12px;
}

.bonoloto-section__header {
    max-width: 780px;
    margin-bottom: 18px;
}

/* El titulo del bloque del ultimo resultado en la ficha de cualquier juego
   (partials/ultimo-sorteo-celebrado): el rotulo y, debajo, el sorteo con su
   enlace a la pagina de ese dia, mas pequeno y con el color del juego. */
.ultimo-sorteo {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    color: #111827;
    font-size: 1.55rem;
    line-height: 1.18;
}

.ultimo-sorteo__sorteo {
    color: var(--public-game-accent-dark, var(--bonoloto-official-dark, var(--color-juego-base-oscuro)));
    font-size: 0.6em;
    font-weight: 700;
    line-height: 1.35;
}

a.ultimo-sorteo__sorteo {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

a.ultimo-sorteo__sorteo:hover,
a.ultimo-sorteo__sorteo:focus-visible {
    text-decoration-thickness: 2px;
}

.bonoloto-section__header--compact {
    margin-bottom: 12px;
}

.bonoloto-panel--result > .bonoloto-section__header--compact {
    max-width: none;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid #e5eee7;
}

.bonoloto-panel--result > .bonoloto-table-wrap,
.bonoloto-panel--result > .bonoloto-note {
    margin-bottom: 4px;
}

.bonoloto-section__header h3 {
    margin: 0;
    color: #111827;
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.2;
}

.bonoloto-result-card {
    display: grid;
    gap: 18px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #dce9dc;
    border-radius: 14px;
    background: #fbfdfb;
}

.bonoloto-result-card__label {
    display: block;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 700;
}

.bonoloto-result-card__empty {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 0.94rem;
}

.numeric-game--el-gordo-de-la-primitiva .bonoloto-balls--history {
    flex-wrap: wrap;
    overflow-x: visible;
}

.bonoloto-extra-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid rgba(47, 138, 62, 0.16);
    border-radius: 50%;
    background: #ffffff;
    color: var(--bonoloto-official-dark);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}

.bonoloto-extra-ball--refund {
    color: #7c2d12;
    border-color: rgba(124, 45, 18, 0.18);
}

.bonoloto-result-card__meta .lottery-result-extra--meta {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    width: fit-content;
    gap: 10px;
    padding: 7px 10px;
    border: 1px solid var(--public-game-accent, var(--bonoloto-official-dark));
    border-radius: 999px;
    background: var(--public-game-accent-soft, #ffffff);
}

.bonoloto-result-card__meta .lottery-result-extra--meta:last-child {
    padding: 7px 10px;
    border: 1px solid var(--public-game-accent, var(--bonoloto-official-dark));
}

.bonoloto-result-card__meta .lottery-result-extra--meta.lottery-result-extra--ball,
.bonoloto-result-card__meta .lottery-result-extra--meta.lottery-result-extra--ball:last-child {
    gap: 7px;
    padding: 5px 8px;
}

.bonoloto-result-card__meta .lottery-result-extra--meta dt {
    color: var(--public-game-accent-dark, var(--bonoloto-official-dark));
    font-weight: 800;
}

.bonoloto-result-card__meta .lottery-result-extra--meta dd {
    color: var(--public-game-accent-dark, var(--bonoloto-official-dark));
}

.bonoloto-result-card__meta {
    display: grid;
    gap: 10px;
    margin: 0;
}

.bonoloto-result-card__meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8eee8;
}

.bonoloto-result-card__meta div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.bonoloto-result-card__meta dt {
    color: #64748b;
    font-size: 0.92rem;
}

.bonoloto-result-card__meta dd {
    margin: 0;
    color: #111827;
    font-weight: 700;
    text-align: right;
}

.bonoloto-result-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.bonoloto-result-card__button,
.bonoloto-results-hero__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    background: var(--bonoloto-official-dark);
    padding: 0.78rem 1rem;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(47, 138, 62, 0.18);
}

/* En la ficha y en la pagina del resultado la cabecera tiene un ancho de
   lectura; con el boton llega hasta el borde derecho de la tarjeta. */
.bonoloto-section__header--con-directo {
    max-width: none;
}

.bonoloto-result-card__button--secondary,
.bonoloto-results-hero__back--ghost {
    background: #ffffff;
    color: var(--bonoloto-official-dark);
    border: 1px solid rgba(37, 111, 49, 0.18);
    box-shadow: none;
}

.bonoloto-result-card__button:hover,
.bonoloto-results-hero__back:hover {
    background: #1f5d29;
}

.bonoloto-result-card__button--secondary:hover,
.bonoloto-results-hero__back--ghost:hover {
    background: var(--bonoloto-official-soft);
}

/* Los botones bajo el ultimo resultado de la ficha llevan el color de su juego:
   "Resultados anteriores" relleno, como accion principal y bien visible, y
   "Histórico" y "Estadísticas" con letra y filete de ese color. Sin color de
   juego, el de siempre. */
.numeric-game-links {
    --consulta-color: var(--public-game-accent-dark, var(--bonoloto-official-dark));
}

.numeric-game-links .bonoloto-result-card__button {
    background: var(--consulta-color);
}

.numeric-game-links .bonoloto-result-card__button:hover,
.numeric-game-links .bonoloto-result-card__button:focus-visible {
    background: color-mix(in srgb, var(--consulta-color) 82%, #000000);
}

.numeric-game-links .bonoloto-result-card__button--secondary {
    border-color: color-mix(in srgb, var(--consulta-color) 35%, transparent);
    background: #ffffff;
    color: var(--consulta-color);
}

.numeric-game-links .bonoloto-result-card__button--secondary:hover,
.numeric-game-links .bonoloto-result-card__button--secondary:focus-visible {
    background: color-mix(in srgb, var(--consulta-color) 10%, #ffffff);
}

.bonoloto-results-hero {
    padding: 12px 0 22px;
}

.bonoloto-results-hero__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(47, 138, 62, 0.18);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(47, 138, 62, 0.1), rgba(255, 255, 255, 0.96) 48%),
        #ffffff;
    padding: 24px 26px;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.bonoloto-results-hero__inner h1 {
    margin: 0 0 10px;
    color: #102018;
    font-size: 2.2rem;
    line-height: 1.1;
}

.bonoloto-results-hero__inner p {
    margin: 0;
    max-width: 760px;
    color: #4b5563;
    line-height: 1.55;
}

.bonoloto-section--history {
    border-top: 1px solid #edf2ef;
    border-bottom: 1px solid #edf2ef;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7fbf7 100%);
}

.bonoloto-history {
    display: grid;
    gap: 18px;
}

.bonoloto-history__list {
    display: grid;
    gap: 10px;
}

.bonoloto-history-result {
    display: grid;
    grid-template-columns: minmax(130px, 0.22fr) minmax(0, 1fr) minmax(110px, auto);
    gap: 16px;
    align-items: center;
    border: 1px solid rgba(47, 138, 62, 0.15);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.bonoloto-history-result.is-hidden {
    display: none;
}

.bonoloto-history-result__date,
.bonoloto-history-result__numbers {
    display: grid;
    gap: 6px;
}

.bonoloto-history-result__date span,
.bonoloto-history-result__numbers > span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.bonoloto-history-result__date strong {
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
}

.bonoloto-history-result__date a {
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
    text-decoration: none;
}

.bonoloto-history-result__date a:hover {
    color: var(--bonoloto-official-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bonoloto-history-result__date--full {
    align-self: center;
}

.bonoloto-history-result__date--full span {
    color: #111827;
    font-size: 0.82rem;
    line-height: 1.35;
    text-transform: none;
}

.numeric-game--el-quinigol .bonoloto-history-result--quinigol {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    padding-block: 8px;
}

.numeric-game--el-quinigol .bonoloto-history-result--quinigol .bonoloto-history-result__numbers {
    gap: 0.42rem;
    min-width: 0;
}

.quinigol-history-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.quinigol-history-heading {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.22rem 0.38rem;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.18;
    white-space: nowrap;
}

.quinigol-history-heading__title,
.quinigol-history-heading__separator,
.quinigol-history-heading__date,
.quinigol-history-heading__round {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.quinigol-history-heading__title {
    color: var(--public-game-accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
}

.quinigol-history-heading__date,
.quinigol-history-heading__round {
    color: #111827;
    font-size: 0.84rem;
    font-weight: 500;
}

.quinigol-history-heading__separator {
    color: var(--public-game-accent);
    font-weight: 400;
}

.quinigol-history-card__link {
    align-self: flex-start;
    flex: 0 0 auto;
}

.numeric-game--la-quiniela .bonoloto-history-result--quiniela {
    grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
    gap: 8px 12px;
    padding-block: 8px;
}

.numeric-game--la-quiniela .bonoloto-history-result--quiniela .bonoloto-history-result__numbers {
    gap: 0.42rem;
    min-width: 0;
}

.numeric-game--la-quiniela .bonoloto-history-result--quiniela .bonoloto-history-result__link {
    align-self: start;
}

.quiniela-history-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.28rem 0.5rem;
    color: #111827;
    line-height: 1.2;
}

.quiniela-history-heading__title,
.quiniela-history-heading__separator,
.quiniela-history-heading__date,
.quiniela-history-heading__round,
.quiniela-history-heading__season {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.quiniela-history-heading__title {
    color: var(--public-game-accent-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.quiniela-history-heading__date,
.quiniela-history-heading__round,
.quiniela-history-heading__season {
    font-size: 0.84rem;
    font-weight: 850;
}

.quiniela-history-heading__separator {
    color: var(--public-game-accent);
    font-weight: 900;
}

.quiniela-history-heading__season-label-short {
    display: none;
}

.quiniela-result-detail-heading {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.2rem 0.36rem;
    margin: 0 0 0.3rem;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.18;
    white-space: nowrap;
}

.quiniela-result-detail-heading__title,
.quiniela-result-detail-heading__separator,
.quiniela-result-detail-heading__round,
.quiniela-result-detail-heading__date,
.quiniela-result-detail-heading__season {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.quiniela-result-detail-heading__title {
    color: var(--public-game-accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
}

.quiniela-result-detail-heading__separator {
    color: var(--public-game-accent);
    font-weight: 400;
}

.quiniela-result-detail-heading__round,
.quiniela-result-detail-heading__date,
.quiniela-result-detail-heading__season {
    color: #111827;
    font-size: 0.84rem;
    font-weight: 500;
}

.quinigol-result-detail-heading {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.2rem 0.36rem;
    margin: 0 0 0.3rem;
    color: #111827;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.18;
    white-space: nowrap;
}

.quinigol-result-detail-heading__title,
.quinigol-result-detail-heading__separator,
.quinigol-result-detail-heading__round,
.quinigol-result-detail-heading__date,
.quinigol-result-detail-heading__season {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.quinigol-result-detail-heading__title {
    color: var(--public-game-accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
}

.quinigol-result-detail-heading__separator {
    color: var(--public-game-accent);
    font-weight: 400;
}

.quinigol-result-detail-heading__round,
.quinigol-result-detail-heading__date,
.quinigol-result-detail-heading__season {
    color: #111827;
    font-size: 0.84rem;
    font-weight: 500;
}

@media (max-width: 640px) {
    .numeric-game--el-quinigol .bonoloto-history-result--quinigol {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .numeric-game--el-quinigol .bonoloto-history-result--quinigol .bonoloto-history-result__link {
        width: auto;
    }

    .quinigol-history-card__top {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .quinigol-history-card__link {
        margin-left: auto;
    }

    .quinigol-history-heading,
    .quinigol-result-detail-heading {
        flex-wrap: wrap;
        font-size: 0.78rem;
        row-gap: 0.18rem;
        white-space: normal;
    }

    .quinigol-history-heading__title,
    .quinigol-history-heading__date,
    .quinigol-history-heading__round,
    .quinigol-result-detail-heading__title,
    .quinigol-result-detail-heading__round,
    .quinigol-result-detail-heading__date,
    .quinigol-result-detail-heading__season {
        font-size: 0.78rem;
    }

    .numeric-game--la-quiniela .bonoloto-history-result--quiniela {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .numeric-game--la-quiniela .bonoloto-history-result--quiniela .bonoloto-history-result__link {
        width: 100%;
    }

    .quiniela-history-heading {
        row-gap: 0.2rem;
    }

    .quiniela-history-heading__season-label {
        display: none;
    }

    .quiniela-history-heading__season-label-short {
        display: inline;
    }

    .quiniela-result-detail-heading {
        font-size: 0.78rem;
        flex-wrap: wrap;
        row-gap: 0.18rem;
        white-space: normal;
    }

    .quiniela-result-detail-heading__title,
    .quiniela-result-detail-heading__round,
    .quiniela-result-detail-heading__date,
    .quiniela-result-detail-heading__season {
        font-size: 0.78rem;
    }
}

.bonoloto-history-result__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 999px;
    background: #f0f7f0;
    padding: 0.65rem 0.85rem;
    color: var(--bonoloto-official-dark);
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.bonoloto-history-result__link:hover {
    background: var(--bonoloto-official-dark);
    color: #ffffff;
}

.special-result__jornada {
    margin: 0;
    color: var(--public-game-accent-dark, #256f31);
    font-size: 0.9rem;
    font-weight: 800;
}

.bonoloto-section__subeyebrow {
    margin: 0;
    color: var(--public-game-accent-dark, #256f31);
    font-size: 0.94rem;
    font-weight: 900;
}

.special-result--lototurf {
    gap: 0.6rem;
}

.special-result--lototurf .special-result__items {
    justify-content: flex-start;
}

.special-result--lototurf .special-result__items span {
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    min-height: 2.45rem;
    padding: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0) 34%),
        linear-gradient(145deg, var(--public-game-accent), var(--public-game-accent-dark));
    color: #ffffff;
    box-shadow:
        inset 0 -5px 10px rgba(0, 0, 0, 0.16),
        0 7px 16px rgba(122, 90, 40, 0.22);
}

.special-result__summary--hipica {
    gap: 0.45rem;
}

.special-result__summary--hipica div {
    padding: 0.4rem 0.55rem;
}

.special-result__summary--hipica dd {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.special-result__summary-value--ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    min-height: 1.55rem;
    border-radius: 7px;
    background: var(--public-game-accent);
    color: #ffffff;
    padding: 0.18rem 0.36rem;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   Resultado de Loteria Nacional: su presentacion vive en su propia hoja.

   Las tres paginas que pintan marcado .lnac- -portada del juego, resultados
   anteriores y ficha del sorteo- cargan public/css/loteria-nacional-resultados.css.
   Aqui no queda ninguna regla .lnac-: habia dos sitios donde cambiar lo mismo.
   -------------------------------------------------------------------------- */

.special-result--lototurf .special-result__summary-value--ball {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0;
    border-radius: 50%;
}

.special-result__horse-icon {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
    fill: var(--public-game-accent-dark);
}

.numeric-game--lototurf .lototurf-result-heading__meta,
.bonoloto-history-result__date--full .lototurf-result-heading__meta,
.numeric-game--quintuple-plus .quintuple-plus-result-heading__meta,
.bonoloto-history-result__date--full .quintuple-plus-result-heading__meta {
    font-weight: 400;
}

.numeric-game--lototurf .bonoloto-panel--result .bonoloto-section__header h2 {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.12;
    white-space: nowrap;
}

.bonoloto-history-result__date--full strong,
.bonoloto-history-result__date--full .lototurf-result-heading__meta,
.bonoloto-history-result__date--full .quintuple-plus-result-heading__meta {
    font-size: inherit;
    line-height: inherit;
}

.public-game--lototurf .bonoloto-result-card,
.numeric-game--lototurf .bonoloto-result-card,
.public-game--quintuple-plus .bonoloto-result-card,
.numeric-game--quintuple-plus .bonoloto-result-card {
    gap: 0.8rem;
    padding: 0.95rem;
}

.public-game--lototurf .bonoloto-result-card__label,
.numeric-game--lototurf .bonoloto-result-card__label {
    margin-bottom: 0.4rem;
}

.public-game--lototurf .numeric-game-links,
.numeric-game--lototurf .numeric-game-links,
.public-game--quintuple-plus .numeric-game-links,
.numeric-game--quintuple-plus .numeric-game-links {
    gap: 0.55rem;
    margin-top: 0.1rem;
}

.bonoloto-result-detail-page .numeric-game__section + .numeric-game__section {
    margin-top: 1.75rem;
}

.bonoloto-history__empty {
    border: 1px solid rgba(47, 138, 62, 0.16);
    border-radius: 14px;
    background: #ffffff;
    padding: 18px;
    color: #64748b;
    font-weight: 800;
}

.bonoloto-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.bonoloto-pagination__link,
.bonoloto-pagination__status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0.72rem 1rem;
    font-size: 0.9rem;
    font-weight: 900;
}

.bonoloto-pagination__link {
    background: var(--bonoloto-official-dark);
    color: #ffffff;
    text-decoration: none;
}

.bonoloto-pagination__link.is-disabled {
    background: #e5e7eb;
    color: #64748b;
}

.bonoloto-pagination__status {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e3e8e4;
}

.bonoloto-result-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.bonoloto-result-nav a {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 82px;
    border: 1px solid rgba(47, 138, 62, 0.16);
    border-radius: 14px;
    background: #ffffff;
    padding: 14px;
    color: #111827;
    text-align: center;
    text-decoration: none;
}

.bonoloto-result-nav a:hover {
    border-color: rgba(47, 138, 62, 0.36);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.bonoloto-result-nav span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bonoloto-result-nav strong {
    color: var(--bonoloto-official-dark);
    font-size: 1rem;
}

.bonoloto-steps {
    display: grid;
    gap: 12px;
}

.bonoloto-steps div {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e3e8e4;
    border-radius: 14px;
    background: #ffffff;
}

.bonoloto-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bonoloto-official, #2f8a3e);
    color: #ffffff;
    font-weight: 900;
}

.bonoloto-steps p {
    margin: 0;
    color: #374151;
    line-height: 1.45;
}

.bonoloto-table-wrap {
    overflow-x: auto;
    border: 1px solid #e3e8e4;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.04);
}

.bonoloto-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.bonoloto-table th,
.bonoloto-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf2ef;
    text-align: left;
    vertical-align: top;
}

.bonoloto-table th {
    background: #f2f7f1;
    color: #1f2937;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bonoloto-table td {
    color: #374151;
    line-height: 1.45;
}

.bonoloto-table tr:last-child td {
    border-bottom: 0;
}

.bonoloto-note {
    margin: 12px 0 0;
    font-size: 0.94rem;
}

.bonoloto-faq-list {
    display: grid;
    gap: 10px;
}

.bonoloto-faq {
    border: 1px solid #e3e8e4;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.bonoloto-faq summary {
    cursor: pointer;
    padding: 15px 18px;
    color: #111827;
    font-weight: 800;
    line-height: 1.35;
}

.bonoloto-faq summary:focus-visible {
    outline: 2px solid rgba(47, 138, 62, 0.26);
    outline-offset: 2px;
}

.bonoloto-faq p {
    margin: 0;
    padding: 0 18px 16px;
    color: #4b5563;
    line-height: 1.6;
}

.bonoloto-final-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
    gap: 22px;
    align-items: center;
    padding: 24px;
    border-color: rgba(47, 138, 62, 0.24);
    background: #f8fbf6;
}

.bonoloto-statistics-hero__actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

@media (max-width: 980px) {
    .bonoloto-two-col,
    .bonoloto-final-cta {
        grid-template-columns: 1fr;
    }

    /* Tableta y movil: uno debajo de otro, todo a lo ancho. Titulo y frase,
       sorteo y cierre, bote y JUGAR, que es el orden del HTML. */
    .bonoloto-hero__layout {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .bonoloto-hero__datos {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--hero-raya);
    }

    .bonoloto-hero__lateral {
        flex-direction: column;
        gap: 0.75rem;
    }

    .bonoloto-hero__bote {
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.15rem 1rem;
        padding-top: 0.4rem;
        border-top: 1px solid var(--hero-raya);
        text-align: start;
    }

    .bonoloto-final-cta__buttons .selae-cta-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .bonoloto-hero {
        padding: 8px 0 16px;
    }

    .bonoloto-hero__layout {
        gap: 12px;
        padding: 16px;
        border-radius: 14px;
    }

    .bonoloto-hero h1 {
        margin-bottom: 8px;
        font-size: 1.82rem;
    }

    .bonoloto-hero__lead {
        font-size: 0.96rem;
        line-height: 1.46;
    }

    .bonoloto-section {
        padding: 20px 0;
    }

    .bonoloto-panel,
    .bonoloto-final-cta {
        padding: 18px;
    }

    .bonoloto-panel h2,
    .bonoloto-copy h2,
    .bonoloto-section__header h2,
    .bonoloto-final-cta h2,
    .ultimo-sorteo {
        font-size: 1.32rem;
    }

    .numeric-game--lototurf .bonoloto-panel--result .bonoloto-section__header h2 {
        font-size: clamp(0.62rem, 2.45vw, 0.92rem);
    }

    .bonoloto-result-card__meta div {
        flex-direction: column;
        gap: 3px;
    }

    .bonoloto-result-card__meta dd {
        text-align: left;
    }

    .bonoloto-extra-ball {
        width: 34px;
        height: 34px;
    }

    .bonoloto-history-result {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px;
    }

    .bonoloto-history-result__link {
        width: 100%;
    }

    .bonoloto-result-card__actions,
    .bonoloto-results-hero__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .bonoloto-result-card__button,
    .bonoloto-results-hero__back {
        width: 100%;
    }

    .bonoloto-statistics-hero__actions {
        width: 100%;
    }

    .bonoloto-results-hero__inner {
        padding: 18px;
    }

    .bonoloto-results-hero__inner h1 {
        font-size: 1.7rem;
    }

    .bonoloto-section__header.bonoloto-section__header--compact p {
        font-size: 0.86rem;
    }

    .bonoloto-pagination,
    .bonoloto-result-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .bonoloto-pagination__link,
    .bonoloto-pagination__status {
        width: 100%;
    }

    .bonoloto-statistics-hero__actions .bonoloto-results-hero__back {
        width: 100%;
    }

    .bonoloto-final-cta__buttons .selae-cta-buttons {
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .bonoloto-final-cta__buttons .selae-cta-buttons__link {
        width: auto;
        max-width: min(100%, 220px);
    }

    .bonoloto-final-cta__buttons .selae-cta-buttons__image {
        width: auto;
        max-width: min(100%, 220px);
    }

    .bonoloto-hero__actions .selae-cta-buttons {
        gap: 7px;
    }

    .bonoloto-hero__actions .selae-cta-buttons__link {
        width: auto;
        max-width: 148px;
    }

    .bonoloto-hero__actions .selae-cta-buttons__image {
        width: auto;
        max-width: 148px;
        max-height: 42px;
    }
}

@media (max-width: 768px) {
    /* La de .container de frontend.css, solo para la cabecera de resultados:
       en movil tiene que ganar al padding de .bonoloto-results-hero__inner,
       que va antes en esta hoja. */
    .container.bonoloto-results-hero__inner {
        padding: 0 20px;
    }
}

/* La Primitiva numeric public pages */
.numeric-game--la-primitiva {
    --bonoloto-official: #2f8a3e;
    --bonoloto-official-dark: #256f31;
    --bonoloto-official-soft: #eef8ef;
    --bonoloto-extra: #1f5d29;
}

.numeric-game--el-gordo-de-la-primitiva {
    --bonoloto-official: #d64541;
    --bonoloto-official-dark: #a52f2c;
    --bonoloto-official-soft: #fff1f0;
    --bonoloto-extra: #8d2926;
}

.numeric-game--eurodreams {
    --bonoloto-official: #7b4fc9;
    --bonoloto-official-dark: #56339a;
    --bonoloto-official-soft: #f4f0ff;
    --bonoloto-extra: #56339a;
    --bonoloto-extra-soft: #ece4ff;
}

.numeric-game__section + .numeric-game__section {
    padding-top: 10px;
}

.numeric-game .bonoloto-panel,
.numeric-game .bonoloto-history-result {
    border-color: rgba(47, 138, 62, 0.16);
}

.numeric-game .bonoloto-table progress {
    width: min(280px, 100%);
    height: 10px;
    accent-color: var(--bonoloto-official);
}

.numeric-game .bonoloto-table th,
.numeric-game .bonoloto-table td {
    vertical-align: middle;
}

.numeric-game--eurodreams .bonoloto-history-result,
.numeric-game--eurodreams .bonoloto-panel {
    border-color: rgba(123, 79, 201, 0.18);
}

.numeric-game--eurodreams .bonoloto-balls > span:not(.bonoloto-result-extra) {
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 32%),
        linear-gradient(145deg, #8a5ee0, #56339a);
}

.numeric-game--eurodreams .lottery-result-extra--ball .lottery-result-extra__value {
    background: #ece4ff;
    color: #3f2574;
}

@media (max-width: 759px) {
    .numeric-game__hero .bonoloto-results-hero__inner {
        align-items: stretch;
    }

    .numeric-game__hero .bonoloto-statistics-hero__actions,
    .numeric-game__hero .bonoloto-results-hero__back {
        width: 100%;
    }

    .numeric-game .bonoloto-history-result {
        grid-template-columns: 1fr;
    }

    .numeric-game .bonoloto-history-result__link {
        width: 100%;
    }

    .numeric-game .bonoloto-table {
        min-width: 560px;
    }
}
/* La Primitiva Bonoloto-aligned presentation */
.public-game--la-primitiva .public-game-section {
    padding-block: 24px;
}

.numeric-game-links {
    gap: 12px;
}

.public-game--la-primitiva .numeric-game-links {
    padding-inline: 4px;
}

.public-game--la-primitiva .bonoloto-note {
    max-width: 78ch;
}

.public-game--la-primitiva .la-primitiva-joker-card {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(47, 138, 62, 0.16);
    border-radius: 14px;
    background: #fbfdfb;
}

.public-game--la-primitiva .la-primitiva-joker-card__body {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.public-game--la-primitiva .la-primitiva-joker-card__eyebrow,
.public-game--la-primitiva .la-primitiva-joker-scrutiny .bonoloto-eyebrow,
.numeric-game--la-primitiva .la-primitiva-joker-scrutiny .bonoloto-eyebrow {
    color: var(--bonoloto-official-dark);
}

.public-game--la-primitiva .la-primitiva-joker-card__eyebrow {
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.public-game--la-primitiva .la-primitiva-joker-card__label,
.public-game--la-primitiva .la-primitiva-joker-card__prize span {
    display: block;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 700;
}

.public-game--la-primitiva .la-primitiva-joker-card__number {
    margin: 0;
    color: #111827;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 900;
    line-height: 1;
}

.public-game--la-primitiva .la-primitiva-joker-card__prize {
    text-align: right;
}

.public-game--la-primitiva .la-primitiva-joker-card__prize strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 1.2rem;
    line-height: 1.1;
}

.public-game--la-primitiva .la-primitiva-joker-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.numeric-game--la-primitiva .la-primitiva-joker-scrutiny {
    border-color: rgba(47, 138, 62, 0.18);
}

.public-game--la-primitiva .la-primitiva-joker-scrutiny__number,
.numeric-game--la-primitiva .la-primitiva-joker-scrutiny__number {
    margin: 6px 0 0;
    color: #475569;
    font-size: 0.95rem;
}

.joker-page .joker-result-panel {
    display: grid;
    gap: 1rem;
}

.joker-result-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin: 0;
}

.joker-result-summary--detail {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1fr);
}

.joker-result-summary div {
    display: grid;
    gap: 0.35rem;
    border: 1px solid rgba(47, 138, 62, 0.16);
    border-radius: 12px;
    background: #fbfdfb;
    padding: 0.9rem;
}

.joker-result-summary dt,
.joker-history-result span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.joker-result-summary dd {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 800;
}

.joker-result-summary__number {
    color: var(--bonoloto-official-dark);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0.04em;
}

.joker-result-link {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.joker-result-text {
    max-width: 74ch;
    margin: 0;
    color: #334155;
    font-size: 1rem;
    line-height: 1.6;
}

.joker-history {
    gap: 0.8rem;
}

.joker-history-result {
    display: grid;
    grid-template-columns: minmax(7rem, 0.75fr) minmax(8rem, 1fr) minmax(8rem, 1fr) auto;
    gap: 0.8rem 1rem;
    align-items: center;
    border: 1px solid rgba(47, 138, 62, 0.15);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.9rem 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.joker-history-result > div {
    display: grid;
    gap: 0.3rem;
}

.joker-history-result strong {
    color: #111827;
    font-size: 1rem;
    font-weight: 900;
}

.joker-history-result__number strong {
    color: var(--bonoloto-official-dark);
    letter-spacing: 0.04em;
}

@media (max-width: 720px) {
    .joker-result-summary,
    .joker-result-summary--detail,
    .joker-history-result {
        grid-template-columns: 1fr;
    }

    .joker-history-result .bonoloto-history-result__link {
        width: 100%;
    }
}

@media (max-width: 759px) {
    .public-game--la-primitiva .public-game-section {
        padding-block: 18px;
    }

    .public-game--la-primitiva .numeric-game-links,
    .public-game--la-primitiva .numeric-game-links .bonoloto-result-card__button {
        width: 100%;
    }

    .public-game--la-primitiva .la-primitiva-joker-card__body,
    .public-game--la-primitiva .la-primitiva-joker-card__prize {
        align-items: flex-start;
        text-align: left;
    }

    .public-game--la-primitiva .la-primitiva-joker-card__actions .bonoloto-result-card__button {
        width: 100%;
    }
}

/* Presentacion publica de La Primitiva y del Joker */
.bonoloto-eyebrow--natural {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
}

.numeric-game--la-primitiva .la-primitiva-secondary {
    display: grid;
    gap: 8px;
}

.numeric-game--la-primitiva .la-primitiva-secondary__label {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.numeric-game--la-primitiva .la-primitiva-secondary__items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.numeric-game--la-primitiva .la-primitiva-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(37, 111, 49, 0.28);
    border-radius: 12px;
    background: #f6faf6;
    padding: 6px 12px 6px 14px;
}

.numeric-game--la-primitiva .la-primitiva-chip__label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.numeric-game--la-primitiva .la-primitiva-chip__value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 32px;
    border: 1px solid rgba(37, 111, 49, 0.35);
    border-radius: 9px;
    background: #ffffff;
    padding: 0 8px;
    color: var(--bonoloto-official-dark, #256f31);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.numeric-game--la-primitiva .la-primitiva-chip--refund .la-primitiva-chip__value {
    border-color: rgba(23, 72, 32, 0.4);
    color: #174820;
}

.numeric-game--la-primitiva .la-primitiva-joker-result__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.numeric-game--la-primitiva .la-primitiva-joker-result__number {
    margin: 4px 0 0;
    color: #111827;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    line-height: 1.05;
}

.public-game--la-primitiva .la-primitiva-joker-scrutiny__number,
.numeric-game--la-primitiva .la-primitiva-joker-scrutiny__number {
    display: grid;
    gap: 4px;
    margin: 8px 0 0;
}

.public-game--la-primitiva .la-primitiva-joker-scrutiny__label,
.numeric-game--la-primitiva .la-primitiva-joker-scrutiny__label {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.public-game--la-primitiva .la-primitiva-joker-scrutiny__value,
.numeric-game--la-primitiva .la-primitiva-joker-scrutiny__value {
    color: #111827;
    font-size: clamp(1.5rem, 5vw, 2.1rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1.05;
}

.bonoloto-history-result--with-joker {
    grid-template-columns: minmax(120px, 0.2fr) minmax(0, 1fr) minmax(92px, auto) minmax(110px, auto);
}

.bonoloto-history-result__joker {
    display: grid;
    justify-items: start;
    gap: 4px;
    min-width: 0;
}

.bonoloto-history-result__joker span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.bonoloto-history-result__joker-link {
    display: inline-flex;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
}

.bonoloto-history-result__joker-link:hover strong,
.bonoloto-history-result__joker-link:focus-visible strong {
    border-color: currentColor;
    text-decoration: underline;
}

.bonoloto-history-result__joker strong {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 10px;
    background: #f8fafc;
    padding: 5px 10px;
    color: #111827;
    font-size: 0.94rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .bonoloto-history-result--with-joker {
        grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
    }

    .bonoloto-history-result--with-joker .bonoloto-history-result__date,
    .bonoloto-history-result--with-joker .bonoloto-history-result__numbers {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .bonoloto-history-result--with-joker {
        grid-template-columns: 1fr;
    }

    .bonoloto-history-result--with-joker .bonoloto-history-result__joker {
        justify-items: start;
    }

    .numeric-game--la-primitiva .la-primitiva-joker-result__row .bonoloto-result-card__button {
        width: 100%;
    }
}

/* Responsive La Primitiva */
@media (max-width: 759px) {
    /* Las tablas de escrutinio y de premios dejan de forzar un ancho minimo fijo:
       se ajustan al ancho real del movil y, si el contenido no cabe, el desbordamiento
       se queda dentro de .bonoloto-table-wrap. */
    .public-game--la-primitiva .bonoloto-table,
    .numeric-game--la-primitiva .bonoloto-table {
        min-width: 0;
    }

    .public-game--la-primitiva .bonoloto-table th,
    .public-game--la-primitiva .bonoloto-table td,
    .numeric-game--la-primitiva .bonoloto-table th,
    .numeric-game--la-primitiva .bonoloto-table td {
        padding: 10px 8px;
        font-size: 0.88rem;
    }

    /* Las cabeceras en mayusculas con letter-spacing eran la columna mas ancha. */
    .public-game--la-primitiva .bonoloto-table th,
    .numeric-game--la-primitiva .bonoloto-table th {
        font-size: 0.72rem;
        letter-spacing: 0.02em;
    }

    .public-game--la-primitiva .bonoloto-table td:first-child,
    .numeric-game--la-primitiva .bonoloto-table td:first-child {
        overflow-wrap: break-word;
        word-break: break-word;
    }
}

/* =========================================
   Dónde ha tocado - componente público común
   Estructura y layout 100 % comunes a todos los juegos.
   La identidad de cada juego llega solo por variables ya existentes.
========================================= */

.donde-ha-tocado {
    --dht-acento: var(--public-game-accent, var(--bonoloto-official, #256f31));
    --dht-acento-oscuro: var(--public-game-accent-dark, var(--bonoloto-official-dark, #174820));
    --dht-acento-suave: var(--public-game-accent-soft, var(--bonoloto-official-soft, #eef8ef));
    margin: 0;
    border: 1px solid #e3e8e4;
    border-left: 3px solid var(--dht-acento);
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

/* Dentro del panel de resultado de la ficha pública va tras el escrutinio. */
.bonoloto-panel--result > .donde-ha-tocado {
    margin-top: 26px;
}

.donde-ha-tocado__cabecera {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #eef1ee;
    background: var(--dht-acento-suave);
}

.donde-ha-tocado__icono {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid color-mix(in srgb, var(--dht-acento) 26%, transparent);
    border-radius: 10px;
    background: #ffffff;
    color: var(--dht-acento-oscuro);
}

.donde-ha-tocado__icono svg {
    display: block;
    width: 20px;
    height: 20px;
}

.donde-ha-tocado__titulares {
    min-width: 0;
}

.donde-ha-tocado__eyebrow {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--dht-acento-oscuro);
    overflow-wrap: anywhere;
}

.donde-ha-tocado__titulo {
    margin: 0;
    font-size: 1.24rem;
    line-height: 1.25;
    color: #14202f;
}

.donde-ha-tocado__subtitulo {
    margin: 6px 0 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #5b6b7c;
}

/* Texto narrativo: bloque editorial continuo, nunca troceado en tarjetas. */
.donde-ha-tocado__texto {
    padding: 18px 20px;
}

.donde-ha-tocado__texto p {
    max-width: 68ch;
    margin: 0 0 12px;
    font-size: 1rem;
    line-height: 1.65;
    color: #33414f;
}

.donde-ha-tocado__texto p:last-child {
    margin-bottom: 0;
}

/* Validaciones estructuradas. */
.donde-ha-tocado__validaciones {
    padding: 18px 20px 20px;
    border-top: 1px solid #eef1ee;
    background: #fbfcfb;
}

.donde-ha-tocado__lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.donde-ha-tocado__punto {
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #e3e8e4;
    border-radius: 12px;
    background: #ffffff;
}

.donde-ha-tocado__categoria {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
}

.donde-ha-tocado__categoria-valor,
.donde-ha-tocado__premio {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.donde-ha-tocado__categoria-valor {
    border: 1px solid color-mix(in srgb, var(--dht-acento) 22%, transparent);
    background: var(--dht-acento-suave);
    color: var(--dht-acento-oscuro);
}

.donde-ha-tocado__premio {
    border: 1px solid #e0e6ec;
    background: #f1f4f7;
    color: #45566a;
}

.donde-ha-tocado__localidad {
    display: block;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.3;
    color: #14202f;
    overflow-wrap: anywhere;
}

.donde-ha-tocado__provincia {
    margin: 3px 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #5b6b7c;
}

.donde-ha-tocado__punto-venta {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid #eef1ee;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    color: #33414f;
    overflow-wrap: anywhere;
}

.donde-ha-tocado__direccion {
    margin: 3px 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #5b6b7c;
    overflow-wrap: anywhere;
}

.donde-ha-tocado__web-oficial {
    margin: 5px 0 0;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dht-acento-oscuro);
}

.donde-ha-tocado__detalle {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #33414f;
    overflow-wrap: anywhere;
}

/*
   Detalle de sorteo: EuroDreams y El Gordo no reciben public-game--{slug} en esa
   plantilla. Se reutilizan sus tonos ya definidos, sin duplicar layout.
*/
.numeric-game--eurodreams .donde-ha-tocado {
    --dht-acento: #7b4fc9;
    --dht-acento-oscuro: #56339a;
    --dht-acento-suave: #f4f0ff;
}

.numeric-game--el-gordo-de-la-primitiva .donde-ha-tocado {
    --dht-acento: #d64541;
    --dht-acento-oscuro: #a52f2c;
    --dht-acento-suave: #fff1f0;
}

@media (max-width: 560px) {
    .donde-ha-tocado__cabecera {
        gap: 11px;
        padding: 15px 14px;
    }

    .donde-ha-tocado__icono {
        width: 34px;
        height: 34px;
    }

    .donde-ha-tocado__icono svg {
        width: 18px;
        height: 18px;
    }

    .donde-ha-tocado__titulo {
        font-size: 1.12rem;
    }

    .donde-ha-tocado__texto,
    .donde-ha-tocado__validaciones {
        padding: 15px 14px;
    }

    .donde-ha-tocado__punto {
        padding: 13px 13px;
    }
}

/* Encaje en las posiciones donde ya vivia el boton oficial. Solo posicion y
   tamano: ninguna de estas reglas toca a .selae-cta-buttons. */
.bonoloto-hero__actions .botones-personalizados,
.bonoloto-final-cta__buttons .botones-personalizados {
    justify-content: flex-start;
}

.bonoloto-hero__actions .boton-juego-personalizado {
    width: auto;
    max-width: 168px;
    min-height: 40px;
    padding: 10px 18px;
    border-radius: 7px;
}

/* En la cabecera de la ficha, del ancho de su columna. */
.bonoloto-hero__actions .boton-juego-personalizado {
    width: 100%;
    max-width: none;
}

.bonoloto-final-cta__buttons .boton-juego-personalizado {
    width: auto;
    max-width: 220px;
}

/* Joker pendiente: el resultado de La Primitiva ya ha salido y el Joker aun no. */
.public-game--la-primitiva .la-primitiva-joker-card__pendiente,
.numeric-game--la-primitiva .la-primitiva-joker-result__pendiente {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #6b7280;
}
