:root {
            --songs-accent: var(--module-color-songs, var(--app-primary));
            --songs-accent-strong: color-mix(in srgb, var(--songs-accent) 78%, #000000);
            --songs-accent-soft: color-mix(in srgb, var(--songs-accent) 14%, transparent);
            --songs-line: color-mix(in srgb, var(--songs-accent) 24%, var(--app-line));
            --songs-editor-x: var(--app-page-gutter, clamp(18px, 4vw, 48px));
            --songs-editor-content-max: var(--app-content-max, 1200px);
        }

        body {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        }

        .songs-shell {
            width: min(1440px, calc(100vw - 68px));
            margin: 0 auto;
        }

        .songs-module-heading {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            gap: 18px;
            align-items: stretch;
            margin-bottom: 18px;
        }

        body[data-auth-required="true"] .songs-module-heading {
            margin-bottom: var(--app-section-gap) !important;
        }

        .songs-module-logo {
            --brand-logo-size: clamp(62px, 6vw, 92px);
            align-self: center;
        }

        .songs-hero {
            display: flex;
            justify-content: space-between;
            gap: 22px;
            align-items: flex-end;
            margin-bottom: 18px;
        }

        body[data-auth-required="true"] .songs-hero {
            align-items: center !important;
            min-height: 0 !important;
            margin: 0 !important;
            padding-right: 26px !important;
            padding-left: 26px !important;
            padding-top: 18px !important;
            padding-bottom: 18px !important;
        }

        .songs-hero-titleline {
            display: inline-flex;
            align-items: center;
            gap: 16px;
            min-width: 0;
        }

        .songs-hero-icon {
            width: clamp(38px, 4vw, 52px);
            height: clamp(38px, 4vw, 52px);
            flex: 0 0 auto;
            display: block;
            background: currentColor;
            -webkit-mask: url("/assets/icons/music.svg?v=20260615-songsicon1") center / contain no-repeat;
            mask: url("/assets/icons/music.svg?v=20260615-songsicon1") center / contain no-repeat;
        }

        .songs-kicker {
            margin: 0 0 8px;
            color: var(--songs-accent);
            font-size: 13px;
            font-weight: 850;
            letter-spacing: 0;
            text-transform: uppercase;
        }

        .songs-title {
            margin: 0;
            color: var(--app-text);
            font-size: clamp(32px, 3.4vw, 48px);
            line-height: 0.98;
            letter-spacing: 0;
        }

        .songs-intro {
            max-width: 660px;
            margin: 12px 0 0;
            color: var(--app-muted);
        }

        .songs-layout {
            display: grid;
            grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
            gap: 20px;
            align-items: stretch;
            transition: grid-template-columns 220ms ease;
        }

        .songs-layout.is-sidebar-collapsed {
            grid-template-columns: 30px minmax(0, 1fr);
        }

        .songs-sidebar,
        .songs-panel,
        .songs-editor-panel {
            border: 1px solid var(--app-line);
            border-radius: var(--app-radius-lg);
            background: var(--app-surface);
            box-shadow: var(--app-shadow-soft);
        }

        .songs-sidebar {
            position: sticky;
            top: 92px;
            height: max(280px, calc(100dvh - var(--songs-sidebar-top, 92px) - 18px));
            min-height: 0;
            overflow: hidden;
            padding: 20px 48px 20px 20px;
            align-self: start;
            transition: padding 220ms ease, height 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
        }

        .sidebar-collapse-content {
            height: 100%;
            overflow-y: auto;
            padding-right: 10px;
            scrollbar-color: var(--songs-accent) var(--app-scrollbar-track, var(--app-line));
            transition: opacity 160ms ease, transform 220ms ease;
        }

        .sidebar-collapse-toggle {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            z-index: 4;
            display: grid;
            place-items: center;
            width: 22px;
            min-width: 22px !important;
            min-height: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            border: 0 !important;
            border-radius: 0 var(--app-radius-lg) var(--app-radius-lg) 0 !important;
            background: var(--songs-accent) !important;
            color: var(--module-page-on-accent, #ffffff) !important;
            box-shadow: none !important;
            cursor: pointer;
        }

        .sidebar-collapse-label {
            display: none;
            writing-mode: vertical-rl;
            transform: rotate(180deg);
            color: inherit;
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0;
            line-height: 1;
            white-space: nowrap;
        }

        .sidebar-collapse-toggle svg {
            width: 18px;
            height: 18px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2.6;
            stroke-linecap: round;
            stroke-linejoin: round;
            transition: transform 180ms ease;
        }

        .songs-layout.is-sidebar-collapsed .songs-sidebar {
            min-height: 0;
            padding: 0;
            border-color: transparent;
            background: transparent;
            box-shadow: none;
        }

        .songs-layout.is-sidebar-collapsed .sidebar-collapse-content {
            opacity: 0;
            pointer-events: none;
            transform: translateX(-12px);
        }

        .songs-layout.is-sidebar-collapsed .sidebar-collapse-toggle {
            left: 0;
            right: auto;
            display: block;
            width: 30px;
            min-width: 30px !important;
            border-radius: var(--app-radius-lg) !important;
        }

        .songs-layout.is-sidebar-collapsed .sidebar-collapse-toggle svg {
            position: absolute;
            left: 50%;
            top: calc(50% - 18px);
            transform: translate(-50%, -50%) rotate(180deg);
        }

        .songs-layout.is-sidebar-collapsed .sidebar-collapse-toggle .sidebar-collapse-label {
            position: absolute;
            left: 50%;
            top: calc(50% + 38px);
            transform: translate(-50%, -50%) rotate(180deg);
        }

        .songs-layout.is-sidebar-collapsed .sidebar-collapse-label {
            display: block;
        }

        .songs-sidebar h2,
        .songs-panel h2,
        .songs-editor-panel h2 {
            margin: 0;
            color: var(--app-text);
            font-size: 20px;
            letter-spacing: 0;
        }

        .songs-search {
            position: relative;
            margin-top: 16px;
        }

        .songs-search svg {
            position: absolute;
            left: 14px;
            top: calc(50% + 3px);
            width: 18px;
            height: 18px;
            transform: translateY(-50%);
            fill: none;
            stroke: var(--app-muted);
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke-width: 2.2;
            pointer-events: none;
        }

        .songs-search input {
            padding-left: 44px !important;
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        .filter-placeholder {
            margin-top: 18px;
            padding-top: 16px;
            border-top: 1px solid var(--app-line);
        }

        .filter-placeholder p {
            margin: 8px 0 0;
            color: var(--app-muted);
            font-size: 14px;
        }

        .songs-filter-group {
            margin-top: 18px;
            padding-top: 16px;
            border-top: 1px solid var(--app-line);
        }

        .songs-filter-group strong {
            display: block;
            margin-bottom: 8px;
            color: var(--app-text);
            font-size: 14px;
        }

        .tag-filter-list {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
        }

        .tag-filter-button {
            min-height: 30px;
            margin: 0 !important;
            padding: 5px 10px;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            background: var(--app-surface-strong);
            color: var(--app-text);
            font: inherit;
            font-size: 12px;
            font-weight: 800;
        }

        .tag-filter-button.is-active {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .songs-multi-filter {
            position: relative;
        }

        .songs-multi-filter-toggle {
            display: flex !important;
            align-items: center;
            justify-content: space-between;
            width: 100% !important;
            min-height: 44px;
            margin: 0 !important;
            padding: 9px 14px !important;
            border: 1px solid var(--songs-line) !important;
            border-radius: var(--app-radius-md) !important;
            background: var(--app-surface-strong) !important;
            color: var(--app-text) !important;
            box-shadow: none !important;
            font-size: 14px;
            font-weight: 800;
            text-align: left;
        }

        .songs-multi-filter-toggle::after {
            content: "";
            width: 8px;
            height: 8px;
            margin-left: 10px;
            border-right: 2px solid currentColor;
            border-bottom: 2px solid currentColor;
            transform: rotate(45deg) translateY(-2px);
        }

        .songs-multi-filter-toggle[aria-expanded="true"]::after {
            transform: rotate(225deg) translateY(-1px);
        }

        .songs-multi-filter-menu {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 6px);
            z-index: 30;
            display: grid;
            gap: 6px;
            max-height: 240px;
            overflow: auto;
            padding: 8px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface);
            box-shadow: var(--app-shadow-soft);
            scrollbar-color: var(--songs-accent) color-mix(in srgb, var(--songs-accent) 14%, transparent);
        }

        .songs-multi-filter-option {
            display: flex;
            align-items: center;
            gap: 8px;
            min-height: 32px;
            padding: 6px 8px;
            border-radius: 9px;
            color: var(--app-text);
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
        }

        .songs-multi-filter-option:hover {
            background: var(--songs-accent-soft);
        }

        .songs-multi-filter-option input {
            width: 16px;
            height: 16px;
            accent-color: var(--songs-accent);
        }

        .songs-panel {
            min-width: 0;
            padding: 18px;
        }

        .songs-list-bar {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            align-items: center;
            min-height: 48px;
            padding: 6px 0 16px;
            border-bottom: 1px solid var(--app-line);
        }

        .songs-list-meta {
            color: var(--app-muted);
            font-weight: 750;
        }

        .icon-action,
        .song-card-action {
            display: inline-grid;
            place-items: center;
            width: 42px;
            height: 42px;
            min-height: 42px;
            margin: 0 !important;
            padding: 0 !important;
            border-radius: 50%;
            border: 1px solid var(--songs-line);
            background: var(--songs-accent-soft);
            color: var(--songs-accent-strong);
            line-height: 1;
            text-align: center;
        }

        .icon-action.primary {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .icon-action svg,
        .song-card-action svg {
            width: 21px;
            height: 21px;
            margin: 0;
            fill: none;
            stroke: currentColor;
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke-width: 2.4;
        }

        .song-card-action img {
            width: 22px;
            height: 22px;
            object-fit: contain;
            filter: brightness(0) invert(1);
            pointer-events: none;
        }

        .song-card-action svg .icon-fill {
            fill: currentColor;
            stroke: none;
        }

        .alphabet-filter {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 16px 0;
        }

        .alphabet-filter button {
            display: grid;
            place-items: center;
            width: 32px;
            height: 32px;
            min-height: 32px;
            margin: 0 !important;
            padding: 0 !important;
            border-radius: 10px;
            border: 1px solid transparent;
            background: transparent;
            color: var(--app-muted);
            font-size: 13px;
            font-weight: 850;
            line-height: 1;
            text-align: center;
        }

        .alphabet-filter button.alphabet-reset,
        .alphabet-filter button.alphabet-number {
            width: 42px;
        }

        .alphabet-filter button.available {
            border-color: var(--songs-line);
            background: var(--app-surface-strong);
            color: var(--app-text);
        }

        .alphabet-filter button.active {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .alphabet-filter button:disabled {
            cursor: default;
            opacity: 0.34;
        }

        .songs-list {
            display: grid;
            gap: 12px;
        }

        .song-item {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 16px;
            align-items: center;
            margin: 0;
            padding: 16px 16px 16px 18px;
            border: 1px solid var(--app-line);
            border-left: 5px solid var(--songs-accent);
            border-radius: var(--app-radius-md);
            background:
                linear-gradient(135deg, color-mix(in srgb, var(--songs-accent) 10%, transparent), transparent 38%),
                var(--app-surface-strong);
            color: var(--app-text);
            cursor: pointer;
            transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
        }

        .song-item:hover,
        .song-item:focus-within {
            transform: translateY(-1px);
            border-color: var(--songs-accent);
            box-shadow: 0 14px 30px color-mix(in srgb, var(--songs-accent) 18%, transparent);
        }

        .song-item.is-metronome-active {
            border-color: var(--songs-accent);
            box-shadow: 0 0 0 2px color-mix(in srgb, var(--songs-accent) 26%, transparent);
        }

        .song-item.is-metronome-beat {
            background:
                linear-gradient(135deg, color-mix(in srgb, var(--songs-accent) 42%, transparent), color-mix(in srgb, var(--songs-accent) 16%, transparent) 48%, transparent 84%),
                var(--app-surface-strong);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--songs-accent) 38%, transparent), 0 18px 36px color-mix(in srgb, var(--songs-accent) 22%, transparent);
        }

        .song-card-title {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
            align-items: baseline;
            font-size: 17px;
            font-weight: 850;
        }

        .song-card-title-separator,
        .song-card-artist {
            color: var(--app-muted);
        }

        .song-card-artist {
            font-weight: 400;
        }

        .song-card-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0;
            margin-top: 7px;
            color: var(--app-muted);
            font-size: 13px;
            font-weight: 650;
        }

        .song-card-meta span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .song-card-meta span + span::before {
            margin: 0 9px;
            color: color-mix(in srgb, var(--app-muted) 58%, transparent);
            content: "|";
            font-weight: 650;
        }

        .song-card-meta .song-card-tags {
            color: var(--app-text);
            font-weight: 850;
        }

        .song-card-action {
            flex: 0 0 auto;
        }

        .song-card-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .song-card-action.is-active {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .song-card-action.is-playing {
            transform: scale(1.04);
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--songs-accent) 20%, transparent);
        }

        .song-card-action:disabled,
        .song-card-action.is-disabled {
            cursor: default;
            border-color: var(--app-line);
            background: color-mix(in srgb, var(--app-surface-strong) 78%, var(--app-line));
            color: color-mix(in srgb, var(--app-muted) 64%, transparent);
            opacity: 0.72;
        }

        .song-bpm-label-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .song-bpm-metronome-button {
            min-height: 28px !important;
            padding: 4px 12px !important;
            border-radius: 999px;
            border: 1px solid var(--songs-line);
            background: var(--app-surface);
            color: var(--songs-accent-strong);
            font-size: 12px;
            font-weight: 850;
            line-height: 1;
        }

        .song-bpm-metronome-button.is-playing,
        .song-bpm-metronome-target.is-metronome-beat .song-bpm-metronome-button {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .song-bpm-metronome-target.is-metronome-beat input {
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--songs-accent) 26%, transparent);
        }

        .songs-empty {
            padding: 28px;
            border: 1px dashed var(--songs-line);
            border-radius: var(--app-radius-md);
            color: var(--app-muted);
            text-align: center;
        }

        .songs-editor-panel {
            position: fixed;
            inset: 0;
            box-sizing: border-box;
            z-index: 1000;
            width: auto !important;
            max-width: none !important;
            margin: 0 !important;
            padding: 0 var(--songs-editor-x) 38px !important;
            overflow-y: auto;
            border: 0;
            border-radius: 0;
            background: var(--app-bg);
            box-shadow: none;
            --songs-head-sticky-size: 116px;
            --songs-head-gap: var(--app-section-gap);
        }

        body[data-auth-required="true"] .songs-editor-panel {
            border: 0;
            background: var(--app-bg);
            box-shadow: none;
        }

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

        .panel-head {
            position: sticky;
            top: 0;
            z-index: 2;
            display: flex;
            justify-content: space-between;
            gap: 16px;
            align-items: center;
            box-sizing: border-box;
            width: min(var(--songs-editor-content-max), calc(100vw - (var(--songs-editor-x) * 2)));
            margin: 24px auto 24px;
            padding: 18px 24px;
            border-radius: var(--app-radius-lg);
            border-bottom: 0;
            background: var(--module-page-accent, var(--songs-accent));
            box-shadow: var(--app-shadow-card);
            color: var(--module-page-on-accent, #ffffff);
            transition: padding 180ms ease, margin 180ms ease, min-height 180ms ease;
        }

        .songs-editor-panel .panel-head h2 {
            color: inherit;
            font-size: 26px;
            line-height: 1.05;
        }

        .songs-editor-panel .panel-head h2,
        .songs-editor-panel .panel-head .muted {
            color: var(--module-page-on-accent, #ffffff) !important;
        }

        .songs-editor-panel .panel-head .muted {
            margin-top: 10px;
            opacity: 0.82;
            max-height: 28px;
            overflow: hidden;
            transition: opacity 160ms ease, max-height 180ms ease, margin 180ms ease;
        }

        .songs-editor-panel .panel-head .icon-action {
            border-color: color-mix(in srgb, #ffffff 42%, transparent);
            background: color-mix(in srgb, #ffffff 14%, transparent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .songs-editor-panel > .editor-card,
        .songs-editor-panel > #songDetail,
        .songs-editor-panel > pre {
            box-sizing: border-box;
            width: min(var(--songs-editor-content-max), calc(100vw - (var(--songs-editor-x) * 2)));
            margin-left: auto;
            margin-right: auto;
        }

        .songs-editor-panel.is-scrolled {
            --songs-head-sticky-size: 72px;
        }

        .songs-editor-panel.is-scrolled .panel-head {
            margin-top: 12px;
            margin-bottom: var(--songs-head-gap);
            padding: 14px 20px;
            min-height: var(--songs-head-sticky-size);
        }

        .songs-editor-panel.is-scrolled .panel-head .muted {
            margin-top: 0;
            max-height: 0;
            opacity: 0;
        }

        .editor-card,
        .song-edit-main-card {
            box-sizing: border-box;
            width: 100%;
            padding: 18px;
            border: 1px solid var(--app-line);
            border-radius: var(--app-radius-lg);
            background: var(--app-surface);
            box-shadow: var(--app-shadow-soft);
        }

        .songs-close-dialog[hidden] {
            display: none;
        }

        .songs-close-dialog {
            position: fixed;
            inset: 0;
            z-index: 1300;
            display: grid;
            place-items: center;
            padding: 24px;
            background: rgba(8, 13, 20, 0.58);
        }

        .songs-close-card {
            width: min(520px, 100%);
            padding: 24px;
            border: 1px solid var(--app-line);
            border-radius: var(--app-radius-lg);
            background: var(--app-surface);
            color: var(--app-text);
            box-shadow: var(--app-shadow-strong);
        }

        .songs-close-card h2 {
            margin-bottom: 16px;
        }

        .songs-close-card p {
            color: var(--app-muted);
        }

        .chord-ambiguity-dialog {
            position: fixed;
            inset: 0;
            z-index: 1400;
            display: grid;
            place-items: center;
            padding: 24px;
            background: rgba(8, 13, 20, 0.58);
        }

        .chord-ambiguity-card {
            width: min(560px, 100%);
            padding: 24px;
            border: 1px solid color-mix(in srgb, var(--module-page-accent, var(--module-color-songs, #e35d6a)) 42%, var(--app-line));
            border-top: 8px solid var(--module-page-accent, var(--module-color-songs, #e35d6a));
            border-radius: var(--app-radius-lg);
            background: var(--app-surface);
            color: var(--app-text);
            box-shadow: var(--app-shadow-strong);
        }

        .chord-ambiguity-card h3 {
            margin: 0 0 10px;
            font-size: 24px;
        }

        .chord-ambiguity-card p {
            margin: 0 0 14px;
            color: var(--app-muted);
        }

        .chord-ambiguity-matches {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .chord-ambiguity-matches span {
            display: inline-flex;
            align-items: center;
            min-height: 30px;
            padding: 0 12px;
            border: 1px solid var(--app-line);
            border-radius: 999px;
            background: var(--app-soft);
            color: var(--app-text);
            font-weight: 850;
        }

        .chord-ambiguity-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 18px;
        }

        .chord-ambiguity-actions button {
            min-height: 42px;
            padding: 0 18px;
            border: 1px solid var(--app-line);
            border-radius: 999px;
            background: var(--app-surface);
            color: var(--app-text);
            font: inherit;
            font-weight: 850;
            cursor: pointer;
        }

        .chord-ambiguity-actions button:hover,
        .chord-ambiguity-actions button:focus-visible {
            border-color: var(--module-page-accent, var(--module-color-songs, #e35d6a));
            outline: none;
        }

        .chord-ambiguity-actions .primary {
            border-color: transparent;
            background: var(--module-page-accent, var(--module-color-songs, #e35d6a));
            color: var(--module-page-on-accent, var(--module-on-songs, #ffffff));
        }

        .song-delete-confirm-card {
            border-color: color-mix(in srgb, var(--app-danger) 62%, var(--app-line));
        }

        .song-delete-confirm-status {
            margin: 12px 0 0;
            color: var(--app-danger);
            font-size: 14px;
            font-weight: 850;
        }

        .song-delete-target--active {
            border-color: var(--app-danger) !important;
        }

        .panel-head-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .card {
            margin: 0;
            padding: 0;
            border: 0;
            background: transparent;
            box-shadow: none;
        }

        label {
            display: block;
            margin-top: 16px;
            color: var(--app-text);
            font-weight: 750;
        }

        [hidden] {
            display: none !important;
        }

        input,
        select,
        textarea {
            width: 100%;
            box-sizing: border-box;
            padding: 11px 13px;
            margin-top: 7px;
            border: 1px solid var(--app-line-strong);
            border-radius: 14px;
            background: var(--app-surface-strong);
            color: var(--app-text);
            font: inherit;
        }

        textarea {
            min-height: 140px;
            resize: vertical;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        }

        button {
            cursor: pointer;
        }

        pre {
            margin-top: 18px;
            padding: 16px;
            border: 1px solid var(--app-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            color: var(--app-text);
            white-space: pre-wrap;
            overflow-x: auto;
        }

        .version-item {
            margin-top: 14px;
            padding: 16px;
            border: 1px solid var(--app-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
        }

        .muted,
        .hint {
            color: var(--app-muted);
        }

        .hint {
            font-size: 13px;
            margin-top: 6px;
        }

        .badge {
            display: inline-flex;
            align-items: center;
            min-height: 22px;
            padding: 2px 8px;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            background: var(--songs-accent-soft);
            color: var(--songs-accent-strong);
            font-size: 12px;
            font-weight: 850;
        }

        .actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 14px;
        }

        .actions button,
        .panel-head button:not(.icon-action) {
            min-height: 42px;
            padding: 9px 16px;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            background: var(--app-surface-strong);
            color: var(--app-text);
            font: inherit;
            font-weight: 750;
        }

        .actions button[type="submit"],
        .actions button.primary,
        .panel-head button.primary {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        button.danger {
            border-color: color-mix(in srgb, var(--app-coral) 70%, var(--app-line));
            color: var(--app-coral);
        }

        button.secondary {
            background: var(--app-surface-strong);
        }

        .chord-tools {
            margin-top: 10px;
            padding: 0;
            border: 0;
            background: transparent;
        }

        .chord-tools[hidden] {
            display: none;
        }

        .chord-preview {
            max-height: 260px;
            margin-top: 12px;
            overflow: auto;
            border-color: var(--songs-line);
            font-size: 13px;
            line-height: 1.45;
        }

        .chord-preview[hidden] {
            display: none;
        }

        .rich-editor-shell {
            margin-top: 8px;
            overflow: visible;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 68%, transparent);
        }

        .rich-editor-bar {
            position: relative;
            display: grid;
            grid-template-columns: 1fr;
            gap: 6px;
            align-items: center;
            padding: 7px 8px;
            border-bottom: 1px solid color-mix(in srgb, var(--songs-accent) 22%, var(--songs-line));
            border-top-left-radius: calc(var(--app-radius-md) - 1px);
            border-top-right-radius: calc(var(--app-radius-md) - 1px);
            background:
                linear-gradient(135deg, color-mix(in srgb, var(--songs-accent) 16%, transparent), transparent 48%),
                color-mix(in srgb, var(--app-surface-strong) 92%, var(--songs-accent));
        }

        .rtf-toolbar {
            --rtf-tool-size: 38px;
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
            margin: 0;
        }

        .rtf-toolbar button {
            margin: 0;
            font-size: 12px;
        }

        .rtf-toolbar > button,
        .rtf-toolbar > .rtf-color-control > button,
        .rtf-toolbar > .rtf-mark-control > button,
        .rtf-toolbar > .rtf-snippet-control > button,
        .rtf-toolbar > .rtf-marker-control > button {
            display: inline-grid;
            place-items: center;
            flex: 0 0 var(--rtf-tool-size);
            width: var(--rtf-tool-size) !important;
            min-width: var(--rtf-tool-size) !important;
            max-width: var(--rtf-tool-size) !important;
            height: var(--rtf-tool-size) !important;
            min-height: var(--rtf-tool-size) !important;
            max-height: var(--rtf-tool-size) !important;
            padding: 0 !important;
            border-radius: 50% !important;
            font-size: 14px;
            font-weight: 900;
            line-height: 1;
            box-sizing: border-box;
        }

        .rtf-toolbar > button + button,
        .rtf-toolbar > button + .rtf-color-control,
        .rtf-toolbar > button + .rtf-mark-control,
        .rtf-toolbar > button + .rtf-snippet-control,
        .rtf-toolbar > .rtf-color-control + button,
        .rtf-toolbar > .rtf-mark-control + button,
        .rtf-toolbar > .rtf-snippet-control + button {
            margin-left: 0 !important;
        }

        .rtf-color-control {
            position: relative;
            display: inline-flex;
            flex: 0 0 var(--rtf-tool-size);
        }

        .rtf-mark-control {
            position: relative;
            display: inline-flex;
            flex: 0 0 var(--rtf-tool-size);
        }

        .rtf-marker-control {
            position: relative;
            display: inline-flex;
            flex: 0 0 var(--rtf-tool-size);
        }

        .rtf-snippet-control {
            position: relative;
            display: inline-flex;
            flex: 0 0 var(--rtf-tool-size);
        }

        .rich-transpose-control {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-height: var(--rtf-tool-size);
        }

        .rtf-toolbar > .rtf-snippet-control {
            margin-right: 22px;
        }

        .rtf-toolbar > .rtf-snippet-control::after {
            content: "";
            position: absolute;
            top: 7px;
            bottom: 7px;
            right: -14px;
            width: 1px;
            background: color-mix(in srgb, var(--songs-line) 62%, transparent);
            pointer-events: none;
        }

        .rtf-toolbar-separator {
            width: 1px;
            height: 24px;
            margin: 0 5px;
            background: color-mix(in srgb, var(--songs-line) 62%, transparent);
        }

        .rich-chordpro-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: var(--rtf-tool-size) !important;
            width: var(--rtf-tool-size) !important;
            height: var(--rtf-tool-size) !important;
            min-height: var(--rtf-tool-size) !important;
            max-height: var(--rtf-tool-size) !important;
            padding: 0 !important;
            border-radius: 50% !important;
            font-weight: 800 !important;
            line-height: 1;
            box-sizing: border-box;
        }

        .rich-chordpro-button svg {
            width: 19px;
            height: 19px;
            display: block;
        }

        .rtf-tool-icon,
        .rtf-toolbar > button svg,
        .rtf-toolbar > .rtf-color-control > button svg,
        .rtf-toolbar > .rtf-mark-control > button svg,
        .rtf-toolbar > .rtf-snippet-control > button svg {
            width: 19px;
            height: 19px;
            display: block;
        }

        .rich-chordpro-label {
            display: inline-flex;
            align-items: center;
            min-height: var(--rtf-tool-size);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0;
            color: color-mix(in srgb, var(--app-text) 76%, var(--app-muted));
        }

        .rich-transpose-button {
            display: inline-grid;
            place-items: center;
            flex: 0 0 var(--rtf-tool-size);
            width: var(--rtf-tool-size) !important;
            min-width: var(--rtf-tool-size) !important;
            max-width: var(--rtf-tool-size) !important;
            height: var(--rtf-tool-size) !important;
            min-height: var(--rtf-tool-size) !important;
            max-height: var(--rtf-tool-size) !important;
            padding: 0 !important;
            border-radius: 50% !important;
            font-size: 18px !important;
            font-weight: 900 !important;
            line-height: 1;
            box-sizing: border-box;
        }

        .rich-transpose-value {
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            min-width: 30px;
            min-height: var(--rtf-tool-size);
            color: var(--songs-accent);
            font-size: 15px;
            font-weight: 900;
            line-height: 1;
        }

        .rich-snippet-icon {
            display: block;
            font-size: 17px;
            font-weight: 950;
            line-height: 1;
        }

        .rtf-toolbar > [data-rich-action="source"] {
            flex: 0 0 auto;
            width: auto !important;
            min-width: auto !important;
            max-width: none !important;
            height: var(--rtf-tool-size) !important;
            min-height: var(--rtf-tool-size) !important;
            max-height: var(--rtf-tool-size) !important;
            margin-left: auto !important;
            padding: 0 2px !important;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            color: color-mix(in srgb, var(--songs-line) 75%, var(--app-muted));
            box-shadow: none !important;
            font-size: 14px;
            font-weight: 850;
        }

        .rtf-toolbar > [data-rich-action="source"]:hover {
            color: var(--songs-accent);
        }

        .rich-snippet-popover {
            position: absolute;
            top: calc(100% + 7px);
            left: 0;
            z-index: 28;
            display: grid;
            width: min(430px, calc(100vw - 48px));
            min-width: 280px;
            padding: 10px;
            gap: 10px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            box-shadow: 0 14px 34px color-mix(in srgb, var(--songs-accent) 16%, transparent);
        }

        .rich-snippet-popover[hidden] {
            display: none;
        }

        .rich-snippet-tabs {
            display: flex;
            gap: 6px;
        }

        .rich-snippet-tab {
            flex: 1;
            min-height: 32px;
            margin: 0 !important;
            padding: 6px 10px !important;
            border-radius: 999px;
            font-size: 12px;
        }

        .rich-snippet-tab.is-active {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .rich-snippet-panel {
            display: grid;
            gap: 9px;
        }

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

        .rich-snippet-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .rich-snippet-field {
            display: grid;
            gap: 4px;
        }

        .rich-snippet-field.full {
            grid-column: 1 / -1;
        }

        .rich-snippet-field span {
            color: var(--app-muted);
            font-size: 11px;
            font-weight: 800;
        }

        .rich-snippet-field select,
        .rich-snippet-field input,
        .rich-snippet-preview {
            width: 100%;
            min-height: 34px;
            padding: 7px 9px;
            border: 1px solid var(--songs-line);
            border-radius: 10px;
            background: var(--app-surface);
            color: var(--app-text);
            box-sizing: border-box;
            font: inherit;
            font-size: 13px;
        }

        .rich-snippet-preview {
            min-height: 68px;
            resize: vertical;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            line-height: 1.4;
        }

        .rich-snippet-actions {
            display: flex;
            gap: 8px;
            justify-content: flex-end;
            align-items: center;
        }

        .rich-snippet-actions button {
            min-height: 34px;
            margin: 0 !important;
            padding: 7px 12px !important;
            font-size: 12px;
        }

        @media (max-width: 640px) {
            .rich-snippet-grid {
                grid-template-columns: 1fr;
            }
        }

        .rich-color-button .color-letter {
            background: linear-gradient(135deg, #ef4444, #f59e0b 30%, #22c55e 56%, #38bdf8 76%, #a855f7);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            font-weight: 950;
        }

        .rich-color-popover {
            position: absolute;
            top: calc(100% + 7px);
            left: 0;
            z-index: 30;
            width: 258px;
            padding: 8px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            box-shadow: 0 18px 44px color-mix(in srgb, var(--songs-accent) 18%, transparent);
        }

        .rich-color-popover[hidden] {
            display: none;
        }

        .rich-color-label {
            display: block;
            margin: 0 2px 5px;
            color: var(--app-text);
            font-size: 12px;
            font-weight: 800;
            line-height: 1.2;
        }

        .rich-color-picker-row {
            position: relative;
            display: grid;
            width: 100%;
            min-height: 42px;
            place-items: center;
            overflow: hidden;
            margin: 0 0 10px;
            border: 1px solid color-mix(in srgb, #000000 16%, transparent);
            border-radius: 12px;
            background: var(--picker-color, #d9a441);
            box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 36%, transparent);
            cursor: pointer;
        }

        .rich-color-picker-row input[type="color"] {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            min-height: 0;
            padding: 0;
            border: 0;
            opacity: 0;
            cursor: pointer;
        }

        .rich-color-picker-row input[type="color" i]::-webkit-color-swatch-wrapper {
            padding: 0;
        }

        .rich-color-picker-row input[type="color" i]::-webkit-color-swatch {
            border: 0;
        }

        .rich-color-slots {
            display: grid;
            grid-template-columns: repeat(5, 34px);
            justify-content: space-between;
            gap: 8px 0;
            padding: 0 3px;
            margin: 0 0 9px;
        }

        .rich-color-slot {
            width: 34px;
            aspect-ratio: 1;
            min-height: 34px;
            padding: 0;
            border-radius: 9px;
            border: 1px solid color-mix(in srgb, var(--songs-line) 85%, transparent);
            background:
                linear-gradient(135deg, transparent 0 47%, color-mix(in srgb, var(--app-muted) 34%, transparent) 48% 52%, transparent 53%),
                var(--app-surface);
        }

        .rich-color-slot.is-filled {
            background: var(--slot-color);
        }

        .rich-color-slot.is-pressing {
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--songs-accent) 28%, transparent);
        }

        .rich-color-remove {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ffffff !important;
            color: #111827;
            font-size: 17px;
            font-weight: 950;
            line-height: 1;
        }

        .rich-color-hint {
            margin: 0 0 8px;
            color: var(--app-muted);
            font-size: 11px;
            line-height: 1.35;
        }

        .rich-color-apply {
            width: 100%;
            min-height: 30px;
            margin: 0;
            padding: 5px 10px;
            font-size: 12px;
        }

        .rich-mark-button svg {
            width: 18px;
            height: 18px;
            display: block;
        }

        .rich-mark-popover {
            position: absolute;
            top: calc(100% + 7px);
            left: 0;
            z-index: 29;
            display: flex;
            gap: 8px;
            align-items: center;
            padding: 8px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            box-shadow: 0 14px 34px color-mix(in srgb, var(--songs-accent) 16%, transparent);
        }

        .rich-mark-popover[hidden] {
            display: none;
        }

        .rich-mark-swatch {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            min-width: 28px;
            min-height: 28px;
            padding: 0 !important;
            border-radius: 999px;
            border: 1px solid color-mix(in srgb, var(--songs-line) 82%, transparent);
            background: var(--mark-color) !important;
            color: #111827;
            font-size: 15px;
            font-weight: 950;
            line-height: 28px;
            text-align: center;
        }

        .rich-mark-remove {
            background: #ffffff !important;
            color: #111827;
        }

        .rich-mark-swatch:hover,
        .rich-mark-swatch:focus-visible {
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--songs-accent) 22%, transparent);
        }

        .rich-marker-popover {
            position: absolute;
            top: calc(100% + 7px);
            left: 0;
            z-index: 31;
            display: grid;
            width: min(320px, 82vw);
            gap: 10px;
            padding: 12px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            box-shadow: 0 16px 38px color-mix(in srgb, var(--songs-accent) 18%, transparent);
        }

        .rich-marker-popover[hidden] {
            display: none;
        }

        .rich-marker-title,
        .rich-marker-empty {
            color: var(--app-muted);
            font-size: 12px;
            font-weight: 800;
        }

        .rich-marker-list {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
        }

        .rich-marker-option {
            width: auto !important;
            min-width: 0 !important;
            max-width: none !important;
            height: auto !important;
            min-height: 30px !important;
            max-height: none !important;
            padding: 6px 10px !important;
            border-radius: 999px !important;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 12px !important;
            white-space: nowrap;
        }

        .rich-marker-custom {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 8px;
            align-items: center;
        }

        .rich-marker-custom input {
            width: 100%;
            min-height: 34px;
            padding: 7px 10px;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            background: var(--app-surface);
            color: var(--app-text);
            font: inherit;
            font-size: 13px;
        }

        .rich-marker-custom button {
            width: auto !important;
            min-width: 0 !important;
            max-width: none !important;
            height: 34px !important;
            min-height: 34px !important;
            max-height: 34px !important;
            padding: 0 12px !important;
            border-radius: 999px !important;
            font-size: 12px !important;
        }

        .rich-editor-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            align-items: center;
        }

        .rich-editor-actions button {
            min-height: 30px;
            margin: 0;
            padding: 5px 10px;
            font-size: 12px;
        }

        .rich-editor-surface {
            min-height: 220px;
            padding: 14px;
            outline: 0;
            color: var(--app-text);
            font: inherit;
            font-weight: 400;
            line-height: 1.48;
            white-space: pre-wrap;
        }

        .rich-editor-surface:focus {
            box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--songs-accent) 42%, transparent);
        }

        .rich-editor-source {
            min-height: 220px;
            margin: 0;
            border: 0;
            border-radius: 0;
            box-shadow: none;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        }

        .rich-editor-source[hidden],
        .rich-editor-surface[hidden] {
            display: none;
        }

        .rtf-source-active {
            box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--songs-accent) 42%, transparent);
        }

        .upload-field {
            margin-top: 16px;
        }

        .upload-label {
            display: block;
            margin-bottom: 8px;
            color: var(--app-text);
            font-weight: 750;
        }

        .upload-dropzone {
            display: grid;
            min-height: 150px;
            place-items: center;
            padding: 22px;
            border: 1px dashed color-mix(in srgb, var(--songs-accent) 58%, var(--app-line));
            border-radius: var(--app-radius-lg);
            background:
                linear-gradient(135deg, color-mix(in srgb, var(--songs-accent) 8%, transparent), transparent 46%),
                var(--app-surface-strong);
            color: var(--app-text);
            text-align: center;
            transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
        }

        .upload-dropzone.is-dragover {
            border-color: var(--songs-accent);
            background: color-mix(in srgb, var(--songs-accent) 14%, var(--app-surface-strong));
            box-shadow: 0 16px 34px color-mix(in srgb, var(--songs-accent) 18%, transparent);
        }

        .upload-dropzone strong {
            display: block;
            margin-bottom: 6px;
            font-size: 17px;
        }

        .upload-dropzone p {
            max-width: 520px;
            margin: 0;
            color: var(--app-muted);
            line-height: 1.45;
        }

        .upload-link {
            display: inline;
            min-height: 0;
            margin: 0;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            color: var(--songs-accent);
            cursor: pointer;
            font: inherit;
            font-weight: 850;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        .upload-file-name {
            margin-top: 10px;
            color: var(--app-muted);
            font-size: 13px;
            font-weight: 750;
        }

        .upload-input {
            position: absolute;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
        }

        .edit-box {
            margin-top: 14px;
            padding: 16px;
            border: 1px dashed var(--songs-line);
            border-radius: var(--app-radius-md);
            background: color-mix(in srgb, var(--app-surface-strong) 88%, var(--songs-accent) 12%);
        }

        .song-edit-layout {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
            gap: var(--app-section-gap);
            align-items: start;
        }

        .song-edit-menu {
            position: sticky;
            top: calc(var(--songs-head-sticky-size) + var(--songs-head-gap));
            display: grid;
            gap: 10px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .version-switch {
            margin-bottom: 16px;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

        .song-edit-menu button {
            min-height: 44px;
            width: 100%;
            justify-content: center;
            margin-left: 0 !important;
        }

        .song-edit-menu-divider {
            height: 1px;
            margin: 6px 0;
            background: var(--songs-line);
        }

        .song-edit-main {
            display: grid;
            gap: 16px;
            min-width: 0;
            width: 100%;
        }

        .song-edit-section {
            scroll-margin-top: 130px;
        }

        .song-edit-section h3 {
            margin: 0 0 12px;
            color: var(--app-text);
        }

        .song-edit-placeholder {
            margin: 0;
            color: var(--app-muted);
        }

        .bpm-ms-output {
            display: block;
            margin-top: 6px;
            color: var(--app-muted);
            font-size: 12px;
            font-weight: 700;
            line-height: 1.35;
        }

        .song-links-editor {
            display: grid;
            gap: 14px;
        }

        .song-links-list {
            display: grid;
            gap: 10px;
        }

        .song-link-row {
            display: grid;
            grid-template-columns: minmax(120px, 1fr) minmax(110px, 0.7fr) minmax(220px, 1.5fr) auto auto;
            gap: 10px;
            align-items: center;
            padding: 10px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-soft);
        }

        .song-link-row input {
            min-width: 0;
        }

        .song-link-open {
            display: inline-grid;
            min-height: 42px;
            padding: 0 14px;
            place-items: center;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            color: var(--songs-accent);
            font-weight: 900;
            text-decoration: none;
            white-space: nowrap;
        }

        .song-link-open.is-disabled {
            color: var(--app-muted);
            opacity: 0.55;
            pointer-events: none;
        }

        .song-link-row .danger {
            width: 44px;
            height: 44px;
            padding: 0;
            display: inline-grid;
            place-items: center;
            border-radius: 999px;
        }

        @media (max-width: 760px) {
            .song-link-row {
                grid-template-columns: 1fr;
            }

            .song-link-row .danger {
                justify-self: end;
            }

            .song-link-open {
                justify-self: start;
            }
        }

        .songs-action-modal[hidden] {
            display: none;
        }

        .songs-action-modal {
            position: fixed;
            inset: 0;
            z-index: 1400;
            display: grid;
            place-items: center;
            padding: 24px;
            background: rgba(8, 13, 20, 0.58);
        }

        .songs-action-card {
            width: min(980px, 100%);
            max-height: min(86vh, 900px);
            overflow: auto;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-lg);
            background: var(--app-surface);
            box-shadow: var(--app-shadow-strong);
        }

        .songs-action-card.is-song-pdf-card {
            width: min(1320px, calc(100vw - 32px));
            max-height: min(90vh, 940px);
        }

        .songs-action-head {
            position: sticky;
            top: 0;
            z-index: 1;
            display: flex;
            justify-content: space-between;
            gap: 16px;
            align-items: center;
            padding: 16px 18px;
            border-bottom: 1px solid var(--songs-line);
            background: var(--module-page-accent, var(--songs-accent));
            color: var(--module-page-on-accent, #ffffff);
        }

        .songs-action-head h3 {
            margin: 0;
            color: var(--module-page-on-accent, #ffffff) !important;
        }

        #songActionModalTitle {
            color: var(--module-page-on-accent, #ffffff) !important;
        }

        .songs-action-body {
            padding: 18px;
        }

        .songs-action-card.is-song-pdf-card .songs-action-body {
            padding: 12px;
        }

        .song-pdf-export {
            display: grid;
            grid-template-columns: minmax(300px, 0.72fr) minmax(420px, 1.28fr);
            gap: 14px;
            align-items: start;
        }

        .song-pdf-settings,
        .song-pdf-preview-card {
            display: grid;
            gap: 10px;
            padding: 12px;
            border: 0;
            border-radius: 0;
            background: var(--app-surface-strong);
        }

        .song-pdf-option-grid,
        .song-pdf-check-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 6px 10px;
        }

        .song-pdf-fieldset {
            display: grid;
            gap: 7px;
        }

        .song-pdf-fieldset > strong,
        .song-pdf-preview-head > strong {
            color: var(--app-text);
            font-size: 15px;
            font-weight: 900;
        }

        .song-pdf-check {
            display: flex;
            align-items: center;
            gap: 7px;
            min-height: 28px;
            padding: 2px 4px;
            border: 0;
            border-radius: 0;
            background: transparent;
            color: var(--app-text);
            font-size: 13px;
            font-weight: 800;
        }

        .song-pdf-check.is-locked {
            color: var(--app-muted);
            background: transparent;
        }

        .song-pdf-check input {
            width: 16px;
            height: 16px;
            accent-color: var(--songs-accent);
        }

        .song-pdf-control-row {
            display: grid;
            grid-template-columns: 1fr;
            gap: 7px;
            align-items: center;
        }

        .song-pdf-radio-group {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 8px;
            min-height: 30px;
            padding: 2px 4px;
            border: 0;
            border-radius: 0;
            background: transparent;
            font-size: 13px;
            font-weight: 800;
        }

        .song-pdf-radio-group > span {
            color: var(--app-muted);
            font-size: 12px;
            font-weight: 900;
        }

        .song-pdf-radio-group input {
            accent-color: var(--songs-accent);
        }

        .song-pdf-font-control,
        .song-pdf-select-control {
            display: grid;
            grid-template-columns: 94px minmax(100px, 1fr) auto;
            gap: 8px;
            align-items: center;
            min-height: 30px;
            padding: 2px 4px;
            border: 0;
            border-radius: 0;
            background: transparent;
            font-size: 12px;
            font-weight: 900;
        }

        .song-pdf-font-control > span,
        .song-pdf-select-control > span {
            color: var(--app-text);
            white-space: nowrap;
        }

        .song-pdf-font-control input {
            accent-color: var(--songs-accent);
        }

        .song-pdf-select-control {
            grid-template-columns: 94px minmax(120px, 1fr);
        }

        .song-pdf-select-control select {
            width: 100%;
            min-height: 34px;
            padding: 6px 10px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-pill);
            background: var(--app-surface);
            color: var(--app-text);
            font: inherit;
        }

        .song-pdf-preview-head {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: center;
            padding-bottom: 2px;
            border-bottom: 0;
        }

        .song-pdf-preview-head span {
            color: var(--app-muted);
            font-size: 12px;
            font-weight: 800;
        }

        .song-pdf-preview {
            height: min(72vh, 760px);
            overflow-y: auto;
            overflow-x: hidden;
            padding: 12px;
            border: 0;
            border-radius: 0;
            background: #f6f8fb;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .song-pdf-preview::-webkit-scrollbar {
            width: 0;
            height: 0;
            display: none;
        }

        .song-pdf-preview-canvas {
            position: relative;
            margin: 0 auto;
        }

        .song-pdf-page {
            position: relative;
            box-sizing: border-box;
            width: var(--song-pdf-page-width, 210mm);
            min-height: var(--song-pdf-page-height, 297mm);
            margin: 0 auto;
            overflow: visible;
            background: #ffffff;
            box-shadow:
                0 1px 2px rgba(15, 23, 42, 0.1),
                0 14px 32px rgba(15, 23, 42, 0.18);
        }

        .song-pdf-preview .song-pdf-page {
            position: absolute;
            min-height: var(--song-pdf-page-height, 297mm);
            height: var(--song-pdf-page-height, 297mm);
            transform: scale(var(--song-pdf-preview-scale, 1));
            transform-origin: top left;
            background: #ffffff;
            outline: 1px solid rgba(15, 23, 42, 0.06);
        }

        .song-pdf-preview .song-pdf-page::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            z-index: 3;
            width: 20px;
            height: 20px;
            background:
                linear-gradient(135deg, #e7ebf1 0 48%, rgba(255, 255, 255, 0) 50%),
                linear-gradient(135deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0));
            clip-path: polygon(0 0, 100% 0, 0 100%);
            pointer-events: none;
        }

        .song-pdf-preview .song-pdf-page::after {
            content: "";
            position: absolute;
            top: 0;
            right: -9px;
            bottom: 0;
            z-index: -1;
            width: 9px;
            background: linear-gradient(90deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0));
            pointer-events: none;
        }

        .song-pdf-document {
            box-sizing: border-box;
            width: 100%;
            max-width: none;
            min-height: var(--song-pdf-page-height, 297mm);
            margin: 0;
            padding: var(--song-pdf-page-margin, 1.2cm);
            overflow: visible;
        }

        .song-pdf-document,
        .song-pdf-document * {
            color: #000000 !important;
        }

        .song-pdf-document {
            border: 0 !important;
            border-radius: 0 !important;
            background: #ffffff;
            box-shadow: none !important;
            font-family: Arial, Helvetica, sans-serif;
        }

        .song-pdf-document-head {
            margin: 0 0 12px;
            padding: 0 0 8px;
            border: 0 !important;
            border-bottom: 1px solid #000000 !important;
            border-radius: 0 !important;
            background: #ffffff !important;
            box-shadow: none !important;
        }

        .song-pdf-main {
            border: 0 !important;
            border-radius: 0 !important;
            background: #ffffff !important;
            box-shadow: none !important;
        }

        .song-pdf-page-break-marker {
            position: absolute;
            left: 0;
            right: 0;
            z-index: 2;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 22px;
            transform: translateY(-11px);
            border-top: 1px dashed color-mix(in srgb, var(--songs-accent) 48%, transparent);
            border-bottom: 1px dashed color-mix(in srgb, var(--songs-accent) 26%, transparent);
            background: color-mix(in srgb, var(--app-bg) 88%, #ffffff);
            color: var(--songs-accent);
            font-size: 10px;
            font-weight: 900;
            letter-spacing: 0;
            pointer-events: none;
        }

        .song-pdf-page-break-marker span {
            padding: 0 10px;
            background: #ffffff;
            border: 0;
            border-radius: 0;
            box-shadow: none;
        }

        .song-pdf-document h1 {
            margin: 0;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            color: #000000;
            font-size: 22px;
            line-height: 1.16;
        }

        .song-pdf-document h1 span {
            margin-left: 10px;
            font-size: 0.72em;
            font-weight: 650;
        }

        .song-pdf-meta {
            margin: 6px 0 0;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            font-size: 11px;
            font-weight: 800;
            line-height: 1.35;
        }

        .song-pdf-main {
            font-size: var(--song-pdf-font-size, 14px);
            line-height: 1.28;
        }

        .song-pdf-columns-2 .song-pdf-main {
            column-count: 2;
            column-gap: var(--song-pdf-column-gap, 1cm);
        }

        .song-pdf-chordpro,
        .song-pdf-chordpro .chordpro-block,
        .song-pdf-chordpro .chordpro-line,
        .song-pdf-chordpro .chord-row,
        .song-pdf-chordpro .lyric-row {
            padding: 0 !important;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .song-pdf-preview .song-pdf-document,
        .song-pdf-preview .song-pdf-document-head,
        .song-pdf-preview .song-pdf-main,
        .song-pdf-preview .song-pdf-chordpro,
        .song-pdf-preview .song-pdf-chordpro * {
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
        }

        .song-pdf-preview .song-pdf-document-head {
            border-bottom: 1px solid #000000 !important;
        }

        .song-pdf-chordpro .chordpro-block,
        .song-pdf-chordpro .chordpro-line {
            width: 100%;
        }

        .song-pdf-chordpro .chordpro-line {
            margin: 0 0 4px;
            break-inside: avoid;
            page-break-inside: avoid;
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
        }

        .song-pdf-chordpro .chord-row {
            min-height: 1.02em;
            overflow-wrap: anywhere;
            white-space: pre-wrap;
            font-size: 0.82em;
            font-weight: 900;
            line-height: 1.05;
        }

        .song-pdf-chordpro .lyric-row {
            overflow-wrap: anywhere;
            white-space: pre-wrap;
            font-size: 1em;
            line-height: 1.26;
        }

        .song-pdf-chordpro .chordpro-section {
            margin: 11px 0 5px;
            font-size: 0.88em;
            font-weight: 900;
            text-transform: uppercase;
            break-after: avoid;
        }

        .song-pdf-chordpro .chordpro-comment,
        .song-pdf-chordpro .chordpro-highlight-directive,
        .song-pdf-document-note,
        .song-pdf-empty {
            margin: 8px 0;
            font-size: 0.92em;
            font-weight: 800;
        }

        .song-pdf-chordpro mark {
            color: #000000 !important;
            background: transparent !important;
        }

        .song-pdf-image {
            display: block;
            max-width: 100%;
            max-height: 72vh;
            margin: 0 auto;
            object-fit: contain;
        }

        .song-pdf-file-frame {
            display: block;
            width: 100%;
            min-height: 520px;
            border: 1px solid #d5dce7;
            border-radius: var(--app-radius-md);
            background: #ffffff;
        }

        .song-pdf-status {
            min-height: 18px;
            margin: 0;
            color: var(--app-muted);
            font-size: 13px;
            font-weight: 800;
        }

        .song-pdf-actions {
            grid-column: 1 / -1;
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 10px;
        }

        .song-pdf-status {
            grid-column: 1 / -1;
        }

        @media (max-width: 980px) {
            .song-pdf-export {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 760px) {
            .song-pdf-option-grid,
            .song-pdf-check-grid,
            .song-pdf-control-row {
                grid-template-columns: 1fr;
            }

            .song-pdf-font-control {
                grid-template-columns: 1fr;
            }
        }

        .song-preview-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 0 0 14px;
            color: var(--app-muted);
            font-size: 13px;
            font-weight: 750;
        }

        .song-preview-text {
            max-height: 58vh;
            margin: 0;
            overflow: auto;
            color: var(--app-text);
            font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
            line-height: 1.55;
            white-space: pre-wrap;
        }

        .song-preview-live {
            max-height: 62vh;
            overflow: auto;
            padding: 4px 0;
        }

        .song-preview-live .song-content {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: clamp(17px, 1.8vw, 25px);
            line-height: 1.35;
            white-space: normal;
        }

        .song-preview-live .chordpro-block {
            width: 100%;
        }

        .song-preview-live .chordpro-line {
            margin: 0 0 0.25em;
        }

        .song-preview-live .chord-row,
        .song-preview-live .lyric-row {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            white-space: pre;
        }

        .song-preview-live .chord-row {
            min-height: 1.05em;
            color: var(--live-chord-color, var(--songs-accent));
            font-weight: 800;
            line-height: 1.05;
        }

        .song-preview-live .lyric-row {
            color: var(--app-text);
            line-height: 1.2;
        }

        .song-preview-live .chordpro-section,
        .song-preview-live .chordpro-comment,
        .song-preview-live .chordpro-highlight-directive,
        .song-preview-live .chordpro-standalone-chord,
        .song-preview-live .chordpro-image-directive {
            margin: 0.7em 0 0.35em;
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        }

        .song-preview-live .chordpro-section {
            color: var(--songs-accent);
            font-size: 0.8em;
            font-weight: 900;
            letter-spacing: 0;
            text-transform: uppercase;
        }

        .song-preview-live .chordpro-comment,
        .song-preview-live .chordpro-highlight-directive,
        .song-preview-live .chordpro-image-directive {
            display: inline-flex;
            max-width: 100%;
            padding: 0.28em 0.58em;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            background: var(--songs-accent-soft);
            color: var(--app-text);
            font-size: 0.74em;
            font-weight: 750;
        }

        .song-preview-live .chordpro-comment.italic {
            font-style: italic;
        }

        .song-preview-live .chordpro-comment.boxed,
        .song-preview-live .chordpro-highlight-directive {
            border-color: var(--songs-accent);
        }

        .song-preview-live .chordpro-standalone-chord {
            display: flex;
            gap: 0.45em;
            align-items: center;
            color: var(--live-chord-color, var(--songs-accent));
            font-weight: 900;
        }

        .song-preview-live .chord-shape-row {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45em;
            align-items: flex-end;
            margin: 0.1em 0 0.22em;
        }

        .song-preview-live .chord-shape {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.22em;
            min-height: 1.55em;
            padding: 0.22em 0.48em;
            border: 1px dashed var(--songs-line);
            border-radius: 12px;
            color: var(--app-muted);
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            font-size: 0.62em;
            font-weight: 850;
        }

        .song-preview-live .chord-shape-separator {
            min-width: auto;
            padding: 0 4px;
            border: 0;
            background: transparent;
            color: var(--app-text);
            font-size: 2.15rem;
            font-weight: 900;
            line-height: 1;
        }

        .song-preview-live .chord-shape-name {
            color: var(--live-chord-color, var(--songs-accent));
            font-size: 14px;
            font-weight: 900;
            line-height: 1;
        }

        .song-preview-live .guitar-diagram {
            width: 84px;
            height: auto;
            color: var(--app-text);
        }

        .song-preview-live .guitar-diagram line {
            stroke: currentColor;
            stroke-width: 1.2;
        }

        .song-preview-live .guitar-diagram .nut {
            stroke-width: 3;
        }

        .song-preview-live .guitar-diagram .diagram-title {
            fill: var(--live-chord-color, var(--songs-accent));
            font: 900 17px system-ui, sans-serif;
            text-anchor: middle;
        }

        .song-preview-live .guitar-diagram .fret-dot {
            fill: var(--live-chord-color, var(--songs-accent));
            stroke: none;
        }

        .song-preview-live .guitar-diagram .barre-line {
            stroke: var(--live-chord-color, var(--songs-accent));
            stroke-linecap: round;
            stroke-width: 10;
        }

        .song-preview-live .guitar-diagram .open-string {
            fill: none;
            stroke: currentColor;
            stroke-width: 1.5;
        }

        .song-preview-live .guitar-diagram .muted-string,
        .song-preview-live .guitar-diagram .base-fret {
            fill: var(--app-muted);
            font: 800 9px system-ui, sans-serif;
            text-anchor: middle;
        }

        .song-preview-live .guitar-diagram .finger-label {
            fill: #111827;
            font: 900 7px system-ui, sans-serif;
            text-anchor: middle;
        }

        .song-preview-live .keyboard-diagram {
            position: relative;
            display: block;
            width: 96px;
            height: 42px;
            overflow: hidden;
            border: 1px solid var(--songs-line);
            border-radius: 0 0 6px 6px;
            background: #ffffff;
        }

        .song-preview-live .piano-key {
            position: absolute;
            left: var(--key-left);
            top: 0;
            display: block;
            width: var(--key-width);
            padding: 0;
            border: 0;
            border-radius: 0;
            line-height: 1;
        }

        .song-preview-live .piano-key.white {
            z-index: 1;
            height: 42px;
            border-right: 1px solid color-mix(in srgb, #111827 22%, #ffffff);
            border-bottom: 1px solid color-mix(in srgb, #111827 22%, #ffffff);
            background: #ffffff;
        }

        .song-preview-live .piano-key.black {
            z-index: 2;
            align-self: start;
            height: 27px !important;
            border-radius: 0 0 2px 2px;
            background: #111827;
            border-right-color: transparent;
        }

        .song-preview-live .piano-key.active {
            border-color: var(--live-chord-color, var(--songs-accent));
            background: var(--live-chord-color, var(--songs-accent));
            box-shadow: none;
        }

        .song-preview-live .piano-key.root {
            box-shadow: none;
        }

        .song-preview-live .piano-key-separator {
            position: absolute;
            top: 0;
            bottom: 0;
            left: var(--separator-left);
            z-index: 4;
            width: 1px;
            transform: translateX(-0.5px);
            background: color-mix(in srgb, #111827 24%, #ffffff);
            pointer-events: none;
        }

        .song-preview-live .piano-key-separator.has-black {
            top: 27px;
        }

        .chord-display-toggle {
            display: inline-flex;
            gap: 6px;
            align-items: center;
            margin: 10px 0 14px;
            padding: 4px;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            background: var(--app-surface-strong);
        }

        .chord-display-toggle button {
            min-height: 30px;
            margin: 0 !important;
            padding: 5px 10px !important;
            border-radius: 999px;
            font-size: 12px;
        }

        .chord-display-toggle button.is-active {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .song-preview-live .lyric-highlight,
        .song-preview-text .lyric-highlight {
            border-radius: 0.22em;
            background: color-mix(in srgb, var(--live-chord-color, #d9a441) 34%, transparent);
            color: inherit;
        }

        .lyric-highlight.mark-yellow {
            background: rgba(255, 229, 125, 0.55);
        }

        .lyric-highlight.mark-green {
            background: rgba(158, 231, 179, 0.48);
        }

        .lyric-highlight.mark-blue {
            background: rgba(153, 213, 255, 0.48);
        }

        .lyric-highlight.mark-pink {
            background: rgba(255, 183, 213, 0.5);
        }

        .song-preview-live .chord-sync-marker,
        .song-preview-text .chord-sync-marker {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.15em;
            height: 1.15em;
            margin: 0 0.1em;
            border-radius: 999px;
            background: var(--live-chord-color, var(--songs-accent));
            color: #111827;
            font-size: 0.72em;
            font-weight: 900;
            vertical-align: 0.08em;
        }

        .song-preview-frame {
            display: block;
            width: 100%;
            height: min(68vh, 760px);
            border: 1px solid var(--app-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
        }

        .song-preview-loading,
        .song-preview-fallback {
            padding: 18px;
            border: 1px dashed var(--app-line-strong);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            color: var(--app-muted);
        }

        .song-preview-fallback a {
            display: inline-flex;
            margin-top: 10px;
            font-weight: 800;
        }

        .song-preview-image {
            display: block;
            max-width: 100%;
            max-height: 68vh;
            margin: 0 auto;
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
            object-fit: contain;
        }

        .audio-upload-form {
            display: grid;
            gap: 12px;
        }

        .audio-upload-head {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            margin-bottom: 12px;
        }

        .audio-upload-toggle svg {
            transition: transform 180ms ease;
        }

        .audio-upload-toggle[aria-expanded="true"] svg {
            transform: rotate(45deg);
        }

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

        .audio-list {
            display: grid;
            gap: 12px;
            margin-top: 18px;
        }

        .audio-item {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 12px;
            padding: 14px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface-strong);
        }

        .audio-item-head {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 12px;
            align-items: start;
        }

        .audio-item-actions {
            display: inline-flex;
            gap: 8px;
            align-items: center;
        }

        .audio-icon-button {
            display: inline-grid;
            width: 38px;
            height: 38px;
            place-items: center;
            box-sizing: border-box;
            margin: 0;
            padding: 0 !important;
            border: 1px solid var(--songs-line);
            border-radius: 50%;
            background: var(--app-surface);
            color: var(--songs-accent);
            font: inherit;
            line-height: 0;
            text-decoration: none;
        }

        .audio-icon-button:hover {
            border-color: var(--songs-accent);
            background: var(--songs-accent-soft);
        }

        .audio-icon-button svg {
            width: 18px;
            height: 18px;
            display: block;
            margin: 0;
        }

        .audio-marker-toggle svg {
            width: 20px;
            height: 20px;
        }

        .audio-marker-toggle.is-active {
            border-color: var(--songs-accent);
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
        }

        .audio-item strong,
        .audio-item small {
            display: block;
        }

        .audio-item small {
            margin-top: 4px;
            color: var(--app-muted);
            font-size: 12px;
            font-weight: 700;
        }

        .audio-item audio[data-audio-player] {
            display: none;
        }

        .audio-sync-zone {
            --audio-left-lane: 18%;
            --audio-track-lane: 77%;
            --audio-right-lane: 5%;
            position: relative;
            display: grid;
            gap: 4px;
        }

        .audio-sync-guide {
            position: absolute;
            left: 0;
            top: 0;
            z-index: 3;
            width: 2px;
            height: 0;
            transform: translateX(-50%);
            border-radius: 999px;
            background: color-mix(in srgb, var(--songs-accent) 76%, #ffffff);
            box-shadow: 0 0 0 1px color-mix(in srgb, #ffffff 60%, transparent);
            opacity: 0;
            pointer-events: none;
        }

        .audio-sync-guide.is-visible {
            opacity: 1;
        }

        .audio-sync-zone:not(.is-marker-open) .audio-sync-guide {
            display: none;
        }

        .audio-sync-zone:not(.is-marker-open) .audio-marker-panel {
            display: none;
        }

        .audio-player-shell,
        .audio-marker-track-wrap {
            display: grid;
            grid-template-columns: var(--audio-left-lane) var(--audio-track-lane) var(--audio-right-lane);
            gap: 0;
            align-items: center;
        }

        .audio-player-shell {
            min-height: 54px;
            margin-top: 10px;
            padding: 0;
            border-radius: 999px;
            background: color-mix(in srgb, var(--app-surface) 88%, var(--songs-accent-soft));
            box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 70%, transparent);
        }

        .audio-player-left {
            display: inline-flex;
            gap: 5px;
            align-items: center;
            min-width: 0;
            padding-left: 8px;
        }

        .audio-player-play,
        .audio-player-mute {
            display: inline-grid;
            flex: 0 0 36px;
            width: 36px;
            height: 36px;
            place-items: center;
            padding: 0 !important;
            border: 0 !important;
            border-radius: 0 !important;
            outline: 0;
            background: transparent !important;
            box-shadow: none !important;
            color: var(--app-text);
            cursor: pointer;
            line-height: 0;
            appearance: none;
            -webkit-appearance: none;
        }

        .audio-player-play {
            flex-basis: 54px;
            width: 54px;
            height: 54px;
        }

        .audio-player-play:hover,
        .audio-player-mute:hover {
            color: var(--songs-accent);
            background: transparent;
        }

        .audio-player-play svg,
        .audio-player-mute svg {
            width: 21px;
            height: 21px;
            display: block;
        }

        .audio-player-play svg {
            width: 30px;
            height: 30px;
        }

        .audio-player-time {
            overflow: hidden;
            color: var(--app-text);
            font-size: 13px;
            font-weight: 750;
            letter-spacing: 0;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .audio-player-track {
            position: relative;
            height: 32px;
            cursor: pointer;
            border-radius: 999px;
        }

        .audio-player-track::before,
        .audio-player-buffered,
        .audio-player-fill {
            content: "";
            position: absolute;
            top: 13px;
            left: 0;
            height: 6px;
            border-radius: 999px;
        }

        .audio-player-track::before {
            right: 0;
            background: color-mix(in srgb, var(--app-muted) 28%, transparent);
        }

        .audio-player-buffered {
            width: 0%;
            background: color-mix(in srgb, var(--songs-accent) 18%, transparent);
        }

        .audio-player-fill {
            width: 0%;
            background: var(--app-text);
        }

        .audio-player-thumb {
            position: absolute;
            top: 8px;
            left: 0%;
            z-index: 4;
            width: 16px;
            height: 16px;
            transform: translateX(-50%);
            border: 2px solid #111827;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: 0 1px 4px rgba(17, 24, 39, 0.35);
            pointer-events: none;
        }

        .audio-player-volume {
            position: relative;
            display: inline-grid;
            justify-content: center;
            padding-right: 8px;
        }

        .audio-volume-popover {
            position: absolute;
            right: 4px;
            top: calc(100% - 2px);
            bottom: auto;
            z-index: 25;
            display: grid;
            grid-template-columns: auto minmax(90px, 128px);
            gap: 8px;
            align-items: center;
            width: max-content;
            padding: 5px 4px;
            border: 0;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .audio-volume-popover[hidden] {
            display: none;
        }

        .audio-volume-mute {
            display: inline-grid;
            width: 32px;
            height: 32px;
            place-items: center;
            padding: 0 !important;
            border: 0 !important;
            border-radius: 0 !important;
            outline: 0;
            background: transparent !important;
            box-shadow: none !important;
            color: var(--app-text);
            line-height: 0;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }

        .audio-volume-mute svg {
            width: 19px;
            height: 19px;
            display: block;
        }

        .audio-volume-range {
            width: 118px;
            height: 24px;
            margin: 0;
            padding: 0;
            appearance: none;
            -webkit-appearance: none;
            background: transparent;
            --audio-volume-percent: 100%;
        }

        .audio-volume-range:focus {
            outline: none;
        }

        .audio-volume-range::-webkit-slider-runnable-track {
            width: 100%;
            height: 6px;
            border-radius: 999px;
            background:
                linear-gradient(
                    90deg,
                    var(--songs-accent) 0 var(--audio-volume-percent),
                    color-mix(in srgb, var(--app-muted) 28%, transparent) var(--audio-volume-percent) 100%
                );
        }

        .audio-volume-range::-webkit-slider-thumb {
            width: 16px;
            height: 16px;
            margin-top: -5px;
            border: 0;
            border-radius: 50%;
            background: var(--songs-accent);
            box-shadow: 0 1px 4px rgba(17, 24, 39, 0.25);
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }

        .audio-volume-range::-moz-range-track {
            width: 100%;
            height: 6px;
            border: 0;
            border-radius: 999px;
            background: color-mix(in srgb, var(--app-muted) 28%, transparent);
        }

        .audio-volume-range::-moz-range-progress {
            height: 6px;
            border-radius: 999px;
            background: var(--songs-accent);
        }

        .audio-volume-range::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border: 0;
            border-radius: 50%;
            background: var(--songs-accent);
            box-shadow: 0 1px 4px rgba(17, 24, 39, 0.25);
            cursor: pointer;
        }

        .audio-marker-panel {
            display: grid;
            gap: 8px;
            padding-top: 4px;
        }

        .audio-marker-track-wrap {
            position: relative;
            display: block;
            min-height: 74px;
            padding-top: 2px;
        }

        .audio-marker-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }

        .audio-marker-toolbar button {
            min-height: 34px;
            padding: 7px 12px;
            border: 0;
            border-radius: 999px;
            background: color-mix(in srgb, var(--songs-accent) 8%, var(--app-surface));
            color: var(--app-text);
            font: inherit;
            font-size: 12px;
            font-weight: 850;
        }

        .audio-marker-toolbar button.is-recording {
            background: color-mix(in srgb, var(--app-coral) 12%, var(--app-surface));
            color: var(--app-coral);
        }

        .audio-marker-panel button {
            border: 0 !important;
            outline: 0;
            box-shadow: none !important;
            appearance: none;
            -webkit-appearance: none;
        }

        .audio-marker-panel .danger,
        .audio-marker-panel button.danger,
        .audio-marker-panel .audio-marker-toolbar button,
        .audio-marker-panel .audio-marker-row button {
            border: 0 !important;
            box-shadow: none !important;
        }

        .audio-marker-timeline {
            position: relative;
            width: var(--audio-track-lane);
            margin-left: var(--audio-left-lane);
            height: 64px;
            border: 0;
            border-radius: 0;
            background: transparent;
            cursor: crosshair;
            overflow: visible;
        }

        .audio-marker-timeline::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 13px;
            height: 5px;
            border: 1px solid var(--songs-line);
            border-radius: 999px;
            background:
                linear-gradient(90deg, color-mix(in srgb, var(--songs-accent) 18%, transparent), transparent),
                var(--app-surface);
        }

        .audio-marker-tick {
            position: absolute;
            top: 7px;
            height: 18px;
            width: 3px;
            transform: translateX(-50%);
            border-radius: 999px;
            background: var(--songs-accent);
            box-shadow: 0 0 0 4px color-mix(in srgb, var(--songs-accent) 14%, transparent);
        }

        .audio-marker-tick.is-pending-jump {
            width: 5px;
            background: var(--app-coral);
            box-shadow: 0 0 0 6px color-mix(in srgb, var(--app-coral) 18%, transparent);
        }

        .audio-marker-playhead {
            position: absolute;
            top: 0;
            bottom: auto;
            left: 0;
            width: 0;
            height: 0;
            transform: translateX(-50%);
            border-radius: 999px;
            background: transparent;
            pointer-events: none;
            z-index: 4;
        }

        .audio-marker-playhead::before {
            content: "";
            position: absolute;
            top: 15.5px;
            left: 50%;
            width: 12px;
            height: 12px;
            transform: translate(-50%, -50%);
            border: 2px solid #111827;
            border-radius: 50%;
            background: #ffffff;
            box-shadow: 0 1px 4px rgba(17, 24, 39, 0.35);
        }

        .audio-marker-label {
            position: absolute;
            top: 29px;
            max-width: 72px;
            transform: translateX(-50%);
            overflow: hidden;
            color: var(--app-muted);
            font-size: 9px;
            font-weight: 850;
            line-height: 1.1;
            text-align: center;
            text-overflow: ellipsis;
            white-space: nowrap;
            pointer-events: none;
        }

        .audio-marker-tick.is-pending-jump + .audio-marker-label {
            color: var(--app-coral);
        }

        .audio-marker-label-toggle {
            position: absolute;
            left: 0;
            top: 0;
            justify-content: center;
            display: inline-flex;
            width: var(--audio-left-lane);
            gap: 7px;
            align-items: center;
            height: 32px;
            min-height: 32px;
            padding-top: 0;
            color: var(--app-muted);
            font-size: 10px;
            font-weight: 850;
            user-select: none;
        }

        .audio-marker-label-toggle input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        .audio-marker-label-switch {
            position: relative;
            width: 34px;
            height: 13px;
            border: 0;
            border-radius: 999px;
            background: color-mix(in srgb, var(--app-muted) 24%, transparent);
            transition: background 160ms ease;
        }

        .audio-marker-label-switch::before {
            content: "";
            position: absolute;
            top: 50%;
            left: 0;
            width: 15px;
            height: 15px;
            transform: translateY(-50%);
            border-radius: 50%;
            background: color-mix(in srgb, var(--app-muted) 72%, #ffffff);
            transition: transform 160ms ease, background 160ms ease;
        }

        .audio-marker-label-toggle input:checked + .audio-marker-label-switch {
            background: var(--songs-accent-soft);
        }

        .audio-marker-label-toggle input:checked + .audio-marker-label-switch::before {
            transform: translate(19px, -50%);
            background: var(--songs-accent);
        }

        .audio-marker-list {
            display: grid;
            gap: 8px;
        }

        .audio-marker-row {
            display: grid;
            grid-template-columns: minmax(105px, 0.38fr) minmax(140px, 1fr) auto;
            gap: 8px;
            align-items: center;
        }

        .audio-marker-row input {
            min-height: 34px;
            padding: 7px 10px;
            font-size: 13px;
        }

        .audio-marker-row button {
            min-height: 34px;
            padding: 7px 10px;
            border-radius: 999px;
        }

        .audio-marker-row.is-pending-jump input {
            border-color: var(--app-coral);
            color: var(--app-coral);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--app-coral) 12%, transparent);
        }

        .audio-marker-empty,
        .audio-marker-status {
            color: var(--app-muted);
            font-size: 12px;
            font-weight: 750;
        }

        .small-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .song-core-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 12px;
            align-items: start;
        }

        .song-core-grid label {
            margin-top: 0;
        }

        .song-info-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            min-height: 42px;
            margin-top: 16px;
            padding: 10px 16px;
            border: 0;
            border-radius: 999px;
            background: var(--songs-accent);
            color: var(--module-page-on-accent, #ffffff);
            font: inherit;
            font-weight: 850;
            box-shadow: 0 12px 24px color-mix(in srgb, var(--songs-accent) 18%, transparent);
        }

        .song-info-toggle::after {
            content: "+";
            display: inline-grid;
            width: 20px;
            height: 20px;
            place-items: center;
            border-radius: 999px;
            background: color-mix(in srgb, #ffffff 18%, transparent);
            font-size: 15px;
            line-height: 1;
        }

        .song-info-toggle[aria-expanded="true"]::after {
            content: "-";
        }

        .song-info-panel {
            margin-top: 12px;
            padding-top: 2px;
        }

        .song-tags-field,
        .song-singers-field {
            position: relative;
            display: grid;
            gap: 8px;
            margin-top: 7px;
        }

        .song-tags-input-row,
        .song-singers-input-row {
            position: relative;
        }

        .song-tags-suggestions,
        .song-singers-suggestions {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 6px);
            z-index: 20;
            display: grid;
            gap: 4px;
            padding: 8px;
            border: 1px solid var(--songs-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface);
            box-shadow: var(--app-shadow-soft);
        }

        .song-tags-suggestions button,
        .song-singers-suggestions button {
            min-height: 30px;
            margin: 0 !important;
            padding: 6px 9px;
            border: 0;
            border-radius: 9px;
            background: transparent;
            color: var(--app-text);
            font: inherit;
            font-size: 13px;
            font-weight: 750;
            text-align: left;
        }

        .song-tags-suggestions button:hover,
        .song-tags-suggestions button:focus-visible,
        .song-singers-suggestions button:hover,
        .song-singers-suggestions button:focus-visible {
            background: var(--songs-accent-soft);
            outline: 0;
        }

        .song-tags-list,
        .song-singers-list {
            display: flex;
            flex-wrap: wrap;
            gap: 7px;
            min-height: 30px;
        }

        .song-tag-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-height: 32px;
            padding: 5px 11px 5px 13px;
            border: 1px solid var(--app-line);
            border-radius: 999px;
            background: var(--app-surface);
            color: var(--app-text);
            font-size: 13px;
            font-weight: 850;
            box-shadow: none;
        }

        .song-tag-chip-label {
            min-width: 0;
            line-height: 1.1;
        }

        .song-tag-chip button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: auto !important;
            min-width: 0 !important;
            max-width: none !important;
            height: auto !important;
            min-height: 0 !important;
            max-height: none !important;
            margin: 0 !important;
            padding: 0 0 0 2px !important;
            border: 0 !important;
            border-radius: 0 !important;
            background: transparent !important;
            color: var(--app-muted);
            box-shadow: none !important;
            appearance: none;
            -webkit-appearance: none;
            font-size: 15px;
            font-weight: 950;
            line-height: 1;
            cursor: pointer;
            transition: color 140ms ease, transform 140ms ease;
        }

        .song-tag-chip button:hover,
        .song-tag-chip button:focus-visible {
            color: var(--songs-accent);
            outline: 0;
            transform: scale(1.08);
        }

        #editSongForm .rich-editor-surface,
        #editSongForm .rich-editor-source,
        #createSongForm .rich-editor-surface,
        #createSongForm .rich-editor-source,
        #editSongContent,
        #createSongContent {
            height: clamp(150px, 30vh, 240px);
            min-height: 150px;
        }

        #editSongForm .rich-editor-surface,
        #createSongForm .rich-editor-surface {
            overflow: auto;
        }

        .file-link {
            display: inline-block;
            margin-top: 8px;
            color: var(--songs-accent);
            font-weight: 750;
        }

        .embed-item {
            margin-top: 12px;
            padding: 12px;
            border: 1px solid var(--app-line);
            border-radius: var(--app-radius-md);
            background: var(--app-surface);
        }

        .embed-marker {
            display: inline-block;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            background: var(--songs-accent-soft);
            padding: 3px 7px;
            border-radius: 6px;
            margin-top: 6px;
        }

        .chord-embed-token {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 7px;
            border: 1px solid color-mix(in srgb, var(--songs-accent) 35%, var(--songs-line));
            border-radius: 999px;
            background: var(--songs-accent-soft);
            color: var(--songs-accent-strong);
            font-size: 0.88em;
            font-weight: 850;
            white-space: nowrap;
        }

        .chord-sync-marker {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            border: 1px solid color-mix(in srgb, var(--app-gold) 48%, var(--songs-line));
            border-radius: 999px;
            background: color-mix(in srgb, var(--app-gold) 20%, var(--app-surface));
            color: var(--app-text);
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 0.88em;
            font-weight: 850;
            white-space: nowrap;
        }

        .error-box {
            color: var(--app-coral);
            background: color-mix(in srgb, var(--app-coral) 8%, transparent);
            border: 1px solid color-mix(in srgb, var(--app-coral) 35%, var(--app-line));
            border-radius: var(--app-radius-md);
            padding: 12px;
            margin-top: 10px;
        }

        @media (max-width: 1120px) {
            .songs-shell {
                width: min(100%, calc(100vw - 36px));
            }

            .songs-layout {
                grid-template-columns: 1fr;
            }

            .songs-layout.is-sidebar-collapsed {
                grid-template-columns: 30px minmax(0, 1fr);
            }

            .songs-sidebar {
                position: sticky;
                top: 92px;
                display: grid;
                gap: 14px;
            }

            .songs-layout.is-sidebar-collapsed .songs-sidebar {
                display: block;
            }

            .song-edit-layout {
                grid-template-columns: 1fr;
            }

            .song-edit-menu {
                position: static;
                order: -1;
            }

            .songs-list-bar,
            .panel-head {
                gap: 12px;
            }

            .song-item {
                grid-template-columns: minmax(0, 1fr) auto;
            }

            .song-edit-menu {
                display: flex;
                flex-wrap: wrap;
                gap: 10px;
                align-items: center;
            }
        }

        @media (max-width: 820px) {
            .songs-shell {
                width: min(100%, calc(100vw - 28px));
            }

            .songs-hero {
                min-height: 0;
            }

            .songs-title {
                font-size: clamp(34px, 8vw, 44px);
            }

            .alphabet-filter {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
                gap: 8px;
            }

            .song-item {
                align-items: start;
                gap: 12px;
                padding: 14px;
            }

            .song-card-actions,
            .song-list-actions {
                justify-content: flex-start;
            }

            .song-editor-overlay,
            .song-editor-page,
            .song-editor-shell {
                width: 100%;
            }
        }

        @media (max-width: 680px) {
            .songs-hero,
            .songs-list-bar,
            .panel-head {
                align-items: flex-start;
                flex-direction: column;
            }

            .small-grid,
            .song-core-grid {
                grid-template-columns: 1fr;
            }

            .audio-item-head,
            .audio-marker-row {
                grid-template-columns: 1fr;
            }

            .audio-player-shell,
            .audio-marker-track-wrap {
                --audio-left-lane: 22%;
                --audio-track-lane: 70%;
                --audio-right-lane: 8%;
            }

            .audio-player-left {
                gap: 4px;
                padding-left: 8px;
            }

            .audio-player-time {
                font-size: 11px;
            }

            .audio-marker-label-toggle {
                font-size: 9px;
            }

            .audio-item-actions {
                justify-content: flex-start;
            }
        }

        @media (max-width: 520px) {
            .songs-shell {
                width: 100%;
            }

            .songs-sidebar,
            .songs-panel,
            .song-editor-card,
            .song-create-card,
            .song-edit-card {
                border-radius: 16px;
            }

            .song-item {
                grid-template-columns: 1fr;
            }

            .song-card-actions,
            .song-list-actions,
            .song-edit-menu {
                width: 100%;
                justify-content: flex-start;
            }

            .song-card-actions .icon-action,
            .song-list-actions .icon-action {
                width: 40px;
                height: 40px;
            }

            .rich-editor-toolbar {
                overflow-x: auto;
                padding-bottom: 8px;
            }

            .audio-player-shell,
            .audio-marker-track-wrap {
                --audio-left-lane: 28%;
                --audio-track-lane: 62%;
                --audio-right-lane: 10%;
            }
        }
