.app-install-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:7px 10px;border:1px solid #c6dce6;border-radius:10px;background:#fff;color:#096b92;font-family:inherit;font-size:13px;font-weight:700;line-height:1.3;cursor:pointer;box-shadow:none;white-space:nowrap}
/* Keep account fields reachable when the installed iOS app opens its keyboard. */
.ios-installed-auth .auth-screen{--auth-card-space:calc(32px + env(safe-area-inset-top) + env(safe-area-inset-bottom));top:var(--auth-viewport-top,0px);bottom:auto;height:var(--auth-viewport-height,100dvh);min-height:0;padding:calc(16px + env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
.ios-installed-auth .auth-card{height:min(620px,calc(var(--auth-viewport-height,100dvh) - var(--auth-card-space)));min-height:0;justify-content:flex-start;overflow-y:auto;scroll-padding-block:16px;-webkit-overflow-scrolling:touch}
.ios-installed-auth .auth-preview.auth-demo.session-card:not(.demo-expanded){height:min(620px,calc(var(--auth-viewport-height,100dvh) - var(--auth-card-space)));min-height:0;overflow:hidden}
.ios-installed-auth .auth-card>*{flex-shrink:0}
.ios-installed-auth .auth-card>:first-child{margin-top:auto}
.ios-installed-auth .auth-card>:last-child{margin-bottom:auto}
.ios-installed-auth .auth-form input:not([type=checkbox]){font-size:16px;-webkit-user-select:text;user-select:text;touch-action:manipulation;-webkit-text-fill-color:currentColor;caret-color:var(--text)}
@media(max-width:660px){.ios-installed-auth .auth-screen{--auth-card-space:calc(88px + env(safe-area-inset-top) + env(safe-area-inset-bottom))}}
.app-install-button[hidden]{display:none}.app-install-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Fit expanded controls to the visible app, including the iOS home indicator. */
.mobile-game-viewport body.standalone-player{position:fixed;top:var(--game-viewport-top,0px);right:0;bottom:auto;left:0;height:var(--game-viewport-height,100dvh);min-height:0;padding:0;overflow:hidden}
.mobile-game-viewport .standalone-player main.expanded-layout{height:100%;min-height:0;overflow:hidden;padding-top:env(safe-area-inset-top)}
.mobile-game-viewport .standalone-player .expanded-body{grid-template-rows:minmax(0,1fr);padding-right:max(6px,env(safe-area-inset-right));padding-bottom:calc(8px + env(safe-area-inset-bottom));padding-left:max(6px,env(safe-area-inset-left))}
.mobile-game-viewport .auth-preview.auth-demo.demo-expanded{top:var(--game-viewport-top,0px);bottom:auto;height:var(--game-viewport-height,100dvh);min-height:0}
.mobile-game-viewport :is(.standalone-player,.demo-expanded) .player-resize-frame{min-height:0;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scroll-padding-bottom:8px}
.app-install-button:focus-visible{outline:2px solid #087fae;outline-offset:3px}.app-install-button:disabled{opacity:.6;cursor:wait}.auth-brand .app-install-button{margin-left:auto}
.app-install-popup{position:fixed;z-index:2000;top:max(16px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:grid;grid-template-columns:48px minmax(0,1fr) auto 26px;align-items:center;gap:12px;width:min(480px,calc(100% - 28px));box-sizing:border-box;padding:16px;border:1px solid #c7dce7;border-radius:16px;background:#fff;color:#16384b;font-family:inherit;box-shadow:0 10px 40px #19394b26}
.app-install-popup[hidden],.app-install-popup [hidden]{display:none!important}
.app-install-logo{display:block;width:48px;height:48px;border:1px solid #dce9f0;border-radius:12px}
.app-install-copy{display:grid;gap:3px;line-height:1.4}.app-install-copy strong{font-size:18px;letter-spacing:-.3px}.app-install-copy span{font-size:13px;color:#587087}
.app-install-confirm{min-height:40px;padding:9px 16px;border:1px solid #078ba6;border-radius:10px;background:linear-gradient(125deg,#087fac,#079c9b);color:white;font-family:inherit;font-size:14px;font-weight:700;white-space:nowrap;cursor:pointer;box-shadow:none}
.app-install-confirm:hover:not(:disabled){filter:brightness(.95)}.app-install-confirm:disabled{opacity:.55;cursor:default}
.app-install-close{display:grid;place-items:center;width:26px;height:30px;padding:0;border:0;border-radius:8px;background:transparent;color:#607c8c;font-family:inherit;font-size:24px;line-height:1;cursor:pointer;box-shadow:none}
.app-install-close:hover{background:#edf5fa}.app-install-close:disabled{opacity:.5;cursor:wait}
.app-install-help{grid-column:1/-1;margin:0;padding-top:10px;border-top:1px solid #e2edf3;font-size:12px;line-height:1.5;color:#587087}
:root[data-theme=dark] .app-install-button,:root[data-theme=dark] .app-install-popup{background:#161616;border-color:#404040;color:#e8f5fa}
:root[data-theme=dark] .app-install-copy span,:root[data-theme=dark] .app-install-help,:root[data-theme=dark] .app-install-close{color:#b9c7ce}:root[data-theme=dark] .app-install-help,:root[data-theme=dark] .app-install-logo{border-color:#404040}:root[data-theme=dark] .app-install-close:hover{background:#292929}
@media(max-width:700px){.app-install-button{width:36px;height:36px;padding:7px;flex-shrink:0}.app-install-button .install-label{display:none}}
@media(max-width:420px){.app-install-popup{top:max(12px,env(safe-area-inset-top));width:calc(100% - 24px);grid-template-columns:40px minmax(0,1fr) auto 22px;padding:12px;gap:8px;border-radius:14px}.app-install-logo{width:40px;height:40px;border-radius:10px}.app-install-copy strong{font-size:16px}.app-install-copy span{font-size:12px}.app-install-confirm{font-size:13px;padding:9px 12px}.app-install-close{width:22px}}
