:root {
  color-scheme: light dark;
  --background: oklch(1 0 0);
  --foreground: oklch(.141 .005 285.823);
  --card: oklch(1 0 0);
  --muted: oklch(.967 .001 286.375);
  --muted-foreground: oklch(.552 .016 285.938);
  --border: oklch(.92 .004 286.32);
  --input: oklch(.92 .004 286.32);
  --ring: oklch(.705 .015 286.067);
  --primary: oklch(.21 .006 285.885);
  --primary-foreground: oklch(.985 0 0);
  --destructive: oklch(.577 .245 27.325);
  --radius: .625rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(.141 .005 285.823);
    --foreground: oklch(.985 0 0);
    --card: oklch(.21 .006 285.885);
    --muted: oklch(.274 .006 286.033);
    --muted-foreground: oklch(.705 .015 286.067);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(.552 .016 285.938);
    --primary: oklch(.92 .004 286.32);
    --primary-foreground: oklch(.21 .006 285.885);
    --destructive: oklch(.704 .191 22.216);
  }
}

* { box-sizing: border-box; margin: 0; }
body {
  min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--background); color: var(--foreground);
  font: 400 .875rem/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); border-radius: calc(var(--radius) - 2px); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1.5rem; }
.muted { color: var(--muted-foreground); }

.site-head { border-bottom: 1px solid var(--border); }
.site-head .wrap { height: 3.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; text-decoration: none; }
.brand::before {
  content: "C"; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: .375rem;
  background: var(--primary); color: var(--primary-foreground); font-size: .8rem; font-weight: 700;
}
.site-head nav { display: flex; align-items: center; gap: .25rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2.25rem; padding: 0 1rem; border-radius: calc(var(--radius) - 2px); border: 1px solid transparent;
  font-family: inherit; font-size: .875rem; font-weight: 500; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  background: var(--primary); color: var(--primary-foreground); transition: background-color .15s, opacity .15s;
}
.btn:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn-outline { background: var(--background); color: var(--foreground); border-color: var(--border); box-shadow: 0 1px 2px rgb(0 0 0 / 5%); }
.btn-outline:hover, .btn-ghost:hover { background: var(--muted); }
.btn-ghost { background: none; color: var(--foreground); padding: 0 .75rem; }
.btn-lg { height: 2.5rem; padding: 0 1.5rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn[aria-busy]::before {
  content: ""; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { rotate: 1turn; } }

.hero { padding-block: 6rem 4rem; text-align: center; }
.hero h1 { font-size: clamp(2.25rem, 6vw, 3.75rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.hero p { max-width: 36rem; margin: 1rem auto 0; font-size: 1.125rem; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }

.section { padding-block: 2rem 6rem; }
.section h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.0125em; margin-bottom: 1rem; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); box-shadow: 0 1px 2px rgb(0 0 0 / 5%); }
.game { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); overflow: hidden; }
.game img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1200 / 630; }
.game-body { padding: 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
.game-body h3 { font-size: 1.25rem; font-weight: 600; }
.badge { display: inline-flex; padding: .125rem .5rem; border: 1px solid var(--border); border-radius: .375rem; font-size: .75rem; font-weight: 500; }
.game-body .actions { justify-content: flex-start; margin-top: auto; padding-top: .5rem; }

.site-foot { margin-top: auto; border-top: 1px solid var(--border); padding-block: 1.5rem; font-size: .8rem; }
.site-foot .wrap { display: flex; flex-direction: column; gap: .5rem; }

/* account pages */
.auth main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 2.5rem 1.5rem; }
.auth .card { width: 100%; max-width: 24rem; padding: 1.5rem; }
.card-head { margin-bottom: 1.5rem; }
.card-head h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.0125em; line-height: 1.3; }
.card-head p { color: var(--muted-foreground); margin-top: .375rem; }
form { display: grid; gap: 1rem; }
.field { display: grid; gap: .5rem; }
label { font-weight: 500; line-height: 1; }
input {
  height: 2.25rem; width: 100%; padding: 0 .75rem; border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px);
  background: transparent; color: inherit; font: inherit; box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
  transition: border-color .15s, box-shadow .15s;
}
@media (prefers-color-scheme: dark) { input { background: color-mix(in oklab, var(--input) 30%, transparent); } }
input:focus-visible { border-color: var(--ring); }
input[aria-invalid="true"] { border-color: var(--destructive); }
input[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px color-mix(in oklab, var(--destructive) 20%, transparent); }
.hint { color: var(--muted-foreground); font-size: .8rem; }
input[aria-invalid="true"] ~ .hint { display: none; }
.error { color: var(--destructive); font-size: .8rem; }
.error:empty { display: none; }
.alert { border: 1px solid color-mix(in oklab, var(--destructive) 40%, transparent); color: var(--destructive); border-radius: var(--radius); padding: .75rem 1rem; }
.alert:empty { display: none; }
.captcha { min-height: 65px; }
.foot-note { text-align: center; color: var(--muted-foreground); margin-top: 1.5rem; }
.foot-note a, .card-head a { text-underline-offset: 4px; }
.done { text-align: center; }
.done .icon {
  width: 2.5rem; height: 2.5rem; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--muted); font-size: 1.1rem;
}
.done .btn { margin-top: 1.5rem; }

@media (max-width: 720px) {
  .hero { padding-block: 4rem 3rem; }
  .game { grid-template-columns: 1fr; }
  .game-body { padding: 1.5rem; }
  .site-head .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: 1.5s !important; } }
.stack { display: grid; gap: .75rem; }
