/* =============================================================================
   KeanPlay — design system
   A premium, bright, clean stylesheet for a free online games portal.
   Mobile-first. Breakpoints: 640 / 900 / 1140.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --brand-1: #6366F1;
  --brand-2: #EC4899;
  --grad-brand: linear-gradient(135deg, #6366F1, #EC4899);

  /* Per-category accents */
  --acc-arcade: #6366F1;
  --acc-skill: #EC4899;
  --acc-sports: #22C55E;
  --acc-puzzle: #F59E0B;

  /* Text */
  --ink: #0F1222;
  --ink-2: #475069;
  --ink-3: #525A6E;

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-2: #F6F7FB;
  --bg-3: #EEF0F7;
  --surface: #FFFFFF;
  --line: #E7E9F2;
  --stage: #0E1430;

  /* Status */
  --ok: #15803D;
  --warn: #D97706;
  --err: #DC2626;

  /* Radii */
  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 20, 40, .06), 0 2px 8px rgba(16, 20, 40, .05);
  --shadow-md: 0 8px 24px -10px rgba(16, 20, 40, .18);
  --shadow-lg: 0 30px 70px -34px rgba(16, 20, 40, .30);

  /* Layout */
  --container: 1160px;
  --container-narrow: 780px;

  /* Type */
  --font-disp: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Default accent for components (overridden per game/category via --a) */
  --a: var(--brand-1);

  /* Header height (used for sticky offsets) */
  --hdr-h: 64px;
}

/* -----------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-disp);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -.012em;
}

h1 { font-size: clamp(1.85rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.45rem); }

p { margin: 0 0 1rem; }

a {
  color: #4F46E5;
  text-decoration: none;
  transition: color .15s ease;
}

a:hover { color: #3730A3; }

img,
svg,
canvas {
  max-width: 100%;
  display: block;
}

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

button {
  font-family: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand-1) 55%, white);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: color-mix(in srgb, var(--brand-1) 22%, white);
  color: var(--ink);
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

/* -----------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 18px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: 18px;
}

@media (min-width: 640px) {
  .container,
  .container-narrow { padding-inline: 24px; }
}

.site-main {
  display: block;
  min-height: 50vh;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: top .18s ease;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* -----------------------------------------------------------------------------
   4. Header & primary nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .22s ease, border-color .22s ease, background .22s ease;
}

.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.hdr-in {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--hdr-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  flex: 0 0 auto;
  margin-right: auto;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .55);
}

.brand-mark svg { display: block; }

.brand-name {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -.015em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand-1);
}

/* Mobile menu toggle (3 bars) */
.nav-toggle {
  --bar: #1c2138;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  flex: 0 0 auto;
  order: 3;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--bar);
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.primary-nav {
  position: fixed;
  inset: var(--hdr-h) 0 auto 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .22s ease, opacity .2s ease, visibility .2s;
  max-height: calc(100dvh - var(--hdr-h));
  overflow-y: auto;
}

.primary-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.primary-nav li { margin: 0; }

.primary-nav a {
  display: block;
  padding: 12px 12px;
  border-radius: 12px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 1.02rem;
}

.primary-nav a:hover {
  background: var(--bg-2);
  color: var(--ink);
}

.primary-nav a.is-active {
  color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 9%, white);
}

.primary-nav .nav-cta {
  margin-top: 8px;
}

.primary-nav .nav-cta a {
  display: inline-flex;
  padding: 0;
}

.primary-nav .nav-cta .btn {
  width: 100%;
  justify-content: center;
  padding: 12px 18px;
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .primary-nav {
    position: static;
    inset: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .primary-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
  }

  .primary-nav a {
    padding: 8px 12px;
    font-size: .96rem;
    border-radius: 10px;
  }

  .primary-nav .nav-cta {
    margin: 0 0 0 6px;
  }

  .primary-nav .nav-cta .btn {
    width: auto;
    padding: 9px 18px;
  }
}

/* -----------------------------------------------------------------------------
   5. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumbs {
  padding: 14px 0 2px;
  font-size: .82rem;
}

.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--ink-3);
  opacity: .6;
}

.breadcrumbs a {
  color: var(--ink-3);
  font-weight: 500;
}

.breadcrumbs a:hover { color: var(--brand-1); }

.breadcrumbs [aria-current="page"] {
  color: var(--ink-2);
  font-weight: 600;
}

/* -----------------------------------------------------------------------------
   6. Buttons & pills
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .98rem;
  line-height: 1;
  letter-spacing: -.005em;
  color: var(--ink);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .18s ease, background .18s ease,
    border-color .18s ease, color .18s ease, filter .18s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 10px 22px -10px rgba(99, 102, 241, .65);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(99, 102, 241, .7);
  filter: saturate(1.06);
}

.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  color: var(--brand-1);
  border-color: color-mix(in srgb, var(--brand-1) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  min-height: 38px;
  padding: 8px 16px;
  font-size: .9rem;
}

.btn-lg {
  min-height: 52px;
  padding: 15px 30px;
  font-size: 1.08rem;
  border-radius: 999px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Pills (category labels / small tags) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .72rem;
  line-height: 1.3;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--bg-3);
  white-space: nowrap;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
}

.pill--arcade {
  color: #4338CA;
  background: color-mix(in srgb, var(--acc-arcade) 12%, white);
}
.pill--skill {
  color: #BE185D;
  background: color-mix(in srgb, var(--acc-skill) 12%, white);
}
.pill--sports {
  color: #15803D;
  background: color-mix(in srgb, var(--acc-sports) 15%, white);
}
.pill--puzzle {
  color: #B45309;
  background: color-mix(in srgb, var(--acc-puzzle) 16%, white);
}

/* -----------------------------------------------------------------------------
   7. Sections & section heads
   -------------------------------------------------------------------------- */
.section {
  padding: 44px 0;
}

@media (min-width: 640px) { .section { padding: 56px 0; } }
@media (min-width: 900px) { .section { padding: 72px 0; } }

.section--alt {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
}

@media (min-width: 900px) { .section-head { margin-bottom: 44px; } }

.kicker {
  display: inline-block;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-1);
  margin-bottom: 12px;
}

.section-title {
  margin: 0 0 .35em;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--ink-2);
  margin: 0;
}

.section-head .section-sub { margin-inline: auto; }

/* -----------------------------------------------------------------------------
   8. Game cards & grid
   -------------------------------------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 640px) {
  .game-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1140px) {
  .game-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
}

.game-card {
  --a: var(--brand-1);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  isolation: isolate;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow .2s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--a) 40%, var(--line));
  color: var(--ink);
}

.game-card:hover .gc-cta {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--a) 75%, transparent);
  border-color: var(--a);
}

.game-card:hover .gc-art {
  transform: scale(1.03);
}

.gc-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 11;
  width: 100%;
  border-radius: var(--radius-sm);
  color: var(--a);
  background:
    radial-gradient(120% 120% at 25% 15%, color-mix(in srgb, var(--a) 24%, white), transparent 60%),
    linear-gradient(150deg, color-mix(in srgb, var(--a) 16%, white), color-mix(in srgb, var(--a) 7%, white));
  border: 0;
  transition: transform .25s ease;
  overflow: hidden;
}

.gc-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

.gc-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 auto;
}

.gc-name {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--ink);
}

.gc-tag {
  font-size: .82rem;
  line-height: 1.4;
  color: var(--ink-2);
  /* Clamp tagline to keep cards even */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gc-body .pill {
  align-self: flex-start;
  margin-top: 2px;
}

.gc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.gc-cta::after {
  content: "▸";
  font-size: .82em;
}

/* Coming-soon variant */
.game-card.is-soon {
  cursor: default;
  border-style: dashed;
  box-shadow: none;
  background: var(--bg-2);
}

.game-card.is-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}

.game-card.is-soon .gc-art {
  opacity: .6;
  filter: grayscale(.25);
}

.game-card.is-soon .gc-name { color: var(--ink-2); }

.game-card.is-soon .pill {
  color: var(--ink-3);
  background: var(--bg-3);
}

.game-card.is-soon .pill::before { opacity: .5; }

/* -----------------------------------------------------------------------------
   9. Category cards & grid
   -------------------------------------------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (min-width: 1140px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

.cat-card {
  --a: var(--brand-1);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  border-radius: var(--radius);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--a) 10%, white), var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--a) 18%, var(--line));
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--a) 45%, var(--line));
  color: var(--ink);
}

.cat-card .cat-ico,
.cat-card .cat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 14px;
  color: var(--a);
  background: color-mix(in srgb, var(--a) 14%, white);
}

.cat-card .cat-ico svg,
.cat-card .cat-icon svg { width: 24px; height: 24px; }

.cat-card .cat-name {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}

.cat-card .cat-blurb {
  font-size: .88rem;
  color: var(--ink-2);
  margin: 0;
}

.cat-card .cat-count {
  margin-top: auto;
  padding-top: 10px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--a);
}

.cat-card.is-soon { opacity: .92; }

.cat-card.is-soon .cat-count { color: var(--ink-3); }

/* -----------------------------------------------------------------------------
   10. Features
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (min-width: 1140px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-ico,
.feature .feature-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: 0 8px 18px -8px rgba(99, 102, 241, .6);
}

.feature-ico svg { width: 24px; height: 24px; }

.feature h3 {
  margin: 0;
  font-size: 1.1rem;
}

.feature p {
  margin: 0;
  font-size: .92rem;
  color: var(--ink-2);
}

/* -----------------------------------------------------------------------------
   11. FAQ accordion
   -------------------------------------------------------------------------- */
.faq {
  max-width: var(--container-narrow);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.faq-item[open] {
  border-color: color-mix(in srgb, var(--brand-1) 30%, var(--line));
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 10%, white);
  transition: transform .22s ease, background .2s ease, color .2s ease;
}

.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
  color: #fff;
  background: var(--grad-brand);
}

.faq-item summary:hover { color: var(--brand-1); }

.faq-a {
  padding: 0 20px 20px;
  color: var(--ink-2);
}

.faq-a p { margin: 0 0 .75rem; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a > :first-child { margin-top: 0; }

/* -----------------------------------------------------------------------------
   12. Prose (long-form articles / legal / game copy)
   -------------------------------------------------------------------------- */
.prose {
  max-width: 70ch;
  color: var(--ink-2);
  font-size: 1.03rem;
  line-height: 1.75;
}

.prose.is-wide { max-width: none; }

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose h2 {
  margin: 1.9em 0 .55em;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  color: var(--ink);
}

.prose h3 {
  margin: 1.5em 0 .45em;
  font-size: 1.2rem;
  color: var(--ink);
}

.prose p { margin: 0 0 1.05em; }

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.35em;
}

.prose li { margin-bottom: .5em; }

.prose li::marker { color: var(--brand-1); }

.prose a {
  color: var(--brand-1);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--brand-1) 35%, transparent);
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--brand-2);
  text-decoration-color: currentColor;
}

.prose strong { color: var(--ink); font-weight: 700; }

.prose blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--brand-1);
  background: var(--bg-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2);
  font-style: italic;
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--ink);
}

.prose img {
  border-radius: var(--radius-sm);
  margin: 1.2em 0;
}

.prose hr {
  margin: 2em 0;
}

/* -----------------------------------------------------------------------------
   13. CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  margin: 0;
  padding: 48px 0;
  overflow: hidden;
  isolation: isolate;
}

.cta-band-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 40px 26px;
  border-radius: var(--radius-lg);
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cta-band-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 120% at 85% 10%, rgba(255, 255, 255, .22), transparent 60%),
    radial-gradient(50% 100% at 10% 90%, rgba(255, 255, 255, .14), transparent 55%);
  pointer-events: none;
}

.cta-band-inner > * { position: relative; }

.cta-band h2 {
  color: #fff;
  margin: 0;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
}

.cta-band p {
  margin: 0;
  max-width: 56ch;
  color: rgba(255, 255, 255, .92);
  font-size: 1.06rem;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand-1);
  box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .35);
}

.cta-band .btn-primary:hover {
  color: var(--brand-2);
  background: #fff;
}

.cta-band .btn-ghost {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta-band-inner { padding: 52px 40px; }
}

/* -----------------------------------------------------------------------------
   14. Blog post cards & grid
   -------------------------------------------------------------------------- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1140px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--brand-1) 28%, var(--line));
}

.post-card .post-pill {
  align-self: flex-start;
}

.post-card h2,
.post-card h3 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.3;
}

.post-card h2 a,
.post-card h3 a {
  color: var(--ink);
}

.post-card h2 a:hover,
.post-card h3 a:hover {
  color: var(--brand-1);
}

.post-card .post-excerpt {
  margin: 0;
  font-size: .92rem;
  color: var(--ink-2);
  flex: 1 1 auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--ink-3);
  margin-top: auto;
}

.post-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
}

.post-card .post-more {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .88rem;
  color: var(--brand-1);
}

/* -----------------------------------------------------------------------------
   15. Ad slot
   -------------------------------------------------------------------------- */
.ad-slot {
  margin: 28px auto;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.ad-slot:empty { display: none; }

.ad-slot::before {
  content: "Advertisement";
  display: block;
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.ad-slot .adsbygoogle {
  display: block;
  margin-inline: auto;
}

/* Google Ad Manager (GPT) rails — CLS-safe: reserve height while the ad loads,
   then collapse the whole rail (label included) on no-fill via .is-empty. */
.ad-rail {
  margin: 28px auto;
  text-align: center;
  max-width: 100%;
  line-height: 0;
}
.ad-rail::before {
  content: "Advertisement";
  display: block;
  font-size: .66rem;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.ad-rail.is-empty { display: none; }
.gpt-slot { display: inline-block; min-height: 90px; }
.gpt-slot iframe { max-width: 100%; }
.ad-rail--in_article .gpt-slot { min-height: 250px; }
.ad-rail--header .gpt-slot,
.ad-rail--footer .gpt-slot { min-height: 90px; }
.ad-footer-wrap { margin-top: 8px; }
@media (max-width: 767px) {
  .ad-rail { margin: 20px auto; }
  .ad-rail--header .gpt-slot,
  .ad-rail--footer .gpt-slot { min-height: 100px; }
}

/* -----------------------------------------------------------------------------
   16. Forms
   -------------------------------------------------------------------------- */
.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 560px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
}

.field .req { color: var(--err); }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 15%, transparent);
}

.field--error input,
.field--error textarea {
  border-color: var(--err);
}

.field--error input:focus,
.field--error textarea:focus {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--err) 16%, transparent);
}

.field .field-err {
  font-size: .82rem;
  color: var(--err);
  font-weight: 600;
}

.form-note {
  font-size: .85rem;
  color: var(--ink-3);
  margin: 0;
}

/* Honeypot — visually hidden but present for bots */
.hp-field,
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.alert::before {
  font-weight: 700;
  flex: 0 0 auto;
}

.alert-ok {
  color: #14532D;
  background: color-mix(in srgb, var(--ok) 12%, white);
  border-color: color-mix(in srgb, var(--ok) 30%, white);
}

.alert-ok::before { content: "✓"; color: var(--ok); }

.alert-err {
  color: #7F1D1D;
  background: color-mix(in srgb, var(--err) 10%, white);
  border-color: color-mix(in srgb, var(--err) 28%, white);
}

.alert-err::before { content: "!"; color: var(--err); }

/* -----------------------------------------------------------------------------
   17. Home hero
   -------------------------------------------------------------------------- */
.home-hero {
  position: relative;
  padding: 40px 0 36px;
  overflow: hidden;
  isolation: isolate;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 60% at 82% 8%, color-mix(in srgb, var(--brand-2) 14%, transparent), transparent 60%),
    radial-gradient(55% 55% at 10% 6%, color-mix(in srgb, var(--brand-1) 16%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

.home-hero .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .home-hero {
    padding: 64px 0 56px;
  }
  .home-hero .hero-grid {
    grid-template-columns: 1.05fr .95fr;
    gap: 44px;
  }
}

/* The homepage template wraps the hero in .hero-in and the featured cards in
   .hero-cluster — give them the 2-column hero layout + a compact 2×2 card grid
   (without this the featured cards stack full-width). */
.home-hero .hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.hero-cluster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  min-width: 0;
}
@media (min-width: 900px) {
  .home-hero .hero-in { grid-template-columns: 1.05fr .95fr; gap: 44px; }
}

.hero-copy {
  min-width: 0;
  max-width: 640px;
}

.hero-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.08;
}

.hero-copy h1 .hl {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand-1);
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--ink-2);
  margin: 0 0 26px;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  margin-top: 24px;
  font-size: .86rem;
  color: var(--ink-3);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-trust span::before {
  content: "✓";
  color: var(--ok);
  font-weight: 800;
}

/* Hero visual cluster of game tiles */
.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.hero-tiles .game-card:nth-child(odd) {
  transform: translateY(-10px);
}

@media (max-width: 639px) {
  .hero-tiles .game-card:nth-child(odd) { transform: none; }
}

/* -----------------------------------------------------------------------------
   18. Game page header
   -------------------------------------------------------------------------- */
.game-head {
  --a: var(--brand-1);
  padding: 26px 0 10px;
}

.game-head .gh-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.game-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
}

.game-head .gh-tagline {
  font-size: 1.08rem;
  color: var(--ink-2);
  margin: 0 0 14px;
  max-width: 62ch;
}

.controls-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg-3);
  border: 1px solid var(--line);
}

.controls-chip::before {
  content: "🎮";
  font-size: .95em;
}

.controls-chip b {
  color: var(--ink);
  font-weight: 700;
}

/* -----------------------------------------------------------------------------
   19. Game player embed
   -------------------------------------------------------------------------- */
.game-player {
  --a: var(--brand-1);
  margin: 0 0 6px;
}

.gp-frame {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.gp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(78vh, 560px);
  background:
    radial-gradient(120% 90% at 50% 0%, #18204a, var(--stage) 70%);
  overflow: hidden;
}

@media (min-width: 640px) {
  .gp-stage {
    aspect-ratio: 4 / 3;
    max-height: min(72vh, 600px);
  }
}

@media (min-width: 900px) {
  .gp-stage {
    aspect-ratio: 16 / 10;
    max-height: min(72vh, 640px);
  }
}

.gp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* Overlay (glass panel over canvas) */
.gp-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  z-index: 2;
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(14, 20, 48, .5), rgba(14, 20, 48, .82));
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: opacity .25s ease, visibility .25s ease;
}

.gp-overlay[data-state="playing"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gp-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
}

.gp-icon {
  width: 132px;
  height: 90px;
  margin: 0 auto 14px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5);
}

.gp-icon svg { width: 100%; height: 100%; display: block; }

.gp-state-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #fff;
}

.gp-state-msg {
  margin: 0 0 18px;
  font-size: .98rem;
  color: rgba(255, 255, 255, .85);
  line-height: 1.5;
}

.gp-state-msg b { color: #fff; }

.gp-card .btn {
  width: 100%;
}

.gp-hint {
  margin: 14px 0 0;
  font-size: .82rem;
  color: rgba(255, 255, 255, .62);
}

/* Game-over state accent */
.gp-overlay[data-state="over"] .gp-card {
  background: rgba(255, 255, 255, .09);
}

/* HUD bar under the stage */
.gp-hud {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.gp-stat {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-2);
}

.gp-stat b {
  font-family: var(--font-disp);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--ink);
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.gp-cleared {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  color: #15803D;
  background: color-mix(in srgb, var(--ok) 14%, white);
  border: 1px solid color-mix(in srgb, var(--ok) 28%, white);
}

.gp-cleared[hidden] { display: none; }

.gp-spacer { flex: 1 1 auto; }

.gp-ctl {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: transform .15s ease, background .18s ease, color .18s ease,
    border-color .18s ease;
}

.gp-ctl:hover {
  color: var(--brand-1);
  background: color-mix(in srgb, var(--brand-1) 10%, white);
  border-color: color-mix(in srgb, var(--brand-1) 35%, var(--line));
  transform: translateY(-1px);
}

.gp-ctl:active { transform: translateY(0) scale(.95); }

.game-byline {
  margin: 10px 0 0;
  font-size: .82rem;
  color: var(--ink-3);
}

/* Fullscreen */
.game-player:fullscreen,
.game-player:-webkit-full-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  background: var(--stage);
  padding: 0;
  margin: 0;
}

.game-player:fullscreen .gp-frame,
.game-player:-webkit-full-screen .gp-frame {
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.game-player:fullscreen .gp-stage,
.game-player:-webkit-full-screen .gp-stage {
  flex: 1 1 auto;
  aspect-ratio: auto;
  max-height: none;
  height: 100%;
  border-radius: 0;
}

.game-player:fullscreen .gp-hud,
.game-player:-webkit-full-screen .gp-hud {
  border-radius: 0;
}

/* -----------------------------------------------------------------------------
   20. Blog / article single
   -------------------------------------------------------------------------- */
.post {
  padding: 8px 0 0;
}

.post .post-header {
  max-width: 760px;
  margin: 0 auto 28px;
  text-align: center;
}

.post .post-header h1 {
  margin: 14px 0 14px;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.post .post-dek {
  font-size: 1.14rem;
  color: var(--ink-2);
  margin: 0 0 16px;
}

.post .post-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .86rem;
  color: var(--ink-3);
}

.post .post-meta-row .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .6;
}

.post .post-body {
  max-width: var(--container-narrow);
  margin-inline: auto;
}

.post-foot {
  max-width: var(--container-narrow);
  margin: 36px auto 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.post-foot .pf-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* -----------------------------------------------------------------------------
   21. Legal / static pages
   -------------------------------------------------------------------------- */
.page-legal {
  padding: 8px 0 0;
}

.page-legal .legal-header {
  margin-bottom: 28px;
}

.page-legal .legal-header h1 {
  margin: 8px 0 10px;
}

.page-legal .legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-3);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-3);
}

.page-legal .legal-lead {
  font-size: 1.1rem;
  color: var(--ink-2);
  margin: 0 0 4px;
}

/* Generic page intro lead */
.page-intro {
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 8px;
}

/* -----------------------------------------------------------------------------
   22. Generic page header (games list, blog list, contact, category)
   -------------------------------------------------------------------------- */
.page-head {
  padding: 30px 0 8px;
}

.page-head h1 {
  margin: 6px 0 12px;
}

.page-head .page-intro { margin-bottom: 0; }

/* Category hero */
.cat-hero {
  --a: var(--brand-1);
  position: relative;
  padding: 36px 0 18px;
  overflow: hidden;
  isolation: isolate;
}

.cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 80% at 12% 0%, color-mix(in srgb, var(--a) 18%, transparent), transparent 62%),
    linear-gradient(180deg, color-mix(in srgb, var(--a) 6%, var(--bg)), var(--bg));
}

.cat-hero .pill { margin-bottom: 12px; }

.cat-hero h1 {
  margin: 0 0 10px;
}

.cat-hero .cat-blurb {
  font-size: 1.1rem;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
}

/* Empty state for filters / empty categories */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--ink-2);
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p { margin: 0 0 16px; }

.empty-state[hidden] { display: none; }

/* -----------------------------------------------------------------------------
   23. Games filter toolbar (/games)
   -------------------------------------------------------------------------- */
.games-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 6px 0 24px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-family: var(--font-disp);
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease,
    transform .12s ease;
}

.filter-chip:hover {
  color: var(--brand-1);
  border-color: color-mix(in srgb, var(--brand-1) 35%, var(--line));
}

.filter-chip.is-active,
.filter-chip[aria-pressed="true"] {
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 8px 18px -10px rgba(99, 102, 241, .6);
}

.games-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
  margin-left: auto;
}

.games-search input {
  width: 100%;
  min-height: 42px;
  padding: 10px 16px 10px 40px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.games-search input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-1) 14%, transparent);
}

.games-search::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  background: var(--ink-3);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' d='M21 21l-4.3-4.3M11 18a7 7 0 100-14 7 7 0 000 14z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' d='M21 21l-4.3-4.3M11 18a7 7 0 100-14 7 7 0 000 14z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.game-card.is-hidden { display: none !important; }

/* -----------------------------------------------------------------------------
   24. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .7);
  padding: 48px 0 26px;
  margin-top: 56px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
  }
}

.footer-brand .brand .brand-name {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: none;
}

.footer-brand .brand:hover .brand-name { color: #fff; }

.footer-tag {
  margin: 14px 0 0;
  font-size: .9rem;
  color: rgba(255, 255, 255, .55);
  max-width: 42ch;
  line-height: 1.6;
}

.footer-social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}

.footer-social a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .16);
}

.footer-col h2 {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .9);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: rgba(255, 255, 255, .62);
  font-size: .92rem;
  font-weight: 500;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-bottom p {
  margin: 0;
  font-size: .84rem;
  color: rgba(255, 255, 255, .55);
}

.footer-mini {
  font-size: .8rem !important;
  color: rgba(255, 255, 255, .4) !important;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* -----------------------------------------------------------------------------
   25. Cookie consent
   -------------------------------------------------------------------------- */
.consent {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 200;
  width: min(680px, calc(100% - 24px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: consent-in .35s ease both;
}

.consent[hidden] { display: none; }

@keyframes consent-in {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .consent { animation: none; }
}

.consent-in {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
}

.consent-in p {
  margin: 0;
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.consent-in a {
  color: var(--brand-1);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.consent-actions .btn { flex: 1 1 auto; }

@media (min-width: 640px) {
  .consent-in {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .consent-in p { flex: 1 1 auto; }
  .consent-actions { flex: 0 0 auto; }
  .consent-actions .btn { flex: 0 0 auto; }
}

/* -----------------------------------------------------------------------------
   26. Related / more-games block helper
   -------------------------------------------------------------------------- */
.more-games {
  margin-top: 8px;
}

/* Utility spacing helpers used by templates */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--ink-2); }

/* Anchor offset for in-page jumps under sticky header */
:target {
  scroll-margin-top: calc(var(--hdr-h) + 16px);
}

/* -----------------------------------------------------------------------------
   27. Reduced motion — disable non-essential transitions/animations
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .game-card:hover,
  .cat-card:hover,
  .feature:hover,
  .post-card:hover,
  .btn-primary:hover,
  .btn-ghost:hover {
    transform: none;
  }
}

/* -----------------------------------------------------------------------------
   28. Print — clean, ink-on-paper
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .consent,
  .ad-slot,
  .ad-rail,
  .game-player,
  .breadcrumbs,
  .cta-band {
    display: none !important;
  }
  body { color: #000; }
  a { color: #000; text-decoration: underline; }
}
