:root {
  --ink: #1f2a4d;
  --paper: #fffdf6;
  --sky-1: #a9d8f7;
  --sky-2: #e3f3fe;
  --grass: #b5e385;
  --grass-2: #83bd5c;
  --red: #ff5a5f;
  --yellow: #ffd23f;
  --blue: #3fa7ff;
  --muted: #5b6484;
  --radius: 20px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: "Baloo 2", "Nunito", system-ui, -apple-system, sans-serif; color: var(--ink);
  background: linear-gradient(var(--sky-1), var(--sky-2) 480px, var(--sky-2));
}
a { color: inherit; }
img { max-width: 100%; }
main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: 12px; max-width: 1080px; width: 100%; margin: 0 auto; padding: 14px 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 26px; text-decoration: none; letter-spacing: .5px; }
.logo b { color: var(--red); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill; }
.logo svg { width: 34px; height: 34px; }
.top nav { display: flex; gap: 4px; margin-left: 8px; }
.top nav a { text-decoration: none; font-weight: 700; padding: 4px 10px; border-radius: 10px; }
.top nav a:hover, .top nav a[aria-current] { background: rgba(255,255,255,.6); }
.spacer { flex: 1; }

.btn {
  font: inherit; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none;
  padding: 8px 16px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.primary { background: var(--yellow); }
.btn.big { font-size: 20px; padding: 10px 22px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.me { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; background: #fff; border: 3px solid var(--ink); border-radius: 99px; padding: 2px 12px 2px 2px; box-shadow: 0 3px 0 var(--ink); }
.me img, .me .ph { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); object-fit: cover; background: #fff; display: grid; place-items: center; font-size: 15px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 { font-size: clamp(38px, 7vw, 68px); line-height: .95; margin: 0; }
.hero h1 span { color: var(--red); -webkit-text-stroke: 8px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.hero p { font-size: clamp(17px, 2.4vw, 21px); max-width: 620px; margin: 14px auto 0; font-weight: 600; }
.steps { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 22px 0 6px; }
.step { background: var(--paper); border: 3px solid var(--ink); border-radius: 16px; padding: 6px 14px; font-weight: 700; box-shadow: 0 3px 0 var(--ink); }

/* ---------- cards ---------- */
.section-title { font-size: 28px; margin: 34px 0 12px; }
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.card { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 0 6px 0 var(--ink); overflow: hidden; display: flex; flex-direction: column; }
.card .art { aspect-ratio: 16 / 9; border-bottom: 4px solid var(--ink); display: block; background: var(--sky-1); }
.card .art svg { width: 100%; height: 100%; display: block; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 26px; line-height: 1; display: flex; align-items: center; gap: 8px; }
.card p { margin: 0; font-weight: 600; color: var(--muted); flex: 1; }
.tag { font-size: 12px; font-weight: 800; border: 2px solid var(--ink); border-radius: 99px; padding: 0 8px; background: var(--grass); }
.tag.beta { background: var(--yellow); }
.tag.soon { background: #e8edf5; }
.card .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.panel { background: var(--paper); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: 0 6px 0 var(--ink); padding: 18px 20px; }

.card.more { border-style: dashed; box-shadow: none; background: rgba(255,253,246,.6); }
.card.more .art { background: repeating-linear-gradient(45deg, #fffdf6 0 14px, #f3ecd8 14px 28px); border-bottom-style: dashed; }
.card.more .art svg { width: 46%; margin: 0 auto; }

.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.why .panel { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.why svg { width: 56px; height: 56px; flex: none; }
.why h3 { margin: 0 0 2px; font-size: 21px; line-height: 1.1; }
.why p { margin: 0; font-weight: 600; color: var(--muted); line-height: 1.35; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-weight: 600; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 2px dashed rgba(31,42,77,.2); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { font: inherit; font-weight: 800; border: 3px solid var(--ink); background: #fff; color: var(--ink); border-radius: 12px; padding: 2px 12px; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--yellow); }
.empty { text-align: center; padding: 26px 8px; color: var(--muted); font-weight: 700; }

/* ---------- forms ---------- */
label { font-weight: 700; display: block; margin: 12px 0 4px; }
input[type=text] { font: inherit; font-weight: 700; font-size: 18px; width: 100%; max-width: 360px; padding: 6px 12px; border: 3px solid var(--ink); border-radius: 12px; color: var(--ink); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); }
.note { color: var(--muted); font-size: 14px; font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 12px; }
.stat b { display: block; font-size: 28px; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 700; }

/* ---------- prose (legal) ---------- */
.prose { max-width: 760px; margin: 20px auto 0; line-height: 1.6; font-size: 17px; }
.prose h1 { font-size: 40px; line-height: 1.05; margin: 0 0 4px; }
.prose h2 { margin: 28px 0 6px; font-size: 24px; }
.prose ul { padding-left: 22px; }
.prose table { font-size: 15px; }
.todo { background: #fff3c4; border: 2px dashed var(--ink); border-radius: 8px; padding: 0 4px; }

/* ---------- footer (ground) ---------- */
footer { margin-top: auto; background: var(--grass); border-top: 6px solid var(--ink); position: relative; }
footer::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; bottom: 0; background: var(--grass-2); border-top: 5px solid var(--ink); }
footer .in { position: relative; max-width: 1080px; margin: 0 auto; padding: 44px 16px 22px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-weight: 700; }
footer a { text-decoration: none; }
footer a:hover, footer button:hover { text-decoration: underline; }
footer button { font: inherit; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; font-weight: 700; }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; }
  .top nav { order: 3; width: 100%; margin: 0; justify-content: center; }
  .me span.name { display: none; }
  .me { padding-right: 2px; }
}

.langs { display: flex; border: 3px solid var(--ink); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 3px 0 var(--ink); }
.langs button { font: inherit; font-weight: 800; font-size: 13px; min-width: 34px; border: 0; background: none; color: var(--ink); padding: 3px 8px; cursor: pointer; }
.langs button + button { border-left: 2px solid var(--ink); }
.langs button[aria-pressed="true"] { background: var(--yellow); }
[hidden] { display: none !important; }
