/* ===================================================================
   PlayPortal — shared game launcher design system
   Reused across every game's generated page (see site/lib/render.js,
   site/build.js, site/dev-server.js). Per-game differences live only
   in games.json (colors + content) — never fork this file per game.
   =================================================================== */

:root{
  --bg:            #0b0d14;
  --bg-elevated:   #12151f;
  --surface:       #161a26;
  --surface-2:     #1d2233;
  --border:        #262c40;

  --text:          #eef0f6;
  --text-dim:      #9aa1b8;
  --text-faint:    #666e88;

  /* per-game accent — injected inline per page from games.json, see render.js */
  --accent:        #6c5ce7;
  --accent-2:      #00e5c9;
  --accent-contrast: #0b0d14;

  --success:       #2ecc71;
  --warn:          #f5b942;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-soft: 0 10px 30px -12px rgba(0,0,0,.55);
  --shadow-glow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 12px 40px -10px color-mix(in srgb, var(--accent) 45%, transparent);

  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.22,1,.36,1);
}

@media (prefers-color-scheme: light){
  :root{
    --bg: #f5f6fb;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef0f8;
    --border: #e1e4f0;
    --text: #14161f;
    --text-dim: #565c73;
    --text-faint: #8a90a6;
    --accent-contrast: #ffffff;
  }
}

*, *::before, *::after{ box-sizing: border-box; }
html{ color-scheme: dark light; scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1,h2,h3{ font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; }
p{ margin: 0 0 1em; color: var(--text-dim); }
a{ color: inherit; text-decoration: none; }
ul,ol{ color: var(--text-dim); }
kbd{
  font: 600 .8em var(--font-body);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: .15em .5em;
  color: var(--text);
}

.skip-link{
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: .75em 1.25em; border-radius: 0 0 8px 0;
}
.skip-link:focus{ left: 0; }

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

/* ---------- reveal-on-scroll ---------- */
.reveal{ opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view{ opacity: 1; transform: translateY(0); }

/* ---------- buttons ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 .9rem var(--font-body);
  padding: .7em 1.1em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover{ transform: translateY(-2px); border-color: var(--accent); }
.btn:active{ transform: translateY(0); }
.btn-icon{ padding: .65em; border-radius: 50%; width: 2.6em; height: 2.6em; }
.btn-icon svg{ width: 18px; height: 18px; }
.btn-outline{ background: transparent; }

/* ===================================================================
   HEADER
   =================================================================== */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
}
.brand{ display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; flex-shrink: 0; }
.brand-logo{
  display: block; width: 34px; height: 34px; border-radius: 9px;
  object-fit: cover;
}
.main-nav{ display: flex; gap: 4px; flex: 1; }
.main-nav a{
  padding: .55em .9em; border-radius: 999px; font-weight: 500; font-size: .92rem; color: var(--text-dim);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.main-nav a:hover{ color: var(--text); background: var(--surface); }
.main-nav a.active{ color: var(--accent-contrast); background: var(--accent); }

.nav-toggle{ display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span{ width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }

@media (max-width: 860px){
  .main-nav{
    position: fixed; inset: 62px 0 auto 0; flex-direction: column; gap: 2px;
    background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    padding: 10px; transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
  }
  .main-nav.open{ transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a{ width: 100%; }
  .nav-toggle{ display: flex; }

  .footer-inner{ grid-template-columns: repeat(2, 1fr); }
  .footer-col-brand{ grid-column: 1 / -1; }
  .footer-logo{ height: 200px; }
}

/* ===================================================================
   STAGE / HERO — where the game lives
   =================================================================== */
.stage-section{ position: relative; overflow: hidden; padding: 40px 24px 20px; }

.stage-blobs{ position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.blob{
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35;
  animation: drift 16s ease-in-out infinite alternate;
}
.blob-a{ width: 420px; height: 420px; left: -120px; top: -160px; background: var(--accent); }
.blob-b{ width: 360px; height: 360px; right: -100px; top: 40px; background: var(--accent-2); animation-delay: -6s; }
@keyframes drift{
  from{ transform: translate(0,0) scale(1); }
  to{ transform: translate(40px, 30px) scale(1.12); }
}
@media (prefers-reduced-motion: reduce){ .blob{ animation: none; } }

.stage-wrap{ position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; }

.stage-meta{
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.stage-heading h1{ font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .25em; }
.stage-tags{ display: flex; flex-wrap: wrap; gap: 8px; }
.tag{
  font-size: .78rem; font-weight: 600; padding: .35em .8em; border-radius: 999px;
  background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border);
}

.stage-actions{ display: flex; gap: 8px; }
#likeBtn.liked{ color: #ff5c7a; border-color: #ff5c7a; }
#likeBtn.liked svg path{ fill: #ff5c7a; }

/* ---------- stage layout: game frame + suggestions sidebar ---------- */
.stage-columns{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: stretch;
}
.stage-columns > *{ min-width: 0; }
@media (max-width: 900px){
  .stage-columns{ grid-template-columns: minmax(0, 1fr); }
}

.suggestions h2{ font-size: 1.05rem; margin-bottom: 12px; }
.suggestions-list{ display: flex; flex-direction: column; gap: 10px; }
.suggestions-list .game-card{ display: flex; align-items: center; gap: 12px; }
.suggestions-list .game-card-thumb{
  width: 64px; height: 64px; aspect-ratio: auto; flex-shrink: 0; border-radius: var(--radius-sm);
  font-size: 1.1rem;
}
.suggestions-list .game-card-body{ padding: 10px 12px 10px 0; }
@media (max-width: 900px){
  .suggestions-list{ flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .suggestions-list .game-card{ flex-direction: column; min-width: 130px; }
  .suggestions-list .game-card-thumb{ width: 100%; aspect-ratio: 4/3; }
  .suggestions-list .game-card-body{ padding: 8px 10px 12px; }
}

/* ---------- game frame ---------- */
.game-frame{
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  width: 100%;
}
.game-frame-inner{
  position: relative;
  min-height: 600px;
  height: 100%;
  width: 100%;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--bg-elevated);
}
.game-frame.is-fullscreen .game-frame-inner{ aspect-ratio: auto; height: 100dvh; }
.game-frame iframe{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .4s var(--ease); }
.game-frame iframe.loaded{ opacity: 1; }

/* Portrait games (e.g. 1080x1920 mobile-first embeds) would be stretched
   by the full-bleed iframe above, so instead pin the iframe to the frame's
   height and let its own aspect ratio set the width, centred, with the
   frame's gradient showing through on either side. */
.game-frame.is-portrait .game-frame-inner{ min-height: min(780px, 82vh); }
.game-frame.is-portrait iframe{
  inset: 0 auto; left: 50%; transform: translateX(-50%);
  width: auto; height: 100%; max-width: 100%; aspect-ratio: 9 / 16;
}

/* poster / click-to-play — generic per-game "badge" driven by game.initial */
.poster{
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  transition: opacity .35s var(--ease), transform .4s var(--ease);
}
.poster.is-hidden{ opacity: 0; transform: scale(1.03); pointer-events: none; }

.poster-art{ position: relative; width: 100%; max-width: 340px; height: 120px; display: flex; align-items: center; justify-content: center; }
.poster-tile{
  position: relative; overflow: hidden;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: #fff;
  width: 110px; height: 110px; border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: float-tile 4s ease-in-out infinite;
}
.poster-tile-image{ position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.poster-tile span{
  position: relative; z-index: 2;
  color: rgba(255,255,255,.7); text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
@keyframes float-tile{
  0%,100%{ transform: translateY(0) rotate(0deg); }
  50%{ transform: translateY(-10px) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce){ .poster-tile{ animation: none; } }

.play-btn{
  position: relative; display: grid; place-items: center;
  width: 84px; height: 84px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: var(--shadow-glow);
  transition: transform .2s var(--ease);
}
.play-btn:hover{ transform: scale(1.06); }
.play-btn:active{ transform: scale(.97); }
.play-btn svg{ width: 30px; height: 30px; margin-left: 4px; }
.play-btn-ring{
  position: absolute; inset: -10px; border-radius: 50%; border: 2px solid var(--accent);
  animation: ring-pulse 2.2s var(--ease) infinite;
}
@keyframes ring-pulse{
  0%{ transform: scale(.85); opacity: .8; }
  100%{ transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce){ .play-btn-ring{ animation: none; display: none; } }

.poster-hint{ margin: 0; font-size: .85rem; color: var(--text-faint); }
/* catalogue entries with no game behind them yet — the poster stays, but
   there is nothing to launch, so no play button is rendered */
.poster-hint-soon{
  font-size: .95rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 999px; padding: .5em 1.2em;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

/* loading state — hidden by default; JS adds .is-visible when Play is
   pressed and removes it once the iframe has loaded. (Do not rely on the
   `hidden` attribute here: an author stylesheet rule like `display:flex`
   always beats the UA's default `[hidden]{display:none}`, so a plain
   `hidden` attribute silently does nothing once this class exists.) */
.loader{
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--text-dim); font-size: .9rem;
  opacity: 0; pointer-events: none;
}
.loader.is-visible{ display: flex; opacity: 1; pointer-events: auto; }
.loader-spinner{
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
.loader-bar{ width: 180px; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.loader-bar span{
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s var(--ease);
}

/* ---------- game carousel ---------- */
@keyframes carousel-spin {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.game-carousel-container{
  max-width: 1400px; margin: 40px auto 0; padding: 0 24px; overflow: hidden;
}
.game-carousel{
  display: flex; gap: 16px; animation: carousel-spin 40s linear infinite;
}
.game-carousel:hover{ animation-play-state: paused; }
.carousel-item{
  flex: 0 0 140px; position: relative; width: 140px; height: 140px;
  border-radius: var(--radius-md); overflow: hidden; text-decoration: none;
  cursor: pointer; transition: transform .2s var(--ease);
}
.carousel-item:hover{ transform: scale(1.05); }
.carousel-item-bg{
  position: absolute; inset: 0; z-index: 0;
}
.carousel-item-image{
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; image-rendering: -webkit-optimize-contrast;
}
.carousel-item-badge{
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 2rem; font-weight: 700; color: rgba(255,255,255,.7);
  font-family: var(--font-display); z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.carousel-item-label{
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 3;
  background: rgba(0,0,0,.7); color: var(--text);
  font-size: .75rem; padding: 6px; text-align: center;
  opacity: 0; transition: opacity .2s var(--ease);
}
.carousel-item:hover .carousel-item-label{ opacity: 1; }

/* ===================================================================
   CONTENT / SEO SECTION
   =================================================================== */
.content-section{ max-width: 1400px; margin: 60px auto 0; padding: 0 24px; }
.content-grid{ display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 50px); }
@media (max-width: 800px){ .content-grid{ grid-template-columns: minmax(0, 1fr); } }

.about h2{ font-size: 1.5rem; }
.about h3{ font-size: 1.1rem; margin-top: 1.4em; }
.howto li{ margin-bottom: .5em; }

.rich-content h2{ margin-top: 0; margin-bottom: .5em; }
.rich-content h3{ margin-bottom: .5em; }
.rich-content p{ line-height: 1.7; margin-bottom: 1em; color: var(--text-dim); }
.rich-content ul{ margin: 0 0 1.2em 1.2em; }
.rich-content li{ margin-bottom: .5em; line-height: 1.6; color: var(--text-dim); }
.rich-content strong{ color: var(--text); }

details{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .9em 1.1em; margin-bottom: 10px;
}
details summary{ cursor: pointer; font-weight: 600; color: var(--text); }
details[open] summary{ margin-bottom: .5em; }
details p{ margin: 0; }

.panel-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px; margin-bottom: 16px;
}
.panel-card h3{ font-size: 1rem; margin-bottom: .8em; }
.meta-list{ margin: 0; display: grid; gap: 10px; }
.meta-list > div{ display: flex; justify-content: space-between; font-size: .88rem; }
.meta-list dt{ color: var(--text-faint); }
.meta-list dd{ margin: 0; font-weight: 600; }
.share-row{ display: flex; flex-wrap: wrap; gap: 8px; }
.share-row .btn{ flex: 1 1 calc(50% - 4px); font-size: .85rem; padding: .6em .5em; }
.share-row .btn.is-copied{ color: var(--success); border-color: var(--success); }

/* ===================================================================
   MORE GAMES GRID
   =================================================================== */
.more-section{ max-width: 1240px; margin: 70px auto 80px; padding: 0 24px; }
.section-heading{ display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-heading h2{ font-size: 1.4rem; margin: 0; }
.all-games-page{ margin-top: 40px; }
.section-heading h1{ font-family: var(--font-display); font-size: 1.8rem; margin: 0; }
.all-games-blurb{
  width: 100%; margin-top: 64px; padding-top: 40px;
  border-top: 1px solid var(--border);
}
.all-games-blurb h2{
  font-family: var(--font-display); font-weight: 700; font-size: 1.9rem;
  color: #fff; margin: 0 0 18px;
}
.all-games-blurb p{
  color: #fff; font-size: 1.15rem; line-height: 1.8; margin-bottom: 16px; max-width: 900px;
}
.all-games-blurb p:last-child{ margin-bottom: 0; }

.game-grid{
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.game-card{
  display: block; border-radius: var(--radius-md); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.game-card:hover{ transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow-soft); }
.game-card-thumb{
  position: relative; aspect-ratio: 4/3; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: #fff;
  overflow: hidden;
}
.game-card-thumb::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.35), transparent 50%);
}
.game-card-thumb span{ position: relative; z-index: 1; transition: transform .3s var(--ease); }
.game-card:hover .game-card-thumb span{ transform: scale(1.1); }
.game-card-image{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }
.game-card-body{ padding: 12px 14px 16px; }
.game-card-title{ font-weight: 600; font-size: .95rem; margin-bottom: 2px; }
.game-card-genre{ font-size: .78rem; color: var(--text-faint); }

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer{ border-top: 1px solid var(--border); padding: 40px 24px 24px; }
.footer-inner{
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 48px;
}
.footer-col{ min-width: 0; }
.footer-logo{ height: 288px; width: auto; max-width: 100%; display: block; }
.footer-col-title{
  display: block; width: 100%; font-family: var(--font-display); font-weight: 700; font-size: 22px;
  color: #fff; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px solid #fff;
}
a.footer-col-title{ transition: color .18s var(--ease); }
a.footer-col-title:hover{ color: var(--accent); }
.footer-links{ list-style: disc; padding: 0 0 0 1.2em; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a{ font-size: .9rem; color: #fff; transition: color .18s var(--ease); }
.footer-links a:hover{ color: var(--accent); }
.footer-col p{ font-size: .9rem; color: #fff; line-height: 1.5; margin: 0 0 10px; }
.footer-email{ margin-top: 4px; }
.footer-email a{ font-size: .9rem; color: #fff; transition: color .18s var(--ease); }
.footer-email a:hover{ color: var(--accent); }
.footer-copy{ width: 100%; max-width: 1240px; text-align: center; font-size: .8rem; margin: 16px auto 0; color: #fff; }

/* ===================================================================
   LEGAL / STATIC CONTENT PAGES (about, contact, dmca, privacy, etc.)
   =================================================================== */
.legal-page{ max-width: 780px; margin: 0 auto; padding: 48px 24px 80px; }
.legal-page .about{ max-width: none; }
.legal-page h1{ font-family: var(--font-display); font-size: 2rem; margin-bottom: 4px; }
.legal-page h2{ font-family: var(--font-display); font-size: 1.2rem; margin-top: 28px; margin-bottom: 8px; }
.legal-page p{ margin-bottom: 12px; line-height: 1.6; }
.legal-page ul{ margin: 0 0 12px 1.2em; }
.legal-page li{ margin-bottom: 6px; line-height: 1.6; }
.legal-page a{ color: var(--accent); }

/* ===================================================================
   MOBILE RESPONSIVE (< 640px)
   =================================================================== */
@media (max-width: 640px){
  :root{ font-size: 14px; }

  .stage-section{ padding: 0; }
  .stage-wrap{ padding: 0 12px; }
  .stage-meta{ padding: 16px 0 12px; }
  .stage-meta h1{ font-size: 1.8rem; margin-bottom: 6px; }
  .stage-meta .tags{ gap: 6px; }
  .stage-meta .tag{ padding: 4px 10px; font-size: .75rem; }

  .stage-columns{ grid-template-columns: 1fr; gap: 16px; }
  .game-frame-inner{ min-height: 360px; }
  /* on a narrow screen a portrait game should be sized by the available
     width, not by a tall min-height that would letterbox it heavily */
  .game-frame.is-portrait .game-frame-inner{ min-height: 0; aspect-ratio: 9 / 16; }

  .suggestions{ order: 2; }
  .suggestions h2{ margin-bottom: 10px; }
  .suggestions-list{ gap: 8px; }
  .suggestions-list .game-card{ gap: 10px; }
  .suggestions-list .game-card-thumb{ width: 48px; height: 48px; font-size: 0.9rem; }
  .suggestions-list .game-card-body{ padding: 8px 10px 8px 0; }
  .suggestions-list .game-card-title{ font-size: .85rem; }
  .suggestions-list .game-card-genre{ font-size: .7rem; }

  .game-carousel-container{ margin: 32px auto 0; padding: 0 12px; }
  .carousel-item{ flex: 0 0 110px; width: 110px; height: 110px; }
  .carousel-item-badge{ font-size: 1.6rem; }
  .carousel-item-label{ font-size: .7rem; padding: 4px; }

  .content-section{ margin-top: 40px; padding: 0 12px; }
  .content-grid{ grid-template-columns: 1fr; gap: 20px; }

  .game-grid{ gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .about h2{ font-size: 1.3rem; }
  .about h3{ font-size: 1rem; }

  .site-footer{ padding: 24px 12px 16px; }
  .footer-inner{ grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-col-brand{ grid-column: 1 / -1; }
  .footer-logo{ height: 140px; }
  .legal-page{ padding: 32px 12px 56px; }
  .all-games-blurb{ margin-top: 40px; padding-top: 24px; }
  .all-games-blurb h2{ font-size: 1.4rem; }
  .all-games-blurb p{ font-size: 1rem; }
}

/* ===================================================================
   VERY SMALL MOBILE (< 380px)
   =================================================================== */
@media (max-width: 380px){
  :root{ font-size: 13px; }

  .stage-wrap{ padding: 0 8px; }
  .stage-meta h1{ font-size: 1.5rem; }

  .game-frame-inner{ min-height: 300px; }

  .suggestions-list .game-card-thumb{ width: 40px; height: 40px; font-size: 0.8rem; }

  .carousel-item{ flex: 0 0 90px; width: 90px; height: 90px; }
  .carousel-item-badge{ font-size: 1.3rem; }

  .content-section{ margin-top: 30px; padding: 0 8px; }
  .game-grid{ grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  .game-card-body{ padding: 8px 10px 12px; }
  .game-card-title{ font-size: .85rem; }
  .game-card-genre{ font-size: .7rem; }
}
