:root {
    color-scheme: dark;
    font-family: 'Inter', system-ui, sans-serif;
    background: #081815;
    color: #f8fcfa;
    --gold: #ffdf78;
    --muted: #aac6bf;
    --panel: #102b25;
    --line: #2d4e45;
}

*, *::before, *::after { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.48; }

.top { position: sticky; z-index: 2; top: 0; background: #0b241f; border-bottom: 1px solid var(--line); }
.top-content { display: flex; align-items: center; justify-content: space-between; gap: .65rem; max-width: 80rem; min-height: 4.25rem; margin: auto; padding: .65rem 1rem; }
.brand { display: flex; align-items: center; gap: .45rem; font-weight: 900; font-size: clamp(1.15rem, 5vw, 1.65rem); letter-spacing: -.07em; white-space: nowrap; }
.brand-icon { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; padding-right: .1em; font-size: .92em; font-style: italic; color: #183b2f; border-radius: .6rem; background: linear-gradient(133deg, #fff4ab, #e9af43); }
.gold { color: var(--gold); }
.access-actions { display: flex; gap: .35rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 2.75rem; padding: .55rem .82rem; border: 1px solid transparent; border-radius: .6rem; font-weight: 730; line-height: 1.2; text-align: center; cursor: pointer; }
.primary { color: #10271e; background: linear-gradient(145deg, #ffe88f, #f3c759); }
.quiet { color: #e5f8f1; background: #153a32; border-color: #35665a; }
.balance { padding: .34rem .72rem; white-space: nowrap; border: 1px solid #52766c; border-radius: 999px; }
.balance small { display: block; margin-bottom: .05rem; font-size: .68rem; color: var(--muted); }
.balance strong { color: var(--gold); font-size: 1rem; font-variant-numeric: tabular-nums; }

.wrap { max-width: 80rem; margin: auto; padding: 1rem; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: clamp(16rem, 32vw, 24rem); border-radius: 1rem; border: 1px solid #47695a; background: radial-gradient(ellipse at 80% 0%, #285642, #102820 75%); }
.hero img { position: absolute; inset: 0 0 0 auto; z-index: -2; width: 65%; height: 100%; object-fit: cover; object-position: 53% 42%; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #081c17 14%, #0b241f 33%, #0b241fd9 49%, #101b1722 100%); }
.hero-content { display: grid; justify-items: start; gap: .68rem; max-width: 77%; padding: clamp(1rem, 4vw, 3rem); }
.hero h1 { font-size: clamp(2rem, 5.5vw, 4rem); line-height: .99; letter-spacing: -.055em; }
.eyebrow { font-weight: 750; color: var(--gold); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.hero-content p:not(.eyebrow), .form-panel p { color: var(--muted); }
.hero-content .button { margin-top: .2rem; }

.notice { margin-bottom: .9rem; padding: .7rem .85rem; border: 1px solid #537b5b; border-radius: .65rem; background: #122f26; }
.notice.error { border-color: #a35b61; background: #391d26; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 1.28rem 0 .7rem; }
.section-heading h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.045em; }
.section-heading span { color: var(--muted); font-size: .84rem; }
.providers { display: flex; overflow-x: auto; gap: .5rem; margin-bottom: .75rem; padding: .15rem 0 .55rem; scrollbar-width: thin; }
.providers a, .switch a { display: flex; align-items: center; justify-content: center; min-height: 2.75rem; border: 1px solid var(--line); border-radius: 999px; padding: .35rem .85rem; white-space: nowrap; color: #d2e7df; }
.providers a[aria-current], .switch a[aria-current] { color: var(--gold); border-color: #a49557; background: #343721; font-weight: 700; }
.search { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .55rem; max-width: 34rem; margin-bottom: 1rem; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,10.4rem),1fr)); gap: .78rem; }
.game-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: .78rem; background: var(--panel); }
.game-card img { display: block; width: 100%; height: auto; aspect-ratio: 1.28; object-fit: cover; background: #163e33; }
.game-details { display: flex; flex-direction: column; align-items: start; gap: .28rem; padding: .65rem; }
.game-details h3 { font-size: .96rem; line-height: 1.18; overflow-wrap: anywhere; }
.game-details p { color: var(--muted); font-size: .76rem; }
.game-details form, .game-details > a { margin-top: auto; width: 100%; }
.game-details .button { min-height: 2.5rem; width: 100%; margin-top: .3rem; font-size: .84rem; }
.more { display: flex; width: max-content; margin: 1rem auto; }

.panel { border: 1px solid var(--line); border-radius: .9rem; background: var(--panel); }
.form-panel { display: grid; gap: .9rem; padding: clamp(1rem, 4vw, 1.6rem); margin: clamp(.65rem, 4vw, 2rem) auto; max-width: 34rem; }
.form-panel h1 { font-size: 1.7rem; letter-spacing: -.045em; }
.form-panel > form { display: grid; gap: .85rem; }
.form-panel > p a:not(.button) { color: var(--gold); text-decoration: underline; }
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
label { display: grid; gap: .35rem; color: #e5f4ee; font-size: .92rem; font-weight: 650; }
input, select { min-width: 0; width: 100%; min-height: 2.95rem; padding: .62rem .75rem; background: #08231d; color: #f7fbfa; border: 1px solid #3a685a; border-radius: .58rem; font-size: 1rem; }
input::placeholder { color: #8aaca1; }
.form-panel .inline-form { display: flex; }
.payments h2 { font-size: 1.15rem; }
.sandbox-panel { display: grid; gap: .65rem; padding: .85rem; border: 1px solid #55776d; border-radius: .65rem; }
.sandbox-panel form { display: grid; gap: .65rem; }
.sandbox-panel textarea { width: 100%; background: #08231d; color: inherit; border: 1px solid #3a685a; border-radius: .4rem; padding: .55rem; font: inherit; }
.payments-list { display: grid; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.payments-list li { display: grid; gap: .4rem; padding: .65rem; border: 1px solid var(--line); border-radius: .5rem; }
.confirmed { color: #9ae7c1; }

.bottom { position: fixed; inset: auto 0 0; z-index: 3; display: flex; align-items: center; justify-content: center; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); background: #0b241f; }
.bottom a { display: grid; place-items: center; min-height: 3.5rem; flex: 1; max-width: 16rem; padding: .45rem; text-align: center; color: var(--muted); font-size: .88rem; font-weight: 700; }
.bottom a[aria-current] { color: var(--gold); box-shadow: inset 0 2px var(--gold); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 37rem) {
    .wrap { padding: .8rem; }
    .top-content { padding: .58rem .8rem; }
    .access-actions .button { padding-inline: .55rem; font-size: .85rem; }
    .hero::after { background: linear-gradient(90deg, #081c17 7%, #0b241feb 42%, #0c1d1837 100%); }
    .hero img { width: 76%; }
    .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
}

.admin-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); align-items: start; gap: 1rem; margin-top: 1rem; }
.admin-columns .form-panel { width: 100%; max-width: none; margin: 0; }
