body { padding: 0; margin: 0 }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
.unity-mobile #unity-fullscreen-container { width: 100%; height: 100% }
#unity-fullscreen-container { position: relative; }
/* Preserve the desktop window while allowing a narrower or shorter browser. */
.unity-desktop #unity-fullscreen-container { max-width: 100vw; max-height: calc(100dvh - 38px); }
.unity-desktop #unity-fullscreen-container:fullscreen { max-width: none; max-height: none; }
#unity-canvas { position: absolute; width: 100%; height: 100%; background: #1F1F20 }
#unity-loading-container { position: absolute; width: 100%; height: 100%; backdrop-filter: blur(5px); display: none; }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-logo-title-footer { float:left; width: 102px; height: 38px; background: url('unity-logo-title-footer.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

/* The game owns canvas gestures; keep room-code fields outside this rule. */
#unity-canvas { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body:has(.unity-mobile) { overflow: hidden; overscroll-behavior: none; }
#redou-recovery { position: fixed; z-index: 100; top: 12px; left: 50%; transform: translateX(-50%); width: min(85vw, 420px); padding: 14px; color: #fff; background: #253c4e; border-radius: 10px; font: 16px sans-serif; }
#redou-recovery button { margin: 10px 10px 0 0; padding: 9px 12px; }
#redou-recovery pre { max-height: 40vh; overflow: auto; white-space: pre-wrap; font-size: 11px; }

/* Explicit debug links expose reports without requiring a mobile Console. */
#redou-report-button { position: fixed; z-index: 99; right: max(8px, env(safe-area-inset-right)); top: max(8px, env(safe-area-inset-top)); padding: 7px 10px; font: 12px sans-serif; color: #fff; background: #253c4e; border: 1px solid #8196a5; border-radius: 6px; }
#redou-report { position: fixed; z-index: 101; inset: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 14px; color: #fff; background: #253c4e; border-radius: 10px; font: 14px sans-serif; }
#redou-report p { margin: 0; }
#redou-report textarea { flex: 1; min-height: 40px; width: 100%; box-sizing: border-box; resize: none; font: 11px monospace; touch-action: auto; -webkit-user-select: text; user-select: text; }
#redou-report button { padding: 9px 12px; }
