:root {
  color-scheme: light;
  --bg: #fffaf4;
  --surface: #ffffff;
  --surface-soft: #eef7fd;
  --text: #25163a;
  --muted: #5c4e70;
  --line: #e4dbf0;
  --accent: #d91b5c;
  --accent-dark: #a61144;
  --sky: #0369a1;
  --sky-dark: #075985;
  --sun: #ffca28;
  --radius-sm: 12px;
  --radius-md: 16px;
  --shadow-sm: 0 1px 2px rgba(37, 22, 58, 0.06);
  --shadow-md: 0 8px 24px rgba(37, 22, 58, 0.08);
  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.65;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}

.skip-link:focus {
  position: absolute;
  z-index: 20;
  top: 12px;
  left: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--sky);
  font-weight: 800;
}

.shell {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 15;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--sky-dark);
}

.brand-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: var(--surface-soft);
  color: var(--sky-dark);
}

/* Breadcrumbs */
.breadcrumbs {
  padding-top: 24px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

.breadcrumbs a {
  text-decoration: none;
  color: var(--sky-dark);
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 28px;
  font-weight: 800;
}

h3 {
  font-size: 22px;
  font-weight: 700;
}

p {
  margin: 0;
}

/* Hero header */
.hero-header,
.list-hero {
  padding: 24px 0 16px;
}

.hero-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.hero-badges li {
  font-size: 14px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--sun);
  border: 2px solid var(--text);
  color: var(--text);
}

.hero-lead {
  margin-top: 8px;
  font-size: 18px;
  color: var(--muted);
  max-width: 70ch;
}

/* Buttons (Tactile 3D Toy-Block Signature) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--sky);
}

.btn:active:not(:disabled) {
  transform: translateY(2px);
}

.btn-primary,
.btn-play {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: var(--surface);
  box-shadow: 0 4px 0 var(--accent-dark);
}

.btn-primary:hover:not(:disabled),
.btn-play:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-play {
  min-height: 52px;
  padding: 12px 24px;
  font-size: 18px;
  margin-top: 16px;
}

.btn-sky {
  background: var(--sky);
  border-color: var(--sky-dark);
  color: var(--surface);
  box-shadow: 0 4px 0 var(--sky-dark);
}

.btn-sky:hover:not(:disabled) {
  background: var(--sky-dark);
  border-color: var(--sky-dark);
}

.btn-chip {
  background: var(--surface);
  border: 2px solid var(--line);
  box-shadow: 0 2px 0 var(--line);
}

.btn-chip[data-gf-liked] {
  background: var(--surface-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
  box-shadow: 0 2px 0 var(--accent);
}

.btn-mini {
  min-height: 36px;
  padding: 4px 12px;
  font-size: 14px;
  margin-top: 8px;
}

.like-heart {
  color: var(--accent);
}

.count-pill {
  font-size: 14px;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

/* Game Player Stage */
.player-section {
  margin-bottom: 48px;
}

.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  background: var(--text);
  border-radius: var(--radius-md);
  border: 3px solid var(--text);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.cover,
.loader {
  position: absolute;
  inset: 0;
}

.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-scrim {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--text) 56%, transparent);
}

.cover-card {
  width: min(100%, 500px);
  background: var(--surface);
  color: var(--text);
  border: 3px solid var(--text);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 0 var(--text);
  padding: 24px;
  text-align: center;
}

.cover-pill {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--sun);
  color: var(--text);
  margin-bottom: 8px;
}

.cover-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.cover-hook {
  margin-top: 8px;
  font-size: 16px;
  color: var(--muted);
}

/* Custom Toy-Block Loader */
.loader {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--surface-soft);
  color: var(--text);
}

.toy-loader {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toy-loader .block {
  width: 24px;
  height: 24px;
  border: 2px solid var(--text);
  animation: toy-bounce 0.7s ease-in-out infinite alternate;
}

.toy-loader .block-1 {
  background: var(--accent);
  border-radius: 50%;
}

.toy-loader .block-2 {
  background: var(--sun);
  border-radius: 6px;
  animation-delay: -0.2s;
}

.toy-loader .block-3 {
  background: var(--sky);
  border-radius: 50%;
  animation-delay: -0.4s;
}

.toy-loader .block-4 {
  background: var(--surface);
  border-radius: 6px;
  animation-delay: -0.6s;
}

.loader-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}

@keyframes toy-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-14px); }
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.control-hint {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.status-msg {
  font-size: 14px;
  font-weight: 700;
  color: var(--sky-dark);
}

/* Catalog / Game Grid */
.catalog-section {
  padding-block: 32px 48px;
  border-top: 2px solid var(--line);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 16px;
}

.section-links {
  display: flex;
  gap: 16px;
}

.text-link {
  font-weight: 800;
  color: var(--sky-dark);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-pill {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--sky);
}

.filter-pill.is-active {
  background: var(--sky);
  border-color: var(--sky-dark);
  color: var(--surface);
  box-shadow: 0 3px 0 var(--sky-dark);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 0 var(--line);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--sky);
  box-shadow: 0 6px 0 var(--sky);
}

.game-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--text);
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--sun);
  color: var(--text);
  border: 2px solid var(--text);
}

.game-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
  gap: 8px;
}

.game-card-body h2,
.game-card-body h3 {
  font-size: 22px;
  line-height: 1.2;
}

.game-card-body p {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

.game-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: var(--sky-dark);
}

/* Split Overview + Quick Facts Card */
.split-overview {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 32px;
  align-items: start;
  padding-block: 48px;
  border-top: 2px solid var(--line);
}

.prose-col p {
  margin-top: 16px;
  max-width: 70ch;
}

.facts-card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 0 var(--line);
  padding: 24px;
}

.facts-card h3 {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--sun);
}

.facts-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.facts-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.facts-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.facts-list dt {
  font-weight: 800;
  color: var(--muted);
}

.facts-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  color: var(--text);
}

/* How-to Band + Parents Box */
.howto-band {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: start;
  padding-block: 48px;
  border-top: 2px solid var(--line);
}

.step-list {
  list-style: none;
  counter-reset: step;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.step-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  max-width: 70ch;
}

.step-list li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--surface);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
}

.parents-box {
  background: var(--surface-soft);
  border: 2px solid var(--sky);
  border-radius: var(--radius-md);
  padding: 24px;
}

.parents-box p {
  margin-top: 12px;
  color: var(--text);
}

/* Tips List */
.tips-section {
  padding-block: 48px;
  border-top: 2px solid var(--line);
}

.tips-rows {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.tip-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2.2fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 24px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
}

.tip-row h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.star-dot {
  color: var(--accent);
}

.tip-row p {
  color: var(--muted);
  max-width: 70ch;
}

/* FAQ Accordion */
.faq-section {
  padding-block: 48px;
  border-top: 2px solid var(--line);
}

.faq-list {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 24px;
}

.faq-item summary {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 800;
  color: var(--sky-dark);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 70ch;
}

/* Comments */
.comments-section {
  margin-bottom: 64px;
  padding: 32px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.comments-head p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 70ch;
}

.comment-form {
  margin-top: 16px;
  max-width: 680px;
}

.comment-form label {
  display: block;
  font-weight: 800;
  margin-bottom: 8px;
}

.comment-form textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  margin-bottom: 12px;
}

.comment-form textarea:focus {
  border-color: var(--sky);
  outline: none;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.comment-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  overflow-wrap: anywhere;
}

.comment-list[data-gf-empty]:not(.replies)::before {
  content: "No comments yet — be the first grown-up to share a tip or favorite game!";
  display: block;
  color: var(--muted);
  font-weight: 600;
}

.comment-item {
  padding: 12px 0 12px 16px;
  border-left: 3px solid var(--sun);
  margin-bottom: 12px;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.comment-meta time {
  font-size: 14px;
  color: var(--muted);
}

.owner-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--sky-dark);
}

.comment-body {
  margin-top: 4px;
}

.replies[data-gf-empty] {
  display: none;
}

/* Prose / Legal / 404 */
.prose-page {
  padding-block: 32px 64px;
  max-width: 70ch;
}

.prose-page h1 {
  margin-bottom: 24px;
}

.prose-page h2 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.prose-page p + p,
.prose-page ul,
.prose-page ol {
  margin-top: 12px;
}

.not-found {
  padding: 64px 0;
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
}

.not-found p {
  margin-top: 12px;
  color: var(--muted);
}

.not-found-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 3px solid var(--sky);
  padding-block: 32px 24px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}

.footer-note {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
  max-width: 44ch;
}

.footer-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-nav a {
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}

.footer-nav a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* Tablet */
@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split-overview,
  .howto-band {
    grid-template-columns: 1fr;
  }
  .tip-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .shell {
    padding-inline: 16px;
  }
  .header-bar {
    flex-direction: column;
    align-items: flex-start;
    padding-block: 12px;
    gap: 8px;
  }
  .main-nav {
    width: 100%;
    gap: 4px;
  }
  .nav-link {
    padding: 8px 12px;
    font-size: 14px;
  }
  h1 {
    font-size: 32px;
  }
  h2 {
    font-size: 22px;
  }
  .stage {
    min-height: 300px;
    aspect-ratio: 4 / 3;
  }
  .cover-scrim {
    padding: 12px;
  }
  .cover-card {
    padding: 16px;
  }
  .cover-title {
    font-size: 22px;
  }
  .btn-play {
    width: 100%;
  }
  .player-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-left,
  .toolbar-right {
    justify-content: space-between;
  }
  .btn-sky {
    width: 100%;
  }
  .game-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .comments-section {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .toy-loader .block {
    animation: none;
  }
  .game-card,
  .btn {
    transition: none;
  }
}
