.notation-score-action {
    min-width: 58px;
}

.notation-score-action.is-active,
.notation-score-action[aria-pressed="true"] {
    color: #f7fbff;
    background: rgba(92, 151, 229, 0.24);
    border-color: rgba(120, 174, 242, 0.52);
}

.notation-panel {
    --notation-paper: #fcfbf7;
    --notation-ink: #191a1d;
    --notation-muted: rgba(226, 232, 240, 0.58);
    position: fixed;
    top: calc(var(--transport-topbar-height, 60px) + var(--transport-progress-height, 45px));
    left: 0;
    z-index: 9;
    width: 100vw;
    height: var(--notation-panel-height, 286px);
    overflow: hidden;
    color: #edf1f6;
    background:
        radial-gradient(circle at 20% -90%, rgba(112, 146, 190, 0.18), transparent 55%),
        linear-gradient(180deg, #191b20, #111318);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.3);
    contain: layout paint style;
    isolation: isolate;
}

.notation-panel[hidden] {
    display: none;
}

.notation-panel__header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(11, 13, 17, 0.58);
}

.notation-panel__context {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    color: rgba(232, 238, 246, 0.82);
    background: rgba(23, 28, 36, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.notation-panel__context[hidden] {
    display: none;
}

.notation-panel__context-mode {
    flex: none;
    padding: 4px 7px;
    color: #dcecff;
    font: 750 10px/1 system-ui, sans-serif;
    letter-spacing: 0.025em;
    background: rgba(73, 133, 211, 0.17);
    border: 1px solid rgba(91, 151, 228, 0.3);
    border-radius: 999px;
}

.notation-panel__context[data-mode="individual-part"] .notation-panel__context-mode {
    color: #eadfff;
    background: rgba(116, 78, 178, 0.16);
    border-color: rgba(137, 97, 201, 0.3);
}

.notation-panel__context-copy {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 7px;
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
}

.notation-panel__context-title {
    flex: none;
    color: rgba(244, 247, 251, 0.92);
    font-weight: 700;
}

.notation-panel__context-selection {
    overflow: hidden;
    color: rgba(220, 227, 237, 0.7);
    text-overflow: ellipsis;
}

.notation-panel__edit-practice {
    flex: none;
    height: 25px;
    margin-left: auto;
    padding: 0 9px;
    color: #e5f0ff;
    font: 700 10px/1 system-ui, sans-serif;
    background: rgba(81, 139, 213, 0.13);
    border: 1px solid rgba(103, 159, 231, 0.28);
    border-radius: 6px;
    cursor: pointer;
}

.notation-panel__edit-practice:hover:not(:disabled) {
    color: #fff;
    background: rgba(81, 139, 213, 0.24);
    border-color: rgba(116, 172, 242, 0.48);
}

.notation-panel__edit-practice:focus-visible {
    outline: 2px solid #78aef2;
    outline-offset: 1px;
}

.notation-panel__edit-practice:disabled {
    opacity: 0.35;
    cursor: default;
}

.notation-panel__identity,
.notation-panel__controls {
    display: flex;
    align-items: center;
}

.notation-panel__density {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--notation-muted);
    font: 650 10px/1 system-ui, sans-serif;
}

.notation-panel__density-slider {
    width: 104px;
    accent-color: #73a9ed;
    cursor: pointer;
}

.notation-panel__density-slider:focus-visible {
    outline: 2px solid #78aef2;
    outline-offset: 2px;
}

.notation-panel__identity {
    min-width: 0;
    gap: 10px;
}

.notation-panel__eyebrow {
    color: #f6f8fb;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.notation-panel__range {
    width: 260px;
    overflow: hidden;
    color: var(--notation-muted);
    contain: layout paint style;
    flex: none;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notation-panel__part {
    max-width: 240px;
    overflow: hidden;
    color: rgba(246, 248, 251, 0.9);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notation-panel__part-picker {
    min-width: 0;
}

.notation-panel__mode-picker {
    flex: none;
}

.notation-panel__mode-select,
.notation-panel__part-select {
    width: min(310px, 28vw);
    height: 28px;
    padding: 0 28px 0 9px;
    overflow: hidden;
    color: rgba(246, 248, 251, 0.94);
    font: 600 12px/1 system-ui, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
}

.notation-panel__mode-select {
    width: 128px;
}

.notation-panel__mode-select:focus-visible,
.notation-panel__part-select:focus-visible {
    outline: 2px solid #78aef2;
    outline-offset: 1px;
}

.notation-panel__controls {
    flex: none;
    gap: 5px;
}

.notation-panel__follow {
    height: 28px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    color: rgba(224, 231, 240, 0.68);
    font: 600 10px/1 system-ui, sans-serif;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
}

.notation-panel__follow-dot {
    width: 6px;
    height: 6px;
    background: #72aaf0;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(114, 170, 240, 0.12);
}

.notation-panel__follow[data-mode="paused"] .notation-panel__follow-dot {
    background: #e4ba69;
    box-shadow: 0 0 0 3px rgba(228, 186, 105, 0.1);
}

.notation-panel__follow[data-mode="browsing"] {
    color: rgba(244, 223, 183, 0.86);
    background: rgba(142, 103, 45, 0.12);
    border-color: rgba(224, 181, 105, 0.22);
}

.notation-panel__follow[data-mode="browsing"] .notation-panel__follow-dot {
    background: #dfb46d;
    box-shadow: none;
}

.notation-panel__controls .notation-panel__follow button {
    width: auto;
    height: 22px;
    padding: 0 7px;
    color: #f8e8c7;
    font: 700 10px/1 system-ui, sans-serif;
    background: rgba(224, 181, 105, 0.12);
    border-color: rgba(224, 181, 105, 0.24);
    border-radius: 999px;
}

.notation-panel__controls .notation-panel__follow button[hidden] {
    display: none;
}

.notation-panel__controls button {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    padding: 0;
    color: rgba(242, 246, 252, 0.88);
    font: 500 19px/1 system-ui, sans-serif;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    cursor: pointer;
}

.notation-panel__controls button:hover:not(:disabled) {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.18);
}

.notation-panel__controls button:focus-visible,
.notation-panel__viewport:focus-visible {
    outline: 2px solid #78aef2;
    outline-offset: -2px;
}

.notation-panel__controls button:disabled {
    opacity: 0.26;
    cursor: default;
}

.notation-panel__navigation {
    position: absolute;
    top: 88px;
    right: 24px;
    z-index: 6;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 5px 4px 10px;
    color: rgba(235, 240, 247, 0.86);
    background: rgba(18, 21, 27, 0.9);
    border: 1px solid rgba(130, 166, 215, 0.22);
    border-radius: 9px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.notation-panel__navigation[hidden] {
    display: none;
}

.notation-panel__navigation[data-state="disabled"] {
    color: #e8cd94;
    border-color: rgba(224, 181, 105, 0.26);
}

.notation-panel__navigation-label {
    max-width: 230px;
    overflow: hidden;
    font: 600 10px/1.2 system-ui, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notation-panel__navigation button {
    height: 25px;
    padding: 0 8px;
    color: rgba(242, 246, 252, 0.9);
    font: 700 10px/1 system-ui, sans-serif;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 6px;
    cursor: pointer;
}

.notation-panel__navigation button:hover:not(:disabled) {
    color: #fff;
    background: rgba(96, 151, 224, 0.17);
    border-color: rgba(108, 163, 234, 0.34);
}

.notation-panel__navigation button:focus-visible {
    outline: 2px solid #78aef2;
    outline-offset: 1px;
}

.notation-panel__navigation button:disabled {
    opacity: 0.28;
    cursor: default;
}

.notation-panel__divider {
    width: 1px;
    height: 20px;
    margin: 0 3px;
    background: rgba(255, 255, 255, 0.1);
}

.notation-panel__viewport {
    height: calc(100% - 80px);
    overflow: auto;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.025), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.025)),
        #101217;
    overscroll-behavior: contain;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    scrollbar-width: thin;
}

.notation-panel__reader-line {
    display: none;
}

.notation-panel__fixed-context {
    display: none;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__context {
    display: none;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__viewport {
    height: var(--notation-compact-band-height, calc(100% - 44px));
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--notation-paper);
    scroll-behavior: auto;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__tiles {
    min-width: 0;
    min-height: 0;
    background: var(--notation-paper);
    will-change: transform;
    transition: none;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__system {
    right: auto;
    overflow: visible;
    background: var(--notation-paper);
    border-radius: 0;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__system::after {
    border-radius: 0;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__tile {
    position: absolute;
    top: 0;
    left: 0;
    max-width: none;
    flex: none;
    box-shadow: none;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__playback-layer {
    top: var(--notation-tile-top, 0px);
    left: 0;
    width: var(--notation-tile-width, 100%);
    height: var(--notation-tile-height, 100%);
    transform: none;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__position-cue {
    display: none;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__reader-line {
    position: absolute;
    top: 44px;
    bottom: auto;
    height: var(--notation-compact-band-height, 0px);
    left: var(--notation-reader-x, calc(var(--notation-reader-ratio, 0.5) * 100%));
    z-index: 7;
    width: 2px;
    display: block;
    background:
        linear-gradient(
            180deg,
            transparent,
            rgba(74, 139, 226, 0.9) 14%,
            rgba(74, 139, 226, 0.9) 86%,
            transparent
        );
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(12, 17, 24, 0.2);
    opacity: 0.88;
    pointer-events: none;
    transform: translateX(-50%) translateZ(0);
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__fixed-context {
    position: absolute;
    top: 44px;
    left: 0;
    z-index: 6;
    width: var(--notation-fixed-context-width, 0px);
    height: var(--notation-compact-band-height, 0px);
    display: block;
    overflow: visible;
    background: var(--notation-paper);
    pointer-events: none;
    contain: layout paint style;
}

.notation-panel[data-presentation-mode="compact"] .notation-panel__fixed-context[hidden] {
    display: none;
}

.notation-panel__fixed-context-tile {
    position: absolute;
    left: 0;
    z-index: 1;
    display: block;
    background: var(--notation-paper);
    pointer-events: none;
}

.notation-panel__fixed-context-tile[hidden] {
    display: none;
}

.notation-panel__context-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 100%;
    z-index: 2;
    width: var(--notation-context-fade-width, 34px);
    background: linear-gradient(90deg, var(--notation-paper), rgba(252, 251, 247, 0));
    pointer-events: none;
}

.notation-panel__state {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 28px;
    color: rgba(230, 235, 243, 0.65);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

.notation-panel__state[hidden],
.notation-panel__tiles[hidden] {
    display: none !important;
}

.notation-panel[data-state="error"] .notation-panel__state {
    color: #ffb8b8;
}

.notation-panel[data-state="unsupported"] .notation-panel__state {
    color: #f1d69a;
}

.notation-panel[data-state="too-dense"] .notation-panel__state {
    color: #f1d69a;
}

.notation-panel[data-state="part-selection"] .notation-panel__state {
    color: rgba(238, 242, 248, 0.82);
}

.notation-panel[data-state="loading"] .notation-panel__state::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.16);
    border-top-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: notation-spinner 700ms linear infinite;
}

.notation-panel[data-state="loading"] .notation-panel__state {
    display: flex;
    justify-content: center;
}

.notation-panel[data-state="loading"][data-has-tiles="true"] .notation-panel__state {
    position: absolute;
    top: 52px;
    right: 18px;
    z-index: 2;
    width: auto;
    height: 30px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(17, 19, 24, 0.86);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    font-size: 11px;
    backdrop-filter: blur(8px);
}

.notation-panel[data-state="loading"][data-has-tiles="true"] .notation-panel__state::before {
    width: 12px;
    height: 12px;
    margin-right: 7px;
}

.notation-panel__tiles {
    position: relative;
    box-sizing: border-box;
    min-width: 100%;
    min-height: 100%;
}

.notation-panel__system {
    position: absolute;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    contain: strict;
}

.notation-panel__system[data-notation-navigation="true"] {
    cursor: crosshair;
}

.notation-panel__system[data-notation-navigation="true"]:focus-visible {
    outline: 2px solid rgba(120, 174, 242, 0.9);
    outline-offset: -3px;
}

.notation-panel__system::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 1px solid transparent;
    border-radius: 4px;
    pointer-events: none;
}

.notation-panel__system.is-current-system::after {
    border-color: rgba(73, 133, 211, 0.42);
    box-shadow: inset 3px 0 0 rgba(66, 128, 207, 0.74);
}

.notation-panel__system.is-next-system::after {
    border-left-color: rgba(103, 159, 145, 0.42);
    box-shadow: inset 2px 0 0 rgba(103, 159, 145, 0.38);
}

.notation-panel__system.is-navigation-selected::after {
    border-color: rgba(116, 78, 178, 0.48);
    box-shadow: inset 3px 0 0 rgba(116, 78, 178, 0.72);
}

.notation-panel__system-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: rgba(225, 231, 239, 0.52);
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0.02) 20%, rgba(255, 255, 255, 0.055) 36%, rgba(255, 255, 255, 0.02) 52%),
        rgba(255, 255, 255, 0.025);
    background-size: 240% 100%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    animation: notation-system-loading 1600ms ease-in-out infinite;
}

.notation-panel__system[data-rendered="true"] .notation-panel__system-placeholder {
    visibility: hidden;
}

.notation-panel__system.is-unsupported .notation-panel__system-placeholder {
    color: #efd79e;
    background: rgba(117, 87, 35, 0.12);
    border-color: rgba(227, 192, 121, 0.2);
    animation: none;
}

.notation-panel__system.is-unsupported {
    cursor: not-allowed;
}

.notation-panel__tile {
    position: relative;
    z-index: 1;
    max-width: 100%;
    display: block;
    border: 0;
    border-radius: 3px;
    background: var(--notation-paper);
    backface-visibility: hidden;
    contain: strict;
    pointer-events: none;
    transform: translateZ(0);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 9px 26px rgba(0, 0, 0, 0.34);
}

.notation-panel__playback-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: min(100%, var(--notation-tile-width, 100%));
    height: min(100%, var(--notation-tile-height, 100%));
    overflow: hidden;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.notation-panel__position-cue {
    position: absolute;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(54, 117, 203, 0.82) 16%, rgba(54, 117, 203, 0.82) 84%, transparent);
    border-radius: 999px;
    opacity: 0.84;
    transform: translateX(-50%) translateZ(0);
    will-change: left;
}

.notation-panel__system.is-paused .notation-panel__position-cue {
    width: 1px;
    background: repeating-linear-gradient(
        180deg,
        rgba(179, 130, 54, 0.88) 0 5px,
        transparent 5px 9px
    );
    opacity: 0.76;
}

.notation-panel__note-cues {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.notation-panel__note-cue {
    position: absolute;
    box-sizing: border-box;
    min-width: 7px;
    min-height: 9px;
    border-radius: 5px;
}

.notation-panel__note-cue.is-current {
    background: rgba(71, 137, 224, 0.18);
    border: 1px solid rgba(55, 113, 193, 0.7);
    box-shadow: 0 0 0 2px rgba(82, 145, 228, 0.08);
}

.notation-panel__note-cue.is-next {
    background: transparent;
    border-bottom: 2px solid rgba(82, 149, 132, 0.7);
    border-radius: 0 0 4px 4px;
}

.notation-panel__navigation-cue {
    position: absolute;
    box-sizing: border-box;
    min-width: 10px;
    min-height: 12px;
    background: rgba(123, 80, 194, 0.12);
    border: 2px solid rgba(113, 70, 181, 0.78);
    border-radius: 6px;
    box-shadow: 0 0 0 3px rgba(113, 70, 181, 0.1);
    pointer-events: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

@keyframes notation-spinner {
    to { transform: rotate(360deg); }
}

@keyframes notation-system-loading {
    0%, 100% { background-position: 100% 0; }
    50% { background-position: 0 0; }
}

@media (max-width: 700px) {
    .notation-panel__header {
        height: 42px;
        padding: 0 9px;
    }

    .notation-panel__range {
        width: 176px;
        font-size: 11px;
    }

    .notation-panel__context {
        height: 34px;
        gap: 7px;
        padding: 0 9px;
    }

    .notation-panel__context-title {
        display: none;
    }

    .notation-panel__edit-practice {
        padding: 0 7px;
    }

    .notation-panel__part {
        max-width: 94px;
        font-size: 11px;
    }

    .notation-panel__part-select {
        width: min(170px, 34vw);
        font-size: 11px;
    }

    .notation-panel__viewport {
        height: calc(100% - 76px);
    }

    .notation-panel[data-presentation-mode="compact"] .notation-panel__viewport {
        height: var(--notation-compact-band-height, calc(100% - 42px));
    }

    .notation-panel[data-presentation-mode="compact"] .notation-panel__reader-line {
        top: 42px;
    }

    .notation-panel__controls {
        gap: 4px;
    }

    .notation-panel__follow {
        padding: 0 6px;
    }

    .notation-panel__follow-label,
    .notation-panel__follow-dot {
        display: none;
    }

    .notation-panel__controls button {
        width: 31px;
        height: 31px;
    }

    .notation-panel__system {
        left: 9px;
        right: 9px;
    }

    .notation-panel__navigation {
        top: 82px;
        right: 10px;
        left: 10px;
        justify-content: flex-end;
    }

    .notation-panel__navigation-label {
        max-width: none;
        min-width: 0;
        margin-right: auto;
    }

    .notation-panel__navigation button {
        padding: 0 6px;
        font-size: 9px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .notation-panel[data-state="loading"] .notation-panel__state::before {
        animation-duration: 1400ms;
    }

    .notation-panel__system-placeholder {
        animation: none;
    }
}
