:root {
  --bg: #f2f5f9;
  --bg-alt: #e6ebf2;
  --surface: #ffffff;
  --ink: #0b0f19;
  --muted: #5e6b7e;
  --line: #d1d9e6;
  --accent: #ff3366;
  --accent-dark: #cc0033;
  --accent-soft: #ff80a0;
  --foreground: var(--ink);
  --background: var(--bg-alt);
  --border: var(--line);
  --shadow: 0 12px 36px rgba(11, 15, 25, 0.08);
  --shadow-hover: 0 24px 48px rgba(11, 15, 25, 0.18), 0 0 20px rgba(255, 51, 102, 0.2);
  --radius: 18px;
  --container: 1160px;
}

body.dark-mode {
  --bg: #090a0f;
  --bg-alt: #11131a;
  --surface: #171a23;
  --ink: #ffffff;
  --muted: #8b95a5;
  --line: #2a2d3d;
  --accent: #ff3366;
  --accent-soft: #ff6685;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  --shadow-hover: 0 24px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 51, 102, 0.25);
}
body.dark-mode .site-header {
  background: rgba(15, 17, 24, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
body.dark-mode .section-alt, body.dark-mode .site-footer {
  background: var(--bg-alt);
}
body.dark-mode .hero-card,
body.dark-mode .sidebar-card,
body.dark-mode .embed-shell,
body.dark-mode .category-card,
body.dark-mode .game-card,
body.dark-mode .page-prose {
  border-color: rgba(255, 255, 255, 0.05);
}

.action-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0 0.5rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  color: var(--ink);
}
.action-button:hover {
  opacity: 1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top right, rgba(255, 51, 102, 0.1), transparent 30rem),
              radial-gradient(circle at top left, rgba(0, 153, 255, 0.05), transparent 25rem),
              var(--bg);
}

body.body--immersive {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
  background: var(--bg-alt);
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.section {
  padding: 3.5rem 0;
}

.section-tight {
  padding-bottom: 1.25rem;
}

.section-alt {
  background: rgba(255, 255, 255, 0.45);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.65);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.header-row,
.footer-grid,
.hero-grid,
.two-column,
.game-header,
.stage-actions {
  display: grid;
  gap: 1.5rem;
}

.header-row {
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 1rem 0;
}

.brandmark {
  display: inline-grid;
  gap: 0.2rem;
  align-items: start;
}

.brandmark-lockup {
  width: min(210px, 100%);
  height: auto;
}

.brandmark-lockup-dark {
  display: none;
}

.brandmark strong,
.site-footer h2,
.section-header h2,
.page-heading h1,
.game-header h1,
.prose h1,
.prose h2 {
  font-family: "Outfit", "Inter", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brandmark-tagline {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
}

.site-nav-shell {
  display: none;
}

.site-nav-primary a {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
}

.site-nav a,
.footer-grid a {
  color: var(--muted);
  font-weight: 700;
}

.site-nav a:hover,
.footer-grid a:hover,
.game-card h3 a:hover {
  color: var(--accent-dark);
}

.hero {
  padding: 4.75rem 0 3.5rem;
}

.hero-grid {
  grid-template-columns: 1.5fr 1fr;
  align-items: center;
}

.hero h1,
.page-heading h1,
.game-header h1,
.prose h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 52rem;
}

.hero-card,
.sidebar-card,
.embed-shell,
.category-card,
.game-card,
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card,
.sidebar-card {
  padding: 1.5rem;
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 30px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.button-primary:hover {
  box-shadow: 0 20px 40px color-mix(in srgb, var(--accent) 35%, transparent);
  transform: translateY(-2px);
}

.button-primary:active {
  transform: translateY(1px) scale(0.96);
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.3s ease, border-color 0.3s ease;
}

.button-secondary:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.button-secondary:active {
  transform: scale(0.96);
}

.button-secondary--active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-dark);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.check-list,
.footer-grid ul,
.breadcrumbs ol,
.detail-list,
.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.footer-grid li {
  margin-top: 0.75rem;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-subcopy {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.empty-state {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
}

.text-button {
  margin-left: 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

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

.card-grid,
.category-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

.category-card,
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

body.dark-mode .category-card:hover,
body.dark-mode .game-card:hover {
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.category-card {
  padding: 1.5rem;
}

.collection-card {
  min-height: 100%;
}

.collection-card .eyebrow {
  margin-bottom: 0.7rem;
}

.category-card span {
  color: var(--accent-dark);
  font-weight: 700;
}

.quick-play-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.quick-play-card {
  display: grid;
  gap: 0.35rem;
  min-height: 150px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
}

.quick-play-card h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.1;
}

.quick-play-card span {
  align-self: end;
  color: var(--accent-dark);
  font-weight: 800;
}

.game-card-media {
  display: block;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: color-mix(in srgb, var(--surface) 82%, var(--bg-alt));
  background-position: center;
  background-size: cover;
}

.game-card-media[data-lazy-media] {
  background-image:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
}

.game-card-media::before {
  content: "";
  position: absolute;
  inset: -14px;
  background-image: inherit;
  background-position: center;
  background-size: cover;
  filter: blur(14px) saturate(1.08);
  opacity: 0.24;
  transform: scale(1.06);
  z-index: 0;
}

/* Subtle inset border for clean image edges */
.game-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  pointer-events: none;
  z-index: 3;
}

.game-card-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: clamp(0.35rem, 1.5vw, 0.85rem);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.18));
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.game-card:hover .game-card-media img {
  transform: scale(1.05);
}

.game-card-body {
  padding: 1rem 1rem 1.25rem;
}

.game-card h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.25rem;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.playability-mini,
.playability-panel,
.search-filters,
.category-toolbar-group--filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.playability-mini {
  margin-top: 0.8rem;
}

.quality-mini {
  display: flex;
  margin-top: 0.75rem;
}

.quality-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.6rem;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.quality-badge--excellent {
  border-color: color-mix(in srgb, #0f8f61 28%, transparent);
  background: color-mix(in srgb, #0f8f61 10%, var(--surface));
  color: #0f6849;
}

.quality-badge--good {
  border-color: color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--accent-dark);
}

.quality-badge--manual-check,
.quality-badge--needs-review {
  border-color: color-mix(in srgb, #b7791f 32%, transparent);
  background: color-mix(in srgb, #b7791f 11%, var(--surface));
  color: #87520f;
}

.playability-mini a,
.playability-panel a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.25rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.playability-mini a:hover,
.playability-panel a:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent-dark);
}

.playability-panel {
  justify-content: flex-end;
}

.playability-panel a {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.category-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.section-header-compact {
  margin-bottom: 0.9rem;
}

.section-header-compact h2 {
  font-size: 1.25rem;
}

.search-collection-panel {
  margin: 1rem 0;
}

.search-collection-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.search-collection-grid .category-card[hidden] {
  display: none;
}

.spotlight-group {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.spotlight-group + .spotlight-group {
  margin-top: 2rem;
}

.category-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.category-result-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-weight: 700;
}

.category-toolbar-group--filters {
  justify-content: flex-end;
}

.category-toolbar label {
  font-weight: 700;
  color: var(--ink);
}

.category-toolbar select {
  min-height: 42px;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.category-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.category-filter-toggle:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent-dark);
}

.category-filter-toggle input {
  accent-color: var(--accent);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
}

.game-header {
  grid-template-columns: 1.4fr 1fr;
  align-items: start;
}

.game-header-copy {
  min-width: 0;
}

.game-header-actions {
  margin-top: 1rem;
}

.game-header-side {
  display: grid;
  gap: 1rem;
  align-items: start;
}

.game-cover-card {
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 42%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.game-cover-card::before {
  content: "";
  position: absolute;
  inset: -18px;
  background: inherit;
  opacity: 0.18;
}

.game-cover-card img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  padding: clamp(0.5rem, 1.5vw, 1rem);
}

.detail-pill-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.6rem;
}

.sidebar-cover {
  position: relative;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(8, 7, 35, 0.16), rgba(255, 255, 255, 0.12)),
    var(--sidebar-cover-image) center / cover;
}

.sidebar-cover::before {
  content: "";
  position: absolute;
  inset: -16px;
  background: var(--sidebar-cover-image) center / cover;
  filter: blur(16px) saturate(1.08);
  opacity: 0.24;
  transform: scale(1.07);
}

.sidebar-cover-image {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  display: block;
  padding: clamp(0.45rem, 1.5vw, 0.9rem);
  filter: drop-shadow(0 9px 18px rgba(0, 0, 0, 0.18));
}

.tag-pill {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.embed-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1rem;
  border-radius: var(--radius);
}

.game-frame,
.embed-placeholder {
  border: 0;
  border-radius: calc(var(--radius) - 8px);
}

.game-frame {
  display: block;
  position: relative;
  z-index: 1;
  width: min(100%, var(--game-frame-max-width, 100%));
  aspect-ratio: var(--game-aspect-ratio, 16 / 9);
  min-height: 320px;
  background: #111;
  margin-inline: auto;
}

.embed-placeholder {
  width: 100%;
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 2rem;
  gap: 1rem;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(194, 77, 44, 0.12), rgba(124, 47, 25, 0.18)),
    #f4ebe0;
}

.embed-placeholder .button-primary {
  text-decoration: none;
}

.game-facade {
  position: relative;
  width: min(100%, var(--game-frame-max-width, 100%));
  aspect-ratio: var(--game-aspect-ratio, 16 / 9);
  min-height: 320px;
  border-radius: calc(var(--radius) - 8px);
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
  background: var(--ink);
  margin-inline: auto;
}

.game-facade .facade-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.4s ease, transform 0.6s ease;
}

.game-facade:hover .facade-bg {
  opacity: 0.4;
  transform: scale(1.02);
}

.facade-play-btn {
  position: relative;
  z-index: 2;
  font-size: 1.25rem;
  padding: 1.25rem 2.5rem;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.game-facade:hover .facade-play-btn {
  transform: scale(1.05);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 8px color-mix(in srgb, var(--accent) 30%, transparent);
}

.game-frame-status {
  position: absolute;
  inset: 1rem;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.game-frame-status[hidden] {
  display: none;
}

.game-frame-status-card {
  width: min(100%, 520px);
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.game-frame-status[data-status-mode="loading"] {
  align-items: flex-start;
  justify-content: flex-end;
}

.game-frame-status[data-status-mode="loading"] .game-frame-status-card {
  width: auto;
  max-width: min(92%, 360px);
  padding: 0.7rem 0.85rem;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.game-frame-status[data-status-mode="loading"] .game-frame-status-actions {
  display: none;
}

.game-frame-status-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.game-frame-status-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.game-frame-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.game-frame-status-actions .button-secondary {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
}

.highscore-card {
  align-items: end;
}

.highscore-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.highscore-actions input {
  width: min(160px, 100%);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.game-feedback-card {
  align-items: center;
}

.game-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.game-feedback-actions .button-secondary {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
}

.game-feedback-actions .button-secondary--active {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, var(--surface));
  color: var(--accent-dark);
}

.mobile-play-hint {
  display: none;
  margin-bottom: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--ink);
  font-size: 0.92rem;
}

.touch-controls {
  display: none;
}

.touch-controls-hint {
  display: none;
  margin: 0 auto 0.5rem;
  padding: 0.45rem 0.7rem;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.82rem;
}

.touch-controls-pad {
  display: grid;
  gap: 0.5rem;
  width: min(100%, 320px);
  margin: 0.75rem auto 0;
}

.touch-controls-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.touch-controls-row--two {
  grid-template-columns: repeat(2, 1fr);
}

.touch-controls-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, 0.95fr);
  gap: 0.75rem;
  align-items: end;
}

.touch-controls-move {
  display: grid;
  gap: 0.5rem;
}

.touch-controls-pad--racing {
  width: min(100%, 380px);
}

.touch-aimpad {
  display: grid;
  place-items: center;
  min-height: 210px;
  border-radius: 20px;
  background: rgba(31, 29, 26, 0.92);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  user-select: none;
  touch-action: none;
}

.touch-key {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: rgba(31, 29, 26, 0.92);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.touch-key-center {
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
}

.touch-controls [hidden] {
  display: none !important;
}

.stage-actions {
  position: relative;
  z-index: 2;
  grid-template-columns: auto auto auto auto auto auto minmax(0, 1fr);
  align-items: center;
  margin-top: 1rem;
}

.game-action-bar {
  gap: 0.6rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.game-action-bar .button-secondary,
.game-action-bar .button-primary {
  min-height: 40px;
  padding: 0.6rem 0.85rem;
  white-space: nowrap;
}

.challenge-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, transparent), transparent),
    var(--surface);
  box-shadow: var(--shadow);
}

.challenge-card h2 {
  margin: 0 0 0.35rem;
  font-family: "Outfit", "Inter", sans-serif;
  font-size: 1.35rem;
}

.challenge-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.challenge-card .challenge-status {
  margin-top: 0.55rem;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.stage-note {
  margin: 0;
  color: var(--muted);
}

.immersive-tip {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-shell--immersive .site-header,
.site-shell--immersive .site-footer,
.site-shell--immersive .breadcrumbs,
.site-shell--immersive .game-header,
.site-shell--immersive .section:not(.game-stage) {
  display: none;
}

.game-stage--immersive {
  position: fixed;
  inset: 0;
  z-index: 999;
  padding: 0;
  background: #050505;
}

.game-stage--immersive .container {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.game-stage--immersive .embed-shell {
  flex: 1;
  padding: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.game-stage--immersive .game-frame {
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  aspect-ratio: auto;
  border-radius: 0;
}

.game-stage--immersive .stage-actions {
  position: absolute;
  right: 12px;
  top: 12px;
  left: auto;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  z-index: 5;
}

.game-stage--immersive .stage-note {
  display: none;
}

.game-stage--immersive .challenge-card {
  display: none;
}

.game-stage--immersive .immersive-tip {
  display: block;
  color: #ddd;
}

.game-stage--immersive .touch-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  z-index: 4;
}

.two-column {
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

.prose,
.page-prose {
  line-height: 1.8;
}

/* ── Page Hero Banner ── */
.page-hero-banner {
  padding: 8rem 0 4.5rem;
  margin-top: -71px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-hero-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--accent) 8%, transparent) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}
.page-hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.page-breadcrumbs {
  margin-bottom: 0.5rem;
  color: var(--muted);
}
.page-hero-subtitle {
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 1rem;
}
.page-hero-title {
  color: var(--ink);
  margin: 0;
  font-family: "Outfit", "Inter", sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.page-hero-subtitle {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
}

/* ── Page Prose ── */
.page-prose-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.page-prose {
  font-size: 1.125rem;
  line-height: 1.85;
  color: #cbd5e1;
}

body:not(.dark-mode) .page-prose {
  color: #334155;
}

.page-prose p {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.page-prose h1,
.page-prose h2,
.page-prose h3,
.page-prose h4 {
  color: #fff;
  font-family: "Outfit", "Inter", sans-serif;
  font-weight: 800;
}

body:not(.dark-mode) .page-prose h1,
body:not(.dark-mode) .page-prose h2,
body:not(.dark-mode) .page-prose h3,
body:not(.dark-mode) .page-prose h4 {
  color: var(--ink);
}

.page-prose h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid transparent;
  border-image: linear-gradient(to bottom, var(--accent), var(--accent-soft)) 1;
  font-size: 1.75rem;
}

.page-prose h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.page-prose ul,
.page-prose ol {
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.page-prose li {
  margin-bottom: 0.75rem;
}

.page-prose a[href^="mailto:"] {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: border-color 0.2s;
}

.page-prose a[href^="mailto:"]:hover {
  border-bottom-color: var(--accent);
}

.page-prose code {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.2rem 0.4rem;
  border-radius: 6px;
  font-size: 0.9em;
}

body:not(.dark-mode) .page-prose code {
  background: var(--bg-alt);
  color: var(--ink);
}

.page-prose ul,
.page-prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.page-prose li {
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.page-prose li::marker {
  color: var(--accent);
}

.page-prose a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}

.page-prose a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.page-prose code {
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: var(--bg-alt);
  font-size: 0.9em;
  color: var(--accent);
}

.page-prose strong {
  color: var(--ink);
}

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

@media (max-width: 768px) {
  .page-prose {
    padding: 1.5rem 1.25rem;
  }
}

.search-shell {
  display: grid;
  gap: 1rem;
}

.search-label {
  font-weight: 700;
  color: var(--ink);
}

.search-input {
  width: 100%;
  min-height: 62px;
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  box-shadow: 0 14px 28px rgba(23, 26, 34, 0.06);
}

.search-meta {
  margin: 0;
  color: var(--muted);
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.search-filters {
  gap: 0.6rem;
}

.search-suggestion {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

.search-suggestion:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--accent-dark);
}

.search-suggestion-button {
  cursor: pointer;
  font: inherit;
}

.search-empty-recs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.search-empty-recs a {
  color: var(--accent-dark);
  font-weight: 700;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose ul {
  padding-left: 1.2rem;
}

.detail-list div {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
}

.credits-card {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.credits-card h2 {
  margin: 0 0 0.75rem;
}

.credits-card a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

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

.faq-item {
  padding: 1rem 1.2rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
}

.faq-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.24);
}

.footer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer p,
.site-footer li {
  color: var(--muted);
}

.footer-bottom {
  padding-top: 1rem;
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero-grid,
  .two-column,
  .game-header,
  .header-row,
  .footer-grid,
  .stage-actions {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-block;
    justify-self: end;
  }

  .site-nav.site-nav-primary {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.75rem;
  }

  .site-nav.site-nav-primary.is-open {
    display: flex;
  }

  .category-toolbar {
    align-items: start;
  }

  .detail-pill-group {
    justify-content: start;
  }

  .playability-panel {
    justify-content: flex-start;
  }

  .category-toolbar-group--filters {
    justify-content: flex-start;
  }

  .game-cover-card {
    max-width: 32rem;
  }

  .brandmark-tagline {
    font-size: 0.72rem;
  }

  .embed-shell {
    padding: 0.6rem;
  }

  .game-frame {
    min-height: 240px;
  }

  .stage-actions {
    gap: 0.75rem;
  }

  .challenge-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .game-header-copy,
  .game-header-side {
    gap: 0.75rem;
  }
}

@media (max-width: 560px) {
  .embed-shell {
    padding: 0.35rem;
  }

  .game-frame {
    min-height: 200px;
  }

  .section.game-stage .container,
  .section.section-tight .container,
  .section .container {
    width: min(100% - 1rem, var(--container));
  }

  .game-stage--immersive .stage-actions {
    top: auto;
    bottom: 12px;
    right: 12px;
  }

  .touch-controls {
    display: block;
  }

  .touch-controls-hint {
    display: block;
  }

  .mobile-play-hint {
    display: block;
  }

  .touch-controls-split {
    grid-template-columns: minmax(0, 1fr) minmax(150px, 1fr);
    align-items: stretch;
  }

  .touch-key {
    min-height: 56px;
  }

  .touch-key-center {
    min-width: 76px;
  }

  .touch-controls-pad--racing {
    width: 100%;
    max-width: 420px;
  }

  .touch-controls-pad--racing .touch-key {
    min-height: 60px;
  }

  .touch-controls-pad--racing .touch-key-center {
    min-width: 0;
  }

  .stage-actions {
    margin-top: 0.75rem;
  }
}


/* Portal Sliders & Tags */
.card-rail {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  -webkit-overflow-scrolling: touch;
}
.card-rail::-webkit-scrollbar {
  height: 6px;
}
.card-rail::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}
.card-rail > * {
  flex: 0 0 calc(50% - 1.5rem);
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .card-rail > * { flex: 0 0 calc(33.333% - 1.5rem); }
}
@media (min-width: 992px) {
  .card-rail > * { flex: 0 0 calc(20% - 1.5rem); }
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  color: var(--foreground);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  font-size: 0.9rem;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.tag-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.tag-count {
  background: var(--background);
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 99px;
  margin-left: 0.5rem;
  opacity: 0.8;
}
body.dark-mode .tag-pill {
  background: rgba(255, 255, 255, 0.05);
}

/* Logo Dark Mode Fix */
body.dark-mode .brandmark-lockup {
  filter: none;
}

body.dark-mode .brandmark-lockup-light {
  display: none;
}

body.dark-mode .brandmark-lockup-dark {
  display: block;
}

/* Epic Hero Banner */
.hero-epic {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    margin-bottom: 4rem;
    margin-top: -71px;
    padding-top: 71px;
    overflow: hidden;
}

.hero-epic-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.72;
    z-index: 0;
}

.hero-epic-overlay {
    position: absolute;
    inset: 0;
    background: 
      linear-gradient(to top, var(--bg) 0%, rgba(255, 255, 255, 0.5) 40%, transparent 100%),
      linear-gradient(to right, var(--bg) 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    z-index: 1;
}

body.dark-mode .hero-epic-overlay {
    background: 
      linear-gradient(to top, var(--bg) 0%, rgba(11, 15, 25, 0.5) 40%, transparent 100%),
      linear-gradient(to right, var(--bg) 0%, rgba(11, 15, 25, 0.4) 50%, transparent 100%);
}

.hero-epic-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.hero-epic-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.epic-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.epic-badge {
  background: var(--accent);
  color: #ffffff;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

.epic-tag {
  color: var(--ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  opacity: 0.8;
}

.epic-title {
  color: var(--ink);
  font-size: clamp(3rem, 5.2vw, 4.8rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 1.2rem 0;
  text-shadow: 0 4px 20px rgba(255, 255, 255, 0.6);
  letter-spacing: 0;
}

body.dark-mode .epic-title {
  text-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.epic-desc {
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1.6;
  opacity: 0.85;
  max-width: 650px;
  margin-bottom: 2.5rem;
}

.button-epic {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff !important;
  font-size: 1.3rem;
  font-weight: 800;
  padding: 1.2rem 3rem;
  border-radius: 99px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(255, 51, 102, 0.4);
}

.button-epic:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 20px 45px rgba(255, 51, 102, 0.6);
}

.epic-arrow {
  transition: transform 0.3s;
}

.button-epic:hover .epic-arrow {
  transform: translateX(6px);
}

/* Typographic Fallback Card */
.card-fallback {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #11141d, #1a202c);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
}

.fallback-title {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 15px rgba(255,255,255,0.1), 0 0 20px rgba(255,255,255,0.05);
  background: linear-gradient(to bottom right, #ffffff, #8ba1ba);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  z-index: 2;
}

.card-fallback::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Language Switcher ── */
.lang-switcher {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: -10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  z-index: 1000;
  width: 280px;
  box-shadow: var(--shadow-hover);
  transform-origin: top right;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lang-dropdown.open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.lang-option .lang-name {
  font-weight: 500;
}

.lang-option .lang-code {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.5;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
}

.lang-option:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.lang-option.lang-active {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
}

.lang-option.lang-active .lang-code {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  opacity: 1;
}


@media (max-width: 991px) {
  .hero-epic-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-bottom: 4rem;
  }
  .hero-epic-content {
    max-width: 100%;
  }
  .hero-epic-overlay {
    background: linear-gradient(to top, var(--bg) 0%, rgba(11, 15, 25, 0.8) 100%);
  }
  .epic-meta {
    justify-content: center;
  }
}

/* Favorites and Badges */
.favorite-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 17, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 10;
}
.favorite-btn:hover {
  background: rgba(15, 17, 25, 0.8);
  transform: scale(1.1);
}
.favorite-btn.active {
  color: var(--accent);
  background: rgba(255, 51, 102, 0.15);
  border-color: rgba(255, 51, 102, 0.3);
}
.favorite-btn.active .heart-icon {
  fill: var(--accent);
}

.mobile-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 17, 25, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 4px 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
}
body:not(.dark-mode) .favorite-btn,
body:not(.dark-mode) .mobile-badge {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}
body:not(.dark-mode) .favorite-btn.active {
  background: rgba(255, 51, 102, 0.1);
}

/* My Favorites Section */
#favorites-section {
  display: none; /* hidden by default, shown by JS */
}

/* ── UGC: Star Rating ── */
.user-rating {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.rating-stars {
  display: flex;
  gap: 2px;
}

.star-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--line);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
}

.star-btn:hover {
  transform: scale(1.2);
}

.star-btn.star--active {
  color: #f59e0b;
}

.rating-value {
  font-weight: 700;
  color: #f59e0b;
  font-size: 1rem;
}

.rating-count {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ── Blog Styles ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: var(--shadow-hover);
}

.blog-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
  overflow: hidden;
}

.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.blog-card:hover .blog-card-cover img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-body h2 {
  font-size: 1.25rem;
  margin: 0.5rem 0;
  color: var(--ink);
  line-height: 1.3;
}

.blog-card-body p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  padding: 2rem 0 4rem;
}

@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}

.blog-article {
  padding: 0;
  max-width: 100%;
}

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.blog-sidebar-card h3 {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  color: var(--ink);
}

.blog-game-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  background: var(--bg-alt);
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  transition: background 0.2s;
}

.blog-game-link:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.blog-game-link img {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.blog-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.blog-related-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  transition: color 0.2s;
}

.blog-related-list a:hover {
  color: var(--accent);
}

/* ── PlayOrbita Daily Banner (V3.2 Tier 2) ── */
.daily-banner {
  margin: 0 auto;
  padding: 2.5rem 0 1.5rem;
}
.daily-banner-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 2.5rem;
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 15%, transparent),
      color-mix(in srgb, #0099ff 10%, transparent)),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.daily-banner-inner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse,
    color-mix(in srgb, var(--accent) 12%, transparent),
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.daily-info,
.daily-thumb {
  position: relative;
  z-index: 1;
}
.daily-info { min-width: 0; }
.daily-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.9rem;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
body.dark-mode .daily-eyebrow {
  color: var(--accent-soft);
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}
.daily-icon { font-size: 1rem; }
.daily-title {
  margin: 0.5rem 0 0.75rem;
  font-family: "Outfit", "Inter", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.daily-challenge {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 38ch;
}
.daily-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  background: color-mix(in srgb, #ff9900 18%, transparent);
  color: #cc6600;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}
body.dark-mode .daily-streak {
  color: #ffaa44;
  background: color-mix(in srgb, #ff9900 28%, transparent);
}
.streak-flame {
  display: inline-block;
  animation: flame-flicker 1.2s ease-in-out infinite alternate;
}
@keyframes flame-flicker {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(1.12); opacity: 0.82; }
}
@media (prefers-reduced-motion: reduce) {
  .streak-flame { animation: none; }
}
.daily-cta {
  display: inline-block;
  font-size: 1.05rem;
  padding: 0.85rem 1.5rem;
}
.daily-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(8, 7, 35, 0.2), rgba(255, 255, 255, 0.16)),
    var(--daily-thumb-image) center / cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease;
}
.daily-thumb::before {
  content: "";
  position: absolute;
  inset: -18px;
  background: var(--daily-thumb-image) center / cover;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.32;
}
.daily-thumb:hover { transform: scale(1.02); }
.daily-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: clamp(0.65rem, 2vw, 1.25rem);
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.2));
}

@media (max-width: 900px) {
  .daily-banner-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .daily-thumb { aspect-ratio: 16 / 9; }
}

@media (max-width: 560px) {
  .hero-epic {
    min-height: 72vh;
    margin-bottom: 2rem;
  }

  .epic-meta {
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .epic-title {
    font-size: clamp(2.35rem, 13vw, 3.5rem);
  }

  .epic-desc {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .button-epic {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  .daily-banner {
    padding: 1.5rem 0 1rem;
  }
  .daily-banner-inner {
    padding: 1.25rem;
  }
  .daily-challenge { font-size: 0.95rem; }
}

/* ── Toast notifications (V3.2 Tier 2) ── */
.toast-host {
  position: fixed;
  top: 80px;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 0.85rem 1.25rem;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 320px;
  font-size: 0.95rem;
}
body.dark-mode .toast {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.toast--visible {
  opacity: 1;
  transform: translateX(0);
}
@media (max-width: 560px) {
  .toast-host {
    top: auto;
    bottom: 80px;
    right: 0.75rem;
    left: 0.75rem;
  }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.2s linear; transform: none; }
}

.daily-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.daily-result-card {
  margin-top: 1rem;
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.daily-result-card[hidden] {
  display: none;
}

.daily-result-score {
  margin: 0.35rem 0;
  font-size: 1.15rem;
}

.daily-result-score strong {
  color: var(--accent);
  font-size: clamp(1.8rem, 6vw, 2.8rem);
}

.daily-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.daily-result-actions .button-primary,
.daily-result-actions .button-secondary {
  min-height: 44px;
}

@media (max-width: 480px) {
  .daily-meta,
  .daily-result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .daily-result-actions .button-primary,
  .daily-result-actions .button-secondary {
    justify-content: center;
    width: 100%;
  }
}

[data-challenge-complete][hidden] {
  display: none !important;
}

/* Header action link + install button (moved from inline styles) */
.action-button-link { text-decoration: none; }
.install-app-btn { display: none; font-weight: bold; }

/* Category rail headers on the home page (moved from inline styles) */
.section-header--rail { margin-top: 2.5rem; margin-bottom: 1rem; }
.rail-title { display: flex; justify-content: space-between; align-items: baseline; }
.rail-see-all { font-size: 1rem; color: var(--accent); text-decoration: none; font-weight: normal; }

/* 404 page */
.error-hero { text-align: center; padding-top: 8rem; padding-bottom: 4rem; }
.error-code { font-size: 8rem; line-height: 1; color: var(--accent); margin-bottom: 1rem; }
.error-lead { max-width: 600px; margin: 0 auto 2rem; }

/* Compact recommended list on category pages */
.starter-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.starter-links li { padding: 0.85rem 1.1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.starter-links a { font-weight: 700; color: var(--accent-dark); text-decoration: none; }
.starter-links a:hover { text-decoration: underline; }
