/* ---------- per-game pages (built by _build_games.py; site.css comes first) ---------- */
.game-page .nav { background: rgba(11, 14, 23, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.game-page .lang { text-decoration: none; color: var(--text); }

.g-hero { position: relative; overflow: hidden; isolation: isolate; padding: 120px var(--pad) clamp(48px, 9vh, 96px); }
/* the game's own key art, blurred into an ambient glow behind the header */
.g-glow { position: absolute; inset: -10%; z-index: -1; background: center/cover no-repeat; filter: blur(70px) saturate(1.3); opacity: .38; }
.g-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 14, 23, .35), var(--bg) 96%); }
.g-wrap { width: min(var(--max), 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(28px, 5vw, 72px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.g-hero .game-head { gap: 20px; margin-bottom: 24px; }
.g-hero .game-head img { width: 96px; height: 96px; border-radius: 24px; }
.g-hero h1 { font-size: clamp(40px, 5vw, 72px); font-weight: 800; letter-spacing: -.04em; }
.g-hero .lead { margin: 0 0 28px; max-width: 32em; font-size: clamp(17px, 1.35vw, 20px); color: var(--muted); }
.g-hero .meta { margin: 18px 0 0; font-size: 14px; color: var(--faint); }
.g-art { margin: 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 40px 90px -40px color-mix(in srgb, var(--accent) 60%, #000); }
.g-art img { width: 100%; height: auto; }

.game-page main > section:not(.g-hero) { width: min(var(--max), 100% - 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.game-page h2 { font-size: clamp(28px, 3vw, 42px); margin-bottom: 22px; }

.g-media { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: clamp(64px, 11vh, 120px); }
.g-media video { height: min(62vh, 560px); max-width: 100%; border-radius: 20px; background: #000; border: 1px solid var(--line); }
.shots { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.shots img { height: min(52vh, 460px); width: auto; flex: none; border-radius: 18px; scroll-snap-align: start; border: 1px solid var(--line); max-width: none; }
/* landscape games: the trailer takes the full width, screenshots run in a row below it */
.g-media.wide { grid-template-columns: 1fr; }
.g-media.wide video { justify-self: start; width: min(100%, calc(66vh * 16 / 9)); height: auto; }
.g-media.wide .shots img { height: min(28vh, 240px); }

.g-about, .g-legal { max-width: 800px; }
.game-page main > .g-about, .game-page main > .g-legal { width: min(800px, 100% - 2 * var(--pad)); margin-bottom: clamp(64px, 11vh, 120px); }
.desc h3 { margin: 32px 0 10px; font-size: 21px; font-weight: 700; }
.desc p { margin: 0 0 14px; color: var(--muted); font-size: 17px; overflow-wrap: anywhere; }
.desc ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.desc li { position: relative; padding-left: 24px; margin: 0 0 9px; color: var(--muted); font-size: 17px; }
.desc li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 9px; height: 10px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }

.g-legal > p { color: var(--muted); margin: 0 0 20px; }
.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.doc { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform .35s var(--ease), border-color .3s; }
.doc:hover { transform: translateY(-2px); border-color: var(--line2); }
.doc b { font-weight: 600; }
.doc small { flex-basis: 100%; color: var(--faint); font-size: 14px; }
.doc span { color: var(--faint); }

.minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mini { display: block; overflow: hidden; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: transform .4s var(--ease), border-color .3s; }
.mini:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.mini-art { width: 100%; height: auto; aspect-ratio: 1280 / 625; object-fit: cover; }
.mini-body { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.mini-body img { width: 44px; height: 44px; border-radius: 12px; }
.mini b { display: block; font-weight: 700; font-size: 17px; }
.mini small { color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* sticky download bar on phones (js/store-pick.js) */
.dl-bar { position: fixed; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px;
  border-radius: 20px; background: rgba(21, 25, 38, .95); border: 1px solid var(--line2); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  translate: 0 140%; transition: translate .5s var(--ease); }
.dl-bar.show { translate: 0 0; }
.dl-bar img { width: 40px; height: 40px; border-radius: 11px; }
.dl-bar b { flex: 1; font-weight: 600; font-size: 15px; line-height: 1.2; }
.dl-bar .store { box-shadow: none; }

@media (max-width: 960px) {
  .g-wrap { grid-template-columns: 1fr; }
  .g-art { order: -1; }
  .g-media { grid-template-columns: 1fr; }
  .g-media video { height: auto; width: 100%; max-height: 70vh; }
  .shots img { height: 300px; }
  .g-media.wide .shots img { height: 170px; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) { .g-hero { padding-top: 96px; } }
@media (max-width: 560px) {
  .minis { grid-template-columns: 1fr; }
  .g-hero .game-head img { width: 72px; height: 72px; border-radius: 18px; }
}

/* language menu (every language the game page exists in) */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; translate: 0 -2px; transition: rotate .25s; }
.lang-menu[open] summary::after { rotate: 225deg; translate: 0 2px; }
.lang-list { position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; display: grid; min-width: 210px; max-height: 72vh; overflow: auto; padding: 8px;
  border-radius: 16px; background: var(--card); border: 1px solid var(--line2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.lang-list a { padding: 9px 12px; border-radius: 10px; font-size: 15px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.lang-list a:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.lang-list a[aria-current] { color: var(--text); background: rgba(69, 214, 207, .14); }
@media (max-width: 860px) { .lang-menu { margin-left: auto; } }
