/* The GAMES tab: /games/ (every game) and /games/<id>/ (a game you can play in the browser). */
.games-page, .play-page { padding: 48px 0 72px; }
.games-page h1, .play-page h1 { font: 400 clamp(22px, 3vw, 36px)/1.35 var(--ia-pixel); color: #fff; text-shadow: 3px 3px 0 var(--ia-plum); }
.games-page h1 span { display: block; }
.games-page .kicker, .play-page .kicker { margin-bottom: 14px; }
.games-page .kicker a, .play-page .kicker a { color: var(--ia-pink); text-decoration: none; }
.lead { max-width: 34em; font-size: 19px; color: var(--ia-soft); margin-top: 16px; }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 32px 20px; margin-top: 40px; }
.g-card { display: flex; flex-direction: column; gap: 8px; }
.g-card h3 { font: 400 13px/1.4 var(--ia-pixel); color: #fff; margin-top: 6px; }
.g-card p { color: var(--ia-muted); font-size: 15px; }
.g-card .tag { font: 600 11px/1.3 var(--ia-sans); letter-spacing: 0.08em; color: var(--ia-accent); }
.g-shot { position: relative; display: block; border-radius: 18px; overflow: hidden; border: 2px solid var(--ia-line-2); aspect-ratio: 9 / 16; background: var(--ia-surface); }
.g-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.g-web .g-shot { border-color: var(--ia-pink); box-shadow: 0 0 0 4px rgba(244, 70, 138, 0.18); }
.g-badge { position: absolute; left: 10px; top: 10px; padding: 6px 10px; border-radius: 999px; background: var(--ia-pink-btn); color: #fff; font: 400 9px/1 var(--ia-pixel); }
.g-play { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--ia-pink-btn); color: #fff !important; font: 400 10px/1.2 var(--ia-pixel); text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--ia-pink-deep); }
.g-play:hover { background: var(--ia-pink); }
.g-app { font: 600 12px/1 var(--ia-sans); letter-spacing: 0.08em; color: var(--ia-muted); padding: 12px 0; }
.play-wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.play-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.play-side .how { background: var(--ia-surface); border: 2px solid var(--ia-line-2); border-radius: 14px; padding: 18px; }
.play-side .how h2 { font: 400 11px/1.4 var(--ia-pixel); color: var(--ia-pink); margin-bottom: 10px; }
.play-side .how p { color: var(--ia-muted); font-size: 16px; line-height: 1.6; }
.play-side .how p + p { margin-top: 10px; }
.play-side .how b { color: #fff; }
.play-side .note { color: var(--ia-muted); font-size: 14px; }
.play-frame { flex: 0 1 auto; width: min(100%, calc((100vh - 140px) * 9 / 16), 480px); aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; border: 3px solid var(--ia-line-2); background: #130417; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); margin: 0 auto; }
.play-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .play-frame { width: 100%; max-height: none; } .play-side { order: 2; } }
/* Landscape games (and the party tables) get a wide frame. */
.play-frame.wide { aspect-ratio: 16 / 9; width: min(100%, calc((100vh - 140px) * 16 / 9), 1100px); }
.play-wrap:has(.play-frame.wide) { flex-direction: column; }
.play-wrap:has(.play-frame.wide) .play-side { flex: 0 0 auto; order: 2; }
.g-noshot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; text-align: center;
  font: 400 14px/1.5 var(--ia-pixel); color: #fff; background: radial-gradient(120% 80% at 50% 0%, var(--ia-pink-deep), var(--ia-surface) 70%); }
@media (max-width: 700px) { .play-frame.wide { width: 100%; } }

/* ---- GoalMine Arcade's cards, in Infinity colours (/games/) ---- */
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 32px; }
.gm-card { display: flex; flex-direction: column; background: var(--ia-surface); border: 1px solid var(--ia-line-2); border-radius: 20px; overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.2s, border-color 0.2s; }
.gm-card:hover { transform: translateY(-3px); border-color: rgba(244, 70, 138, 0.45); }
.gm-shot { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.gm-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-noshot { position: absolute; inset: 0; display: grid; place-items: center; font: 400 14px/1.4 var(--ia-pixel); color: #fff; background: radial-gradient(120% 90% at 50% 0%, var(--ia-pink-deep), var(--ia-surface) 70%); }
.gm-body { padding: 14px 16px 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gm-body h3 { flex: 1 1 100%; margin: 0; font: 400 20px/1.05 var(--ia-pixel); font-size: 14px; color: #fff; }
.gm-body p { flex: 1; margin: 0; color: var(--ia-muted); font-weight: 600; font-size: 15px; }
.gm-play { background: var(--ia-pink-btn); color: #fff; font-weight: 800; border-radius: 999px; padding: 8px 18px; font-size: 14px; }
.gm-card:hover .gm-play { background: var(--ia-pink); }
.gm-types { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 16px 16px; }
.gm-types span, .ov-chips span { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--ia-plum); border: 1px solid var(--ia-line-2); color: var(--ia-muted); }

/* ---- A game's page: GoalMine Arcade's App Store-style sheet, as a page ---- */
.ov { padding: 28px 0 72px; }
.ov-wrap { max-width: 860px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 18px; }
.ov .kicker a { color: var(--ia-pink); text-decoration: none; }
.ov-hero { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; border: 1px solid var(--ia-line-2); }
.ov-hero > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ov-hero-shots { display: flex; align-items: center; justify-content: center; gap: 3%; padding: 4% 4%; }
.ov-hero-shots .ov-back { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(18px) brightness(0.45); transform: scale(1.1); }
.ov-hero-shots .ov-shot { position: relative; height: 100%; width: auto; max-width: 30%; object-fit: contain; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55); }
.ov-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ov-icon { width: 76px; height: 76px; border-radius: 20px; object-fit: cover; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.ov-tt { flex: 1; min-width: 200px; }
.ov-tt h1 { margin: 0; font: 400 clamp(18px, 3vw, 26px)/1.25 var(--ia-pixel); color: #fff; }
.ov-tt p { margin: 6px 0 0; color: var(--ia-muted); font-weight: 600; font-size: 16px; }
.ov-play { background: var(--ia-pink-btn); color: #fff; border: 0; border-radius: 999px; padding: 14px 34px; font: 800 18px var(--ia-sans); cursor: pointer; box-shadow: 0 6px 20px rgba(244, 70, 138, 0.3); }
.ov-play:hover { background: var(--ia-pink); }
.ov-play:active { transform: scale(0.97); }
.ov-facts { display: flex; border: 1px solid var(--ia-line-2); border-radius: 16px; background: var(--ia-surface); }
.ov-facts div { flex: 1; min-width: 0; padding: 10px 6px; text-align: center; }
.ov-facts div + div { border-left: 1px solid var(--ia-line-2); }
.ov-facts b { display: block; font-size: 16px; font-weight: 800; color: #fff; }
.ov-facts span { display: block; font-size: 12px; color: var(--ia-muted); font-weight: 600; }
.ov-shots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.ov-shots img { flex: none; height: 240px; width: auto; border-radius: 14px; border: 1px solid var(--ia-line-2); scroll-snap-align: start; }
.ov-sec h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: #fff; }
.ov-sec p { margin: 0 0 8px; color: var(--ia-soft); font-size: 16px; line-height: 1.6; max-width: 65ch; }
.ov-sec b { color: #fff; }
.ov-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ov-note { color: var(--ia-muted); font-size: 14px; }
/* Playing: the game covers everything, full screen where the browser allows. */
.ov-layer { position: fixed; inset: 0; z-index: 1000; background: #000; }
.ov-layer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ov-close { position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(10, 10, 14, 0.6); color: #fff; font: 700 22px/1 var(--ia-sans); cursor: pointer; opacity: 0.6; }
.ov-close:hover { opacity: 1; }
/* Full screen, the game's own Home and the phone's back gesture (or Esc) are the way out: no
   second button over the game. It shows only when the browser wouldn't go full screen. */
.ov-layer:fullscreen .ov-close, .ov-layer:-webkit-full-screen .ov-close { display: none; }
html.ov-playing, html.ov-playing body { overflow: hidden; }
@media (max-width: 600px) { .ov-shots img { height: 190px; } .ov-play { width: 100%; } }
