/* /play arcade — matches the site's dark + orange system and follows Remix themes via the same variables. */
.mxa {
  --bg: #0b0b0d; --bg2: #121216; --bg3: #18181e; --ink: #f4f4f1; --mute: #9a9aa3; --dim: #6b6b74; --line: #232329; --acc: #ff4d2e;
  background: var(--bg); color: var(--ink); font-family: Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased;
  max-width: 1180px; margin: 0 auto; padding: 56px 20px 80px;
}
.mxa h1, .mxa h2 { color: var(--ink); margin: 0; letter-spacing: -.025em; font-weight: 800; }
.mxa-hero { margin-bottom: 36px; }
.mxa-kicker, .mxa-tag { color: var(--acc); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; }
.mxa-hero h1 { font-size: clamp(44px, 8vw, 92px); line-height: .95; }
.mxa-lede { color: var(--mute); font-size: clamp(17px, 2vw, 20px); max-width: 620px; margin: 18px 0 0; }
.mxa-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.mxa-card { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 36px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.mxa-stage { position: relative; width: 100%; aspect-ratio: 414 / 900; max-height: 78vh; border-radius: 16px; overflow: hidden; background: var(--bg3); border: 1px solid var(--line); }
.mxa-stage img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.mxa-stage:hover img { transform: scale(1.03); }
.mxa-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.mxa-card.playing { grid-template-columns: 1fr; }
.mxa-card.playing .mxa-info { display: none; }
/* Playing: as tall as the screen allows, at the game's exact shape (no bars). */
.mxa-stage.on { aspect-ratio: var(--ar); height: auto; max-height: none; width: min(100%, calc(min(86svh, 900px) * var(--r, .5))); justify-self: center; }
.mxa-play {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap;
  padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer; background: var(--acc); color: #fff;
  font: 800 16px/1 Inter, system-ui, sans-serif; box-shadow: 0 12px 30px rgba(0,0,0,.45); transition: transform .2s ease;
}
.mxa-play:hover { transform: translateX(-50%) translateY(-2px) scale(1.03); }
.mxa-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mxa-info { max-width: 560px; }
.mxa-info h2 { font-size: clamp(34px, 4vw, 48px); margin-bottom: 10px; }
.mxa-info p { color: var(--mute); margin: 0 0 12px; line-height: 1.55; font-size: 17px; }
.mxa-info .mxa-tag { color: var(--acc); margin-bottom: 6px; }
.mxa-note { font-size: 14px; color: var(--dim) !important; }
.mxa-btn { display: inline-block; padding: 13px 22px; border-radius: 999px; background: var(--acc); color: #fff !important; font-weight: 700; text-decoration: none; }
.mxa-btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink) !important; }
.mxa-btn:hover { filter: brightness(1.08); }
.mxa-cta { margin-top: 40px; padding: 36px; border-radius: 22px; background: var(--acc); color: #fff; }
.mxa-cta h2 { color: #fff; font-size: 34px; }
.mxa-cta p { color: rgba(255,255,255,.9); margin: 8px 0 18px; }
.mxa-cta .mxa-btn { background: #0b0b0d; }
@media (max-width: 720px) {
  .mxa { padding-top: 36px; }
  .mxa-card { grid-template-columns: 1fr; }
  .mxa-stage { max-width: 380px; justify-self: center; }
  .mxa-stage.on { max-width: none; width: min(100%, calc(84svh * var(--r, .5))); }
  .mxa-links .mxa-btn { margin: 0 6px 8px 0; }
}

/* /pong */
.mxp-game { position: relative; width: 100%; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--bg2); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.mxp-game canvas { display: block; margin: 0 auto; touch-action: none; outline: none; }
.mxp-game canvas:focus-visible { box-shadow: inset 0 0 0 3px var(--acc); }
.mxp-keys { margin-top: 14px; }

.mxa-links .mxa-btn { margin-right: 8px; margin-bottom: 8px; }
.mxp-rotate { display: none; margin: 12px 0 0; color: var(--acc); font-weight: 700; }
@media (max-width: 600px) and (orientation: portrait) { .mxp-rotate { display: block; } }
.mxp-more { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.mxp-more .mxa-kicker { margin-bottom: 14px; }
body.mx-arcade-page, body.mx-arcade-page #pagewrap, body.mx-arcade-page #body { background: #0b0b0d; }
/* Portrait games: centered, as tall as the screen allows */
.mxp-game.mxp-tall { max-width: 560px; margin: 0 auto; }
.mxp-app { position: relative; }
/* /retro hub */
.mxr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.mxr-card { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none !important; color: var(--ink) !important; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.mxr-card:hover, .mxr-card:focus-visible { transform: translateY(-4px); border-color: var(--acc); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.mxr-shot { display: block; aspect-ratio: 16 / 10; background: var(--bg3); overflow: hidden; }
.mxr-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.mxr-card:hover .mxr-shot img { transform: scale(1.05); }
.mxr-ph { display: flex; height: 100%; align-items: center; justify-content: center; font-weight: 900; font-size: 28px; color: var(--acc); }
.mxr-body { display: block; padding: 16px 18px 18px; }
.mxr-title { display: block; font-weight: 800; font-size: 20px; letter-spacing: -.01em; margin-bottom: 6px; }
.mxr-lede { display: block; color: var(--mute); font-size: 14px; line-height: 1.45; }
.mxr-app { border-color: color-mix(in srgb, var(--acc) 60%, var(--line)); }
.mxr-app .mxr-title { color: var(--acc); }
/* Phones: games run edge to edge (the theme's padding was eating ~100px). */
@media (max-width: 600px) {
  .mxp-game, .mxp-game.mxp-tall, .mxp-app { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); border-radius: 0; border-left: 0; border-right: 0; }
}

/* /retro by type: jump chips + a heading per type, and the back link on ?play= pages */
.arx-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; position: sticky; top: 0; z-index: 2; padding: 10px 0; background: var(--bg); }
.arx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg2); color: var(--ink) !important; text-decoration: none !important; font-weight: 700; font-size: 14px; }
.arx-chip span { color: var(--dim); font-weight: 600; font-size: 12px; }
.arx-chip:hover { border-color: var(--acc); }
.arx-cat { margin: 0 0 40px; scroll-margin-top: 70px; }
.arx-cat-h { font-size: clamp(24px, 3vw, 32px); margin: 0 0 16px !important; }
.mxa.mxp:has(> .arx-back) { padding-bottom: 0 !important; margin-bottom: 0 !important; }
.arx-back { margin: 0; }
.arx-back a { color: var(--mute); text-decoration: none; font-weight: 700; font-size: 15px; }
.arx-back a:hover { color: var(--acc); }
