:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bg: #f8f7fc;
    --surface: #fff;
    --soft: #f0ebfc;
    --text: #1d1926;
    --muted: #726d80;
    --accent: #7243eb;
    --accent-text: #6231d0;
    --button: #7243eb;
    --border: #e9e3f3;
    --track: #eae0fc;
    --notice: #fff5df;
    --notice-text: #745115;
    --shadow: 0 10px 32px rgb(37 22 76 / 5%);
    background: var(--bg);
    color: var(--text);
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121019;
    --surface: #1d1928;
    --soft: #29213c;
    --text: #f4f0ff;
    --muted: #b4aabe;
    --accent: #ad8bff;
    --accent-text: #be9eff;
    --button: #7140e2;
    --border: #352c45;
    --track: #302444;
    --notice: #352a1b;
    --notice-text: #f2d092;
    --shadow: 0 10px 32px rgb(0 0 0 / 12%);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100vh; margin: 0; padding: clamp(1.125rem, 4vw, 3rem) 1.125rem 3rem; background: var(--bg); color: var(--text); }
a { color: var(--accent-text); text-underline-offset: .2rem; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, p { margin-top: 0; }
p, li { line-height: 1.6; }
/* One shared width for both public pages and their header. */
.site-header, .round-page, .history { width: min(100%, 40rem); margin-inline: auto; }
.site-header { margin-bottom: 2.75rem; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { color: var(--text); font-size: 1.4rem; letter-spacing: -.055em; font-weight: 800; text-decoration: none; }
.brand span { color: var(--accent-text); }
.tagline { margin: .3rem 0 0; color: var(--muted); font-size: .85rem; }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; }
.language-toggle { display: flex; padding: .2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.language-toggle a { display: grid; place-items: center; min-width: 2.25rem; min-height: 2.25rem; padding: .4rem; border-radius: 999px; color: var(--muted); font-size: .75rem; font-weight: 750; text-decoration: none; }
.language-toggle a:hover, .language-toggle a[aria-current="true"] { background: var(--soft); color: var(--accent-text); }
.theme-toggle { display: grid; place-items: center; flex-shrink: 0; width: 2.75rem; height: 2.75rem; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); }
.theme-toggle:hover { color: var(--accent-text); border-color: var(--accent); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-sun, [data-theme="dark"] .theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: 1.5rem; font-size: .8rem; }
.site-nav a { min-height: 2rem; padding: .3rem 0; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent-text); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.telegram-link, .site-nav .telegram-link { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 2.75rem; padding: .6rem .9rem; border: 1px solid var(--border); border-radius: 999px; background: var(--soft); color: var(--accent-text); font-size: .8rem; font-weight: 650; text-decoration: none; white-space: nowrap; transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.site-nav .telegram-link { margin-left: auto; }
.telegram-link:hover, .site-nav .telegram-link:hover { background: var(--surface); border-color: var(--accent); box-shadow: var(--shadow); }
.telegram-follow { margin-top: 1.25rem; text-align: center; }
.telegram-link svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.telegram-arrow { opacity: .65; }
.round-hero { text-align: center; }
.eyebrow { color: var(--accent-text); font-size: .7rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.round-hero .eyebrow { margin-bottom: .5rem; }
.round-hero h1 { margin-bottom: .65rem; line-height: 1; font-size: inherit; overflow-wrap: anywhere; }
.jackpot { font-size: clamp(3.5rem, 13vw, 5rem); font-weight: 850; letter-spacing: -.075em; font-variant-numeric: tabular-nums; }
.currency { font-size: clamp(1.2rem, 5vw, 1.8rem); font-weight: 800; letter-spacing: -.04em; }
.prize-caption { display: block; margin-top: .8rem; color: var(--muted); font-size: 1.05rem; font-weight: 400; letter-spacing: 0; }
.prize-highlights { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; justify-content: center; font-size: .85rem; }
.badge { display: inline-block; padding: .35rem .65rem; border-radius: 999px; color: var(--accent-text); background: var(--soft); font-size: .7rem; font-weight: 750; }
.buy-ticket { display: block; margin-top: 1.65rem; padding: 1.1rem 1rem; border-radius: 1.5rem; background: var(--button); color: #fff; box-shadow: 0 12px 28px rgb(114 67 235 / 20%); text-decoration: none; text-align: center; text-transform: uppercase; font-size: 1.1rem; font-weight: 800; letter-spacing: .025em; }
a.buy-ticket:hover { filter: brightness(1.08); }
.buy-ticket span { display: block; margin-top: .3rem; font-size: .75rem; font-weight: 500; opacity: .85; letter-spacing: 0; text-transform: none; }
.round-complete { background: var(--soft); color: var(--accent-text); box-shadow: none; }
.purchase-note { margin: .85rem 0 0; color: var(--muted); font-size: .85rem; }
.round-progress { margin: 1.8rem 0 2rem; }
progress { display: block; appearance: none; border: 0; width: 100%; height: .7rem; margin: .85rem 0 1.1rem; border-radius: 1rem; overflow: hidden; background: var(--track); color: var(--accent); }
progress::-webkit-progress-bar { border-radius: 1rem; background: var(--track); }
progress::-webkit-progress-value { border-radius: 1rem; background: var(--accent); }
progress::-moz-progress-bar { border-radius: 1rem; background: var(--accent); }
.round-progress h2 { margin-bottom: .25rem; font-size: 1.1rem; }
.round-progress p { margin-bottom: .3rem; color: var(--muted); font-size: .8rem; }
.sync-note { color: var(--muted); font-size: .72rem !important; }
.disclosure { margin: 1rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: 1.4rem; box-shadow: var(--shadow); }
.disclosure summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem; cursor: pointer; font-size: .85rem; font-weight: 750; list-style: none; }
.disclosure summary::-webkit-details-marker { display: none; }
.chevron { flex-shrink: 0; width: .5rem; height: .5rem; margin-right: .25rem; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg); }
.disclosure[open] .chevron { transform: rotate(225deg); }
.disclosure-content { padding: 0 1.25rem 1.25rem; }
.disclosure-content > :last-child { margin-bottom: 0; }
.disclosure-content p, .disclosure-content li { color: var(--muted); font-size: .8rem; }
.transparency { margin: 2.3rem .25rem 1.75rem; }
.transparency h2 { font-size: 1rem; margin-bottom: .5rem; }
.transparency p { color: var(--muted); font-size: .85rem; }
.payment-details { scroll-margin-top: 1rem; }
.payment-details h2 { font-size: 1.2rem; }
.qr { display: block; width: min(100%, 240px); height: auto; margin: 1.25rem auto; padding: .65rem; border-radius: .75rem; background: #fff; }
code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.wallet-box { display: grid; gap: .7rem; justify-items: start; margin-bottom: 1.25rem; }
.wallet-box > span, .token-label { margin-bottom: .35rem; color: var(--muted); font-size: .75rem; }
.wallet-box code, .contract-address { display: block; width: 100%; font-size: .8rem; line-height: 1.65; padding: .75rem; border-radius: .6rem; background: var(--soft); }
.copy-address { min-height: 2.75rem; margin-top: .4rem; padding: .55rem .75rem; background: var(--soft); border: 0; color: var(--accent-text); border-radius: .6rem; font-size: .75rem; font-weight: 650; }
.copy-address:hover { outline: 1px solid var(--accent); }
.notice { margin: 1.25rem 0; padding: .85rem 1rem; background: var(--notice); color: var(--notice-text) !important; border-radius: .75rem; font-size: .8rem; }
.rules ul { padding-left: 1rem; margin: 0; }
.rules li + li { margin-top: .6rem; }
.empty-round { padding: 1.5rem 0; }
.empty-round h1 { font-size: 2.4rem; line-height: 1.1; margin: .75rem 0; }
.empty-round p { color: var(--muted); }
.empty-round-announcement { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.empty-round-announcement p { margin: 0; }
/* Results use the same palette and theme as the current round. */
.history-heading { margin: 2.5rem 0 2rem; }
.history-heading h1 { font-size: clamp(2rem, 6vw, 3.5rem); line-height: 1.15; margin: .75rem 0; overflow-wrap: anywhere; }
.lead { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.card { padding: clamp(1.25rem, 4vw, 2rem); background: var(--surface); border: 1px solid var(--border); border-radius: 1.5rem; box-shadow: var(--shadow); }
.result-card { margin-bottom: 1.5rem; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.result-heading h2 { margin: .5rem 0 0; font-size: 1.5rem; overflow-wrap: anywhere; }
.result-heading .badge { flex-shrink: 0; }
.result-note { color: var(--muted); font-size: .85rem; margin: 1rem 0 0; }
.result-summary { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin: 1.5rem 0; padding: 1.25rem; background: var(--soft); border-radius: .8rem; }
.result-summary span { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .8rem; }
.result-summary strong { font-size: 1.65rem; overflow-wrap: anywhere; }
.result-summary small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.winner-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.winner-table th { padding: 0 0 .8rem; color: var(--muted); font-size: .8rem; font-weight: 500; text-align: left; }
.winner-table th:first-child { width: 72%; }
.winner-table th:last-child { text-align: right; }
.winner-table td { padding: 1rem 0; border-top: 1px solid var(--border); vertical-align: top; }
.winner-table td:first-child { padding-right: 1rem; }
.winner-table code { display: block; color: var(--text); font-size: .85rem; line-height: 1.6; }
.winning-amount { color: var(--accent-text); text-align: right; font-weight: 750; overflow-wrap: anywhere; }
.winning-amount small { display: block; margin-top: .25rem; color: var(--muted); font-size: .75rem; font-weight: 400; }
.history-footnote { color: var(--muted); font-size: .8rem; line-height: 1.6; text-align: center; }
.copy-feedback { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem); margin: 0; padding: .75rem 1rem; background: var(--surface); color: var(--text); border: 1px solid var(--accent); box-shadow: var(--shadow); border-radius: .65rem; font-size: .85rem; z-index: 5; }
.copy-feedback:empty { display: none; }
.empty-results { text-align: center; }
.empty-results h2 { margin-top: 1rem; }
.text-link { color: var(--accent-text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 30rem) {
    .site-nav .telegram-link { width: 100%; margin-left: 0; }
    .result-heading { flex-direction: column; }
    .winner-table th:first-child { width: 65%; }
    .winner-table th { font-size: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
    .telegram-link, .site-nav .telegram-link { transition: none; }
}
