/* ---- PWA Install Banner (Tailwind-free) ------------------------------- */
:root {
    --bg: #ffffff;
    --bg-muted: rgba(255, 255, 255, 0.95);
    --text: #0a0a0a;
    --text-muted: #5f6368;
    --border: rgba(0, 0, 0, 0.08);
    --ring: rgba(0, 0, 0, 0.08);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.16);
    --grad-a: #24A6E2;
    --grad-b: #FA437B;
    --help-bg: #fafafa;
    --help-border: #e7e7e7;
    --help-text: #202124;
}

.dark :root,
html.dark {
    --bg: #0b0b0c;
    --bg-muted: rgba(15, 15, 16, 0.95);
    --text: #ffffff;
    --text-muted: #c9c9c9;
    --border: rgba(255, 255, 255, 0.12);
    --ring: rgba(255, 255, 255, 0.12);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    --help-bg: rgba(38, 38, 38, 0.7);
    --help-border: #2a2a2a;
    --help-text: #e5e5e5;
}

/* Container fixed at bottom */
.pwa-banner {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 70;
}

/* Max width wrapper */
.pwa-inner {
    max-width: 80rem;
    /* 1280px ~ max-w-7xl */
    margin-inline: auto;
    padding-inline: 1rem;
    /* px-4 */
    padding-bottom: 1.25rem;
    /* pb-5 */
}

/* Card */
.pwa-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    border-radius: 1rem;
    /* 2xl-ish */
    border: 1px solid var(--border);
    background: var(--bg-muted);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
    padding: 1rem 1rem;
    /* px-4 py-4 */
    color: var(--text);
}

@media (min-width: 640px) {

    /* sm */
    .pwa-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1.25rem 1.5rem;
        /* sm:px-6 sm:py-5 */
    }
}

/* Left: logo + text */
.pwa-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.pwa-logo {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: .5rem;
    box-shadow: 0 0 0 1px var(--ring) inset;
    object-fit: cover;
}

.pwa-title {
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.pwa-subtitle {
    margin: .15rem 0 0;
    font-size: .875rem;
    line-height: 1.3;
    color: var(--text-muted);
}

/* Right: CTAs */
.pwa-ctas {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* Buttons */
.pwa-btn {
    height: 2.5rem;
    padding-inline: 1.25rem;
    border: none;
    border-radius: .75rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    transition: opacity .15s ease, transform .06s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pwa-btn:active {
    transform: translateY(1px);
}

.pwa-btn--gradient {
    background-image: linear-gradient(90deg, var(--grad-a), var(--grad-b));
}

.pwa-btn--gradient:hover {
    opacity: .95;
}

/* Dismiss × */
.pwa-dismiss {
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: .2rem;
    border-radius: .375rem;
    transition: color .15s ease, background-color .15s ease;
}

.pwa-dismiss:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}

html.dark .pwa-dismiss:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* iOS helper box */
.pwa-ioshelp {
    margin-top: .75rem;
    border-radius: .75rem;
    padding: .75rem;
    line-height: 1.6;
    font-size: .875rem;
    background: var(--help-bg);
    color: var(--help-text);
    border: 1px solid var(--help-border);
}

/* Utility: visually hidden (if needed) */
.pwa-hidden {
    display: none !important;
}

[x-cloak] {
    display: none !important;
}