/* One transform animation, no canvas/video, no percentage invented. */
@keyframes rp-loading-turn { to { transform: rotate(360deg); } }
.rp-loading-ring, .rom-boot-hint::before {
  content: ''; display: block; width: 48px; height: 48px; box-sizing: border-box;
  border: 3px solid #29453e; border-top-color: #80edbd; border-right-color: #e9ad54;
  border-radius: 50%; animation: rp-loading-turn 1s linear infinite; flex-shrink: 0;
}
/* Overlay nativo: UM spinner só (via ::before). Não criar outro no JS. */
#rp-native-status {
  position: fixed; inset: 0; z-index: 2147483646;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px; text-align: center;
  background: #0c1018; color: #e8eef7;
  font: 700 18px system-ui, Segoe UI, sans-serif;
}
#rp-native-status::before {
  content: ''; display: block; width: 48px; height: 48px; box-sizing: border-box;
  border: 3px solid #29453e; border-top-color: #80edbd; border-right-color: #e9ad54;
  border-radius: 50%; animation: rp-loading-turn 1s linear infinite; flex-shrink: 0;
}
#rp-native-status.is-error::before { display: none; }
#rp-native-status-text { margin: 0; max-width: 28ch; }
.rom-boot-hint::before { margin: 0 auto 18px; }
.rom-boot-hint { text-align: center; }
.rp-game-loading { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; flex-direction: column; gap: 18px; color: #edf1f7; background: radial-gradient(ellipse at top,#19392f,#0c1018 70%); font: 600 16px system-ui; z-index: 5; pointer-events: none; }
body.local-playing:not(.game-started) .rp-game-loading, body.is-playing:not(.game-started) .rp-game-loading { display: flex; }
.rp-game-loading strong { letter-spacing: .12em; font-size: 22px; }
.rp-game-loading small { color: #a5b9b1; font-size: 12px; }
.play-loading-card { border: 1px solid #345247; background: #0f1d20; border-radius: 24px; padding: 28px; }
.play-loading .play-loading-spinner { width: 56px; height: 56px; border: 3px solid #29453e; border-top-color: #80edbd; border-right-color: #e9ad54; animation: rp-loading-turn 1s linear infinite; }
.play-loading .play-loading-bar { display: none; }
#rp-navigation-loading { position: fixed; bottom: max(20px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 500; display: flex; gap: 12px; align-items: center; padding: 14px 20px; border: 1px solid #345247; border-radius: 16px; background: #0f1d20; color: #edf1f7; font: 600 14px system-ui; pointer-events: none; }
#rp-navigation-loading[hidden] { display: none; }
#rp-navigation-loading .rp-loading-ring { width: 24px; height: 24px; }
@media(prefers-reduced-motion:reduce) { .rp-loading-ring, #rp-native-status::before, .rom-boot-hint::before, .play-loading .play-loading-spinner { animation: none; } }

.rp-first-access { box-sizing: border-box; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 28px; color: #edf1f7; background: #101d27; border: 1px solid #365849; border-radius: 24px; box-shadow: 0 24px 64px #0006; font: 16px/1.6 system-ui; }
.rp-first-access::backdrop { background: #060b13d9; }
.rp-first-access small { color: #80edbd; font-size: 10px; letter-spacing: .15em; font-weight: 750; }
.rp-first-access h2 { font-size: 24px; line-height: 1.2; margin: 16px 0; letter-spacing: -.025em; }
.rp-first-access p { color: #bcc9d5; margin-bottom: 24px; }
.rp-first-access button { width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: #80edbd; color: #10241a; font: 750 16px system-ui; cursor: pointer; }
.rp-first-access button:focus-visible { outline: 3px solid white; outline-offset: 4px; }

.rom-boot-hint.is-error::before { display: none; }
