/* ===========================================================
   SahiGames — design tokens
   Display face: Fredoka (rounded, quick, playful — matches
   "sahi" = quick/sharp micro-games). Body face: Inter.
   Accent is fixed brand orange; everything else shifts per theme.
=========================================================== */

/* Fredoka + Inter are loaded as a non-blocking <link> from each page's
   <head> (a preload that swaps to stylesheet on load) instead of @import
   here, since @import forces the browser to fetch and parse it before the
   rest of this file can apply. */

:root,
[data-theme="dark"] {
  --bg: #14171c;
  --bg-raised: #191d23;
  --surface: #1c2129;
  --surface-2: #242a33;
  --border: #2b313b;
  --text: #f2efe8;
  --text-muted: #99a0ab;
  --text-faint: #676e79;
  --accent: #ff9900;
  --accent-ink: #1a1200;
  --accent-soft: rgba(255, 153, 0, 0.14);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  --scrim: rgba(10, 11, 13, 0.6);
  --success: #4caf7d;
  --danger: #e2584f;
}

[data-theme="light"] {
  --bg: #f7f4ee;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0ece2;
  --border: #e4dfd1;
  --text: #201e19;
  --text-muted: #6b6a62;
  --text-faint: #9a988e;
  --accent: #ff9900;
  --accent-ink: #1a1200;
  --accent-soft: rgba(255, 153, 0, 0.12);
  --shadow: 0 12px 28px rgba(60, 50, 30, 0.12);
  --scrim: rgba(30, 26, 18, 0.45);
  --success: #2f8f5c;
  --danger: #c93f36;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
h1, h2, h3, .display {
  font-family: 'Fredoka', 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
a { color: inherit; }
button { font-family: inherit; }
img, svg { display: block; }
/* Branding images (logo, favicon, install banner) aren't meant to be saved —
   this stops the long-press "Save Image" context menu on mobile browsers. */
img { -webkit-touch-callout: none; -webkit-user-drag: none; user-select: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ===========================================================
   App shell
=========================================================== */

#app {
  height: 100vh;   /* fallback for browsers/WebViews without dvh support */
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 1400px;
  margin: 0 auto;
}

.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  display: none;
}
.tab-panel.active { display: block; }
.tab-panel[data-tab="play"].active { display: flex; flex-direction: column; overflow: hidden; }

/* ---------- top brand bar (page chrome, standalone pages) ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.brand-logo-svg path, .brand-logo-svg circle { stroke: var(--accent); fill: var(--accent); }
.brand-logo-svg path[fill="none"] { fill: none; stroke: var(--accent); }
.brand-name {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 19px;
}
.header-links {
  display: flex;
  gap: 18px;
  font-size: 14px;
  color: var(--text-muted);
}
.header-links a { text-decoration: none; }
.header-links a:hover { color: var(--text); }

/* ---------- bottom tab bar (mobile) / rail (desktop) ---------- */

.tab-bar {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg-raised);
  order: 2;
}
.tab-btn {
  flex: 1;
  border: 0;
  background: none;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
}
.tab-btn svg { width: 22px; height: 22px; }
.tab-btn.active { color: var(--accent); }

/* Tab bar stays pinned to the bottom on every screen size, phone
   through desktop — only its max-width and padding grow. */
@media (min-width: 860px) {
  .tab-bar {
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 4px;
  }
  .tab-btn { padding: 10px 4px 11px; font-size: 12.5px; }
}

/* ===========================================================
   Play tab — reel
=========================================================== */

.reel {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
  overflow: hidden;
}
.reel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
}
.reel-slide iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.reel-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  z-index: 3;
}
.reel-loading svg { width: 64px; height: 52px; animation: sg-pulse 1.1s ease-in-out infinite; }
@keyframes sg-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.86); opacity: 0.55; }
}

.reel-dock {
  position: absolute;
  z-index: 7;
  display: flex;
  flex-direction: column;
  gap: 10px;
  right: 14px;
  bottom: 90px;
  touch-action: none;
  transform-origin: bottom right;
}
.dock-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(20, 23, 28, 0.78);
  color: #f2efe8;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  backdrop-filter: blur(6px);
}
.dock-btn.primary { background: var(--accent); color: var(--accent-ink); }
.dock-btn.coffee {
  background: #ffdd00;
  color: #1a1200;
  text-decoration: none;
  animation: coffeePulse 2.4s ease-in-out infinite;
}
.dock-btn.coffee:hover { animation-play-state: paused; filter: brightness(1.06); }
@keyframes coffeePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 221, 0, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(255, 221, 0, 0); }
}
.dock-btn svg { width: 20px; height: 20px; }
.dock-btn.pulse { animation: dockPulse 380ms ease; }
@keyframes dockPulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); box-shadow: 0 0 0 9px rgba(255,153,0,.28); }
  100% { transform: scale(1); }
}

.swipe-flash {
  position: absolute; left: 0; right: 0; height: 110px;
  pointer-events: none; z-index: 8; opacity: 0;
  transition: opacity 220ms ease;
}
.swipe-flash.top { top: 0; background: linear-gradient(to bottom, rgba(255,153,0,.32), transparent); }
.swipe-flash.bottom { bottom: 0; background: linear-gradient(to top, rgba(255,153,0,.32), transparent); }
.swipe-flash.show { opacity: 1; }
.dock-handle { cursor: grab; opacity: 0.55; font-size: 11px; text-align: center; color: #cfd3d9; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, transform 200ms;
  z-index: 50;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 78px;
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 55;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.install-banner.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.install-banner-icon { border-radius: 12px; flex-shrink: 0; }
.install-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-banner-text strong { font-size: 13.5px; font-family: 'Fredoka', sans-serif; font-weight: 600; }
.install-banner-text span { font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.install-banner-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.install-banner-btn {
  border: 0; border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  background: var(--surface-2); color: var(--text); padding: 8px 10px;
}
.install-banner-btn.primary { background: var(--accent); color: var(--accent-ink); padding: 8px 14px; }

/* how-to-play sheet */
.sheet-scrim {
  position: fixed; inset: 0; background: var(--scrim);
  z-index: 40; opacity: 0; pointer-events: none; transition: opacity 200ms;
}
.sheet-scrim.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--bg-raised);
  border-radius: 18px 18px 0 0;
  padding: 20px 22px 26px;
  max-width: 560px; margin: 0 auto;
  transform: translateY(100%);
  transition: transform 240ms cubic-bezier(.2,.8,.2,1);
  z-index: 41;
  max-height: 70vh;
  overflow-y: auto;
}
.sheet.show { transform: translateY(0); }
.sheet h3 { font-size: 18px; margin-bottom: 4px; }
.sheet .sheet-cat { color: var(--accent); font-size: 12.5px; margin-bottom: 14px; }
.sheet ol { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sheet ol li { font-size: 14.5px; line-height: 1.4; }
.sheet-close {
  position: absolute; top: 14px; right: 16px;
  background: var(--surface-2); border: 0; border-radius: 50%;
  width: 30px; height: 30px; color: var(--text-muted); cursor: pointer;
}

/* share sheet */
.share-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
  margin-top: 8px;
}
.share-opt {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: 0; cursor: pointer; color: var(--text);
  font-size: 11.5px; padding: 2px 0;
}
.share-opt .ico {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 23px; color: #fff;
}
.share-preview {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; font-size: 13px;
  color: var(--text-muted); line-height: 1.5; margin-bottom: 4px;
}

/* ===========================================================
   Explore tab
=========================================================== */

.tab-inner { padding: 18px 20px 90px; }
@media (min-width: 860px) { .tab-inner { padding: 28px 32px; } }

.tab-title { font-size: 22px; margin-bottom: 4px; }
.tab-sub { color: var(--text-muted); font-size: 13.5px; margin-bottom: 18px; }

.search-row {
  display: flex; gap: 10px; margin-bottom: 14px;
}
.search-input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14.5px;
}
.search-input::placeholder { color: var(--text-faint); }

.chip-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px;
}
.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  position: relative;
}
.game-card-link { display: block; color: inherit; text-decoration: none; }
.game-card.hidden-extra { display: none; }
.hidden-extra { display: none !important; }
.game-card .cat { color: var(--accent); font-size: 11.5px; margin-bottom: 6px; }
.game-card h4 { font-size: 15.5px; margin-bottom: 5px; font-family: 'Fredoka', sans-serif; font-weight: 600; }
.game-card p { color: var(--text-muted); font-size: 12.5px; line-height: 1.4; margin: 0; }
.game-card .played-dot {
  position: absolute; top: 12px; right: 12px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
}
.empty-state { color: var(--text-muted); font-size: 14px; padding: 40px 0; text-align: center; }
.suggested-label { margin-top: 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }

/* Explore: curated sections, show-more, blog, faq */
.explore-section { margin-bottom: 26px; }
.section-heading { font-size: 15px; font-family: 'Fredoka', sans-serif; color: var(--text); margin: 0 0 12px; }
.show-more-btn {
  display: block; margin: 12px auto 0; background: none; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12.5px; font-weight: 600; padding: 8px 18px;
  border-radius: 999px; cursor: pointer;
}
.show-more-btn:hover { border-color: var(--accent); color: var(--accent); }

.explore-blog, .explore-faq { margin-bottom: 28px; }
.blog-list { display: flex; flex-direction: column; gap: 10px; }
.blog-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px;
}
.blog-item summary { cursor: pointer; list-style: none; }
.blog-item summary::-webkit-details-marker { display: none; }
.blog-item summary::after {
  content: 'Read article +'; display: inline-block; margin-top: 8px;
  color: var(--accent); font-size: 12px; font-weight: 700;
}
.blog-item[open] summary::after { content: 'Show less −'; }
.blog-item[open] summary { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.blog-full { padding-top: 2px; }
.blog-full .blog-lede { font-size: 13.5px; color: var(--text); line-height: 1.65; margin: 0 0 12px; }
.blog-play-btn { display: inline-flex; margin-bottom: 18px; }
.blog-full h4 { font-size: 15px; font-family: 'Fredoka', sans-serif; font-weight: 600; color: var(--text); margin: 22px 0 8px; }
.blog-full h4:first-of-type { margin-top: 0; }
.blog-full p { font-size: 13.5px; line-height: 1.65; color: var(--text-muted); margin: 0 0 12px; }
.blog-full ul { padding-left: 18px; margin: 0 0 12px; }
.blog-full li { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; margin-bottom: 6px; }
.blog-item.hidden-extra { display: none; }
.blog-date { font-size: 11px; color: var(--text-faint); margin-bottom: 4px; }
.blog-title { font-size: 14px; font-family: 'Fredoka', sans-serif; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.blog-excerpt { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; margin-bottom: 10px;
}
.faq-item.hidden-extra { display: none; }
.faq-q { font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; list-style: none; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::before { content: '+ '; color: var(--accent); font-weight: 800; }
.faq-item[open] .faq-q::before { content: '– '; }
.faq-a { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin: 8px 0 0; }

.seo-context-block { font-size: 11px; color: var(--text-faint); line-height: 1.6; padding-top: 6px; border-top: 1px solid var(--border); }
/* Standard "screen-reader-only" pattern: content stays in the layout (not
   display:none) so assistive tech and crawlers read it normally, but it
   takes up no visible space and is invisible to sighted users. This is the
   accessibility-first way to give the Play tab a real H1 without adding any
   text to the reel UI. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===========================================================
   Stats tab
=========================================================== */

.bento-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px; margin-bottom: 16px;
}

/* Quick stats */
.qs-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.qs-item { text-align: center; }
.qs-icon {
  width: 34px; height: 34px; margin: 0 auto 6px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.qs-icon svg { width: 18px; height: 18px; }
.qs-val { font-family: 'Fredoka', sans-serif; font-size: 20px; color: var(--text); }
.qs-lbl { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.week-tracker { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 16px; }
.week-day { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.week-day-label { font-size: 9.5px; color: var(--text-faint); text-transform: uppercase; }
.week-day-dot {
  width: 100%; aspect-ratio: 1; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
}
.week-day-dot.active { background: var(--accent); border-color: var(--accent); }
.week-day.is-today .week-day-label { color: var(--accent); font-weight: 700; }

.xp-progress-wrap { }
.xp-progress-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); margin-bottom: 6px; }
.xp-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.xp-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #ffcf85); width: 0%; transition: width 700ms cubic-bezier(.2,.8,.2,1); }

.chart-title { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 10px; }
.chart-sort-tabs { margin-bottom: 14px; }
.stats-chart { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.chart-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 15px;
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer; transition: border-color 150ms, transform 150ms;
}
.chart-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.chart-row:active { transform: translateY(0); }
.chart-row-body { flex: 1; min-width: 0; }
.chart-rank-badge {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-muted);
}
.chart-rank-badge.medal-1, .chart-rank-badge.medal-2, .chart-rank-badge.medal-3 { font-size: 15px; }
.chart-rank-badge.medal-1 { background: linear-gradient(135deg, #ffe27a, #ffb300); }
.chart-rank-badge.medal-2 { background: linear-gradient(135deg, #eef1f5, #b9c1cc); }
.chart-rank-badge.medal-3 { background: linear-gradient(135deg, #e8b98a, #b5651d); }
.chart-row-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; gap: 10px; flex-wrap: wrap; }
.chart-row-name { font-size: 14.5px; font-weight: 500; }
.chart-row-name .cat { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.cat-chip {
  display: inline-block; font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px;
  border: 1px solid; vertical-align: middle;
}
.chart-row-meta { font-size: 12px; color: var(--text-muted); text-align: right; white-space: nowrap; }
.chart-row-meta b { color: var(--accent); font-size: 13.5px; }
.chart-bar-track {
  background: var(--surface-2); border-radius: 999px; height: 9px; overflow: hidden;
}
.chart-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ffb84d);
  width: 0%;
  transition: width 600ms cubic-bezier(.2,.8,.2,1);
}
.chart-row.rank-1 { border-color: rgba(255, 215, 0, 0.45); background: linear-gradient(135deg, rgba(255, 215, 0, 0.10), var(--surface) 60%); }
.chart-row.rank-2 { border-color: rgba(192, 200, 212, 0.5); background: linear-gradient(135deg, rgba(192, 200, 212, 0.12), var(--surface) 60%); }
.chart-row.rank-3 { border-color: rgba(205, 127, 50, 0.45); background: linear-gradient(135deg, rgba(205, 127, 50, 0.12), var(--surface) 60%); }
.chart-row.rank-1 .chart-bar-fill { background: linear-gradient(90deg, var(--accent), #ffcf85); }

/* ===========================================================
   Settings tab
=========================================================== */

.settings-group { margin-bottom: 26px; }
.settings-group h3 {
  font-size: 12.5px; text-transform: none; color: var(--text-muted);
  margin-bottom: 10px; font-family: 'Inter', sans-serif; font-weight: 600;
}
.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 16px; margin-bottom: 8px;
}
.setting-row .txt strong { display: block; font-size: 14px; font-weight: 500; }
.setting-row .txt span { font-size: 12px; color: var(--text-muted); }

.switch {
  width: 42px; height: 24px; border-radius: 999px;
  background: var(--border); position: relative; border: 0; cursor: pointer; flex-shrink: 0;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform 160ms;
}
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(18px); }

.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.seg button {
  border: 0; background: none; padding: 7px 14px; border-radius: 8px;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
}
.seg button.active { background: var(--accent); color: var(--accent-ink); }

.range-row input[type="range"] {
  width: 100%; accent-color: var(--accent); margin-top: 8px;
}
.range-val { font-size: 12.5px; color: var(--accent); font-weight: 600; }

.btn-secondary {
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); padding: 9px 14px; border-radius: 10px;
  font-size: 13px; cursor: pointer;
}

/* ===========================================================
   Standalone pages (privacy, terms, about, contact, game landing)
=========================================================== */

.page-main { max-width: 760px; margin: 0 auto; padding: 40px 22px 80px; }
.breadcrumb-nav { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb-nav a { color: var(--text-muted); text-decoration: none; }
.breadcrumb-nav a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumb-nav span { color: var(--text); }
.page-main h1 { font-size: 28px; margin-bottom: 10px; }
.page-main .lede { color: var(--text-muted); font-size: 15.5px; margin-bottom: 30px; line-height: 1.55; }
.page-main h2 { font-size: 18px; margin: 30px 0 10px; }
.page-main p { line-height: 1.65; font-size: 15px; color: var(--text); margin: 0 0 14px; }
.page-main ul { line-height: 1.65; font-size: 15px; padding-left: 20px; }
.page-main li { margin-bottom: 6px; }

.callout {
  background: var(--accent-soft);
  border: 1px solid rgba(255,153,0,0.35);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
}
.site-footer a { color: var(--text-muted); text-decoration: none; margin: 0 8px; }

.social-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}
.social-links a:hover, .social-links a:focus-visible {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.social-links svg { width: 18px; height: 18px; fill: currentColor; }
.social-links.social-links-settings {
  justify-content: flex-start;
  margin: 4px 0 0;
}

/* game landing page */
.game-landing-hero {
  aspect-ratio: 9 / 14;
  max-height: 78vh;
  margin: 0 auto 22px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  position: relative;
}
.game-landing-hero iframe { width: 100%; height: 100%; border: 0; }
.game-landing-actions { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.btn-accent {
  background: var(--accent); color: var(--accent-ink); border: 0;
  padding: 11px 18px; border-radius: 11px; font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}

.contact-form { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.contact-form input, .contact-form textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font-family: inherit; font-size: 14px;
}
.contact-form textarea { min-height: 120px; resize: vertical; }

/* Related games grid (game landing pages) */
.related-games-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 26px;
}
.related-game-card {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; text-decoration: none; transition: border-color .15s ease;
}
.related-game-card:hover { border-color: var(--accent); }
.related-game-title { color: var(--text); font-weight: 600; font-size: 14px; }
.related-game-cat { color: var(--text-muted); font-size: 12px; }

/* FAQ accordion (game landing pages) */
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 26px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text);
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; color: var(--accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin-top: 8px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
