/* Web Studio PDF Score Preview & Linked Sheet Music Folder */
.web-pdf-panel {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.web-pdf-toolbar {
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.75rem 0.95rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.web-pdf-preview-frame {
    width: 100%;
    height: 86vh;
    min-height: 680px;
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    background-color: var(--stage-bg-elevated);
}

.web-folder-mismatch-banner {
    background-color: var(--stage-tint-cue);
    border: 1px solid var(--stage-border-glow-cue);
    border-radius: var(--token-radius-pill);
    padding: 0.7rem 0.95rem;
    color: var(--stage-text-primary);
    font-size: 0.92rem;
}

.web-folder-status-card {
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pdf-drop-active {
    outline: 2px dashed var(--stage-accent-chord);
    outline-offset: -4px;
}

.web-pdf-stage-wrap {
    position: relative;
    width: 100%;
    min-height: 360px;
}

.web-pdf-loading-card {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    background-color: var(--stage-bg-canvas);
    padding: 2rem 1.25rem;
    text-align: center;
}

.web-pdf-loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(11, 15, 25, 0.72);
    border-radius: var(--token-radius-pill);
    pointer-events: all;
    text-align: center;
    padding: 1.5rem;
}

/* Self-Hosted PDF.js Stage Sheet Viewer & Non-Destructive Top/Bottom Cropper */
.web-pdf-stage-scroll {
    width: 100%;
    min-height: 72vh;
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    background-color: var(--stage-bg-canvas);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.web-repertoire-fullscreen .web-pdf-panel,
.web-editor-fullscreen .web-pdf-panel {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0.35rem;
}

.web-repertoire-fullscreen .web-pdf-stage-wrap,
.web-editor-fullscreen .web-pdf-stage-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.web-repertoire-fullscreen .web-pdf-stage-scroll,
.web-editor-fullscreen .web-pdf-stage-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.web-pdf-page-clip {
    position: relative;
    overflow: hidden;
    background-color: var(--stage-paper-white);
    box-shadow: var(--stage-shadow-card);
    flex-shrink: 0;
}

.web-pdf-page-canvas {
    display: block;
    background-color: var(--stage-paper-white);
}

.web-pdf-ink-svg {
    position: absolute;
    left: 0;
    pointer-events: none;
}

.web-pdf-meta-col {
    min-width: 0;
    flex: 1 1 240px;
}

.web-pdf-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.web-pdf-filename {
    display: inline-block;
    max-width: min(360px, 52vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.web-pdf-crop-bar {
    background-color: var(--stage-bg-toolbar);
    border: 1px solid var(--stage-border-glow-sky);
    border-radius: var(--token-radius-pill);
    padding: 0.65rem 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
}

.web-pdf-crop-stage {
    width: 100%;
    max-height: 76vh;
    overflow-y: auto;
    border: 1px solid var(--stage-border-subtle);
    border-radius: var(--token-radius-pill);
    background-color: var(--stage-bg-canvas);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.web-pdf-crop-frame {
    position: relative;
    background-color: var(--stage-paper-white);
    box-shadow: var(--stage-shadow-hero);
    user-select: none;
    flex-shrink: 0;
}

.web-pdf-crop-page-meta {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 6;
}

.web-pdf-crop-page-badge {
    padding: 0.16rem 0.55rem;
    border-radius: 6px;
    background-color: rgba(15, 23, 42, 0.84);
    color: var(--stage-text-primary);
    font-size: 0.74rem;
    font-weight: 700;
    pointer-events: none;
}

.web-pdf-crop-page-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 24px;
    border-radius: 6px;
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-accent-cue);
    color: var(--stage-accent-cue);
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

.web-pdf-crop-mask {
    position: absolute;
    left: 0;
    right: 0;
    background-color: var(--stage-backdrop-scrim);
    pointer-events: none;
}

.web-pdf-crop-mask-top {
    top: 0;
}

.web-pdf-crop-mask-bottom {
    bottom: 0;
}

.web-pdf-crop-handle {
    position: absolute;
    left: -8px;
    right: -8px;
    height: 28px;
    margin-top: -14px;
    cursor: ns-resize;
    touch-action: none;
    z-index: 5;
}

.web-pdf-crop-handle::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background-color: var(--stage-accent-chord);
}

.web-pdf-crop-handle.is-dragging::before {
    height: 3px;
    background-color: var(--stage-accent-cue);
}

.web-pdf-crop-pill {
    position: absolute;
    top: 50%;
    z-index: 2;
    padding: 0.22rem 0.78rem;
    border-radius: var(--token-radius-round);
    background-color: var(--stage-bg-elevated);
    border: 1.5px solid var(--stage-accent-chord);
    color: var(--stage-text-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: var(--stage-shadow-card);
}

/* Non-colliding Left-third Top pill & Right-third Bottom pill across continuous multi-page stack */
.web-pdf-crop-pill-top {
    left: 28%;
    transform: translate(-50%, 1px);
}

.web-pdf-crop-pill-bottom {
    left: 72%;
    transform: translate(-50%, calc(-100% - 1px));
}

.web-pdf-crop-mask-left,
.web-pdf-crop-mask-right {
    left: auto;
    right: auto;
    bottom: auto;
}

.web-pdf-crop-mask-left {
    left: 0;
}

.web-pdf-crop-mask-right {
    right: 0;
}

.web-pdf-crop-handle-v {
    position: absolute;
    top: -8px;
    bottom: -8px;
    width: 28px;
    margin-left: -14px;
    cursor: ew-resize;
    touch-action: none;
    z-index: 5;
}

.web-pdf-crop-handle-v::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    margin-left: -1px;
    background-color: var(--stage-accent-chord);
}

.web-pdf-crop-handle-v.is-dragging::before {
    width: 3px;
    background-color: var(--stage-accent-cue);
}

.web-pdf-crop-handle-v.is-dragging .web-pdf-crop-pill {
    border-color: var(--stage-accent-cue);
    color: var(--stage-accent-cue);
}

.web-pdf-crop-pill-left {
    left: 50%;
    top: 36%;
    transform: translate(2px, -50%) rotate(-90deg);
    transform-origin: center;
}

.web-pdf-crop-pill-right {
    left: 50%;
    top: 64%;
    transform: translate(calc(-100% - 2px), -50%) rotate(90deg);
    transform-origin: center;
}

.web-pdf-crop-page-rotate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 0.48rem;
    border-radius: 6px;
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-accent-chord);
    color: var(--stage-accent-chord);
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
}

.web-pdf-crop-box {
    position: absolute;
    border: 2px solid var(--stage-accent-chord);
    box-sizing: border-box;
    touch-action: none;
    z-index: 5;
}

.web-pdf-crop-box.is-movable {
    cursor: grab;
}

.web-pdf-crop-box.is-moving {
    cursor: grabbing;
    border-color: var(--stage-accent-cue);
}

.web-pdf-crop-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: 33.333% 33.333%;
}

.web-pdf-crop-box.is-interacting .web-pdf-crop-grid {
    opacity: 1;
}

.web-pdf-crop-corner {
    position: absolute;
    width: 24px;
    height: 24px;
    touch-action: none;
    z-index: 7;
}

.web-pdf-crop-corner::before {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border-color: #ffffff;
    border-style: solid;
    filter: drop-shadow(0 0 2px rgba(2, 6, 23, 0.9));
}

.web-pdf-crop-corner.is-tl { top: -10px; left: -10px; cursor: nwse-resize; }
.web-pdf-crop-corner.is-tl::before { top: 8px; left: 8px; border-width: 3.5px 0 0 3.5px; }
.web-pdf-crop-corner.is-tr { top: -10px; right: -10px; cursor: nesw-resize; }
.web-pdf-crop-corner.is-tr::before { top: 8px; right: 8px; border-width: 3.5px 3.5px 0 0; }
.web-pdf-crop-corner.is-bl { bottom: -10px; left: -10px; cursor: nesw-resize; }
.web-pdf-crop-corner.is-bl::before { bottom: 8px; left: 8px; border-width: 0 0 3.5px 3.5px; }
.web-pdf-crop-corner.is-br { bottom: -10px; right: -10px; cursor: nwse-resize; }
.web-pdf-crop-corner.is-br::before { bottom: 8px; right: 8px; border-width: 0 3.5px 3.5px 0; }

.web-pdf-crop-edge-bar {
    position: absolute;
    z-index: 6;
    touch-action: none;
}

.web-pdf-crop-edge-bar::before {
    content: "";
    position: absolute;
    border-radius: 999px;
    background-color: #ffffff;
    box-shadow: 0 0 3px rgba(2, 6, 23, 0.9);
}

.web-pdf-crop-edge-bar.is-top { top: -12px; left: 22px; right: 22px; height: 24px; cursor: ns-resize; }
.web-pdf-crop-edge-bar.is-top::before { top: 10px; left: 50%; width: 32px; height: 4px; transform: translateX(-50%); }
.web-pdf-crop-edge-bar.is-bottom { bottom: -12px; left: 22px; right: 22px; height: 24px; cursor: ns-resize; }
.web-pdf-crop-edge-bar.is-bottom::before { bottom: 10px; left: 50%; width: 32px; height: 4px; transform: translateX(-50%); }
.web-pdf-crop-edge-bar.is-left { left: -12px; top: 22px; bottom: 22px; width: 24px; cursor: ew-resize; }
.web-pdf-crop-edge-bar.is-left::before { left: 10px; top: 50%; width: 4px; height: 32px; transform: translateY(-50%); }
.web-pdf-crop-edge-bar.is-right { right: -12px; top: 22px; bottom: 22px; width: 24px; cursor: ew-resize; }
.web-pdf-crop-edge-bar.is-right::before { right: 10px; top: 50%; width: 4px; height: 32px; transform: translateY(-50%); }

.web-pdf-crop-straighten-wrap {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--stage-border-subtle);
    color: var(--stage-text-primary);
    font-size: 0.72rem;
    font-weight: 700;
}

.web-pdf-crop-straighten-wrap input[type="range"] {
    width: 112px;
}

.web-pdf-crop-angle-pill {
    min-width: 42px;
    text-align: center;
    color: var(--stage-accent-chord);
    font-weight: 800;
}

.web-pdf-crop-hidden-veil {
    position: absolute;
    inset: 0;
    background-color: rgba(9, 13, 22, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
}

.web-pdf-crop-hidden-badge {
    padding: 0.42rem 0.95rem;
    border-radius: 8px;
    background-color: rgba(15, 23, 42, 0.92);
    border: 1.5px solid var(--stage-accent-cue);
    color: var(--stage-accent-cue);
    font-size: 0.88rem;
    font-weight: 800;
}

.web-pdf-crop-page-hide {
    padding: 0.22rem 0.56rem;
    border-radius: 6px;
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    color: var(--stage-text-primary);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.web-pdf-crop-page-hide.is-hidden-page {
    background-color: rgba(180, 83, 9, 0.92);
    border-color: var(--stage-accent-cue);
    color: #ffffff;
}

.web-pdf-crop-handle.is-dragging .web-pdf-crop-pill {
    border-color: var(--stage-accent-cue);
    color: var(--stage-accent-cue);
}

/* ============================================================================
   Non-Destructive PDF Bookmarks (Overlays, Badges & Modals in Web Studio)
   ============================================================================ */
.web-pdf-crop-frame.is-bookmark-mode {
    cursor: pointer;
    transition: box-shadow 0.14s ease, border-color 0.14s ease;
}

.web-pdf-crop-frame.is-bookmark-mode:hover {
    box-shadow: 0 0 0 2px var(--stage-accent-chord);
}

.web-pdf-crop-frame.is-bookmarked-page {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.78);
}

.web-pdf-bm-overlay-bar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    display: none;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: calc(100% - 110px);
}

.web-pdf-bm-add-btn {
    padding: 0.28rem 0.65rem;
    border-radius: 7px;
    border: 1px solid var(--stage-accent-chord);
    background-color: rgba(15, 23, 42, 0.90);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.web-pdf-bm-add-btn:hover {
    background-color: var(--stage-accent-chord);
    color: #0b1120;
}

.web-pdf-bm-chip-btn {
    padding: 0.26rem 0.65rem;
    border-radius: 7px;
    border: 1px solid rgba(245, 158, 11, 0.92);
    background-color: rgba(120, 53, 15, 0.92);
    color: #fef3c7;
    font-size: 0.75rem;
    font-weight: 700;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.pill-badge-bookmark {
    border-color: rgba(245, 158, 11, 0.55);
    background-color: rgba(245, 158, 11, 0.14);
    color: var(--stage-accent-cue);
}

.pill-badge-master {
    border-color: rgba(56, 189, 248, 0.55);
    background-color: rgba(56, 189, 248, 0.14);
    color: var(--stage-accent-chord);
}

.web-bm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1600;
    background-color: rgba(5, 8, 16, 0.74);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.web-bm-modal-card {
    width: min(94vw, 760px);
    max-height: min(90vh, 720px);
    overflow-y: auto;
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-subtle);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.web-bm-modal-card-sm {
    width: min(92vw, 480px);
}

.web-bm-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 720px) {
    .web-bm-editor-grid {
        grid-template-columns: 1fr;
    }
}

.web-bm-stepper-row {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    gap: 0.4rem;
    align-items: center;
}

.web-bm-preview-box {
    border: 1px solid var(--stage-border-subtle);
    border-radius: 10px;
    background-color: var(--stage-bg-elevated);
    min-height: 280px;
    padding: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.web-bm-preview-canvas {
    display: block;
    max-width: 100%;
    max-height: 360px;
    border-radius: 4px;
    background-color: #ffffff;
}

.web-bm-list-scroll {
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.web-bm-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 9px;
    border: 1px solid var(--stage-border-hairline);
    background-color: var(--stage-bg-elevated);
}


/* =========================================================================
   Desktop Web Studio Interactive Annotation Suite v2 (1:1 Stage Parity)
   ========================================================================= */
.web-annot-stage-wrap {
    position: relative;
}

.web-annot-active,
.web-annot-active * {
    user-select: none;
    -webkit-user-select: none;
}

.web-annot-deck {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--stage-bg-elevated, #0f172a);
    border: 1px solid var(--stage-border-subtle, #334155);
    border-radius: 12px;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.65rem;
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.web-annot-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.web-annot-sep {
    width: 1px;
    height: 22px;
    background: var(--stage-border-subtle, #334155);
    margin: 0 0.15rem;
}

.web-annot-tool-btn {
    position: relative;
    min-width: 34px;
    height: 36px;
    padding: 0 0.45rem;
    border-radius: 8px;
    border: 1px solid var(--stage-border-subtle, #334155);
    background: rgba(15, 23, 42, 0.55);
    color: var(--stage-text-primary, #f8fafc);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.92rem;
    transition: border-color 0.12s, background-color 0.12s;
}

.web-annot-tool-btn.web-annot-has-dots {
    padding-bottom: 5px;
}

.web-annot-more-dots {
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 7px;
    line-height: 1;
    letter-spacing: 1px;
    opacity: 0.65;
    pointer-events: none;
}

.web-annot-slider-line {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 2.5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.65;
    pointer-events: none;
}

.web-annot-scrub-pill {
    position: fixed;
    z-index: 95;
    pointer-events: none;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.94);
    border: 1.5px solid #38BDF8;
    color: #F8FAFC;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(2, 6, 23, 0.55);
    transform: translate(-50%, -50%);
}

.web-annot-tool-btn:hover:not(:disabled) {
    border-color: var(--stage-accent-chord, #38bdf8);
}

.web-annot-tool-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.web-annot-tool-btn.is-active {
    background: rgba(56, 189, 248, 0.22);
    border-color: var(--stage-accent-chord, #38bdf8);
    color: var(--stage-accent-chord, #38bdf8);
}

.web-annot-tool-btn.is-danger-active {
    background: rgba(239, 68, 68, 0.24);
    border-color: #ef4444;
    color: #fca5a5;
}

.web-annot-qn-brush-pill {
    height: 30px;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px solid #ef4444;
    background: rgba(220, 38, 38, 0.9);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.web-annot-qn-brush-pill:hover {
    background: #ef4444;
}

.web-annot-qn-chord-pill {
    height: 30px;
    padding: 0 0.58rem;
    border-radius: 999px;
    border: 1px solid var(--stage-accent-chord, #38bdf8);
    background: rgba(56, 189, 248, 0.2);
    color: #e0f2fe;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.web-annot-qn-chord-pill:hover {
    background: rgba(56, 189, 248, 0.34);
}

.web-annot-cancel-btn {
    border-color: #64748b;
}

.web-annot-save-btn {
    background: rgba(34, 197, 94, 0.22);
    border-color: #22c55e;
    color: #4ade80;
    font-weight: 700;
}

.web-annot-danger-btn {
    color: #f87171;
}

.web-annot-presets-cluster,
.web-annot-right-cluster {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.web-annot-preset-dot {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1.5px solid rgba(148, 163, 184, 0.58);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    color: #f8fafc;
}

.web-annot-preset-sep {
    width: 1.5px;
    height: 22px;
    margin: 0 0.22rem;
    background: var(--stage-border-subtle, #475569);
    opacity: 0.95;
}

.web-annot-preset-dot.is-selected {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}

.web-annot-preset-dot.is-deleting {
    border-color: #ef4444;
    background: #ef4444 !important;
}

.web-annot-mini-btn {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px dashed var(--stage-border-subtle, #475569);
    background: transparent;
    color: var(--stage-text-primary, #f8fafc);
    cursor: pointer;
    font-weight: 700;
}

.web-annot-mini-btn.is-active {
    border-style: solid;
    border-color: #38bdf8;
    color: #38bdf8;
}

.web-annot-default-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 0.4rem;
}

.web-annot-opacity-row {
    margin-top: 0.55rem;
}

.web-annot-opacity-wrap {
    position: relative;
    flex: 1;
    height: 18px;
    display: flex;
    align-items: center;
}

.web-annot-opacity-track {
    position: absolute;
    inset: 3px 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    pointer-events: none;
}

.web-annot-opacity-range {
    position: relative;
    width: 100%;
    margin: 0;
    background: transparent;
    accent-color: #38bdf8;
    cursor: pointer;
}

.web-annot-pill-btn {
    height: 30px;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--stage-border-subtle, #334155);
    background: rgba(15, 23, 42, 0.55);
    color: var(--stage-text-primary, #f8fafc);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.web-annot-pill-btn.is-locked {
    border-color: #f59e0b;
    color: #fbbf24;
}

.web-annot-size-preview {
    display: inline-block;
    border-radius: 999px;
}

.web-annot-color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.web-annot-backdrop {
    position: fixed;
    inset: 0;
    z-index: 54;
    background: transparent;
}

.web-annot-popover {
    position: sticky;
    top: 96px;
    z-index: 58;
    margin: 0 auto 0.5rem auto;
    width: fit-content;
    max-width: min(96vw, 440px);
    background: var(--stage-bg-elevated, #0f172a);
    border: 1px solid var(--stage-border-subtle, #334155);
    border-radius: 12px;
    padding: 0.65rem;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.55);
}

.web-annot-popover.is-quicknote {
    max-width: min(96vw, 600px);
    padding: 0.55rem 0.6rem;
}

.web-annot-chroma-grid {
    display: grid;
    grid-template-columns: repeat(12, 24px);
    gap: 4px;
}

.web-annot-chroma-cell {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0;
    cursor: pointer;
}

.web-annot-chroma-cell.is-selected {
    outline: 2px solid #38bdf8;
    outline-offset: 1px;
}

.web-annot-popover-footer {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.web-annot-recent-dot {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.web-annot-shape-grid {
    display: grid;
    grid-template-columns: repeat(5, 52px);
    gap: 6px;
}

.web-annot-shape-cell,
.web-annot-stamp-cell {
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--stage-border-subtle, #334155);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.web-annot-shape-cell.is-selected,
.web-annot-stamp-cell.is-selected {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.web-annot-stamp-cats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.web-annot-stamp-cat-btn {
    height: 32px;
    border-radius: 7px;
    border: 1px solid var(--stage-border-subtle, #334155);
    background: rgba(15, 23, 42, 0.55);
    color: var(--stage-text-primary, #f8fafc);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.web-annot-stamp-cat-btn.is-selected {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #38bdf8;
}

.web-annot-stamp-grid {
    display: grid;
    grid-template-columns: repeat(6, 48px);
    gap: 5px;
    max-height: 220px;
    overflow-y: auto;
}

.web-annot-slider-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.web-annot-layer-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    min-width: 260px;
}

.web-annot-jump-banner {
    position: sticky;
    top: 94px;
    z-index: 52;
    margin: 0 auto 0.5rem auto;
    width: fit-content;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    background: var(--stage-bg-elevated, #0f172a);
    border: 1px solid #f59e0b;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.45);
}

.web-annot-sel-pill {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    background: var(--stage-bg-elevated, #0f172a);
    border: 1px solid #38bdf8;
    box-shadow: 0 10px 28px rgba(2, 6, 23, 0.6);
}

.web-annot-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.web-annot-modal {
    width: min(94vw, 420px);
    background: var(--stage-bg-elevated, #0f172a);
    border: 1px solid var(--stage-border-subtle, #334155);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.65);
}

.web-annot-toast {
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: #fbbf24;
    font-weight: 600;
}

.web-annot-quicknote-modal {
    position: fixed;
    z-index: 64;
    width: fit-content;
    background: var(--stage-bg-elevated, #0f172a);
    border: 1px solid var(--stage-border-subtle, #334155);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.58);
}

.web-annot-quicknote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.web-annot-quicknote-close {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid var(--stage-border-subtle, #334155);
    background: transparent;
    color: var(--stage-text-secondary, #cbd5e1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
}

.web-annot-quicknote-close:hover {
    border-color: var(--stage-accent-chord, #38bdf8);
    color: var(--stage-text-primary, #f8fafc);
}

.web-annot-quicknote-grid {
    display: grid;
    grid-template-columns: repeat(6, 40px);
    gap: 4px;
}

.web-annot-quicknote-rows {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 260px;
}

.web-annot-quicknote-rows.is-five-rows {
    gap: 3px;
}

.web-annot-quicknote-rows.is-five-rows .web-annot-quicknote-row {
    gap: 3px;
}

.web-annot-quicknote-rows.is-five-rows .web-annot-quicknote-cell {
    height: 40px;
}

.web-annot-quicknote-rows.is-five-rows .web-annot-quicknote-row.is-compact-row .web-annot-quicknote-cell {
    height: 30px;
}

.web-annot-quicknote-rows.is-five-rows .web-annot-quicknote-row.is-compact-row .web-annot-quicknote-cell svg {
    width: 20px;
    height: 20px;
}

.web-annot-quicknote-row {
    display: grid;
    gap: 4px;
}

.web-annot-quicknote-row .web-annot-quicknote-cell {
    width: 100%;
}

.web-annot-quicknote-cell {
    width: 40px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--stage-border-subtle, #334155);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.1s ease, box-shadow 0.1s ease;
}

.web-annot-quicknote-cell:hover:not(:disabled) {
    border-color: var(--stage-accent-chord, #38bdf8);
}

.web-annot-quicknote-cell.is-selected {
    border-color: var(--stage-accent-chord, #38bdf8);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.35);
}

.web-annot-quicknote-cell.is-modifier {
    background-color: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.44);
    color: #fbbf24;
}

.web-annot-quicknote-cell.is-modifier:hover:not(:disabled) {
    border-color: #fbbf24;
    background-color: rgba(245, 158, 11, 0.24);
}

.web-annot-quicknote-cell.is-modifier.is-selected {
    background-color: rgba(245, 158, 11, 0.30);
    border-color: #fbbf24;
    color: #fef3c7;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.40);
}

.web-annot-quicknote-cell.is-flow {
    background-color: rgba(20, 184, 166, 0.14);
    border-color: rgba(45, 212, 191, 0.42);
    color: #5eead4;
}

.web-annot-quicknote-cell.is-flow:hover:not(:disabled) {
    border-color: #2dd4bf;
    background-color: rgba(20, 184, 166, 0.24);
}

.web-annot-quicknote-cell.is-flow.is-selected {
    background-color: rgba(20, 184, 166, 0.30);
    border-color: #2dd4bf;
    color: #ccfbf1;
    box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.40);
}

.web-annot-quicknote-cell.is-danger {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(248, 113, 113, 0.45);
    color: #f87171;
}

.web-annot-quicknote-cell.is-danger:hover:not(:disabled) {
    border-color: #f87171;
    background-color: rgba(239, 68, 68, 0.22);
}

.web-annot-quicknote-cell.is-danger-active {
    background-color: #dc2626;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.45);
}

.web-annot-quicknote-cell.is-danger-active:hover:not(:disabled) {
    background-color: #ef4444;
}

.web-annot-quicknote-cell:disabled {
    opacity: 0.32;
    cursor: default;
}

.web-annot-quicknote-split {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.web-annot-quicknote-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.3rem;
    width: 232px;
    padding-left: 0.5rem;
    border-left: 1px solid var(--stage-border-subtle, #334155);
}

.web-annot-quicknote-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.web-annot-quicknote-sidebar-title {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-annot-qn-chord-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.14rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.55);
    background: rgba(56, 189, 248, 0.18);
    color: #e0f2fe;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
}

.web-annot-qn-chord-grid {
    display: grid;
    grid-template-columns: repeat(6, 44px);
    gap: 3px;
}

.web-annot-qn-chord-rows {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 279px;
}

.web-annot-qn-chord-row {
    display: grid;
    gap: 3px;
}

.web-annot-qn-chord-row .web-annot-qn-chord-cell {
    width: 100%;
}

.web-annot-qn-chord-cell {
    position: relative;
    width: 44px;
    height: 36px;
    border-radius: 7px;
    border: 1px solid var(--stage-border-subtle, #334155);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.1s ease, background-color 0.1s ease, box-shadow 0.1s ease;
}

.web-annot-qn-chord-cell.is-chord-root {
    background-color: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.36);
    color: #bae6fd;
}

.web-annot-qn-chord-cell.is-chord-root.is-out-of-key {
    background-color: rgba(30, 41, 59, 0.72);
    border-color: rgba(71, 85, 105, 0.58);
    color: rgba(203, 213, 225, 0.72);
}

.web-annot-qn-chord-cell.is-chord-root.is-in-key {
    background-color: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.62);
    color: #d1fae5;
}

.web-annot-qn-chord-cell.is-chord-root.is-in-key.is-tonic {
    background-color: rgba(16, 185, 129, 0.28);
    border-color: rgba(52, 211, 153, 0.88);
    color: #ecfdf5;
}

.web-annot-qn-roman {
    position: absolute;
    top: 3px;
    right: 5px;
    font-size: 0.57rem;
    font-weight: 800;
    line-height: 1;
    color: #34d399;
    pointer-events: none;
}

.web-annot-qn-root-lbl.has-roman {
    padding-top: 8px;
    font-size: 0.72rem;
}

.web-annot-qn-chord-cell.is-chord-root:hover {
    border-color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.24);
}

.web-annot-qn-chord-cell.is-chord-root.is-selected {
    background-color: rgba(14, 165, 233, 0.36);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.38);
}

.web-annot-qn-chord-cell.is-chord-quality {
    background-color: rgba(139, 92, 246, 0.13);
    border-color: rgba(167, 139, 250, 0.38);
    color: #ddd6fe;
    font-size: 0.69rem;
}

.web-annot-qn-chord-cell.is-chord-quality.is-out-of-key {
    background-color: rgba(139, 92, 246, 0.08);
    border-color: rgba(167, 139, 250, 0.28);
    color: rgba(221, 214, 254, 0.72);
}

.web-annot-qn-chord-cell.is-chord-quality.is-in-key {
    background-color: rgba(16, 185, 129, 0.20);
    border-color: rgba(16, 185, 129, 0.68);
    color: #6ee7b7;
}

.web-annot-qn-chord-cell.is-chord-quality.is-in-key::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background-color: #34d399;
}

.web-annot-qn-chord-cell.is-chord-quality:hover {
    border-color: #a78bfa;
    background-color: rgba(139, 92, 246, 0.25);
}

.web-annot-qn-chord-cell.is-chord-quality.is-selected {
    background-color: rgba(124, 58, 237, 0.38);
    border-color: #c4b5fd;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.42);
}

.web-annot-qn-chord-cell.is-chord-inv {
    flex-direction: column;
    gap: 1px;
    background-color: rgba(245, 158, 11, 0.14);
    border-color: rgba(251, 191, 36, 0.44);
    color: #fde68a;
}

.web-annot-qn-chord-cell.is-chord-inv:hover {
    border-color: #fbbf24;
    background-color: rgba(245, 158, 11, 0.25);
}

.web-annot-qn-chord-cell.is-chord-inv.is-selected {
    background-color: rgba(217, 119, 6, 0.36);
    border-color: #fbbf24;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.42);
}

.web-annot-qn-inv-sub {
    font-size: 0.54rem;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.78;
    line-height: 1;
}

.web-annot-qn-inv-val {
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
}

.web-annot-qn-chord-cell.is-chord-dur:hover {
    border-color: var(--stage-accent-chord, #38bdf8);
}

.web-annot-qn-chord-cell.is-chord-dur.is-selected {
    border-color: var(--stage-accent-chord, #38bdf8);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.38);
}

.web-annot-qn-chord-cell.is-chord-dot {
    background-color: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.44);
    color: #fbbf24;
}

.web-annot-qn-chord-cell.is-chord-dot:hover {
    border-color: #fbbf24;
    background-color: rgba(245, 158, 11, 0.24);
}

.web-annot-qn-chord-cell.is-chord-dot.is-selected {
    background-color: rgba(245, 158, 11, 0.32);
    border-color: #fbbf24;
    color: #fef3c7;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.40);
}

.web-annot-qn-tabs-bar {
    padding-bottom: 5px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--stage-border-subtle, #334155);
}

.web-annot-qn-drum-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    width: 260px;
}

.web-annot-qn-drum-cell {
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--stage-border-subtle, #334155);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 2px 1px;
    cursor: pointer;
    transition: border-color 0.1s ease, background-color 0.1s ease, box-shadow 0.1s ease;
}

.web-annot-qn-drum-cell.is-drum-cymbal {
    background-color: rgba(56, 189, 248, 0.10);
    border-color: rgba(56, 189, 248, 0.36);
    color: #bae6fd;
}

.web-annot-qn-drum-cell.is-drum-cymbal.is-selected {
    background-color: rgba(14, 165, 233, 0.34);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.36);
}

.web-annot-qn-drum-cell.is-drum-shell {
    background-color: rgba(139, 92, 246, 0.12);
    border-color: rgba(167, 139, 250, 0.38);
    color: #ddd6fe;
}

.web-annot-qn-drum-cell.is-drum-shell.is-selected {
    background-color: rgba(124, 58, 237, 0.36);
    border-color: #a78bfa;
    color: #ffffff;
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.38);
}

.web-annot-qn-drum-lbl {
    font-size: 0.57rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.web-annot-qn-page-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 7px;
    border: 1px solid var(--stage-border-subtle, #334155);
    background: rgba(15, 23, 42, 0.7);
    flex-shrink: 0;
}

.web-annot-qn-page-switch.is-rail {
    width: 100%;
    justify-content: stretch;
}

.web-annot-qn-page-btn {
    min-width: 25px;
    height: 22px;
    padding: 2px 6px;
    border: 1px solid transparent;
    border-radius: 5px;
    background: transparent;
    color: var(--stage-text-secondary, #cbd5e1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}

.web-annot-qn-page-switch.is-rail .web-annot-qn-page-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 2px 4px;
}

.web-annot-qn-page-btn:hover {
    color: var(--stage-text-primary, #f8fafc);
    background: rgba(56, 189, 248, 0.14);
}

.web-annot-qn-page-btn.is-active {
    background: rgba(56, 189, 248, 0.24);
    border-color: var(--stage-accent-chord, #38bdf8);
    color: #ffffff;
}

.web-annot-quicknote-opts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
}

.web-annot-qn-opt-btn {
    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: 3px 6px;
    font-size: 0.7rem;
    line-height: 1.15;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-annot-qn-opt-span {
    grid-column: 1 / -1;
}

.web-annot-quicknote-scale-box {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--stage-border-subtle, #334155);
}

.web-annot-qn-size-scrub {
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--stage-border-subtle, #334155);
    background: var(--stage-control-idle-bg, rgba(15, 23, 42, 0.72));
    color: var(--stage-text-primary, #f8fafc);
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 3px 8px 3px 4px;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
    transition: border-color 0.1s ease, background-color 0.1s ease;
}

.web-annot-qn-size-scrub:hover {
    border-color: var(--stage-accent-chord, #38bdf8);
    background: rgba(56, 189, 248, 0.14);
}

.web-annot-qn-size-well {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.web-annot-qn-size-meta {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
}

.web-annot-qn-size-pct {
    font-size: 0.78rem;
    font-weight: 800;
}

.web-annot-qn-size-hint {
    font-size: 0.56rem;
    font-weight: 600;
    color: var(--stage-text-muted, #94a3b8);
}

.web-annot-qn-reset-size-btn {
    width: 34px;
    height: 38px;
    min-width: 34px;
    padding: 0;
    flex-shrink: 0;
    font-size: 0.95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.web-annot-qn-corner-drag {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--stage-border-subtle, #334155);
    background: var(--stage-control-idle-bg, rgba(15, 23, 42, 0.72));
    color: var(--stage-text-muted, #94a3b8);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: border-color 0.1s ease, background-color 0.1s ease, color 0.1s ease;
}

.web-annot-qn-corner-drag:hover,
.web-annot-popover.is-quicknote.is-pinned.is-dragging .web-annot-qn-corner-drag {
    border-color: var(--stage-accent-chord, #38bdf8);
    background: rgba(56, 189, 248, 0.18);
    color: var(--stage-accent-chord, #38bdf8);
}

.web-annot-popover.is-quicknote.is-pinned.is-dragging .web-annot-qn-corner-drag {
    cursor: grabbing;
}

.web-annot-qn-scale-badge {
    align-self: flex-start;
    margin: 0;
    font-size: 0.69rem;
    padding: 0.08rem 0.42rem;
}

.web-annot-quicknote-modal-body {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
}

.web-annot-quicknote-rail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 86px;
    padding-left: 0.4rem;
    border-left: 1px solid var(--stage-border-subtle, #334155);
}

.web-annot-qn-rail-btn {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.24rem;
    padding: 2px 6px;
    text-align: center;
    white-space: normal;
    line-height: 1.12;
    font-size: 0.68rem;
}

.web-annot-qn-rail-icon {
    font-size: 1rem;
    line-height: 1;
}

.web-annot-qn-rail-label {
    word-break: break-word;
}

@media (max-width: 560px) {
    .web-annot-quicknote-split {
        flex-direction: column;
    }

    .web-annot-quicknote-sidebar {
        width: 100%;
        padding-left: 0;
        padding-top: 0.45rem;
        border-left: none;
        border-top: 1px solid var(--stage-border-subtle, #334155);
    }
}

.web-annot-qn-brush-active {
    background: #dc2626 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

/* =========================================================================
   Client-Side HTML5 Canvas Sheet Music Scanner & Cleanup Studio
   ========================================================================= */
.web-scan-dialog {
    max-width: 900px !important;
    width: min(96vw, 900px);
}

.web-scan-top-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-end;
    margin-bottom: 0.6rem;
}

.web-scan-add-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.web-scan-page-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--token-radius-pill, 10px);
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
}

.web-scan-stage-wrap {
    position: relative;
    width: 100%;
    height: min(52vh, 470px);
    min-height: 290px;
    border-radius: var(--token-radius-pill, 10px);
    border: 1px solid var(--stage-border-subtle);
    background-color: #0b1120;
    overflow: hidden;
}

.web-scan-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.web-scan-canvas.is-crop-mode {
    cursor: crosshair;
}

.web-scan-empty-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    color: var(--stage-text-primary);
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.08), transparent 65%);
}

.web-scan-empty-overlay:hover {
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.14), transparent 65%);
}

.web-scan-empty-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.web-scan-controls-panel {
    margin-top: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--token-radius-pill, 10px);
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.web-scan-presets-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.web-scan-sliders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.web-scan-slider-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--stage-text-secondary);
}

.web-scan-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.web-scan-slider-item input[type="range"] {
    width: 100%;
    margin: 0;
}

@media (max-width: 640px) {
    .web-scan-sliders-grid {
        grid-template-columns: 1fr;
    }
}

.web-annot-popover.is-quicknote.is-pinned {
    position: fixed;
    left: 50%;
    top: 96px;
    transform: translate3d(calc(-50% + var(--qn-drag-x, 0px)), var(--qn-drag-y, 0px), 0);
    will-change: transform;
    z-index: 62;
    pointer-events: auto;
    margin: 0;
}

.web-annot-popover.is-quicknote.is-pinned.is-draggable {
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.web-annot-popover.is-quicknote.is-pinned.is-dragging {
    cursor: grabbing;
}

.web-annot-qn-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 16px;
    margin: -0.15rem 0 0.2rem;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.web-annot-popover.is-quicknote.is-pinned.is-dragging .web-annot-qn-drag-handle {
    cursor: grabbing;
}

.web-annot-qn-drag-pill {
    width: 48px;
    height: 4px;
    border-radius: 999px;
    background: var(--stage-text-muted, #94a3b8);
    opacity: 0.7;
    transition: background-color 0.1s ease, opacity 0.1s ease;
}

.web-annot-popover.is-quicknote.is-pinned.is-dragging .web-annot-qn-drag-pill {
    background: var(--stage-accent-chord, #38bdf8);
    opacity: 1;
}

.web-annot-qn-key-btn {
    min-width: 84px;
}

.web-annot-qn-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.web-annot-qn-bar-head-left,
.web-annot-qn-bar-head-right {
    display: flex;
    align-items: center;
    gap: 0.28rem;
}

.web-annot-qn-key-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
    margin-bottom: 0.4rem;
}

.web-annot-qn-transpose-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.35rem 0.45rem;
    margin-bottom: 0.4rem;
    border-radius: 8px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    font-size: 0.74rem;
    font-weight: 700;
}

.web-annot-policy-panel {
    border-top: 1px solid var(--stage-border-subtle, #334155);
    margin-top: 0.45rem;
    padding-top: 0.2rem;
}

.web-annot-policy-scopes {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    margin-top: 0.4rem;
}

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

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

.web-annot-scope-group {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex-wrap: wrap;
}
