/* Keep the launch gate visible before game scripts load. */
body.entry-pending > :not(#game-entry-overlay),
body.entry-shell > :not(#game-entry-overlay):not(#hero-selection-modal):not(#game-session-frame) { display: none !important; }
#game-entry-overlay { display: none; }
body:is(.entry-pending,.entry-shell) > #game-entry-overlay:not([hidden]) { position: fixed; inset: 0; z-index: 700; display: grid; place-items: center; padding: max(18px, var(--rd-safe-area-top)) max(20px, var(--rd-safe-area-right)) max(18px, var(--rd-safe-area-bottom)) max(20px, var(--rd-safe-area-left)); box-sizing: border-box; background: radial-gradient(ellipse at 50% 20%, #28352f, #0b1218 70%); color: #ede5cd; font: 14px/1.7 'Microsoft YaHei', system-ui, sans-serif; }
.game-entry-card { display: flex; flex-direction: column; align-items: center; width: min(520px, 100%); max-height: 100%; overflow-y: auto; text-align: center; box-sizing: border-box; }
#game-entry-title { margin: 0 0 12px; color: #edcd83; font-size: clamp(25px, 5vw, 36px); letter-spacing: 5px; }
.game-entry-phone { width: 76px; height: 42px; margin: 6px 0 10px; border: 3px solid #b6a16e; border-radius: 8px; box-shadow: inset 0 0 0 5px #18231f; }
.game-entry-phone::after { content: '↻'; display: block; color: #c4b789; font: 24px/42px system-ui, sans-serif; }
#game-entry-hint { margin: 2px 0 14px; color: #d8d9c6; }
.game-entry-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#run-online-debug { min-height: 44px; font-size: 13px; background: #1b272c; border-color: #8b7958; color: #ffe0a0; }
@media (max-width: 640px) {
  .run-selection-footer:has(#run-online-debug) { gap: 6px; }
  .run-selection-footer:has(#run-online-debug) #run-start { min-width: 110px; }
  .run-selection-footer:has(#run-online-debug) #run-selection-summary { font-size: 11px; }
}
#game-entry-overlay button { min-width: 170px; min-height: 48px; padding: 10px 20px; border: 1px solid #c5a15a; border-radius: 7px; background: linear-gradient(#806536, #4f4028); color: #fff0cc; font: inherit; font-weight: bold; cursor: pointer; touch-action: manipulation; }
#game-entry-overlay button:disabled { opacity: .5; cursor: default; }
#game-entry-overlay button[hidden], #game-entry-overlay [hidden] { display: none !important; }
#game-entry-overlay #game-entry-continue { background: #22332e; border-color: #6f8c76; }
#game-entry-status { flex-shrink: 0; min-height: 24px; margin: 14px 0 0; max-width: 420px; white-space: pre-wrap; color: #b9c9bf; font-size: 12px; }
#game-entry-overlay button:focus-visible { outline: 2px solid #ffe2a0; outline-offset: 3px; }
body.entry-shell > #hero-selection-modal { z-index: 600; }
#game-session-frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 500; display: block; background: #0b0d10; }

/* Match the shell's HUD-hiding specificity without changing its existing rules. */
body.entry-shell > #update-notice:not(#game-entry-overlay):not(#hero-selection-modal):not(#game-session-frame):not([hidden]) { display: grid !important; }
#update-notice[hidden] { display: none !important; }
#update-notice { position: fixed; z-index: 810; top: max(10px, var(--rd-safe-area-top)); left: var(--rd-safe-center-x); transform: translateX(-50%); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; width: min(560px, calc(100% - 24px - var(--rd-safe-area-left) - var(--rd-safe-area-right))); box-sizing: border-box; padding: 8px 12px; border: 1px solid #c5a15a; border-radius: 8px; background: #17231ff5; color: #f0e6c7; box-shadow: 0 6px 22px #0008; font: 12px/1.5 'Microsoft YaHei', system-ui, sans-serif; }
body.entry-shell:has(> #game-session-frame) > #update-notice { top: 50%; transform: translate(-50%, -50%); }
#update-notice-message { margin: 0; }
.update-notice-actions { display: flex; gap: 6px; }
#update-notice button { min-height: 44px; min-width: 48px; padding: 6px 9px; border: 1px solid #a98d51; border-radius: 6px; background: #66522e; color: #fff0cc; font: inherit; font-size: 11px; white-space: nowrap; cursor: pointer; touch-action: manipulation; }
#update-notice button:disabled { opacity: .6; cursor: default; }
#update-notice button:focus-visible { outline: 2px solid #ffe2a0; outline-offset: 2px; }
#update-notice #update-notice-later { background: #233a30; border-color: #6e8a76; }
