/* =========================================================
   SKYSUITE STAGE 87.2 — INSTALL EXPERIENCE & APP IDENTITY
   ========================================================= */
:root{
  --sky-pwa-safe-top:env(safe-area-inset-top,0px);
  --sky-pwa-safe-right:env(safe-area-inset-right,0px);
  --sky-pwa-safe-bottom:env(safe-area-inset-bottom,0px);
  --sky-pwa-safe-left:env(safe-area-inset-left,0px);
}

.sky-pwa-install-toast{display:none!important}
.sky-pwa-install-card{
  --sky-pwa-accent:#741a3b;
  position:fixed;
  z-index:2800;
  left:50%;
  bottom:calc(18px + var(--sky-pwa-safe-bottom));
  width:min(520px,calc(100vw - 28px));
  transform:translateX(-50%);
  display:grid;
  grid-template-columns:52px minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:12px;
  border:1px solid rgba(116,26,59,.14);
  border-radius:20px;
  background:rgba(255,255,255,.96);
  box-shadow:0 22px 70px rgba(39,14,25,.22);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.sky-pwa-install-icon{width:52px;height:52px;border-radius:15px;box-shadow:0 7px 18px rgba(54,17,33,.13)}
.sky-pwa-install-copy{min-width:0}
.sky-pwa-install-copy>span{display:block;color:var(--sky-pwa-accent);font-size:7px;font-weight:950;letter-spacing:.14em}
.sky-pwa-install-copy>strong{display:block;margin-top:2px;color:#24151c;font-size:14px;line-height:1.15;font-weight:950}
.sky-pwa-install-copy>small{display:block;margin-top:3px;color:#80737a;font-size:8px;line-height:1.3;font-weight:650}
.sky-pwa-install-actions{display:flex;align-items:center;gap:6px}
.sky-pwa-install-actions button,.sky-pwa-ios-done{min-height:36px;padding:0 12px;border-radius:10px;font-size:8px;font-weight:900;cursor:pointer}
.sky-pwa-later{border:0;background:transparent;color:#756970}
.sky-pwa-primary,.sky-pwa-ios-done{border:0;background:var(--sky-pwa-accent);color:#fff;box-shadow:0 8px 18px color-mix(in srgb,var(--sky-pwa-accent) 24%,transparent)}

.sky-pwa-ios-sheet{position:fixed;z-index:2900;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:14px 14px calc(14px + var(--sky-pwa-safe-bottom));background:rgba(31,12,21,.46);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.sky-pwa-ios-panel{--sky-pwa-accent:#741a3b;width:min(520px,100%);padding:10px 18px 18px;border-radius:25px;background:#fff;box-shadow:0 28px 80px rgba(32,10,20,.3);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.sky-pwa-ios-grab{width:42px;height:4px;margin:0 auto 14px;border-radius:10px;background:#ded3d8}
.sky-pwa-ios-title{display:flex;align-items:center;gap:11px;padding-bottom:13px;border-bottom:1px solid #eee5e9}
.sky-pwa-ios-title img{width:45px;height:45px;border-radius:13px}.sky-pwa-ios-title span,.sky-pwa-ios-title strong{display:block}.sky-pwa-ios-title span{color:var(--sky-pwa-accent);font-size:7px;font-weight:950;letter-spacing:.12em}.sky-pwa-ios-title strong{margin-top:2px;color:#27171e;font-size:15px;font-weight:950}
.sky-pwa-ios-panel ol{list-style:none;padding:5px 0;margin:0}.sky-pwa-ios-panel li{display:flex;align-items:center;gap:11px;padding:10px 0;border-bottom:1px solid #f3ecef;color:#655960;font-size:10px;line-height:1.45}.sky-pwa-ios-panel li>b{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;border-radius:9px;background:#f8eef2;color:var(--sky-pwa-accent);font-size:9px}.sky-pwa-ios-done{width:100%;margin-top:12px;min-height:44px}

.sky-pwa-launch-veil{--sky-pwa-accent:#741a3b;position:fixed;z-index:5000;inset:0;display:grid;place-items:center;padding:26px;background:linear-gradient(155deg,color-mix(in srgb,var(--sky-pwa-accent) 96%,#240713),color-mix(in srgb,var(--sky-pwa-accent) 70%,#17040b));opacity:0;transition:opacity .18s ease;pointer-events:none}.sky-pwa-launch-veil.show{opacity:1}.sky-pwa-launch-veil.leaving{opacity:0}.sky-pwa-launch-brand{text-align:center;color:#fff}.sky-pwa-launch-brand img{width:78px;height:78px;border-radius:23px;background:#fff;box-shadow:0 18px 45px rgba(0,0,0,.18)}.sky-pwa-launch-brand strong,.sky-pwa-launch-brand span{display:block}.sky-pwa-launch-brand strong{margin-top:16px;font-size:22px;font-weight:950;letter-spacing:-.035em}.sky-pwa-launch-brand span{margin-top:4px;color:rgba(255,255,255,.72);font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.sky-pwa-launch-brand i{display:block;width:46px;height:3px;margin:18px auto 0;border-radius:8px;background:rgba(255,255,255,.3);overflow:hidden}.sky-pwa-launch-brand i:after{content:"";display:block;width:50%;height:100%;border-radius:inherit;background:#fff;animation:skyPwaLaunch 600ms ease-in-out infinite alternate}@keyframes skyPwaLaunch{from{transform:translateX(0)}to{transform:translateX(100%)}}

html.sky-pwa-standalone body{overscroll-behavior-y:none}
html.sky-pwa-standalone .sky-global-topbar,
html.sky-pwa-standalone .sf-topbar,
html.sky-pwa-standalone .sp-topbar,
html.sky-pwa-standalone .fp-top,
html.sky-pwa-standalone .learn-nav{padding-top:max(var(--sky-pwa-safe-top),0px)}

@media(max-width:980px){
  .sky-pwa-install-card{bottom:calc(78px + var(--sky-pwa-safe-bottom));width:min(470px,calc(100vw - 20px));grid-template-columns:46px minmax(0,1fr) auto;padding:10px;border-radius:18px}.sky-pwa-install-icon{width:46px;height:46px;border-radius:13px}.sky-pwa-install-actions{flex-direction:column-reverse;gap:1px}.sky-pwa-install-actions button{min-height:30px;padding:0 9px}
}

@media(max-width:520px){
  .sky-pwa-install-card{grid-template-columns:42px minmax(0,1fr);gap:9px}.sky-pwa-install-icon{width:42px;height:42px}.sky-pwa-install-actions{grid-column:1/-1;display:grid;grid-template-columns:.8fr 1.2fr;gap:7px}.sky-pwa-install-actions button{min-height:38px}.sky-pwa-install-copy>strong{font-size:13px}.sky-pwa-install-copy>small{font-size:7.6px}
}

/* Mobile login launch polish: use the whole device surface instead of a tiny
   centered desktop card. No authentication behavior is changed. */
@media(max-width:760px){
  html[data-sky-pwa-portal="family"] body{background:#fff!important;place-items:stretch!important;padding:0!important}
  html[data-sky-pwa-portal="family"] body>.box{width:100%!important;min-height:100dvh!important;border-radius:0!important;box-shadow:none!important}
  html[data-sky-pwa-portal="family"] body>.box>.form{min-height:100dvh!important;display:flex!important;flex-direction:column!important;justify-content:center!important;padding:clamp(44px,8vh,78px) 24px calc(30px + var(--sky-pwa-safe-bottom))!important}

  html[data-sky-pwa-portal="student"] body>.login-shell,
  html[data-sky-pwa-portal="staff"] body>.login-shell{min-height:100dvh!important}
  html[data-sky-pwa-portal="student"] .form-side,
  html[data-sky-pwa-portal="staff"] .form-side{min-height:100dvh!important;padding:clamp(36px,7vh,68px) 24px calc(28px + var(--sky-pwa-safe-bottom))!important}

  html[data-sky-pwa-portal="operations"] .sg-access-panel{min-height:100dvh!important;padding-bottom:calc(24px + var(--sky-pwa-safe-bottom))!important}
  html[data-sky-pwa-portal="operations"] .sg-access-inner{margin:auto!important}

  html[data-sky-pwa-portal="learning"] .learn-login-shell{min-height:calc(100dvh - 64px)!important}
}

@media(prefers-reduced-motion:reduce){.sky-pwa-launch-veil{display:none!important}.sky-pwa-launch-brand i:after{animation:none!important}}
