/* The look of the retro pages: Mexikah Studio's obsidian, terracotta and marigold. Shared by the Retro Player and every free retro game. */
:root{color-scheme:dark;--ink:#f5efe2;--muted:#d1c5ba;--paper:#19130f;--card:#2e2723;--line:#4a3f37;--action:#863419;--gold:#d09314}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;background:radial-gradient(circle at 50% 0,#3d342d,var(--paper) 60%);color:var(--ink);font:16px/1.5 system-ui,sans-serif;display:flex;flex-direction:column}
main{flex:1;display:flex;flex-direction:column;align-items:center;gap:16px;padding:20px 16px;width:100%;max-width:960px;margin:0 auto}
h1{margin:0;font-size:1.5rem}
p{margin:0;color:var(--muted)}
h1,main>p{text-align:center}
.picker{display:grid;gap:12px;width:100%;max-width:520px;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--card)}
label{font-weight:700;font-size:.9rem}
.picker[hidden],.picker__console[hidden]{display:none}  /* display:grid below would otherwise override the hidden attribute */
.picker__console{display:grid;gap:12px}
.picker>p{font-size:.85rem}
select,input[type=file]{width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit}
button{padding:11px 18px;border:0;border-radius:8px;background:var(--action);color:#fff;font:inherit;font-weight:700;cursor:pointer}
button:disabled{opacity:.5;cursor:not-allowed}
:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
#status{min-height:1.5em;color:var(--gold)}
#game{width:100%;aspect-ratio:4/3;max-height:75vh;background:#000;border-radius:10px;overflow:hidden}
#game[hidden]{display:none}
footer{padding:12px 16px;text-align:center;font-size:.8rem;color:var(--muted)}
footer a{color:var(--gold)}
.credit{font-size:.85rem}

/* While a game runs (boot.js adds .playing) it fills the whole frame: no title, intro or picker; the credit and licence stay, on a slim line. */
body.playing{height:100vh;height:100dvh;min-height:0;background:#000}
body.playing main{flex:1;min-height:0;max-width:none;padding:0;gap:0}
body.playing main>h1,body.playing main>p:not(.credit),body.playing .picker,body.playing #status{display:none}
body.playing #game{flex:1;width:100%;min-height:0;max-height:none;aspect-ratio:auto;border-radius:0}
body.playing .credit{margin:0;padding:3px 10px;font-size:.75rem;text-align:center}
body.playing footer{padding:3px 10px;font-size:.7rem}
html:fullscreen body.playing .credit,html:fullscreen body.playing footer{display:none}  /* full screen is all game; the credit is on the page the rest of the time */
.retro-tools{position:fixed;top:8px;left:8px;z-index:20;display:flex;gap:6px}
.retro-tools button{padding:6px 12px;font-size:.8rem;background:rgba(25,19,15,.82);border:1px solid var(--gold);color:var(--ink)}
.retro-tools button[hidden]{display:none}
