/* ============================================================
   WILD WEST GAMES — home page (store layout, 2026-11-28)
   The page is html.wwg-hub: lobby.css keeps its page-wide rules off it, so the page sets
   its own base. App bar + bottom bar + Friends/Chat pane + sheets come from lobby.js.
   Tokens and components only (wwg-tokens.css, wwg-ui.css). No hex colours here, so the page
   follows the player's light / dark choice like every other page.

   Layout: one 1200px column. Three views share it (home.js shows one at a time): the store
   (featured game, lists, top players, browse), one game's page, and the leaderboards. Panels
   sit side by side from 900px and stack below it; the game grid is two columns on a phone.
   ============================================================ */

.home-page {
  --card-min: 148px;
  --home-max: 1200px;
  --home-gutter: var(--ag-s-4);
  --home-shot: 16 / 10;          /* every screenshot frame */
}
@media (min-width: 600px)  { .home-page { --card-min: 168px; --home-gutter: var(--ag-s-5); } }
@media (min-width: 1200px) { .home-page { --card-min: 184px; } }
@media (min-width: 1600px) { .home-page { --home-max: 1440px; } }

html.wwg-hub, html.wwg-hub body { background: var(--ag-bg); }
html.wwg-hub body.home-page {
  margin: 0; min-height: 100vh; overflow-x: hidden; display: flex; flex-direction: column;
  font-family: var(--ag-font); font-size: var(--ag-text-md); line-height: 1.45; color: var(--ag-ink); -webkit-font-smoothing: antialiased;
  padding-top: calc(var(--ag-appbar-h) + var(--wwg-safe-t, 0px));
}
@media (max-width: 767.98px) {
  html.wwg-hub body.home-page { padding-bottom: calc(var(--ag-bottombar-h) + var(--wwg-safe-b, 0px)); }
}
.home-page *, .home-page *::before, .home-page *::after { box-sizing: border-box; }

.home {
  flex: 1 0 auto; width: 100%;
  max-width: var(--home-max); margin: 0 auto;
  padding: 0 var(--home-gutter) var(--ag-s-6);
  display: flex; flex-direction: column; gap: var(--ag-s-5);
}
.home [hidden] { display: none !important; }
.home-view { display: flex; flex-direction: column; gap: var(--ag-s-6); min-width: 0; }
.home p, .home h1, .home h2, .home h3, .home ul, .home ol, .home dl, .home dd { margin: 0; }
.home ul, .home ol { padding: 0; list-style: none; }
.home button { font-family: inherit; }

.home-h2 {
  margin: 0; font-family: var(--ag-font-display); font-size: var(--ag-text-lg); font-weight: 700;
  letter-spacing: -.01em; color: var(--ag-ink); text-wrap: balance;
}
.home-h3 { font-family: var(--ag-font-display); font-size: var(--ag-text-base); font-weight: 700; color: var(--ag-ink); }
.home-caption { margin: 0; color: var(--ag-muted); font-size: var(--ag-text-sm); }
.home-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ag-s-2) var(--ag-s-4); }
.home-link {
  display: inline-flex; align-items: center; gap: var(--ag-s-1); min-height: var(--ag-touch);
  color: var(--ag-accent-ink); font-size: var(--ag-text-md); font-weight: 600; text-decoration: none; border-radius: var(--ag-r-sm);
}
.home-link:hover { text-decoration: underline; }
.home-link:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 2px; }
.home-link svg { width: 16px; height: 16px; }
.home-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.home-catchip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--_c, var(--ag-muted)); }
.home-play svg { width: 16px; height: 16px; }
a.ag-btn { text-decoration: none; }

/* A screenshot frame: the picture fills it and is cropped to fit. */
.home-shot {
  position: relative; display: block; overflow: hidden; padding: 0; margin: 0; border: 0;
  aspect-ratio: var(--home-shot); border-radius: var(--ag-r); background: var(--ag-chrome);
}
.home-shot img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
a.home-shot:focus-visible, button.home-shot:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 2px; }
.home-thumb { cursor: pointer; border-radius: var(--ag-r-sm); box-shadow: 0 0 0 1px var(--ag-border); }
.home-thumb[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ag-accent); }

/* ---- Section tabs -------------------------------------------------------------------- */
.home-nav {
  display: flex; gap: var(--ag-s-1); margin: 0 calc(-1 * var(--home-gutter)); padding: 0 var(--home-gutter);
  border-bottom: 1px solid var(--ag-border); overflow-x: auto; scrollbar-width: none;
}
.home-nav::-webkit-scrollbar { display: none; }
.home-nav__tab {
  flex: none; display: inline-flex; align-items: center; gap: var(--ag-s-2); min-height: 48px; padding: 0 var(--ag-s-3);
  color: var(--ag-muted); font-size: var(--ag-text-md); font-weight: 600; text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.home-nav__tab:hover { color: var(--ag-ink); }
.home-nav__tab[aria-current="page"] { color: var(--ag-ink); border-bottom-color: var(--ag-accent); }
.home-nav__tab:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: -2px; }
.home-nav__tab svg { width: 18px; height: 18px; }
.home-nav__tab--santa { margin-left: auto; color: var(--ag-danger-ink); }
.home-nav__tab--santa:hover { color: var(--ag-danger-ink); border-bottom-color: var(--ag-danger); }

/* ---- 1. Continue ---------------------------------------------------------------------- */
.home-continue { display: flex; flex-direction: column; gap: var(--ag-s-3); }
.home-continue__row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px); gap: var(--ag-s-3);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(-1 * var(--home-gutter)); padding: 2px var(--home-gutter) var(--ag-s-1);
  scroll-padding: 0 var(--home-gutter);
}
.home-continue__row::-webkit-scrollbar { display: none; }
.home-cont {
  display: flex; align-items: center; gap: var(--ag-s-3); min-height: 64px; padding: var(--ag-s-2);
  text-decoration: none; scroll-snap-align: start; min-width: 0;
}
.home-cont:hover { border-color: var(--ag-border-strong); }
.home-cont:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 2px; }
.home-cont img { flex: none; width: 48px; height: 48px; border-radius: var(--ag-r); object-fit: cover; background: var(--ag-chrome); }
.home-cont__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-cont__title { font-size: var(--ag-text-md); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-cont__meta { display: flex; align-items: center; gap: var(--ag-s-2); font-size: var(--ag-text-xs); color: var(--ag-muted); white-space: nowrap; overflow: hidden; }
.home-cont__meta span:last-child { overflow: hidden; text-overflow: ellipsis; }

/* ---- 2. Featured game ----------------------------------------------------------------- */
.home-feat { display: flex; flex-direction: column; gap: var(--ag-s-3); }
.home-car { display: flex; align-items: center; gap: var(--ag-s-2); }
.home-car__arrow { width: var(--ag-touch); height: var(--ag-touch); }
.home-slide { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: var(--ag-s-4); padding: var(--ag-s-3); box-shadow: var(--ag-shadow-md); }
.home-slide__big { flex: 2.2 1 420px; min-width: 0; }
.home-slide__side { flex: 1 1 270px; min-width: 0; display: flex; flex-direction: column; gap: var(--ag-s-3); padding: var(--ag-s-1) var(--ag-s-1) var(--ag-s-1) 0; }
.home-slide__name { font-family: var(--ag-font-display); font-size: var(--ag-text-lg); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; text-wrap: balance; }
.home-slide__desc { margin-top: var(--ag-s-1) !important; color: var(--ag-ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.home-thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ag-s-2); }
.home-slide__go { display: flex; flex-wrap: wrap; gap: var(--ag-s-2); margin-top: auto; }
.home-dots { display: flex; justify-content: center; margin-top: var(--ag-s-1); }
.home-dot { display: grid; place-items: center; width: var(--ag-touch); height: 32px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--ag-r-sm); }
.home-dot i { width: 24px; height: 8px; border-radius: var(--ag-r-pill); background: var(--ag-border-strong); }
.home-dot[aria-pressed="true"] i { background: var(--ag-accent); }
.home-dot:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: -2px; }

/* ---- 3. The three lists --------------------------------------------------------------- */
.home-lists { display: flex; flex-direction: column; }
.home-ltabs { display: flex; flex-wrap: wrap; gap: var(--ag-s-1); padding: 0 var(--ag-s-1); }
.home-ltab {
  min-height: var(--ag-touch); padding: 0 var(--ag-s-4); margin: 0 0 -1px; cursor: pointer;
  border: 1px solid transparent; border-bottom: 0; border-radius: var(--ag-r) var(--ag-r) 0 0; background: none;
  color: var(--ag-muted); font-size: var(--ag-text-md); font-weight: 600;
}
.home-ltab:hover { color: var(--ag-ink); }
.home-ltab[aria-pressed="true"] { position: relative; z-index: 1; background: var(--ag-surface); border-color: var(--ag-border); color: var(--ag-ink); }
.home-ltab:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: -2px; }
.home-lbox { display: flex; flex-wrap: wrap; gap: var(--ag-s-3); padding: var(--ag-s-3); }
.home-lrows { flex: 1.6 1 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--ag-s-1); }
.home-lrow {
  display: flex; align-items: center; gap: var(--ag-s-3); width: 100%; min-height: 64px; padding: var(--ag-s-1) var(--ag-s-3) var(--ag-s-1) var(--ag-s-1); margin: 0;
  border: 1px solid transparent; border-radius: var(--ag-r); background: var(--ag-surface-alt); color: var(--ag-ink); text-align: left; cursor: pointer;
}
.home-lrow:hover { background: var(--ag-hover); }
.home-lrow[aria-pressed="true"] { background: var(--ag-accent-bg); border-color: var(--ag-accent); }
.home-lrow:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 1px; }
.home-lrow__art { flex: none; width: 56px; height: 56px; border-radius: var(--ag-r-sm); overflow: hidden; background: var(--ag-chrome); }
.home-lrow__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-lrow__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-lrow__text b { font-size: var(--ag-text-base); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-lrow__text small { font-size: var(--ag-text-xs); color: var(--ag-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-lrow[aria-pressed="true"] .home-lrow__text small { color: var(--ag-ink-2); }
.home-lmore { align-self: flex-start; color: var(--ag-accent-ink); min-height: var(--ag-touch); }
.home-lside { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: var(--ag-s-2); padding: var(--ag-s-3); border-radius: var(--ag-r); background: var(--ag-surface-alt); }
.home-lside__desc { color: var(--ag-ink-2); font-size: var(--ag-text-sm); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.home-lside .home-slide__go { padding-top: var(--ag-s-1); }

/* ---- 4. Leaderboards (the top-players strip, a game's board, the leaderboards page) ---- */
.home-champs { display: flex; flex-direction: column; gap: var(--ag-s-2); }
.home-champs > .home-board { padding: var(--ag-s-3); border-radius: var(--ag-r-lg); background: var(--ag-surface); border: 1px solid var(--ag-border); box-shadow: var(--ag-shadow-sm); }
.home-board { display: flex; flex-direction: column; gap: var(--ag-s-2); min-width: 0; }
.home-board__head { display: flex; align-items: center; gap: var(--ag-s-2); }
.home-board__head svg { width: 22px; height: 22px; color: var(--ag-warning); }
.home-board__what { color: var(--ag-muted); font-size: var(--ag-text-sm); font-weight: 600; }
.home-board__foot { color: var(--ag-muted); font-size: var(--ag-text-xs); }
.home-board__note { display: flex; flex-direction: column; align-items: center; gap: var(--ag-s-3); padding: var(--ag-s-5) var(--ag-s-3); border-radius: var(--ag-r); background: var(--ag-surface-alt); color: var(--ag-ink-2); text-align: center; }
.home-btabs { display: flex; flex-wrap: wrap; gap: var(--ag-s-1); border-bottom: 1px solid var(--ag-border); }
.home-btab {
  min-height: var(--ag-touch); padding: 0 var(--ag-s-3); margin: 0 0 -1px; cursor: pointer; border: 0; border-bottom: 3px solid transparent; background: none;
  color: var(--ag-muted); font-size: var(--ag-text-sm); font-weight: 600;
}
.home-btab:hover { color: var(--ag-ink); }
.home-btab[aria-pressed="true"] { color: var(--ag-ink); border-bottom-color: var(--ag-accent); }
.home-btab:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: -2px; }
.home-prows { display: flex; flex-direction: column; gap: var(--ag-s-1); }
.home-prow {
  display: flex; align-items: center; gap: var(--ag-s-3); min-height: 44px; padding: var(--ag-s-1) var(--ag-s-3);
  border-radius: var(--ag-r); background: var(--ag-surface-alt); font-variant-numeric: tabular-nums;
}
.home-prow--pod { min-height: 52px; }
.home-prow.is-me { background: var(--ag-accent-bg); box-shadow: inset 4px 0 0 var(--ag-accent); }
.home-prow__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.home-prow__who b { display: flex; align-items: center; gap: var(--ag-s-2); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-prow__who small { color: var(--ag-muted); font-size: var(--ag-text-xs); }
.home-prow__n { font-size: var(--ag-text-base); font-weight: 700; }
.home-prow--pod .home-prow__n { font-size: var(--ag-text-lg); }
.home-medal {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--ag-r-sm);
  background: var(--ag-chrome); color: var(--ag-ink-2); font-size: var(--ag-text-sm); font-weight: 700;
}
.home-medal--1 { background: var(--ag-warning-bg); color: var(--ag-warning-ink); box-shadow: inset 0 0 0 2px var(--ag-warning); }
.home-medal--2 { box-shadow: inset 0 0 0 2px var(--ag-border-strong); }
.home-medal--3 { box-shadow: inset 0 0 0 2px var(--ag-border); }

/* ---- 5. Browse: menus, search, category tiles, grid ----------------------------------- */
.home-browse { display: flex; flex-direction: column; gap: var(--ag-s-3); scroll-margin-top: calc(var(--ag-appbar-h) + var(--ag-s-3)); }
.home-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ag-s-2) var(--ag-s-3); }
.home-menus { display: flex; flex-wrap: wrap; gap: var(--ag-s-2); flex: 1 1 auto; }
.home-dd { position: relative; }
.home-dd__btn svg { width: 14px; height: 14px; }
.home-dd__btn[aria-expanded="true"] { background: var(--ag-surface-alt); border-color: var(--ag-accent); }
.home-menu {
  position: absolute; top: calc(100% + var(--ag-s-1)); left: 0; z-index: 20; min-width: 230px; padding: var(--ag-s-1);
  display: flex; flex-direction: column; border-radius: var(--ag-r); background: var(--ag-surface); border: 1px solid var(--ag-border-strong); box-shadow: var(--ag-shadow-lg);
}
.home-menu__item {
  display: flex; align-items: center; gap: var(--ag-s-3); width: 100%; min-height: var(--ag-touch); padding: 0 var(--ag-s-3); margin: 0;
  border: 0; border-radius: var(--ag-r-sm); background: none; color: var(--ag-ink); font-size: var(--ag-text-md); font-weight: 500; text-align: left; cursor: pointer;
}
.home-menu__item:hover { background: var(--ag-hover); }
.home-menu__item:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: -2px; }
.home-menu__item[aria-checked="true"] { font-weight: 700; }
.home-menu__item > svg { width: 16px; height: 16px; margin-left: auto; color: var(--ag-accent-ink); }
.home-menu__sw { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ag-muted); }
.home-menu__box { flex: none; display: grid; place-items: center; width: 18px; height: 18px; border-radius: var(--ag-r-sm); border: 2px solid var(--ag-border-strong); }
.home-menu__item[aria-checked="true"] .home-menu__box { background: var(--ag-accent); border-color: var(--ag-accent); color: var(--ag-on-accent); }
.home-menu__box svg { width: 12px; height: 12px; }

.home-search { position: relative; flex: 0 1 320px; min-width: 0; }
.home-search svg {
  position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  color: var(--ag-muted); pointer-events: none;
}
.home-search input {
  width: 100%; height: var(--ag-ctl-h); padding: 0 var(--ag-s-3) 0 38px; margin: 0;
  border: 1px solid var(--ag-border-strong); border-radius: var(--ag-r-pill);
  background: var(--ag-surface); color: var(--ag-ink);
  font: 400 var(--ag-text-md)/1 var(--ag-font);
  -webkit-appearance: none; appearance: none;
  scroll-margin-top: calc(var(--ag-appbar-h) + var(--ag-s-6));
}
.home-search input::placeholder { color: var(--ag-muted); }
.home-search input:focus { outline: 2px solid var(--ag-focus); outline-offset: -1px; border-color: transparent; }
.home-search input::-webkit-search-cancel-button { cursor: pointer; }
@media (max-width: 767.98px) {
  .home-search input { height: var(--ag-touch); font-size: var(--ag-text-base); }   /* 16px: no iOS zoom */
  .home-dd__btn { height: var(--ag-touch); }
}

.home-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--ag-s-3); }
.home-cat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 92px; padding: var(--ag-s-3); margin: 0;
  border-top: 5px solid var(--_c, var(--ag-muted)); text-align: left; cursor: pointer; font-size: var(--ag-text-sm); color: var(--ag-ink-2);
}
.home-cat b { font-family: var(--ag-font-display); font-size: var(--ag-text-base); font-weight: 800; color: var(--ag-ink); }
.home-cat small { margin-top: auto; color: var(--ag-muted); font-size: var(--ag-text-xs); }
.home-cat:hover { border-color: var(--ag-border-strong); border-top-color: var(--_c, var(--ag-muted)); box-shadow: var(--ag-shadow-md); }
.home-cat[aria-pressed="true"] { background: var(--ag-accent-bg); border-color: var(--ag-accent); border-top-color: var(--_c, var(--ag-muted)); }
.home-cat:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 2px; }

.home-shown { justify-content: flex-start; min-height: 32px; }
.home-shown__text { color: var(--ag-muted); font-size: var(--ag-text-sm); font-weight: 600; }
.home-shown__chips { display: flex; flex-wrap: wrap; gap: var(--ag-s-2); }
button.home-pill { position: relative; height: 32px; padding: 0 var(--ag-s-2) 0 var(--ag-s-3); cursor: pointer; background: var(--ag-accent-bg); border-color: transparent; color: var(--ag-accent-ink); font-size: var(--ag-text-sm); }
button.home-pill svg { width: 14px; height: 14px; }
button.home-pill::after { content: ''; position: absolute; left: 0; right: 0; top: -6px; bottom: -6px; }   /* 44px tall target */

.is-searching .home-feat, .is-searching .home-lists, .is-searching .home-champs, .is-searching .home-cats { display: none; }

.home-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: var(--ag-s-4);
  margin: 0; padding: 0; list-style: none;
}
.home-grid > li { display: flex; min-width: 0; }
@media (max-width: 599.98px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ag-s-3); }
}
.home-card {
  position: relative; display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: var(--ag-s-2) var(--ag-s-2) var(--ag-s-3); text-decoration: none; color: var(--ag-ink);
  transition: border-color .15s var(--ag-ease, ease), box-shadow .15s var(--ag-ease, ease), transform .15s var(--ag-ease, ease);
  -webkit-tap-highlight-color: transparent;
}
.home-card:hover { border-color: var(--ag-border-strong); box-shadow: var(--ag-shadow-md); }
.home-card:active { transform: scale(.985); }
.home-card:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 2px; }
.home-card__art {
  display: block; aspect-ratio: 1 / 1; margin-bottom: var(--ag-s-2); border-radius: var(--ag-r);
  overflow: hidden; background: var(--ag-chrome);
}
.home-card__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-card__title {
  padding: 0 var(--ag-s-1); font-size: var(--ag-text-base); font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.home-card__meta {
  padding: 0 var(--ag-s-1); font-size: var(--ag-text-xs); color: var(--ag-muted); line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 599.98px) {
  .home-card__meta { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: calc(2 * 1.35em); }
}
.home-card__badge { position: absolute; top: var(--ag-s-3); left: var(--ag-s-3); box-shadow: var(--ag-shadow-sm); }
.home-card__badge.ag-chip:not(.ag-chip--accent) { background: var(--ag-surface); }

.home-empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--ag-s-3);
  padding: var(--ag-s-6) var(--ag-s-4); text-align: center; color: var(--ag-muted);
}

/* ---- A game's page -------------------------------------------------------------------- */
#viewGame, #viewBoards { gap: var(--ag-s-5); padding-top: var(--ag-s-2); }
.home-crumb svg { width: 14px; height: 14px; }
.home-ghead { align-items: flex-end; }
.home-media { display: flex; flex-wrap: wrap; gap: var(--ag-s-4); padding: var(--ag-s-3); }
.home-media__left { flex: 2 1 440px; min-width: 0; display: flex; flex-direction: column; gap: var(--ag-s-2); }
.home-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--ag-s-2); padding: 3px; }
.home-media__right { flex: 1 1 250px; min-width: 0; display: flex; flex-direction: column; gap: var(--ag-s-3); padding: var(--ag-s-1); }
.home-cover { display: block; width: 140px; aspect-ratio: 1; border-radius: var(--ag-r-lg); overflow: hidden; background: var(--ag-chrome); }
.home-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-media__desc { color: var(--ag-ink-2); font-size: var(--ag-text-base); text-wrap: pretty; }
.home-facts { display: grid; grid-template-columns: auto 1fr; gap: var(--ag-s-1) var(--ag-s-4); font-size: var(--ag-text-sm); }
.home-facts dt { color: var(--ag-muted); font-weight: 600; }
.home-playbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ag-s-3) var(--ag-s-4); background: var(--ag-surface-alt); }
.home-playbar .home-play { min-width: 160px; }
.home-two { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--ag-s-5); }
.home-two__a { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: var(--ag-s-5); }
.home-two__b { flex: 1.4 1 380px; min-width: 0; display: flex; flex-direction: column; gap: var(--ag-s-2); }
.home-two--boards .home-two__b { flex: 1 1 340px; }
.home-cap { display: block; padding-bottom: var(--ag-s-2); margin-bottom: var(--ag-s-3) !important; border-bottom: 1px solid var(--ag-border); }
.home-about { display: flex; flex-direction: column; gap: var(--ag-s-2); color: var(--ag-ink-2); font-size: var(--ag-text-base); }
.home-about b { color: var(--ag-ink); }
.home-ladder { display: flex; flex-direction: column; gap: var(--ag-s-1); }
.home-ladder li { display: flex; align-items: center; gap: var(--ag-s-3); min-height: 40px; padding: var(--ag-s-1) var(--ag-s-3); border-radius: var(--ag-r); background: var(--ag-surface); border: 1px solid var(--ag-border); }
.home-ladder b { flex: 1; font-weight: 600; }
.home-ladder small { color: var(--ag-muted); font-size: var(--ag-text-xs); font-variant-numeric: tabular-nums; }
.home-ladder li:last-child { border-color: var(--ag-warning); }
.home-ladder li:last-child .home-medal { background: var(--ag-warning-bg); color: var(--ag-warning-ink); }
.home-more { display: flex; flex-direction: column; gap: var(--ag-s-3); }
.home-pick { justify-content: flex-start; }
.home-select {
  height: var(--ag-touch); min-width: 0; max-width: 100%; padding: 0 var(--ag-s-3); border-radius: var(--ag-r);
  border: 1px solid var(--ag-border-strong); background: var(--ag-surface); color: var(--ag-ink); font: 500 var(--ag-text-md) var(--ag-font);
}
.home-select:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 1px; }

/* ---- Footer --------------------------------------------------------------------------- */
.home-foot { border-top: 1px solid var(--ag-border); background: var(--ag-surface); }
.home-foot__in {
  max-width: var(--home-max); margin: 0 auto; padding: var(--ag-s-4) var(--home-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--ag-s-4) var(--ag-s-5); flex-wrap: wrap;
}
.home-foot__links { display: flex; gap: var(--ag-s-1); flex-wrap: wrap; margin: 0 calc(-1 * var(--ag-s-2)); padding: 0; list-style: none; }
.home-foot__links a {
  display: inline-flex; align-items: center; min-height: var(--ag-touch); padding: 0 var(--ag-s-2);
  color: var(--ag-ink-2); font-size: var(--ag-text-md); font-weight: 500; text-decoration: none; border-radius: var(--ag-r);
}
.home-foot__links a:hover { color: var(--ag-ink); background: var(--ag-hover); }
.home-foot__links a:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 0; }
/* Brand block: the playful wordmark (letters take the theme's ink; "Games" takes the arcade purple
   it is drawn in) and the family story as a small friendly note. */
.home-foot__about { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ag-s-2); min-width: 0; }
.home-foot__brand { display: inline-flex; border-radius: var(--ag-r); }
.home-foot__brand:focus-visible { outline: 2px solid var(--ag-focus); outline-offset: 2px; }
.home-foot__wordmark { display: block; width: auto; height: 32px; }
.home-foot__wordmark .wm-ink { fill: var(--ag-ink); }
.home-foot__wordmark .wm-acc { fill: var(--ag-cat-arcade); }
/* Dark: lift the purple toward the light ink so "Games" keeps its contrast (no dark category token). */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .home-foot__wordmark .wm-acc { fill: color-mix(in srgb, var(--ag-cat-arcade) 60%, var(--ag-ink)); } }
:root[data-theme="dark"] .home-foot__wordmark .wm-acc { fill: color-mix(in srgb, var(--ag-cat-arcade) 60%, var(--ag-ink)); }
.home-foot__story {
  margin: 0; max-width: 44ch; color: var(--ag-ink-2); font-size: var(--ag-text-sm); line-height: 1.5; text-wrap: pretty;
}
@media (min-width: 768px) { .home-foot__links a { min-height: var(--ag-ctl-h); } }

/* ---- Tablet and phone ----------------------------------------------------------------- */
@media (max-width: 900px) {
  .home-slide__side { flex-basis: 100%; padding: 0 var(--ag-s-1) var(--ag-s-1); }
  .home-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 599.98px) {
  .home-view { gap: var(--ag-s-5); }
  .home-car__arrow { display: none; }
  .home-slide { padding: var(--ag-s-2); gap: var(--ag-s-3); }
  .home-slide__big { flex-basis: 100%; }
  .home-slide__go .ag-btn { flex: 1 1 130px; }
  .home-lrow .home-catchip { display: none; }
  .home-ltab { padding: 0 var(--ag-s-3); font-size: var(--ag-text-sm); }
  .home-search { flex: 1 1 100%; }
  .home-menus { flex: 1 1 100%; }
  .home-dd { position: static; flex: 1 1 0; }
  .home-dd__btn { width: 100%; }
  .home-bar { position: relative; }
  .home-menu { left: 0; right: 0; top: calc(var(--ag-touch) + var(--ag-s-1)); min-width: 0; }
  .home-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ag-s-2); }
  .home-cat { min-height: 80px; }
  .home-playbar .home-play { flex: 1 1 100%; }
  .home-strip { gap: var(--ag-s-1); }
  .home-nav__tab { padding: 0 var(--ag-s-2); }
}

@media (prefers-reduced-motion: reduce) {
  .home-card { transition: none; }
  .home-card:active { transform: none; }
}
