:root {
  color-scheme: dark;
  --background: #0b0c10;
  --surface: #111217;
  --card: #171923;
  --line: #343946;
  --text: #f5f5f8;
  --muted: #b4b9c5;
  --cyan: #65d4f5;
  --yellow: #f8cd53;
  --green: #8de2ad;
  --danger: #ffb6b5;
  font: 100%/1.5 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: var(--cyan); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.skip {
  position: absolute; z-index: 2; transform: translateY(-150%);
  padding: .75rem; background: var(--surface);
}
.skip:focus { transform: none; }
.shell {
  width: min(100%, 32rem); min-height: 100svh; margin: 0 auto;
  padding: clamp(1rem, 5vw, 1.75rem); background: var(--surface);
}
.site-header, .site-footer, .row, .section-head {
  display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.site-header { margin-bottom: .75rem; }
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  letter-spacing: .2em; font-weight: 850; text-decoration: none; font-size: 1.22rem;
}
.site-footer {
  border-top: 1px solid var(--line); margin-top: 2rem;
  font-size: .875rem; color: var(--muted);
}
.site-footer a, .text-action { display: inline-flex; min-height: 44px; align-items: center; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(1.65rem, 7vw, 2.15rem); line-height: 1.12; letter-spacing: -.035em; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
p, h1, h2, h3, li, dd { overflow-wrap: anywhere; }
.eyebrow, .badge { font-size: .81rem; letter-spacing: .09em; text-transform: uppercase; }
.eyebrow, .muted { color: var(--muted); }
.highlight { color: var(--yellow); }
.stack, form { display: grid; gap: 1rem; }
.stack.compact { gap: .55rem; }
.card { background: var(--card); border: 1px solid var(--line); padding: 1rem; border-radius: 1rem; }
.button {
  min-height: 48px; width: 100%; display: inline-flex; justify-content: center; align-items: center;
  text-align: center; padding: .72rem .9rem; border: 1px solid var(--cyan); border-radius: .8rem;
  font-weight: 730; color: var(--cyan); background: transparent; text-decoration: none;
}
.button.primary { background: var(--cyan); color: #07141a; }
.button:not(:disabled):hover { filter: brightness(1.12); }
input, select, textarea {
  display: block; width: 100%; min-height: 48px; padding: .65rem .75rem; border-radius: .65rem;
  color: var(--text); background: #13151e; border: 1px solid #5b6374;
}
textarea { resize: vertical; }
.instruction-text { white-space: pre-wrap; }
label { display: grid; gap: .3rem; min-width: 0; font-weight: 620; }
.checkbox-row { display: flex; gap: .65rem; align-items: center; min-height: 48px; cursor: pointer; }
.checkbox-row input { width: 1.25rem; min-height: 0; height: 1.25rem; margin: 0; accent-color: var(--cyan); }
.badge {
  width: fit-content; max-width: 100%; overflow-wrap: anywhere;
  border-radius: 2rem; padding: .36rem .65rem; color: var(--green); background: #183226; font-weight: 700;
}
.badge.demo, .badge.pending { color: var(--yellow); background: #382d15; }
.notice { margin-bottom: 1rem; color: var(--yellow); }
.notice:empty { margin-bottom: 0; }
.notice.error { color: var(--danger); }
#game-notice { margin-bottom: 0; }
#game-notice:empty { display: none; }
.game-nav { display: flex; flex-wrap: wrap; gap: .3rem .85rem; font-size: .9rem; }
.game-nav a { min-height: 44px; display: inline-flex; align-items: center; }
.game-nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.game-tabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem;
}
.game-tabs a {
  min-height: 48px; display: grid; place-items: center; padding: .5rem .3rem;
  border: 1px solid var(--line); border-radius: .65rem;
  font-size: .9rem; font-weight: 690; line-height: 1.25; text-align: center;
  text-decoration: none; overflow-wrap: anywhere;
}
.game-tabs a[aria-current="page"] { color: #07141a; background: var(--cyan); border-color: var(--cyan); }
.ticket-code { display: block; color: var(--cyan); font-weight: 700; font-size: 1.15rem; overflow-wrap: anywhere; }
.qr-code {
  display: block; width: min(100%, 12rem); aspect-ratio: 1; background: #fff;
  border-radius: .5rem; overflow: hidden;
}
.qr-code svg { display: block; width: 100%; height: 100%; }
.leaders, .plain-list { margin: 0; padding: 0; display: grid; gap: .65rem; list-style: none; }
.leader { flex-wrap: nowrap; }
.leader:first-child { border-color: var(--cyan); }
.leader strong { color: var(--cyan); }
.stat { display: grid; gap: .25rem; }
.stat dd { font-size: 1.45rem; font-weight: 780; }
details > summary { display: flex; align-items: center; min-height: 44px; color: var(--cyan); cursor: pointer; }
details > summary::before { content: '▸'; margin-right: .45rem; }
details[open] > summary::before { content: '▾'; }
details[open] > summary { margin-bottom: .6rem; }
