/* ==========================================================================
   LegalPal — Apple Keynote Bento Grid Sample Stylesheet (v3)
   - Mobile 2x2 Bento Grids + Container-Query Compact Card Adaptation
   - Floating Collaborative Cursors, Comment Popovers & Dark Inspector Cards
   - Tilted "Cloud Dock" Workspace Frame + 3D Stacked Folder Cards
   - Clean Invisible Click-to-Inspect Triggers + Native <dialog> Modal
   ========================================================================== */

:root {
    --bento-canvas: #ffffff;
    --bento-tile: #f5f5f7;
    --bento-tile-warm: #faf9f5;
    --bento-tile-hover: #ededf0;
    --bento-tile-border: transparent;
    --bento-ink: #1d1d1f;
    --bento-muted: #6e6e73;
    --bento-pill-bg: #ffffff;
    --bento-pill-border: rgba(29, 29, 31, 0.08);
    --bento-accent: #0084d1;
    --bento-radius: 1.375rem; /* 22px crisp mobile squircle */
    --bento-gap: 0.625rem;    /* 10px tight mobile 2x2 gutter */
}

@media (min-width: 768px) {
    :root {
        --bento-radius: 1.625rem; /* 26px desktop squircle */
        --bento-gap: 0.875rem;    /* 14px crisp desktop gutter */
    }
}

[data-bento-theme="sage"] {
    --bento-canvas: #ffffff;
    --bento-tile: #f3f7f4;
    --bento-tile-hover: #e7f0ea;
    --bento-tile-warm: #eef5f9;
    --bento-tile-border: rgba(23, 49, 36, 0.08);
    --bento-ink: #173124;
    --bento-muted: #424844;
    --bento-pill-bg: #ffffff;
    --bento-pill-border: rgba(23, 49, 36, 0.12);
}

.bento-poster-wrap {
    background-color: var(--bento-canvas);
    max-inline-size: 76rem;
    margin-inline: auto;
    padding-inline: clamp(0.75rem, 3vw, 2rem);
    padding-block: 1.25rem 3.5rem;
}

/* Sample Preview Bar (Static on narrow mobile so it doesn't cover content, sticky on tablet/desktop) */
.sample-switcher-bar {
    position: static;
    z-index: 40;
    max-inline-size: 72rem;
    margin-inline: auto;
    margin-block-end: 1.25rem;
    padding: 0.45rem 0.65rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(23, 49, 36, 0.12);
    box-shadow: 0 10px 30px rgba(23, 49, 36, 0.08);
    display: flex;
    flex-wrap: wrap;
    flex-wrap: balance;
    align-items: safe center;
    justify-content: space-between;
    gap: 0.45rem;
}

@media (min-width: 768px) {
    .sample-switcher-bar {
        position: sticky;
        top: calc(var(--lp-header-height, 68px) + 0.5rem);
        border-radius: 9999px;
    }
}

.sample-pill-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: safe center;
    gap: 0.2rem;
    background: #f2f4f3;
    padding: 0.2rem;
    border-radius: 9999px;
}

.sample-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.72rem;
    border-radius: 9999px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #424844;
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sample-pill:hover {
    color: #173124;
}

.sample-pill[aria-current="page"],
.sample-pill[aria-pressed="true"] {
    background: #ffffff;
    color: #173124;
    box-shadow: 0 2px 8px rgba(23, 49, 36, 0.1);
}

/* ==========================================================================
   5-Row Asymmetric Bento Grid Skeleton — Mobile 2x2 Grid First!
   ========================================================================== */
.bento-stage {
    display: grid;
    gap: var(--bento-gap);
}

.bento-row-hero,
.bento-row-centerpiece,
.bento-row-triad,
.bento-row-demos,
.bento-row-trust {
    display: grid;
    gap: var(--bento-gap);
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Mobile 2x2 Orchestration (< 768px): Zero awkward orphan gaps */
.bento-row-hero > .bento-hero-main,
.bento-row-hero > .bento-hero-stack {
    grid-column: span 2;
}

/* Inside the 4-profile Stack Card: 2x2 grid of strips on mobile! */
.bento-stack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

/* Mobile & Tablet 2x2 Orchestration (< 1024px): L1+L2 / L3+R2 form a complete 2x2 stat grid with ZERO holes or orphaned tiles */
@media (max-width: 1023.98px) {
    .bento-row-centerpiece {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .bento-cell-l1 { grid-column: 1; grid-row: 1; }
    .bento-cell-l2 { grid-column: 2; grid-row: 1; }
    .bento-cell-l3 { grid-column: 1; grid-row: 2; }
    .bento-cell-r2 { grid-column: 2; grid-row: 2; text-align: center; align-items: center; }
    .bento-cell-center { grid-column: 1 / -1; grid-row: 3; }
    .bento-cell-r1 { grid-column: 1 / -1; grid-row: 4; }
}

/* On mobile 2x2, if triad has 3 cards, 1 & 2 pair as 2-col and 3 spans cleanly */
.bento-row-triad > :last-child:nth-child(odd) {
    grid-column: span 2;
}

/* Tablet & Desktop Grid Escalation */
@media (min-width: 768px) {
    .bento-row-hero {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    .bento-row-hero > .bento-hero-main {
        grid-column: span 8;
    }
    .bento-row-hero > .bento-hero-stack {
        grid-column: span 4;
    }
    .bento-stack-grid {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .bento-row-triad {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .bento-row-triad > :last-child:nth-child(odd) {
        grid-column: auto;
    }

    .bento-row-demos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .bento-row-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .bento-row-centerpiece {
        grid-template-columns: repeat(12, minmax(0, 1fr));
        grid-template-rows: repeat(6, minmax(4.25rem, auto));
    }
    .bento-cell-l1 { grid-column: 1 / 4; grid-row: 1 / 3; }
    .bento-cell-l2 { grid-column: 1 / 4; grid-row: 3 / 5; }
    .bento-cell-l3 { grid-column: 1 / 4; grid-row: 5 / 7; }
    .bento-cell-center { grid-column: 4 / 10; grid-row: 1 / 7; }
    .bento-cell-r1 { grid-column: 10 / 13; grid-row: 1 / 5; }
    .bento-cell-r2 { grid-column: 10 / 13; grid-row: 5 / 7; }

    .bento-row-trust {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ==========================================================================
   Selectable / Clickable Bento Card (<article>) + Invisible Stretched Trigger
   ========================================================================== */
.bento-card {
    position: relative;
    min-inline-size: 0;
    container: bento-card / inline-size;
    background-color: var(--bento-tile);
    border: 2px solid var(--bento-tile-border);
    border-radius: var(--bento-radius);
    padding: clamp(0.875rem, 2.4vw, 1.875rem);
    color: var(--bento-ink);
    overflow: clip;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease;
}

.bento-card-warm {
    background-color: var(--bento-tile-warm);
}

.bento-card-flush {
    padding: 0;
}

.bento-card:has(button.bento-card-trigger) {
    cursor: pointer;
}

.bento-card button.bento-card-trigger {
    position: absolute;
    inset: 0;
    z-index: 1;
    inline-size: 100%;
    block-size: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.bento-card button.bento-card-trigger:focus-visible {
    outline: none;
}

.bento-card:has(button.bento-card-trigger) :is(a, button:not(.bento-card-trigger), video, input, select) {
    position: relative;
    z-index: 2;
}

.bento-card:has(button.bento-card-trigger:hover) {
    background-color: var(--bento-tile-hover);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px -12px rgba(23, 49, 36, 0.14);
}

.bento-card:has(button.bento-card-trigger:focus-visible) {
    outline: 2.5px solid var(--bento-accent);
    outline-offset: 2px;
}

.bento-card[data-tile-selected="true"] {
    border-color: var(--bento-accent);
    box-shadow: 0 0 0 3px rgba(0, 132, 209, 0.16);
}

/* Container-Query Compact Adaptation for Mobile 2x2 Tiles */
.bento-trust-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.9rem;
}

@media (min-width: 768px) {
    .bento-trust-card {
        flex-direction: row;
        align-items: center;
        gap: 0.875rem;
        padding: 1rem;
    }
}

@supports (container-type: inline-size) {
    @media (min-width: 768px) {
        .bento-trust-card {
            flex-direction: column;
            align-items: flex-start;
        }
    }
    @container bento-card (min-width: 235px) {
        .bento-trust-card {
            flex-direction: row;
            align-items: center;
            gap: 0.875rem;
        }
    }
}

/* Compact 2x2 Video Demo Cards on Narrow Screens */
@container bento-card (max-width: 240px) {
    .bento-demo-title {
        font-size: 0.875rem !important;
        line-height: 1.25 !important;
    }
    .bento-demo-copy {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        line-clamp: 3;
        overflow: clip;
        font-size: 0.72rem !important;
        line-height: 1.4 !important;
    }
    .bento-live-badge {
        display: none;
    }
}

/* ==========================================================================
   Inspiration Visual Primitives (Figma Floating Cursors + Cloud Dock Frame)
   ========================================================================== */
.lp-collab-stage {
    position: relative;
    padding-block: 0.5rem;
}

.lp-cursor-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.6rem;
    border-radius: 9999px;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
    white-space: nowrap;
}

.lp-float-comment {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(29, 29, 31, 0.08);
    border-radius: 1rem;
    padding: 0.625rem 0.75rem;
    box-shadow: 0 12px 28px -8px rgba(15, 23, 42, 0.16);
    color: #1d1d1f;
}

.lp-dark-inspector {
    background: linear-gradient(180deg, #1a1f26 0%, #11161c 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 0.75rem;
    color: #ffffff;
    box-shadow: 0 18px 36px -12px rgba(6, 15, 11, 0.45);
}

/* Tilted "Cloud Dock" Workspace Frame + 3D Stacked Folder Cards */
.lp-dock-watermark {
    font-family: "Manrope", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: 0.06em;
    font-size: clamp(1.35rem, 4cqi, 2.25rem);
    line-height: 1;
    background: linear-gradient(180deg, rgba(23, 49, 36, 0.22) 0%, rgba(23, 49, 36, 0.02) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    user-select: none;
    margin-block-end: -0.45rem;
}

.lp-dock-browser {
    background: #ffffff;
    border-radius: 1.25rem;
    border: 1px solid rgba(23, 49, 36, 0.12);
    box-shadow: 0 22px 48px -16px rgba(15, 31, 24, 0.22);
    overflow: clip;
    transform: rotate(-1.2deg);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.bento-card:hover .lp-dock-browser {
    transform: rotate(0deg);
}

.lp-dock-chrome {
    background: #f5f7f6;
    border-bottom: 1px solid #e5e9e6;
    padding: 0.45rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.lp-dock-dots {
    display: inline-flex;
    gap: 0.3rem;
}

.lp-dock-dots span {
    inline-size: 0.5rem;
    block-size: 0.5rem;
    border-radius: 9999px;
}

.lp-folder-3d {
    position: relative;
    border-radius: 0.875rem;
    padding: 0.65rem 0.75rem;
    text-align: left;
    box-shadow: 0 8px 18px -8px rgba(15, 23, 42, 0.22);
}

.lp-folder-3d::before {
    content: "";
    position: absolute;
    inset-block-start: -0.35rem;
    inset-inline-start: 0.65rem;
    inline-size: 42%;
    block-size: 0.5rem;
    border-radius: 0.45rem 0.45rem 0 0;
    background: inherit;
    filter: brightness(1.12);
}

/* Live Demo Pill Badge */
.bento-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(15, 31, 24, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.bento-live-dot {
    inline-size: 0.45rem;
    block-size: 0.45rem;
    border-radius: 9999px;
    background: #2ed573;
    box-shadow: 0 0 0 3px rgba(46, 213, 115, 0.25);
}

/* Voice-Calling Acoustic Waveform Bars */
.voice-wave-bars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    block-size: 1.75rem;
}

.voice-wave-bars span {
    display: block;
    inline-size: 3.5px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #2ed573 0%, #0284c7 100%);
    animation: voicePulse 1.2s ease-in-out infinite;
}

.voice-wave-bars span:nth-child(1) { block-size: 35%; animation-delay: 0s; }
.voice-wave-bars span:nth-child(2) { block-size: 75%; animation-delay: 0.15s; }
.voice-wave-bars span:nth-child(3) { block-size: 100%; animation-delay: 0.3s; }
.voice-wave-bars span:nth-child(4) { block-size: 55%; animation-delay: 0.45s; }
.voice-wave-bars span:nth-child(5) { block-size: 85%; animation-delay: 0.2s; }
.voice-wave-bars span:nth-child(6) { block-size: 45%; animation-delay: 0.35s; }
.voice-wave-bars span:nth-child(7) { block-size: 90%; animation-delay: 0.1s; }
.voice-wave-bars span:nth-child(8) { block-size: 40%; animation-delay: 0.5s; }

@keyframes voicePulse {
    0%, 100% { transform: scaleY(0.55); opacity: 0.7; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* Size-aware layout inside wide cards */
.bento-split-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    block-size: 100%;
}

@media (min-width: 768px) {
    .bento-split-inner {
        flex-direction: row;
        align-items: safe center;
        justify-content: space-between;
    }
}

@supports (container-type: inline-size) {
    @media (min-width: 768px) {
        .bento-split-inner {
            flex-direction: column;
        }
    }
    @container bento-card (min-width: 520px) {
        .bento-split-inner {
            flex-direction: row;
            align-items: safe center;
            justify-content: space-between;
        }
    }
}

/* ==========================================================================
   Fluid Container Typography (Max <= 2.5x Min per WCAG 1.4.4)
   ========================================================================== */
.bento-eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    inline-size: fit-content;
    max-inline-size: 100%;
    padding: 0.35rem 0.78rem;
    border-radius: 9999px;
    background: var(--bento-pill-bg);
    border: 1px solid var(--bento-pill-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--bento-ink);
}

.bento-meet-lead {
    font-family: "Manrope", system-ui, sans-serif;
    font-weight: 700;
    color: #6e6e73;
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-size: clamp(1.2rem, 2.5vw, 1.75rem);
}

.bento-hero-word {
    font-family: "Manrope", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.16;
    padding-block-end: 0.14em;
    margin-block-end: -0.14em;
    font-size: clamp(2rem, 5vw, 3.6rem);
}

@supports (font-size: 1cqi) {
    .bento-hero-word {
        font-size: clamp(2rem, 6.2cqi, 3.6rem);
    }
}

.bento-stat-xl {
    font-family: "Manrope", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.14;
    padding-block-end: 0.1em;
    margin-block-end: -0.1em;
    font-size: clamp(1.5rem, 4vw, 3rem);
}

@supports (font-size: 1cqi) {
    .bento-stat-xl {
        font-size: clamp(1.5rem, 12.5cqi, 3rem);
    }
}

.bento-center-headline {
    font-family: "Manrope", system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.18;
    padding-block-end: 0.14em;
    margin-block-end: -0.14em;
    font-size: clamp(1.55rem, 4vw, 3.15rem);
}

@supports (font-size: 1cqi) {
    .bento-center-headline {
        font-size: clamp(1.55rem, 7.6cqi, 3.15rem);
    }
}

/* Editorial Gradients — include inline-block safe descender padding so background-clip never slices g/p/y */
.grad-citrus-emerald,
.grad-legalpal-ai,
.grad-pastel-spectrum,
.grad-forest-emerald,
.grad-sky-indigo,
.grad-amber-gold {
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding-block-end: 0.08em;
}
.grad-citrus-emerald {
    background: linear-gradient(95deg, #84cc16 0%, #2ed573 55%, #0ea5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.grad-legalpal-ai {
    background: linear-gradient(92deg, #0084d1 0%, #8b5cf6 48%, #ec4899 78%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.grad-pastel-spectrum {
    background: linear-gradient(92deg, #ec4899 0%, #8b5cf6 35%, #0ea5e9 68%, #22c55e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.grad-forest-emerald {
    background: linear-gradient(95deg, #15803d 0%, #2ed573 60%, #009ae4 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.grad-sky-indigo {
    background: linear-gradient(95deg, #0284c7 0%, #6366f1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.grad-amber-gold {
    background: linear-gradient(95deg, #d97706 0%, #eab308 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (forced-colors: active) {
    .grad-citrus-emerald,
    .grad-legalpal-ai,
    .grad-pastel-spectrum,
    .grad-forest-emerald,
    .grad-sky-indigo,
    .grad-amber-gold {
        background: none;
        color: CanvasText;
    }
}

/* Micro-Components */
.bento-silicon-chip {
    inline-size: 4rem;
    block-size: 4rem;
    border-radius: 1rem;
    background: radial-gradient(circle at 25% 20%, #243b30 0%, #09130e 70%, #050807 100%);
    border: 1.5px solid rgba(46, 213, 115, 0.45);
    box-shadow: 0 10px 24px -6px rgba(9, 19, 14, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.22);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    color: #ffffff;
}

/* Visual Screenshot Thumbnail Cards (Replaces abstract bars in Hero Stack) */
.bento-thumb-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    align-content: start;
    flex: 1;
}

.bento-thumb-card {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.4rem;
    border-radius: 0.95rem;
    background: #ffffff;
    border: 1.5px solid rgba(29, 29, 31, 0.07);
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.bento-thumb-card:hover,
.bento-thumb-card[aria-pressed="true"] {
    transform: translateY(-2px);
    border-color: var(--bento-accent);
    box-shadow: 0 10px 22px -8px rgba(0, 132, 209, 0.24);
}

.bento-thumb-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.65rem;
    display: block;
    background: #0f1f18;
}

.bento-thumb-label {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--bento-ink);
    padding-inline: 0.2rem;
    padding-block-end: 0.1rem;
    line-height: 1.25;
}

/* Apple-style Edge-to-Edge Screenshot Preview Inside Bento Triad Cards */
.bento-shot-crop {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 0.95rem;
    overflow: clip;
    border: 1px solid rgba(23, 49, 36, 0.09);
    background: #0f1f18;
    box-shadow: 0 8px 20px -10px rgba(15, 23, 42, 0.22);
}

.bento-shot-crop img,
.bento-shot-crop video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Studio Promo Frame seamlessly blending into #F5F5F7 Apple tiles */
.bento-promo-stage {
    position: relative;
    border-radius: 1.25rem;
    overflow: clip;
    background: #f5f5f7;
}

.bento-promo-stage img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.bento-trust-badge {
    inline-size: 2.5rem;
    block-size: 2.5rem;
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   Native <dialog id="bento-detail-dialog"> Top-Layer Detail Modal
   ========================================================================== */
dialog#bento-detail-dialog {
    inset: 0;
    margin: auto;
    padding: 0;
    border: 1px solid rgba(23, 49, 36, 0.12);
    border-radius: 1.75rem;
    inline-size: min(92dvw, 54rem);
    max-block-size: min(88dvh, 52rem);
    background: #ffffff;
    color: #1d1d1f;
    box-shadow: 0 32px 80px -16px rgba(9, 19, 14, 0.38);
    opacity: 0;
    transition-property: opacity, transform, display, overlay;
    transition-duration: 0.28s;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    transition-behavior: allow-discrete;
}

dialog#bento-detail-dialog:modal {
    overscroll-behavior: contain;
}

dialog#bento-detail-dialog::backdrop {
    overflow: hidden;
    overscroll-behavior: contain;
    background-color: rgba(9, 19, 14, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition-property: background-color, backdrop-filter, display, overlay;
    transition-duration: 0.28s;
    transition-timing-function: ease-out;
    transition-behavior: allow-discrete;
}

@media (prefers-reduced-motion: no-preference) {
    dialog#bento-detail-dialog {
        transform: scale(0.94) translateY(10px);
    }
}

:is(dialog#bento-detail-dialog[open]):where(:not([data-closing])) {
    opacity: 1;

    @starting-style {
        opacity: 0;
    }

    @media (prefers-reduced-motion: no-preference) {
        transform: scale(1) translateY(0);

        @starting-style {
            transform: scale(0.94) translateY(10px);
        }
    }

    &::backdrop {
        background-color: rgba(9, 19, 14, 0.52);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);

        @starting-style {
            background-color: rgba(9, 19, 14, 0);
            backdrop-filter: blur(0px);
            -webkit-backdrop-filter: blur(0px);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .bento-card,
    .sample-pill,
    .lp-dock-browser {
        transition: none !important;
    }
    .voice-wave-bars span {
        animation: none !important;
    }
    dialog#bento-detail-dialog,
    dialog#bento-detail-dialog::backdrop {
        transition-duration: 0.1s;
    }
}
