﻿:root { color-scheme: dark; font-family: Georgia, serif; color: #eadbb8; background: #1a1410; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { height: 100dvh; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.topbar { flex: none; display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; border-bottom: 1px solid #4a3322; }
.game-title { font-size: 16px; }
.jam-link { color: #f2b652; font-size: 16px; min-width: 64px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.stage-wrap { flex: 1; min-height: 0; width: 100%; position: relative; overflow: hidden; }
#game { display: block; background: #1c1510; touch-action: none; }
.fallback { font-size: 16px; padding: 20px; }
.portrait-hint { margin: 0; font-size: 12px; }
.selftest { position: fixed; z-index: 2; left: 8px; top: 48px; max-width: calc(100% - 16px); max-height: calc(100dvh - 56px); overflow: auto; white-space: pre-wrap; background: #1c1510; border: 1px solid #d2a43c; padding: 12px; font: 12px monospace; pointer-events: none; }
[hidden] { display: none !important; }
@media (max-width: 500px) { .game-title { font-size: 12px; } .topbar { gap: 6px; padding: 0 6px; } }

#game:focus-visible { outline: 2px solid #f2b652; outline-offset: -2px; }
.jam-link:focus-visible { outline: 2px solid #f2b652; outline-offset: -3px; }
@media (max-height: 500px) and (min-aspect-ratio: 16/9) {
  body { flex-direction: row; }
  .topbar { width: 44px; min-height: 0; padding: 0; flex-direction: column; border-bottom: 0; border-right: 1px solid #4a3322; }
  .game-title { writing-mode: vertical-rl; font-size: 12px; padding-top: 12px; }
  .jam-link { min-width: 44px; font-size: 12px; }
  .stage-wrap { width: auto; height: 100%; min-width: 0; }
}
