/* ==================================================================
   MiloPlays — shared styles (all pages)
   "Sky world": bright brand-blue sky bands, mist content bands with
   white cards, and a navy "ground" footer. Everything tactile shares
   one ledge (solid bottom shadow) so buttons, cards and pills feel
   like the same set of toys.
   Palette from brand_assets/MiloPlays-colorpalette.png; navy/ledge
   tones are darker shades of the brand blue.
================================================================== */
:root {
  --blue:   #4386c4;  /* brand: Background */
  --fg:     #fcfcfc;  /* brand: Foreground */
  --mist:   #dde8f3;  /* brand: Accent 1 */
  --sky:    #bed5e9;  /* brand: Accent 2 */
  --steel:  #a0c1e0;  /* brand: Accent 3 */

  --ink:        #12304f;  /* text on light */
  --ink-soft:   #45627f;  /* secondary text on light */
  --ground:     #081a2d;  /* footer */
  --blue-ledge: #2b5f91;
  --yt:         #e5001c;  /* YouTube red — Subscribe only */
  --yt-ledge:   #8f0012;

  --sky-grad: linear-gradient(to bottom, #4386c4 0%, #6a9fd0 55%, #a0c1e0 100%);
  --shadow-card: 0 6px 0 var(--sky), 0 20px 36px -18px rgba(18,48,79,0.35);
  --shadow-pop:  0 6px 0 rgba(18,48,79,0.25), 0 24px 40px -16px rgba(8,26,45,0.45);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* aliases used by older inline page styles */
  --navy-0: #081a2d; --navy-1: #0c2239; --navy-2: #12304f;
  --line: rgba(18,48,79,0.12); --line-hi: rgba(18,48,79,0.22);
}

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Fira Sans Condensed', system-ui, sans-serif;
  background: var(--mist);
  color: var(--ink);
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
html.menu-open { overflow: hidden; }

.font-display { font-family: 'Fredoka One', 'Fira Sans Condensed', sans-serif; font-weight: 400; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  padding: 8px 16px; border-radius: 999px;
  background: var(--fg); color: var(--ink); font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ── Bands ─────────────────────────────────────────────── */
.band-sky  { position: relative; overflow-x: clip; background: var(--sky-grad); color: var(--fg); }
.band-mist { position: relative; overflow-x: clip; background: var(--mist); color: var(--ink); }
.band-pad  { padding: 64px 0 112px; }
@media (min-width: 640px) { .band-pad { padding: 96px 0 144px; } }
.band-inner { position: relative; z-index: 3; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .band-inner { padding: 0 24px; } }

/* Wave divider: sits at the bottom of a band, filled with the NEXT band's colour */
.wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; pointer-events: none; line-height: 0; }
.wave svg { display: block; width: 100%; height: clamp(48px, 7vw, 96px); }
.wave.hills svg { height: clamp(96px, 14vw, 180px); }

/* Grain texture (SVG noise), very light on the sky */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}

/* Clouds */
.cloud {
  position: absolute; z-index: 0; pointer-events: none;
  width: var(--w); aspect-ratio: 3 / 1;
  background: var(--fg); opacity: var(--o, 0.5); border-radius: 999px;
  animation: drift var(--d, 80s) linear infinite;
}
.cloud::before, .cloud::after { content: ''; position: absolute; background: inherit; border-radius: 999px; }
.cloud::before { width: 46%; aspect-ratio: 1; left: 16%; bottom: 30%; }
.cloud::after  { width: 34%; aspect-ratio: 1; left: 50%; bottom: 40%; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(130vw); } }

/* ── Headings ─────────────────────────────────────────── */
.h-section {
  margin: 0;
  font-family: 'Fredoka One', sans-serif; font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.25rem); line-height: 1.05;
  color: var(--ink);
}
.band-sky .h-section, .h-sticker { color: var(--fg); text-shadow: 0 4px 0 var(--ink), 0 12px 24px rgba(8,26,45,0.25); }
.h-sub { margin: 12px 0 0; font-size: 1.15rem; line-height: 1.5; color: var(--ink-soft); max-width: 36rem; }
.band-sky .h-sub { color: var(--fg); text-shadow: 0 1px 2px rgba(18,48,79,0.35); }
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; margin-bottom: 40px; }
@media (min-width: 640px) { .section-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.section-head.center { align-items: center; text-align: center; justify-content: center; }
.section-head.center .h-sub { margin-left: auto; margin-right: auto; }

/* ── Buttons: one tactile system ──────────────────────── */
.btn {
  --ledge: var(--steel);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px;
  border: 0; border-radius: 999px;
  font-family: 'Fredoka One', sans-serif; font-size: 1.05rem; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  box-shadow: 0 4px 0 var(--ledge), 0 14px 24px -12px rgba(8,26,45,0.45);
  transition: transform 0.18s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ledge); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-yt    { --ledge: var(--yt-ledge);   background: var(--yt);   color: #fff; }
.btn-blue  { --ledge: var(--blue-ledge); background: var(--blue); color: var(--fg); }
.btn-cloud { --ledge: var(--steel);      background: var(--fg);   color: var(--ink); }
.btn-navy  { --ledge: var(--ground);     background: var(--ink);  color: var(--fg); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 0.95rem; box-shadow: 0 3px 0 var(--ledge), 0 10px 18px -10px rgba(8,26,45,0.4); }
.btn-sm:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ledge); }
.band-sky .btn:focus-visible { outline-color: var(--fg); }

/* ==================================================================
   NAV — Tubelight tabs, ported from 21st.dev "Tubelight Navbar"
   (ayushmxxn, #1432). A white tab pill with a sliding "lamp": a mist
   highlight with a small glowing blue tube on top. Tabs are equal
   width, so the lamp only ever translates (transform-only motion).
   Desktop: tabs sit centered in the top bar; Games opens a dropdown.
   Mobile: tabs become a bottom tab bar; Games opens a bottom sheet.
================================================================== */
.nav-shell { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; padding: 0 12px; pointer-events: none; --tab-w: 116px; }
.nav-pill {
  pointer-events: auto; position: relative;
  max-width: 1080px; margin: 0 auto; height: 64px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 8px 0 18px; border-radius: 999px;
  color: var(--fg);
}
.nav-pill::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(252,252,252,0.94);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 4px 0 var(--sky), 0 18px 36px -18px rgba(18,48,79,0.45);
  opacity: 0; transition: opacity 0.3s ease;
}
.nav-shell.scrolled .nav-pill::before { opacity: 1; }
.nav-shell.scrolled .nav-pill { color: var(--ink); }
.nav-shell:not(.scrolled) .nav-logo { text-shadow: 0 2px 0 rgba(18,48,79,0.35); }

.nav-logo {
  justify-self: start;
  display: flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; border-radius: 999px;
  font-family: 'Fredoka One', sans-serif; font-size: 1.3rem; line-height: 1;
  transition: opacity 0.2s ease;
}
.nav-logo-mark {
  width: 30px; height: 30px; flex-shrink: 0; background: currentColor;
  -webkit-mask: url('/brand_assets/MiloPlays-icon-gamepad.png') center / 160% no-repeat;
          mask: url('/brand_assets/MiloPlays-icon-gamepad.png') center / 160% no-repeat;
}
.nav-shell:not(.scrolled) .nav-logo-mark { filter: drop-shadow(0 2px 0 rgba(18,48,79,0.35)); }
.nav-logo:hover { opacity: 0.85; }
.nav-logo:active { opacity: 0.7; }
.nav-logo:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }

/* The tab pill */
.tube {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: repeat(3, var(--tab-w));
  padding: 4px; border-radius: 999px;
  background: var(--fg); box-shadow: 0 4px 0 var(--steel), 0 14px 28px -14px rgba(8,26,45,0.45);
}
.nav-shell.scrolled .tube { background: var(--mist); box-shadow: none; }
.tube-tab {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 10px; border: 0; border-radius: 999px;
  background: none; cursor: pointer; text-decoration: none; white-space: nowrap;
  font-family: 'Fredoka One', sans-serif; font-size: 1.02rem; line-height: 1;
  color: var(--ink-soft);
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tube-tab svg { flex-shrink: 0; transition: transform 0.25s var(--ease-spring); }
.tube-tab:hover, .tube-tab.is-lit { color: var(--ink); }
.tube-tab.is-lit > svg:first-child { color: var(--blue); }
.tube-tab:hover > svg:first-child { transform: translateY(-1px) rotate(-6deg); }
.tube-tab:active > svg:first-child { transform: scale(0.9); }
.tube-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.tube-tab .chev { margin-left: -2px; transition: transform 0.25s var(--ease-out); }
.tube-tab[aria-expanded="true"] .chev { transform: rotate(180deg); }

/* The lamp */
.tube-lamp {
  position: absolute; z-index: 0; top: 4px; left: 4px;
  width: var(--tab-w); height: 44px; border-radius: 999px;
  background: var(--mist);
  transform: translateX(calc(var(--tab-w) * var(--lamp, 0)));
  opacity: 0;
  transition: transform 0.45s var(--ease-spring), opacity 0.2s ease;
  pointer-events: none;
}
.nav-shell.scrolled .tube-lamp { background: var(--fg); }
.tube.has-lamp .tube-lamp { opacity: 1; }
.tube-lamp i {
  position: absolute; left: 50%; top: -4px;
  width: 32px; height: 4px; margin-left: -16px; border-radius: 4px 4px 0 0;
  background: var(--blue);
  box-shadow: 0 0 10px 3px rgba(67,134,196,0.45), 0 6px 14px 2px rgba(67,134,196,0.25);
}

/* Games panel: dropdown on desktop */
.nav-backdrop { display: none; }
.nav-panel {
  pointer-events: auto;
  position: absolute; left: 12px; right: 12px; top: calc(100% + 12px);
  max-width: 1080px; margin: 0 auto;
  padding: 16px; border-radius: 28px;
  background: var(--fg); color: var(--ink);
  box-shadow: 0 6px 0 var(--sky), 0 30px 60px -24px rgba(18,48,79,0.5);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px) scale(0.985); transform-origin: top center;
  transition: opacity 0.22s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.nav-shell.dd-open .nav-panel { opacity: 1; visibility: visible; transform: none; transition: opacity 0.22s ease, transform 0.35s var(--ease-spring), visibility 0s; }
.nav-panel-head { display: flex; align-items: center; gap: 12px; padding: 4px 8px 12px; }
.nav-panel-title { margin: 0 auto 0 0; font-family: 'Fredoka One', sans-serif; font-size: 1.15rem; color: var(--ink); }
.nav-panel-close {
  display: none; width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--ink); background: var(--mist); box-shadow: 0 3px 0 var(--sky);
  transition: transform 0.18s var(--ease-spring);
}
.nav-panel-close:hover { transform: translateY(-1px); }
.nav-panel-close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sky); }
.nav-panel-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nav-panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.g-tile {
  position: relative; isolation: isolate;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px 8px 8px; border-radius: 18px;
  color: var(--ink); text-decoration: none;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 30ms);
}
.nav-shell.dd-open .g-tile { opacity: 1; transform: none; }
.g-tile::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--mist); opacity: 0; transition: opacity 0.2s ease; }
.g-tile:hover::before, .g-tile[aria-current="page"]::before { opacity: 1; }
.g-tile:active { transform: scale(0.98); }
.g-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.g-tile-img { position: relative; flex-shrink: 0; width: 88px; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; background: var(--sky); box-shadow: 0 3px 0 var(--sky); }
.g-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease-out); }
.g-tile:hover .g-tile-img img { transform: scale(1.08); }
.g-tile-text { min-width: 0; flex: 1; }
.g-tile-name { display: block; font-family: 'Fredoka One', sans-serif; font-size: 1rem; line-height: 1.15; }
.g-tile-meta { display: block; margin-top: 2px; font-size: 0.85rem; color: var(--ink-soft); }
.g-tile .arrow { color: var(--blue); opacity: 0; transform: translateX(-4px); transition: opacity 0.2s ease, transform 0.25s var(--ease-out); }
.g-tile:hover .arrow { opacity: 1; transform: none; }

/* Rolling text swap (kept for any .roll usage) */
.roll { position: relative; display: inline-block; overflow: hidden; line-height: 1.2; height: 1.2em; }
.roll > span { display: block; transition: transform 0.35s var(--ease-out); }
.roll > span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; }

/* ── Mobile: bottom tab bar + bottom sheet ─────────────── */
@media (max-width: 899px) {
  .nav-shell { --tube-w: min(360px, calc(100vw - 24px)); --tab-w: calc((var(--tube-w) - 8px) / 3); }
  .nav-pill { grid-template-columns: 1fr auto; height: 56px; padding: 0 6px 0 16px; }
  .tube {
    pointer-events: auto;
    position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
    width: var(--tube-w); margin-left: calc(var(--tube-w) / -2);
    background: var(--fg) !important;
    box-shadow: 0 4px 0 var(--steel), 0 18px 36px -12px rgba(8,26,45,0.5) !important;
  }
  .tube-tab { flex-direction: column; gap: 3px; height: 56px; padding: 0; font-size: 0.82rem; }
  .tube-tab svg:first-child { width: 22px; height: 22px; }
  .tube-tab .chev { display: none; }
  .tube-lamp { height: 56px; background: var(--mist) !important; }
  .tube-lamp i { top: auto; bottom: -4px; border-radius: 0 0 4px 4px; }

  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 40; pointer-events: none;
    background: rgba(18,48,79,0.45);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; transition: opacity 0.25s ease;
  }
  .nav-shell.dd-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .nav-panel {
    position: fixed; z-index: 55; top: auto; left: 12px; right: 12px;
    bottom: calc(12px + 56px + 8px + 20px + env(safe-area-inset-bottom, 0px));
    max-height: calc(100svh - 190px); overflow-y: auto;
    padding: 12px;
    transform: translateY(16px) scale(0.98); transform-origin: bottom center;
  }
  .nav-panel-head { padding: 4px 4px 8px 8px; }
  .nav-panel-all { display: none; }
  .nav-panel-close { display: inline-flex; }
  .nav-panel-grid { grid-template-columns: 1fr; gap: 4px; }
  .site-foot { padding-bottom: 96px; }
  html.sheet-open { overflow: hidden; }
}
@media (max-width: 380px) { .nav-logo-text { display: none; } }

/* Section entrance — intentionally static; the hero is the one motion moment */
.reveal { }

/* ── Video cards ──────────────────────────────────────── */
.vcard {
  position: relative; display: flex; flex-direction: column; text-align: left;
  padding: 8px 8px 16px; border-radius: 24px;
  background: var(--fg); box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease-out);
}
.vcard:hover { transform: translateY(-4px); }
.vcard-glow { display: none; }
.embed-wrap { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: var(--sky); cursor: pointer; }
.embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-wrap .thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.vcard:hover .thumb { transform: scale(1.04); }
.embed-wrap .shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(8,26,45,0.3), transparent 45%); }
.play-btn { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.play-btn span {
  width: 60px; height: 60px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); box-shadow: 0 4px 0 var(--blue-ledge), 0 12px 24px -8px rgba(8,26,45,0.6);
  transition: transform 0.25s var(--ease-spring);
}
.play-btn svg { margin-left: 3px; }
.vcard:hover .play-btn span { transform: scale(1.1); }
.embed-wrap:active .play-btn span { transform: scale(0.95); }
.embed-wrap:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.vcard-title {
  margin: 14px 8px 0; color: var(--ink);
  font-size: 1.1rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vcard-meta { margin: 4px 8px 0; font-size: 0.9rem; color: var(--ink-soft); }
.vcard.featured { padding: 10px 10px 20px; border-radius: 28px; }
.vcard.featured .vcard-title { font-family: 'Fredoka One', sans-serif; font-weight: 400; font-size: clamp(1.25rem, 2.4vw, 1.75rem); margin-top: 18px; }
.vcard.featured .play-btn span { width: 80px; height: 80px; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  padding: 6px 12px; border-radius: 999px;
  font-family: 'Fredoka One', sans-serif; font-size: 0.9rem; line-height: 1;
  color: var(--ink); background: var(--fg); box-shadow: 0 3px 0 var(--steel);
}
.badge-dark { color: var(--fg); background: var(--ink); box-shadow: 0 3px 0 var(--ground); }
.skeleton { background: linear-gradient(100deg, var(--sky) 30%, var(--mist) 50%, var(--sky) 70%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) { .skeleton { animation: shimmer 1.6s linear infinite; } }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ==================================================================
   GAME PAGES
================================================================== */
.g-hero { overflow: hidden; padding: 120px 0 150px; }
@media (min-width: 1024px) { .g-hero { padding: 152px 0 184px; } }
.g-title {
  margin: 0; color: var(--fg);
  font-family: 'Fredoka One', sans-serif; font-weight: 400;
  font-size: clamp(2.6rem, 8vw, 5rem); line-height: 1;
  text-shadow: 0 5px 0 var(--ink), 0 16px 32px rgba(8,26,45,0.3);
}
.g-desc { margin: 20px 0 0; max-width: 34rem; font-size: 1.2rem; line-height: 1.5; color: var(--fg); text-shadow: 0 1px 2px rgba(18,48,79,0.4); }
.g-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.g-stat {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font-size: 0.95rem; color: var(--ink-soft);
  background: var(--fg); box-shadow: 0 3px 0 var(--steel);
}
.g-stat b { font-family: 'Fredoka One', sans-serif; font-weight: 400; color: var(--ink); font-size: 1.05rem; }
.g-cover {
  position: relative; aspect-ratio: 16 / 9;
  padding: 10px; border-radius: 28px; background: var(--fg);
  box-shadow: var(--shadow-pop);
  transform: rotate(2.5deg);
  transition: transform 0.4s var(--ease-spring);
}
.g-cover:hover { transform: rotate(0deg) scale(1.02); }
.g-cover img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 20px; }

/* About the game */
.g-about { margin: 16px 0 0; max-width: 36rem; font-size: 1.15rem; line-height: 1.65; color: var(--ink-soft); }
.g-chips, .g-plats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.g-chips { margin-top: 24px; }
.g-chips li { padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--ink); background: var(--fg); box-shadow: 0 3px 0 var(--steel); }
.g-facts { border-radius: 28px; background: var(--fg); box-shadow: var(--shadow-card); overflow: hidden; }
.g-facts-head { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--sky-grad); }
.g-facts-head img { width: 96px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 3px solid var(--fg); flex-shrink: 0; }
.g-facts-head > div { flex: 1; min-width: 0; }
.g-facts-name { margin: 0; color: var(--fg); font-size: 1.3rem; line-height: 1.1; text-shadow: 0 2px 0 var(--ink); }
.g-facts-sub { margin: 4px 0 0; font-size: 0.95rem; color: var(--fg); text-shadow: 0 1px 2px rgba(18,48,79,0.4); }
.g-rating {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 54px; height: 62px; border-radius: 12px;
  background: var(--fg); color: var(--ink);
  font-family: 'Fredoka One', sans-serif; font-size: 1.05rem; line-height: 1;
  box-shadow: 0 3px 0 var(--ink);
}
.g-rating small { font-family: 'Fira Sans Condensed', sans-serif; font-weight: 600; font-size: 0.7rem; margin-bottom: 4px; color: var(--ink-soft); }
.g-facts dl { margin: 0; padding: 8px 20px 16px; }
.g-facts dl > div { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; padding: 12px 0; border-bottom: 2px dashed var(--mist); }
.g-facts dl > div:last-child { border-bottom: 0; }
.g-facts dt { font-weight: 600; font-size: 0.95rem; color: var(--ink-soft); padding-top: 1px; }
.g-facts dd { margin: 0; color: var(--ink); font-size: 1.05rem; line-height: 1.4; }
.g-plats { gap: 6px; }
.g-plats li { padding: 3px 10px; border-radius: 8px; font-size: 0.9rem; background: var(--mist); color: var(--ink); }
@media (max-width: 400px) { .g-facts dl > div { grid-template-columns: 1fr; gap: 4px; } }

/* More games rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 20px; margin: 0 -4px; scrollbar-width: thin; scrollbar-color: var(--fg) transparent; }
@media (min-width: 1024px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; } }
.rail-card {
  scroll-snap-align: start; display: block;
  padding: 8px 8px 14px; border-radius: 22px;
  background: var(--fg); color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-pop);
  transition: transform 0.25s var(--ease-spring);
}
.rail-card:hover { transform: translateY(-4px) rotate(-1deg); }
.rail-card:active { transform: translateY(2px); }
.rail-card:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
.rail-card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; }
.rail-card span { display: block; padding: 10px 6px 0; }
.rail-card b { display: block; font-family: 'Fredoka One', sans-serif; font-weight: 400; font-size: 1.15rem; line-height: 1.1; }
.rail-card small { font-size: 0.9rem; color: var(--ink-soft); }

/* ── Footer (the "ground") ────────────────────────────── */
.site-foot { position: relative; background: var(--ground); color: var(--sky); }
.site-foot .nav-logo { color: var(--fg); }
.foot-link { color: var(--sky); text-decoration: none; border-radius: 4px; transition: color 0.2s ease; }
.foot-link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.foot-link:active { opacity: 0.7; }
.foot-link:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.text-link { color: var(--blue-ledge); font-weight: 600; text-decoration: none; border-radius: 4px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link:active { opacity: 0.7; }
.text-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud { animation: none; }
  .vcard, .thumb, .g-tile, .nav-panel, .tube-lamp, .roll > span, .g-cover, .rail-card, .btn { transition: none !important; }
}
