:root {
  color-scheme: light;
  --body-font: "DM Sans", "Segoe UI", sans-serif;
  --heading-font: "Bricolage Grotesque", "Arial", sans-serif;
  --bg: #f7f8fc;
  --surface: #fff;
  --surface-alt: #edf2f8;
  --ink: #141c2d;
  --muted: #47566d;
  --accent: #2456dd;
  --button-ink: #fff;
  --edge: #dce3ef;
  --feature: #123575;
  --feature-ink: #fff;
  --radius: 18px;
  --cover-radius: 10px;
  --space: clamp(32px, 5vw, 68px);
  --category-section-space: clamp(52px, 6.4vw, 94px);
  --layout: 1240px;
}
[data-theme="arcade"] {
  color-scheme: dark;
  --bg: #0c1321; --surface: #141f32; --surface-alt: #182844;
  --ink: #f3f8ff; --muted: #acbdd7; --accent: #52e4cb; --button-ink: #10262a;
  --edge: #2a3b59; --feature: #172f50; --radius: 16px;
}
[data-theme="pop"] {
  --bg: #fff8ea; --surface: #fffdf6; --surface-alt: #ffe8a4;
  --ink: #292045; --muted: #594969; --accent: #6c32c7; --button-ink: #fff;
  --edge: #e4c9ad; --feature: #ffd974; --feature-ink: #292045; --radius: 28px;
}
[data-theme="editorial"] {
  --bg: #f6f4ed; --surface: #fffdf6; --surface-alt: #ede8dc;
  --ink: #25241d; --muted: #59564a; --accent: #8b3627;
  --edge: #d8d0c2; --feature: #343e32; --radius: 0px; --cover-radius: 0px;
  --heading-font: "Instrument Serif", Georgia, serif;
}
[data-theme="arena"] {
  color-scheme: dark;
  --bg: #14131b; --surface: #201e28; --surface-alt: #282532;
  --ink: #fffdfa; --muted: #c6bdcb; --accent: #ffb766; --button-ink: #211712;
  --edge: #42394a; --feature: #3b2733; --radius: 6px; --cover-radius: 4px;
  --heading-font: "Barlow Condensed", "Arial Narrow", "Segoe UI", sans-serif;
}
[data-theme="garden"] {
  --bg: #eaf5ee; --surface: #f8fcf5; --surface-alt: #dceee2;
  --ink: #17382c; --muted: #416355; --accent: #205942; --button-ink: #fff;
  --edge: #c4dece; --feature: #cbe7d2; --feature-ink: #17382c;
  --radius: 26px; --cover-radius: 15px; --layout: 1160px;
  --heading-font: "DM Serif Text", Georgia, serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--body-font);
}
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--heading-font); line-height: 1.06; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 4px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.site-main, .header-inner, .footer-inner { width: min(calc(100% - 64px), var(--layout)); margin-inline: auto; }
.site-main { min-height: 61vh; padding: var(--space) 0; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 2; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--edge); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 9px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 143px; height: auto; }
.desktop-categories { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.desktop-categories a, .mobile-categories a { color: var(--ink); text-decoration: none; font-weight: 680; }
.desktop-categories a { padding: 8px clamp(7px, 1.1vw, 17px); border-radius: var(--radius); font-size: .94rem; }
.desktop-categories a:hover, .desktop-categories a[aria-current], .mobile-categories a:hover, .mobile-categories a[aria-current] { background: var(--surface-alt); color: var(--accent); }
.category-toggle { display: none !important; }
.category-dialog { width: min(420px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 20px; border: 1px solid var(--edge); background: var(--surface); color: var(--ink); border-radius: var(--radius); }
.category-dialog::backdrop { background: #10121dcc; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-top h2 { font-size: 1.45rem; }
.mobile-categories { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.mobile-categories a { display: block; padding: 11px; border: 1px solid var(--edge); border-radius: var(--cover-radius); }

.button {
  display: inline-flex; gap: 7px; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 15px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--edge); border-radius: var(--cover-radius);
  font-size: .94rem; font-weight: 720; line-height: 1.25; text-decoration: none;
}
.button:hover { background: var(--surface-alt); }
.button.primary { color: var(--button-ink); background: var(--accent); border-color: transparent; }
.button.primary:hover { filter: brightness(1.12); }
.icon-button { min-width: 38px; padding-inline: 9px; font-size: 1.24rem; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.home-lead { display: grid; grid-template-columns: 1.35fr minmax(250px,.65fr); align-items: end; gap: 24px; margin-bottom: clamp(22px, 3vw, 38px); }
.home-lead h1, .page-lead h1, .detail-copy h1 { font-size: clamp(2.25rem, 5.4vw, 5rem); letter-spacing: -.055em; overflow-wrap: anywhere; }
.home-lead p, .page-lead > p, .detail-copy > p { color: var(--muted); margin-top: 12px; max-width: 62ch; }
.search-form { display: flex; min-width: 0; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--cover-radius); padding: 5px; }
.search-form input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 8px 10px; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form .button { flex: 0 0 auto; }
.search-results { margin: 0 0 var(--space); }
.search-results > p { margin: 0 0 12px; }
.feature-shell { display: grid; grid-template-columns: minmax(0,2.2fr) minmax(0,1fr); gap: 16px; }
.spotlight { min-width: 0; background: var(--feature); color: var(--feature-ink); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.spotlight-slides { flex: 1; display: grid; }
.spotlight-slide { position: relative; display: grid; isolation: isolate; min-height: clamp(270px, 38vw, 402px); align-items: end; }
.spotlight-slide:not([hidden]) { animation: reveal .34s ease-out both; }
@keyframes reveal { from { opacity: .65; } to { opacity: 1; } }
.spotlight-art { position: absolute; inset: 0; z-index: -2; }
.spotlight-art img { width: 100%; height: 100%; object-fit: cover; }
.spotlight-slide::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #0a1221 1%, #0a1221df 23%, #0a122173 55%, transparent 86%); }
.spotlight-copy { min-width: 0; padding: clamp(18px, 3vw, 34px); color: white; }
.spotlight-copy h2 { font-size: clamp(1.8rem, 4vw, 3.45rem); letter-spacing: -.04em; margin: 7px 0 14px; overflow-wrap: anywhere; }
.spotlight-label { font-size: .8rem; letter-spacing: .095em; font-weight: 800; text-transform: uppercase; }
.spotlight-controls { display: flex; align-items: center; gap: 5px; padding: 5px 10px; background: var(--feature); }
.spotlight-dots { display: flex; gap: 3px; flex: 1; }
.spotlight-dots button, .carousel-control { border: 0; background: transparent; color: var(--feature-ink); min-height: 42px; }
.spotlight-dots button { width: 27px; position: relative; padding: 0; }
.spotlight-dots button::before { position: absolute; content: ""; top: calc(50% - 4px); left: calc(50% - 4px); width: 8px; height: 8px; background: currentColor; border-radius: 50%; opacity: .48; }
.spotlight-dots button[aria-current="true"]::before { opacity: 1; }
.carousel-control:hover, .spotlight-dots button:hover { background: #80808033; border-radius: var(--cover-radius); }
.spotlight-controls button:focus-visible { outline-color: var(--feature-ink); outline-offset: -2px; }
.quick-picks { padding: clamp(13px, 2vw, 23px); background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); min-width: 0; }
.quick-picks h2 { font-size: clamp(1.3rem, 2.5vw, 1.85rem); margin-bottom: 12px; }
.tray-grid { display: grid; gap: 9px; }
.tray-card { min-width: 0; }
.tray-card a { display: grid; grid-template-columns: clamp(43px, 6vw, 68px) minmax(0,1fr) auto; align-items: center; gap: 10px; height: 100%; padding: 5px 8px 5px 5px; border-radius: var(--cover-radius); background: var(--surface-alt); color: var(--ink); text-decoration: none; font-weight: 710; line-height: 1.24; }
.tray-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--cover-radius); }
.tray-card span, .game-card span { overflow-wrap: anywhere; }
.tray-card b { color: var(--accent); font-size: 1.1rem; }
.tray-card a:hover, .game-card a:hover { color: var(--accent); }

.game-section, .play-guide { margin-top: var(--space); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.section-head h2, .play-guide h2 { font-size: clamp(1.45rem, 3.5vw, 2.65rem); letter-spacing: -.04em; }
.section-link { flex-shrink: 0; font-size: .9rem; font-weight: 730; text-decoration-thickness: 1px; }
.game-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: clamp(9px, 1.6vw, 20px); }
.game-card, .game-card a { min-width: 0; }
.game-card a { display: flex; height: 100%; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--edge); border-radius: var(--cover-radius); text-decoration: none; color: var(--ink); transition: border-color .2s ease, transform .2s ease; }
.game-card img { aspect-ratio: 1.25; width: 100%; height: auto; object-fit: cover; background: var(--surface-alt); }
.game-card span { padding: 9px 10px 11px; font-size: .93rem; font-weight: 700; line-height: 1.25; }
@media (hover:hover) { .game-card a:hover { transform: translateY(-3px); border-color: var(--accent); } }

/* Alternate home compositions */
[data-theme="arcade"] .home-page { background: radial-gradient(ellipse 88% 370px at 15% 0, #142641, transparent); }
[data-theme="arcade"] .spotlight-art img { object-position: center 52%; }
[data-theme="arcade"] .discovery .game-card img { aspect-ratio: 1; }
[data-theme="arcade"] .section-head h2 { border-left: 4px solid var(--accent); padding-left: 12px; }

[data-theme="pop"] .home-lead { padding: clamp(18px, 4vw, 46px); margin-bottom: 18px; background: #f9e3ff; border: 1px solid #e7c6ed; border-radius: var(--radius); }
[data-theme="pop"] .home-lead h1 { color: #452271; }
[data-theme="pop"] .feature-shell { grid-template-columns: minmax(0,1fr); }
[data-theme="pop"] .spotlight { border: 2px solid #65423d; box-shadow: 0 5px 0 #65423d; border-radius: 28px 28px 20px 20px; }
[data-theme="pop"] .spotlight-slide { grid-template-columns: 1fr 1fr; align-items: center; min-height: clamp(232px,34vw,330px); }
[data-theme="pop"] .spotlight-art { position: relative; grid-column: 2; grid-row: 1; z-index: auto; align-self: stretch; overflow: hidden; margin: 16px; border: 2px solid #65423d; border-radius: 24px 10px 24px 10px; }
[data-theme="pop"] .spotlight-art img { position: absolute; inset: 0; }
[data-theme="pop"] .spotlight-copy { grid-column: 1; grid-row: 1; color: var(--ink); }
[data-theme="pop"] .spotlight-slide::after, [data-theme="editorial"] .spotlight-slide::after, [data-theme="garden"] .spotlight-slide::after { display: none; }
[data-theme="pop"] .quick-picks { background: transparent; padding: 12px 0 0; border: 0; }
[data-theme="pop"] .tray-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
[data-theme="pop"] .tray-card a { background: #f9e3ff; }
[data-theme="pop"] .discovery .game-card:nth-child(3n+2) a { background: #ffe8a4; }
[data-theme="pop"] .discovery .game-card:nth-child(3n+3) a { background: #f9e3ff; }

[data-theme="editorial"] .site-header { background: transparent; }
[data-theme="editorial"] .home-lead { grid-template-columns: 1fr; justify-items: center; text-align: center; }
[data-theme="editorial"] .home-lead h1, [data-theme="garden"] .home-lead h1 { letter-spacing: -.05em; font-weight: 600; }
[data-theme="editorial"] .home-lead p { margin-inline: auto; }
[data-theme="editorial"] .search-form { width: min(100%,440px); }
[data-theme="editorial"] .feature-shell { padding: 12px 0; border-block: 1px solid var(--edge); grid-template-columns: minmax(0,1.85fr) minmax(0,1fr); }
[data-theme="editorial"] .spotlight-slide { grid-template-columns: 1fr 1fr; align-items: center; min-height: 310px; }
[data-theme="editorial"] .spotlight-art { position: relative; z-index: auto; align-self: stretch; }
[data-theme="editorial"] .spotlight-art img { position: absolute; inset: 0; }
[data-theme="editorial"] .spotlight-copy { padding-inline: clamp(15px,2.6vw,35px); }
[data-theme="editorial"] .quick-picks { border: 0; background: transparent; }
[data-theme="editorial"] .tray-card a { background: transparent; border-bottom: 1px solid var(--edge); }
[data-theme="editorial"] .section-head { border-bottom: 1px solid var(--edge); padding-bottom: 11px; }
[data-theme="editorial"] .game-card a { background: transparent; border: 0; }
[data-theme="editorial"] .game-card span { padding-inline: 0; border-bottom: 1px solid var(--edge); }

[data-theme="arena"] .site-header { border-bottom: 2px solid var(--accent); }
[data-theme="arena"] .home-lead h1 { font-weight: 900; text-transform: uppercase; line-height: .98; }
[data-theme="arena"] .feature-shell { grid-template-columns: minmax(0,1fr); gap: 11px; }
[data-theme="arena"] .spotlight { border-top: 5px solid var(--accent); }
[data-theme="arena"] .spotlight-slide { min-height: clamp(275px,33vw,405px); align-items: center; }
[data-theme="arena"] .spotlight-art { left: 30%; }
[data-theme="arena"] .spotlight-art img { object-position: 58% 46%; }
[data-theme="arena"] .spotlight-slide::after { background: linear-gradient(77deg,#241922 0% 29%, #241922d6 45%, #24192247 69%, transparent 88%); }
[data-theme="arena"] .spotlight-copy { max-width: 60%; }
[data-theme="arena"] .quick-picks { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 14px; padding: 9px; }
[data-theme="arena"] .quick-picks h2 { margin: 0; padding-inline: 9px; }
[data-theme="arena"] .tray-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
[data-theme="arena"] .section-head h2 { text-transform: uppercase; font-weight: 850; }
[data-theme="arena"] .discovery .game-card img { aspect-ratio: 1.45; }
[data-theme="arena"] .game-card a { border-top: 2px solid var(--accent); }

[data-theme="garden"] .site-header { background: #f8fcf5; }
[data-theme="garden"] .home-lead { grid-template-columns: 1fr; justify-items: start; gap: 16px; }
[data-theme="garden"] .search-form { width: min(100%,380px); }
[data-theme="garden"] .feature-shell { grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); align-items: stretch; }
[data-theme="garden"] .spotlight-slide { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items: center; min-height: clamp(245px, 31vw, 350px); }
[data-theme="garden"] .spotlight-art { z-index: auto; position: relative; grid-row: 1; grid-column: 2; margin: 10px 17px 10px 0; border-radius: 45% 45% 20px 20px; overflow: hidden; }
[data-theme="garden"] .spotlight-art img { height: auto; aspect-ratio: .85; }
[data-theme="garden"] .spotlight-copy { color: var(--feature-ink); grid-row: 1; grid-column: 1; }
[data-theme="garden"] .quick-picks { border-radius: var(--radius); }
[data-theme="garden"] .tray-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
[data-theme="garden"] .tray-card a { display: flex; flex-direction: column; align-items: start; padding: 7px; gap: 6px; font-size: .86rem; }
[data-theme="garden"] .tray-card img { aspect-ratio: 1.82; }
[data-theme="garden"] .tray-card b { display: none; }
[data-theme="garden"] .discovery .game-card:nth-child(2n) a { background: var(--surface-alt); }
[data-theme="garden"] .category-section { border-top: 1px solid var(--edge); padding-top: 20px; }

.page-lead { margin-bottom: clamp(20px, 4vw, 38px); }
.page-lead .updated { font-size: .88rem; }
.information-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.info-panel, .policy-content, .play-guide, .detail-hero { padding: clamp(16px, 4vw, 38px); border-radius: var(--radius); border: 1px solid var(--edge); background: var(--surface); min-width: 0; }
.info-panel p, .play-guide p, .policy-content p { margin-top: 10px; }
.info-panel .button { margin-top: 16px; }
.info-panel a, .policy-content a { overflow-wrap: anywhere; }
.policy-layout { display: grid; grid-template-columns: minmax(0,220px) minmax(0,800px); gap: 22px; }
.policy-index { align-self: start; display: grid; gap: 8px; padding: 13px 15px; border-left: 2px solid var(--accent); }
.policy-content section + section { border-top: 1px solid var(--edge); padding-top: 25px; margin-top: 25px; }
.policy-content h2, .info-panel h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
.policy-content ul, .play-guide ol { padding-left: 1.35rem; }
.policy-content li + li, .play-guide li + li { margin-top: 8px; }
.detail-hero { display: grid; grid-template-columns: minmax(0,260px) minmax(0,1fr); align-items: center; gap: clamp(16px, 4vw, 44px); }
.detail-art:has(img[hidden]) { display: none; }
.detail-hero:has(img[hidden]) { grid-template-columns: minmax(0,1fr); }
.detail-art img { width: 100%; max-width: 260px; aspect-ratio: 1; height: auto; object-fit: cover; border-radius: var(--cover-radius); }
.detail-copy h1 { font-size: clamp(2rem, 5vw, 3.8rem); }
.play-guide { max-width: 860px; }
[data-theme="arena"] .detail-hero { border-left: 4px solid var(--accent); }
[data-theme="garden"] .detail-hero { background: var(--surface-alt); }
[data-theme="editorial"] .detail-hero { background: transparent; }
.player-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.player-toolbar h1 { font-size: clamp(1.55rem, 4vw, 3.2rem); overflow-wrap: anywhere; }
.player-toolbar + p, .player-frame + p { margin-block: 10px; }
.player-frame { width: 100%; margin-top: 14px; background: #0c1018; border: 1px solid var(--edge); }
.player-frame iframe { display: block; border: 0; width: 100%; height: clamp(420px,76svh,850px); }
#catalog-status { margin-bottom: 14px; }
.site-footer { padding: 24px 0; background: var(--surface); border-top: 1px solid var(--edge); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 13px 22px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-inner nav a { color: var(--ink); font-size: .925rem; }
.footer-inner small { color: var(--muted); }

@media (max-width: 1000px) {
  .game-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  [data-theme="arcade"] .discovery, [data-theme="garden"] .discovery { grid-template-columns: repeat(3,minmax(0,1fr)); }
  [data-theme="arena"] .quick-picks { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 820px) {
  .site-main, .header-inner, .footer-inner { width: min(calc(100% - 36px),var(--layout)); }
  .header-inner { min-height: 62px; }
  .brand img { width: 126px; }
  .desktop-categories { display: none; }
  .category-toggle { display: inline-flex !important; }
  .home-lead { grid-template-columns: minmax(0,1fr); gap: 15px; }
  .search-form { width: min(100%,460px); }
  .feature-shell, [data-theme="editorial"] .feature-shell, [data-theme="garden"] .feature-shell { grid-template-columns: minmax(0,1fr); }
  .tray-grid, [data-theme="pop"] .tray-grid, [data-theme="arena"] .tray-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  [data-theme="garden"] .tray-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  [data-theme="garden"] .spotlight-art img { max-height: 230px; object-position: center; }
  .policy-layout { grid-template-columns: minmax(0,1fr); }
  .policy-index { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 540px) {
  .site-main, .header-inner, .footer-inner { width: calc(100% - 28px); }
  .game-grid, [data-theme="arcade"] .discovery, [data-theme="garden"] .discovery { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .feature-shell { gap: 12px; }
  .spotlight-slide { min-height: 270px; }
  .spotlight-copy h2 { font-size: clamp(1.45rem, 6.8vw, 2.25rem); }
  .spotlight-copy .button { padding-inline: 9px; }
  [data-theme="pop"] .spotlight-slide, [data-theme="garden"] .spotlight-slide, [data-theme="editorial"] .spotlight-slide { min-height: 220px; }
  [data-theme="pop"] .spotlight-art { margin: 8px; }
  [data-theme="arena"] .spotlight-copy { max-width: 78%; }
  [data-theme="garden"] .spotlight-art { margin-right: 10px; }
  [data-theme="garden"] .tray-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .tray-card a { grid-template-columns: 34px minmax(0,1fr); gap: 6px; font-size: .82rem; }
  .tray-card b { display: none; }
  .detail-hero, .information-layout { grid-template-columns: minmax(0,1fr); }
  .detail-art img { width: min(58%,160px); }
  .footer-inner { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Category shelves */
.category-section {
  margin-top: var(--category-section-space);
  scroll-margin-top: 20px;
}
.shelf-head { align-items: end; gap: 14px; margin-bottom: clamp(17px, 2.3vw, 27px); }
.shelf-head > div { min-width: 0; }
.shelf-head p { margin-top: 7px; color: var(--muted); max-width: 50ch; }
.shelf-head .section-link { margin-bottom: 3px; }
.shelf-grid {
  --shelf-row-columns: var(--shelf-columns);
  --shelf-gap: clamp(12px, 1.6vw, 22px);
  grid-template-columns: repeat(var(--shelf-row-columns), minmax(0, 1fr));
  gap: var(--shelf-gap);
  max-width: calc(var(--shelf-row-columns) * 228px + (var(--shelf-row-columns) - 1) * var(--shelf-gap));
}
.shelf-grid .game-card img { aspect-ratio: 1.38; }
.shelf-grid .game-card span { padding: 10px 12px 12px; min-height: 2.6rem; }
.shelf-spotlight {
  display: grid;
  grid-template-columns: minmax(245px, .9fr) minmax(0, 1.7fr);
  gap: clamp(15px, 2.3vw, 29px);
}
.shelf-spotlight > .shelf-grid { max-width: none; }
@media (min-width: 961px) {
  .shelf-spotlight > .shelf-grid {
    --minimum-game-rows: 2;
    grid-auto-rows: 1fr;
  }
  .shelf-spotlight > .shelf-feature > a {
    display: flex;
    flex-direction: column;
  }
  .shelf-spotlight > .shelf-feature img {
    flex: 1 0 0;
    min-height: 150px;
    aspect-ratio: auto;
  }
}

.shelf-feature { min-width: 0; }
.shelf-feature > a {
  display: grid;
  height: 100%;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
}
.shelf-feature > a:hover h3, .shelf-digest a:hover strong { color: var(--accent); }
.shelf-feature img { width: 100%; height: auto; aspect-ratio: 1.72; object-fit: cover; min-width: 0; }
.shelf-feature-copy { display: grid; gap: 8px; padding: clamp(13px, 2.2vw, 22px); align-content: center; min-width: 0; }
.shelf-feature-copy h3 { font-size: clamp(1.25rem, 2.8vw, 1.95rem); line-height: 1.13; overflow-wrap: anywhere; }
.shelf-feature-copy p, .shelf-digest p { color: var(--muted); font-size: .9rem; line-height: 1.42; }
.shelf-feature-copy span { color: var(--accent); font-size: .85rem; font-weight: 730; }
.shelf-feature-copy span b { margin-left: 3px; font-weight: inherit; }
.shelf-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(13px, 2vw, 23px); }
.shelf-pair .shelf-feature > a { grid-template-columns: minmax(118px, .72fr) minmax(0, 1.28fr); min-height: 158px; }
.shelf-pair .shelf-feature img { height: 100%; aspect-ratio: auto; max-height: 220px; }
.shelf-pair + .shelf-grid, .shelf-pair-tail { margin-top: clamp(14px, 2vw, 23px); }
.shelf-pair-tail { display: grid; grid-template-columns: repeat(var(--shelf-columns),minmax(0,1fr)); gap: 12px; }
.shelf-pair-tail .tray-card a { border: 1px solid var(--edge); background: var(--surface); }
.shelf-pair-tail .tray-card img { aspect-ratio: 1.2; }
@media (max-width: 760px) { .shelf-pair-tail { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.shelf-digest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; list-style: none; margin: 0; padding: 0; }
.shelf-digest li { min-width: 0; }
.shelf-digest a {
  display: grid;
  align-items: center;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 13px;
  height: 100%;
  padding: 9px 13px 9px 9px;
  border: 1px solid var(--edge);
  border-radius: var(--cover-radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.shelf-digest img { width: 100%; height: auto; aspect-ratio: 1.13; object-fit: cover; border-radius: var(--cover-radius); }
.shelf-digest strong { display: block; line-height: 1.22; overflow-wrap: anywhere; }
.shelf-digest p { margin-top: 4px; overflow-wrap: anywhere; }
.shelf-digest b { color: var(--accent); font-weight: 700; }

[data-theme="arcade"] .shelf--spotlight .shelf-feature > a {
  background: linear-gradient(145deg, #1a2c47, var(--surface));
  border-color: #385477;
}
[data-theme="arcade"] .shelf--digest .shelf-digest a { background: #152135; }

[data-theme="pop"] .shelf--pair {
  padding: clamp(16px, 3vw, 32px);
  background: #ffefcb;
  border: 1px solid #efd6a3;
  border-radius: var(--radius);
}
[data-theme="pop"] .shelf--pair .shelf-feature:nth-child(2) > a { background: #fbebff; border-color: #e7c6ed; }
[data-theme="pop"] .shelf--spotlight .shelf-feature > a { background: #f9e3ff; border-color: #e7c6ed; }
[data-theme="pop"] .shelf--gallery .game-card:nth-child(even) a { background: #fff1d2; }

[data-theme="editorial"] .shelf-head { border-bottom: 1px solid var(--edge); padding-bottom: 13px; }
[data-theme="editorial"] .shelf-digest { gap: 0 34px; }
[data-theme="editorial"] .shelf-digest a { background: transparent; border: 0; border-bottom: 1px solid var(--edge); padding: 12px 3px 12px 0; }
[data-theme="editorial"] .shelf-feature > a { background: #ede8dc; border: 0; }
[data-theme="editorial"] .shelf--spotlight .shelf-spotlight { grid-template-columns: minmax(0, 1.7fr) minmax(245px, .9fr); }
[data-theme="editorial"] .shelf-spotlight > .shelf-feature { grid-column: 2; grid-row: 1; }
[data-theme="editorial"] .shelf-spotlight > .shelf-grid { grid-column: 1; grid-row: 1; }
[data-theme="editorial"] .shelf--gallery .shelf-grid .game-card img { aspect-ratio: 1.52; }

[data-theme="arena"] .shelf--spotlight {
  background: #221f2a;
  border-top: 3px solid var(--accent);
  padding: clamp(15px, 3vw, 31px);
}
[data-theme="arena"] .shelf-feature > a { background: #302532; }
[data-theme="arena"] .shelf-digest a { border-left: 2px solid #8c5d48; }
[data-theme="arena"] .shelf-grid .game-card img { aspect-ratio: 1.52; }

[data-theme="garden"] .shelf--pair, [data-theme="garden"] .shelf--spotlight {
  padding: clamp(16px, 3vw, 32px);
  background: #e0efe4;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
[data-theme="garden"] .shelf--pair .shelf-feature:nth-child(2) > a { background: #f1f9ef; }
[data-theme="garden"] .shelf-digest a { border-radius: 19px; }
[data-theme="garden"] .shelf-grid .game-card img { aspect-ratio: 1.28; }

@media (max-width: 1040px) {
  .shelf-grid { --shelf-row-columns: var(--shelf-tablet-columns); }
}
@media (max-width: 960px) {
  .shelf-spotlight,
  [data-theme="editorial"] .shelf--spotlight .shelf-spotlight {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-theme="editorial"] .shelf-spotlight > .shelf-feature,
  [data-theme="editorial"] .shelf-spotlight > .shelf-grid { grid-area: auto; }
  .shelf-spotlight .shelf-feature > a { grid-template-columns: minmax(112px, .7fr) minmax(0, 1.3fr); }
  .shelf-spotlight .shelf-feature img { height: 100%; max-height: 200px; aspect-ratio: auto; }
}
@media (max-width: 760px) {
  .shelf-pair { grid-template-columns: minmax(0, 1fr); }
  .shelf-pair .shelf-feature > a { min-height: 132px; }
  .shelf-digest { gap: 10px; }
  .shelf-digest a { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 8px; padding: 7px; }
}
@media (max-width: 540px) {
  .shelf-head { align-items: flex-start; gap: 7px; flex-wrap: wrap; }
  .shelf-head > div { flex: 1 1 138px; }
  .shelf-head .section-link { margin-top: 3px; }
  .shelf-head p { font-size: .88rem; }
  .shelf-grid { --shelf-row-columns: 2; }
  .shelf-grid .game-card span { font-size: .87rem; padding: 8px; }
  .shelf-pair .shelf-feature > a, .shelf-spotlight .shelf-feature > a { grid-template-columns: minmax(74px, .66fr) minmax(0, 1.34fr); }
  .shelf-digest { grid-template-columns: minmax(0, 1fr); }
  .shelf-digest a { grid-template-columns: 63px minmax(0, 1fr) auto; gap: 10px; }
  .shelf-feature-copy { padding: 10px; gap: 6px; }
}

/* Game details */
.detail-page .detail-nav { margin-bottom: clamp(14px, 2vw, 23px); }
.detail-nav a { font-weight: 720; text-decoration: none; }
.detail-nav a:hover { text-decoration: underline; }
.detail-nav a span { margin-right: 6px; }
.detail-page .detail-hero {
  grid-template-columns: minmax(0, 230px) minmax(0, 1fr);
  grid-template-areas: "art copy";
  padding: clamp(18px, 4.6vw, 55px);
  gap: clamp(24px, 4.5vw, 55px);
}
.detail-page .detail-hero:has(img[hidden]) { grid-template-areas: "copy"; grid-template-columns: minmax(0, 1fr); }
.detail-page .detail-art { grid-area: art; }
.detail-page .detail-art img { max-width: 230px; }
.detail-page .detail-copy { grid-area: copy; min-width: 0; }
.detail-genre {
  display: inline-flex;
  padding: 3px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--surface-alt);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 750;
}
.detail-page .detail-copy > p { max-width: 68ch; margin-top: 14px; }
.detail-page .detail-copy .action-row { margin-top: 22px; }
.detail-page #play-link { min-height: 49px; padding-inline: 19px; max-width: 100%; overflow-wrap: anywhere; text-align: center; }
#play-icon { margin-right: 4px; font-size: .86rem; }
.detail-columns { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(200px, 1fr); align-items: start; gap: clamp(19px, 3vw, 34px); margin-top: clamp(25px, 4vw, 52px); }
.detail-columns .play-guide { max-width: none; margin: 0; min-width: 0; }
.detail-columns h2 { font-size: clamp(1.4rem, 3vw, 2.25rem); }
.detail-columns .play-guide ol {
  counter-reset: game-steps;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.detail-columns .play-guide li {
  counter-increment: game-steps;
  position: relative;
  margin: 0;
  padding: 12px 0 12px 45px;
  min-height: 47px;
  border-top: 1px solid var(--edge);
  overflow-wrap: anywhere;
}
.detail-columns .play-guide li::before {
  content: counter(game-steps);
  position: absolute;
  top: 11px;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--accent);
  font-weight: 750;
}
.detail-columns .play-guide li strong { display: block; line-height: 1.27; margin-bottom: 3px; }
.detail-columns .play-guide li strong + span { display: block; color: var(--muted); }
.game-facts {
  padding: clamp(16px, 3vw, 28px);
  min-width: 0;
  background: var(--surface-alt);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
.game-facts h2 { font-size: clamp(1.2rem, 2.4vw, 1.65rem); }
.game-facts dl { margin: 12px 0 16px; }
.game-facts dl > div { padding: 8px 0; border-bottom: 1px solid var(--edge); }
.game-facts dt { color: var(--muted); font-size: .82rem; }
.game-facts dd { margin: 0; overflow-wrap: anywhere; font-weight: 650; }
.game-facts a { font-size: .91rem; font-weight: 675; }
.detail-related { margin-top: clamp(37px, 6vw, 75px); }
.detail-related .game-grid { max-width: calc(var(--related-columns, 6) * 224px + (var(--related-columns, 6) - 1) * 20px); grid-template-columns: repeat(var(--related-columns, 6), minmax(0, 1fr)); }

[data-theme="arcade"] .detail-page .detail-hero { background: radial-gradient(ellipse at left, #203a5e, transparent 65%), var(--surface); }
[data-theme="arcade"] .detail-page .detail-art img { border: 1px solid #4c6386; }
[data-theme="pop"] .detail-page .detail-hero {
  background: #f9e3ff;
  border-color: #e7c6ed;
  grid-template-columns: minmax(0, 1fr) minmax(0, 210px);
  grid-template-areas: "copy art";
}
[data-theme="pop"] .detail-page .detail-hero:has(img[hidden]) { grid-template-areas: "copy"; grid-template-columns: minmax(0, 1fr); }
[data-theme="pop"] .detail-page .detail-art img { border-radius: 22px 11px 22px 11px; border: 2px solid #65423d; }
[data-theme="editorial"] .detail-page .detail-hero { border: 0; border-block: 1px solid var(--edge); padding-inline: 0; }
[data-theme="editorial"] .detail-columns .play-guide { border: 0; padding-inline: 0; background: transparent; }
[data-theme="editorial"] .detail-genre { border-radius: 0; }
[data-theme="arena"] .detail-page .detail-hero { border-left: 4px solid var(--accent); background: linear-gradient(102deg, #342634, var(--surface) 72%); }
[data-theme="arena"] .detail-page .detail-copy h1 { font-weight: 900; }
[data-theme="arena"] .detail-columns .play-guide li::before { border-radius: 4px; }
[data-theme="garden"] .detail-page .detail-hero { background: #dceee2; }
[data-theme="garden"] .detail-page .detail-art img { border-radius: 34% 34% 20px 20px; }
[data-theme="garden"] .game-facts { background: #f3f9ef; }

@media (min-width: 701px) {
  [data-theme="editorial"] .detail-columns {
    grid-template-columns: minmax(190px, 1fr) minmax(0, 2.45fr);
    grid-template-areas: "facts guide";
  }
  [data-theme="editorial"] .detail-columns .play-guide { grid-area: guide; }
  [data-theme="editorial"] .game-facts { grid-area: facts; }
}
@media (min-width: 1140px) {
  [data-theme="arena"] .detail-columns .play-guide ol { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  [data-theme="arena"] .detail-columns .play-guide li { border: 1px solid var(--edge); padding: 13px 10px 13px 47px; min-height: 82px; }
  [data-theme="arena"] .detail-columns .play-guide li::before { top: 13px; left: 9px; }
}
@media (max-width: 1040px) {
  .detail-related .game-grid { grid-template-columns: repeat(min(4, var(--related-columns, 6)), minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .detail-columns { grid-template-columns: minmax(0, 1fr); }
  .detail-page .detail-hero, [data-theme="pop"] .detail-page .detail-hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "art" "copy";
    gap: 17px;
  }
  .detail-page .detail-art img { width: clamp(111px, 38vw, 160px); }
}
@media (max-width: 540px) {
  .site-main.detail-page { padding-top: 22px; }
  .detail-related .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-page .detail-copy .action-row { margin-top: 16px; }
  .detail-columns .play-guide li { padding-left: 39px; }
}

/* Search and category pages keep all results and balance the last row. */
.flowing-game-grid {
  --result-columns: 6;
  --result-gap: clamp(9px, 1.6vw, 20px);
  display: flex;
  flex-wrap: wrap;
  gap: var(--result-gap);
}
.flowing-game-grid > .game-card {
  flex: 1 0 calc((100% - (var(--result-columns) - 1) * var(--result-gap)) / var(--result-columns));
  container-type: inline-size;
}
@container (min-width: 270px) {
  .flowing-game-grid .game-card a {
    display: grid;
    grid-template-columns: minmax(95px, min(43%, 160px)) minmax(0, 1fr);
    align-items: center;
  }
  .flowing-game-grid .game-card img { aspect-ratio: 1.25; }
}
@media (max-width: 1000px) {
  .flowing-game-grid { --result-columns: 4; }
  .game-grid.discovery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .flowing-game-grid { --result-columns: 2; }
  .game-grid.discovery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Ads sit in their own wrappers between the existing page sections. */
.adx-slot {
  display: grid;
  justify-items: center;
  margin-block: 50px;
}
.adx-slot--page-top {
  margin-block-start: calc(50px - var(--space));
}
.adx-slot--home-second {
  margin-block-end: calc(50px - var(--category-section-space));
}
@media (max-width: 540px) {
  .detail-page .adx-slot--page-top { margin-block-start: calc(50px - 22px); }
}
