:root {
  --bg: #090f17;
  --bg-soft: #0c1420;
  --surface: #111b28;
  --surface-2: #182537;
  --surface-3: #213149;
  --text: #f5f8fc;
  --muted: #9fb0c4;
  --line: rgba(255, 255, 255, .09);
  --accent: #28d7c4;
  --accent-warm: #f4d53b;
  --radius: 18px;
  --shadow: 0 22px 60px rgba(0, 0, 0, .34);
  --sidebar: 44px;
  --sidebar-open: 200px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  padding-left: var(--sidebar);
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(40, 215, 196, .11), transparent 34rem),
    linear-gradient(180deg, #0a111b 0%, var(--bg) 38%, #070c12 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 3px; }

.shell { width: min(1760px, calc(100% - 32px)); margin-inline: auto; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: -5rem; z-index: 1000;
  padding: .7rem 1rem; border-radius: 8px; background: var(--accent-warm); color: #111;
}
.skip-link:focus { top: 1rem; }

/* Persistent compact menu */
.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 90;
  width: var(--sidebar);
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: rgba(8, 13, 20, .985);
  box-shadow: 12px 0 40px rgba(0,0,0,.16);
  transition: width .2s ease;
}
.sidebar-open .site-sidebar { width: var(--sidebar-open); }
.sidebar-toggle {
  width: var(--sidebar);
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: #dce6f0;
  background: transparent;
  cursor: pointer;
}
.sidebar-toggle__icon {
  position: relative;
  width: 15px;
  height: 11px;
  display: block;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.sidebar-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 2px;
  background: currentColor;
}
.sidebar-toggle::after {
  content: "›";
  position: absolute;
  left: 30px;
  top: 20px;
  color: rgba(159,176,196,.72);
  font-size: 12px;
  transform: rotate(0deg);
  transition: transform .16s ease;
}
.sidebar-open .sidebar-toggle::after { transform: rotate(180deg); }
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px 18px;
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}
.sidebar-menu a {
  min-height: 38px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #a9bad0;
  white-space: nowrap;
}
.sidebar-menu a:hover,
.sidebar-menu a:focus-visible {
  color: var(--accent);
  border-color: rgba(42,216,199,.22);
  background: rgba(42,216,199,.07);
}
.sidebar-menu__icon {
  width: 34px;
  display: grid;
  place-items: center;
  color: #aebed0;
  font-size: 18px;
  line-height: 1;
}
.sidebar-menu__icon.dashicons {
  width: 34px;
  height: 34px;
  font-size: 18px;
  line-height: 34px;
}
.sidebar-menu__icon--category {
  color: #aebed0;
}
.sidebar-menu a:hover .sidebar-menu__icon,
.sidebar-menu a:focus-visible .sidebar-menu__icon {
  color: var(--accent);
}
.sidebar-menu__label {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .14s ease, transform .14s ease;
  font-size: .78rem;
  font-weight: 730;
}
.sidebar-open .sidebar-menu__label { opacity: 1; transform: none; }
.sidebar-menu__divider { height: 1px; margin: 10px 6px; background: var(--line); }
.sidebar-menu__heading {
  margin: 0 6px 4px 38px;
  color: #6f8298;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
}
.sidebar-open .sidebar-menu__heading { opacity: 1; }
.sidebar-menu__category { min-height: 34px !important; }
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  border: 0;
  background: rgba(0,0,0,.55);
}
.sidebar-open .sidebar-backdrop { display: none; }

body.admin-bar .site-sidebar { top: 32px; }
body.admin-bar .site-header { top: 32px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 15, 23, .94);
  backdrop-filter: blur(18px);
}
.site-header__main {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(178px, 204px) auto minmax(210px, 1fr);
  gap: 8px;
  align-items: center;
}
.brand {
  height: 58px;
  display: flex;
  align-items: center;
}
.brand__link {
  height: 58px;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}
.custom-logo {
  display: block;
  width: min(196px, 100%);
  max-height: 52px;
  object-fit: contain;
  object-position: left center;
}
.brand-fallback { display: inline-flex; align-items: center; gap: 8px; }
.brand-fallback__mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: #05100f;
  background: linear-gradient(135deg, #24d9c8 0 42%, #f23bb8 42% 70%, #f3d64a 70%);
  font-weight: 950;
  font-size: 1.2rem;
}
.brand-fallback__copy { display: flex; flex-direction: column; line-height: .86; }
.brand-fallback__copy strong { font-size: 1rem; letter-spacing: -.04em; }
.brand-fallback__copy small { color: #c0cbd8; font-size: .72rem; font-weight: 800; letter-spacing: .03em; }

.quick-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}
.quick-nav a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 9px;
  color: #cbd7e3;
  background: rgba(17,27,40,.5);
  font-size: .72rem;
  font-weight: 770;
}
.quick-nav a:hover { color: var(--accent); border-color: rgba(42,216,199,.28); background: rgba(42,216,199,.07); }
.quick-nav__icon {
  width: 15px;
  height: 15px;
  margin-right: 4px;
  font-size: 15px;
  line-height: 15px;
  color: currentColor;
}
.quick-nav__originals { color: #fff !important; border-color: rgba(242,214,74,.2) !important; }
.quick-nav__originals:hover { color: var(--accent-warm) !important; }

.site-search {
  grid-column: 3;
  justify-self: end;
  width: min(380px, 100%);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 11px;
  background: #101b29;
}
.site-search__icon { display: grid; place-items: center; color: #6f8399; font-size: 1rem; }
.site-search input { min-width: 0; border: 0; outline: 0; padding: 0 8px; color: var(--text); background: transparent; }
.site-search button { border: 0; border-left: 1px solid var(--line); padding: 0 16px; cursor: pointer; color: var(--accent); background: rgba(42, 216, 199, .08); font-weight: 800; }

/* Main */
.site-main { padding-block: 16px 64px; }
.home-section { margin-top: 30px; }
.home-section--first { margin-top: 4px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 14px;
}
.section-heading--compact { margin-top: 24px; }
.section-heading--archive { align-items: center; margin-bottom: 18px; }
.section-heading h1, .section-heading h2, .game-heading h1, .content-page h1, .originals-hero h1 {
  margin: 0;
  line-height: 1.06;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.section-heading h1 { font-size: clamp(2rem, 3.4vw, 3.2rem); }
.section-heading h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
.eyebrow { margin: 0 0 6px; color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 850; }
.view-all { min-height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: #b2c0cf; font-size: .72rem; font-weight: 800; }
.archive-description { max-width: 720px; margin: 9px 0 0; color: var(--muted); }
.archive-count { color: #7f91a6; font-size: .78rem; white-space: nowrap; }

/* Cards */
.game-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.game-grid--six,
.game-grid--catalog { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.game-card { min-width: 0; }
.game-card__link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(24, 38, 57, .97), rgba(12, 21, 32, .98));
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.game-card__link:hover { transform: translateY(-3px); border-color: rgba(42, 216, 199, .34); box-shadow: 0 16px 40px rgba(0, 0, 0, .26); color: var(--text); }
.game-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #090f17; }
.game-card__media img, .card-placeholder { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-placeholder { background: radial-gradient(circle at 38% 28%, rgba(42, 216, 199, .2), transparent 42%), #101925; }
.game-card__play {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(7, 12, 18, .88);
}
.game-card__copy { min-height: 56px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 10px; }
.game-card__copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .83rem; }
.game-card__copy small { color: var(--muted); font-size: .68rem; }

/* Quick filters */
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 18px;
}
.quick-filters a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #a9b9ca;
  background: rgba(17,28,41,.72);
  font-size: .76rem;
  font-weight: 760;
}
.quick-filters a:hover,
.quick-filters a.is-active {
  color: #07100f;
  border-color: var(--accent);
  background: var(--accent);
}

/* Advertising structure */
.site-ad-top {
  min-height: 106px;
  display: grid;
  place-items: center;
  padding-block: 8px;
}
.ad-break { margin: 26px 0 12px; }
.ad-slot {
  margin-inline: auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(155, 172, 192, .28);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(42,216,199,.035), transparent 45%),
    rgba(17, 28, 41, .28);
}
.ad-slot__placeholder {
  color: rgba(155, 172, 192, .58);
  font-size: .68rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ad-slot--leaderboard { width: min(728px, 100%); min-height: 90px; }
.ad-slot--rail { width: 160px; min-height: 600px; }
.site-main__content { min-width: 0; }
.site-ad-rail { display: none; }

/* Game page */
.breadcrumb { margin: 2px 2px 9px; display: flex; flex-wrap: wrap; gap: 8px; color: #8192a5; font-size: .76rem; }
.is-game-page .site-main.shell {
  width: 100%;
  max-width: none;
  padding-inline: 8px;
}
.play-layout {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-content: center;
}
.desktop-rail { display: none; }
.player-stage {
  position: relative;
  isolation: isolate;
  width: min(1320px, 100%);
  justify-self: center;
  padding: 8px;
  overflow: visible;
  border: 1px solid rgba(42,216,199,.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14,26,38,.98), rgba(6,12,18,.99));
  box-shadow: 0 24px 80px rgba(0,0,0,.48);
}
.player-ambient {
  position: absolute;
  z-index: -1;
  inset: 20px -24px -28px;
  border-radius: 30px;
  background-position: center;
  background-size: cover;
  filter: blur(48px) saturate(1.6);
  opacity: .55;
  transform: scale(1.04);
  pointer-events: none;
}
.player-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 16px -12px -18px;
  border-radius: 26px;
  background: radial-gradient(circle at 50% 30%, rgba(42,216,199,.15), transparent 58%);
  pointer-events: none;
}
.player-toolbar {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px 6px;
  color: #8ea2b7;
  font-size: .71rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 800;
}
.player-frame {
  width: 100%;
  aspect-ratio: var(--game-aspect, 16 / 9);
  min-height: 420px;
  overflow: hidden;
  border-radius: 11px;
  background: #05080c;
}
.player-frame iframe,
.player-frame object,
.player-frame embed,
.player-frame canvas,
.player-frame ruffle-player {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border: 0 !important;
}
.player-missing { min-height: 420px; display: grid; place-items: center; padding: 24px; color: var(--muted); text-align: center; }

.game-heading {
  width: min(1320px, calc(100% - 336px));
  margin: 20px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(24, 38, 57, .93), rgba(11, 19, 29, .97));
}
.game-heading h1 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
.game-meta { margin: 8px 0 0; color: var(--muted); font-size: .8rem; }
.game-heading__thumb { width: 72px; height: 72px; flex: 0 0 72px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #0a111a; }
.game-heading__thumb img, .game-heading__thumb .card-placeholder { width: 100%; height: 100%; object-fit: cover; }

.game-details-panel {
  width: min(1320px, calc(100% - 32px));
  margin: 18px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 28, 41, .84);
}
.game-details-panel > summary {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 48px 0 18px;
  cursor: pointer;
  color: var(--text);
  font-size: .95rem;
  font-weight: 800;
  list-style: none;
  user-select: none;
}
.game-details-panel > summary::-webkit-details-marker { display: none; }
.game-details-panel > summary::after {
  content: "⌄";
  position: absolute;
  right: 18px;
  top: 50%;
  color: var(--accent);
  font-size: 1rem;
  transform: translateY(-50%) rotate(-90deg);
  transition: transform .16s ease;
}
.game-details-panel[open] > summary::after { transform: translateY(-50%) rotate(0deg); }
.game-details-panel[open] > summary { border-bottom: 1px solid var(--line); }
.game-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}
.detail-card {
  min-width: 0;
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 18, 28, .56);
  color: #d5dee8;
  font-size: .84rem;
  line-height: 1.5;
}
.detail-card h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: .95rem;
}
.detail-card p { margin: .5em 0; }
.prose {
  width: min(980px, calc(100% - 32px));
  margin: 20px auto 0;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 28, 41, .84);
  color: #d5dee8;
}
.prose h2, .prose h3 { color: var(--text); line-height: 1.2; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.related-section { width: min(1320px, calc(100% - 32px)); margin: 28px auto 0; }

@media (min-width: 1260px) {
  .site-main--with-rails {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 12px;
    padding-inline: 8px;
  }
  .site-ad-rail { display: block; }
  .site-ad-rail--left { justify-self: start; }
  .site-ad-rail--right { justify-self: end; }
  .site-ad-rail--right .ad-slot--rail {
    position: sticky;
    top: 82px;
  }

  .play-layout {
    grid-template-columns: 160px minmax(0, 1fr) 160px;
    gap: 8px;
  }
  .desktop-rail { display: block; }
  .desktop-rail:first-child { justify-self: start; }
  .desktop-rail:last-child { justify-self: end; }
  .desktop-rail:last-child .ad-slot--rail {
    position: sticky;
    top: 82px;
  }
  .player-stage { width: min(1320px, 100%); }
}

/* Originals */
.originals-page { min-height: 62vh; display: grid; place-items: center; }
.originals-hero {
  width: min(820px, 100%);
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(42,216,199,.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(42,216,199,.16), transparent 28rem),
    linear-gradient(145deg, rgba(24,38,57,.9), rgba(8,13,20,.96));
  box-shadow: var(--shadow);
}
.originals-hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
.originals-hero > p:not(.eyebrow) { max-width: 650px; color: #b5c4d3; font-size: clamp(1rem, 2vw, 1.25rem); }
.originals-status { margin-top: 28px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(7,13,20,.58); }
.originals-status > span { color: var(--accent); font-size: 1.35rem; }
.originals-status div { display: flex; flex-direction: column; }
.originals-status small { color: var(--muted); }

/* General */
.content-page { max-width: 900px; margin: 20px auto; }
.content-page h1 { font-size: clamp(2rem, 4vw, 3.3rem); }
.empty-state { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); }
.not-found { max-width: 760px; margin: 10vh auto; text-align: center; }
.button-link { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 18px; border-radius: 10px; background: var(--accent); color: #05100f !important; font-weight: 850; }
.pagination { margin-top: 24px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .page-numbers {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #b9c6d4;
  background: #111c29;
}
.pagination .current { color: #05100f; border-color: var(--accent); background: var(--accent); }

.site-footer { border-top: 1px solid var(--line); background: #070c12; }
.site-footer__inner { padding-block: 26px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: #91a1b4; font-size: .78rem; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1420px) {
  .game-grid--catalog { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .site-header__main { grid-template-columns: 164px auto minmax(190px, 1fr); }
  .custom-logo { width: min(156px, 100%); max-height: 46px; }
  .quick-nav a { padding-inline: 6px; font-size: .68rem; }
}

@media (max-width: 1180px) {
  .site-header__main { grid-template-columns: 146px auto minmax(165px, 1fr); gap: 6px; }
  .custom-logo { width: min(138px, 100%); max-height: 44px; }
  .quick-nav { grid-column: 2; overflow: hidden; gap: 3px; }
  .quick-nav a { min-height: 28px; padding-inline: 5px; font-size: .64rem; }
  .site-search { grid-column: 3; height: 34px; }
  .site-search__icon { font-size: .86rem; }
  .site-search button { padding-inline: 9px; font-size: .68rem; }
  .game-grid, .game-grid--six, .game-grid--catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-heading { width: min(100%, calc(100% - 24px)); }
  .game-details-panel { width: min(100%, calc(100% - 24px)); }
}

@media (max-width: 900px) {
  :root { --sidebar: 44px; --sidebar-open: 200px; }
  .site-sidebar {
    width: var(--sidebar);
    border-right: 1px solid var(--line);
  }
  .sidebar-open .site-sidebar { width: var(--sidebar-open); }
  .sidebar-toggle { width: var(--sidebar); height: 54px; }
  .sidebar-toggle::after { left: 30px; top: 18px; }

  /* Tablet and phone: do not pin a dense header over playable content. */
  .site-header { position: relative; top: auto; }
  body.admin-bar .site-header { top: auto; }
  .site-header__main {
    min-height: 0;
    grid-template-columns: minmax(120px, 138px) minmax(0, 1fr);
    grid-template-rows: 52px auto;
    gap: 4px 8px;
    padding-block: 4px 6px;
  }
  .brand,
  .brand__link {
    grid-column: 1;
    grid-row: 1;
    height: 48px;
  }
  .brand { padding-left: 0; }
  .custom-logo { width: min(128px, 100%); max-height: 42px; }

  .site-search {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: min(280px, 100%);
    height: 34px;
    min-width: 0;
  }
  .site-search__icon { width: 26px; font-size: .8rem; }
  .site-search input { padding-inline: 4px; font-size: .72rem; }
  .site-search button { padding-inline: 8px; font-size: .64rem; }

  .quick-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 4px;
    padding-bottom: 1px;
    scrollbar-width: none;
  }
  .quick-nav::-webkit-scrollbar { display: none; }
  .quick-nav a {
    flex: 0 0 auto;
    min-height: 29px;
    padding-inline: 7px;
    font-size: .64rem;
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
    left: var(--sidebar-open);
  }

  .game-grid, .game-grid--six, .game-grid--catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .player-frame { min-height: 0; }
  .site-ad-top { min-height: 98px; }
}

@media (max-width: 560px) {
  :root { --sidebar: 42px; --sidebar-open: 196px; }
  .shell { width: min(100% - 12px, 1760px); }
  .site-header__main {
    grid-template-columns: 120px minmax(0, 1fr);
    grid-template-rows: 48px auto;
    padding-block: 3px 5px;
  }
  .brand, .brand__link { height: 44px; }
  .custom-logo { width: 112px; max-height: 38px; }
  .site-search { width: 100%; height: 32px; }
  .brand { padding-left: 0; }
  .game-grid, .game-grid--six, .game-grid--catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .section-heading { align-items: center; }
  .archive-count { display: none; }
  .player-stage { width: 100%; padding: 5px; border-radius: 12px; }
  .player-ambient { inset: 20px -6px -8px; filter: blur(28px) saturate(1.4); opacity: .38; }
  .game-heading { padding: 16px; }
  .game-heading__thumb { width: 58px; height: 58px; flex-basis: 58px; }
  .game-details-panel { width: 100%; }
  .game-details-panel > summary { min-height: 44px; padding-left: 14px; }
  .game-details { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px; }
  .detail-card { padding: 12px 14px 14px; font-size: .82rem; }
  .related-section { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .game-card__link, .site-sidebar, .sidebar-menu__label { transition: none; }
  .player-ambient { transform: none; }
}

@media (max-width: 782px) {
  body.admin-bar .site-sidebar { top: 46px; }
  body.admin-bar .site-header { top: auto; }
}


.catalog-ad-row {
  grid-column: 1 / -1;
  padding-block: 18px 8px;
}

/* Device-aware navigation/content; activated client-side to remain cache-safe. */
.home-section--device-mobile[hidden] {
  display: none !important;
}
.quick-nav__mobile {
  color: var(--accent) !important;
  border-color: rgba(42, 216, 199, .28) !important;
  background: rgba(42, 216, 199, .07) !important;
}
.home-section--device-mobile {
  margin-top: 4px;
}
.device-handheld .home-section--device-mobile + .home-section--first {
  margin-top: 30px;
}


/* Compact category directory keeps taxonomy discovery without rendering every game section. */
.home-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.home-category-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b5c4d3;
  background: rgba(17, 28, 41, .72);
  font-size: .76rem;
  font-weight: 760;
}
.home-category-links a:hover,
.home-category-links a:focus-visible {
  color: #07100f;
  border-color: var(--accent);
  background: var(--accent);
}
