:root {
  --font-display: "Fredoka", sans-serif;
  --font-body: "Quicksand", sans-serif;
  --font-accent: "Nunito", sans-serif;
  --primary: #f8a5b8;
  --primary-light: #ffcad4;
  --primary-dark: #e8899c;
  --secondary: #7bc8f6;
  --secondary-light: #a5ddfb;
  --accent: #c9a0dc;
  --accent-dark: #a87dc2;
  --gold: #f5d76e;
  --success: #8ed16c;
  --bg-main: #fff9f5;
  --bg-gradient: linear-gradient(135deg, #fff9f5 0%, #f0f8ff 50%, #fff5f8 100%);
  --text-dark: #5d4e60;
  --text-medium: #6b5c70;
  --text-light: #807084;
  --border: #f0e6eb;
  --card-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 14px 34px rgba(248, 165, 184, 0.15);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  --shell-article: 900px;
  --shell-hub: 1100px;
  --shell-explorer: 1400px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.68;
  background:
    radial-gradient(circle at 18% 12%, rgba(248, 165, 184, 0.10) 0%, transparent 34%),
    radial-gradient(circle at 82% 8%, rgba(123, 200, 246, 0.10) 0%, transparent 32%),
    radial-gradient(circle at 55% 78%, rgba(201, 160, 220, 0.09) 0%, transparent 38%),
    var(--bg-gradient);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 40;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--text-dark);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(240, 230, 235, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 2rem), 1480px);
  min-height: 74px;
  margin: 0 auto;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid rgba(232, 137, 156, 0.65);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
  color: var(--text-dark);
  box-shadow: inset 0 -5px 0 rgba(255, 255, 255, 0.45);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem;
  border: 1px solid rgba(240, 230, 235, 0.92);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.74);
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  color: var(--text-medium);
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
  border-color: rgba(232, 137, 156, 0.48);
  background: rgba(255, 202, 212, 0.46);
  color: var(--text-dark);
  text-decoration: none;
}

.site-nav a.active::after {
  position: absolute;
  right: 1rem;
  bottom: 0.35rem;
  left: 1rem;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--primary-dark);
  content: "";
}

.nav-toggle {
  display: none;
  min-height: 42px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--text-dark);
  font-weight: 700;
}

.main-shell {
  width: min(calc(100% - 2rem), var(--shell-hub));
  margin: 0 auto;
  padding: 1.2rem 0 4rem;
}

.main-shell[data-shell="article"] {
  max-width: var(--shell-article);
}

.main-shell[data-shell="explorer"] {
  max-width: var(--shell-explorer);
}

.breadcrumb {
  margin: 0.55rem 0 1rem;
  color: var(--text-light);
  font-size: 0.94rem;
  font-weight: 700;
}

.topic-surface {
  border: 1px solid rgba(240, 230, 235, 0.94);
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.3rem, 3vw, 2.4rem);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.82rem;
  border: 1px solid rgba(123, 200, 246, 0.34);
  border-radius: var(--radius-full);
  background: rgba(123, 200, 246, 0.14);
  color: #4a98c8;
  font-family: var(--font-accent);
  font-size: 0.82rem;
  font-weight: 800;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-dark);
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  max-width: 13ch;
  margin-top: 0.75rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

h3 {
  font-size: 1.18rem;
}

p {
  margin: 0;
}

.lead {
  max-width: 68ch;
  margin-top: 1rem;
  color: var(--text-medium);
  font-size: 1.08rem;
  font-weight: 600;
}

.hero-actions,
.play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(232, 137, 156, 0.24);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  color: #34556a;
  box-shadow: 0 10px 20px rgba(123, 200, 246, 0.22);
}

.btn-outline {
  border-color: rgba(232, 137, 156, 0.55);
  background: rgba(255, 255, 255, 0.76);
  color: var(--primary-dark);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
  margin-top: 1.15rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0 0.75rem;
  border: 1px solid rgba(248, 165, 184, 0.22);
  border-radius: var(--radius-full);
  background: rgba(255, 202, 212, 0.18);
  color: var(--text-medium);
  font-weight: 700;
}

.stat-pill b {
  color: var(--primary-dark);
}

.hero-media {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 202, 212, 0.58);
  border-radius: var(--radius-lg);
  background: #ffffff;
}

.hero-media img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
}

.quick-answer,
.play-panel,
.content-section,
.article-hero,
.game-hero {
  margin-top: 1.35rem;
  padding: clamp(1.2rem, 3vw, 1.85rem);
}

.quick-answer {
  border-left: 5px solid var(--accent);
  background: linear-gradient(135deg, rgba(255, 202, 212, 0.38), rgba(165, 221, 251, 0.22));
}

.quick-answer h2,
.content-section h2 {
  margin-bottom: 0.7rem;
}

.content-section p + p,
.article-hero p + p {
  margin-top: 0.82rem;
}

.play-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
}

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

.text-link {
  font-weight: 800;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.game-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 278px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(248, 165, 184, 0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(248, 165, 184, 0.16);
}

.game-card h3 {
  margin-top: 0.35rem;
}

.game-card p {
  margin-top: 0.55rem;
  color: var(--text-medium);
}

.card-kicker {
  color: var(--text-light) !important;
  font-size: 0.85rem;
  font-weight: 800;
}

.card-link {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  min-height: 36px;
  margin-top: 1rem;
  padding: 0 0.85rem;
  border: 1px solid rgba(232, 137, 156, 0.42);
  border-radius: var(--radius-full);
  background: rgba(255, 202, 212, 0.22);
  font-weight: 800;
}

.game-visual {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 22px;
  color: rgba(93, 78, 96, 0.82);
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 700;
  box-shadow: inset 0 -8px 0 rgba(255, 255, 255, 0.36);
}

.tone-0 {
  background: linear-gradient(135deg, #ffcad4, #a5ddfb);
}

.tone-1 {
  background: linear-gradient(135deg, #f5d76e, #8ed16c);
}

.tone-2 {
  background: linear-gradient(135deg, #c9a0dc, #ffcad4);
}

.tone-3 {
  background: linear-gradient(135deg, #7bc8f6, #f5d76e);
}

.tone-4 {
  background: linear-gradient(135deg, #8ed16c, #a5ddfb);
}

.tone-5 {
  background: linear-gradient(135deg, #f8a5b8, #f5d76e);
}

.game-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.2rem;
  align-items: center;
}

.game-hero .game-visual {
  width: 112px;
  height: 112px;
  border-radius: 28px;
  font-size: 2.1rem;
}

.check-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 0.68rem 0.8rem 0.68rem 2rem;
  border: 1px solid rgba(240, 230, 235, 0.9);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.66);
  color: var(--text-medium);
  font-weight: 650;
}

.check-list li::before {
  position: absolute;
  left: 0.78rem;
  color: var(--success);
  content: "•";
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

details {
  border: 1px solid rgba(240, 230, 235, 0.95);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
}

summary {
  cursor: pointer;
  padding: 1rem;
  font-weight: 800;
}

details p {
  padding: 0 1rem 1rem;
  color: var(--text-medium);
}

.search-panel {
  display: grid;
  gap: 0.45rem;
  max-width: 540px;
  margin-top: 1.15rem;
}

.search-panel label {
  color: var(--text-medium);
  font-weight: 800;
}

.search-panel input {
  width: 100%;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: #ffffff;
  color: var(--text-dark);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.filter-row button {
  min-height: 38px;
  padding: 0 0.82rem;
  border: 1px solid rgba(232, 137, 156, 0.28);
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text-medium);
  cursor: pointer;
  font-weight: 800;
}

.filter-row button.active,
.filter-row button:hover {
  background: rgba(255, 202, 212, 0.38);
  color: var(--primary-dark);
}

.keyword-hero h1 {
  max-width: 18ch;
  overflow-wrap: anywhere;
}

.keyword-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.keyword-chip {
  display: grid;
  gap: 0.22rem;
  min-height: 74px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(232, 137, 156, 0.28);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 8px 18px rgba(248, 165, 184, 0.10);
  color: var(--text-dark);
  font-weight: 800;
}

.keyword-chip:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.keyword-chip span {
  overflow-wrap: anywhere;
}

.keyword-chip small {
  color: var(--text-light);
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.tool-card-grid,
.tool-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}

.tool-card,
.tool-module {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.tool-card {
  display: grid;
  gap: 0.35rem;
  min-height: 104px;
  padding: 1rem;
  color: var(--text-dark);
  font-weight: 800;
}

.tool-card:hover,
.tool-module button:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-card span,
.tool-card small {
  overflow-wrap: anywhere;
}

.tool-card small {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 700;
}

.tool-module-grid {
  margin-top: 1.35rem;
}

.tool-module {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1.2rem, 3vw, 1.6rem);
}

.tool-module h2 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.choice-grid button {
  min-height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--card-bg);
  color: var(--text-dark);
  cursor: pointer;
  font-weight: 800;
}

.choice-grid button.active {
  border-color: var(--primary-dark);
  background: var(--primary-light);
}

.tool-field {
  display: grid;
  gap: 0.35rem;
  color: var(--text-medium);
  font-weight: 800;
}

.tool-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-dark);
}

.tool-result {
  display: block;
  min-height: 72px;
  padding: 0.85rem;
  border: 1px solid var(--secondary);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-dark);
  font-weight: 750;
}

.site-footer {
  border-top: 1px solid rgba(240, 230, 235, 0.9);
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  width: min(calc(100% - 2rem), 1400px);
  margin: 0 auto;
  padding: 2rem 0;
}

.footer-inner p {
  max-width: 70ch;
  margin-top: 0.4rem;
  color: var(--text-light);
  font-size: 0.94rem;
}

.footer-inner nav,
.source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-content: start;
  justify-content: end;
  font-weight: 800;
}

.source-row {
  grid-column: 1 / -1;
  justify-content: start;
  font-size: 0.92rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1120px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .site-nav {
    position: fixed;
    top: 4.75rem;
    right: 1rem;
    left: 1rem;
    z-index: 60;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    justify-content: center;
  }

  .site-nav a.active::after {
    display: none;
  }

  .hero,
  .play-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .main-shell,
  .footer-inner {
    width: min(calc(100% - 1rem), 100%);
  }

  .brand span:last-child {
    max-width: 13ch;
    overflow-wrap: anywhere;
    line-height: 1.05;
  }

  .hero-actions,
  .play-actions,
  .stat-row,
  .filter-row {
    justify-content: center;
  }

  .hero,
  .article-hero,
  .game-hero,
  .content-section,
  .quick-answer,
  .play-panel {
    border-radius: var(--radius-lg);
  }

  .game-hero {
    grid-template-columns: 1fr;
  }

  .game-grid,
  .compact-grid,
  .keyword-chip-grid,
  .tool-card-grid,
  .tool-module-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .footer-inner {
    display: grid;
  }

  .footer-inner nav {
    justify-content: start;
  }
}
