/* The Girl Coder: site styles */

/* Tokens ---------------------------------------------------------------- */

:root {
  color-scheme: light;
  --bg: #f7f3eb;
  --surface: #ffffff;
  --elevated: #ffffff;
  --media-bg: #f7f3eb;
  --text: #242321;
  --text-2: #625e58;
  --border: #ded8ce;
  --control-border: #8c857b;   /* 3.3:1 on page, 3.6:1 on cards */
  --accent: #ff6b35;
  --accent-hover: #ff8457;
  --on-accent: #242321;        /* 5.5:1 on orange */
  --link: #b83b13;             /* 5.2:1 on page, 5.7:1 on cards */
  --focus: #b83b13;
  --header-bg: rgba(247, 243, 235, 0.9);
  --shadow: 0 1px 2px rgba(36, 35, 33, 0.06), 0 10px 24px -16px rgba(36, 35, 33, 0.35);

  /* Always-dark areas: CTA band, footer, contact card */
  --band: #242321;
  --band-text: #f7f3eb;
  --band-text-2: #bdb6ac;
  --band-border: #49443d;
  --band-control: #857e74;

  --font: "Lexend", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --gutter: 16px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #181715;
    --surface: #242321;
    --elevated: #302d29;
    --media-bg: #302d29;
    --text: #f7f3eb;
    --text-2: #bdb6ac;
    --border: #49443d;
    --control-border: #857e74;
    --accent-hover: #ff8457;
    --link: #ff6b35;
    --focus: #ff6b35;
    --header-bg: rgba(24, 23, 21, 0.88);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -16px rgba(0, 0, 0, 0.7);
    --band: #302d29;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #181715;
  --surface: #242321;
  --elevated: #302d29;
  --media-bg: #302d29;
  --text: #f7f3eb;
  --text-2: #bdb6ac;
  --border: #49443d;
  --control-border: #857e74;
  --accent-hover: #ff8457;
  --link: #ff6b35;
  --focus: #ff6b35;
  --header-bg: rgba(24, 23, 21, 0.88);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -16px rgba(0, 0, 0, 0.7);
  --band: #302d29;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; --header-h: 76px; }
}

/* Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.3rem, 1.45rem + 3.4vw, 4rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem); }
h3 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; }

p { margin: 0 0 1em; }

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 0.6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.container { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.muted { color: var(--text-2); }

/* Logo ------------------------------------------------------------------ */

.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; flex: none; }
.logo { display: block; height: 44px; width: auto; color: inherit; }
@media (max-width: 719px) {
  .logo { height: 36px; }
}

/* Buttons --------------------------------------------------------------- */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.75rem 1.3rem;
  border: 1.5px solid transparent; border-radius: 10px;
  background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1.1 var(--font); letter-spacing: -0.01em; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-sm { min-height: 40px; padding: 0.5rem 1rem; font-size: 0.9375rem; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--control-border); }
.btn-ghost:hover { background: transparent; color: var(--text); border-color: var(--text); }

.btn-outline-light { background: transparent; color: var(--band-text); border-color: var(--band-control); }
.btn-outline-light:hover { background: transparent; color: var(--band-text); border-color: var(--band-text); }

.btn-play {
  display: inline-flex; align-items: center; gap: 0.7rem;
  min-height: 52px; padding: 0.5rem 1.2rem 0.5rem 1rem;
  border: 1px solid #5c5852; border-radius: 10px;
  background: #000; color: #fff; text-decoration: none;
  font: 600 1.125rem/1.05 var(--font);
}
.btn-play:hover { color: #fff; border-color: #fff; }
.btn-play svg { width: 26px; height: 26px; fill: currentColor; }
.btn-play span { display: flex; flex-direction: column; }
.btn-play small { font-size: 0.6875rem; font-weight: 500; opacity: 0.85; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0;
  border: 1.5px solid var(--control-border); border-radius: 10px;
  background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }

/* Theme toggle shows the theme you would switch to */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Status pills ---------------------------------------------------------- */

.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.65rem; border-radius: 999px;
  background: var(--media-bg); color: var(--text);
  font-size: 0.8125rem; font-weight: 500; line-height: 1.3; white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.pill-live::before { background: var(--accent); }
.pill-test::before { box-shadow: inset 0 0 0 2px var(--text-2); }

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; height: var(--header-h); gap: 1.5rem; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.site-nav a:not(.btn) { color: var(--text); font-weight: 500; font-size: 0.975rem; text-decoration: none; }
.site-nav a:not(.btn):hover { color: var(--link); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.5em; }
.header-tools { display: flex; align-items: center; gap: 0.5rem; }
.nav-toggle { display: none; }

@media (max-width: 879px) {
  .header-tools { margin-left: auto; }
  .nav-toggle { display: inline-grid; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-nav a:not(.btn) { padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 1rem; }
  .nav-open .site-nav { display: flex; }
}
@media (max-width: 399px) {
  .logo { height: 32px; }
}

/* Hero ------------------------------------------------------------------ */

.hero { position: relative; overflow: hidden; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6.5rem); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center; gap: clamp(2.5rem, 5vw, 4rem);
}
.hero h1 { max-width: 13ch; }
.lede { font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: var(--text-2); max-width: 50ch; margin-bottom: 2rem; }
.hero-note { display: flex; align-items: center; gap: 0.6rem; margin: 1.75rem 0 0; color: var(--text-2); font-size: 0.9375rem; }
.hero-note .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }

.icon-wall { position: relative; }
.icon-wall ul {
  list-style: none; padding: 0; margin: 0 -12% 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 22px);
  transform: rotate(-6deg);
}
.icon-wall li { --y: 0px; animation: tile-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; animation-delay: calc(var(--i) * 45ms + 120ms); transform: translateY(var(--y)); }
.icon-wall li:nth-child(even) { --y: 28px; }
.icon-wall a { display: block; border-radius: 22%; }
.icon-wall img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22%;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}
.icon-wall a:hover img { transform: scale(1.04); }
.tile-next span {
  display: grid; place-items: center; aspect-ratio: 1; padding: 12%;
  border: 1.5px dashed var(--control-border); border-radius: 22%;
  color: var(--text-2); font-size: clamp(0.6875rem, 0.55rem + 0.35vw, 0.8125rem); font-weight: 500; line-height: 1.3; text-align: center;
}

@keyframes tile-in {
  from { opacity: 0; transform: translateY(calc(var(--y) + 20px)) scale(0.75); }
  to { opacity: 1; transform: translateY(var(--y)) scale(1); }
}

@media (max-width: 879px) {
  .hero-grid { grid-template-columns: 1fr; }
  .icon-wall ul { grid-template-columns: repeat(6, 1fr); margin: 0.5rem -6% 1.5rem -2%; transform: rotate(-4deg); gap: 10px; }
  .icon-wall li:nth-child(even) { --y: 14px; }
}

/* Sections -------------------------------------------------------------- */

.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-lede { font-size: 1.125rem; color: var(--text-2); max-width: 52ch; }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.5rem 2rem; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--text-2); max-width: 46ch; }

.page-hero { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(1rem, 2vw, 1.5rem); }
.page-hero .lede { margin-bottom: 0; }
.not-found { padding-bottom: clamp(5rem, 10vw, 8rem); }
.not-found .lede { margin-bottom: 2rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5.5rem); align-items: start; }
.split-faq { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); }
@media (max-width: 879px) {
  .split, .split-faq { grid-template-columns: 1fr; }
}

/* Game filters and cards ------------------------------------------------ */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.filters button {
  min-height: 40px; padding: 0.45rem 1rem;
  border: 1.5px solid var(--control-border); border-radius: 999px; background: transparent; color: var(--text);
  font: 500 0.9375rem/1 var(--font); cursor: pointer;
}
.filters button:hover { border-color: var(--text); }
.filters button[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.filters button span { margin-left: 0.3rem; opacity: 0.7; }

.game-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1.5rem;
}
.game-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.game-card:hover { border-color: var(--control-border); }
.game-card[hidden] { display: none; }

.card-media { aspect-ratio: 1024 / 500; overflow: hidden; background: var(--media-bg); }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-media.is-art img { object-position: center 30%; }
.card-media.is-blur { display: grid; place-items: center; }
.card-media.is-blur img:first-child { display: none; }
.card-media.is-blur .blur-icon { width: auto; height: 62%; aspect-ratio: 1; border-radius: 22%; box-shadow: var(--shadow); }
.card-media.is-blur + .card-body .card-icon { display: none; }
.card-media.is-blur + .card-body h3 { margin-top: 1.25rem; }

.card-body { display: flex; flex-direction: column; flex: 1; padding: 0 1.5rem 1.5rem; }
.card-icon {
  width: 72px; height: 72px; margin-top: -36px; border-radius: 22%;
  border: 4px solid var(--surface); background: var(--surface); object-fit: cover;
}
.game-card h3 { margin: 0.85rem 0 0.15rem; font-size: 1.1875rem; }
.card-link { color: var(--text); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius-lg); }
.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { outline: 3px solid var(--focus); outline-offset: -3px; }
.card-genre { margin: 0; color: var(--text-2); font-size: 0.9375rem; }
.card-desc { margin: 0.75rem 0 1.4rem; font-size: 0.98rem; line-height: 1.65; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; }
.card-action { position: relative; z-index: 2; font-weight: 600; font-size: 0.9375rem; }

.next-card { border: 1.5px dashed var(--control-border); background: transparent; justify-content: center; }
.next-card:hover { border-color: var(--control-border); }
.next-body { padding: 2rem 1.75rem; }
.next-body h3 { margin: 0 0 0.5rem; }
.next-body p { color: var(--text-2); max-width: 32ch; margin-bottom: 1.5rem; }

/* Testing --------------------------------------------------------------- */

.steps { list-style: none; counter-reset: step; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 1.5rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; column-gap: 1rem; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 10px;
  background: var(--accent); color: var(--on-accent); font: 700 1rem/1 var(--font);
}
.steps h3 { margin: 0.4rem 0 0.2rem; font-size: 1.0625rem; letter-spacing: -0.01em; }
.steps p { margin: 0; color: var(--text-2); }

.list-title { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--text-2); margin: 0.6rem 0 1rem; }
.test-list { list-style: none; margin: 0; padding: 0; background: var(--elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.test-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.test-list li:first-child { border-top: 0; }
.test-list img { width: 56px; height: 56px; border-radius: 22%; object-fit: cover; }
.test-list div a { display: block; color: var(--text); font-weight: 600; text-decoration: none; }
.test-list div a:hover { color: var(--link); }
.test-list div span { display: block; color: var(--text-2); font-size: 0.875rem; }
.test-link { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; }
@media (max-width: 479px) {
  .test-list li { grid-template-columns: 48px minmax(0, 1fr); }
  .test-list img { width: 48px; height: 48px; }
  .test-link { grid-column: 2; }
}

/* About ----------------------------------------------------------------- */

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.facts dt { color: var(--text-2); font-size: 0.875rem; }
.facts dd { margin: 0.15rem 0 0; font-weight: 600; }

.about-art { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.about-art img { display: block; width: 100%; border-radius: var(--radius-lg); }
.about-art img:first-child { grid-column: span 2; }
.about-art.is-illustration { display: block; }
.about-art.is-illustration img { border: 1px solid var(--border); }

/* Theme-specific images: the visible one follows the active theme */
.only-dark { display: none !important; }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block !important; }
  :root:not([data-theme="light"]) .only-light { display: none !important; }
}

/* FAQ ------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.0625rem; line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--link); }
.chev { width: 22px; height: 22px; flex: none; transition: transform 0.2s ease; }
.faq details[open] .chev { transform: rotate(180deg); }
.faq-body { padding: 0 2rem 1.25rem 0; color: var(--text-2); }
.faq-body p { margin: 0; max-width: 64ch; }

/* CTA band and footer (always dark) -------------------------------------- */

.cta-band, .site-footer, .contact-card { --link: #ff6b35; --focus: #ff6b35; }

.cta-band { background: var(--band); color: var(--band-text); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; }
.cta-band h2 { margin: 0 0 0.4rem; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem); }
.cta-band p { margin: 0; color: var(--band-text-2); }
.cta-band .btn svg { fill: none; stroke: currentColor; }

.site-footer {
  background: #242321; color: var(--band-text-2);
  border-top: 1px solid var(--band-border);
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; font-size: 0.9375rem;
}
.site-footer .brand { color: var(--band-text); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.footer-brand p { max-width: 34ch; margin: 1.1rem 0 0; }
.site-footer h2 { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; color: var(--band-text); margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.55rem; }
.site-footer a:not(.brand) { color: inherit; text-decoration: none; }
.site-footer a:not(.brand):hover { color: var(--band-text); text-decoration: underline; text-decoration-color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--band-border);
  font-size: 0.8125rem;
}
.footer-bottom p { margin: 0; }
@media (max-width: 879px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

.social { display: flex; gap: 0.6rem; margin-top: 1.25rem; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: #302d29; color: var(--band-text);
}
.social a:hover { background: var(--accent); color: #242321; }
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* Game page ------------------------------------------------------------- */

.game-hero { padding: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(3rem, 7vw, 5rem); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; font-size: 0.875rem; color: var(--text-2); }
.crumbs a { color: inherit; }

.game-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: clamp(2rem, 5vw, 4rem); }
.game-hero-grid.no-art { grid-template-columns: minmax(0, 760px); }
.game-id { display: flex; align-items: center; gap: clamp(1rem, 3vw, 1.5rem); }
.game-id img { width: clamp(88px, 12vw, 128px); height: auto; aspect-ratio: 1; flex: none; border-radius: 22%; box-shadow: var(--shadow); }
.game-id h1 { margin: 0; font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3.25rem); }
.game-meta { margin: 0.35rem 0 0; color: var(--text-2); }
.game-short { margin: 1.75rem 0; max-width: 44ch; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); }
.game-status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; margin: 1.5rem 0 0; color: var(--text-2); font-size: 0.9375rem; }
.game-hero .pill { background: var(--surface); border: 1px solid var(--border); }
.game-hero-art { margin: 0; }
.game-hero-art img { display: block; width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); }
@media (max-width: 879px) {
  .game-hero-grid { grid-template-columns: 1fr; }
}

.game-gallery h2 { margin-bottom: 0.4rem; }
.game-gallery .muted { margin-bottom: 1.25rem; }
.gallery {
  display: flex; gap: 1rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 0.75rem 0 1rem; margin-top: 1rem;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.gallery button {
  flex: none; padding: 0; border: 0; background: none; cursor: zoom-in;
  scroll-snap-align: start; border-radius: var(--radius-lg);
}
.gallery img { display: block; width: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--media-bg); }
.gallery .is-portrait img { height: clamp(320px, 62vw, 500px); }
.gallery .is-landscape img { height: clamp(190px, 34vw, 320px); }

.game-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 879px) {
  .game-body { grid-template-columns: 1fr; }
}

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 2rem; }
.feature-list li { position: relative; padding-left: 1.6rem; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.65rem; height: 0.65rem; border-radius: 3px; background: var(--g-base, var(--accent)); }
@media (max-width: 599px) {
  .feature-list { grid-template-columns: 1fr; }
}

.details-card { position: sticky; top: calc(var(--header-h) + 24px); padding: 1.5rem 1.5rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.details-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.details-card dl { margin: 0; }
.details-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--border); font-size: 0.9375rem; }
.details-card dl div:first-child { border-top: 0; }
.details-card dt { color: var(--text-2); }
.details-card dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; }
.details-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-weight: 600; font-size: 0.9375rem; }

.more-games h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 1.5rem; }
.more-games ul {
  list-style: none; margin: 0 calc(-1 * var(--gutter)); padding: 0.25rem var(--gutter) 0.75rem;
  display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.more-games li { flex: 0 0 96px; scroll-snap-align: start; }
.more-games a { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; color: var(--text); text-decoration: none; text-align: center; font-weight: 500; font-size: 0.9rem; line-height: 1.3; }
.more-games a:hover { color: var(--link); }
.more-games img { width: 88px; height: 88px; border-radius: 22%; object-fit: cover; box-shadow: var(--shadow); }
@media (min-width: 640px) {
  .more-games ul { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.75rem 1rem; margin: 0; padding: 0; overflow: visible; }
}
@media (min-width: 1100px) {
  .more-games ul { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

/* Lightbox -------------------------------------------------------------- */

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: #f7f3eb;
}
.lightbox::backdrop { background: rgba(24, 23, 21, 0.95); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding: 4rem 1rem 2rem; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 80vh; width: auto; height: auto; border-radius: var(--radius); }
.lightbox figcaption { color: #bdb6ac; font-size: 0.9375rem; text-align: center; max-width: 60ch; }
.lightbox button {
  position: absolute; display: grid; place-items: center;
  width: 48px; height: 48px; border: 1.5px solid #857e74; border-radius: 10px;
  background: #242321; color: #f7f3eb; font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { border-color: #f7f3eb; }
.lightbox :focus-visible { outline-color: #ff6b35; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 599px) {
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
}

/* Document pages (privacy, contact, delete account) --------------------- */

.doc-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: clamp(1.75rem, 4vw, 2.5rem) 0 clamp(2.25rem, 5vw, 3.25rem); }
.doc-hero h1 { font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3rem); max-width: 22ch; margin: 0; }
.doc-app { display: inline-flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; color: var(--text); font-weight: 600; text-decoration: none; }
.doc-app:hover { color: var(--link); }
.doc-app img { width: 48px; height: 48px; border-radius: 22%; }
.doc-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.75rem; margin: 1.1rem 0 0; padding: 0; color: var(--text-2); font-size: 0.9375rem; }

.doc-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); padding-top: clamp(2.5rem, 5vw, 3.5rem); padding-bottom: clamp(4rem, 8vw, 6rem); }
.doc-grid.no-toc { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: 0.9375rem; }
.toc h2 { font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; margin: 0 0 0.75rem; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc a { display: block; margin-left: -2px; padding: 0.35rem 0 0.35rem 1rem; border-left: 2px solid transparent; color: var(--text-2); text-decoration: none; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 879px) {
  .doc-grid { grid-template-columns: 1fr; }
  .toc { position: static; padding: 1rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .toc ul { border-left: 0; columns: 2; column-gap: 1.25rem; }
  .toc a { margin-left: 0; padding-left: 0; border-left: 0; }
}

.prose { max-width: 70ch; }
.prose > section { margin-bottom: 0.5rem; }
.prose h2 { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem); margin: 2.5rem 0 0.75rem; }
.prose > h2:first-child, .prose > section:first-child h2 { margin-top: 0; }
.prose h3 { font-size: 1.0625rem; letter-spacing: -0.01em; margin: 1.6rem 0 0.4rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--text-2); }
.lede-dark { font-size: 1.1875rem; margin-bottom: 2rem; }

.summary-box { margin-bottom: 2.5rem; padding: 1.4rem 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); }
.prose .summary-box h2 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.summary-box ul { margin: 0; }

.policy-list { list-style: none; margin: 0 0 3rem; padding: 0; border-top: 1px solid var(--border); }
.prose .policy-list { padding: 0; }
.policy-list li { display: flex; align-items: center; gap: 1rem; margin: 0; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.policy-list img { width: 48px; height: 48px; flex: none; border-radius: 22%; }
.policy-list a { font-weight: 600; }
.policy-list span { display: block; color: var(--text-2); font-size: 0.8125rem; }

.contact-card { margin-bottom: 3rem; padding: clamp(1.5rem, 4vw, 2.25rem); border-radius: var(--radius-lg); background: #242321; color: var(--band-text-2); }
.prose .contact-card h2 { margin: 0 0 0.5rem; color: var(--band-text); font-size: 1.0625rem; letter-spacing: 0; }
.contact-email { color: var(--band-text); font-size: clamp(1.25rem, 1rem + 1.4vw, 1.875rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; overflow-wrap: anywhere; text-decoration-color: var(--accent); }
.contact-email:hover { color: var(--band-text); }
.contact-card .muted { color: var(--band-text-2); margin: 0; }

.topic-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.prose .topic-list { padding: 0; }
.topic-list li { margin: 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.topic-list a { font-weight: 600; font-size: 1.0625rem; }
.topic-list p { margin: 0.35rem 0 0; color: var(--text-2); font-size: 0.9375rem; }
@media (max-width: 599px) {
  .topic-list { grid-template-columns: 1fr; }
}
.topic-list strong { display: block; font-size: 1.0625rem; }

/* Tables (ads & consent page) ------------------------------------------- */

.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data-table th, .data-table td { text-align: left; vertical-align: middle; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th { background: var(--bg); font-weight: 600; font-size: 0.875rem; }
.data-table .app-cell { display: flex; align-items: center; gap: 0.7rem; white-space: nowrap; font-weight: 600; }
.data-table .app-cell img { width: 36px; height: 36px; flex: none; border-radius: 22%; }
.data-table .soon { color: var(--text-2); }
@media (max-width: 599px) {
  .data-table thead { display: none; }
  .data-table tr { display: block; padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td { display: block; padding: 0; border: 0; }
  .data-table td + td { margin-top: 0.35rem; padding-left: calc(36px + 0.7rem); }
}

/* Motion preferences ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .icon-wall li { animation: none; }
  .icon-wall img, .chev { transition: none; }
}
