/* ==========================================================================
   BOARD V2 - clean light minimal result board (homepage only)
   Loaded last, after style.css + result-ui.css, so it can replace the
   heavy gold / glow board look with a flat, quiet, high-readability one.

   Nothing here changes markup or JS hooks. Every class and data attribute
   the live scripts rely on (.board__row, .is-highlight, .is-filtered-out,
   .is-nearest-upcoming, .is-upcoming-highlight, .is-xx, .live-dot,
   [data-group], [data-board-today], .board__flag) is preserved.

   Scope: .section--board (homepage board + the "Other Results" board on
   record.php, which reuses the same markup) and the home page background.
   ========================================================================== */

/* ---------- 1. Palette (board-local tokens, also used by the
   UPCOMING / NEXT UPDATE strip further below) ---------- */
.section--board,
.section--upcoming {
    --b2-bg:        #f7f8fa;
    --b2-surface:   #ffffff;
    --b2-line:      #e6e8ec;
    --b2-line-soft: #f0f2f4;
    --b2-ink:       #111827;
    --b2-mute:      #6b7280;
    --b2-faint:     #c3c9d1;
    --b2-prev:      #98a2b0;
    --b2-live:      #e5484d;
    --b2-next:      #2563eb;
    --b2-upcoming:  #94a3b8;
    --b2-done:      #0f9d76;
    --b2-tint:      #f9fafb;
    --b2-radius:    12px;
    --b2-shadow:    0 1px 2px rgba(17, 24, 39, .05);
    --b2-shadow-hi: 0 6px 18px rgba(17, 24, 39, .08);
}

/* Flat page background - the old warm radial gradients are dropped here. */
body.home-page { background-color: var(--b2-bg); }
body.home-page::before { background: none; }

/* Homepage only: the board section owns its own vertical rhythm. */
body.home-page .section--board .container > * { margin-bottom: 0; }

/* ---------- 2. Page title (was a green filled bar) ---------- */
.section--board .board-toolbar {
    display: block;
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--b2-line);
}

.section--board .date-bar {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--b2-ink);
    text-align: left;
    font-size: clamp(1.125rem, 1.4vw + .8rem, 1.5rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.section--board .date-bar__kicker { color: var(--b2-mute); }
.section--board .date-bar__date { color: var(--b2-ink); }

/* ---------- 3. Fast results strip (image-1: solid green bar) ---------- */
.section--board .board-fastbar {
    margin: 0;
    padding: 16px 14px;
    background: #3ab988;
    border: 1px solid #2fa67a;
    border-bottom: 0;
    border-radius: 2px 2px 0 0;
    color: #fff;
    text-align: center;
    font-size: clamp(1rem, .6vw + .9rem, 1.3rem);
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.4;
}

/* ---------- 4. Column header (image-1: dark bar, attached below green) ---------- */
.section--board .board-dates {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 12px 16px;
    background: #333;
    border: 1px solid #333;
    border-top: 0;
    border-radius: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.section--board .board-dates__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #fff;
    letter-spacing: 0;
    text-transform: none;
}

.section--board .board-dates__day {
    flex: 0 0 auto;
    min-width: 86px;
    text-align: right;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 500;
    text-transform: none;
}

.section--board .board-dates__day--today {
    color: #fff;
    font-weight: 700;
}

/* ---------- 5. Group headers (image-1: white bar + thick left marker) ---------- */
.section--board #result-board { margin-top: 0; }
.section--board .board-group { margin: 0 0 18px; }
.section--board .board-group:first-child { margin-top: 0; }
.section--board .board-group:last-child { margin-bottom: 0; }

.section--board .board-group__head,
.section--board .board-group--live .board-group__head,
.section--board .board-group--next .board-group__head,
.section--board .board-group--upcoming .board-group__head,
.section--board .board-group--completed .board-group__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--b2-line);
    border-left-width: 5px;
    border-radius: 0;
    box-shadow: none;
    color: var(--b2-mute);
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.section--board .board-group--live .board-group__head { border-left-color: #ff3b30; }
.section--board .board-group--next .board-group__head { border-left-color: var(--b2-next); }
.section--board .board-group--upcoming .board-group__head { border-left-color: var(--b2-upcoming); }
.section--board .board-group--completed .board-group__head { border-left-color: var(--b2-done); }

.section--board .board-group__label,
.section--board .board-group--live .board-group__label,
.section--board .board-group--next .board-group__label,
.section--board .board-group--upcoming .board-group__label,
.section--board .board-group--completed .board-group__label {
    display: inline;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    animation: none;
    color: var(--b2-mute);
    letter-spacing: .06em;
}

.section--board .board-group--live .board-group__label   { color: #ff3b30; font-size: 1rem; }
.section--board .board-group--next .board-group__label   { color: var(--b2-next); }
.section--board .board-group--completed .board-group__label { color: var(--b2-done); }

.section--board .board-group__count {
    order: 3;
    margin-left: auto;
    padding: 1px 9px;
    border-radius: 999px;
    background: var(--b2-line-soft);
    box-shadow: none;
    color: var(--b2-mute);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.6;
}

.section--board .board-group--live .board-group__count {
    background: rgba(255, 59, 48, .1);
    box-shadow: none;
    color: #ff3b30;
}

.section--board .board-group__note {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-left: 2px;
    color: #9aa1ab;
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.section--board .board-group__head .live-dot {
    display: none;
    order: 0;
    width: 7px;
    height: 7px;
    background: var(--b2-live);
    box-shadow: none;
    animation: none;
}

/* ---------- 6. Cards ---------- */
.section--board .board-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.section--board .board-card,
.section--board .board-cards .board-card.board__row,
.section--board .board-cards .board-card.board__row:hover {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px 68px;
    align-items: center;
    gap: 10px;
    min-height: 0;
    margin: 0;
    padding: 12px 14px;
    background: var(--b2-surface);
    border: 1px solid var(--b2-line);
    border-left: 1px solid var(--b2-line);
    border-radius: var(--b2-radius);
    box-shadow: var(--b2-shadow);
    transition: box-shadow .18s ease, border-color .18s ease;
    animation: none;
    transform: none;
}

.section--board .board-card:hover {
    border-color: #d8dce2;
    box-shadow: var(--b2-shadow-hi);
}

/* LIVE cards keep one quiet red marker, nothing else changes. */
.section--board .board-card--live {
    border-left: 3px solid var(--b2-live);
}

.section--board .board-card--next,
.section--board .board-card--upcoming,
.section--board .board-card--completed {
    border-left: 1px solid var(--b2-line);
}

/* Chart games: flat neutral tint instead of the gold glow card. */
.section--board .board-cards .board-card.board__row.is-highlight,
.section--board .board-cards .board-card.board__row.is-highlight:hover,
.section--board .board-cards .board-card.board__row.is-highlight::after {
    position: static;
    overflow: visible;
    background: var(--b2-tint);
    border-color: var(--b2-line);
    border-left: 1px solid var(--b2-line);
    box-shadow: var(--b2-shadow);
    animation: none;
    background-image: none;
    content: none;
}

.section--board .board-cards .board-card.board__row.is-highlight:hover {
    box-shadow: var(--b2-shadow-hi);
}

.section--board .board-cards .board-card.board__row.is-highlight .board-card__name,
.section--board .board-cards .board-card.board__row.is-highlight .board-card__val--prev,
.section--board .board-cards .board-card.board__row.is-highlight .board-card__val--today {
    color: var(--b2-ink);
}

/* ---------- 6b. Operator highlight - yellow at rest, white under cursor ----------
   Applied to the games listed in config/config.php -> page.highlightedGames.
   INVERTED behaviour (user request):
     - AT REST (no cursor on the card) the card is ONE solid dark yellow
       (#f0c000 - the base colour never animates) with a LIGHT REFLECTION
       band sweeping left -> right, a soft glow ring and a gently breathing
       today value.
     - As soon as the CURSOR comes onto the card, the yellow HIDES - the
       card turns plain white and every animation layer stops.
     - As soon as the CURSOR LEAVES, the yellow + animation come back
       automatically.

   Everything is CSS-only and GPU friendly (only transform / opacity /
   box-shadow animate, so nothing ever reflows). Text colours are static, so
   the card stays readable. The selectors below carry the same 5-class weight
   as the .is-highlight rules above so they always win. */

/* RESTING - one solid dark yellow base. */
.section--board .board-cards .board-card.board__row.is-featured,
.section--board .board-card.is-featured {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #f0c000;
    border-color: #c08e00;
    border-left: 1px solid #c08e00;
    box-shadow: var(--b2-shadow);
    transition: background-color .25s ease, border-color .25s ease,
                transform .2s ease, box-shadow .2s ease;
}

/* RESTING - live featured games keep a quiet red marker on the left edge. */
.section--board .board-cards .board-card--live.board__row.is-featured,
.section--board .board-card--live.is-featured {
    border-left: 3px solid #c0392b;
}

/* Content must sit above the decorative layers. */
.section--board .board-card.is-featured > .board-card__main,
.section--board .board-card.is-featured > .board-card__values > .board-card__val {
    position: relative;
    z-index: 1;
}

/* CURSOR ON - the yellow hides: back to a plain white card + lift.
   border-left width is left alone on purpose: non-live cards keep the 1px
   edge from the base rule width-wise, while the colour below resets it to
   the normal line colour; live cards get their normal red marker back. */
.section--board .board-cards .board-card.board__row.is-featured:hover,
.section--board .board-cards .board-card.board__row.is-featured:focus-visible,
.section--board .board-cards .board-card.board__row.is-featured:active,
.section--board .board-card.is-featured:hover,
.section--board .board-card.is-featured:focus-visible,
.section--board .board-card.is-featured:active {
    background: var(--b2-surface);
    border-color: var(--b2-line);
    box-shadow: var(--b2-shadow-hi);
    transform: translateY(-2px);
}

.section--board .board-cards .board-card--live.board__row.is-featured:hover,
.section--board .board-card--live.is-featured:hover,
.section--board .board-card--live.is-featured:focus-visible,
.section--board .board-card--live.is-featured:active {
    border-left-color: var(--b2-live);
}

/* RESTING text - dark tones readable on the yellow. */
.section--board .board-card.is-featured .board-card__name { color: #1a1a1a; }

.section--board .board-card.is-featured .board-card__meta,
.section--board .board-card.is-featured .board-card__time { color: #4a3c00; }

.section--board .board-card.is-featured .board-card__link {
    border-color: #b07f00;
    background: rgba(0, 0, 0, .06);
    color: #3d2f00;
}

.section--board .board-card.is-featured .board-card__link:hover {
    background: rgba(0, 0, 0, .12);
    border-color: #8f6600;
    color: #1a1a1a;
}

.section--board .board-card.is-featured .board-card__badge {
    border-color: #b07f00;
    background: rgba(0, 0, 0, .06);
    color: #3d2f00;
}

.section--board .board-card.is-featured .board-card__val--prev { color: #5c4a00; }

.section--board .board-card.is-featured .board-card__val--today { color: #141414; }

/* CURSOR ON - text goes back to the normal card colours (same values as
   the plain cards in sections 7-8, written out explicitly so they win). */
.section--board .board-card.is-featured:hover .board-card__name,
.section--board .board-card.is-featured:focus-visible .board-card__name,
.section--board .board-card.is-featured:active .board-card__name { color: var(--b2-ink); }

.section--board .board-card.is-featured:hover .board-card__meta,
.section--board .board-card.is-featured:hover .board-card__time,
.section--board .board-card.is-featured:focus-visible .board-card__meta,
.section--board .board-card.is-featured:focus-visible .board-card__time,
.section--board .board-card.is-featured:active .board-card__meta,
.section--board .board-card.is-featured:active .board-card__time { color: var(--b2-mute); }

.section--board .board-card.is-featured:hover .board-card__link,
.section--board .board-card.is-featured:focus-visible .board-card__link,
.section--board .board-card.is-featured:active .board-card__link {
    border-color: var(--b2-line);
    background: none;
    color: var(--b2-mute);
}

.section--board .board-card.is-featured:hover .board-card__link:hover,
.section--board .board-card.is-featured:focus-visible .board-card__link:hover {
    background: var(--b2-line-soft);
    border-color: #d8dce2;
    color: var(--b2-ink);
}

.section--board .board-card.is-featured:hover .board-card__badge,
.section--board .board-card.is-featured:focus-visible .board-card__badge,
.section--board .board-card.is-featured:active .board-card__badge {
    border-color: var(--b2-line);
    background: var(--b2-surface);
    color: var(--b2-mute);
}

.section--board .board-card.is-featured:hover .board-card__val--prev,
.section--board .board-card.is-featured:focus-visible .board-card__val--prev,
.section--board .board-card.is-featured:active .board-card__val--prev { color: var(--b2-prev); }

.section--board .board-card.is-featured:hover .board-card__val--today,
.section--board .board-card.is-featured:focus-visible .board-card__val--today,
.section--board .board-card.is-featured:active .board-card__val--today { color: var(--b2-ink); }

.section--board .board-card.is-featured:hover .board-card__val--today.is-pending,
.section--board .board-card.is-featured:focus-visible .board-card__val--today.is-pending,
.section--board .board-card.is-featured:active .board-card__val--today.is-pending { color: var(--b2-faint); }

/* RESTING - the light reflection band sweeping left -> right. */
.section--board .board-cards .board-card.board__row.is-featured::before,
.section--board .board-card.is-featured::before {
    content: "";
    position: absolute;
    top: -25%;
    bottom: -25%;
    left: -45%;
    width: 45%;
    z-index: 0;
    background: linear-gradient(100deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, .45) 50%,
        rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    animation: b2-sheen 1.8s linear infinite;
}

/* CURSOR ON - the reflection band stops and disappears with the yellow. */
.section--board .board-cards .board-card.board__row.is-featured:hover::before,
.section--board .board-cards .board-card.board__row.is-featured:focus-visible::before,
.section--board .board-cards .board-card.board__row.is-featured:active::before,
.section--board .board-card.is-featured:hover::before,
.section--board .board-card.is-featured:focus-visible::before,
.section--board .board-card.is-featured:active::before {
    animation: none;
    opacity: 0;
}

/* RESTING - glow ring outside + inner top highlight.
   background / width / height / left are reset on purpose: result-ui.css:615
   still paints an old 45%-wide white "hi-sheen" band on is-highlight::after,
   and unless those properties are cleared here it keeps showing as a white
   block frozen on the left half of every chart card. */
.section--board .board-cards .board-card.board__row.is-featured::after,
.section--board .board-card.is-featured::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: auto;
    z-index: 0;
    background: none;
    border-radius: inherit;
    pointer-events: none;
    animation: b2-ring 2.8s ease-in-out infinite;
}

/* CURSOR ON - the glow ring stops with the yellow. */
.section--board .board-cards .board-card.board__row.is-featured:hover::after,
.section--board .board-cards .board-card.board__row.is-featured:focus-visible::after,
.section--board .board-cards .board-card.board__row.is-featured:active::after,
.section--board .board-card.is-featured:hover::after,
.section--board .board-card.is-featured:focus-visible::after,
.section--board .board-card.is-featured:active::after {
    animation: none;
    box-shadow: none;
}

/* The reflection band itself - one left-to-right pass per cycle. */
@keyframes b2-sheen {
    from { left: -45%; }
    to   { left: 130%; }
}

@keyframes b2-ring {
    0%, 100% {
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28),
                    0 0 0 0 rgba(240, 192, 0, .45);
    }
    50% {
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .70),
                    0 8px 24px 2px rgba(240, 192, 0, .40);
    }
}

/* RESTING - today's value breathes gently. */
@keyframes b2-value-breathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.07); }
}

.section--board .board-card.is-featured .board-card__val--today {
    animation: b2-value-breathe 2.4s ease-in-out infinite;
}

/* CURSOR ON - the value stops breathing with the yellow. */
.section--board .board-card.is-featured:hover .board-card__val--today,
.section--board .board-card.is-featured:focus-visible .board-card__val--today,
.section--board .board-card.is-featured:active .board-card__val--today {
    animation: none;
}

@media (prefers-reduced-motion: reduce) {
    .section--board .board-card.is-featured::before,
    .section--board .board-card.is-featured::after,
    .section--board .board-card.is-featured .board-card__val--today {
        animation: none;
    }
    .section--board .board-card.is-featured::before { opacity: 0; }
    .section--board .board-card.is-featured:hover,
    .section--board .board-card.is-featured:focus-visible,
    .section--board .board-card.is-featured:active {
        transform: none;
    }
}

/* The value must be able to scale, so give it its own stacking context. */
.section--board .board-card.is-featured .board-card__val--today {
    display: inline-block;
    will-change: transform;
}

/* ---------- 7. Card content ---------- */
.section--board .board-card__main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.section--board .board-card__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    color: var(--b2-ink);
}

.section--board .board-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 3px;
    color: var(--b2-mute);
    font-size: .75rem;
    font-weight: 500;
}

.section--board .board-card__time {
    color: var(--b2-mute);
    font-variant-numeric: tabular-nums;
}

.section--board .board-card__link {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--b2-line);
    border-radius: 6px;
    background: none;
    color: var(--b2-mute);
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.section--board .board-card__link:hover {
    background: var(--b2-line-soft);
    border-color: #d8dce2;
    color: var(--b2-ink);
    text-decoration: none;
}

/* Small neutral "chart" marker for combined-chart games. */
.section--board .board-card__badge {
    padding: 1px 6px;
    border: 1px solid var(--b2-line);
    border-radius: 4px;
    background: var(--b2-surface);
    color: var(--b2-mute);
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.6;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------- 8. Values ---------- */
.section--board .board-card__values { display: contents; }

.section--board .board-card__val {
    grid-row: 1;
    text-align: center;
    font-weight: 600;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.section--board .board-card__val--prev {
    grid-column: 2;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--b2-prev);
}

.section--board .board-card__val--prev.is-xx {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--b2-prev);
}

.section--board .board-card__val--today {
    grid-column: 3;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--b2-ink);
}

.section--board .board-card__val--today.is-pending {
    font-weight: 600;
    color: var(--b2-faint);
}

.section--board .board-card__val.is-xx {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--b2-faint);
}

.section--board .board-card__val--today.is-published { color: var(--b2-ink); }

/* ---------- 9. Dynamic states kept by the live scripts ---------- */
/* Nearest upcoming draw: soft dashed marker, no heavy outline. */
.section--board .board-cards .board-card.is-nearest-upcoming {
    outline: none;
    border-color: var(--b2-next);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

/* One minute before the draw: static cool tint, the old yellow pulse is gone. */
.section--board .board-card.is-upcoming-highlight,
.section--board .board-card.is-upcoming-highlight:hover {
    background: #f5f8ff;
    border-color: #c7d7fe;
    animation: none;
    box-shadow: var(--b2-shadow);
}

.section--board .board-card.is-upcoming-highlight .board-card__name { color: var(--b2-ink); }

.section--board .board__flag {
    display: none;
    margin-left: 0;
    padding: 1px 6px;
    border: 1px solid var(--b2-line);
    border-radius: 4px;
    background: var(--b2-surface);
    color: var(--b2-mute);
    font-size: .625rem;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: .06em;
}

.section--board .board-card.is-upcoming-highlight .board__flag { display: inline-block; }

/* ==========================================================================
   9b. UPCOMING / NEXT UPDATE - two-card strip (sections/upcoming.php)
   Clean minimal, same language as the board cards above. Only two cards
   ever render: the just-opened result and the next opening with its live
   countdown. Scoped to .section--upcoming so nothing else is touched.
   ========================================================================== */

.section--upcoming { margin-bottom: 18px; }

.upnext-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 0 10px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--b2-line);
}

.upnext-head .upcoming-panel__title { margin: 0; }

.upnext-head__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Blinking LIVE button - jumps to the result board. */
.upnext-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff4d4d, #d90f0f);
    color: #fff;
    font-family: inherit;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    cursor: pointer;
    animation: b2-livebtn 1.6s ease-in-out infinite;
}

.upnext-live:hover { filter: brightness(1.08); }
.upnext-live:focus-visible { outline: 2px solid #d90f0f; outline-offset: 2px; }

.upnext-live__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: b2-livedot 1s ease-in-out infinite;
}

@keyframes b2-livebtn {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 45, 45, .45),
                    0 0 0 0 rgba(255, 45, 45, .5);
    }
    50% {
        box-shadow: 0 2px 12px rgba(255, 45, 45, .6),
                    0 0 0 8px rgba(255, 45, 45, 0);
    }
}

.upnext-clock {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 5px 12px;
    border: 1px solid var(--b2-line);
    border-radius: 999px;
    background: var(--b2-surface);
    box-shadow: var(--b2-shadow);
    color: var(--b2-ink);
    font-size: .875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.upnext-clock .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--b2-live);
    animation: b2-livedot 1.2s ease-in-out infinite;
}

@keyframes b2-livedot {
    0%, 100% { opacity: 1; }
    50%      { opacity: .3; }
}

.upnext-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (min-width: 700px) {
    .upnext-cards { gap: 12px; }
}

.upnext-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px;
    background: var(--b2-surface);
    border: 1px solid var(--b2-line);
    border-radius: var(--b2-radius);
    box-shadow: var(--b2-shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.upnext-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--b2-shadow-hi);
}

.upnext-card--open {
    border-left: 3px solid var(--b2-done);
    background: linear-gradient(180deg, #eefaf4 0%, #ffffff 60%);
}

.upnext-card--next {
    border-left: 3px solid var(--b2-next);
    background: linear-gradient(180deg, #eef4ff 0%, #ffffff 60%);
}

/* Slow travelling shine across the NEXT card. */
.upnext-card--next::before {
    content: "";
    position: absolute;
    top: -25%;
    bottom: -25%;
    left: -45%;
    width: 45%;
    z-index: 0;
    background: linear-gradient(100deg,
        rgba(37, 99, 235, 0) 0%,
        rgba(37, 99, 235, .10) 50%,
        rgba(37, 99, 235, 0) 100%);
    pointer-events: none;
    animation: b2-sheen 3.4s ease-in-out infinite;
}

.upnext-card__main,
.upnext-card__side {
    position: relative;
    z-index: 1;
    min-width: 0;
}

/* The opened number breathes gently. */
.upnext-card__value--open {
    animation: b2-value-breathe 2.6s ease-in-out infinite;
}

/* Last-minute state, toggled by assets/js/result-ui.js like board rows. */
.upnext-card.is-upcoming-highlight {
    background: #f5f8ff;
    border-color: #c7d7fe;
}

.upnext-card__main { min-width: 0; }

.upnext-chip {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.6;
    text-transform: uppercase;
    white-space: nowrap;
}

.upnext-chip--open {
    background: rgba(15, 157, 118, .12);
    color: var(--b2-done);
}

.upnext-chip--next {
    background: rgba(37, 99, 235, .10);
    color: var(--b2-next);
}

.upnext-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* WAITING badge - right (next) card me hamesha dikhta hai.
   Time ke hisab se: time nikal gaya + result pending = red blink (is-awaited). */
.upnext-chip--waiting {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #ea580c;
}

.upnext-chip--waiting .upnext-chip__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    animation: b2-livedot 1.2s ease-in-out infinite;
}

.upnext-chip--waiting.is-awaited {
    background: rgba(229, 72, 77, .1);
    border-color: rgba(229, 72, 77, .35);
    color: #d92d20;
    animation: b2-urgent 1s ease-in-out infinite;
}

.upnext-chip--waiting.is-awaited .upnext-chip__dot { background: #d92d20; }

.upnext-card__name {
    display: block;
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--b2-ink);
}

.upnext-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin-top: 3px;
    color: var(--b2-mute);
    font-size: .75rem;
    font-weight: 500;
}

.upnext-card__time { font-variant-numeric: tabular-nums; }

.upnext-card__link {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--b2-line);
    border-radius: 6px;
    background: none;
    color: var(--b2-mute);
    font-size: .6875rem;
    font-weight: 600;
}

.upnext-card__link:hover {
    background: var(--b2-line-soft);
    border-color: #d8dce2;
    color: var(--b2-ink);
    text-decoration: none;
}

.upnext-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--b2-ink);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.upnext-card__side { text-align: right; }

.upnext-count {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--b2-next);
    font-variant-numeric: tabular-nums;
}

/* Final hour: the countdown turns red and blinks. */
.upnext-count.is-urgent {
    color: #d92d20;
    animation: b2-urgent 1s ease-in-out infinite;
}

@keyframes b2-urgent {
    0%, 100% { opacity: 1; }
    50%      { opacity: .5; }
}

.upnext-count + .upnext-card__value {
    margin-top: 2px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--b2-faint);
}

@media (prefers-reduced-motion: reduce) {
    .upnext-clock .live-dot { animation: none; }
    .upnext-live,
    .upnext-live__dot,
    .upnext-card--next::before,
    .upnext-card__value--open,
    .upnext-count.is-urgent { animation: none; }
}

@media (max-width: 560px) {
    .upnext-live { padding: 5px 11px; font-size: .6875rem; }
    .upnext-clock { font-size: .8125rem; padding: 4px 10px; }
    /* Two columns stay on phones too - compact sizing so both fit. */
    .upnext-cards { gap: 6px; }
    .upnext-card { padding: 10px; gap: 6px; border-radius: 10px; }
    .upnext-card__name { font-size: .8125rem; }
    .upnext-card__meta { font-size: .625rem; gap: 3px 6px; }
    .upnext-card__link { font-size: .625rem; padding: 1px 6px; }
    .upnext-chip { font-size: .5625rem; padding: 1px 6px; }
    .upnext-card__value { font-size: 1.125rem; }
    .upnext-count { font-size: .9375rem; }
    .upnext-count + .upnext-card__value { font-size: .9375rem; }
}

/* ---------- 10. Empty state + notices inside the board ---------- */
.section--board .empty {
    margin: 0;
    padding: 28px 16px;
    border: 1px dashed var(--b2-line);
    border-radius: var(--b2-radius);
    background: var(--b2-surface);
    color: var(--b2-mute);
    text-align: center;
}

.section--board .notice {
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid var(--b2-line);
    border-radius: var(--b2-radius);
    background: var(--b2-surface);
}

.section--board .notice__item { color: var(--b2-mute); }
.section--board .notice__dot { background: var(--b2-faint); }

/* ==========================================================================
   12. Featured game card above the monthly chart (sections/chart.php)
   It reuses the board card markup, so it gets the same flat look instead of
   the old solid gold block. Homepage only - the chart section is home-only.
   ========================================================================== */
body.home-page .combo-spot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px 68px;
    align-items: center;
    gap: 10px;
    min-height: 0;
    margin: 0 0 14px;
    padding: 12px 14px;
    background: var(--b2-surface);
    border: 1px solid var(--b2-line);
    border-left: 3px solid var(--b2-ink);
    border-radius: var(--b2-radius);
    box-shadow: var(--b2-shadow);
}

body.home-page .combo-spot__name {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--b2-ink);
}

body.home-page .combo-spot__meta {
    align-items: center;
    gap: 4px 10px;
    margin-top: 3px;
    font-size: .75rem;
    font-weight: 500;
    color: var(--b2-mute);
}

body.home-page .combo-spot__link {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--b2-line);
    border-radius: 6px;
    background: none;
    color: var(--b2-mute);
    font-size: .6875rem;
    font-weight: 600;
}

body.home-page .combo-spot__link:hover {
    background: var(--b2-line-soft);
    border-color: #d8dce2;
    color: var(--b2-ink);
    text-decoration: none;
}

body.home-page .combo-spot__values { display: contents; }

body.home-page .combo-spot__val {
    grid-row: 1;
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--b2-ink);
    font-variant-numeric: tabular-nums;
}

body.home-page .combo-spot__val--prev {
    grid-column: 2;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--b2-prev);
}

/* ==========================================================================
   13. Responsive
   ========================================================================== */
@media (max-width: 560px) {
    .section--board .board-card,
    .section--board .board-cards .board-card.board__row,
    .section--board .board-cards .board-card.board__row:hover {
        grid-template-columns: minmax(0, 1fr) 52px 52px;
        gap: 8px;
        padding: 11px 12px;
        border-radius: 10px;
    }

    .section--board .board-card__name { font-size: .9375rem; }
    .section--board .board-card__val--prev { font-size: .9375rem; }
    .section--board .board-card__val--today { font-size: 1.1875rem; }
    .section--board .board-card__val.is-xx { font-size: 1rem; }
    .section--board .board-fastbar { padding: 13px 10px; font-size: .95rem; }
    .section--board .board-dates { padding: 10px 12px; font-size: .8rem; gap: 12px; }
    .section--board .board-dates__day { min-width: 0; }
    .section--board .board-group__note { display: none; }

    body.home-page .combo-spot {
        grid-template-columns: minmax(0, 1fr) 52px 52px;
        gap: 8px;
        padding: 11px 12px;
        border-radius: 10px;
    }

    body.home-page .combo-spot__name { font-size: .9375rem; }
    body.home-page .combo-spot__val { font-size: 1.1875rem; }
    body.home-page .combo-spot__val--prev { font-size: .9375rem; }
}