.pwa-install-banner[hidden],
.pwa-install-modal[hidden],
.pwa-install-trigger[hidden] {
    display: none !important;
}

.pwa-install-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--theme-border);
    border-radius: 0.75rem;
    background: var(--theme-surface);
    color: var(--theme-text-soft);
    font-size: 0.875rem;
    font-weight: 800;
    cursor: pointer;
}

.pwa-install-trigger:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.08);
    color: #047857;
}

.dark .pwa-install-trigger:hover {
    color: #6ee7b7;
}

.pwa-install-trigger svg {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
}

.pwa-install-trigger.is-available {
    display: inline-flex;
}

.pwa-home-section {
    overflow: hidden;
    background: #073b34;
    color: #ffffff;
}

.pwa-home-section__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(20rem, 0.92fr);
    gap: 3rem;
    align-items: center;
    width: min(100% - 2rem, 80rem);
    margin: 0 auto;
    padding: 3.75rem 0;
}

.pwa-home-section__content {
    min-width: 0;
}

.pwa-home-section__eyebrow {
    margin: 0;
    color: #6ee7b7;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.pwa-home-section h2 {
    max-width: 44rem;
    margin: 0.55rem 0 0;
    color: #ffffff !important;
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    font-weight: 900;
    line-height: 1.35;
}

.pwa-home-section__description {
    max-width: 43rem;
    margin: 1rem 0 0;
    color: #d1fae5;
    font-size: 1rem;
    line-height: 1.9;
}

.pwa-home-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.15rem;
    margin-top: 1.3rem;
}

.pwa-home-benefits span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #ecfdf5;
    font-size: 0.82rem;
    font-weight: 800;
}

.pwa-home-benefits svg {
    width: 1rem;
    height: 1rem;
    color: #6ee7b7;
}

.pwa-home-section__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 1.6rem;
}

.pwa-home-install-button {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 3.25rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    background: #ffffff;
    color: #065f46;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
}

.pwa-home-install-button.is-available {
    display: inline-flex;
}

.pwa-home-install-button:hover {
    background: #ecfdf5;
    transform: translateY(-1px);
}

.pwa-home-install-button svg,
.pwa-home-installed svg {
    width: 1.2rem;
    height: 1.2rem;
}

.pwa-home-installed {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(110, 231, 183, 0.4);
    border-radius: 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    color: #d1fae5;
    font-weight: 900;
}

.pwa-home-installed[hidden] {
    display: none !important;
}

.pwa-home-section__status {
    flex-basis: 100%;
    margin: 0;
    color: #a7f3d0;
    font-size: 0.76rem;
}

.pwa-device-showcase {
    position: relative;
    min-width: 0;
    padding: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.pwa-device-showcase__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pwa-device-showcase__brand img {
    width: 5rem;
    height: 5rem;
    border-radius: 1.15rem;
    object-fit: cover;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.pwa-device-showcase__brand span {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.6;
}

.pwa-device-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1.4rem;
}

.pwa-device-list > div {
    min-width: 0;
    padding: 0.9rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.07);
    text-align: center;
}

.pwa-device-list__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    margin: 0 auto 0.55rem;
    border-radius: 0.65rem;
    background: rgba(110, 231, 183, 0.12);
    color: #6ee7b7;
}

.pwa-device-list__icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.pwa-device-list strong,
.pwa-device-list small {
    display: block;
    overflow-wrap: anywhere;
}

.pwa-device-list strong {
    color: #ffffff;
    font-size: 0.78rem;
}

.pwa-device-list small {
    margin-top: 0.2rem;
    color: #a7f3d0;
    font-size: 0.65rem;
}

.pwa-install-mobile-link {
    width: 100%;
    justify-content: flex-start;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    padding: 0.65rem 0.75rem;
    color: #4b5563;
}

.pwa-install-mobile-link:hover {
    background: rgba(16, 185, 129, 0.08);
}

.pwa-install-banner {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 85;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    width: min(30rem, calc(100vw - 2rem));
    padding: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--theme-border) 76%, transparent);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--theme-surface) 88%, transparent);
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    transform: translateY(1rem);
    opacity: 0;
    transition: opacity 220ms ease, transform 260ms ease;
}

.pwa-install-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.pwa-install-banner__icon img {
    display: block;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    object-fit: cover;
}

.pwa-install-banner__content {
    min-width: 0;
}

.pwa-install-banner__content strong,
.pwa-install-banner__content span {
    display: block;
}

.pwa-install-banner__content strong {
    color: var(--theme-text);
    font-size: 0.9rem;
}

.pwa-install-banner__content span {
    margin-top: 0.15rem;
    color: var(--theme-muted);
    font-size: 0.75rem;
}

.pwa-install-banner__action,
.pwa-install-modal__done {
    border: 0;
    border-radius: 0.75rem;
    background: #059669;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.pwa-install-banner__action {
    min-height: 2.5rem;
    padding: 0.55rem 0.9rem;
}

.pwa-install-banner__action:hover,
.pwa-install-modal__done:hover {
    background: #047857;
}

.pwa-install-banner__close,
.pwa-install-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--theme-muted);
    cursor: pointer;
}

.pwa-install-banner__close {
    width: 2rem;
    height: 2rem;
}

.pwa-install-banner__close:hover,
.pwa-install-modal__close:hover {
    background: var(--theme-surface-soft);
    color: var(--theme-text);
}

.pwa-install-banner__close svg,
.pwa-install-modal__close svg {
    width: 1.15rem;
    height: 1.15rem;
}

.pwa-install-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.pwa-install-modal__backdrop {
    position: absolute;
    inset: 0;
    background: var(--theme-overlay);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.pwa-install-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 30rem);
    max-height: min(90vh, 44rem);
    overflow-y: auto;
    border: 1px solid var(--theme-border);
    border-radius: 1rem;
    background: var(--theme-surface);
    padding: 1.5rem;
    color: var(--theme-text);
    box-shadow: 0 28px 80px rgba(2, 6, 23, 0.35);
}

.pwa-install-modal__close {
    position: absolute;
    top: 0.9rem;
    left: 0.9rem;
    width: 2.25rem;
    height: 2.25rem;
}

.pwa-install-modal__brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding-left: 2rem;
}

.pwa-install-modal__brand img {
    width: 4rem;
    height: 4rem;
    flex: 0 0 auto;
    border-radius: 1rem;
    object-fit: cover;
}

.pwa-install-modal__brand p {
    margin: 0 0 0.2rem;
    color: #059669;
    font-size: 0.75rem;
    font-weight: 800;
}

.pwa-install-modal__brand h2 {
    margin: 0;
    color: var(--theme-text);
    font-size: 1.15rem;
    line-height: 1.5;
}

.pwa-install-modal__description {
    margin: 1.25rem 0;
    color: var(--theme-muted);
    line-height: 1.75;
}

.pwa-install-steps {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pwa-install-steps li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.9rem;
    border: 1px solid var(--theme-border);
    border-radius: 0.85rem;
    background: var(--theme-surface-soft);
}

.pwa-install-steps__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    font-weight: 900;
}

.dark .pwa-install-steps__number {
    color: #6ee7b7;
}

.pwa-install-steps strong,
.pwa-install-steps span {
    display: block;
}

.pwa-install-steps strong {
    color: var(--theme-text);
    font-size: 0.9rem;
}

.pwa-install-steps li div > span {
    margin-top: 0.2rem;
    color: var(--theme-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.pwa-install-steps .pwa-install-steps__share {
    display: inline-flex;
    margin-top: 0.35rem;
    color: #2563eb;
}

.pwa-install-steps__share svg {
    width: 1.25rem;
    height: 1.25rem;
}

.pwa-install-modal__done {
    width: 100%;
    min-height: 3rem;
    margin-top: 1rem;
}

body.pwa-modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .pwa-home-section__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.75rem 0;
    }

    .pwa-device-showcase {
        order: -1;
    }

    .pwa-home-section h2 {
        font-size: 1.75rem;
    }

    .pwa-home-section__description {
        font-size: 0.92rem;
    }

    .pwa-home-section__actions {
        align-items: stretch;
    }

    .pwa-home-install-button,
    .pwa-home-installed {
        width: 100%;
        justify-content: center;
    }

    .pwa-device-showcase {
        padding: 0 0 1.5rem;
        border-top: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        border-right: 0;
    }

    .pwa-device-showcase__brand img {
        width: 4rem;
        height: 4rem;
    }

    .pwa-install-banner {
        right: 0.75rem;
        bottom: calc(92px + env(safe-area-inset-bottom));
        width: calc(100vw - 1.5rem);
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .pwa-install-banner__content span {
        display: none;
    }

    .pwa-install-banner__close {
        position: absolute;
        top: -0.55rem;
        left: -0.35rem;
        border: 1px solid var(--theme-border);
        background: var(--theme-surface);
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
    }

    .pwa-install-modal {
        align-items: flex-end;
        padding: 0;
    }

    .pwa-install-modal__panel {
        width: 100%;
        max-height: 92vh;
        border-radius: 1rem 1rem 0 0;
        padding: 1.25rem;
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-install-banner,
    .pwa-home-install-button {
        transition: none;
    }
}
