.game-install-bar{position:fixed;inset:0 0 auto;z-index:20;height:64px;padding:8px 20px;background:#fffffff5;border-bottom:1px solid #dfece8;backdrop-filter:blur(12px);font:14px/1.4 Arial,sans-serif;box-sizing:border-box}
.game-install-header{display:flex;align-items:center;gap:12px;max-width:1120px;height:100%;margin:0 auto}
.game-install-app-icon{flex:none;border:1px solid #e3eee9;border-radius:12px;background:#f0faff;object-fit:contain}
.game-install-heading{display:flex;flex-direction:column;gap:2px;min-width:0;margin-right:auto}
.game-install-heading>span{color:#6b827a;font-size:9px;font-weight:700;letter-spacing:1px}
.game-install-heading>strong{color:#193c34;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:has(.game-install-bar:not([hidden])){padding-top:64px}
body:has(.game-install-bar:not([hidden])) .desktop-layout{height:calc(100dvh - 84px)}
body:has(.game-install-bar:not([hidden])) #wrap{min-height:calc(100dvh - 64px)}
body:has(.game-install-bar:not([hidden])) #game{max-height:calc(100dvh - 94px);width:auto;max-width:100%}
body:has(.game-install-bar:not([hidden])) .game-shell{height:min(780px,calc(100dvh - 94px));width:min(calc(100vw - 16px),calc((100dvh - 94px) * 430 / 780),430px);max-height:calc(100dvh - 94px)}
body:has(.game-install-bar:not([hidden])) .game-shell #game{width:100%;height:100%}
.game-install-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;flex:none;min-height:44px;border:1px solid transparent;border-radius:14px;padding:10px 18px;background:#087a69;color:#fff;font:700 14px/1.4 Arial,sans-serif;box-shadow:0 4px 10px #087a691c;cursor:pointer;transition:background .18s,box-shadow .18s,transform .18s}
.game-install-button:hover:not(:disabled){background:#056452;box-shadow:0 6px 16px #087a6930;transform:translateY(-1px)}
.game-install-button svg{flex:none}
.game-install-button:focus-visible,.game-install-close:focus-visible{outline:3px solid #e8ab37;outline-offset:3px}
.game-install-button:disabled{background:#e7eeeb;color:#788b83;box-shadow:none;cursor:default}
.game-install-dialog{position:fixed;inset:0;width:min(460px,calc(100% - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;margin:auto;border:1px solid #ffffffb3;border-radius:24px;padding:0;overflow:auto;overscroll-behavior:contain;background:#fff;color:#193c34;box-shadow:0 24px 100px #071f3966;font:15px/1.6 Arial,sans-serif}
.game-install-dialog::backdrop{background:#102b40a6;backdrop-filter:blur(5px)}
.game-install-cover{position:relative;overflow:hidden;background:#e7f5f1;line-height:0}
.game-install-thumbnail{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover}
.game-install-close{position:absolute;right:12px;top:12px;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid #fff;border-radius:50%;background:#fffffff0;color:#23473f;box-shadow:0 2px 10px #0002;font:400 26px/1 Arial,sans-serif;cursor:pointer}
.game-install-close:hover{background:#fff}
.game-install-content{padding:23px 26px 18px}
.game-install-dialog h2{font:800 25px/1.2 Arial,sans-serif;letter-spacing:-.6px;margin:0 0 10px;color:#193c34}
.game-install-status{margin:12px 0 0;color:#65796f;font-size:12px;line-height:1.6}
.game-install-dialog .game-install-confirm{width:100%;min-height:48px;margin:8px 0 0;border-radius:12px;font-size:15px}
.game-install-bar[hidden],.game-install-button[hidden]{display:none}
@media(max-width:480px){.game-install-bar{padding:8px 12px}.game-install-header{gap:8px}.game-install-heading>span{display:none}.game-install-heading>strong{font-size:11px;white-space:normal;line-height:1.3}.game-install-app-icon{width:34px;height:34px;border-radius:10px}.game-install-header>.game-install-button{gap:6px;padding:9px 11px;font-size:11px;min-height:40px;border-radius:12px}.game-install-content{padding:20px 20px 14px}.game-install-dialog h2{font-size:23px}}
@media(display-mode:standalone),(display-mode:fullscreen){.game-install-bar{display:none}}
@media(prefers-reduced-motion:reduce){.game-install-button{transition:none}}

/* En moviles el juego ocupa todo el viewport; Descargar queda como opcion flotante. */
@media(max-width:780px), (pointer:coarse) and (max-width:1024px){
  html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}
  body,body:has(.game-install-bar:not([hidden])){padding:0}
  #wrap,.desktop-layout,body:has(.game-install-bar:not([hidden])) #wrap,body:has(.game-install-bar:not([hidden])) .desktop-layout{position:fixed;inset:0;display:block;width:100%;height:100dvh;min-height:0;max-height:none;margin:0;padding:0;gap:0}
  .game-shell,.game-wrap,body:has(.game-install-bar:not([hidden])) .game-shell{width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;border:0;border-radius:0;box-shadow:none;overflow:hidden}
  #game,body:has(.game-install-bar:not([hidden])) #game,body:has(.game-install-bar:not([hidden])) .game-shell #game{display:block;width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;border:0;border-radius:0;box-shadow:none;object-fit:fill}
  .side-banner,.side-art,.bg-deco,.dengue-bg-art,body::before,body::after{display:none}
  .game-install-bar{inset:calc(env(safe-area-inset-top,0px) + 8px) auto auto 50%;transform:translateX(-50%);width:max-content;height:auto;padding:0;border:0;background:transparent;backdrop-filter:none}
  .game-install-header{gap:0}
  .game-install-app-icon,.game-install-heading{display:none}
  .game-install-bar .game-install-button{min-height:36px;padding:7px 12px;gap:6px;border:1px solid #d1e8e1;border-radius:10px;background:#fffffff2;color:#076a58;box-shadow:0 2px 8px #0002;font-size:12px}
  .game-install-bar .game-install-button:hover{background:#fff;color:#075646;transform:none}
  body[data-game-state=playing] .game-install-bar{display:none}
}
