/* SPDX-License-Identifier: MIT */
:root { color-scheme: dark; --bg: #0b0000; --panel: #1f0808; --text: #f2dede; --muted: #b99; --accent: #e33; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.5 system-ui, sans-serif; background: var(--bg); color: var(--text); }
main { max-width: 820px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 1.6rem; margin: 0 0 4px; display: flex; align-items: center; gap: 12px; color: var(--accent); }
h1 img { width: 48px; height: 48px; }
p.lead { color: var(--muted); margin-top: 0; }
a { color: #f77; }
section { background: var(--panel); border-radius: 12px; padding: 16px 20px; margin: 16px 0; }
section h2 { margin: 0 0 8px; font-size: 1.1rem; }
.systems { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
button { font: inherit; padding: 10px 14px; border-radius: 8px; border: 0; background: var(--accent); color: #fff;
  cursor: pointer; font-weight: 600; }
button:disabled { opacity: 0.45; cursor: default; }
button.secondary { background: #5a1c1c; color: var(--text); }
#status { white-space: pre-wrap; color: var(--muted); min-height: 1.5em; }
small, .note { color: var(--muted); }
code { background: #0005; padding: 1px 4px; border-radius: 4px; }

/* The player */
body.play { background: #000; overflow: hidden; }
#game { position: fixed; inset: 0; }
#screen { width: 100%; height: 100%; display: block; touch-action: none; }
#bar { position: fixed; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0.5; }
#bar:hover { opacity: 1; }
#bar button { padding: 6px 10px; font-size: 14px; }
#start { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; }
#start button { font-size: 1.3rem; padding: 12px 36px; }
#message { position: fixed; bottom: 12px; left: 0; right: 0; text-align: center; color: #c99; font-size: 14px;
  pointer-events: none; }
#start[hidden] { display: none; }
#settings { background: var(--panel); color: var(--text); border: 0; border-radius: 12px; padding: 16px 20px;
  max-width: 440px; }
#settings::backdrop { background: #0008; }
#settings h2 { margin: 0 0 4px; font-size: 1.1rem; }
#settings label { display: block; margin: 10px 0; }
#settings select, #settings input[type=range] { display: block; width: 100%; margin-top: 4px; font: inherit; }
#settings .buttons { text-align: right; margin-top: 12px; }
#touch { position: fixed; inset: 0; pointer-events: none; }
#touch[hidden] { display: none; }
#touch b { pointer-events: auto; position: absolute; display: grid; place-items: center; width: 3.2em;
  height: 3.2em; border-radius: 50%; background: #fff2; color: #fff9; font-weight: normal;
  user-select: none; -webkit-user-select: none; touch-action: none; }
#touch b.on { background: #fff5; }
.pad { position: absolute; left: 1.5em; bottom: 1.5em; width: 10em; height: 10em; }
.pad b:nth-child(1) { left: 3.4em; top: 0; } .pad b:nth-child(2) { left: 0; top: 3.4em; }
.pad b:nth-child(3) { right: 0; top: 3.4em; } .pad b:nth-child(4) { left: 3.4em; bottom: 0; }
.ab { position: absolute; right: 1.5em; bottom: 2.5em; width: 8em; height: 6em; }
.ab b:nth-child(1) { left: 0; bottom: 0; } .ab b:nth-child(2) { right: 0; top: 0; }
.shoulder { position: absolute; top: 1em; } .shoulder.l { left: 1.5em; } .shoulder.r { right: 1.5em; }
.shoulder b { position: static; }
.menu { position: absolute; bottom: .8em; left: 50%; transform: translateX(-50%); display: flex; gap: 1em; }
.menu b { position: static; width: 4.5em; height: 2em; border-radius: 1em; font-size: .8em; }
