@font-face { font-family: 'UnifrakturMaguntia'; src: url('./UnifrakturMaguntia-Book.ttf?v=5ef053b15c9c3cce') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
:root { color-scheme: dark; font-family: Georgia, serif; color: #d8d1c2; background: #090909; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 50% 20%, #171614 0%, #090909 70%); min-height: 100vh; }
main { --scale: 1; width: min(100%, 980px); margin: auto; padding: 32px 24px; }
.site-header { width: calc(400px * var(--scale) + 110px); max-width: 100%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-header h1 { margin: 0; color: #d8d1c2; font: normal 40px/1 'UnifrakturMaguntia', Georgia, serif; }
.site-header a { display: block; outline: 1px solid transparent; outline-offset: 4px; border-radius: 3px; transition: outline-color 120ms ease; }
.site-header a:hover { outline-color: #c9b88f; }
.site-header img { display: block; height: 40px; width: auto; }
.site-header a:focus-visible { outline: 2px solid #e4d2ac; outline-offset: 4px; }
.toolbar, .controls { display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; }
.toolbar { width: calc(400px * var(--scale) + 110px); max-width: 100%; margin: 0 auto 16px; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: nowrap; }
.display-controls { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: flex-start; gap: 10px; flex-wrap: wrap; }
.display-controls > div { display: flex; }
button { font: 12px system-ui, sans-serif; color: #d8d1c2; background: #151413; border: 1px solid #555046; padding: 9px 13px; cursor: pointer; }
button:hover { background: #29251f; }
.palette-label { display: flex; align-items: center; gap: 8px; font: 12px system-ui, sans-serif; }
select { font: 12px system-ui, sans-serif; color: #d8d1c2; background: #151413; border: 1px solid #555046; padding: 8px; cursor: pointer; }
select:focus-visible { outline: 2px solid #e4d2ac; outline-offset: 4px; }
/* The fixed-width right bezel keeps the hardware-style control centered at both scales. */
.bezel-control { position: absolute; right: 0; top: 65px; width: 89px; display: flex; justify-content: center; }
#pause { position: relative; width: 42px; height: 42px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 3px double #67583e; background: #d8c6a2; color: #16130f; box-shadow: inset 0 1px 0 #eee0c3, 0 3px 0 #070707; }
#pause:hover { background: #eee0c3; }
#pause:active:not(:disabled) { box-shadow: inset 0 2px 3px #67583e; }
.pause-label { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); width: 80px; text-align: center; color: #b7aa90; font: 11px system-ui, sans-serif; }
.menu-icon { fill: none; stroke: currentColor; stroke-width: 2; }
.play-icon { fill: currentColor; }
#pause[data-action="play"] .menu-icon, #pause[data-action="menu"] .play-icon { display: none; }
button[aria-pressed="true"] { background: #bdb29a; color: #100f0d; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, summary:focus-visible { outline: 2px solid #e4d2ac; outline-offset: 4px; }
.viewport { overflow: auto; padding: 8px 4px 16px; }
.frame { position: relative; width: max-content; padding: 12px 89px 10px 19px; margin: auto; background: #131211; border: 1px solid #716652; outline: 3px double #34302a; box-shadow: 0 12px 25px #0006, inset 0 0 0 5px #080808; }
.ornament { text-align: center; font-size: 12px; letter-spacing: .16em; color: #99896b; margin-bottom: 12px; }
canvas { display: block; width: calc(400px * var(--scale)); height: calc(240px * var(--scale)); image-rendering: pixelated; background: #090909; box-shadow: 0 0 0 1px #060606; outline: none; }
canvas:focus-visible { box-shadow: 0 0 0 2px #c9b88f; }
.controls { font: 12px system-ui, sans-serif; margin-top: 10px; }
kbd { color: #e3d9c5; font: 11px system-ui, sans-serif; margin-right: 4px; }
#status { min-height: 20px; text-align: center; font: 12px system-ui, sans-serif; color: #b7aa90; }
details { max-width: 550px; margin: 20px auto; font: 12px/1.6 system-ui, sans-serif; color: #a39b8d; }
summary { cursor: pointer; }
output { display: block; margin: 12px 0; font-family: monospace; }
main:fullscreen { width: 100%; max-width: none; height: 100%; overflow: auto; background: #090909; }
@media (max-width: 500px) { main { padding: 18px 8px; } }

[hidden], #status:empty { display: none; }
.platform { margin: 20px auto; max-width: 850px; text-align: center; font: 12px/1.6 system-ui, sans-serif; }

.game-screen { position:relative; }
.game-menu { position:absolute; top:0; right:0; width:50%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; background:var(--screen-dark); }
.game-menu button { width:75%; font-size:calc(12px * var(--scale)); padding:calc(8px * var(--scale)); color:var(--screen-light); background:var(--screen-dark); border-color:var(--screen-light); }
.game-menu button:hover { color:var(--screen-dark); background:var(--screen-light); }
.game-menu button:focus-visible { outline-color:var(--screen-light); }
.game-menu.dimmed-frame { width:100%; background:rgba(0,0,0,.35); }
.game-menu[hidden] { display:none; }
.pause-cover { position:absolute; inset:0; width:100%; height:100%; z-index:1; pointer-events:none; box-shadow:none; animation:pause-reveal 180ms ease-out forwards; }
@keyframes pause-reveal { from { opacity:1; } to { opacity:0; } }

.feedback { margin: 18px auto 0; text-align: center; font: 13px/1.6 system-ui, sans-serif; color: #b7aa90; }
.feedback a { color: #d8d1c2; text-underline-offset: 3px; }
.feedback a:hover { color: #eee0c3; }
.feedback a:focus-visible { outline: 2px solid #e4d2ac; outline-offset: 4px; }
