/* Scoped PWA install entry and iOS Add to Home Screen guide. */
[data-pwa-install-entry][hidden],
.pwa-install-overlay[hidden] {
    display: none !important;
}

.sm-landing-footer-install {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink-muted, rgba(255, 248, 235, 0.68));
    font: inherit;
    cursor: pointer;
    transition: color var(--t-fast, 150ms ease);
}

.sm-landing-footer-install:hover,
.sm-landing-footer-install:focus-visible {
    color: var(--gold-bright, #f0c66d);
}

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

.pwa-install-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    align-items: end;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}

.pwa-install-overlay__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(4, 3, 2, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pwa-install-sheet {
    position: relative;
    width: min(100%, 520px);
    max-height: min(78vh, 620px);
    margin: 0 auto;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 18px;
    border: 1px solid var(--tp-color-border, rgba(230, 184, 91, 0.28));
    border-radius: 24px;
    background: var(--tp-color-surface, #21170f);
    color: var(--tp-color-text, #fff8eb);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
    animation: pwa-install-enter 180ms ease-out;
}

.pwa-install-sheet__handle {
    width: 42px;
    height: 4px;
    margin: 0 auto 14px;
    border-radius: 999px;
    background: var(--tp-color-border, rgba(255, 255, 255, 0.22));
}

.pwa-install-sheet__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 12px;
    align-items: start;
}

.pwa-install-sheet__eyebrow {
    margin: 0 0 4px;
    color: var(--tp-color-primary, #e6b85b);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pwa-install-sheet h2 {
    margin: 0;
    font-size: clamp(20px, 5vw, 26px);
    line-height: 1.15;
}

.pwa-install-sheet__close {
    width: 44px;
    height: 44px;
    border: 1px solid var(--tp-color-border, rgba(255, 255, 255, 0.14));
    border-radius: 14px;
    background: var(--tp-color-surface-soft, rgba(255, 255, 255, 0.06));
    color: inherit;
    cursor: pointer;
}

.pwa-install-sheet__lead {
    margin: 12px 0 16px;
    color: var(--tp-color-text-muted, rgba(255, 248, 235, 0.72));
    line-height: 1.5;
}

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

.pwa-install-steps li {
    counter-increment: pwa-step;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 56px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--tp-color-surface-soft, rgba(255, 255, 255, 0.055));
    line-height: 1.35;
}

.pwa-install-steps li::before {
    content: counter(pwa-step);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--tp-color-primary, #e6b85b);
    color: #1a1209;
    font-weight: 900;
}

.pwa-install-sheet__done {
    width: 100%;
    min-height: 48px;
    margin-top: 16px;
    border: 0;
    border-radius: 15px;
    background: var(--tp-color-primary, #e6b85b);
    color: #1a1209;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.pwa-install-sheet button:focus-visible {
    outline: 2px solid var(--tp-color-focus, #fff4cf);
    outline-offset: 3px;
}

@keyframes pwa-install-enter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 720px) {
    .pwa-install-overlay { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
    .pwa-install-sheet { animation: none; }
}
