.ys-sheet {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
}

.ys-sheet__scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(8px);
}

.ys-sheet__panel {
    position: relative;
    z-index: 1;
    width: min(28rem, calc(100vw - 1.5rem));
    margin: 0 auto;
    padding: 1.15rem 1.15rem calc(1.15rem + env(safe-area-inset-bottom));
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 64px -28px rgba(15, 23, 42, .45);
}

.ys-sheet__handle {
    display: none;
    width: 2.6rem;
    height: .28rem;
    margin: .1rem auto .85rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.ys-sheet__head {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
}

.ys-sheet__head > div {
    min-width: 0;
}

.ys-sheet__icon {
    display: grid;
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
    place-items: center;
    border-radius: 14px;
    background: #f0f9ff;
    color: #0369a1;
}

.ys-sheet__icon svg,
.ys-sheet__svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ys-sheet__icon--warning {
    background: #fff7ed;
    color: #c2410c;
}

.ys-sheet__icon--danger,
.ys-sheet__icon--error {
    background: #fff1f2;
    color: #be123c;
}

.ys-sheet__icon--success {
    background: #ecfdf5;
    color: #047857;
}

.ys-sheet__icon--confirm {
    background: #f8fafc;
    color: #334155;
}

.ys-sheet__head h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -.02em;
}

.ys-sheet__head p {
    margin: .35rem 0 0;
    color: #64748b;
    font-size: .84rem;
    line-height: 1.45;
    font-weight: 600;
    white-space: pre-wrap;
}

.ys-sheet__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 1rem 0 1.1rem;
}

.ys-sheet__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 1.7rem;
    padding: .15rem .55rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: .72rem;
    font-weight: 700;
}

.ys-sheet__meta strong {
    margin-right: .2rem;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.ys-sheet__actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: .5rem;
    margin-top: 1.1rem;
}

.ys-sheet__actions--one {
    grid-template-columns: 1fr;
}

.ys-sheet__actions--two {
    grid-template-columns: 1fr 1.3fr;
}

.ys-sheet__btn {
    min-height: 2.75rem;
    padding: 0 .8rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font-size: .82rem;
    font-weight: 800;
    cursor: pointer;
}

.ys-sheet__btn--danger {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.ys-sheet__btn--primary {
    border-color: transparent;
    background: #0f172a;
    color: #fff;
}

.ys-sheet__btn:focus-visible {
    outline: 3px solid rgba(14, 165, 233, .35);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .ys-sheet {
        place-items: end stretch;
    }

    .ys-sheet__scrim {
        background: rgba(15, 23, 42, .28);
        backdrop-filter: blur(3px);
    }

    .ys-sheet__panel {
        width: calc(100% - 1rem);
        margin: 0 .5rem calc(.5rem + env(safe-area-inset-bottom));
        border-radius: 16px;
        padding: .7rem .85rem .85rem;
        box-shadow: 0 16px 36px -24px rgba(15, 23, 42, .4);
    }

    .ys-sheet__handle {
        display: block;
        margin-bottom: .55rem;
    }

    .ys-sheet__icon {
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 10px;
    }

    .ys-sheet__head h2 {
        font-size: 1rem;
    }

    .ys-sheet__head p {
        font-size: .82rem;
    }

    .ys-sheet__actions,
    .ys-sheet__actions--one,
    .ys-sheet__actions--two {
        grid-template-columns: 1fr 1fr;
        gap: .45rem;
    }

    .ys-sheet__btn {
        min-height: 2.45rem;
        order: 0;
    }

    .ys-sheet__btn--primary {
        order: -1;
    }
}

html[data-theme="dark"] .ys-sheet__scrim {
    background: rgba(2, 6, 23, .62);
}

@media (max-width: 640px) {
    html[data-theme="dark"] .ys-sheet__scrim {
        background: rgba(2, 6, 23, .36);
        backdrop-filter: blur(3px);
    }
}

html[data-theme="dark"] .ys-sheet__panel {
    border-color: rgba(148, 163, 184, .22);
    background: #0b1220;
}

html[data-theme="dark"] .ys-sheet__head h2,
html[data-theme="dark"] .ys-sheet__meta strong {
    color: #f1f5f9;
}

html[data-theme="dark"] .ys-sheet__head p,
html[data-theme="dark"] .ys-sheet__meta span {
    color: #94a3b8;
}

html[data-theme="dark"] .ys-sheet__meta span,
html[data-theme="dark"] .ys-sheet__btn {
    border-color: rgba(148, 163, 184, .22);
    background: #151f30;
    color: #e2e8f0;
}

html[data-theme="dark"] .ys-sheet__btn--danger {
    border-color: rgba(251, 113, 133, .3);
    background: rgba(190, 18, 60, .16);
    color: #fda4af;
}

html[data-theme="dark"] .ys-sheet__btn--primary {
    background: #e2e8f0;
    color: #0f172a;
}

html[data-theme="dark"] .ys-sheet__icon {
    background: rgba(14, 165, 233, .12);
    color: #7dd3fc;
}

html[data-theme="dark"] .ys-sheet__icon--warning {
    background: rgba(251, 146, 60, .14);
    color: #fdba74;
}

html[data-theme="dark"] .ys-sheet__icon--danger,
html[data-theme="dark"] .ys-sheet__icon--error {
    background: rgba(244, 63, 94, .14);
    color: #fda4af;
}

html[data-theme="dark"] .ys-sheet__icon--success {
    background: rgba(16, 185, 129, .14);
    color: #6ee7b7;
}

html[data-theme="dark"] .ys-sheet__icon--confirm {
    background: rgba(148, 163, 184, .12);
    color: #cbd5e1;
}
