/* Quad Arena: the Forge's frame around the game (games/quad-arena/game.html runs inside the iframe). */
:root { --qa-bg: #080d18; --qa-panel: #0b1422; --qa-gold: #42d7b5; --qa-text: #e5f5ff; --qa-dim: #9eb8c9; --qa-line: #1b3045; }
html, body { margin: 0; height: 100%; background: var(--qa-bg); color: var(--qa-text); font: 15px/1.5 "Segoe UI", system-ui, sans-serif; }
body { display: flex; flex-direction: column; min-height: 100dvh; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--qa-gold); color: #000; padding: 6px 10px; border-radius: 6px; z-index: 20; }
.skip-link:focus { left: 8px; }
.qa-top { display: flex; align-items: center; gap: 14px; padding: 8px 14px; background: var(--qa-panel); border-bottom: 1px solid var(--qa-line); }
.qa-top h1 { margin: 0; font: 800 18px/1 system-ui, sans-serif; letter-spacing: .14em; color: var(--qa-gold); text-transform: uppercase; }
.qa-top .qa-tag { margin: 0; color: var(--qa-dim); font-size: 13px; }
.qa-top .qa-spacer { flex: 1; }
.qa-link, .qa-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--qa-line); border-radius: 8px; background: #141220; color: var(--qa-text); text-decoration: none; font: 600 13px/1 system-ui, sans-serif; letter-spacing: .04em; cursor: pointer; }
.qa-link:hover, .qa-btn:hover { border-color: var(--qa-gold); color: var(--qa-gold); }
.qa-link:focus-visible, .qa-btn:focus-visible { outline: 2px solid var(--qa-gold); outline-offset: 2px; }
.qa-stage { position: relative; flex: 1; min-height: 0; background: var(--qa-bg); }
.qa-stage iframe { display: block; width: 100%; height: 100%; min-height: 480px; border: 0; background: var(--qa-bg); }
.qa-stage:fullscreen { background: var(--qa-bg); }
.qa-stage:fullscreen iframe { min-height: 0; height: 100vh; }
.qa-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; padding: 8px 14px; background: var(--qa-panel); border-top: 1px solid var(--qa-line); color: var(--qa-dim); font-size: 12px; }
.qa-foot p { margin: 0; }
.qa-foot a { color: var(--qa-gold); }
.qa-foot b { color: var(--qa-text); font-weight: 600; }
.qa-help { display: none; }
@media (max-width: 720px) {
  .qa-top { gap: 8px 10px; }   /* one row: the height goes to the game */
  .qa-top h1 { flex: 1; min-width: 0; font-size: 14px; line-height: 1.15; letter-spacing: .08em; }
  .qa-top .qa-spacer { display: none; }
  .qa-link, .qa-btn { flex: none; }
  .qa-top .qa-tag { display: none; }
  .qa-stage { min-height: 60dvh; }   /* room for the frame, so it never covers the help below */
  .qa-stage iframe { min-height: 60dvh; }
  .qa-help { display: block; padding: 10px 14px; color: var(--qa-dim); font-size: 13px; border-top: 1px solid var(--qa-line); background: var(--qa-panel); }
}
/* A phone on its side: the frame takes the whole height of the screen, and wrap.js scrolls it into place. */
@media (orientation: landscape) and (max-height: 500px) {
  .qa-top .qa-tag { display: none; }
  .qa-stage { flex: none; height: 100dvh; }
  .qa-stage iframe { min-height: 0; }
  body .forge-top-fallback { position: static; }
}
