/* Shared SongDocumentAst Chart Renderer */
.ast-chart-surface {
    --ast-zoom-scale: 1;
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-card);
    padding: 0.88rem;
}

@media (min-width: 740px) {
    .ast-chart-surface {
        padding: var(--token-space-lg);
    }
}

.ast-chart-body {
    font-size: calc(1rem * var(--ast-zoom-scale, 1) * var(--ast-lyric-scale, 0.9));
    color: var(--ast-lyric-color, var(--stage-text-primary));
    font-weight: var(--ast-lyric-weight, 400);
}

.ast-columns-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    column-gap: var(--token-space-lg);
    align-items: start;
}

.ast-column-divider {
    width: 1px;
    align-self: stretch;
    background-color: var(--stage-border-subtle);
}

@media (max-width: 720px) {
    .ast-columns-two {
        grid-template-columns: 1fr;
    }
    .ast-column-divider {
        display: none;
    }
}

.ast-section-block {
    padding: 0;
    margin-bottom: var(--ast-section-spacing-em, 1.35em);
    color: var(--sec-lyric-color, var(--ast-lyric-color, var(--stage-text-primary)));
}

.ast-section-tab {
    font-family: var(--token-font-mono);
    font-size: 0.92em;
}

.ast-section-heading {
    color: var(--sec-accent, var(--stage-text-primary));
    font-weight: 700;
    font-size: calc(1em * var(--ast-section-scale, 1));
    margin: 0;
}

.ast-sec-mode-upper {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ast-sec-mode-divider {
    border-top: 1px solid var(--stage-border-subtle);
    padding-top: 0.35em;
}

.ast-sec-row-divider {
    border-top: 1px solid var(--stage-border-subtle);
    padding-top: 0.35em;
}

.ast-sec-mode-pill {
    display: inline-block;
    padding: 0.16em 0.62em;
    border-radius: 999px;
    background-color: var(--sec-pill-bg, var(--stage-bg-card));
    border: 1px solid var(--sec-pill-border, var(--stage-border-subtle));
    color: var(--sec-pill-text, var(--sec-accent, var(--stage-text-primary)));
    font-size: calc(0.92em * var(--ast-section-scale, 1));
}

.ast-section-heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.55em;
    row-gap: 0.15em;
    margin: 0;
}

.ast-section-heading-row .ast-section-heading {
    margin: 0;
}

.ast-section-inline-note {
    color: var(--sec-lyric-color, var(--ast-lyric-color, var(--stage-text-primary)));
    font-weight: var(--ast-lyric-weight, 400);
    font-size: 1em;
}

.ast-indent-0 { margin-left: 0; }
.ast-indent-1 { margin-left: 1.25em; }
.ast-indent-2 { margin-left: 2.5em; }
.ast-indent-3 { margin-left: 3.75em; }
.ast-indent-4 { margin-left: 5em; }

.ast-blank-spacer {
    height: 0.62em;
}

.ast-ink-anchor {
    position: relative;
}

.ast-ink-anchor > *:not(.ast-ink-svg) {
    position: relative;
    z-index: 1;
}

.ast-ink-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
}

.ast-ink-svg-marker {
    z-index: 0;
}

.ast-ink-svg-pen {
    z-index: 2;
}

.ast-ink-jump-link,
.web-pdf-jump-link {
    pointer-events: all;
    cursor: pointer;
}

.ast-ink-jump-link:hover,
.web-pdf-jump-link:hover {
    opacity: 0.86;
}

.web-pdf-jump-hidden {
    opacity: 0.48;
    cursor: not-allowed;
}

.web-pdf-jump-toast {
    position: fixed;
    left: 50%;
    bottom: 1.4rem;
    transform: translateX(-50%);
    z-index: 2500;
    padding: 0.5rem 1rem;
    border-radius: var(--token-radius-round);
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-accent-cue);
    color: var(--stage-text-primary);
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: var(--stage-shadow-card);
    pointer-events: none;
}

@keyframes astJumpHighlight {
    0% { background-color: rgba(56, 189, 248, 0.24); }
    100% { background-color: transparent; }
}

.is-ast-jump-target {
    animation: astJumpHighlight 1.1s ease-out;
    border-radius: 6px;
}

@media print {
    .ast-chart-surface {
        --stage-canvas-bg: #ffffff;
    }
}

.chord-atom-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    row-gap: 0.32em;
    margin-bottom: 0.38em;
}

.chord-atom-row-single {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    row-gap: 0.24em;
    margin-bottom: 0.36em;
}

.word-cluster {
    display: inline-flex;
    align-items: flex-end;
}

.word-cluster-single {
    display: inline-flex;
    align-items: baseline;
}

.word-cluster-gap {
    margin-right: 0.38em;
}

.chord-only-gap {
    margin-right: 0.85em;
}

.list-marker {
    color: var(--stage-accent-cue);
    font-weight: 700;
    margin-right: 0.45em;
}

.chord-atom {
    display: inline-flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chord-atom-inline {
    display: inline-flex;
    align-items: baseline;
}

.chord-atom-gap {
    margin-right: 0.42em;
}

.chord-label {
    color: var(--ast-chord-color, var(--stage-accent-chord));
    font-weight: var(--ast-chord-weight, 700);
    font-size: var(--ast-chord-scale, 0.88em);
    line-height: 1.18;
    margin-bottom: var(--ast-chord-gap-em, 0em);
    padding-right: 0.42em;
    white-space: nowrap;
}

.chord-meta-tag {
    color: var(--stage-accent-cue);
    font-size: 0.84em;
    font-weight: 600;
    margin-left: 0.2em;
}

.lyric-line-row {
    min-height: 1.32em;
    line-height: calc(1.32 + var(--ast-line-spacing-em, 0));
    white-space: pre;
}

.lyric-line-row-hl {
    display: flex;
    align-items: baseline;
}

.lyric-line-empty {
    width: 0;
    overflow: hidden;
    user-select: none;
}

.lyric-inline-cue {
    line-height: 1.25;
    white-space: pre;
}

.span-bold { font-weight: 700; }
.span-italic { font-style: italic; }
.span-underline { text-decoration: underline; }

/* 1:1 Web Smart ChordPro Editor Shell */
.web-editor-shell {
    background-color: var(--stage-bg-card);
    border: 2px solid var(--stage-accent-chord);
    border-radius: var(--token-radius-card);
    overflow: visible;
    margin-bottom: var(--token-space-lg);
}

.web-editor-header-bar {
    background-color: var(--stage-bg-toolbar);
    border-bottom: 1px solid var(--stage-border-subtle);
    padding: 0.65rem 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.web-editor-field-title {
    flex: 2 1 210px;
    min-width: 170px;
}

.web-editor-field-artist {
    flex: 1.5 1 170px;
    min-width: 140px;
}

.web-editor-bpm-stepper {
    display: inline-flex;
    align-items: center;
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.12rem 0.25rem;
    gap: 0.25rem;
}

.web-editor-bpm-input {
    width: 64px;
    border: none;
    background: transparent;
    color: var(--stage-text-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.35rem 0.15rem;
}

.web-editor-quickbar {
    background-color: var(--stage-bg-elevated);
    border-bottom: 1px solid var(--stage-border-subtle);
    padding: 0.5rem 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
    position: relative;
}

.web-editor-divider {
    width: 1px;
    height: 24px;
    background-color: var(--stage-border-subtle);
    margin: 0 0.2rem;
}

/* Pop-down Picker Menus */
.popdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 105;
    background: transparent;
}

.popdown-anchor {
    position: relative;
    display: inline-flex;
}

.popdown-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 120;
    min-width: min(260px, calc(100vw - 2rem));
    max-width: min(420px, calc(100vw - 1.5rem));
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-accent-chord);
    border-radius: var(--token-radius-card);
    padding: 0.85rem;
    box-shadow: 0 16px 36px var(--stage-backdrop-scrim);
}

.popdown-panel.popdown-align-right {
    left: auto;
    right: 0;
}

.popdown-grid-keys {
    display: grid;
    grid-template-columns: repeat(6, minmax(42px, 1fr));
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.popdown-grid-chords {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-top: 0.45rem;
}

/* Editor Split / Stacked / Off Workspace Panes (Mobile-First stacked -> Desktop Split) */
.web-editor-panes-side {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 56vh;
}

.web-editor-panes-stacked {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 68vh;
}

.web-editor-panes-editor-only {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 72vh;
}

.web-editor-source-pane {
    padding: 0.75rem 0.85rem;
    border-right: none;
    border-bottom: 1px solid var(--stage-border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

@media (min-width: 1024px) {
    .web-editor-panes-side {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        min-height: 68vh;
    }

    .web-editor-source-pane {
        padding: 0.85rem 1rem;
        border-right: 1px solid var(--stage-border-subtle);
        border-bottom: none;
    }
}

.web-editor-preview-pane {
    padding: 0.85rem 1rem;
    background-color: var(--stage-bg-canvas);
    overflow-y: auto;
    max-height: 80vh;
}

.web-editor-textarea {
    width: 100%;
    flex: 1 1 auto;
    min-height: 58vh;
    padding: 0.85rem 1rem;
    border-radius: var(--token-radius-pill);
    border: 1px solid var(--stage-border-subtle);
    background-color: var(--stage-bg-canvas);
    color: var(--stage-text-primary);
    font-family: var(--token-font-mono);
    font-size: var(--editor-font-scale, 15px);
    line-height: 1.55;
    resize: vertical;
}

.web-editor-zoom-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.web-editor-zoom-pill {
    min-width: 3.1rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Rich-Text Swatch Dots (zero hardcoded hex in Razor, matches ChordProEditorPresets) */
.swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.45rem;
}

.swatch-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 2px solid var(--stage-border-subtle);
    cursor: pointer;
}

.swatch-btn:hover {
    border-color: var(--stage-text-primary);
}

.swatch-custom-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--stage-text-primary);
    background: var(--stage-control-idle-bg, var(--stage-surface-card));
    border-style: dashed;
    overflow: hidden;
}

.swatch-custom-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

.swatch-fg-amber { background-color: var(--editor-fg-amber); }
.swatch-fg-sky { background-color: var(--editor-fg-sky); }
.swatch-fg-emerald { background-color: var(--editor-fg-emerald); }
.swatch-fg-coral { background-color: var(--editor-fg-coral); }
.swatch-fg-violet { background-color: var(--editor-fg-violet); }
.swatch-fg-gold { background-color: var(--editor-fg-gold); }
.swatch-fg-slate { background-color: var(--editor-fg-slate); }

.swatch-bg-amber { background-color: var(--editor-bg-amber); }
.swatch-bg-ocean { background-color: var(--editor-bg-ocean); }
.swatch-bg-forest { background-color: var(--editor-bg-forest); }
.swatch-bg-crimson { background-color: var(--editor-bg-crimson); }
.swatch-bg-plum { background-color: var(--editor-bg-plum); }
.swatch-bg-gold { background-color: var(--editor-bg-gold); }
.swatch-bg-slate { background-color: var(--editor-bg-slate); }

/* Drum Groove Cards & Chord Diagram Cards on AstChartViewer */
.drum-cards-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.drum-card {
    box-sizing: border-box;
    min-width: min(100%, 200px);
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.38rem 0.6rem;
}

.drum-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.14rem;
}

.drum-card-title {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--stage-accent-cue);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.drum-card-meta {
    font-size: 0.71rem;
    color: var(--stage-text-muted);
    font-weight: 600;
}

.inline-drum-block {
    box-sizing: border-box;
    min-width: min(100%, 200px);
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.35rem 0.58rem;
    margin: 0.4rem 0 0.55rem 0;
    max-width: 800px;
}

.drum-staff-svg {
    width: 100%;
    height: auto;
    display: block;
}

.chord-cards-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.15rem;
}

.chord-diagram-card {
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.4rem 0.55rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 92px;
}

.chord-diagram-title {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--stage-accent-chord);
    margin-bottom: 0.15rem;
}

/* Clickable 8-Voice Drum Step Matrix */
.drum-matrix-scroll {
    overflow-x: auto;
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.65rem;
    user-select: none;
}

.drum-matrix-row {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 3px;
}

.drum-voice-label {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: var(--stage-bg-elevated);
    width: 104px;
    min-width: 104px;
    padding-right: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--stage-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.drum-voice-badge {
    font-family: var(--token-font-mono);
    font-size: 0.72rem;
    padding: 0.1rem 0.32rem;
    border-radius: 4px;
    background-color: var(--stage-bg-toolbar);
    color: var(--stage-accent-chord);
}

.drum-step-hdr {
    flex: 1 1 28px;
    min-width: 26px;
    max-width: 44px;
    text-align: center;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--stage-text-muted);
}

.drum-step-hdr-downbeat {
    color: var(--stage-accent-cue);
}

.drum-step-bar2-gap {
    margin-left: 8px;
}

.drum-step-btn {
    flex: 1 1 28px;
    min-width: 26px;
    max-width: 44px;
    height: 31px;
    border-radius: 6px;
    border: 1px solid var(--stage-border-subtle);
    background-color: var(--stage-bg-canvas);
    color: var(--stage-text-muted);
    font-family: var(--token-font-mono);
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.drum-step-btn-downbeat {
    background-color: var(--stage-bg-toolbar);
}

.drum-step-btn-active {
    background-color: var(--stage-accent-chord);
    color: var(--stage-bg-canvas);
    border-color: var(--stage-accent-chord);
}

.drum-step-btn-accent {
    background-color: var(--stage-accent-cue);
    color: var(--stage-bg-canvas);
    border-color: var(--stage-accent-cue);
}

/* Interactive Fretboard / Piano Builder Grid */
.fretboard-builder-table {
    border-collapse: collapse;
    margin: 0.5rem auto;
}

.fretboard-builder-table th,
.fretboard-builder-table td {
    padding: 0.25rem;
    text-align: center;
}

.fret-cell-btn {
    width: 44px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid var(--stage-border-subtle);
    background-color: var(--stage-bg-elevated);
    color: var(--stage-text-primary);
    font-weight: 800;
    cursor: pointer;
}

.fret-cell-btn-active {
    background-color: var(--stage-accent-chord);
    color: var(--stage-bg-canvas);
    border-color: var(--stage-accent-chord);
}

.web-editor-shell.web-editor-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 90;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.web-editor-fullscreen > .web-editor-header-bar,
.web-editor-fullscreen > .web-editor-quickbar {
    flex: 0 0 auto;
    overflow: visible;
    position: relative;
    z-index: 110;
}

.web-editor-fullscreen > .web-editor-panes-side,
.web-editor-fullscreen > .web-editor-panes-stacked,
.web-editor-fullscreen > .web-editor-panes-editor-only {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.web-editor-fullscreen .web-editor-source-pane {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.web-editor-fullscreen .web-editor-textarea {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    resize: none;
}

.web-editor-fullscreen .web-editor-preview-pane {
    min-height: 0;
    height: 100%;
    max-height: none;
    overflow-y: auto;
}

.setlist-builder-row {
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.45rem;
}

.setlist-builder-row-drop {
    border-top: 3px solid var(--stage-accent-cue);
    background-color: var(--stage-bg-toolbar);
}

.setlist-drag-grip {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--stage-text-muted);
    cursor: grab;
    user-select: none;
    padding: 0 0.2rem;
}

.setlist-override-drawer {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--stage-border-subtle);
}

/* Compact Setlist Builder Polish (Uniform Top Fields + Zero-Gap Dense Rows) */
.web-setlist-header-bar {
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
}

.web-setlist-header-bar .stage-input {
    height: 36px;
    min-height: 36px;
    padding: 0.25rem 0.65rem;
    font-size: 0.86rem;
    line-height: 1.2;
    box-sizing: border-box;
}

.web-setlist-field-name {
    flex: 0 1 215px;
    min-width: 145px;
    max-width: 240px;
}

.web-setlist-field-note {
    flex: 1 1 180px;
    min-width: 135px;
    max-width: 300px;
}

.web-setlist-savein-group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 1 auto;
}

.web-setlist-inline-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--stage-text-muted);
    white-space: nowrap;
}

.web-setlist-library-select {
    width: auto;
    min-width: 155px;
    max-width: 205px;
}

.web-setlist-newlib-input {
    width: 160px;
    max-width: 170px;
}

.web-setlist-left-controls {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.web-setlist-left-controls .stage-input {
    height: 36px;
    min-height: 36px;
    padding: 0.25rem 0.65rem;
    font-size: 0.86rem;
    line-height: 1.2;
    box-sizing: border-box;
}

.web-setlist-browse-row {
    display: flex;
    align-items: center;
    gap: 0.38rem;
}

.web-setlist-browse-row .stage-input {
    flex: 1 1 auto;
    min-width: 0;
}

.web-setlist-scroll-pane {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 68vh;
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-top: 0.32rem;
}

.web-editor-fullscreen .web-setlist-scroll-pane {
    max-height: none;
}

.web-setlist-scroll-pane .repertoire-item,
.web-setlist-scroll-pane .setlist-builder-row {
    padding: 0.34rem 0.65rem;
    margin-bottom: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid var(--stage-border-subtle);
}

.web-setlist-scroll-pane .repertoire-item:first-child,
.web-setlist-scroll-pane .setlist-builder-row:first-child {
    border-top: 1px solid var(--stage-border-subtle);
}

.setlist-row-title {
    font-size: 0.88rem;
    line-height: 1.22;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.setlist-row-meta {
    font-size: 0.76rem;
    line-height: 1.18;
    color: var(--stage-text-muted);
    margin-top: 0.08rem;
}

.web-setlist-scroll-pane .stage-btn-sm {
    min-height: 28px;
    padding: 0.18rem 0.5rem;
    font-size: 0.78rem;
}

.web-setlist-scroll-pane .pill-badge {
    font-size: 0.72rem;
    padding: 0.06rem 0.42rem;
    line-height: 1.25;
}

/* Per-Song Style Popover & Synced Custom Sections Chips */
.web-style-popover {
    min-width: min(370px, calc(100vw - 1.5rem));
    max-width: min(420px, calc(100vw - 1.5rem));
}

.web-style-popover-body {
    max-height: 54vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-right: 0.15rem;
}

.web-style-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.web-style-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--stage-text-secondary);
}

.web-style-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.web-style-val {
    min-width: 2.9rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--stage-text-primary);
    font-variant-numeric: tabular-nums;
}

.web-style-color-group {
    padding-top: 0.35rem;
    border-top: 1px solid var(--stage-border-hairline);
}

.web-style-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    margin-top: 0.28rem;
}

.web-style-dot {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--stage-border-subtle);
    cursor: pointer;
    padding: 0;
}

.web-style-dot.is-active {
    border-color: var(--stage-text-primary);
    box-shadow: 0 0 0 2px var(--stage-accent-chord);
}

.web-style-dot-custom {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--stage-text-primary);
    border-style: dashed;
    overflow: hidden;
}

.web-custom-section-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
}

.web-style-presets-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.45rem;
}

.web-style-preset-btn {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.web-style-preset-update-btn {
    width: 100%;
    margin-bottom: 0.45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-style-preset-save-box {
    background: var(--stage-surface-card);
    border: 1px solid var(--stage-border-subtle);
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    margin-bottom: 0.5rem;
}

.web-custom-section-del {
    padding: 0.15rem 0.36rem;
    min-height: 28px;
}

