html:has(.InstallDialog[open]) {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.InstallDialog {
    position: fixed;
    width: min(31rem, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: clamp(1.25rem, 4vw, 1.75rem);
    overflow: auto;
    border: 1px solid var(--BorderDefault);
    border-radius: var(--RadiusLarge);
    color: var(--InkStrong);
    background: linear-gradient(155deg, #142338, var(--SurfaceRaised) 62%);
    box-shadow: var(--InsetHighlight), var(--ShadowFloating);
}

.InstallDialog[open] {
    display: grid;
    justify-items: stretch;
    gap: var(--SpaceBase);
}

.InstallDialog::backdrop {
    background: var(--SurfaceOverlay);
    backdrop-filter: blur(0.25rem);
}

.DialogDismiss {
    position: absolute;
    top: var(--SpaceTiny);
    right: var(--SpaceTiny);
}

.DialogDismiss button {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--RadiusRound);
    color: var(--InkMuted);
}

.DialogDismiss button:hover {
    color: var(--InkStrong);
    background: var(--SurfaceHover);
}

.InstallHeader {
    display: grid;
    justify-items: center;
    gap: var(--SpaceTiny);
    text-align: center;
}

.InstallMark {
    padding: 0.45rem;
    border: 1px solid var(--BorderDefault);
    border-radius: var(--RadiusMedium);
    background: var(--AccentSoft);
}

.InstallHeader h2 {
    font-size: var(--SizeSubtitle);
    letter-spacing: var(--TrackingSnug);
}

.InstallHeader h2:focus {
    outline: none;
}

.InstallHeader p,
.CopyStatus {
    font-size: var(--SizeSmall);
    color: var(--InkMuted);
}

.InstallCommand {
    padding: var(--SpaceSmall);
    border: 1px solid var(--BorderDefault);
    border-radius: var(--RadiusSmall);
    color: #c1ddff;
    background: var(--PageBackground);
    font: var(--SizeCaption)/1.5 var(--FontMono);
    overflow-wrap: anywhere;
    user-select: text;
}

.CopyStatus {
    min-height: 1.5em;
    margin-top: calc(-1 * var(--SpaceTiny));
    text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
    .InstallDialog[open] { animation: InstallIn var(--DurationBase) var(--EaseOut) both; }

    @keyframes InstallIn {
        from { opacity: 0; translate: 0 0.5rem; }
    }
}
