:root {
  --orange: #ff6a00; --orange-2: #ff8a33; --bg: #0d0d0d; --panel: #161616; --panel-2: #1f1f1f;
  --line: #2a2a2a; --fg: #ffffff; --muted: #a8a8a8; --ok: #3ccf7a; --bad: #ff5a5a; --radius: 14px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.5; }
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 440px; margin: 0 auto; padding: 0 20px; }

/* Header */
.sandbox-notice { background: #302510; color: #ffdd92; padding: 5px 16px; font-size: .875rem; text-align: center; }
.tv-top .sandbox-notice { border-radius: 4px; padding: 2px 8px; margin-right: auto; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(13,13,13,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { font-weight: 900; font-size: 1.35rem; color: var(--fg); letter-spacing: -.02em; }
.brand span { color: var(--orange); }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 18px; margin-left: auto; align-items: center; font-size: .95rem; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a.active { color: var(--fg); text-decoration: none; }
.nav a.btn, .nav a.btn:hover { color: #000; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 12px 20px;
  font: inherit; font-weight: 800; cursor: pointer; background: var(--orange); color: #000; text-decoration: none; }
.btn:hover { background: var(--orange-2); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid #5a2020; }
.btn.small { padding: 7px 12px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: default; }
label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--fg); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.check input { width: auto; }
.hint { color: var(--muted); font-size: .88rem; }
.msg { min-height: 1.4em; margin: 12px 0 0; font-size: .95rem; }
.msg.error { color: var(--bad); }
.msg.ok { color: var(--ok); }

/* Layout bits */
.hero { padding: 56px 0 28px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 12px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--orange); }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0 0 22px; }
.section { padding: 28px 0; }
.section h2 { margin: 0 0 6px; font-size: 1.5rem; }
.section .sub { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.page { padding: 40px 0 64px; }
.page h1 { margin: 0 0 8px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.tag { display: inline-block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; background: #2a1a0d; color: var(--orange); }
.tag.green { background: #0f2a1a; color: var(--ok); }
.tag.grey { background: #222; color: var(--muted); }
.tag.red { background: #2a0f0f; color: var(--bad); }
.muted { color: var(--muted); }

/* Game cards */
.game h3 { margin: 6px 0 4px; font-size: 1.3rem; }
.game p { color: var(--muted); margin: 0 0 14px; }
.sets { display: grid; gap: 8px; }
.set { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); }
.set .name { font-weight: 700; white-space: nowrap; }
.set .tag { white-space: nowrap; }
.set .spacer + * { white-space: nowrap; }
.coming { opacity: .6; }

/* Pricing */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 24px; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.price { font-size: 2.4rem; font-weight: 900; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.plan ul { padding-left: 18px; margin: 0; color: var(--muted); flex: 1; }
.plan li { margin: 4px 0; }

/* Tables */
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 10px 8px; }
table.data td { border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--panel-2); }
.table-wrap { overflow-x: auto; }

/* Stats */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.stat .v { font-size: 1.7rem; font-weight: 900; }
.stat .k { color: var(--muted); font-size: .85rem; }

/* Tabs */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin: 18px 0; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 700; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--fg); border-bottom-color: var(--orange); }

/* Dialog */
dialog { background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 460px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.7); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

.room-code { font-size: 3rem; font-weight: 900; letter-spacing: .25em; color: var(--orange); }
.legal h2 { margin-top: 28px; }
.legal p, .legal li { color: #ddd; }
@media (max-width: 640px) { .nav .hide-sm { display: none; } .hero { padding-top: 36px; } }

.brand { display: inline-flex; gap: 10px; align-items: center; flex-shrink: 0; }
.brand img { width: 122px; height: auto; }
.brand span { font-size: 1rem; padding-left: 10px; border-left: 1px solid #505050; }
.site-header .nav { flex-wrap: wrap; }
.site-header .nav a { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .site-header .wrap { height: auto; min-height: 60px; gap: 6px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
  .brand img { width: 96px; }
  .brand span { font-size: .85rem; }
  .nav { gap: 8px 12px; font-size: .86rem; }
  .site-header .nav { max-width: 100%; }
}
