.UI_ContentSummarySheet {
    margin: 0;
    border: none;
    border-radius: 16px 16px 0 0;
    padding: 0;
    width: min(720px, 100vw);
    max-height: min(76vh, 640px);
    box-shadow: 0 -14px 36px rgba(15, 23, 42, 0.28);
    background-color: #ffffff;
    color: var(--MainText2);
    z-index: 10050;

    position: fixed;
    inset: auto 0 0 0;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;

    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 160ms ease,
        transform 160ms ease;
}

.UI_ContentSummarySheet:popover-open {
    opacity: 1;
    transform: translateY(0);
}

@starting-style {
    .UI_ContentSummarySheet:popover-open {
        opacity: 0;
        transform: translateY(16px);
    }
}

.UI_ContentSummarySheet::backdrop {
    background: rgba(15, 23, 42, 0.42);
}

.UI_ContentSummarySheet_Header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.UI_ContentSummarySheet_Title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
}

.UI_ContentSummarySheet_CloseButton {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: var(--SubText2);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    tap-highlight-color: transparent;
}

.UI_ContentSummarySheet_CloseButton:hover {
    background: #f1f5f9;
    color: var(--MainText2);
}

.UI_ContentSummarySheet_CloseButton:focus-visible {
    outline: 2px solid var(--SubPrimaryColor);
    outline-offset: 2px;
}

.UI_ContentSummarySheet_Body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: min(60vh, 520px);
    padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
    line-height: 1.7;
    font-size: 14px;
    white-space: normal;
}

.UI_ContentSummarySheet_Paragraph {
    margin: 0;
}

.UI_ContentSummarySheet_SegmentStrong {
    font-weight: 700;
    color: inherit;
}

.UI_ContentSummarySheet_SegmentAccent {
    font-weight: 700;
    color: var(--SecondaryColor);
}

@media (min-width: 768px) {
    .UI_ContentSummarySheet {
        inset: auto auto 20px 50%;
        top: auto;
        right: auto;
        bottom: 20px;
        left: 50%;
        width: min(720px, calc(100vw - 48px));
        border-radius: 16px;
        transform: translateX(-50%) translateY(16px);
    }

    .UI_ContentSummarySheet:popover-open {
        transform: translateX(-50%) translateY(0);
    }

    @starting-style {
        .UI_ContentSummarySheet:popover-open {
            transform: translateX(-50%) translateY(16px);
        }
    }

    .UI_ContentSummarySheet_Body {
        max-height: min(62vh, 560px);
        padding-bottom: 16px;
    }
}

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