:root {
    --ink: #162331;
    --muted: #607487;
    --ice: #ecf8ff;
    --ice-strong: #d8efff;
    --blue: #2479b9;
    --blue-deep: #155c92;
    --red: #d8292f;
    --red-deep: #a9161d;
    --green: #24945a;
    --green-deep: #14703e;
    --panel: rgba(255, 255, 255, 0.82);
    --panel-strong: rgba(255, 255, 255, 0.96);
    --border: rgba(86, 145, 183, 0.24);
    --shadow: 0 18px 50px rgba(50, 95, 125, 0.16);
    --row-height: 68px;
    --row-gap: 4px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #eef8ff;
    background-image: url('../assets/frostcandy-bg.png?v=1.0.1');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
body.modal-open { overflow: hidden; }
button, input, select { font: inherit; }
button { color: inherit; }
button:disabled { opacity: .48; cursor: not-allowed; transform: none !important; }

.page-haze {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(235,247,255,.14));
    z-index: -1;
}

/* D-003: canvas-driven free-floating frost orbs.
   The canvas stays behind the UI while the JavaScript handles randomized drift and edge-bounce motion. */
.ambient-orb-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    display: block;
}

.site-header,
.site-main,
.site-footer { position: relative; z-index: 2; }

.site-header {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}
.brand-wrap {
    color: inherit;
    text-decoration: none;
    line-height: 1;
    flex: 0 0 auto;
    border-radius: 10px;
}
.brand-wrap:focus-visible { outline: 3px solid rgba(36,121,185,.3); outline-offset: 5px; }
.brand {
    font-weight: 900;
    font-size: clamp(2.2rem, 5vw, 4.1rem);
    letter-spacing: -0.055em;
    color: #142a3b;
    text-shadow: 0 2px 0 rgba(255,255,255,.9), 0 8px 20px rgba(56,110,150,.12);
}
.brand-frost-f { color: var(--blue-deep); }
.brand-subtitle {
    margin-top: 7px;
    font-size: .73rem;
    letter-spacing: .34em;
    font-weight: 800;
    color: #537b97;
}

.live-strip {
    position: relative;
    min-width: 530px;
    display: grid;
    grid-template-columns: auto minmax(205px, 1fr);
    gap: 16px;
    align-items: center;
    padding: 10px 34px 10px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(77,137,177,.22);
    box-shadow: 0 10px 28px rgba(52,97,125,.11);
    backdrop-filter: blur(14px) saturate(1.08);
}
.latest-result-button {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    text-align: inherit;
    border-radius: 12px;
}
.latest-result-button:hover .mini-balls { transform: translateY(-1px); }
.latest-result-button:focus-visible { outline: 3px solid rgba(36,121,185,.27); outline-offset: 4px; }
.latest-result-button:disabled { opacity: .72; cursor: default; }
.latest-result-button.updating { opacity: 1; }
.latest-result-button .mini-balls { transition: transform .16s ease; }
.latest-result-button .live-label, .latest-result-button .live-sub { display: block; }

.live-label {
    color: #55748a;
    font-weight: 800;
    font-size: .66rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    text-align: right;
    margin-bottom: 5px;
}
.mini-balls { display: flex; justify-content: flex-end; gap: 5px; }
.latest-updating-message {
    min-height: 31px;
    max-width: 210px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #1d6f9f;
    font-size: .69rem;
    font-weight: 850;
    letter-spacing: .025em;
    line-height: 1.2;
    text-align: right;
    text-shadow: 0 1px 0 rgba(255,255,255,.9);
}
.mini-ball {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(76,95,109,.19);
    background: radial-gradient(circle at 31% 25%, #fff 0 13%, #f8fbfd 30%, #e1e7eb 67%, #bac5cc 100%);
    box-shadow: inset -4px -4px 7px rgba(70,90,103,.12), 0 3px 7px rgba(54,78,94,.14);
    font-size: .76rem;
    font-weight: 900;
}
.mini-ball.power {
    color: #fff;
    border-color: rgba(126,12,18,.36);
    background: radial-gradient(circle at 31% 25%, #ff7a7e 0 8%, #ed3d43 31%, #c61d24 69%, #8b1116 100%);
}
.skeleton-mini { color: transparent; opacity: .55; }
.live-sub {
    margin-top: 4px;
    color: #708596;
    font-size: .7rem;
    text-align: right;
}
.live-meta-block { min-width: 0; border-left: 1px solid rgba(80,135,169,.15); padding-left: 15px; }
.live-meta-row {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 7px;
    align-items: baseline;
    margin: 1px 0;
    font-size: .76rem;
}
.live-meta-row span { color: #728797; text-transform: uppercase; letter-spacing: .06em; font-size: .61rem; font-weight: 800; }
.live-meta-row strong { text-align: right; overflow-wrap: anywhere; }
.live-winners {
    margin-top: 5px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px 11px;
    color: #60798a;
    font-size: .69rem;
    text-align: right;
    line-height: 1.3;
}
.winner-item + .winner-item { position: relative; }
.winner-item + .winner-item::before { content: "·"; margin-right: 11px; color: #9aabb6; }
.winner-label { font-weight: 700; }
.data-health {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: help;
}
.data-health span {
    display: block;
    width: 8px;
    height: 8px;
    margin: 5px;
    border-radius: 50%;
    background: #7aa8c6;
    box-shadow: 0 0 0 4px rgba(122,168,198,.14);
}
.data-health.ok span { background: #43a66d; box-shadow: 0 0 0 4px rgba(67,166,109,.13); }
.data-health.warn span { background: #d99a32; box-shadow: 0 0 0 4px rgba(217,154,50,.14); }

.site-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding-bottom: 8px;
}
.control-panel,
.stage-card,
.math-note {
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px) saturate(1.08);
}
.control-panel {
    border-radius: 24px;
    background: var(--panel);
    padding: 12px 14px;
}
.top-control-row,
.mode-buttons,
.secondary-actions,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.top-control-row { justify-content: space-between; }
.mode-buttons { flex: 1 1 auto; }
.mode-buttons .control-button { padding-left: 16px; padding-right: 16px; }
.secondary-actions { justify-content: flex-end; }
.filter-row {
    margin-top: 7px;
    padding-top: 7px;
    gap: 8px;
    border-top: 1px solid rgba(88,145,181,.14);
}

.control-button,
.field-control {
    min-height: 45px;
    border-radius: 13px;
    border: 1px solid rgba(65,126,165,.26);
    background: rgba(255,255,255,.84);
}
.control-button {
    appearance: none;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 760;
    box-shadow: 0 4px 12px rgba(61,111,143,.08);
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.control-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(36,121,185,.58);
    box-shadow: 0 7px 18px rgba(61,111,143,.13);
}
.control-button:active:not(:disabled) { transform: translateY(1px); }
.control-button:focus-visible,
.field-control:focus-within,
.result-scroller:focus-visible,
.modal-close:focus-visible,
.view-button:focus-visible,
.mini-tool:focus-visible,
.tiny-action:focus-visible,
.number-pick:focus-visible,
.small-link-button:focus-visible,
.period-toggle:focus-visible,
.period-step:focus-visible {
    outline: 3px solid rgba(36,121,185,.27);
    outline-offset: 2px;
}
.control-button.primary,
.control-button.active {
    color: #fff;
    border-color: var(--blue-deep);
    background: linear-gradient(180deg, #3289c8, #1c6da8);
}
.control-button.frosty {
    background: linear-gradient(180deg, rgba(242,252,255,.98), rgba(210,240,255,.94));
    color: #15557e;
}
.control-button.frosty.active { color: #fff; background: linear-gradient(180deg, #4b9dcc, #1973a6); }
.mode-title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}
.frosty-tuning {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #557084;
    font-size: .68rem;
    font-weight: 760;
}
.frosty-tuning[hidden] { display: none; }
.frosty-independent-tuning { flex-wrap: wrap; row-gap: 4px; }
.frosty-tuning-label { margin-left: 2px; }
.frosty-tuning-options {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid rgba(58,130,175,.23);
    border-radius: 8px;
    background: rgba(244,250,253,.86);
}
.frosty-tuning-options button {
    width: 27px;
    height: 25px;
    padding: 0;
    border: 0;
    border-right: 1px solid rgba(58,130,175,.16);
    background: transparent;
    color: #597286;
    cursor: pointer;
    font-size: .68rem;
    font-weight: 820;
}
.frosty-tuning-options button:last-child { border-right: 0; }
.frosty-tuning-options.tuning-options-wide button {
    width: auto;
    min-width: 40px;
    padding: 0 7px;
}
.frosty-tuning-options button.active { background: #d8effb; color: #155d8d; }
.frosty-tuning-options button:focus-visible { outline: 2px solid rgba(36,121,185,.3); outline-offset: -2px; }
.my-picks-button { white-space: nowrap; }
.pool-badge {
    display: inline-grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(36,121,185,.14);
    color: #17658f;
    box-shadow: inset 0 0 0 1px rgba(36,121,185,.08);
    font-size: .68rem;
    font-weight: 900;
}
.my-picks-button.active .pool-badge {
    background: rgba(255,255,255,.94);
    color: #176da2;
    box-shadow: 0 0 0 2px rgba(255,255,255,.36);
}
.compact-action { min-height: 38px; padding: 0 13px; font-size: .78rem; }

.filter-row .field-control { min-height: 38px; }
.field-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 9px 0 13px;
    color: #567083;
    font-size: .78rem;
    font-weight: 760;
    letter-spacing: .01em;
}
.field-control input,
.field-control select {
    height: 31px;
    border: 0;
    border-left: 1px solid rgba(74,130,164,.18);
    padding-left: 10px;
    background: transparent;
    color: var(--ink);
    font-weight: 650;
    outline: 0;
}
.field-control input { min-width: 136px; }
.date-control input { min-width: 112px; }
.histories-control { padding-right: 7px; }
.histories-control input { width: 58px; min-width: 58px; padding-right: 5px; }
.history-filter-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    border: 1px solid rgba(75,136,173,.14);
    border-radius: 15px;
    background: rgba(219,239,249,.46);
}
.history-filter-group .field-control {
    background: rgba(255,255,255,.72);
    box-shadow: 0 2px 7px rgba(61,111,143,.04);
}
.history-filter-group .date-control input { width: 108px; min-width: 108px; }
.history-filter-group .histories-control input { width: 50px; min-width: 50px; }
.history-or {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #6b8496;
    font-size: .59rem;
    font-weight: 900;
    letter-spacing: .08em;
}
.field-control select { min-width: 72px; cursor: pointer; }
.graph-button-grid {
    margin-left: auto;
    display: grid;
    grid-template-columns: repeat(5, 70px);
    gap: 4px;
}
.graph-button {
    min-height: 32px;
    width: 70px;
    padding: 0 7px;
    border-radius: 10px;
    font-size: .74rem;
    text-align: center;
}

.stage-card {
    margin-top: 12px;
    border-radius: 24px;
    background: rgba(255,255,255,.86);
    padding: 13px 18px 11px;
    overflow: hidden;
}
.stage-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .68rem;
    color: #668297;
    font-weight: 820;
    margin-bottom: 4px;
}
.stage-heading strong { font-size: 1.22rem; }
.mode-math { margin-top: 3px; color: #738797; font-size: 1rem; line-height: 1.35; }
.stage-heading-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.result-summary { color: #597487; font-size: 1rem; font-weight: 650; text-align: right; }
.result-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.marked-count { color: #698193; font-size: .7rem; font-weight: 760; margin-right: 2px; }
.download-tool { display: inline-flex; align-items: center; gap: 4px; }
.view-toggle { display: inline-flex; border: 1px solid rgba(70,126,161,.18); border-radius: 9px; overflow: hidden; background: rgba(245,250,253,.8); }
.view-button,
.mini-tool,
.tiny-action,
.small-link-button,
.period-toggle,
.period-step {
    border: 1px solid rgba(68,126,163,.19);
    background: rgba(255,255,255,.88);
    cursor: pointer;
    font-weight: 760;
}
.view-button { border: 0; padding: 6px 9px; color: #60788a; font-size: .68rem; }
.view-button.active { background: #e0f1fb; color: #185c89; }
.mini-tool { min-height: 29px; padding: 0 9px; border-radius: 8px; color: #46677e; font-size: .69rem; }
.mini-tool.active {
    color: #fff;
    border-color: #1f6f9d;
    background: linear-gradient(180deg, #3890c5, #1f6f9d);
}

.result-window-shell {
    position: relative;
    width: min(720px, 100%);
    margin: 8px auto 0;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(234,247,254,.72), rgba(255,255,255,.9));
    border: 1px solid rgba(68,131,171,.14);
    overflow: hidden;
}
.result-scroller {
    position: relative;
    height: calc((var(--row-height) * 5) + (var(--row-gap) * 4));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 14px;
    scroll-snap-type: y proximity;
    scrollbar-width: none;
    overscroll-behavior: contain;
}
.result-scroller::-webkit-scrollbar { display: none; }
.result-window-shell.winning-history-view {
    width: min(900px, 100%);
    overflow: hidden;
}
.result-window-shell.winning-history-view .result-scroller {
    /* Match the compact five-row viewport used by the normal play modes.
       History still scrolls internally and lazy-loads, but never grows taller
       than the familiar results window. */
    height: calc((var(--row-height) * 5) + (var(--row-gap) * 4));
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: none;
    overscroll-behavior: contain;
    padding: 0 14px 6px;
    scrollbar-width: none;
}
.result-window-shell.winning-history-view .result-scroller::-webkit-scrollbar { display: none; }
.result-window-shell.winning-history-view .result-fade { display: none; }
.result-window-shell.winning-history-view .play-row.latest-row {
    height: calc((var(--row-height) * 5) + (var(--row-gap) * 4));
    min-height: calc((var(--row-height) * 5) + (var(--row-gap) * 4));
}
.result-window-shell.winning-history-view .play-row.latest-row.backtest-row .ball-set,
.result-window-shell.winning-history-view .play-row.backtest-row:not(.latest-row) .ball-set {
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 761px) {
    /* Historical rows have three meaningful regions: date, pool coverage, and
       winning balls. Give the metadata enough room to stay readable, then
       center the balls in all remaining horizontal space instead of leaving a
       large unused gutter on the right. */
    .result-window-shell.winning-history-view .play-row.backtest-row:not(.latest-row) {
        display: grid;
        grid-template-columns: 120px 92px minmax(0, 1fr) 18px;
        column-gap: 10px;
        align-items: center;
        padding: 0 12px 0 18px;
    }
    .result-window-shell.winning-history-view .play-row.backtest-row:not(.latest-row) .play-number.draw-date {
        position: static;
        width: auto;
        text-align: left;
        white-space: nowrap;
    }
    .result-window-shell.winning-history-view .play-row.backtest-row:not(.latest-row) .pool-coverage {
        position: static;
        min-width: 0;
        justify-self: start;
    }
    .result-window-shell.winning-history-view .play-row.backtest-row:not(.latest-row) .ball-set {
        margin: 0;
        justify-self: center;
    }
    .result-window-shell.winning-history-view .play-row.backtest-row:not(.latest-row) .keep-dot {
        position: static;
        justify-self: end;
    }
}
.history-load-sentinel {
    height: 2px;
    margin: 0;
    pointer-events: none;
}
.result-fade {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    height: 24px;
    pointer-events: none;
}
.result-fade-top { top: 0; background: linear-gradient(180deg, rgba(245,252,255,.98), rgba(245,252,255,0)); }
.result-fade-bottom { bottom: 0; background: linear-gradient(0deg, rgba(250,253,255,.99), rgba(250,253,255,0)); }

.play-row {
    height: var(--row-height);
    margin-bottom: var(--row-gap);
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    position: relative;
    border-radius: 15px;
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease;
}
.play-row:hover { background: rgba(230,245,253,.46); }
.play-row:focus-visible { outline: 2px solid rgba(36,121,185,.32); outline-offset: -2px; }
.play-row:last-child { margin-bottom: 0; }
.play-row[hidden] { display: none; }
.play-number {
    position: absolute;
    left: 3px;
    width: 46px;
    color: rgba(80,112,134,.58);
    font-size: 1rem;
    font-weight: 800;
    text-align: right;
}
.play-number.draw-date { width: 92px; left: 0; font-size: 1rem; line-height: 1.2; }
.ball-set {
    margin-left: auto;
    margin-right: 31px;
    display: flex;
    align-items: center;
    gap: 9px;
    will-change: transform, opacity;
}
.play-row.check-row .ball-set { margin-left: 98px; }
.play-row.backtest-row:not(.latest-row) .ball-set { margin-left: 194px; }
.pool-coverage {
    position: absolute;
    left: 98px;
    z-index: 2;
    min-width: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #385568;
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}
.coverage-ball {
    width: 21px;
    height: 21px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-size: .62rem;
    font-weight: 950;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(50,77,93,.16);
}
.coverage-white {
    border: 1px solid rgba(66,91,106,.28);
    background: #fff;
    color: #111;
}
.coverage-power {
    border: 1px solid rgba(128,12,19,.35);
    background: linear-gradient(180deg, #ed454b, #bd1b22);
    color: #fff;
}
.coverage-slash { color: #91a2ad; font-weight: 800; }
.ball-pool-check {
    position: absolute;
    left: 50%;
    bottom: -18px;
    z-index: 4;
    color: #20ad55;
    font-size: 1.35rem;
    font-weight: 950;
    line-height: 1;
    text-shadow: 0 1px 0 #fff, 0 0 4px #fff, 0 2px 5px rgba(19,96,49,.22);
    transform: translateX(-50%);
    pointer-events: none;
}
.history-loading-row {
    height: 100%;
    display: grid;
    place-items: center;
    color: #6c8393;
    font-size: .84rem;
    font-weight: 760;
}
.keep-dot {
    position: absolute;
    right: 7px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid rgba(66,133,95,.25);
    background: rgba(255,255,255,.82);
    transition: background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.play-row.marked .keep-dot {
    background: #2eaa67;
    border-color: #238c55;
    box-shadow: 0 0 0 4px rgba(46,170,103,.13);
}
.match-meta {
    position: absolute;
    right: 27px;
    bottom: 4px;
    color: #718696;
    font-size: 1rem;
    font-weight: 760;
}
.match-meta.win { color: #a01b23; }
.play-row.awaiting .ball-set { opacity: 0; transform: translateX(-540px); }
.play-row.roll-in .ball-set { animation: row-roll-in 620ms cubic-bezier(.18,.76,.18,1) both; }
.play-row.roll-in .ball { animation: ball-spin 620ms cubic-bezier(.18,.76,.18,1) both; }
.play-row.roll-in .ball:nth-child(2) { animation-delay: 18ms; }
.play-row.roll-in .ball:nth-child(3) { animation-delay: 36ms; }
.play-row.roll-in .ball:nth-child(4) { animation-delay: 54ms; }
.play-row.roll-in .ball:nth-child(5) { animation-delay: 72ms; }
.play-row.roll-in .ball:nth-child(6) { animation-delay: 90ms; }
@keyframes row-roll-in {
    0% { opacity: 0; transform: translateX(-540px); }
    72% { opacity: 1; transform: translateX(7px); }
    88% { transform: translateX(-3px); }
    100% { opacity: 1; transform: translateX(0); }
}
@keyframes ball-spin { 0% { transform: rotate(-720deg); } 100% { transform: rotate(0deg); } }

.ball {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(85,104,118,.22);
    background: radial-gradient(circle at 31% 25%, #fff 0 13%, #f8fbfd 30%, #e1e7eb 67%, #b9c4cc 100%);
    box-shadow: inset -7px -8px 12px rgba(80,98,110,.14), inset 5px 5px 8px rgba(255,255,255,.95), 0 6px 11px rgba(65,92,108,.18);
    color: #17212a;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -.03em;
    text-shadow: 0 1px 0 rgba(255,255,255,.75);
    position: relative;
}
.ball-number-label {
    grid-area: 1 / 1;
    line-height: 1;
}
.ball-draw-count {
    position: absolute;
    left: 50%;
    bottom: -7px;
    z-index: 3;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 2px solid rgba(255,255,255,.96);
    border-radius: 999px;
    background: #cf2632;
    color: #fff;
    box-shadow: 0 2px 5px rgba(39,65,82,.25);
    font-size: .58rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: none;
    opacity: 0;
    transform: translate(-50%, 3px) scale(.82);
    transition: opacity .14s ease, transform .14s ease;
    pointer-events: none;
}
.ball.powerball .ball-draw-count { background: #176b98; }
.result-scroller.show-draw-counts .ball-draw-count {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}
.ball.powerball {
    margin-left: 6px;
    color: #fff;
    border-color: rgba(126,12,18,.45);
    background: radial-gradient(circle at 31% 25%, #ff7a7e 0 8%, #ed3d43 31%, #c61d24 69%, #8b1116 100%);
    box-shadow: inset -7px -8px 12px rgba(83,0,5,.25), inset 5px 5px 9px rgba(255,186,188,.38), 0 6px 12px rgba(140,25,31,.23);
    text-shadow: 0 1px 2px rgba(82,0,0,.55);
}
.ball.matched {
    outline: 3px solid rgba(54,157,224,.9);
    outline-offset: 2px;
    box-shadow: inset -7px -8px 12px rgba(80,98,110,.14), inset 5px 5px 8px rgba(255,255,255,.95), 0 0 0 5px rgba(69,174,235,.16), 0 0 18px rgba(43,145,212,.56), 0 6px 11px rgba(65,92,108,.18);
}
.ball.powerball.matched {
    box-shadow: inset -7px -8px 12px rgba(83,0,5,.25), inset 5px 5px 9px rgba(255,186,188,.38), 0 0 0 5px rgba(69,174,235,.18), 0 0 19px rgba(43,145,212,.62), 0 6px 12px rgba(140,25,31,.23);
}

.play-row.latest-row {
    height: 100%;
    min-height: calc((var(--row-height) * 5) + (var(--row-gap) * 4));
    margin: 0;
    padding: 68px 0 72px;
    box-sizing: border-box;
}
.play-row.latest-row .ball-set { margin: 0 auto; gap: 12px; }
.play-row.latest-row.backtest-row .ball-set { margin-left: 118px; margin-right: auto; }
.play-row.latest-row.backtest-row .pool-coverage {
    left: 16px;
    top: 50%;
    min-width: 92px;
    transform: translateY(-50%);
    font-size: .8rem;
}
.play-row.latest-row.backtest-row .coverage-ball { width: 24px; height: 24px; font-size: .68rem; }
.play-row.latest-row .ball { width: 82px; height: 82px; flex-basis: 82px; font-size: 1.48rem; }
.play-row.latest-row .ball.powerball { margin-left: 10px; }
.play-row.latest-row .play-number.draw-date {
    left: 24px;
    top: 22px;
    width: 190px;
    text-align: left;
    color: #476b82;
    font-size: 1.04rem;
    font-weight: 850;
}
.play-row.latest-row .keep-dot { right: 22px; top: 50%; transform: translateY(-50%); }
.latest-expanded-winners {
    position: absolute;
    top: 20px;
    right: 28px;
    width: min(230px, calc(100% - 42px));
    display: grid;
    gap: 6px;
    text-align: left;
}
.latest-expanded-title {
    color: #547489;
    font-size: .77rem;
    font-weight: 900;
    letter-spacing: .11em;
}
.latest-expanded-winner-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    color: #6d8494;
    font-size: .79rem;
    font-weight: 760;
    line-height: 1.35;
}
.latest-expanded-winner-line strong {
    color: #182935;
    font-size: .96rem;
    font-weight: 900;
}
.latest-expanded-winner-sep {
    color: #8ea1ae;
    font-weight: 800;
}
.latest-expanded-next {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    width: min(690px, calc(100% - 190px));
    display: grid;
    gap: 9px;
    color: #4e6b80;
    text-align: center;
    font-size: 1.06rem;
    font-weight: 760;
}
.latest-expanded-next-date {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
}
.latest-expanded-next-date span { color: #607a8b; }
.latest-expanded-next-date strong { color: #1e3341; font-size: 1.34rem; }
.latest-expanded-money {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
    color: #4c687d;
    font-size: 1.02rem;
}
.latest-expanded-money b { color: #425f73; }
.latest-expanded-money span { color: #1d3341; font-weight: 900; font-size: 1.13rem; }

.stage-footnote {
    width: min(720px, 100%);
    margin: 7px auto 0;
    display: flex;
    justify-content: center;
    gap: 14px;
    color: #60798b;
    font-size: .84rem;
    font-weight: 650;
    text-align: center;
}
.capacity-note { width: 100%; text-align: center; }

.math-note {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255,255,255,.69);
    color: #5e7281;
    font-size: .82rem;
    line-height: 1.55;
}
.math-note strong { color: #314c60; }

.frosty-mascot {
    position: fixed;
    left: -22px;
    bottom: -45px;
    width: clamp(128px, 13vw, 205px);
    z-index: 20;
    display: block;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    filter: drop-shadow(0 10px 16px rgba(38,75,99,.16));
    transform-origin: 32% 100%;
}
.frosty-mascot img {
    display: block;
    width: 100%;
    height: auto;
    -webkit-user-drag: none;
}
.frosty-mascot:focus-visible {
    outline: 3px solid rgba(36,121,185,.34);
    outline-offset: 4px;
}
@media (hover: hover) and (pointer: fine) { .frosty-mascot:hover { animation: frosty-bob .58s ease-in-out; } }
@keyframes frosty-bob {
    0% { transform: translateY(0) rotate(0deg); }
    35% { transform: translateY(-11px) rotate(-2deg); }
    68% { transform: translateY(-4px) rotate(1.1deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
.site-footer {
    position: relative;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 7px 18px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    color: rgba(45,74,94,.72);
    font-size: .74rem;
}
.footer-version { justify-self: start; font-weight: 800; color: rgba(39,71,92,.82); }
.footer-source {
    justify-self: center;
    width: max-content;
    max-width: min(100%, 650px);
    text-align: center;
    font-size: .76rem;
    font-weight: 600;
}
.footer-visitors { justify-self: end; font-weight: 750; }
.loading-row {
    height: var(--row-height);
    margin-bottom: var(--row-gap);
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(220,237,247,.55), rgba(255,255,255,.85), rgba(220,237,247,.55));
    background-size: 220% 100%;
    animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }

/* Shared centered modal system */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(34,57,72,.34);
    backdrop-filter: blur(7px);
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
    position: relative;
    width: min(920px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 24px;
    border-radius: 26px;
    border: 1px solid rgba(77,137,177,.24);
    background: rgba(255,255,255,.97);
    box-shadow: 0 30px 90px rgba(28,57,75,.28);
}
.graph-modal-card { width: min(960px, 100%); }
.picks-modal-card { width: min(920px, 100%); }
.check-modal-card { width: min(780px, 100%); }
.prizes-modal-card { width: min(760px, 100%); }
.modal-close {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 39px;
    height: 39px;
    padding: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(77,131,165,.2);
    border-radius: 50%;
    background: rgba(239,248,253,.96);
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.65rem;
    font-weight: 400;
    line-height: 1;
    z-index: 3;
}
.modal-card h2 { margin: 2px 48px 6px 0; font-size: 1.45rem; }
.modal-intro { margin: 0 42px 18px 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.graph-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.graph-heading h2 { margin: 1px 48px 5px 0; }
.graph-heading p { margin: 0; color: var(--muted); max-width: 790px; font-size: .88rem; line-height: 1.5; }
.graph-meta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.graph-meta {
    flex: 1 1 auto;
    padding: 10px 12px;
    border-radius: 11px;
    background: #edf7fc;
    color: #365f79;
    font-size: .91rem;
    font-weight: 680;
    letter-spacing: .005em;
}
.graph-draw-control {
    min-height: 39px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 8px 0 10px;
    border: 1px solid rgba(69,129,165,.20);
    border-radius: 10px;
    background: rgba(247,251,253,.96);
    color: #557084;
    font-size: .7rem;
    font-weight: 790;
}
.graph-draw-control[hidden] { display: none; }
.graph-draw-control input {
    width: 66px;
    height: 29px;
    padding: 0 6px;
    border: 1px solid rgba(69,129,165,.17);
    border-radius: 7px;
    background: #fff;
    color: #233847;
    font-weight: 760;
    text-align: center;
    outline: 0;
}
.graph-draw-control input:focus { border-color: rgba(36,121,185,.55); box-shadow: 0 0 0 2px rgba(36,121,185,.12); }
.graph-draw-control small { color: #8093a1; font-size: .61rem; white-space: nowrap; }
.period-controls { display: inline-flex; align-items: center; gap: 5px; }
.period-controls[hidden] { display: none; }
.period-toggle, .period-step { min-height: 34px; padding: 0 11px; border-radius: 9px; color: #46677e; font-size: .72rem; }
.period-step { width: 36px; padding: 0; font-size: 1rem; }
.graph-view-controls {
    margin-top: 9px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}
.graph-view-controls > .segmented-control:first-child { justify-self: start; }
.graph-data-filter { justify-self: center; }
.graph-range-control { justify-self: end; }
.segmented-control {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid rgba(69,129,165,.18);
    border-radius: 10px;
    background: #f6fafc;
}
.segment-button {
    min-height: 31px;
    padding: 0 12px;
    border: 0;
    border-right: 1px solid rgba(69,129,165,.13);
    background: transparent;
    color: #5e7688;
    cursor: pointer;
    font-size: .7rem;
    font-weight: 780;
}
.segment-button:last-child { border-right: 0; }
.segment-button.active { background: #dff1fb; color: #155d8d; }
.segment-button:focus-visible { outline: 2px solid rgba(36,121,185,.28); outline-offset: -2px; }
.graph-range-control[hidden] { display: none; }

.graph-selection-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #718596;
    font-size: .75rem;
}
.small-link-button { min-height: 32px; padding: 0 11px; border-radius: 9px; color: var(--green-deep); }
.period-overview-section { margin-top: 14px; }
.period-overview-heading {
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #6d8393;
    font-size: .7rem;
}
.period-overview-heading strong { color: #334f62; font-size: .82rem; }
.period-overview-wrap {
    overflow: hidden;
    border: 1px solid rgba(65,126,165,.13);
    border-radius: 13px;
    background: linear-gradient(180deg, rgba(245,251,254,.98), rgba(252,254,255,.98));
}
.period-overview-wrap canvas { width: 100%; height: auto; cursor: default; }
.chart-section { margin-top: 10px; }
.chart-section h3 { margin: 0 0 8px; font-size: .91rem; }
.chart-section h3 span { color: #7a8d9b; font-weight: 550; }
.canvas-scroll {
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(65,126,165,.13);
    background: rgba(250,253,255,.94);
}
.chart-wrap { position: relative; }
canvas { display: block; width: 100%; max-width: 100%; height: auto; cursor: crosshair; }
.chart-tooltip {
    position: fixed;
    z-index: 140;
    min-width: 120px;
    max-width: 260px;
    box-sizing: border-box;
    pointer-events: none;
    padding: 7px 9px;
    border-radius: 9px;
    color: #fff;
    background: rgba(26,43,55,.94);
    box-shadow: 0 5px 15px rgba(24,43,56,.2);
    font-size: .71rem;
    line-height: 1.4;
}
.range-summary {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f5f9fb;
    color: #637c8e;
    font-size: .73rem;
    line-height: 1.45;
}

.picks-global-actions { display: flex; gap: 7px; justify-content: flex-end; margin: -3px 0 12px; }
.pick-section { margin-top: 15px; }
.pick-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.pick-section-heading strong { font-size: .86rem; }
.pick-section-heading strong span { color: #7a8d9b; font-weight: 550; }
.tiny-action { min-height: 27px; padding: 0 8px; border-radius: 7px; color: #557083; font-size: .65rem; }
.number-pool-grid {
    display: grid;
    grid-template-columns: repeat(14, minmax(38px, 1fr));
    gap: 6px;
}
.number-pick {
    min-width: 0;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid rgba(80,112,130,.23);
    background: radial-gradient(circle at 32% 26%, #fff 0 13%, #f7fafc 31%, #e1e7eb 70%, #c0cbd2 100%);
    color: #24323c;
    cursor: pointer;
    font-size: .72rem;
    font-weight: 900;
    box-shadow: inset -3px -4px 6px rgba(72,91,103,.1), 0 2px 5px rgba(61,88,104,.11);
}
.number-pick.power {
    color: #fff;
    border-color: rgba(132,20,26,.34);
    background: radial-gradient(circle at 31% 25%, #fb767c 0 8%, #e83940 31%, #c71f26 69%, #921218 100%);
}
.number-pick.selected {
    border-color: #16864d;
    box-shadow: 0 0 0 3px rgba(36,148,90,.2), inset 0 0 0 2px rgba(255,255,255,.75);
    transform: translateY(-1px);
}
.number-pick.power.selected { box-shadow: 0 0 0 4px rgba(34,169,94,.35), inset 0 0 0 2px rgba(255,255,255,.78); }
.picks-footer {
    position: sticky;
    bottom: -24px;
    margin: 18px -24px -24px;
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid rgba(73,132,168,.16);
    background: rgba(248,252,254,.97);
}
.picks-footer > div { display: flex; flex-direction: column; gap: 3px; }
.picks-footer strong { font-size: .8rem; }
.picks-footer span { color: #6d8393; font-size: .7rem; }

.check-input-row { display: grid; grid-template-columns: repeat(6, minmax(80px, 1fr)); gap: 8px; }
.check-input-row label { display: flex; flex-direction: column; gap: 5px; color: #657e90; font-size: .68rem; font-weight: 760; }
.check-input-row input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(70,126,160,.23);
    border-radius: 12px;
    background: #fbfdff;
    text-align: center;
    color: #182630;
    font-size: 1rem;
    font-weight: 850;
    outline: 0;
}
.check-input-row input:focus { border-color: rgba(36,121,185,.65); box-shadow: 0 0 0 3px rgba(36,121,185,.1); }
.power-input input { border-color: rgba(197,31,40,.28); background: #fff7f7; color: #9e1d24; }
.form-error { min-height: 21px; padding-top: 7px; color: #a7232b; font-size: .75rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 5px; }

.prize-table-wrap { overflow-x: auto; border: 1px solid rgba(72,130,166,.15); border-radius: 14px; }
.prize-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.prize-table th, .prize-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(78,133,167,.12); }
.prize-table th { color: #4e6c80; background: #edf7fc; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; }
.prize-table td:nth-child(2), .prize-table th:nth-child(2) { text-align: right; }
.prize-table td:nth-child(3), .prize-table th:nth-child(3) { text-align: right; }
.prize-table tr:last-child td { border-bottom: 0; }
.odds-foot { margin-top: 12px; color: #5d7586; font-size: .78rem; text-align: right; }


@media (max-width: 780px) {
    .latest-expanded-winners {
        position: static;
        width: auto;
        margin: 8px 18px 0 auto;
        text-align: right;
        justify-items: end;
    }
    .play-row.latest-row {
        padding-top: 58px;
        padding-bottom: 86px;
    }
    .latest-expanded-next {
        width: min(100%, calc(100% - 24px));
        font-size: .95rem;
    }
    .latest-expanded-next-date strong { font-size: 1.12rem; }
    .latest-expanded-money { gap: 18px; font-size: .92rem; }
    .latest-expanded-money span { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
}

@media (max-width: 940px) {
    .site-header { align-items: flex-start; }
    .live-strip { min-width: 0; width: 55%; grid-template-columns: 1fr; gap: 7px; }
    .live-meta-block { border-left: 0; border-top: 1px solid rgba(80,135,169,.15); padding: 7px 0 0; }
    .live-label, .live-sub { text-align: left; }
    .mini-balls { justify-content: flex-start; }
    .live-meta-row strong, .live-winners { text-align: left; }
    .live-meta-row { grid-template-columns: 58px 1fr; }
    .secondary-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 760px) {
    :root { --row-height: 73px; --row-gap: 7px; }
    body { background-attachment: scroll; }
    .site-header { align-items: stretch; flex-direction: column; padding-top: 18px; gap: 14px; }
    .live-strip { width: 100%; grid-template-columns: 1fr 1fr; }
    .site-main, .site-header { width: min(100% - 20px, 1120px); }
    .site-main { padding-bottom: 120px; }
    .control-panel { padding: 11px; border-radius: 19px; }
    .mode-buttons .control-button { flex: 1 1 42%; min-width: 126px; padding: 0 10px; }
    .secondary-actions .control-button { flex: 1 1 145px; }
    .filter-row { align-items: stretch; }
    .history-filter-group { flex: 1 1 100%; flex-wrap: wrap; }
    .history-filter-group .date-control { flex: 1 1 190px; }
    .history-filter-group .histories-control { flex: 0 1 150px; }
    .field-control { flex: 1 1 190px; justify-content: space-between; }
    .histories-control, .plays-control { flex: 0 1 135px; }
    .graph-button-grid { margin-left: 0; width: 100%; grid-template-columns: repeat(5, 1fr); }
    .graph-button { width: 100%; }
    .stage-card { padding: 16px 10px 13px; border-radius: 21px; }
    .stage-heading { flex-direction: column; gap: 7px; }
    .stage-heading-right { width: 100%; align-items: flex-start; }
    .result-summary { text-align: left; }
    .result-tools { justify-content: flex-start; }
    .result-scroller { padding: 0 5px; }
    .play-number { display: none; }
    .play-row.check-row .play-number.draw-date { display: block; left: 2px; width: 72px; font-size: .72rem; }
    .ball-set { margin: 0 auto; gap: clamp(4px, 1.4vw, 8px); }
    .play-row.check-row .ball-set { margin-left: 76px; margin-right: 20px; }
    .play-row.backtest-row:not(.latest-row) { height: 86px; padding-top: 16px; box-sizing: border-box; }
    .play-row.backtest-row:not(.latest-row) .play-number.draw-date {
        display: block; left: 7px; top: 4px; width: 108px; text-align: left; font-size: .66rem;
    }
    .play-row.backtest-row:not(.latest-row) .pool-coverage {
        left: auto; right: 8px; top: 3px; min-width: auto; transform: none; font-size: .64rem;
    }
    .play-row.backtest-row:not(.latest-row) .coverage-ball { width: 18px; height: 18px; font-size: .55rem; }
    .play-row.backtest-row:not(.latest-row) .ball-set { margin: 12px auto 0; }
    .ball {
        width: clamp(42px, 11.8vw, 55px);
        height: clamp(42px, 11.8vw, 55px);
        flex-basis: clamp(42px, 11.8vw, 55px);
        font-size: clamp(.82rem, 3.8vw, 1.08rem);
    }
    .ball.powerball { margin-left: clamp(2px, 1vw, 6px); }
    .play-row.latest-row { padding: 76px 20px 78px; }
    .play-row.latest-row .ball-set { gap: clamp(4px, 1.2vw, 8px); }
    .play-row.latest-row.backtest-row .ball-set { margin: 0 auto; }
    .play-row.latest-row.backtest-row .pool-coverage {
        left: 12px; top: auto; bottom: 48px; min-width: auto; transform: none; font-size: .66rem;
    }
    .play-row.latest-row.backtest-row .coverage-ball { width: 19px; height: 19px; font-size: .56rem; }
    .play-row.latest-row .ball {
        width: clamp(43px, 12vw, 64px);
        height: clamp(43px, 12vw, 64px);
        flex-basis: clamp(43px, 12vw, 64px);
        font-size: clamp(.9rem, 4vw, 1.25rem);
    }
    .play-row.latest-row .ball.powerball { margin-left: clamp(2px, 1vw, 6px); }
    .play-row.latest-row .play-number.draw-date { left: 12px; top: 14px; width: 150px; font-size: .85rem; }
    .latest-expanded-winners { top: 12px; right: 12px; width: 105px; }
    .latest-expanded-winner span { font-size: .57rem; }
    .latest-expanded-winner strong { font-size: .72rem; }
    .latest-expanded-next { bottom: 12px; width: calc(100% - 30px); font-size: .66rem; }
    .latest-expanded-next-date strong { font-size: .74rem; }
    .latest-expanded-money { gap: 14px; }
    .keep-dot { right: 3px; width: 9px; height: 9px; }
    .match-meta { display: none; }
    .stage-footnote { padding: 0 5px; }
    .frosty-mascot { left: -15px; bottom: -30px; width: 118px; }
    .site-footer { padding-left: 105px; grid-template-columns: 1fr auto; }
    .footer-source { display: none; }
    .modal-backdrop { padding: 10px; align-items: center; }
    .modal-card { max-height: calc(100vh - 20px); padding: 18px 12px; border-radius: 20px; }
    .picks-footer { margin: 16px -12px -18px; bottom: -18px; padding: 11px 12px; }
    .number-pool-grid { grid-template-columns: repeat(10, minmax(30px, 1fr)); gap: 5px; }
    .check-input-row { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
    .graph-button-grid { grid-template-columns: repeat(3, 1fr); }
    .graph-view-controls { grid-template-columns: 1fr; align-items: stretch; }
    .graph-view-controls > .segmented-control:first-child,
    .graph-data-filter,
    .graph-range-control { justify-self: stretch; }
    .segmented-control { width: 100%; }
    .segment-button { flex: 1 1 0; }
}

@media (max-width: 520px) {
    .site-footer { padding-left: 95px; gap: 8px; }
    .brand-subtitle { letter-spacing: .22em; }
    .live-strip { grid-template-columns: 1fr; }
    .live-meta-block { border-top: 1px solid rgba(80,135,169,.15); }
    .stage-footnote { gap: 3px; }
    .capacity-note { text-align: center; }
    .field-control, .histories-control, .plays-control { flex-basis: 100%; }
    .history-filter-group { width: 100%; }
    .history-filter-group .date-control,
    .history-filter-group .histories-control { flex: 1 1 100%; }
    .history-or { width: 100%; height: 20px; }
    .number-pool-grid { grid-template-columns: repeat(7, minmax(32px, 1fr)); }
    .picks-footer { align-items: stretch; flex-direction: column; }
    .check-input-row { grid-template-columns: repeat(2, 1fr); }
    .graph-selection-note { align-items: flex-start; flex-direction: column; }
}


@media (max-width: 780px) {
    .latest-expanded-winners {
        position: static;
        width: auto;
        margin: 8px 18px 0 auto;
        text-align: right;
        justify-items: end;
    }
    .play-row.latest-row {
        padding-top: 58px;
        padding-bottom: 86px;
    }
    .latest-expanded-next {
        width: min(100%, calc(100% - 24px));
        font-size: .95rem;
    }
    .latest-expanded-next-date strong { font-size: 1.12rem; }
    .latest-expanded-money { gap: 18px; font-size: .92rem; }
    .latest-expanded-money span { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .play-row.awaiting .ball-set { opacity: 1; transform: none; }
}
