.browser-guide[hidden] {
    display: none;
}

.browser-guide {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: start center;
    padding: max(92px, env(safe-area-inset-top)) 18px 24px;
    background: rgba(17, 14, 10, 0.78);
    backdrop-filter: blur(5px);
}

.browser-guide::before {
    content: "";
    position: absolute;
    top: max(18px, env(safe-area-inset-top));
    right: 24px;
    width: 52px;
    height: 52px;
    border-top: 3px solid #f6edd9;
    border-right: 3px solid #f6edd9;
    border-radius: 0 12px 0 0;
    transform: rotate(-8deg);
}

.browser-guide::after {
    content: "";
    position: absolute;
    top: max(15px, env(safe-area-inset-top));
    right: 20px;
    width: 14px;
    height: 14px;
    border-top: 3px solid #f6edd9;
    border-right: 3px solid #f6edd9;
    transform: rotate(-8deg);
}

.browser-guide-card {
    width: min(100%, 480px);
    padding: 28px;
    border: 1px solid rgba(215, 174, 98, 0.52);
    border-radius: 12px;
    background: #f6edd9;
    color: #171613;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.browser-guide-kicker {
    margin: 0 0 8px;
    color: #9e3026;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.browser-guide-title {
    margin: 0;
    font-size: 25px;
    line-height: 1.3;
}

.browser-guide-description {
    margin: 12px 0 0;
    color: #51483b;
    line-height: 1.7;
}

.browser-guide-steps {
    margin: 20px 0 0;
    padding: 16px 18px 16px 38px;
    border-left: 4px solid #9e3026;
    background: rgba(223, 203, 165, 0.46);
    color: #353027;
    line-height: 1.75;
}

.browser-guide-actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.browser-guide-button {
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #9e3026;
    border-radius: 6px;
    background: #9e3026;
    color: #fff8e8;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.browser-guide-button.secondary {
    background: transparent;
    color: #711d18;
}

.browser-guide-button:focus-visible {
    outline: 3px solid #b77a24;
    outline-offset: 3px;
}

body.browser-guide-open {
    overflow: hidden;
}

.download-toast {
    position: fixed;
    left: 50%;
    bottom: max(26px, env(safe-area-inset-bottom));
    z-index: 1100;
    max-width: calc(100% - 32px);
    padding: 11px 18px;
    border-radius: 6px;
    background: rgba(23, 22, 19, 0.94);
    color: #fff8e8;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: opacity 160ms ease, transform 160ms ease;
}

.download-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.download-action {
    display: block;
    cursor: pointer;
    font: inherit;
}

@media (max-width: 560px) {
    .browser-guide {
        place-items: start stretch;
    }

    .browser-guide-card {
        width: 100%;
        padding: 24px 20px;
    }

    .browser-guide-actions,
    .browser-guide-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .download-toast {
        transition: none;
    }
}
