@font-face {
  font-family: 'Ludiko Digits';
  src: url('/fonts/figtree-digits-500.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: 'Ludiko Digits';
  src: url('/fonts/figtree-digits-700.woff2') format('woff2');
  font-weight: 600 800;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: 'Ludiko Display';
  src: url('/fonts/bricolage-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'Ludiko Text';
  src: url('/fonts/atkinson-next-500.woff2') format('woff2');
  font-weight: 400 500;
  font-display: swap;
}
@font-face {
  font-family: 'Ludiko Text';
  src: url('/fonts/atkinson-next-700.woff2') format('woff2');
  font-weight: 600 700;
  font-display: swap;
}

:root {
  --bg: #100e1f;
  --surface: #1b1832;
  --surface-2: #27234a;
  --line: #3a3562;
  --text: #f3efe7;
  --muted: #c8c2dc;
  --faint: #9790b5;
  --accent: #ffc23d;
  --on-accent: #100e1f;
  --brand-2: #ff5e7a;
  --ok: #3ddc84;
  --bad: #ff8a8a;
  --radius: 18px;
  --display: 'Ludiko Digits', 'Ludiko Display', 'Ludiko Text', system-ui, sans-serif;
  --body: 'Ludiko Digits', 'Ludiko Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 17px/1.6 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  border-radius: 8px;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 6vw, 56px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); margin-top: 0.4em; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--accent); color: var(--on-accent); padding: 8px 12px; }

.top { border-bottom: 1px solid var(--line); background: rgba(16, 14, 31, 0.94); }
@media (min-width: 720px) { .top { position: sticky; top: 0; z-index: 5; } }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 800 24px var(--display); }
.logo-mark { width: 34px; height: 34px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--text); background: var(--surface-2); }
.nav .lang { border: 1px solid var(--line); }

.hero { background: radial-gradient(1000px 420px at 85% -10%, rgba(255, 94, 122, 0.28), transparent 60%), radial-gradient(800px 380px at 0% 0%, rgba(123, 92, 255, 0.28), transparent 60%); }
.hero-in { padding-top: 56px; padding-bottom: 48px; max-width: 900px; margin-left: auto; margin-right: auto; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 70ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; border: 2px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; background: var(--surface); cursor: pointer; font: 700 17px var(--body); }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: #fff; }

.block { padding-top: 40px; padding-bottom: 24px; }
.page-head { padding-top: 48px; }
.sub { color: var(--muted); max-width: 70ch; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps p { color: var(--muted); margin: 0; }
.num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; margin-bottom: 12px; }

.cards { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card a { display: block; height: 100%; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.15s, border-color 0.15s; }
.card a:hover { transform: translateY(-2px); border-color: var(--muted); }
.card-body { padding: 16px 18px 18px; }
.card-body p { color: var(--muted); margin: 0; font-size: 16px; }
.cover { aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-lg { border-radius: var(--radius); margin: 8px 0 24px; max-width: 704px; }
.cover-glyph { font: 800 64px var(--display); color: rgba(255, 255, 255, 0.92); }
.fam-violet { background: linear-gradient(135deg, #3b1fb8, #7b5cff); }
.fam-nar { background: linear-gradient(135deg, #b0174a, #ff5e7a); }
.fam-pink { background: linear-gradient(135deg, #7a1452, #e0459b); }
.fam-teal { background: linear-gradient(135deg, #075e63, #0fa3a3); }
.fam-green { background: linear-gradient(135deg, #0f5c34, #1f9d55); }
.fam-orange { background: linear-gradient(135deg, #8a3300, #ff7a1a); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.meta span { font-size: 13px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); padding: 2px 10px; border-radius: 999px; }

.grid4 { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid4 li { border-top: 3px solid var(--brand-2); padding-top: 14px; }
.grid4 p { color: var(--muted); margin: 0; }

.game { max-width: 820px; }
.crumb a { font-weight: 700; }
.rules { padding-left: 1.3em; }
.rules li { margin-bottom: 8px; }
.tips { padding-left: 1.2em; }
.tips li { margin-bottom: 8px; }
.faq h2 { font-size: 21px; margin-top: 1.4em; font-family: var(--body); font-weight: 700; letter-spacing: 0; }
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.related a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); }

.prose { max-width: 780px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.legal h2 { font-size: 22px; margin-top: 1.4em; }
.updated { color: var(--faint); font-size: 15px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 8px; } }

.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 24px 0; max-width: 760px; }
.quiz .qhead { display: flex; justify-content: space-between; color: var(--faint); font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.quiz .qtext { font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; line-height: 1.35; margin-bottom: 18px; }
.quiz .opts { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .quiz .opts { grid-template-columns: 1fr 1fr; } }
.quiz .opt { text-align: left; display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font: 700 17px var(--body); cursor: pointer; min-height: 56px; }
.quiz .opt:hover:not([disabled]) { border-color: var(--muted); }
.quiz .opt .badge { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #100e1f; font-weight: 800; }
.quiz .opt:nth-child(1) .badge { background: #ff6b85; }
.quiz .opt:nth-child(2) .badge { background: #4fa3ff; }
.quiz .opt:nth-child(3) .badge { background: #ffc23d; }
.quiz .opt:nth-child(4) .badge { background: #3dd598; }
.quiz .opt.is-right { border-color: var(--ok); }
.quiz .opt.is-wrong { border-color: var(--bad); opacity: 0.85; }
.quiz .opt[disabled] { cursor: default; }
.quiz .feedback { margin: 16px 0 0; min-height: 1.6em; }
.quiz .feedback strong.ok { color: var(--ok); }
.quiz .feedback strong.bad { color: var(--bad); }
.quiz .final { font: 800 clamp(28px, 5vw, 44px) var(--display); margin: 8px 0 16px; }
.qlist summary { cursor: pointer; font-weight: 700; color: var(--muted); }

.foot { border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0 36px; color: var(--muted); font-size: 15px; }
.foot-in { display: grid; gap: 14px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font: 800 20px var(--display); color: var(--text); }
.foot-brand .logo-mark { width: 26px; height: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-links a { color: var(--muted); }
.foot-legal { margin: 0; color: var(--faint); }

@media (prefers-reduced-motion: reduce) { .card a { transition: none; } .card a:hover { transform: none; } }

.guides h3 a { color: var(--text); text-decoration: none; }
.guides h3 a:hover { color: var(--accent); text-decoration: underline; }
.related h2 { font-size: 21px; font-family: var(--body); font-weight: 700; letter-spacing: 0; }
