/*
 * PWA controls intentionally live in a separately versioned stylesheet.
 * This keeps the install UI styled even when an older service-worker cache
 * still contains the main application stylesheet.
 */
.app-logo{display:block;width:100%;height:100%;border-radius:inherit;object-fit:contain}

body .btn-install{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:0 14px;border:0;border-radius:14px!important;background:linear-gradient(135deg,#6355e8,#0891b2);color:#fff;box-shadow:0 12px 30px rgba(8,145,178,.2);white-space:nowrap}
body .btn-install:hover{background:linear-gradient(135deg,#7468f6,#0aa4ca);color:#fff}
body .btn-install[hidden],body .pwa-install-fab[hidden]{display:none!important}
body .btn-install .install-label{display:inline}

body .pwa-install-fab{position:fixed;right:22px;bottom:22px;z-index:3190;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:45px;padding:0 16px;border:1px solid rgba(255,255,255,.18);border-radius:15px;background:linear-gradient(135deg,#7568ff,#0891b2);color:#fff;box-shadow:0 18px 60px rgba(0,0,0,.34);font:700 .84rem/1 inherit;cursor:pointer;transition:transform .18s ease,filter .18s ease}
body .pwa-install-fab:hover{transform:translateY(-2px);filter:saturate(1.1)}
body .pwa-install-fab i{font-size:1rem;line-height:1}
body .pwa-install-guidance{position:fixed;inset:0;z-index:4000;display:grid;place-items:center;padding:18px;background:rgba(5,5,12,.74);-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px)}
body .pwa-guidance-card{position:relative;width:min(420px,100%);padding:28px;border:1px solid rgba(255,255,255,.14);border-radius:28px;background:linear-gradient(160deg,#1a1932,#0d0d18 68%);box-shadow:0 30px 120px rgba(0,0,0,.62);text-align:center;animation:modalPop .2s cubic-bezier(.16,1,.3,1) both}
body .pwa-guidance-icon{display:block;width:68px;height:68px;margin:0 auto 15px;border-radius:22px;box-shadow:0 15px 42px rgba(117,104,255,.34)}
body .pwa-guidance-card h2{margin:0;font-size:1.18rem}
body .pwa-guidance-card p{margin:10px 0 20px;color:var(--muted);line-height:1.65}
body .pwa-guidance-close{position:absolute;top:12px;right:13px;width:34px;height:34px;border:0;border-radius:11px;background:#ffffff0d;color:#cdd0df;font:1.35rem/1 inherit;cursor:pointer}
body .pwa-guidance-close:hover{background:#ffffff18;color:#fff}

/* Preserve space for search, refresh, and sign-out actions on narrower views. */
@media(max-width:1100px){
  body .top-actions .btn-install{width:42px;min-width:42px;height:42px;padding:0!important;display:inline-grid!important;place-items:center!important}
  body .top-actions .btn-install .install-label{display:none}
}

/* The floating install control is icon-only on phones, with a comfortable tap target. */
@media(max-width:760px){
  body .pwa-install-fab{right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:46px;min-width:46px;height:46px;min-height:46px;padding:0;border-radius:15px}
  body .pwa-install-fab .pwa-install-label{display:none}
  body .pwa-guidance-card{padding:24px 20px}
}

@media(prefers-reduced-motion:reduce){
  body .pwa-install-fab{transition:none}
  body .pwa-install-fab:hover{transform:none}
}
