.pwa-install-hint,
.pwa-install-sheet {
    --pwa-accent: #31d07f;
    --pwa-blue: #32a6de;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pwa-install-hint[hidden],
.pwa-install-sheet[hidden] { display: none !important; }

.pwa-install-hint {
    position: fixed;
    z-index: 1100;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    max-width: 680px;
    margin-inline: auto;
    padding: 14px 42px 14px 14px;
    color: #eaf7ff;
    border: 1px solid rgba(50, 166, 222, .42);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(13, 27, 42, .98), rgba(27, 38, 59, .98));
    box-shadow: 0 14px 40px rgba(0, 0, 0, .35), 0 0 22px rgba(50, 166, 222, .12);
    animation: pwa-hint-enter .28s ease-out both;
}

.pwa-install-hint__icon { display: block; border-radius: 12px; }
.pwa-install-hint__copy { min-width: 0; line-height: 1.28; }
.pwa-install-hint__copy strong,
.pwa-install-hint__copy span { display: block; }
.pwa-install-hint__copy strong { color: #fff; font-size: .95rem; }
.pwa-install-hint__copy span {
    margin-top: 2px;
    overflow: hidden;
    color: #bcd7e5;
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pwa-install-hint__actions { display: flex; gap: 7px; }
.pwa-install-hint button,
.pwa-install-sheet button {
    min-height: 42px;
    border-radius: 12px;
    cursor: pointer;
    touch-action: manipulation;
}

.pwa-install-hint__primary,
.pwa-install-sheet__done {
    padding: 8px 14px;
    color: #071a14;
    font-weight: 700;
    border: 0;
    background: var(--pwa-accent);
}

.pwa-install-hint__later,
.pwa-install-sheet__later {
    padding: 8px 12px;
    color: #d7edf7;
    border: 1px solid rgba(188, 215, 229, .35);
    background: transparent;
}

.pwa-install-hint__close,
.pwa-install-sheet__close {
    position: absolute;
    top: 5px;
    right: 7px;
    min-width: 36px;
    padding: 0;
    color: #bcd7e5;
    font-size: 1.5rem;
    border: 0;
    background: transparent;
}

.pwa-install-hint__close {
    top: -8px;
    right: -6px;
}

.pwa-install-sheet { position: fixed; z-index: 1200; inset: 0; }
.pwa-install-sheet__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0 !important;
    background: rgba(2, 8, 15, .62);
}

.pwa-install-sheet__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: min(78vh, 620px);
    overflow-y: auto;
    padding: 12px 22px calc(20px + env(safe-area-inset-bottom));
    color: #eaf7ff;
    border: 1px solid rgba(50, 166, 222, .38);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    outline: 0;
    background: #0d1b2a;
    box-shadow: 0 -16px 44px rgba(0, 0, 0, .4);
    animation: pwa-sheet-enter .28s ease-out both;
}

.pwa-install-sheet__panel h2 { margin: 12px 38px 14px 0; color: #fff; font-size: 1.25rem; }
.pwa-install-sheet__panel li,
.pwa-install-sheet__panel p { line-height: 1.5; }
.pwa-install-sheet__handle {
    width: 42px;
    height: 5px;
    margin: 0 auto 8px;
    border-radius: 999px;
    background: rgba(188, 215, 229, .42);
}
.pwa-install-sheet__note {
    padding: 10px 12px;
    color: #cceaf8;
    border-left: 3px solid var(--pwa-blue);
    background: rgba(50, 166, 222, .1);
}
.pwa-install-sheet__actions { display: flex; gap: 9px; margin-top: 18px; }
.pwa-sheet-open { overflow: hidden; }

@keyframes pwa-hint-enter {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pwa-sheet-enter {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (min-width: 769px) {
    .pwa-install-hint,
    .pwa-install-sheet { display: none !important; }
}

@media (max-width: 560px) {
    .pwa-install-hint { grid-template-columns: 40px minmax(0, 1fr); padding: 12px 40px 12px 12px; }
    .pwa-install-hint__icon { width: 40px; height: 40px; }
    .pwa-install-hint__actions { grid-column: 1 / -1; }
    .pwa-install-hint__actions button { flex: 1; }
}

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