/* Inter from gamejam.mx, the file and header the home page uses, so both read the same. */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
.game-page { margin: 0 auto 48px; padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right); }
/* Game first: one bar (brand, title, links), then the game, then the words about it.
   The game is sized so the words fit on the same screen: --below is their room.
   Short windows and phones give the game all the height. */
body:has(.game-page) { --bar: 56px; --below: 0px; }
@media (min-width: 1000px) and (min-height: 640px) { body:has(.game-page) { --below: 172px; } }
body:has(.game-page) .brand { gap: 10px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
body:has(.game-page) .brand img { width: 28px; height: 28px; border-radius: 7px; }
body:has(.game-page) .dev-link { padding: 10px 4px; color: var(--muted); font-size: .9375rem;
  font-weight: 500; text-decoration: none; white-space: nowrap; }
body:has(.game-page) .dev-link:hover { color: var(--text); }
body:has(.game-page) .wrap { max-width: 1680px; }
body:has(.game-page) .top { flex-wrap: wrap; gap: 8px 16px; min-height: var(--bar); padding: 8px 0; }
body:has(.game-page) .top h1 { flex: 1 1 auto; min-width: 0; font-size: 1.25rem; line-height: 1.2;
  letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:has(.game-page) .site-nav a { padding: 10px 4px; }
/* The platforms, as on the home page; this device is outlined. */
body:has(.game-page) .get-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
body:has(.game-page) .platforms { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
body:has(.game-page) .platform { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04);
  color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
body:has(.game-page) .platform:hover { color: var(--text); background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
body:has(.game-page) .platform:focus-visible { border-radius: 999px; }
body:has(.game-page) .platform svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
body:has(.game-page) .platform[aria-current] { color: var(--text); border-color: rgba(242,237,232,.7);
  background: rgba(255,255,255,.09); }
body:has(.game-page) .here-note { display: none; }
body:has(.game-page) .platform[aria-current] .here-note { display: inline; }
/* Cover and game share one 16:9 box; the words below line up with its edges. */
.stage { width: min(100%, calc((100svh - var(--bar) - 24px - var(--below)) * 16 / 9)); margin: 0 auto; }
.game-area { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; }
.game-area:not(.playing) { cursor: pointer; touch-action: manipulation; }
.game-area .art { width: 100%; height: 100%; object-fit: cover; }
.game-area .logo { position: absolute; left: 5%; bottom: 9%; width: min(36%, 400px);
  height: auto; filter: drop-shadow(0 4px 24px rgba(0,0,0,.55)); }
.game-area:not(.playing)::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,.35), transparent 45%); }
.game-area iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.play-button { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 34px 0 26px;
  border: 0; border-radius: 999px; background: #f2ede8; color: #0e0e18;
  font: 750 1.25rem Inter, system-ui, sans-serif; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 10px 36px rgba(0,0,0,.55); transition: transform .12s; }
.play-button svg { width: 26px; height: 26px; fill: currentColor; }
.play-button:hover, .game-area:hover .play-button { background: #fff; transform: translate(-50%, -50%) scale(1.05); }
.play-button:active { transform: translate(-50%, -50%) scale(.98); }
@media (prefers-reduced-motion: reduce) { .play-button { transition: none; }
  .play-button:hover, .game-area:hover .play-button, .play-button:active { transform: translate(-50%, -50%); } }
.play-button:focus-visible, .game-page button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* Full screen, in the corner where the Gamejam app shows its close button (48 px target,
   36 px circle, 4 px from the edges). Games keep that corner clear. */
.corner-button { position: absolute; z-index: 3; top: 4px; right: 4px; width: 48px; height: 48px;
  display: grid; place-items: center; padding: 0; border: 0; background: none; color: #fff;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.corner-button[hidden] { display: none; }
.corner-button::before { content: ""; position: absolute; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(14,14,24,.55); border: 1px solid rgba(255,255,255,.28); transition: background .12s; }
.corner-button:hover::before { background: rgba(14,14,24,.85); border-color: rgba(255,255,255,.6); }
.corner-button svg { position: relative; width: 18px; height: 18px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.corner-button .leave, .full .corner-button .enter { display: none; }
.full .corner-button .leave { display: inline; }
.corner-button:focus-visible { outline: none; }
.corner-button:focus-visible::before { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Full screen: the browser's own where it has one, else (iPhone) the box covers the page. */
.game-area:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; }
.game-area.expanded { position: fixed; z-index: 100; inset: 0; width: auto; height: 100%;
  aspect-ratio: auto; border: 0; border-radius: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.game-area.expanded .corner-button { top: calc(4px + env(safe-area-inset-top)); right: calc(4px + env(safe-area-inset-right)); }
html:has(.game-area.expanded) { overflow: hidden; }
#play-status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .corner-button::before { transition: none; } }
/* Under the game: what it is on the left; the right is kept for screenshots and trailers. */
.game-page .details { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 40px; margin-top: 16px; }
@media (min-width: 1000px) { .game-page .details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
/* The catalogue's named grid areas do not exist here. */
.game-page .details > * { grid-area: auto; }
.game-page .tagline { max-width: 70ch; margin: 0; font-size: 1.125rem; line-height: 1.4; color: var(--text); }
.game-page .facts { margin-top: 8px; }
.game-page .intro .description { margin-top: 10px; max-width: 70ch; color: var(--soft);
  font-size: .9375rem; line-height: 1.55; }
/* Trailer and screenshots: small tiles right of the words. The art stays clean; the
   trailer's label sits under its tile. */
/* Up to six tiles (the trailer and five screenshots) share one row; a tile stops shrinking
   at 104 px and the row then scrolls sideways, as on phones. The 4 px padding keeps the
   focus ring inside the scrolling box. */
.media-strip { display: flex; gap: 8px; margin: -4px; padding: 4px; list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.media-strip li { flex: 1 1 0; min-width: 104px; max-width: 200px; display: grid; gap: 4px; align-content: start;
  scroll-snap-align: start; }
.media-tile { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px;
  border: 1px solid var(--line); background: #000; cursor: zoom-in; touch-action: manipulation; }
.media-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .15s; }
.media-tile:hover img, .media-tile.open img { transform: scale(1.04); }
.media-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.media-cap { display: inline-flex; align-items: center; gap: 4px; color: var(--muted);
  font-size: .8125rem; line-height: 1.2; }
.media-cap svg { width: 12px; height: 12px; fill: currentColor; }
/* Phones: a row that scrolls sideways under the words. */
@media (max-width: 999px) {
  .media-strip li { flex: 0 0 min(44vw, 220px); max-width: none; }
}
/* Hover preview: large, above the tile; it plays from the start, a click opens the viewer. */
.media-pop { position: fixed; z-index: 90; width: min(50vw, 60vh * 16 / 9, 960px); aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 24px 80px rgba(0,0,0,.7); cursor: zoom-in; opacity: 0; transform: scale(.96);
  transform-origin: var(--from, 50% 100%); transition: opacity .14s, transform .14s; }
/* Phones: wider, and a tap pauses or plays. */
.media-pop.touch { width: min(calc(100vw - 24px), 70vh * 16 / 9); cursor: default; }
.media-pop.shown { opacity: 1; transform: none; }
.media-pop img, .media-pop video, .media-view img, .media-view video { display: block; width: 100%;
  height: 100%; object-fit: contain; background: #000; }
.media-pop video { pointer-events: none; }
/* How far the trailer is: an indicator, not a control. */
.media-pop .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px;
  background: rgba(0,0,0,.55); pointer-events: none; }
.media-pop .progress span { display: block; height: 100%; background: #fff;
  transform-origin: 0 50%; transform: scaleX(0); }
.media-pop button { position: absolute; display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  padding: 0 12px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; background: rgba(14,14,24,.78);
  color: #fff; font: 600 .8125rem/1 Inter, system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
.media-pop button:hover { background: rgba(40,40,56,.95); }
.media-pop button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.media-pop button[hidden] { display: none; }
.media-pop button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
.media-pop .sound-on { right: 10px; bottom: 14px; }
.media-pop .expand { top: 8px; right: 8px; width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; }
/* Paused on a phone: a play mark in the middle (the art stays the video's own frame). */
.media-pop.touch.paused::after { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px;
  margin: -32px 0 0 -32px; border-radius: 50%; pointer-events: none;
  background: rgba(14,14,24,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5.5v13l10.5-6.5z'/%3E%3C/svg%3E") center / 30px no-repeat; }
.media-tile[data-kind="video"] { cursor: pointer; }
/* Click or tap: a viewer over the page, with previous and next. */
.media-view { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(6,6,12,.88); overscroll-behavior: contain; }
.media-view .frame { width: min(100%, calc((100dvh - 32px) * 16 / 9), 1400px); aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; background: #000; }
.media-view button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px;
  padding: 0; border: 0; border-radius: 50%; background: rgba(14,14,24,.7); color: #fff; cursor: pointer;
  touch-action: manipulation; }
.media-view button:hover { background: rgba(40,40,56,.95); }
.media-view button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.media-view button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
.media-view .close { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); }
.media-view .prev { left: max(12px, env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); }
.media-view .next { right: max(12px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); }
.media-view button[hidden] { display: none; }
/* Portrait phones: arrows go under the picture so they never cover the video controls. */
@media (max-width: 600px) and (orientation: portrait) {
  .media-view .prev, .media-view .next { top: auto; bottom: max(24px, env(safe-area-inset-bottom)); transform: none; }
  .media-view .prev { left: calc(50% - 60px); }
  .media-view .next { right: calc(50% - 60px); }
}
html:has(.media-view) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .media-tile img, .media-pop { transition: none; }
  .media-tile:hover img, .media-tile.open img { transform: none; } }
/* Narrow and portrait: the platforms take their own line under the title. Nothing is
   ever reduced to bare icons: when room runs out the bar wraps, and play.js measures it
   (--bar) so the game still fits the window. */
@media (max-width: 999px) { body:has(.game-page) .top .get-row { order: 3; flex-basis: 100%; } }
@media (max-width: 600px) {
  body:has(.game-page) .platform { min-height: 34px; padding: 0 10px; gap: 6px; font-size: .8125rem; } }
@media (max-height: 560px) {
  body:has(.game-page) .top { padding: 4px 0; }
  body:has(.game-page) .platform { min-height: 32px; padding: 0 10px; font-size: .8125rem; } }
@media (max-width: 600px) { .game-area { border-radius: 12px; }
  body:has(.game-page) .brand { font-size: 0; gap: 0; }
  .play-button { min-height: 52px; padding: 0 26px 0 20px; font-size: 1.125rem; }
  .play-button svg { width: 22px; height: 22px; } }
/* The games list: New sits on the cover like the app catalogue's badge. */
.cards .card { position: relative; }
.new-badge { position: absolute; z-index: 1; left: 10px; top: 10px; padding: 2px 8px; border-radius: 6px;
  background: var(--accent, #ff6a3d); color: #0e0e18; font: 700 13px/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .08em; text-transform: uppercase; }
.new-badge[hidden] { display: none; }
