:root { color-scheme: dark; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #1e1e1e; color: #e8c9b8; font: 13px Helvetica, Arial, sans-serif; }
body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; }
#stage canvas { display: block; touch-action: none; width: min(calc(100vw - 16px), calc((100vh - 110px) * 800 / 566)) !important; height: auto !important; box-shadow: 0 0 0 1px #3a3a3a; }
#bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.group { display: flex; gap: 4px; }
button { background: #2b2b2b; color: #e8c9b8; border: 1px solid #4a3328; border-radius: 6px; padding: 6px 10px; font: inherit; cursor: pointer; user-select: none; -webkit-user-select: none; }
button:hover { background: #3a2a22; }
button:active { background: #7a2e12; }
.touch { display: none; }
@media (pointer: coarse) { .touch { display: flex; } #help { display: none; } button { padding: 10px 12px; } }
#help { color: #8a7468; font-size: 11px; text-align: center; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #7a2e12; color: #f6dfd2; padding: 8px 14px; border-radius: 6px; opacity: 0; transition: opacity .3s; pointer-events: none; }
#toast.on { opacity: 1; }
