/* WAOM P2: Install prompt + installed-app handoff only. No shared menu or room selectors. */
#waomAppLaunchVeil{display:none;position:absolute;inset:0;z-index:18;pointer-events:none;
 background:#000;align-items:center;justify-content:center;opacity:1;visibility:visible}
#waomAppLaunchVeil img{display:block;width:min(500px,55vw);max-height:60svh;height:auto;object-fit:contain;
 opacity:0;filter:drop-shadow(0 10px 18px #000a)}
html.waom-app-window:not(.waom-embedded-wall):not(.waom-direct-locate):not(.waom-intro-seen) #waomAppLaunchVeil{
 display:flex;animation:waomP2Curtain 2.35s ease-out both}
html.waom-app-window:not(.waom-embedded-wall):not(.waom-direct-locate):not(.waom-intro-seen) #waomAppLaunchVeil img{
 animation:waomP2LaunchLogo 2.35s ease-in-out both}
@keyframes waomP2Curtain{0%,38%{opacity:1;visibility:visible}100%{opacity:0;visibility:hidden}}
@keyframes waomP2LaunchLogo{0%{opacity:0}22%,46%{opacity:1}100%{opacity:0}}
/* P2.1: both mobile logos use precisely the same initial width. Keep the docked corner size. */
@media(max-width:700px){
 #artwork #heroIdentity{width:min(170px,54vw);--brand-dock-scale:.49}
 #waomAppLaunchVeil img{width:min(170px,54vw);max-height:45svh}
}
@media(max-width:359px){#artwork #heroIdentity{--brand-dock-scale:.46}}
@media(min-width:701px){#waomP2InstallCard{display:none!important}}
@media(prefers-reduced-motion:reduce){#waomAppLaunchVeil{display:none!important;animation:none!important}}

#waomP2InstallCard,#waomP2InstallCard *{box-sizing:border-box}
#waomP2InstallCard{position:fixed;left:max(18px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom));
 z-index:95;width:min(380px,calc(100vw - 36px));color:#fff;background:rgba(9,10,11,.96);
 border:1px solid rgba(255,255,255,.78);border-radius:22px;padding:22px 21px 19px;
 box-shadow:0 18px 50px #000d,inset 0 1px 0 #ffffff12;backdrop-filter:blur(17px);
 font:400 14px/1.45 'Segoe UI',Arial,sans-serif;animation:waomP2CardIn .36s ease-out both}
#waomP2InstallCard[hidden]{display:none!important}
@keyframes waomP2CardIn{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
#waomP2InstallCard .waom-p2-close{position:absolute;right:10px;top:9px;background:#141414;border:1px solid #ffffff4f;
 color:#fff;border-radius:50%;width:34px;height:34px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:0;line-height:0;padding:0;appearance:none;-webkit-appearance:none}
#waomP2InstallCard .waom-p2-close::before,#waomP2InstallCard .waom-p2-close::after{
 content:'';position:absolute;left:50%;top:50%;width:15px;height:2px;background:currentColor;
 border-radius:1px;transform-origin:center}
#waomP2InstallCard .waom-p2-close::before{transform:translate(-50%,-50%) rotate(45deg)}
#waomP2InstallCard .waom-p2-close::after{transform:translate(-50%,-50%) rotate(-45deg)}
#waomP2InstallCard .waom-p2-close:hover{border-color:#fff;background:#303030}
#waomP2InstallCard .waom-p2-heading{font:900 27px/.96 Impact,'Arial Black','Segoe UI',sans-serif;
 letter-spacing:.004em;text-transform:uppercase;margin:10px 33px 8px 0;color:#fff}
#waomP2InstallCard .waom-p2-kicker{color:#b8ff67;font:900 10px 'Segoe UI',Arial,sans-serif;letter-spacing:.22em}
#waomP2InstallCard .waom-p2-summary{margin:0 0 13px;color:#e1e1e1;line-height:1.45;font-size:13px}
#waomP2InstallCard .waom-p2-illustration{display:flex;align-items:center;gap:15px;margin:8px 0 15px;min-height:78px}
#waomP2InstallCard .waom-p2-mini-phone{width:51px;height:77px;border:2px solid #e8e8e8;border-radius:11px;
 display:grid;place-items:center;position:relative;flex:none;background:#181818;overflow:hidden}
#waomP2InstallCard .waom-p2-mini-phone:before{position:absolute;content:'';height:3px;width:15px;border-radius:4px;
 top:5px;left:17px;background:#bbb}
#waomP2InstallCard .waom-p2-mini-phone img{width:34px;height:34px;object-fit:cover;border-radius:7px;
 animation:waomP2IconMotion 5s cubic-bezier(.2,.65,.2,1) both}
#waomP2InstallCard .waom-p2-steps{flex:1;min-width:0;display:flex;flex-direction:column;gap:5px;font:900 10px 'Segoe UI',Arial,sans-serif;
 letter-spacing:.10em;text-transform:uppercase}
#waomP2InstallCard .waom-p2-steps span{color:#e1e1e1;display:flex;gap:8px;align-items:center}
#waomP2InstallCard .waom-p2-steps b{font-size:16px;color:#baff62}
#waomP2InstallCard .waom-p2-progress{height:2px;border-radius:99px;background:#ffffff24;overflow:hidden;margin-bottom:15px}
#waomP2InstallCard .waom-p2-progress:before{content:'';display:block;height:100%;width:0;background:#baff62;
 animation:waomP2Progress 5s linear forwards}
@keyframes waomP2Progress{from{width:0}to{width:100%}}
@keyframes waomP2IconMotion{0%{transform:translateY(-17px) scale(.75);opacity:.1}22%,70%{transform:translateY(0) scale(1);opacity:1}100%{transform:translateY(0) scale(.96);opacity:1}}
#waomP2InstallCard .waom-p2-action{display:block;width:100%;min-height:47px;cursor:pointer;
 border:1px solid #fff;border-radius:999px;color:#111;background:#fff;font:900 12px 'Segoe UI',Arial,sans-serif;
 letter-spacing:.13em;padding:12px 17px;text-align:center}
#waomP2InstallCard .waom-p2-action:hover{background:#d4d4d4}
#waomP2InstallCard .waom-p2-action[hidden]{display:none!important}
#waomP2InstallCard .waom-p2-help{color:#ddd;font-size:12px;line-height:1.45;margin:10px 0 0}
#waomP2InstallCard .waom-p2-help[hidden]{display:none!important}
#waomP2InstallCard .waom-p2-dismiss{font-size:11px;color:#9f9f9f;text-align:center;margin:9px 0 0}
#waomP2InstallCard button:focus-visible{outline:3px solid #baff62;outline-offset:3px}
@media(max-width:700px){#waomP2InstallCard{right:12px;left:12px;bottom:max(12px,env(safe-area-inset-bottom));
 margin:auto;width:auto;max-width:410px;border-radius:19px;padding:18px 17px 15px}
 #waomP2InstallCard .waom-p2-heading{font-size:24px;margin-top:8px}}
@media(prefers-reduced-motion:reduce){#waomP2InstallCard,#waomP2InstallCard *{animation:none!important;transition:none!important}
 #waomP2InstallCard .waom-p2-progress:before{width:100%}}

/* P5: a mobile-only floating invitation, clear of fixed Dave in the lower right.
   Top alignment is deliberate: the old bottom-left card overlapped wall/Dave controls. */
@media(max-width:700px){
 #waomP2InstallCard{
  left:max(13px,env(safe-area-inset-left));right:auto;
  top:calc(79px + env(safe-area-inset-top));bottom:auto;
  width:min(355px,calc(100vw - 26px));max-height:calc(100dvh - 278px);
  min-height:0;overflow-y:auto;overscroll-behavior:contain;
  border-radius:18px;padding:19px 18px 15px;
  box-shadow:0 13px 42px #000e,inset 0 1px 0 #ffffff19;
 }
 #waomP2InstallCard .waom-p2-heading{font-size:clamp(21px,6vw,26px)}
 #waomP2InstallCard .waom-p2-summary{font-size:12px}
}
@media(max-height:620px) and (max-width:700px){
 #waomP2InstallCard{top:calc(64px + env(safe-area-inset-top));max-height:calc(100dvh - 235px)}
}

/* R5: true centred mobile modal, with click-blocking backdrop. */
@media (max-width:700px){
 html.waom-install-dialog-open,html.waom-install-dialog-open body{
  overflow:hidden!important;overscroll-behavior:none!important;
 }
 #waomP2InstallBackdrop{position:fixed!important;inset:0!important;z-index:2147482000!important;
  display:block!important;background:rgba(0,0,0,.82)!important;backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);touch-action:none;overscroll-behavior:contain;}
 #waomP2InstallBackdrop[hidden]{display:none!important}
 #waomP2InstallCard{
  position:fixed!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;
  transform:translate(-50%,-50%)!important;margin:0!important;z-index:2147482001!important;
  width:min(410px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;
  max-height:calc(100dvh - 36px)!important;max-height:calc(100svh - 36px)!important;
  overflow-y:auto!important;overscroll-behavior:contain!important;touch-action:pan-y!important;
  animation:waomP5CenterIn .28s ease-out both!important;
 }
 #waomP2InstallCard .waom-p2-progress{display:none!important}
}
@keyframes waomP5CenterIn{from{opacity:0;translate:0 13px}to{opacity:1;translate:0 0}}
@media (prefers-reduced-motion:reduce){#waomP2InstallCard{animation:none!important}}
