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

.pwa-sheet-layer {
    position: fixed;
    z-index: 1400;
    inset: 0;
}

.pwa-sheet-layer[hidden] {
    display: none;
}

.pwa-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 18, 14, 0.58);
    opacity: 0;
    transition: opacity 180ms ease;
}

.pwa-sheet {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(88dvh, 620px);
    overflow-y: auto;
    padding: 10px 20px max(20px, env(safe-area-inset-bottom));
    border: 1px solid var(--line, #dce5e0);
    border-radius: 20px 20px 0 0;
    color: var(--text, var(--ink, #17221d));
    background: var(--panel-solid, var(--white, #fff));
    box-shadow: 0 -24px 70px rgba(10, 25, 17, 0.24);
    transform: translateY(105%);
    transition: transform 200ms ease;
}

.pwa-sheet-layer.is-open .pwa-sheet-backdrop {
    opacity: 1;
}

.pwa-sheet-layer.is-open .pwa-sheet {
    transform: translateY(0);
}

.pwa-sheet-handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: var(--line, #dce5e0);
}

.pwa-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.pwa-sheet-head h2 {
    margin: 3px 0 0;
    color: inherit;
    font-size: clamp(1.25rem, 5vw, 1.55rem);
    line-height: 1.2;
    letter-spacing: 0;
}

.pwa-sheet-kicker {
    color: var(--green-700, #19754f);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pwa-sheet-close {
    display: inline-grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--line, #dce5e0);
    border-radius: 10px;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.pwa-sheet-description {
    margin: 16px 0;
    color: var(--muted, #5e6b65);
    line-height: 1.55;
}

.pwa-sheet-steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: pwa-step;
}

.pwa-sheet-steps li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid var(--line, #dce5e0);
    border-radius: 12px;
    background: var(--panel-muted, var(--green-50, #f4faf7));
    counter-increment: pwa-step;
}

.pwa-sheet-steps li > span {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    color: var(--green-800, #126044);
    background: var(--green-100, #e9f6ef);
    font-size: 1.05rem;
}

.pwa-sheet-steps strong {
    font-size: 0.92rem;
}

.pwa-sheet-steps strong::before {
    content: counter(pwa-step) ". ";
}

.pwa-sheet-done {
    width: 100%;
    min-height: 46px;
    margin-top: 16px;
    border: 1px solid var(--green-700, #19754f);
    border-radius: 10px;
    color: #fff;
    background: var(--green-700, #19754f);
    font-weight: 750;
    cursor: pointer;
}

[data-pwa-install].is-installed,
[data-pwa-ios].is-installed,
[data-pwa-install-action].is-installed {
    cursor: default;
    opacity: 0.82;
}

html[data-theme="dark"] .pwa-sheet {
    --green-50: rgba(53, 194, 126, 0.08);
    --green-100: rgba(53, 194, 126, 0.14);
}

@media (min-width: 620px) {
    .pwa-sheet {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        width: min(520px, calc(100% - 40px));
        padding: 20px;
        border-radius: 16px;
        transform: translate(-50%, calc(-50% + 24px));
        opacity: 0;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    .pwa-sheet-layer.is-open .pwa-sheet {
        transform: translate(-50%, -50%);
        opacity: 1;
    }

    .pwa-sheet-handle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-sheet,
    .pwa-sheet-backdrop {
        transition: none;
    }
}
