/* ============================================================
   Phony — PWA install sheet (liquid glass)
   ============================================================ */
.pwa-sheet {
    position: fixed; inset: 0; z-index: 2147483600;
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .35s ease;
}
.pwa-sheet.open { opacity: 1; pointer-events: auto; }

.pwa-backdrop {
    position: absolute; inset: 0;
    background: radial-gradient(120% 90% at 50% 100%, rgba(20,20,40,0.55), rgba(0,0,0,0.78));
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

.pwa-card {
    position: relative;
    width: 100%; max-width: 440px;
    margin: 0 12px 14px;
    padding: 26px 24px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 30px;
    text-align: center;
    color: #f5f5f7;
    background: linear-gradient(165deg, rgba(40,40,55,0.72), rgba(16,16,24,0.82));
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 -10px 60px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.18) inset;
    transform: translateY(120%);
    transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.pwa-sheet.open .pwa-card { transform: translateY(0); }

/* moving liquid sheen */
.pwa-glow {
    position: absolute; top: -60%; left: -30%;
    width: 160%; height: 160%;
    background: radial-gradient(closest-side, rgba(122,92,255,0.30), transparent 70%),
                radial-gradient(closest-side, rgba(74,158,255,0.26), transparent 70%);
    background-position: 20% 10%, 80% 30%;
    background-repeat: no-repeat;
    filter: blur(20px);
    animation: pwa-float 7s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes pwa-float {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(6%, 8%) scale(1.12); }
}

.pwa-x {
    position: absolute; top: 14px; right: 16px; z-index: 2;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.10); border: none; color: #cfcfd6;
    font-size: 20px; line-height: 1; cursor: pointer;
}
.pwa-x:hover { background: rgba(255,255,255,0.18); color: #fff; }

.pwa-appicon {
    position: relative; z-index: 1;
    width: 76px; height: 76px; margin: 4px auto 16px;
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.12);
}
.pwa-appicon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pwa-title { position: relative; z-index: 1; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 7px; color: #fff; }
.pwa-sub { position: relative; z-index: 1; font-size: 14px; line-height: 1.5; color: #b9b9c2; margin: 0 0 20px; }

.pwa-steps { position: relative; z-index: 1; text-align: left; margin: 0 0 18px; display: flex; flex-direction: column; gap: 12px; }
.pwa-step { display: flex; align-items: center; gap: 12px; }
.pwa-step-n {
    flex: none; width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, #4a9eff, #7c5cff); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.pwa-step-t { font-size: 14px; color: #e4e4ea; line-height: 1.4; }
.pwa-step-t b { color: #fff; font-weight: 600; }
.pwa-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; vertical-align: -6px;
    border-radius: 7px; background: rgba(74,158,255,0.18); border: 1px solid rgba(74,158,255,0.35);
    margin: 0 2px;
}
.pwa-ic svg { width: 14px; height: 14px; stroke: #7db4ff; }

.pwa-ok {
    position: relative; z-index: 1;
    width: 100%; padding: 14px; border: none; border-radius: 15px;
    background: linear-gradient(135deg, #4a9eff, #7c5cff); color: #fff;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: filter .15s, transform .15s;
}
.pwa-ok:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* little arrow hint pointing to the Safari share bar at the bottom */
.pwa-arrow {
    position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
    width: 16px; height: 16px;
}

/* Android/desktop install FAB */
.pwa-fab {
    position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 2147483500;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px; border: none; border-radius: 999px;
    background: linear-gradient(135deg, #4a9eff, #7c5cff); color: #fff;
    font-size: 14px; font-weight: 700; cursor: pointer;
    box-shadow: 0 10px 30px rgba(74,92,255,0.4);
    transform: translateY(120px); opacity: 0;
    transition: transform .4s cubic-bezier(0.16,1,0.3,1), opacity .4s;
}
.pwa-fab.show { transform: translateY(0); opacity: 1; }
.pwa-fab svg { width: 18px; height: 18px; }

@media (max-width: 380px) { .pwa-title { font-size: 19px; } .pwa-sub { font-size: 13px; } }
