#platform-download-widget {
    --download-ink: #17212b;
    --download-muted: #66727d;
    --download-border: #e2e8ed;
    --download-accent: #087f8c;
    --download-accent-dark: #06636d;
    --download-highlight: #e9f5f5;
    position: fixed;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    z-index: 1200;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#platform-download-widget,
#platform-download-widget * {
    box-sizing: border-box;
}

#platform-download-widget .platform-download__toggle {
    display: inline-flex;
    min-width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0 1rem;
    color: #fff;
    background: var(--download-accent);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(13, 76, 84, 0.27);
    cursor: pointer;
    font: inherit;
    font-size: 1.2rem;
    transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

#platform-download-widget .platform-download__toggle:hover {
    background: var(--download-accent-dark);
    box-shadow: 0 11px 28px rgba(13, 76, 84, 0.34);
    transform: translateY(-2px);
}

#platform-download-widget .platform-download__toggle:focus-visible,
#platform-download-widget .platform-download__option:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

#platform-download-widget .platform-download__toggle-label {
    display: none;
    font-size: 0.875rem;
    font-weight: 700;
}

#platform-download-widget .platform-download__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.8rem);
    width: min(22rem, calc(100vw - 2rem));
    padding: 1rem;
    color: var(--download-ink);
    background: #fff;
    border: 1px solid var(--download-border);
    border-radius: 0.85rem;
    box-shadow: 0 18px 52px rgba(21, 39, 49, 0.2);
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.65rem) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

#platform-download-widget.is-open .platform-download__panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#platform-download-widget .platform-download__heading {
    padding: 0.15rem 0.3rem 0.75rem;
}

#platform-download-widget .platform-download__eyebrow {
    color: var(--download-accent);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

#platform-download-widget .platform-download__heading h2 {
    margin: 0.2rem 0 0.1rem;
    font-size: 1.2rem;
    line-height: 1.3;
}

#platform-download-widget .platform-download__heading p,
#platform-download-widget .platform-download__note {
    margin: 0;
    color: var(--download-muted);
    font-size: 0.8rem;
}

#platform-download-widget .platform-download__options {
    display: grid;
    gap: 0.25rem;
}

#platform-download-widget .platform-download__option {
    display: flex;
    min-height: 54px;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 0.6rem;
    color: var(--download-ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease;
}

#platform-download-widget a.platform-download__option:hover,
#platform-download-widget .platform-download__option.is-recommended {
    background: var(--download-highlight);
    border-color: #c5e3e4;
}

#platform-download-widget .platform-download__icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    color: var(--download-accent-dark);
    background: #f0f5f6;
    border-radius: 0.5rem;
    font-size: 1.15rem;
}

#platform-download-widget .platform-download__label {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.08rem;
}

#platform-download-widget .platform-download__label strong {
    font-size: 0.86rem;
    line-height: 1.25;
}

#platform-download-widget .platform-download__label small {
    color: var(--download-muted);
    font-size: 0.72rem;
}

#platform-download-widget .platform-download__status {
    flex: 0 0 auto;
    color: var(--download-accent-dark);
    font-size: 0.72rem;
    font-weight: 700;
}

#platform-download-widget .is-unavailable {
    color: #77818a;
}

#platform-download-widget .is-unavailable .platform-download__icon,
#platform-download-widget .is-unavailable .platform-download__status {
    color: #89939b;
}

#platform-download-widget .platform-download__note {
    padding: 0.7rem 0.3rem 0.1rem;
    border-top: 1px solid var(--download-border);
    font-size: 0.72rem;
    line-height: 1.45;
}

@media (hover: hover) and (pointer: fine) {
    #platform-download-widget:hover .platform-download__toggle-label {
        display: inline;
    }
}

@media (max-width: 480px) {
    #platform-download-widget {
        right: max(0.85rem, env(safe-area-inset-right));
        bottom: max(0.85rem, env(safe-area-inset-bottom));
    }

    #platform-download-widget .platform-download__panel {
        width: min(21rem, calc(100vw - 1.7rem));
        padding: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #platform-download-widget *,
    #platform-download-widget *::before,
    #platform-download-widget *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}