
    @position-try --flip-y {
        position-area: bottom span-left;
        margin: 0.5rem 0 0 0;
    }

    @position-try --flip-x {
        position-area: left span-bottom;
        margin: 0 0.5rem 0 0;
    }

    .panel.svelte-rzz155 {
        position: relative;
        display: flex;
        flex: 1;
        /* The wrapper can stretch far beyond its chrome (flex: 1) — keep it transparent to input
           and re-enable on the chrome itself, so oversized wrappers never swallow clicks meant
           for the canvas or panels beneath. */
        pointer-events: none;

        > * {
            pointer-events: auto;
        }

        &.panel-anchored-attached {
            position: fixed;
            position-area: top span-right;
            position-try-fallbacks: --flip-y;
            /* position-try-order: most-height; */
            margin: 0 0 0.5rem 0;

            &.anchor-axis-x {
                position-area: right span-bottom;
                position-try-fallbacks: --flip-x;
                /* position-try-order: most-width; */
                margin: 0 0 0 0.5rem;
            }
        }

        &.panel-anchored-detached {
            position: fixed;
            /* position-area: bottom span-right; */
            top: anchor(top);
            left: anchor(left);
            margin: 0;
        }

        &.panel-fallback-centered {
            /* Modal-like fallback without anchor positioning: the wrapper covers the viewport but
               stays pointer-transparent (see .panel), so only the centered chrome receives input. */
            position: fixed;
            inset: 0;
            justify-content: center;
            align-items: center;
        }
    }

    .placeholder.svelte-rzz155 {
        --corner-radius: var(--lib-control-border-radius-lg);

        background-color: rgba(255, 255, 255, 0.4);
        border-radius: var(--corner-radius);
        width: 100px;
        height: 100px;
        position: relative;
        pointer-events: none;

        &.panel-anchored-attached {
            position: fixed;
            position-area: top span-right;
            position-try-fallbacks: --flip-y;
            /* position-try-order: most-height; */
            margin: 0 0 0.5rem 0;
        }

        &.anchor-axis-x {
            position-area: right span-bottom;
            position-try-fallbacks: --flip-x;
            /* position-try-order: most-width; */
            margin: 0 0 0 0.5rem;
        }

        opacity: 0;
        transition: opacity 0.2s ease-in-out;

        &.dragging {
            opacity: 1;
        }
    }

    .toolbar.svelte-dgxcdi {
        --corner-radius: var(--lib-control-border-radius-lg);

        position: relative;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        width: -moz-fit-content;
        width: fit-content;
        height: -moz-fit-content;
        height: fit-content;
        /* Centers the toolbar inside the stretched .panel flex wrapper (previously supplied by
           the UA [popover] stylesheet before the vestigial popover attribute was removed). */
        margin: auto;

        border-radius: var(--corner-radius);
        box-shadow: var(--lib-control-shadow-standard);
        overflow: hidden;
        padding: 0;
        border: none;
        background: none;

        .drag-handle:where(.svelte-dgxcdi) {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 0.25rem;

            color: var(--lib-control-icon);
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(4px);

            cursor: grab;
            -webkit-user-select: none;
                    user-select: none;
            touch-action: none;

            &:active {
                cursor: grabbing;
            }
        }

        .content:where(.svelte-dgxcdi) {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 0.75rem;
            padding: 0.375rem;

            background: var(--lib-control-bg);
        }

        &.direction-vertical {
            flex-direction: column;
            margin: 0;

            .content:where(.svelte-dgxcdi) {
                flex-direction: column;
            }
        }
    }

    /* Scroll + sub-sidebar slide machinery, shared by the desktop panel sidebar and the mobile
       sheet. All sizing is driven by --sidebar-width, owned by the host (grid layout or sheet). */
    .body.svelte-1w94zmj {
        position: relative;
        flex: 1;
        display: flex;
        flex-direction: column;
        /* flex children default to min-height: auto; without 0 the scroll region below could
           never shrink under its content height, so it would never actually scroll */
        min-height: 0;
        box-sizing: border-box;
        background: var(--color-white);
    }

    .content-container.svelte-1w94zmj {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateX(0);
        width: calc(var(--sidebar-width) * 2);
        transition: transform var(--lib-motion-duration-fast) ease-in-out;
        display: flex;
        padding-bottom: 0.25rem;

        &.show-sub-sidebar {
            transform: translateX(-50%);
        }
    }

    .content-scroll.svelte-1w94zmj {
        min-height: 0;
        width: var(--sidebar-width);
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        /* Visual inset is 0.625rem on both sides: full padding left, padding + scrollbar gutter
           right. Not `both-edges` — with it Chromium clips descendant paint (card outlines,
           borders) at the content-box edge instead of the gutter edge, cutting the right column. */
        padding: 0.625rem calc(0.625rem - var(--scrollbar-size)) 0.625rem 0.625rem;
        scrollbar-gutter: stable;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-behavior: smooth;

        @media (hover: none) and (pointer: coarse) {
            scroll-snap-type: y proximity;
        }
    }

    .sidebar-menu.svelte-oqbn0 {
        &.orientation-horizontal {
            --flex-direction: row;
            --border-radius: 0;
            --width: 100%;
        }

        &.orientation-vertical {
            --width: fit-content;
            --flex-direction: column;
            --border-radius: 0 var(--lib-control-border-radius-lg) var(--lib-control-border-radius-lg) 0;
        }

        display: flex;
        width: var(--width);
        min-width: -moz-fit-content;
        min-width: fit-content;
        flex-direction: var(--flex-direction);
        background: var(--lib-control-bg);
        border-radius: var(--border-radius);
        box-shadow: 0 0.0625rem 0.375rem 0 rgba(0, 0, 0, 0.18);

        .item:where(.svelte-oqbn0) {
            --icon-color: var(--lib-control-icon);
            --highlight-color: transparent;
            --highlight-size: 0.125rem;

            &.active,
            &:hover,
            &:focus,
            &:focus-within {
                --icon-color: var(--lib-control-icon-active);
                --highlight-color: var(--lib-control-icon-active);
            }

            &:focus,
            &:focus-within {
                --highlight-size: 0.25rem;
            }

            all: unset;
            flex: 1;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.75rem;
            color: var(--icon-color);
            cursor: pointer;
            box-sizing: border-box;

            .icon:where(.svelte-oqbn0) {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 1.5rem;
                aspect-ratio: 1;
            }

            &.horizontal {
                &:after {
                    content: "";
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    height: var(--highlight-size);
                    background-color: var(--highlight-color);
                }

                &:before {
                    content: "";
                    position: absolute;
                    top: 50%;
                    left: 0;
                    transform: translateY(-50%);
                    width: 0.0625rem;
                    height: 1.5rem;
                    background-color: var(--lib-control-border-subtle);
                }
            }

            &.vertical {
                &:after {
                    content: "";
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: var(--highlight-size);
                    height: 100%;
                    background-color: var(--highlight-color);
                }

                &:before {
                    content: "";
                    position: absolute;
                    top: 0;
                    left: 50%;
                    transform: translateX(-50%);
                    width: 1.5rem;
                    height: 0.0625rem;
                    background-color: var(--lib-control-border-subtle);
                }
            }

            &:first-child:before {
                display: none;
            }
        }
    }

    /* Chrome only — Panel.Root positions the panel (dock / float / zone-clamped detach). */
    .sidebar.svelte-1rfw4gt {
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: var(--color-white);
        /* One authoritative width in both regimes (--sidebar-width, owned by the grid layout).
           Attached, the grid column is sized to exactly this plus the cell padding; detached, the
           fixed-position panel wrapper shrink-wraps around it. The explicit width also caps the
           flex automatic minimum, so intrinsically wide content can never push past it. */
        width: var(--sidebar-width);
        flex: none;
        box-sizing: border-box;
        isolation: isolate;

        &.movable {
            border-radius: var(--lib-control-border-radius-xl);
            box-shadow: var(--lib-control-shadow-standard);
            /* header + resize bar are translucent; the body stays white */
            background: none;
        }

        .header:where(.svelte-1rfw4gt) {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.375rem 0.75rem;
            box-sizing: border-box;

            color: var(--lib-control-text-muted);
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(4px);

            cursor: grab;
            -webkit-user-select: none;
                    user-select: none;
            touch-action: none;

            &:active {
                cursor: grabbing;
            }

            .title:where(.svelte-1rfw4gt) {
                font-size: 0.75rem;
                font-weight: 600;
                white-space: nowrap;
            }
        }

        .resize:where(.svelte-1rfw4gt) {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 1rem;

            color: var(--lib-control-icon);
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(4px);

            cursor: ns-resize;
            touch-action: none;
        }

        .sidebar-menu-horizontal:where(.svelte-1rfw4gt) {
            z-index: 1;
        }
    }

    .sidebar-menu-vertical.svelte-1rfw4gt {
        padding-top: 3rem;
        pointer-events: none;

        & > * {
            pointer-events: auto;
        }
    }

    .anchor.svelte-tn4zpm {
        display: contents;
    }

    .anchors-dynamic.svelte-vacrq {
        position: absolute;
        inset: 0;
        z-index: 900;
        pointer-events: none;

        .anchor-dynamic:where(.svelte-vacrq) {
            position: absolute;
            /* width: 20px;
            height: 20px;
            border-top-left-radius: 50%;
            border-bottom-right-radius: 50%;
            background-color: #fff; */
            top: 0;
            left: 0;
            width: 0;
            height: 0;
            overflow: hidden;
        }
    }

    .context-menu.svelte-uohxp7 {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: -moz-fit-content;
        width: fit-content;

        border-radius: var(--lib-control-border-radius-lg);
        box-shadow: var(--lib-control-shadow-standard);
        overflow: hidden;

        .header:where(.svelte-uohxp7) {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            padding: 0.375rem 0.75rem;

            color: var(--lib-control-text);
            background: rgba(255, 255, 255, 0.85);
            backdrop-filter: blur(4px);

            -webkit-user-select: none;

                    user-select: none;

            &.draggable {
                cursor: grab;
                touch-action: none;

                &:active {
                    cursor: grabbing;
                }
            }

            .grab:where(.svelte-uohxp7) {
                display: flex;
                align-items: center;
                gap: 0.5rem;
            }

            .title:where(.svelte-uohxp7) {
                font-size: 0.75rem;
                font-weight: 600;
                line-height: 1;
                white-space: nowrap;
            }

            .close:where(.svelte-uohxp7) {
                display: flex;
                align-items: center;
                justify-content: center;
                padding: 0.25rem;

                border: none;
                /* -sm exists; the previous bare --lib-control-border-radius token does not. */
                border-radius: var(--lib-control-border-radius-sm);
                background: transparent;
                color: var(--lib-control-icon);
                cursor: pointer;

                &:hover {
                    background: var(--lib-control-bg-subtle);
                }

                /* Attached: keep the reserved space but hide the control (also drops pointer events). */
                &.hidden {
                    visibility: hidden;
                }
            }
        }

        .content:where(.svelte-uohxp7) {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            gap: 0.5rem;
            padding: 0.75rem;

            background: var(--lib-control-bg);
        }
    }

    .item.svelte-rablto {
        /* State vocabulary per ButtonAtom (shape-minimal / color-secondary): states mutate the
           locals, the element rules below apply them. */
        --background-color: transparent;
        --text-color: var(--lib-control-text-secondary);
        --outline-color: transparent;

        --font-size: 0.875rem;

        &.size-small {
            --font-size: 0.75rem;
        }

        display: flex;
        align-items: center;
        gap: 0.375rem;

        width: 100%;
        padding: 0.125rem 0.375rem;

        border: none;
        border-radius: var(--lib-control-border-radius-md);

        cursor: pointer;

        /* Undo the UA form-control resets so the <button> and <a> variants render identically.
           Buttons opt out of three inherited text properties: the font (they fall back to the
           UA Arial), text-rendering (the app sets geometricPrecision on :root in app.scss, and
           the difference in glyph spacing reads as a slightly different size), and text-align
           (UA centres button text). */
        -webkit-appearance: none;
                appearance: none;
        font-family: inherit;
        text-rendering: inherit;
        text-align: start;
        font-size: var(--font-size);
        font-weight: 500;
        line-height: 1.25rem;
        white-space: nowrap;
        /* the anchor variant must look identical to the button one */
        box-sizing: border-box;
        text-decoration: none;

        background: var(--background-color);
        color: var(--text-color);
        outline: var(--focus-ring-width) var(--focus-ring-style) var(--outline-color);
        outline-offset: var(--focus-ring-offset);

        &:hover {
            --background-color: var(--lib-control-bg-muted);
        }

        &:focus {
            --background-color: var(--lib-control-bg-muted);
            --outline-color: var(--focus-ring-color);
        }

        /* Pressed preview = the selected look, as in ButtonAtom's minimal-secondary active. */
        &:active {
            --background-color: var(--lib-control-text-secondary);
            --text-color: var(--lib-control-text-inverted);
        }

        /* Last so a selected item keeps its look under hover/focus. */
        &.selected {
            --background-color: var(--lib-control-text-secondary);
            --text-color: var(--lib-control-text-inverted);
        }

        /* After .selected so a disabled item never shows an interactive state. */
        &:disabled {
            --background-color: transparent;
            --text-color: var(--lib-control-text-disabled);

            cursor: default;
        }

        .text:where(.svelte-rablto),
        .shortcut:where(.svelte-rablto) {
            text-box: trim-both cap alphabetic;
        }

        .shortcut:where(.svelte-rablto) {
            margin-left: auto;
            padding-left: 0.75rem;
        }
    }
.collapsible-item.svelte-102yrh6 {
  --collapsible-item-gap: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-radius: var(--lib-control-border-radius-md);
}

.header.svelte-102yrh6 {
  --background-color: transparent;
  --text-color: var(--lib-control-text-secondary);
  --outline-color: transparent;
}
.header.svelte-102yrh6:hover {
  --background-color: var(--lib-control-bg-muted);
}
.header.svelte-102yrh6 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  width: 100%;
  padding: 0.25rem 0.375rem;
  border: none;
  border-radius: var(--lib-control-border-radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  white-space: nowrap;
  background: var(--background-color);
  color: var(--text-color);
  outline: var(--focus-ring-width) var(--focus-ring-style) var(--outline-color);
  outline-offset: var(--focus-ring-offset);
}
.header.svelte-102yrh6 .title:where(.svelte-102yrh6) {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.header.svelte-102yrh6 .chevron:where(.svelte-102yrh6) {
  display: flex;
  color: var(--lib-control-icon);
  transition: transform var(--lib-motion-duration-slow) var(--lib-motion-easing-spring);
}
.header.svelte-102yrh6 .chevron.open:where(.svelte-102yrh6) {
  transform: rotate(-180deg);
}

.content.svelte-102yrh6 {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
}
    .divider.svelte-1i98co {
        width: 100%;
        height: 0;
        margin: 0;
        border: none;
        border-top: 1px solid var(--lib-control-border-subtle);
    }
