html, body { margin: 0; height: 100%; background: #000; color: #ddd;
  font: 16px/1.45 system-ui, sans-serif; overflow: hidden; }
#oag-canvas { display: block; width: 100vw; height: 100vh; outline: none; }
#picker { position: fixed; inset: 0; margin: auto; max-width: 34rem; height: fit-content;
  padding: 2rem; background: #111c; border: 1px solid #333; border-radius: 8px; }
/* An author `display` (.button is inline-block) beats the UA's [hidden] rule;
   without this the empty "Play <name> again" button showed with nothing to replay. */
[hidden] { display: none !important; }
h1 { margin-top: 0; font-weight: 600; letter-spacing: .04em; }
.button { display: inline-block; margin: .3rem .4rem .3rem 0; padding: .55rem 1rem;
  border: 1px solid #4af; border-radius: 4px; background: #123; color: #def;
  font: inherit; cursor: pointer; }
.button:hover { background: #246; }
.button { position: relative; }
/* Visually hidden but still focusable, so the keyboard reaches the file pickers. */
.button input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.small, .formats { font-size: .85em; color: #999; }
.build { font-family: monospace; color: #777; }
#status { min-height: 1.5em; color: #fc6; }
a { color: #8cf; }
h2 { font-size: 1.05em; margin: 1rem 0 .3rem; }
#keybox, #saved { border: 1px solid #345; border-radius: 6px; padding: .2rem 1rem .6rem; margin: .8rem 0; }
.keyrow { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0; }
.keyrow label { flex-basis: 100%; }
.keyrow input { flex: 1 1 14rem; min-width: 0; padding: .5rem; font: inherit; font-family: ui-monospace, monospace;
  background: #000; color: #def; border: 1px solid #4af; border-radius: 4px; }
#saved-keys { list-style: none; margin: 0; padding: 0; }
#saved-keys li { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.button:focus-visible, .keyrow input:focus-visible, .button:focus-within { outline: 2px solid #fc6; outline-offset: 2px; }
body.dragging #picker { border-color: #4af; box-shadow: 0 0 0 3px #4af8; }
#oag-canvas:fullscreen { width: 100vw !important; height: 100vh !important; max-width: none !important; max-height: none !important; }
#picker { max-height: 92vh; overflow-y: auto; box-sizing: border-box; width: calc(100% - 1rem); max-width: 44rem; }
table { border-collapse: collapse; width: 100%; font-size: .85em; margin: 1rem 0; }
caption { text-align: left; color: #999; padding-bottom: .4rem; }
th, td { text-align: left; padding: .3rem .5rem; border-bottom: 1px solid #333; vertical-align: top; }
th { color: #aaa; font-weight: 600; }
td.races { color: #7d7; }
td.front { color: #fc6; }
td.no { color: #e88; }
@media (max-width: 40rem) {
  #picker { padding: 1rem; }
  thead { display: none; }
  caption { display: block; }
  table, tbody, tr, td { display: block; }
  tr { border: 1px solid #333; border-radius: 6px; margin-bottom: .6rem; padding: .3rem .2rem; }
  td { border: 0; padding: .1rem .5rem; }
  td::before { content: attr(data-label) ": "; color: #888; }
  td[data-label="Game"] { font-weight: 600; }
  td[data-label="Game"]::before { content: ""; }
}
