:root { color-scheme: light; font: 16px/1.4 system-ui, -apple-system, sans-serif; color: #162f3a; background: #f6f2e8; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; 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); }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 10px; border-bottom: 2px solid #162f3a; }
header strong { letter-spacing: .12em; }
button, a[download] { color: #162f3a; background: #fffdf7; border: 2px solid #162f3a; border-radius: 8px; padding: 9px 12px; min-height: 44px; font: inherit; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, canvas:focus-visible, input:focus-visible { outline: 3px solid #df602b; outline-offset: 2px; }
#browser-tray { padding: 10px; overflow: auto; max-height: 40vh; background: #fffdf7; }
#browser-tray p { margin: 4px 0 10px; }
#browser-tray button { margin: 0 4px 4px 0; }
#storage-status { font-weight: 700; }
#game-container { position: relative; flex: 1; min-height: 1px; min-width: 0; }
#unity-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; background: #f6f2e8; text-align: center; overflow: auto; }
#loading h1 { font-size: clamp(22px, 4vw, 36px); margin: 0 0 12px; }
#loading-status { max-width: 42rem; white-space: pre-wrap; overflow-wrap: anywhere; }
#loading progress { width: min(85%, 400px); margin-bottom: 15px; accent-color: #178e9d; }
#loading button { margin-top: 8px; }
#file-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(92vw, 600px); max-height: 86vh; overflow: auto; padding: 20px; background: #fffdf7; border: 3px solid #162f3a; border-radius: 12px; box-shadow: 0 0 0 100vmax #162f3a66; z-index: 10; }
#file-panel h2 { margin-top: 0; }
#file-message { white-space: pre-wrap; overflow-wrap: anywhere; }
#file-input { width: 100%; margin-bottom: 15px; font: inherit; }
#file-download { display: inline-block; margin-bottom: 15px; }
#copy-text { width: 100%; min-height: 80px; font: inherit; margin-bottom: 12px; }
[hidden] { display: none !important; }
