/* /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); }

/* /retro search box and Grid / List switch */
.arx-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 6px; }
.arx-search { flex: 1 1 260px; min-width: 0; padding: 14px 18px !important; border-radius: 999px !important; border: 1px solid var(--line) !important; background: var(--bg2) !important; color: var(--ink) !important; font-family: inherit !important; font-size: 18px !important; font-weight: 600 !important; outline: none; }
.arx-search:focus { border-color: var(--acc) !important; }
.arx-search::placeholder { color: var(--dim); }
.arx-views { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--bg2); }
.arx-view { appearance: none; border: 0; background: transparent; color: var(--mute); padding: 12px 18px; font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; }
.arx-view.on { background: var(--acc); color: #fff; }
.arx-none { color: var(--mute); font-size: 18px; margin: 10px 0 30px; }
.arx-cat[hidden], .mxr-card[hidden], .arx-none[hidden] { display: none !important; }
.arx-searching .arx-nav { display: none; }
/* List view: one compact row per game */
.arx-list .mxr-grid { grid-template-columns: 1fr; gap: 8px; }
.arx-list .mxr-card { flex-direction: row; align-items: center; border-radius: 12px; }
.arx-list .mxr-card:hover { transform: none; }
.arx-list .mxr-shot { flex: 0 0 112px; width: 112px; }
.arx-list .mxr-body { padding: 10px 16px; min-width: 0; }
.arx-list .mxr-title { font-size: 18px; margin-bottom: 2px; }
.arx-list .mxr-lede { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arx-list .mxr-ph { font-size: 14px; }
@media (max-width: 600px) { .arx-list .mxr-shot { flex-basis: 84px; width: 84px; } .arx-list .mxr-lede { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }

/* How to play card: pops up large over the page before the game (fixed, so the page never shifts). */
.mxh { display: none; position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.72); align-items: center; justify-content: center; padding: 16px; overscroll-behavior: contain;
  --bg2: #121216; --ink: #f4f4f1; --mute: #b4b4bc; --line: #2c2c34; --acc: #ff4d2e; font-family: Inter, 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.mxh.open { display: flex; }
.mxh-card { position: relative; width: 100%; max-width: 820px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--bg2); color: var(--ink); border: 1px solid var(--line); border-radius: 22px; padding: 30px 34px 26px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.mxh-kicker { color: var(--acc); font-weight: 800; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 6px; }
.mxh h2 { color: var(--ink); font-size: clamp(32px, 5vw, 48px); line-height: 1.02; letter-spacing: -.02em; font-weight: 800; margin: 0 0 14px; }
.mxh-goal { font-size: clamp(20px, 2.6vw, 24px); font-weight: 700; line-height: 1.35; margin: 0 0 14px; color: var(--ink); }
.mxh-steps { margin: 0 0 18px; padding-left: 1.4em; font-size: 20px; line-height: 1.45; color: var(--mute); }
.mxh-steps li { margin: 0 0 6px; }
.mxh-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 14px; }
.mxh-col { flex: 1 1 300px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.mxh-touch .mxh-tch { order: -1; }
.mxh-sub { color: var(--acc); font-weight: 800; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; }
.mxh-col ul { list-style: none; margin: 0; padding: 0; }
.mxh-col li { display: flex; align-items: center; gap: 14px; font-size: 20px; line-height: 1.3; padding: 6px 0; color: var(--ink); }
.mxh kbd, .mxp-keys kbd { display: inline-block; min-width: 2.2em; text-align: center; font-family: inherit; font-weight: 800; background: #2a2a32; color: #fff; border: 1px solid #44444e; border-bottom-width: 3px; border-radius: 8px; padding: 3px 10px; white-space: nowrap; }
.mxh-col kbd { flex: 0 0 auto; font-size: 18px; min-width: 4.6em; max-width: 55%; white-space: normal; }
.mxh-two { font-size: 19px; color: var(--mute); margin: 0 0 14px; }
.mxh-two b { color: var(--ink); }
.mxh-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 8px; }
.mxh-play { font: inherit; font-size: 22px; font-weight: 800; color: #fff; background: var(--acc); border: 0; border-radius: 999px; padding: 14px 54px; cursor: pointer; }
.mxh-play:focus-visible, .mxh-x:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mxh-skip { font-size: 17px; color: var(--mute); display: flex; align-items: center; gap: 8px; cursor: pointer; }
.mxh-skip input { width: 20px; height: 20px; accent-color: var(--acc); }
.mxh-x { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; font-size: 30px; line-height: 1; color: var(--mute); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.mxp-keys kbd { font-size: .92em; padding: 1px 7px; border-bottom-width: 2px; }
.mxp-dot { color: var(--dim, #6b6b74); margin: 0 4px; }
.mxh-open { font: inherit; font-weight: 800; color: var(--acc); background: transparent; border: 1px solid var(--acc); border-radius: 999px; padding: 4px 14px; margin-left: 8px; cursor: pointer; }
@media (max-width: 600px) {
  .mxh { padding: 0; }
  .mxh-card { max-height: 100vh; height: 100%; border-radius: 0; padding: 22px 18px 20px; }
  .mxh-steps { font-size: 18px; }
  .mxh-col li { font-size: 18px; }
  .mxh-play { width: 100%; }
}
@media (max-width: 600px) {
  .mxh-foot { position: sticky; bottom: -20px; margin: 8px -18px -20px; padding: 12px 18px 16px; background: var(--bg2); border-top: 1px solid var(--line); }
}
.mxa .mxp-keys { font-size: 17px; line-height: 2.1; color: #c8c8cf; }
.mxa .mxp-keys .mxh-open { font-size: 17px; padding: 6px 18px; }
