        html,
        body {
            background-color: var(--theme-bg-app);
        }

        .aside-history-marker {
            box-shadow: 0 0 0 3px var(--theme-surface-inset);
        }

        .home-up-next-accent {
            color: var(--theme-up-next);
        }

        .group:hover .home-up-next-accent {
            color: var(--theme-up-next-hover);
        }

        .up-next-accent {
            color: var(--theme-up-next);
        }

        .up-next-accent-emphasis,
        .up-next-hover-accent:hover {
            color: var(--theme-up-next-hover);
        }

        .theme-picker-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.75rem;
            max-width: 52rem;
        }

        .theme-option-card {
            min-width: 0;
            padding: 0.75rem;
            border: 1px solid var(--theme-border-default);
            border-radius: 0.75rem;
            background: var(--theme-surface-secondary);
            color: var(--theme-text-secondary);
            text-align: left;
            transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
        }

        .theme-option-card:hover {
            border-color: var(--theme-border-strong);
            background: var(--theme-surface-elevated);
        }

        .theme-option-card[aria-checked="true"] {
            border-color: var(--theme-accent);
            background: rgb(var(--theme-accent-rgb) / 0.08);
            box-shadow: 0 0 0 1px rgb(var(--theme-accent-rgb) / 0.25);
        }

        .theme-option-card:focus-visible {
            outline: 2px solid var(--theme-focus-ring);
            outline-offset: 2px;
        }

        .theme-option-preview {
            position: relative;
            height: 4.5rem;
            overflow: hidden;
            border: 1px solid var(--theme-preview-divider);
            border-radius: 0.55rem;
            background: var(--theme-preview-bg);
        }

        .theme-option-preview::before {
            position: absolute;
            inset: 0.65rem 0.65rem 0.65rem 1.9rem;
            border: 1px solid var(--theme-preview-divider);
            border-radius: 0.35rem;
            background: var(--theme-preview-surface);
            box-shadow: inset 0 -1.15rem 0 var(--theme-preview-secondary);
            content: "";
        }

        .theme-option-preview::after {
            position: absolute;
            top: 0.95rem;
            right: 0.95rem;
            width: 2.25rem;
            height: 0.35rem;
            border-radius: 999px;
            background: var(--theme-preview-accent);
            box-shadow:
                0 0.75rem 0 -0.08rem var(--theme-preview-text),
                -3.4rem 0.75rem 0 -0.08rem var(--theme-preview-muted);
            content: "";
        }

        .theme-option-preview-sidebar {
            position: absolute;
            inset: 0.45rem auto 0.45rem 0.45rem;
            width: 0.95rem;
            border-radius: 0.3rem;
            background: var(--theme-preview-secondary);
        }

        .theme-option-card[data-theme-option="classic"] {
            --theme-preview-bg: #030712;
            --theme-preview-surface: #111827;
            --theme-preview-secondary: #1f2937;
            --theme-preview-divider: #374151;
            --theme-preview-accent: #4d6db2;
            --theme-preview-text: #f3f4f6;
            --theme-preview-muted: #6b7280;
        }

        .theme-option-card[data-theme-option="cyan"] {
            --theme-preview-bg: #15191c;
            --theme-preview-surface: #1c2125;
            --theme-preview-secondary: #232a2f;
            --theme-preview-divider: #303941;
            --theme-preview-accent: #57bed5;
            --theme-preview-text: #f1f5f6;
            --theme-preview-muted: #707d83;
        }

        .theme-option-card[data-theme-option="cyan-light"] {
            --theme-preview-bg: #eceae4;
            --theme-preview-surface: #f6f4ef;
            --theme-preview-secondary: #e6e2d9;
            --theme-preview-divider: #d2ccc1;
            --theme-preview-accent: #19748a;
            --theme-preview-text: #182126;
            --theme-preview-muted: #89959b;
        }

        .theme-option-selected {
            color: var(--theme-accent-bright);
            opacity: 0;
        }

        .theme-option-card[aria-checked="true"] .theme-option-selected {
            opacity: 1;
        }

        html[data-theme="cyan"] .bg-navy-500.text-white,
        html[data-theme="cyan"] .bg-navy-600.text-white,
        html[data-theme="cyan-light"] .bg-navy-500.text-white,
        html[data-theme="cyan-light"] .bg-navy-600.text-white {
            color: var(--theme-accent-contrast) !important;
        }

        /* Cyan Light exceptions for legacy utilities that intentionally meant
           "bright on a dark surface" before a light theme existed. */
        html[data-theme="cyan-light"] :is(h1, h2, h3).text-white,
        html[data-theme="cyan-light"] :is(input, select, textarea).text-white,
        html[data-theme="cyan-light"] :is(.bg-gray-800, .bg-gray-900, .bg-gray-950).text-white,
        html[data-theme="cyan-light"] #stats-period-menu-trigger,
        html[data-theme="cyan-light"] .stats-lab-view div.text-white {
            color: var(--theme-text-primary) !important;
        }

        html[data-theme="cyan-light"] :is(.artist-card-wrapper, .public-profile-hero) :is(h1, h2, h3).text-white,
        html[data-theme="cyan-light"] :is(.bg-navy-500, .bg-navy-600, .bg-blue-600, .bg-green-600, .bg-green-700, .bg-red-500, .bg-red-600, .bg-red-700, .bg-purple-500, .bg-purple-600).text-white {
            color: var(--theme-absolute-white) !important;
        }

        html[data-theme="cyan-light"] .public-profile-hero .text-gray-400 {
            color: #d5dfe1 !important;
        }

        html[data-theme="cyan-light"] .public-profile-hero .text-gray-500 {
            color: #b7c6c9 !important;
        }

        html[data-theme="cyan-light"] .monthly-calendar-month.has-songs {
            color: #f8fafc;
        }

        html[data-theme="cyan-light"] .monthly-calendar-month.has-songs .monthly-calendar-month-count {
            color: #d5dfe1;
        }

        html[data-theme="cyan-light"] img[src*="b-side"] {
            box-sizing: border-box;
            padding: 0.2rem 0.4rem;
            border-radius: 0.45rem;
            background: #182126;
        }

        @media (max-width: 720px) {
            .theme-picker-grid {
                grid-template-columns: minmax(0, 1fr);
            }
        }

        :where(
            a,
            button,
            input,
            select,
            textarea,
            [role="button"],
            [role="link"],
            [role="tab"]
        ):focus-visible {
            outline: 2px solid var(--theme-focus-ring);
            outline-offset: 2px;
        }

        /* Desktop navigation replaces the old fixed sidebar without changing the mobile shell. */
        .desktop-nav-item {
            min-height: 2.5rem;
            padding: 0.55rem 0.7rem;
            border-radius: 0.5rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            color: var(--theme-text-secondary);
            font-size: 0.75rem;
            font-weight: 700;
            white-space: nowrap;
            transition: background-color 150ms ease, color 150ms ease;
        }

        .desktop-nav-item:hover {
            background: var(--theme-surface-secondary);
            color: var(--theme-focus-ring);
        }

        .desktop-nav-item i {
            width: 1rem;
            text-align: center;
            font-size: 0.75rem;
        }

        @media (min-width: 768px) and (max-width: 1023px) {
            .desktop-nav-item span {
                display: none;
            }

            .desktop-nav-item {
                width: 2.5rem;
                padding-inline: 0;
            }
        }

        @media (min-width: 768px) {
            .bside-desktop-shell,
            .bside-page-shell,
            #main-content > [class*="max-w-"] {
                width: calc(100% - 3rem);
                max-width: 1440px !important;
                margin-inline: auto;
                box-sizing: border-box;
            }

            #main-content > .stats-lab-view {
                max-width: 1600px !important;
            }

            #main-content > .rating-page-shell {
                max-width: 1600px !important;
                margin-inline: auto;
            }

            #main-content > .monthly-page-shell {
                margin-inline: auto;
            }

            .monthly-detail-page > .grid {
                width: 100%;
                min-width: 0;
            }

            .monthly-detail-page .monthly-song-panel,
            .monthly-detail-page #monthly-inspector {
                min-width: 0;
            }

        .rating-page-shell {
                width: calc(100% - 3rem);
                min-width: 0;
            }

            .rating-page-shell #rating-mobile-panels {
                width: 100%;
                min-width: 0;
            }

            .artist-profile-page > #view-scroller {
                padding-inline: 0;
            }

            .artist-profile-page > #view-scroller > * {
                width: calc(100% - 3rem);
                max-width: 1440px;
                margin-inline: auto;
                padding-inline: 2.5rem;
                box-sizing: border-box;
            }

            #artist-profile-hero > div.absolute.bottom-4 {
                left: max(1.5rem, calc((100% - 1440px) / 2 + 2.5rem));
            }

            #artist-profile-hero > button.absolute.top-4 {
                left: max(1.5rem, calc((100% - 1440px) / 2 + 2.5rem));
            }

            #artist-profile-hero > div.absolute.top-6 {
                right: max(1.5rem, calc((100% - 1440px) / 2 + 2.5rem));
            }

            #main-content:has(.stats-lab-view) {
                background: var(--theme-stats-page-background);
            }

            .stats-lab-view {
                background: transparent !important;
            }
        }

        @media (min-width: 1280px) {
            /* Keep Monthly's desktop scale aligned with A-Side without
               changing the mobile/tablet composition. */
            .monthly-detail-page > .grid {
                grid-template-columns: minmax(0, 1fr) 420px;
            }

            .monthly-detail-page .monthly-song-panel > .p-4 {
                padding: 1rem;
            }

            .monthly-detail-page .monthly-song-head,
            .monthly-detail-page .monthly-song-row {
                gap: 0.75rem;
            }

            .monthly-detail-page .monthly-song-row {
                min-height: 0;
                padding: 0.75rem;
            }

            .monthly-detail-page .monthly-song-row > :first-child > :first-child {
                width: 3rem;
                height: 3rem;
            }

            .monthly-detail-page .monthly-song-row > :nth-child(2),
            .monthly-detail-page .monthly-song-row > :nth-child(3) {
                font-size: 0.75rem;
                line-height: 1rem;
            }

            .monthly-detail-page .monthly-inspector {
                padding: 1.25rem;
            }

            .monthly-detail-page .monthly-inspector-actions button {
                min-height: 0;
                font-size: 0.75rem;
            }

            .monthly-detail-page .monthly-panel-link {
                font-size: 0.75rem;
            }

            #main-content:has(.rating-page-shell) {
                overflow-y: hidden;
            }

            #main-content > .rating-page-shell {
                max-width: 1440px !important;
                height: calc(100% - 1.5rem);
                min-height: 0;
                box-sizing: border-box;
            }

            #rating-tracks-panel > .rating-track-list-inner {
                width: 100%;
                max-width: none;
                margin-inline: 0;
                padding-top: 0.75rem;
                padding-inline: 0.75rem;
                box-sizing: border-box;
            }
        }

        /* Stats page visual system. */
        .stats-lab-view {
            --stats-lab-surface: var(--theme-stats-surface);
            --stats-lab-surface-deep: var(--theme-stats-surface-deep);
            --stats-lab-border: var(--theme-stats-border);
            --stats-lab-muted: var(--theme-stats-muted);
            background: var(--theme-stats-page-background);
        }

        .stats-lab-view .stats-lab-header {
            padding-bottom: 1.25rem;
            border-bottom: 1px solid var(--stats-lab-border);
        }

        .stats-lab-view .stats-lab-header h2 {
            color: var(--theme-text-heading);
            font-size: clamp(2rem, 3vw, 2.75rem);
            letter-spacing: -0.04em;
        }

        .stats-lab-view .stats-lab-header p,
        .stats-lab-view .stats-lab-all-time-heading p {
            color: var(--stats-lab-muted);
        }

        .stats-lab-view .stats-period-overview-section {
            padding: 1rem !important;
            border: 1px solid var(--stats-lab-border) !important;
            border-radius: 1rem;
            background: var(--theme-stats-overview-background) !important;
            box-shadow: 0 14px 34px rgb(var(--theme-shadow-color-rgb) / 0.12);
        }

        .stats-lab-view .stats-period-controls {
            padding-bottom: 0.85rem;
            border-bottom: 1px solid var(--theme-stats-divider);
        }

        .stats-lab-view .stats-period-controls>div,
        .stats-lab-view #stats-period-menu-trigger,
        .stats-lab-view #stats-period-menu {
            border-color: var(--stats-lab-border);
            background-color: var(--stats-lab-surface-deep);
        }

        .stats-lab-view section,
        .stats-lab-view article {
            border-color: var(--stats-lab-border);
            border-radius: 1rem;
        }

        .stats-lab-view .bg-gray-900 {
            background-color: var(--stats-lab-surface);
        }

        .stats-lab-view .bg-gray-950 {
            background-color: var(--stats-lab-surface-deep);
        }

        .stats-lab-view .stats-lab-all-time-heading {
            padding-top: 0.5rem;
        }

        .stats-lab-view .stats-lab-all-time-heading>.h-px {
            background: var(--stats-lab-border);
        }

        .stats-lab-view .stats-lab-all-time-grid {
            gap: 1rem;
            margin-top: 0 !important;
            padding: 0;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

        .stats-lab-view .stats-lab-period-secondary {
            display: none;
        }

        .stats-lab-view>.stats-period-overview-section {
            margin-bottom: 0 !important;
            border-bottom-left-radius: 0.65rem;
            border-bottom-right-radius: 0.65rem;
        }

        .stats-lab-view>.stats-lab-all-time-heading {
            margin-top: 1.5rem !important;
            padding: 0.75rem 0 2rem;
            border: 0;
            border-radius: 0;
            background: transparent;
        }

        .stats-lab-view>.stats-lab-all-time-heading h3 {
            font-size: 1.5rem;
            letter-spacing: -0.025em;
        }

        .stats-lab-view>.stats-lab-all-time-heading+.stats-lab-all-time-grid {
            margin-top: 0 !important;
        }

        .stats-lab-view .stats-lab-all-time-heading+.stats-lab-all-time-grid {
            margin-top: 1rem !important;
        }

        .stats-lab-view section h3,
        .stats-lab-view article h3 {
            letter-spacing: -0.015em;
        }

        .stats-lab-view .stats-lab-rating-habits {
            padding: 1.1rem !important;
            background: var(--theme-stats-habits-background) !important;
        }

        .stats-lab-view .stats-lab-rating-habits-heading {
            margin-bottom: 0.85rem !important;
        }

        .stats-lab-view .stats-lab-rating-habits-label {
            color: var(--theme-stats-habits-heading);
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.14em;
            line-height: 1;
            text-transform: uppercase;
        }

        .stats-lab-view .stats-lab-rating-habits>.grid {
            gap: 0.65rem;
        }

        .stats-lab-view .stats-lab-rating-habit-card {
            --stats-habit-accent: var(--theme-stats-card-blue);
            position: relative;
            min-height: 76px;
            padding: 0.75rem 0.7rem 0.65rem;
            overflow: hidden;
            border: 1px solid var(--theme-stats-habit-card-border);
            border-radius: 0.6rem;
            background: var(--theme-stats-habit-card-background);
        }

        .stats-lab-view .stats-lab-rating-habit-card::before {
            display: none;
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(1) {
            --stats-habit-accent: var(--theme-stats-card-blue);
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(2) {
            --stats-habit-accent: var(--theme-stats-card-green);
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(3) {
            --stats-habit-accent: var(--theme-stats-card-gold);
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(4) {
            --stats-habit-accent: var(--theme-stats-card-purple);
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(5) {
            --stats-habit-accent: var(--theme-stats-card-cyan);
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(6) {
            --stats-habit-accent: var(--theme-stats-card-blue);
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(7) {
            --stats-habit-accent: var(--theme-stats-card-cyan);
        }

        .stats-lab-view .stats-lab-rating-habit-card:nth-child(8) {
            --stats-habit-accent: var(--theme-stats-card-gold);
        }

        .stats-lab-view .stats-lab-rating-habit-value {
            color: var(--stats-habit-accent);
            font-size: 1.45rem;
            font-weight: 900;
            letter-spacing: -0.035em;
            line-height: 1.1;
        }

        .stats-lab-view .stats-lab-rating-habit-label {
            min-height: 1.9rem;
            margin-top: 0.35rem;
            color: var(--theme-stats-habit-card-label);
            font-size: 0.62rem;
            line-height: 1.25;
        }

        .stats-lab-view .stats-lab-all-time-grid {
            gap: 0.85rem;
        }

        .stats-lab-view .stats-lab-all-time-grid>.stats-lab-release-chart {
            min-height: 340px;
            padding: 1.1rem !important;
        }

        .stats-lab-view .stats-lab-release-chart-canvas {
            height: 285px;
        }

        .stats-lab-view .stats-lab-biggest-changes,
        .stats-lab-view .stats-lab-history,
        .stats-lab-view .stats-lab-score-stability,
        .stats-lab-view .stats-lab-perfect-scores,
        .stats-lab-view .stats-lab-project-types {
            padding: 1rem !important;
        }

        .stats-lab-view .stats-lab-perfect-tile {
            align-self: start;
            height: auto !important;
            min-height: 0 !important;
            padding: 1rem !important;
        }

        .stats-lab-view .stats-lab-perfect-tile>.flex:first-child {
            margin-bottom: 0.7rem !important;
        }

        .stats-lab-view .stats-lab-perfect-tile .stats-lab-perfect-podium {
            flex: none;
            gap: 0.55rem;
        }

        .stats-lab-view .stats-lab-perfect-tile .stats-lab-perfect-podium>button {
            height: 146px;
            min-height: 146px !important;
            padding: 0.5rem !important;
        }

        .stats-lab-view .stats-lab-perfect-tile .stats-lab-perfect-podium .w-12.h-12 {
            width: 3.35rem;
            height: 3.35rem;
            margin-bottom: 0.35rem;
        }

        .stats-lab-view .stats-lab-biggest-changes>.flex {
            margin-bottom: 0.65rem !important;
        }

        .stats-lab-view .stats-lab-score-change-panel>.grid:first-child {
            gap: 0.6rem;
            margin-bottom: 0.6rem !important;
        }

        .stats-lab-view .stats-lab-score-change-panel>.grid:first-child>button {
            min-height: 88px;
            padding: 0.65rem;
            border-radius: 0.65rem;
        }

        .stats-lab-view .stats-lab-score-change-panel>.grid:last-child {
            gap: 0.6rem;
        }

        .stats-lab-view .stats-lab-score-change-panel .stats-lab-change-row {
            min-height: 0;
            padding: 0.4rem 0.45rem;
            border-radius: 0.55rem;
        }

        .stats-lab-view .stats-lab-score-change-compact {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.8rem;
        }

        .stats-lab-view .stats-lab-score-change-compact .stats-lab-change-column {
            min-width: 0;
        }

        .stats-lab-view .stats-lab-score-change-compact .stats-lab-change-row-leading {
            border-color: rgb(var(--theme-success-bright-rgb) / 0.35);
            background: rgb(var(--theme-success-rgb) / 0.08);
        }

        .stats-lab-view .stats-lab-score-change-compact .stats-lab-change-column:last-child .stats-lab-change-row-leading {
            border-color: rgb(var(--theme-impression-love-rgb) / 0.35);
            background: var(--theme-stats-negative-surface);
        }

        .stats-lab-view .stats-lab-score-change-panel .text-3xl {
            font-size: 1.35rem;
        }

        .stats-lab-view .stats-lab-history .space-y-1 {
            max-height: none;
            overflow: visible;
        }

        .stats-lab-view .stats-lab-score-stability {
            height: 100% !important;
            min-height: 0 !important;
            padding: 0.8rem !important;
            justify-content: flex-start !important;
        }

        .stats-lab-view .stats-lab-score-stability>.mb-4 {
            margin-bottom: 0.45rem !important;
        }

        .stats-lab-view .stats-lab-score-stability>.mb-4 p {
            display: none;
        }

        .stats-lab-view .stats-lab-score-stability>.h-5 {
            height: 0.7rem;
        }

        .stats-lab-view .stats-lab-score-stability>.flex.justify-between {
            margin-top: 0.45rem !important;
            font-size: 0.58rem;
        }

        .stats-lab-view .stats-lab-direction-summary {
            display: grid;
            flex: 1;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.5rem;
            margin-top: 0.5rem;
            padding-top: 0.5rem;
            border-top: 1px solid var(--stats-lab-border);
        }

        .stats-lab-view .stats-lab-direction-metric {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 58px;
            padding: 0.45rem;
            border: 1px solid currentColor;
            border-radius: 0.7rem;
            background: rgb(var(--theme-surface-void-rgb) / 0.35);
            text-align: center;
        }

        .stats-lab-view .stats-lab-direction-metric i {
            margin-bottom: 0.15rem;
            font-size: 1rem;
        }

        .stats-lab-view .stats-lab-direction-metric strong {
            font-size: 1.35rem;
            font-weight: 950;
            line-height: 1;
        }

        .stats-lab-view .stats-lab-direction-metric span {
            margin-top: 0.2rem;
            color: var(--theme-text-subdued);
            font-size: 0.55rem;
            line-height: 1.25;
        }

        .stats-lab-view .stats-lab-project-types-chart {
            height: 182px !important;
        }

        .stats-lab-view .stats-lab-perfect-controls {
            min-height: 28px;
        }

        .stats-lab-view .stats-lab-perfect-controls>.flex {
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .stats-lab-view .stats-lab-perfect-podium {
            gap: 0.45rem;
        }

        .stats-lab-view .stats-lab-perfect-podium>button {
            min-height: 112px !important;
            padding: 0.45rem !important;
            border-radius: 0.65rem;
        }

        .stats-lab-view .stats-lab-perfect-podium>button .text-xs {
            font-size: 0.65rem;
        }

        .stats-lab-view .fa-chevron-right {
            display: none;
        }

        .stats-lab-section-hidden {
            display: none !important;
        }

        .stats-lab-view .stats-lab-section-switcher button {
            padding: 0.45rem 0.75rem;
            border: 0;
            border-radius: 0.4rem;
            color: var(--theme-stats-muted);
            font-size: 0.65rem;
            font-weight: 900;
        }

        .stats-lab-view .stats-lab-section-switcher button:hover {
            color: var(--theme-text-bright);
        }

        .stats-lab-view .stats-lab-section-switcher button.is-active {
            background: var(--theme-accent-bright);
            color: var(--theme-accent-contrast);
        }

        .stats-lab-view .stats-lab-header-actions {
            margin-right: 5.5rem;
        }

        @media (max-width: 767px) {
            .stats-lab-view {
                padding: 0.9rem !important;
            }

            .stats-lab-view .stats-lab-header {
                flex-direction: column;
                gap: 0.75rem;
                padding-bottom: 1rem;
            }

            .stats-lab-view .stats-lab-header> :last-child {
                align-self: flex-end;
            }

            .stats-lab-view .stats-lab-header-actions {
                width: 100%;
                justify-content: flex-end;
                margin-right: 0;
            }

            .stats-lab-view .stats-period-controls>div:first-child {
                width: 100%;
                display: flex;
            }

            .stats-lab-view .stats-period-controls>div:first-child button {
                flex: 1 1 0;
                text-align: center;
            }

            .stats-lab-view .stats-period-highlight-status {
                display: none;
            }

            .stats-lab-view .stats-lab-period-breakdown {
                margin-top: 1.25rem;
                padding-top: 1.25rem;
                border-top: 1px solid var(--stats-lab-border);
            }

            .stats-lab-view .stats-period-overview-section {
                padding: 0.75rem !important;
            }

            .stats-lab-view .stats-period-controls {
                gap: 0.65rem;
                padding-bottom: 0.7rem;
            }

            .stats-lab-view .stats-lab-all-time-heading {
                gap: 0.65rem;
            }

            .stats-lab-view .stats-lab-all-time-heading>span {
                display: none;
            }
        }

        .shelf-best-by-year-mobile {
            display: none;
        }

        .shelf-mobile-filter-toggle {
            display: none;
        }

        .shelf-mobile-search-row {
            display: contents;
        }

        .shelf-mobile-filter-tray {
            display: contents;
        }

        .public-project-indicator:hover .public-project-indicator-details,
        .public-project-indicator.is-open .public-project-indicator-details {
            display: block !important;
        }

        #home-view .home-featured-continue {
            grid-column: 2;
            margin-top: 0;
        }

        #home-view .home-featured-cover {
            grid-row: 1 / span 2;
            height: 100%;
            aspect-ratio: auto;
            align-self: stretch;
        }

        .home-add-album-row {
            display: none;
        }

        @media (max-width: 767px) {
            @supports (-webkit-touch-callout: none) {
                input,
                select,
                textarea {
                    font-size: 16px !important;
                }
            }

            #home-view .home-add-album-row {
                display: block;
            }

            #profile-view {
                padding: 0.75rem !important;
            }

            #profile-view .profile-identity {
                padding-bottom: 1rem !important;
            }

            #profile-view .profile-stats {
                gap: 0.65rem;
                margin-top: 1rem;
            }

            #profile-view .profile-stat-projects {
                grid-column: 1 / -1;
            }

            #profile-view .profile-stat,
            #profile-view .profile-stat-projects {
                min-height: 3.25rem;
                padding: 0.75rem !important;
            }

            #profile-view .profile-feature-layout {
                margin-top: 1rem;
                row-gap: 1rem;
            }

            #profile-view .profile-feature-layout>div:first-child {
                display: flex;
                flex-direction: column;
                gap: 1rem;
            }

            #profile-view .profile-feature-layout>div:first-child>section {
                margin-top: 0 !important;
            }

            #profile-view .profile-top-albums-grid,
            #profile-view .profile-top-artists-grid {
                gap: 0.9rem;
            }

            #profile-view .profile-top-artists {
                padding-left: 0.75rem !important;
                padding-right: 0.75rem !important;
            }

            #profile-view .profile-top-artists-grid {
                column-gap: 0.65rem;
            }

            #profile-view .profile-mobile-rank-inline {
                display: inline-flex !important;
                margin-right: 0.35rem;
                color: var(--theme-text-ui-muted);
                font-size: 0.65rem;
                font-weight: 800;
                line-height: 1;
            }

            #profile-view .profile-top-album-cover>.absolute,
            #profile-view .profile-top-artist-card>.relative>.absolute {
                display: none;
            }

            #profile-view .profile-top-albums-grid>.profile-top-album-card:first-child {
                grid-column: 1 / -1;
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 0.35rem;
                text-align: center;
            }

            #profile-view .profile-top-albums-grid .profile-top-album-cover {
                width: 100%;
                margin-left: auto;
                margin-right: auto;
            }

            #profile-view .profile-top-albums-grid>.profile-top-album-card:first-child .profile-top-album-cover {
                width: calc(50% - 0.45rem);
                max-width: 12rem;
                margin-bottom: 0;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card:first-child {
                grid-column: 1 / -1;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;
                align-items: center;
                gap: 0.35rem;
                padding-bottom: 0.25rem;
                text-align: center;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card:first-child>.relative {
                width: 8.5rem;
                height: 8.5rem;
                margin: 0;
                flex: 0 0 8.5rem;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card:not(:first-child)>.relative {
                width: 7rem;
                height: 7rem;
                margin: 0;
                flex: 0 0 7rem;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card:not(:first-child) {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 0.25rem;
                padding: 0;
                text-align: center;
            }

            /* Contact-sheet treatment: one wide #1 card, then a compact 2x2 grid. */
            #profile-view .profile-top-artists-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.65rem;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card {
                position: relative;
                display: block !important;
                overflow: hidden;
                aspect-ratio: 1 / 1.08;
                padding: 0 !important;
                border: 1px solid var(--theme-border-cool);
                border-radius: 0.65rem;
                background: var(--theme-artwork-surface-deep);
                text-align: left !important;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card:first-child {
                grid-column: 1 / -1;
                aspect-ratio: 2.15 / 1;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card>.relative {
                position: absolute;
                inset: 0;
                z-index: 0;
                width: auto !important;
                height: auto !important;
                margin: 0 !important;
                flex: none !important;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card>.relative>div:first-child {
                border-radius: 0.65rem !important;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card::after {
                position: absolute;
                inset: 0;
                z-index: 1;
                background: linear-gradient(to top, rgb(var(--theme-bg-app-rgb) / 0.96), rgb(var(--theme-bg-app-rgb) / 0.05) 65%);
                content: "";
                pointer-events: none;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card>.font-bold {
                position: absolute;
                z-index: 2;
                right: 0.75rem;
                bottom: 0.65rem;
                left: 0.75rem;
                overflow: hidden;
                color: var(--theme-text-bright);
                text-overflow: ellipsis;
                white-space: nowrap;
            }

            #profile-view .profile-top-artists-grid>.profile-top-artist-card>.relative>.absolute {
                display: block !important;
                z-index: 3;
                top: 0.5rem !important;
                left: 0.5rem !important;
            }

            #profile-view .profile-top-artists-grid .profile-mobile-rank-inline {
                display: none !important;
            }

            #profile-view .profile-rating-distribution {
                margin-top: 0.25rem;
                padding: 1rem !important;
                height: 360px !important;
                min-height: 0 !important;
                overflow: hidden;
            }

            #profile-view .profile-rating-distribution>div.relative {
                flex: 0 0 280px;
                height: 280px;
                min-height: 0 !important;
            }

            #profile-view .profile-listening {
                margin-top: 1rem !important;
            }

            .public-profile-hero {
                min-height: 0;
                padding: 1rem;
            }

            .public-profile-stats {
                gap: 0.65rem;
                margin-top: 1rem !important;
            }

            .public-profile-stats .public-profile-stat-projects {
                grid-column: 1 / -1;
            }

            .public-profile-stats .public-profile-stat,
            .public-profile-stats .public-profile-stat-projects {
                min-height: 3.25rem;
                padding: 0.75rem !important;
            }

            .public-profile-feature-layout {
                margin-top: 1.75rem !important;
                row-gap: 1.25rem;
            }

            .public-profile-top-albums>.grid,
            .public-profile-top-artists>.grid {
                gap: 0.9rem;
            }

            .public-profile-top-albums>.grid>.min-w-0:first-child {
                grid-column: 1 / -1;
                display: grid;
                grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
                align-items: center;
                gap: 0.9rem;
            }

            .public-profile-top-albums>.grid>.min-w-0:first-child .public-profile-top-album-card {
                width: 9rem;
                margin-bottom: 0;
            }

            .public-profile-top-artists>.grid>.public-profile-top-artist-card:first-child {
                grid-column: 1 / -1;
                display: flex;
                align-items: center;
                gap: 1rem;
                text-align: left;
            }

            .public-profile-top-artists>.grid>.public-profile-top-artist-card:first-child>.relative {
                width: 7rem;
                height: 7rem;
                margin: 0;
                flex: 0 0 7rem;
            }

            .public-profile-top-artists>.grid>.public-profile-top-artist-card:not(:first-child)>.relative {
                width: 5.75rem;
                height: 5.75rem;
            }

            .public-profile-rating-distribution {
                margin-top: 0.25rem;
            }

            .public-profile-listening {
                margin-top: 2rem !important;
            }

            .artist-profile-view-scroller {
                padding: 0.75rem !important;
            }

            .artist-profile-tabs {
                padding-bottom: 0.75rem;
                margin-bottom: 0.75rem;
                gap: 0.5rem;
            }

            .artist-song-filter-bar {
                padding: 0.625rem;
                gap: 0.5rem;
            }

            .artist-song-content>#artist-song-list {
                margin-top: 0.75rem;
            }

            .artist-profile-song-row {
                gap: 0.5rem;
                padding: 0.625rem;
                display: grid;
                grid-template-columns: 1.5rem 2.5rem minmax(0, 1fr) auto;
                align-items: center;
            }

            .artist-profile-song-actions {
                width: auto !important;
                min-width: max-content;
                gap: 0.25rem;
                padding-top: 0 !important;
            }

            .artist-profile-song-action {
                width: 1.75rem !important;
                height: 1.75rem !important;
            }

            .artist-profile-song-score {
                min-width: 2rem;
                text-align: right;
            }

            .artist-profile-song-title {
                min-width: 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            /* Shelf songs use a real table. Keep the artist-profile mobile row
               treatment from turning those table rows into a broken grid. */
            .shelf-song-table {
                min-width: 0 !important;
                table-layout: fixed;
            }

            .shelf-song-table #artist-song-list .artist-profile-song-row {
                display: table-row;
                padding: 0;
            }

            .shelf-song-table #artist-song-list .artist-profile-song-row>td:not(.hidden) {
                display: table-cell;
                padding: 0.75rem 0.5rem !important;
                vertical-align: middle;
            }

            .shelf-song-table th:nth-child(4),
            .shelf-song-table td:nth-child(4) {
                display: none !important;
            }

            .shelf-song-table th:nth-child(1),
            .shelf-song-table td:nth-child(1) {
                width: 2.5rem;
            }

            .shelf-song-table th:nth-child(2),
            .shelf-song-table td:nth-child(2) {
                width: auto;
            }

            .shelf-song-table th:nth-child(3),
            .shelf-song-table td:nth-child(3) {
                width: 5.5rem;
            }

            .shelf-song-table th:nth-child(5),
            .shelf-song-table td:nth-child(5) {
                width: 3rem;
            }

            .shelf-song-table td:nth-child(2)>div,
            .shelf-song-table td:nth-child(2)>div>div:last-child {
                min-width: 0;
            }

            .monthly-mobile-details-content>.monthly-inspector {
                display: grid;
                grid-template-columns: 92px minmax(0, 1fr);
                gap: 0.75rem;
                padding: 0 !important;
                border: 0 !important;
                background: transparent !important;
            }

            .monthly-mobile-details-content .monthly-inspector-cover {
                width: 92px;
                height: 92px;
                aspect-ratio: auto;
            }

            .monthly-mobile-details-content .rotation-inspector-heading {
                min-width: 0;
                margin-top: 0 !important;
            }

            .monthly-mobile-details-content .rotation-context-actions,
            .monthly-mobile-details-content .rotation-spotify-match {
                grid-column: 1 / -1;
            }

            .monthly-mobile-details-content .rotation-context-actions {
                margin-top: 0.25rem;
            }

            .monthly-mobile-details-content .rotation-spotify-match {
                margin-top: 0;
            }

            .shelf-mobile-search-row {
                display: flex;
                width: 100%;
            }

            .shelf-mobile-search-row input {
                min-width: 0;
                flex: 1 1 auto;
                border-right: 0;
                border-top-right-radius: 0;
                border-bottom-right-radius: 0;
            }

            .shelf-mobile-filter-toggle {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 2.75rem;
                border: 1px solid var(--theme-border-default);
                border-left: 0;
                border-radius: 0 0.5rem 0.5rem 0;
                background: var(--theme-bg-app);
                color: var(--theme-text-muted);
                transition: color 160ms ease, background 160ms ease, transform 160ms ease;
            }

            .shelf-mobile-filter-toggle:hover,
            .shelf-mobile-filter-toggle:focus-visible {
                color: var(--theme-absolute-white);
                background: var(--theme-surface-secondary);
            }

            .shelf-mobile-filter-toggle[aria-expanded="true"] i {
                transform: rotate(180deg);
            }

            #shelf-controls-region:not(.shelf-mobile-filters-open) .shelf-mobile-filter-section {
                display: none;
            }

            #shelf-controls-region .shelf-mobile-filter-tray {
                display: flex;
                flex-direction: column;
                gap: 0.75rem;
                max-height: 0;
                margin-top: -0.25rem;
                padding: 0 0.75rem;
                overflow: hidden;
                opacity: 0;
                transform: translateY(-0.4rem);
                border: 1px solid transparent;
                border-radius: 0.75rem;
                transition: max-height 220ms ease, margin 220ms ease, padding 220ms ease, opacity 180ms ease, transform 220ms ease, border-color 220ms ease, background-color 220ms ease;
            }

            #shelf-controls-region.shelf-mobile-filters-open .shelf-mobile-filter-tray {
                max-height: 24rem;
                margin-top: 0;
                padding-top: 0.75rem;
                padding-bottom: 0.75rem;
                opacity: 1;
                transform: translateY(0);
                border-color: var(--theme-border-default);
                background: rgb(var(--theme-surface-primary-rgb) / 0.72);
            }

            #shelf-controls-region:not(.shelf-mobile-filters-open) .shelf-mobile-filter-tray .shelf-mobile-filter-section,
            #shelf-controls-region.shelf-mobile-filters-open .shelf-mobile-filter-tray .shelf-mobile-filter-section {
                display: flex;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section {
                width: fit-content;
                max-width: 100%;
                margin-inline: auto;
                align-self: center;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section:first-child {
                justify-content: center;
                overflow-x: hidden;
                padding-top: 0;
                border-top: 0;
                align-items: center;
                gap: 0.5rem;
            }

            #shelf-controls-region .shelf-mobile-album-type-section {
                padding-top: 0.375rem;
                padding-bottom: 0.375rem;
                align-items: center;
                overflow-y: visible;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section.shelf-mobile-album-type-section:first-child {
                padding-top: 0.375rem;
                padding-bottom: 0.375rem;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-song-filter-section {
                width: fit-content;
                max-width: 100%;
                padding-left: 0.5rem;
                padding-right: 0;
                margin-inline: auto;
            }

            #shelf-controls-region .shelf-mobile-filter-tray {
                flex-direction: column;
                flex-wrap: nowrap;
                align-items: stretch;
                justify-content: flex-start;
                width: calc(100% - 2rem);
                align-self: center;
                box-sizing: border-box;
                padding-left: 0.75rem;
                padding-right: 0.75rem;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section:not(:first-child) {
                padding-top: 0;
                padding-left: 0.5rem;
                border-top: 0;
                justify-content: center;
                flex-wrap: wrap;
                gap: 0.375rem;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section:not(:first-child)>select:first-of-type {
                width: 5.5rem;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section:not(:first-child)>select:nth-of-type(2) {
                width: 7.75rem;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section:not(:first-child)>div:last-child {
                gap: 0.375rem;
            }

            #shelf-controls-region .shelf-mobile-filter-tray>.shelf-mobile-filter-section:not(:first-child)>div:last-child>button {
                width: 1.875rem;
                height: 1.875rem;
            }

            #shelf-controls-region>div:first-child {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
            }

            #shelf-controls-region>div:first-child>div:last-child {
                flex-direction: column;
                align-items: flex-end;
                gap: 0.5rem;
                margin-left: auto;
            }

            #shelf-controls-region>div:first-child>div:last-child>div:first-child {
                width: max-content;
            }

            #shelf-controls-region .shelf-best-by-year-desktop {
                display: none;
            }

            #shelf-controls-region .shelf-best-by-year-mobile {
                display: none;
            }

            #shelf-results-region {
                display: block;
                padding-top: 1rem;
                margin-top: 0.25rem;
                border-top: 0;
            }

            #shelf-controls-region {
                gap: 0.75rem;
            }

            #shelf-controls-region>div:first-child {
                gap: 0.75rem;
            }

            #shelf-controls-region>div:first-child>div:last-child {
                justify-content: center;
            }

            #shelf-controls-region>div:nth-child(2) {
                gap: 0.75rem;
                padding: 0;
            }

            #shelf-controls-region>div:nth-child(2)>div:first-child {
                gap: 0.5rem;
                justify-content: center;
            }

            #shelf-controls-region>div:nth-child(2)>div:last-child {
                padding-top: 0;
                justify-content: center;
                flex-wrap: wrap;
                row-gap: 0.5rem;
                column-gap: 0.5rem;
                border-top: 0;
            }

            #shelf-controls-region>div:nth-child(2)>div:last-child>button:first-child {
                flex: 0 0 100%;
                width: max-content;
                margin-inline: auto;
            }

            #shelf-controls-region>div:nth-child(2)>div:last-child>select {
                flex: 0 0 auto;
                padding-left: 0.5rem;
                padding-right: 0.5rem;
            }

            #shelf-controls-region>div:nth-child(2)>div:last-child>select:first-of-type {
                width: 5.75rem;
            }

            #shelf-controls-region>div:nth-child(2)>div:last-child>select:nth-of-type(2) {
                width: 8.25rem;
            }

            #shelf-controls-region>div:nth-child(2)>div:last-child>div:last-child {
                width: auto;
                flex: 0 0 auto;
                margin-left: 0;
                padding-left: 0;
                border-left: 0;
                justify-content: center;
            }

            #shelf-controls-region>div:nth-child(2)>div:last-child>div:last-child>button {
                width: 2rem;
                height: 2rem;
            }

            #home-view {
                display: flex;
                flex-direction: column;
                row-gap: 1rem;
                /* The Home template has a desktop-era pb-16. There is no
                 * mobile bottom navigation reserving that space, so keep only
                 * a small content inset plus the device's real safe area. */
                padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px)) !important;
            }

            /* Keep the major Home panels on one mobile spacing rhythm. The
             * desktop utility class adds margins/gaps that otherwise stack
             * differently once the secondary grid becomes display: contents. */
            #home-view > *,
            #home-view #home-primary-grid > section,
            #home-view #home-secondary-grid > section {
                margin-top: 0 !important;
                margin-bottom: 0 !important;
            }

            #home-view #home-primary-grid,
            #home-view #home-secondary-grid {
                gap: 1rem;
            }

            #home-primary-grid {
                order: 1;
            }

            #home-first-pass-section {
                order: 2;
            }

            #home-secondary-grid {
                display: contents;
            }

            #home-recent-section {
                order: 3;
                display: block;
                padding: 1.25rem;
            }

            #home-recent-section>div:first-child {
                margin-bottom: 0.75rem;
            }

            #home-recent-section .home-recent-list {
                gap: 0.75rem;
                overflow-x: auto;
                padding-bottom: 0.75rem;
            }

            #home-recent-section .home-recent-strip-card {
                min-width: 132px;
                max-width: 145px;
                flex: 0 0 132px;
                height: auto;
                display: block;
                padding: 0;
                padding-right: 0;
                border-color: transparent;
                background: transparent;
            }

            #home-recent-section .home-recent-strip-cover {
                width: 100%;
                height: auto;
                aspect-ratio: 1;
            }

            #home-recent-section .home-recent-strip-card>div:nth-child(2) {
                margin-top: 0.5rem;
            }

            #home-recent-section .home-recent-strip-card>div:nth-child(3) {
                margin-top: 0.125rem;
            }

            #home-recent-section .home-recent-strip-card>i {
                display: none;
            }

            #home-history-section {
                order: 4;
            }

            #home-first-pass-section,
            #home-history-section,
            #home-recent-section {
                margin-bottom: 1rem;
            }

            #home-database-section {
                order: 99;
            }

            #home-first-pass-section .home-first-pass-list {
                flex-direction: column;
                max-height: 13.5rem;
                overflow-x: hidden;
                overflow-y: auto;
                gap: 0.5rem;
            }

            #home-first-pass-section .home-first-pass-list>button {
                width: 100%;
                max-width: none;
                flex: none;
            }

            #home-first-pass-section {
                padding: 0.75rem;
            }

            #home-up-next-list {
                max-height: 13.5rem;
                overflow-y: auto;
            }

            #home-in-progress-rail {
                display: flex;
                flex-direction: column;
                gap: 0.5rem;
                max-height: 13.5rem;
                overflow-x: hidden;
                overflow-y: auto;
            }

            #home-in-progress-rail.has-mobile-overflow {
                --home-in-progress-row-height: 3.75rem;
                --home-in-progress-row-gap: 0.5rem;
                height: calc((3 * var(--home-in-progress-row-height)) + (2 * var(--home-in-progress-row-gap)));
                max-height: none;
            }

            #home-in-progress-rail .home-progress-option {
                width: 100%;
                min-width: 0;
                height: 3.75rem;
                flex: 0 0 3.75rem;
            }

            #home-view #home-history-list {
                gap: 0.5rem;
            }

            #home-history-list> :nth-child(n + 5) {
                display: none;
            }

            #home-view .home-page-heading {
                position: relative;
                padding-right: 0;
            }

            #home-view .home-page-heading-title {
                width: 100%;
                justify-content: space-between;
            }

            #home-view .home-page-heading-tools {
                display: none;
            }

            #home-view .home-rating-streak {
                white-space: nowrap;
            }

            #home-view .home-featured-adjusted {
                display: none;
            }

            #home-view .home-featured-continue {
                grid-column: 1 / -1;
                margin-top: 0;
            }

            #home-view .home-featured-cover {
                grid-row: auto;
                height: auto;
                aspect-ratio: 1;
                align-self: center;
            }

            .mobile-safe-header {
                height: calc(4rem + env(safe-area-inset-top)) !important;
                padding-top: env(safe-area-inset-top) !important;
            }

            #main-content {
                padding-top: calc(4rem + env(safe-area-inset-top)) !important;
            }

            #mobile-menu {
                top: calc(4rem + env(safe-area-inset-top)) !important;
            }
        }

        /* --- A-Side mobile song details sheet --- */
        .aside-mobile-details-root {
            position: fixed;
            inset: 0;
            z-index: 90;
            pointer-events: none;
        }

        .aside-mobile-details-backdrop {
            position: absolute;
            inset: 0;
            background: rgb(var(--theme-shadow-color-rgb) / 0.58);
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .aside-mobile-details-sheet {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            max-height: 78dvh;
            overflow-y: auto;
            padding:
                0.5rem 1rem max(1rem, env(safe-area-inset-bottom));
            border: 1px solid var(--theme-border-default);
            border-bottom: 0;
            border-radius: 1.5rem 1.5rem 0 0;
            background: var(--theme-surface-primary);
            box-shadow: 0 -24px 60px rgb(var(--theme-shadow-color-rgb) / 0.55);
            transform: translateY(105%);
            transition: transform 0.22s ease;
        }

        .aside-mobile-details-root.open {
            pointer-events: auto;
        }

        .aside-mobile-details-root.open .aside-mobile-details-backdrop {
            opacity: 1;
        }

        .aside-mobile-details-root.open .aside-mobile-details-sheet {
            transform: translateY(0);
        }

        html.aside-mobile-sheet-open,
        html.aside-mobile-sheet-open body {
            overflow: hidden !important;
        }

        @media (min-width: 768px) {
            .aside-mobile-details-root {
                display: none !important;
            }
        }

        ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }

        ::-webkit-scrollbar-track {
            background: var(--theme-surface-secondary);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--theme-border-strong);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--theme-text-disabled);
        }

        .home-scrollbar,
        .rating-scrollbar,
        #main-content:has(#home-view) {
            scrollbar-width: thin;
            scrollbar-color: var(--theme-scrollbar-thumb) transparent;
        }

        .home-scrollbar::-webkit-scrollbar,
        .rating-scrollbar::-webkit-scrollbar,
        #main-content:has(#home-view)::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        .home-scrollbar::-webkit-scrollbar-track,
        .rating-scrollbar::-webkit-scrollbar-track,
        #main-content:has(#home-view)::-webkit-scrollbar-track {
            background: transparent;
        }

        .home-scrollbar::-webkit-scrollbar-thumb,
        .rating-scrollbar::-webkit-scrollbar-thumb,
        #main-content:has(#home-view)::-webkit-scrollbar-thumb {
            background: var(--theme-scrollbar-thumb);
            border: 1px solid var(--theme-surface-primary);
            border-radius: 999px;
        }

        .home-scrollbar::-webkit-scrollbar-thumb:hover,
        .rating-scrollbar::-webkit-scrollbar-thumb:hover,
        #main-content:has(#home-view)::-webkit-scrollbar-thumb:hover {
            background: var(--theme-scrollbar-hover);
        }

        @media (min-width: 768px) {
            .home-in-progress-rail-shell {
                min-width: 0;
            }

            .home-in-progress-rail {
                display: flex !important;
                flex-wrap: nowrap !important;
                align-items: stretch;
                flex: 1 1 auto;
                min-width: 0;
                height: 4.5rem;
                --home-in-progress-card-gap: 0.5rem;
                gap: var(--home-in-progress-card-gap);
                overflow-x: auto;
                overflow-y: hidden;
            }

            .home-in-progress-rail .home-progress-option {
                width: calc((100% - (2 * var(--home-in-progress-card-gap))) / 3);
                min-width: calc((100% - (2 * var(--home-in-progress-card-gap))) / 3);
                height: 100%;
                flex: 0 0 calc((100% - (2 * var(--home-in-progress-card-gap))) / 3);
                flex-shrink: 0;
            }

            /* Give First Pass enough height for useful vertical cards without returning to the old oversized layout. */
            #home-first-pass-section {
                min-height: 0;
                padding: 1rem 1.25rem;
            }

            #home-first-pass-section .home-first-pass-list {
                max-height: none;
                align-items: stretch;
                overflow-y: hidden;
            }

            #home-first-pass-section .home-first-pass-card {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                position: relative;
                width: 10.5rem;
                min-width: 10.5rem;
                max-width: 10.5rem;
                height: 13rem;
                flex: 0 0 10.5rem;
                gap: 0.35rem;
                padding: 0.5rem;
            }

            #home-first-pass-section .home-first-pass-cover {
                width: 100%;
                height: auto;
                aspect-ratio: 1;
            }

            #home-first-pass-section .home-first-pass-card > div:nth-child(2) {
                min-width: 0;
                margin-top: 0;
                padding-right: 3.25rem;
                flex: 0 0 auto;
            }

            #home-first-pass-section .home-first-pass-card > div:nth-child(3) {
                position: absolute;
                right: 0.5rem;
                bottom: 0.55rem;
                margin: 0;
                font-size: 1rem;
                line-height: 1;
            }
        }

        @media (max-width: 767px) {
            .aside-longevity-trigger {
                flex: 0 0 auto;
                white-space: nowrap;
            }

            #profile-view .profile-top-artists-grid > .profile-top-artist-card > .relative,
            #profile-view .profile-top-artists-grid > .profile-top-artist-card > .relative > div:first-child {
                overflow: hidden;
                border-radius: 0.65rem !important;
                height: 100% !important;
                min-height: 100%;
            }

            #profile-view .profile-top-artists-grid > .profile-top-artist-card > .relative::after {
                content: "";
                position: absolute;
                inset: 0;
                pointer-events: none;
                border-radius: 0.65rem;
            }
        }

        .chart-container {
            position: relative;
            height: 200px;
            width: 100%;
        }

        .fade-in {
            animation: fadeIn 0.3s ease-in-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Custom Checkbox for Toggles */
        .toggle-checkbox:checked {
            right: 0;
            border-color: currentColor;
        }

        .toggle-checkbox:checked+.toggle-label {
            background-color: currentColor;
        }

        /* Drag & Drop insertion indicator */
        .drop-target-top,
        .drop-target-bottom {
            position: relative;
        }

        .drop-target-top::before,
        .drop-target-bottom::after {
            content: "";
            position: absolute;
            left: 0.5rem;
            right: 0.5rem;
            height: 2px;
            background: var(--theme-warning);
            border-radius: 999px;
            box-shadow: 0 0 8px rgb(var(--theme-warning-rgb) / 0.55);
            z-index: 20;
            pointer-events: none;
        }

        .drop-target-top::before {
            top: -5px;
        }

        .drop-target-bottom::after {
            bottom: -5px;
        }

        .rating-status-control {
            min-width: 0;
            transition: none;
        }

        .rating-status-label {
            display: inline-block;
            max-width: 7rem;
            overflow: hidden;
            white-space: nowrap;
            opacity: 1;
            transform: translateX(0);
            transition: none;
        }

        /* --- Monthly playlists --- */
        .monthly-month-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.75rem;
        }

        .monthly-month-card {
            min-width: 0;
            padding: 0.75rem;
            text-align: left;
            border: 1px solid var(--theme-border-cool);
            border-radius: 0.8rem;
            background: var(--theme-surface-primary);
            color: var(--theme-text-bright);
            transition: border-color 0.18s ease, transform 0.18s ease;
        }

        .monthly-month-card:hover,
        .monthly-month-card.current {
            border-color: var(--theme-accent-border);
            transform: translateY(-1px);
        }

        .monthly-month-card.current {
            background: linear-gradient(145deg, var(--theme-surface-primary), var(--theme-surface-accent));
        }

        .monthly-month-cover {
            position: relative;
            aspect-ratio: 1;
            overflow: hidden;
            border-radius: 0.65rem;
            background: var(--theme-artwork-placeholder-background);
        }

        .monthly-cover-img,
        .monthly-cover-placeholder {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .monthly-cover-placeholder {
            display: grid;
            place-items: center;
            color: var(--theme-text-subdued);
            font-size: 1.4rem;
            background: var(--theme-artwork-placeholder-background);
        }

        .monthly-cover-overlay {
            position: absolute;
            inset: auto 0.5rem 0.5rem;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 0.35rem;
        }

        .monthly-badge,
        .monthly-spotify-badge {
            padding: 0.25rem 0.4rem;
            border-radius: 999px;
            background: rgb(var(--theme-bg-app-rgb) / 0.78);
            font-size: 0.55rem;
            font-weight: 900;
            white-space: nowrap;
        }

        .monthly-spotify-badge {
            color: var(--theme-spotify-soft-text);
        }

        .monthly-song-panel {
            overflow: hidden;
            border: 1px solid var(--theme-border-cool);
            border-radius: 0.8rem;
            background: var(--theme-surface-primary);
        }

        .monthly-song-head,
        .monthly-song-row {
            display: grid;
            grid-template-columns: minmax(0, 1.7fr) minmax(8rem, 0.8fr) 5rem;
            gap: 0.5rem;
            align-items: center;
        }

        .monthly-song-head {
            padding: 0.65rem 0.75rem;
            border-bottom: 1px solid var(--theme-border-cool);
            color: var(--theme-table-heading);
            font-size: 0.5rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        .monthly-song-row {
            position: relative;
            min-height: 4.5rem;
            padding: 0.8rem 0.75rem;
            border-bottom: 1px solid var(--theme-row-divider);
        }

        .monthly-song-row:last-child {
            border-bottom: 0;
        }

        .monthly-song-row-selected {
            background: rgb(var(--theme-accent-border-rgb) / 0.14);
            box-shadow: inset 3px 0 0 var(--theme-accent-border);
        }

        /* Both Rotation lists share the same row and column-header rhythm. */
        .rotation-list-panel .rotation-list-head {
            box-sizing: border-box;
            height: 2rem;
            padding: 0.5rem 0.75rem;
            border-top: 1px solid var(--theme-border-cool);
            border-bottom: 0;
            color: var(--theme-table-heading);
            font-size: 0.625rem;
            font-weight: 700;
            line-height: 0.9375rem;
            letter-spacing: 0.1em;
        }
        .rotation-list-panel .rotation-list-row {
            min-height: 4.5rem;
            padding: 0.75rem;
            border-top: 0;
            border-bottom: 1px solid var(--theme-row-divider);
        }
        .rotation-list-row > :first-child { gap: 0.75rem; }
        .rotation-list-row > :first-child > :first-child { width: 3rem; height: 3rem; }
        .rotation-list-title { font-size: 0.875rem; font-weight: 700; line-height: 1.25rem; }
        .rotation-list-artist-row { min-height: 1.25rem; margin-top: 0.125rem; }
        .rotation-list-artist { font-size: 0.75rem; font-weight: 400; line-height: 1rem; }
        .rotation-list-album { font-size: 0.75rem; line-height: 1rem; }
        .rotation-list-panel .rotation-list-row.rotation-list-selected {
            background: rgb(var(--theme-accent-border-rgb) / 0.14);
            box-shadow: inset 3px 0 0 var(--theme-accent-border);
            outline: none;
        }
        .rotation-list-panel .rotation-list-row.rotation-list-selected:focus-visible {
            outline: 2px solid var(--theme-focus-ring);
            outline-offset: 2px;
        }

        /* Rotation groups the existing A-Side and Monthly views without
           changing either collection's persistence or Spotify controls. */
        .rotation-subhead {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
        }

        .rotation-primary-head {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            grid-template-rows: auto 1rem;
            column-gap: 1rem;
            align-items: start;
        }
        .rotation-primary-head h1 { font-size: 1.875rem; font-weight: 900; line-height: 1.1; }
        .rotation-back-row { display: flex; grid-column: 1 / -1; align-items: end; min-height: 1rem; }
        .rotation-subhead { margin-bottom: 1.25rem; }
        .rotation-subhead h2 { font-size: 1.5rem; font-weight: 850; }
        .rotation-tabs {
            display: inline-flex;
            flex: none;
            gap: 0.2rem;
            padding: 0.25rem;
            border: 1px solid var(--theme-border-default);
            border-radius: 0.6rem;
            background: var(--theme-surface-primary);
        }
        .rotation-tabs button {
            min-width: 5.75rem;
            padding: 0.5rem 0.75rem;
            border: 0;
            border-radius: 0.4rem;
            background: transparent;
            color: var(--theme-text-secondary);
            font-size: 0.75rem;
            font-weight: 750;
        }
        .rotation-tabs button[aria-selected="true"] {
            background: var(--theme-accent);
            color: var(--theme-accent-contrast);
        }
        .rotation-tabs button:not([aria-selected="true"]):hover {
            background: var(--theme-surface-secondary);
        }
        .rotation-header-actions {
            display: grid;
            grid-template-columns: auto auto auto auto;
            align-items: center;
            justify-self: end;
            gap: 0.5rem;
            width: max-content;
        }
        .rotation-header-open,
        .rotation-header-sync,
        .rotation-header-status {
            box-sizing: border-box;
            height: 2.25rem;
            border-radius: 0.5rem;
        }
        .rotation-header-open {
            display: inline-flex;
            width: 2.25rem;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--theme-border-default);
            background: var(--theme-surface-secondary);
            color: var(--theme-text-muted);
            font-size: 0.75rem;
        }
        .rotation-header-open:hover:not(:disabled) { color: var(--theme-text-primary); }
        .rotation-header-open:disabled { visibility: hidden; }
        .rotation-header-sync-slot > * {
            min-height: 2.25rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .rotation-header-sync {
            display: inline-grid;
            grid-template-columns: auto auto;
            gap: 0.375rem;
            padding-inline: 0.75rem;
            border: 1px solid rgb(var(--theme-warning-rgb) / 0.4);
            background: rgb(var(--theme-warning-rgb) / 0.1);
            color: var(--theme-warning-pale);
            font-size: 0.75rem;
            font-weight: 800;
            white-space: nowrap;
        }
        .rotation-header-sync.synced {
            border-color: rgb(var(--theme-success-bright-rgb) / 0.35);
            background: rgb(var(--theme-success-rgb) / 0.1);
            color: var(--theme-success-light);
        }
        .rotation-header-sync.syncing { cursor: wait; opacity: 0.78; }
        .rotation-header-sync:disabled { cursor: wait; }
        .rotation-header-sync-dot {
            grid-column: 1;
            grid-row: 1;
            width: 0.375rem;
            height: 0.375rem;
            border-radius: 50%;
            background: currentColor;
        }
        .rotation-header-sync-label { grid-column: 2; grid-row: 1; }
        .rotation-header-status {
            display: flex;
            width: max-content;
            align-items: center;
            gap: 0.375rem;
            min-width: 0;
            padding: 0 0.65rem;
            border: 1px solid var(--theme-border-cool);
            background: var(--theme-surface-primary);
            color: var(--theme-text-subdued);
            font-size: 0.7rem;
            white-space: nowrap;
        }
        .rotation-header-status.connected {
            border-color: rgb(var(--theme-success-rgb) / 0.35);
            background: rgb(var(--theme-success-surface-rgb) / 0.22);
            color: var(--theme-success-bright);
        }
        .rotation-header-status > .fa-circle { font-size: 0.4375rem; }
        .rotation-header-status-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
        .rotation-header-status button { margin-left: auto; flex: none; }
        .rotation-header-utility { justify-self: end; }
        @media (max-width: 767px) {
            .rotation-header-actions {
                width: 100%;
                grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 1fr);
            }
            .rotation-header-sync-slot,
            .rotation-header-sync-slot > *,
            .rotation-header-status { width: 100%; }
            .rotation-header-sync { font-size: 0.65rem; }
            .rotation-header-status { font-size: 0.625rem; }
        }
        .rotation-song-copy { flex: 1; min-width: 0; }
        .rotation-song-meta { min-width: 0; }
        .rotation-song-meta > :first-child { min-width: 0; }
        .rotation-month-tags { display: inline-flex; align-items: center; flex: none; gap: 0.22rem; }
        .rotation-month-tag {
            padding: 0.12rem 0.3rem;
            border: 1px solid var(--theme-border-default);
            border-radius: 0.3rem;
            background: var(--theme-surface-secondary);
            color: var(--theme-text-secondary);
            font-size: 0.56rem;
            font-weight: 750;
            white-space: nowrap;
        }
        .rotation-month-tag.current {
            border-color: var(--theme-accent-border);
            background: var(--theme-surface-accent);
            color: var(--theme-accent-soft);
        }
        .rotation-detail-meta { margin-top: 0.5rem; color: var(--theme-text-muted); font-size: 0.7rem; }
        .rotation-inspector-heading { min-width: 0; margin-top: 0.75rem; }
        .rotation-inspector-title { font-size: 1.25rem; font-weight: 900; line-height: 1.25; }
        .rotation-inspector-artist {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            min-height: 1.25rem;
            margin-top: 0.25rem;
            font-size: 0.875rem;
            line-height: 1.25rem;
        }
        .rotation-inspector-artist-name { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: inherit; }
        .rotation-inspector-album { min-width: 0; min-height: 1rem; margin-top: 0.25rem; font-size: 0.75rem; line-height: 1rem; }
        .rotation-inspector-album-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: inherit; }
        .rotation-detail-meta strong { color: var(--theme-success-bright); font-weight: 800; }
        .rotation-context-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.75rem; }
        .rotation-context-button {
            display: inline-flex;
            min-height: 2rem;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            padding: 0.35rem 0.7rem;
            border: 1px solid var(--theme-border-default);
            border-radius: 0.45rem;
            background: var(--theme-surface-secondary);
            color: var(--theme-text-secondary);
            font-size: 0.7rem;
            font-weight: 750;
            white-space: nowrap;
        }
        .rotation-context-button:hover { border-color: var(--theme-accent-border); color: var(--theme-text-primary); }
        .rotation-context-add { border-color: var(--theme-accent-border); background: var(--theme-surface-accent); color: var(--theme-accent-soft); }
        .rotation-crossover-tag {
            flex: none;
            align-self: center;
            padding: 0.1rem 0.35rem;
            border: 1px solid rgb(var(--theme-accent-border-rgb) / 0.25);
            border-radius: 0.3rem;
            background: var(--theme-surface-accent);
            color: var(--theme-accent-soft);
            font-size: 0.6rem;
            font-weight: 700;
            line-height: 1.2;
            white-space: nowrap;
        }
        .rotation-spotify-match {
            display: inline-flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            width: 100%;
            margin-top: 0.7rem;
            padding: 0.4rem 0;
            border: 0;
            background: transparent;
            color: var(--theme-text-muted);
            font-size: 0.7rem;
            text-align: left;
        }
        .rotation-spotify-match:hover { color: var(--theme-text-primary); }
        .rotation-spotify-match.missing { color: var(--theme-warning); }
        .rotation-month-history,
        .rotation-detail-section { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--theme-border-cool); }
        .rotation-month-history h4 { margin-bottom: 0.3rem; font-size: 0.7rem; font-weight: 750; }
        .rotation-month-history button {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 0.32rem 0.1rem;
            border: 0;
            border-radius: 0.3rem;
            background: transparent;
            color: var(--theme-text-secondary);
            font-size: 0.7rem;
            text-align: left;
        }
        .rotation-month-history button:hover { background: var(--theme-surface-secondary); color: var(--theme-text-primary); }
        .rotation-month-history button i { color: var(--theme-text-muted); font-size: 0.6rem; }
        .rotation-empty-history { color: var(--theme-text-muted); font-size: 0.7rem; }

        @media (min-width: 1200px) {
            #main-content:has(.rotation-detail-page) { overflow-y: hidden; }
            #main-content > .rotation-detail-page {
                display: flex;
                height: 100%;
                min-height: 0;
                flex-direction: column;
                padding-bottom: 1.5rem;
            }
            .rotation-detail-page .rotation-workspace {
                display: grid;
                min-height: 0;
                flex: 1;
                grid-template-columns: minmax(0, 1fr) minmax(20rem, 26.25rem);
                align-items: stretch;
            }
            .rotation-workspace > :first-child { display: flex; min-height: 0; flex-direction: column; }
            .rotation-list-panel { display: flex; min-height: 0; flex: 1; flex-direction: column; }
            .rotation-song-scroll { min-height: 0; flex: 1; overflow-y: auto; scrollbar-color: var(--theme-scrollbar-thumb) transparent; scrollbar-width: thin; }
            .rotation-detail-column { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; scrollbar-color: var(--theme-scrollbar-thumb) transparent; scrollbar-width: thin; }
        }

        @media (max-width: 767px) {
            .rotation-primary-head h1 { font-size: 1.5rem; }
            .rotation-tabs button { min-width: 4.5rem; padding-inline: 0.45rem; }
            .rotation-subhead { align-items: flex-start; }
            .rotation-month-tags { gap: 0.15rem; }
            .rotation-month-tag { padding-inline: 0.2rem; }
        }

        .monthly-drop-target-top::before,
        .monthly-drop-target-bottom::after {
            position: absolute;
            right: 0.5rem;
            left: 0.5rem;
            z-index: 2;
            height: 2px;
            border-radius: 999px;
            background: var(--theme-warning);
            box-shadow: 0 0 8px rgb(var(--theme-warning-rgb) / 0.55);
            content: "";
            pointer-events: none;
        }

        .monthly-drop-target-top::before {
            top: -5px;
        }

        .monthly-drop-target-bottom::after {
            bottom: -5px;
        }

        .monthly-sync-status {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.3rem 0.5rem;
            border: 1px solid rgb(var(--theme-warning-rgb) / 0.24);
            border-radius: 999px;
            color: var(--theme-warning-light);
            font-size: 0.55rem;
            font-weight: 900;
        }

        .monthly-sync-status.synced {
            border-color: rgb(var(--theme-success-bright-rgb) / 0.24);
            color: var(--theme-success-muted-text);
        }

        .monthly-sync-status span {
            width: 0.35rem;
            height: 0.35rem;
            border-radius: 50%;
            background: currentColor;
        }

        .monthly-secondary-button {
            padding: 0.5rem 0.65rem;
            border: 1px solid var(--theme-border-overlay);
            border-radius: 0.5rem;
            background: var(--theme-surface-primary);
            color: var(--theme-text-ui-secondary);
            font-size: 0.65rem;
            font-weight: 850;
        }

        .monthly-secondary-button:hover {
            border-color: var(--theme-accent-strong-border);
            color: white;
        }

        .monthly-panel-link {
            padding: 0.5rem 0.25rem;
            color: var(--theme-text-ui-muted);
            font-size: 0.65rem;
            font-weight: 800;
        }

        .monthly-panel-link:hover {
            color: white;
        }

        .public-profile-hero {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            min-height: 10.5rem;
            padding: 1.25rem;
            border: 1px solid var(--theme-border-cool);
            border-radius: 0.875rem;
            background:
                var(--theme-public-profile-glow),
                var(--theme-surface-feature);
        }

        .public-profile-hero::after {
            position: absolute;
            inset: 0;
            z-index: 1;
            background: var(--theme-public-profile-overlay);
            content: "";
            pointer-events: none;
        }

        .public-profile-liquid-canvas {
            position: absolute;
            inset: 0;
            z-index: 0;
            width: 100%;
            height: 100%;
            opacity: 0.38;
            pointer-events: none;
        }

        .public-profile-hero-content {
            position: relative;
            z-index: 2;
        }

        .monthly-year-list {
            display: grid;
            gap: 1rem;
        }

        .monthly-year-card {
            padding: 1.125rem;
            border: 1px solid var(--theme-border-cool);
            border-radius: 0.875rem;
            background: var(--theme-surface-primary);
        }

        .monthly-calendar-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.75rem;
        }

        .monthly-calendar-month {
            position: relative;
            isolation: isolate;
            overflow: hidden;
            min-height: 7rem;
            padding: 0.8125rem;
            border: 1px solid var(--theme-border-cool);
            border-radius: 0.6875rem;
            background: var(--theme-surface-feature);
            color: var(--theme-text-bright);
            text-align: left;
            cursor: pointer;
            transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
        }

        .monthly-calendar-month:hover {
            border-color: var(--theme-accent-strong-border);
            background: var(--theme-feature-selected-background);
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgb(var(--theme-shadow-color-rgb) / 0.18);
        }

        .monthly-calendar-month.current {
            border-color: var(--theme-accent-border);
            background: linear-gradient(145deg, var(--theme-surface-accent), var(--theme-surface-primary));
        }

        .monthly-calendar-settings {
            display: grid;
            width: 2.25rem;
            height: 2.25rem;
            place-items: center;
            border: 1px solid var(--theme-border-overlay);
            border-radius: 0.55rem;
            background: var(--theme-feature-inset-background);
            color: var(--theme-feature-muted-text);
            transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
        }

        .monthly-calendar-settings:hover,
        .monthly-calendar-settings:focus-visible {
            border-color: var(--theme-accent-strong-border);
            background: var(--theme-surface-accent);
            color: var(--theme-feature-primary-text);
            outline: none;
        }

        .monthly-calendar-month.has-songs .monthly-calendar-month-count {
            color: var(--theme-feature-secondary-text);
        }

        .monthly-calendar-month-top,
        .monthly-calendar-month-bottom {
            position: relative;
            z-index: 2;
        }

        .monthly-calendar-month-top {
            position: absolute;
            top: 0.625rem;
            right: 0.8125rem;
            left: 0.8125rem;
        }

        .monthly-calendar-month-chips {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .monthly-calendar-current {
            padding: 0.14rem 0.3rem;
            border: 1px solid var(--theme-feature-pill-border);
            border-radius: 999px;
            background: var(--theme-feature-pill-background);
            color: var(--theme-feature-pill-text);
            font-size: 0.4rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }

        .monthly-calendar-month-bottom {
            position: absolute;
            right: 0.8125rem;
            bottom: 0.75rem;
            left: 0.8125rem;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 0.5rem;
        }

        .monthly-calendar-month-name {
            display: block;
            font-size: 0.95rem;
            font-weight: 900;
        }

        .monthly-calendar-month-count {
            display: block;
            color: var(--theme-feature-faint-text);
            font-size: 0.56rem;
            white-space: nowrap;
        }

        .monthly-calendar-art {
            position: absolute;
            inset: 0;
            z-index: 0;
            overflow: hidden;
            opacity: 0.58;
            pointer-events: none;
            transform: scale(1.015);
            transition: opacity 0.25s ease, transform 0.35s ease;
        }

        .monthly-calendar-month:hover .monthly-calendar-art {
            opacity: 0.72;
            transform: scale(1.045);
        }

        .monthly-calendar-art img {
            position: absolute;
            object-fit: cover;
            border-radius: 0.45rem;
            box-shadow: 0 4px 14px rgb(var(--theme-shadow-color-rgb) / 0.34);
            filter: saturate(0.82) contrast(0.94);
        }

        .monthly-calendar-art-a {
            width: 44%;
            height: 88%;
            top: 6%;
            right: -3%;
            transform: rotate(2deg);
        }

        .monthly-calendar-art-b {
            width: 37%;
            height: 68%;
            top: -8%;
            right: 31%;
            transform: rotate(-3deg);
        }

        .monthly-calendar-art-c {
            width: 34%;
            height: 62%;
            right: 25%;
            bottom: -20%;
            transform: rotate(5deg);
        }

        .monthly-calendar-art-veil {
            position: absolute;
            inset: 0;
            background: var(--theme-feature-artwork-overlay);
        }

        .monthly-detail-calendar {
            display: flex;
            width: 3.5rem;
            height: 3.5rem;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--theme-accent-border);
            border-radius: 0.65rem;
            background: var(--theme-surface-accent);
            color: var(--theme-feature-secondary-text);
        }

        .monthly-detail-calendar span {
            font-size: 0.7rem;
            font-weight: 900;
            text-transform: uppercase;
        }

        .monthly-detail-calendar b {
            margin-top: 0.15rem;
            color: var(--theme-text-subdued);
            font-size: 0.55rem;
        }

        @media (max-width: 1050px) {
            .monthly-month-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }

            .monthly-calendar-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        @media (max-width: 767px) {
            .monthly-month-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            .monthly-calendar-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.5625rem;
            }

            .monthly-year-card {
                padding: 0.8125rem;
            }

            .monthly-calendar-month {
                min-height: 6.75rem;
                padding: 0.625rem;
            }

            .monthly-calendar-month-bottom {
                right: 0.625rem;
                bottom: 0.625rem;
                left: 0.625rem;
                display: block;
            }

            .monthly-calendar-month-count {
                margin-top: 0.25rem;
            }

            .monthly-song-head {
                display: none;
            }

            #monthly-inspector {
                display: none !important;
            }

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

            .monthly-song-row> :nth-child(3),
            .monthly-song-row> :nth-child(2) {
                display: none;
            }

        }

        @media (prefers-reduced-motion: reduce) {

            .monthly-calendar-month,
            .monthly-calendar-art {
                transition: none;
            }

            .monthly-calendar-month:hover {
                transform: none;
            }

            .monthly-calendar-art,
            .monthly-calendar-month:hover .monthly-calendar-art {
                transform: none;
            }
        }

        @media (min-width: 768px) and (hover: hover) and (pointer: fine) {
            .rating-status-option {
                flex: 0 0 auto;
            }

            .rating-status-option:nth-child(1) {
                width: 6.75rem;
            }

            .rating-status-option:nth-child(2) {
                width: 5.75rem;
            }

            .rating-status-option:nth-child(3) {
                width: 4.5rem;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):not(:hover) .rating-status-option:not([aria-pressed="true"]) {
                width: 0;
                height: 1.25rem;
                padding-left: 0;
                padding-right: 0;
                gap: 0;
                opacity: 0;
                pointer-events: none;
                overflow: hidden;
                transition: width 280ms ease-in-out, padding 280ms ease-in-out, gap 280ms ease-in-out, opacity 180ms ease-in-out !important;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):not(:hover) {
                gap: 0;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):not(:hover) .rating-status-option:not([aria-pressed="true"]) .rating-status-label {
                max-width: 0;
                opacity: 0;
                transition: max-width 280ms ease-in-out, opacity 180ms ease-in-out !important;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):hover {
                gap: 0.25rem;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):hover .rating-status-option:not([aria-pressed="true"]) {
                height: auto;
                padding-left: 0.625rem;
                padding-right: 0.625rem;
                gap: 0.375rem;
                opacity: 1;
                pointer-events: auto;
                overflow: hidden;
                transition: width 280ms ease-in-out, padding 280ms ease-in-out, gap 280ms ease-in-out, opacity 180ms ease-in-out !important;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):hover .rating-status-option:not([aria-pressed="true"]) .rating-status-label {
                max-width: 7rem;
                opacity: 1;
                transition: max-width 280ms ease-in-out, opacity 180ms ease-in-out !important;
            }
        }

        @media (max-width: 767px) {
            .rating-status-option {
                flex: 0 0 auto;
                transition: width 280ms ease-in-out, padding 280ms ease-in-out, gap 280ms ease-in-out, opacity 180ms ease-in-out !important;
            }

            .rating-status-option:nth-child(1) {
                width: 6.75rem;
            }

            .rating-status-option:nth-child(2) {
                width: 5.75rem;
            }

            .rating-status-option:nth-child(3) {
                width: 4.5rem;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):not(.is-expanded) .rating-status-option:not([aria-pressed="true"]) {
                width: 0;
                height: 1.25rem;
                padding-left: 0;
                padding-right: 0;
                gap: 0;
                opacity: 0;
                pointer-events: none;
                overflow: hidden;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):not(.is-expanded) {
                gap: 0;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]):not(.is-expanded) .rating-status-option:not([aria-pressed="true"]) .rating-status-label {
                max-width: 0;
                opacity: 0;
                transition: max-width 280ms ease-in-out, opacity 180ms ease-in-out !important;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]).is-expanded {
                gap: 0.25rem;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]).is-expanded .rating-status-option:not([aria-pressed="true"]) {
                height: auto;
                padding-left: 0.625rem;
                padding-right: 0.625rem;
                gap: 0.375rem;
                opacity: 1;
                pointer-events: auto;
                overflow: hidden;
            }

            .rating-status-control:has([data-rating-status="Rated"][aria-pressed="true"]).is-expanded .rating-status-option:not([aria-pressed="true"]) .rating-status-label {
                max-width: 7rem;
                opacity: 1;
                transition: max-width 280ms ease-in-out, opacity 180ms ease-in-out !important;
            }
        }

        @media (min-width: 768px) {
            #main-content:has(#profile-view) {
                overflow-y: hidden;
            }
        }

        .bside-logo-mark {
            width: 2rem;
            height: 2rem;
            border-radius: 0.75rem;
            background: var(--theme-logo-background);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--theme-logo-shadow);
            border: 1px solid var(--theme-logo-border);
        }

        .bside-logo-letter {
            color: white;
            font-weight: 900;
            font-size: 1.35rem;
            line-height: 1;
            font-family: ui-serif, Georgia, serif;
            transform: translateY(-1px);
        }

        .scrollbar-hidden {
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .scrollbar-hidden::-webkit-scrollbar {
            display: none;
        }

        .score-number-input::-webkit-outer-spin-button,
        .score-number-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        .score-number-input {
            appearance: textfield;
            -moz-appearance: textfield;
        }

        .image-drop-target.drag-over {
            outline: 2px dashed var(--theme-warning);
            outline-offset: 4px;
        }

        .artist-crop-canvas {
            touch-action: none;
            cursor: grab;
            user-select: none;
        }

        .artist-crop-canvas:active {
            cursor: grabbing;
        }

        /* Shelf album display modes */
        .shelf-view-row {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem;
            position: relative;
            padding: 0 0.65rem 1.55rem;
            margin-bottom: 3.6rem;
            overflow: visible;
            isolation: isolate;
        }

        @media (min-width: 768px) {
            .shelf-view-row {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        @media (min-width: 1024px) {
            .shelf-view-row {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }

        @media (min-width: 1280px) {
            .shelf-view-row {
                grid-template-columns: repeat(5, minmax(0, 1fr));
            }
        }

        .shelf-view-row:last-child {
            margin-bottom: 0;
        }

        .shelf-view-row:hover,
        .shelf-view-row:focus-within {
            z-index: 900 !important;
        }

        .shelf-view-row::after {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 0.95rem;
            border-radius: 0.35rem;
            background: var(--theme-shelf-edge-background);
            box-shadow:
                0 10px 16px rgb(var(--theme-shadow-color-rgb) / 0.34),
                inset 0 1px 0 rgba(255, 255, 255, 0.07),
                inset 0 -2px 0 rgb(var(--theme-shadow-color-rgb) / 0.35);
            z-index: 1;
        }

        .shelf-view-row-top {
            z-index: 8;
        }

        .shelf-view-row-bottom {
            z-index: 4;
        }

        .shelf-view-slot {
            position: relative;
            z-index: 3;
            min-width: 0;
        }

        .shelf-view-slot:hover,
        .shelf-view-slot:focus-within {
            z-index: 700;
        }

        .shelf-hover-card {
            appearance: none;
            border: 0;
            padding: 0;
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
            position: relative;
            width: 100%;
            display: block;
        }

        .shelf-hover-cover {
            transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
        }

        .shelf-hover-card:hover .shelf-hover-cover,
        .shelf-hover-card:focus-visible .shelf-hover-cover {
            transform: translateY(-0.5rem) scale(1.025);
            box-shadow: 0 24px 36px rgb(var(--theme-shadow-color-rgb) / 0.4);
            filter: brightness(1.04);
        }

        .shelf-hover-card:focus-visible {
            outline: none;
        }

        .shelf-hover-info {
            position: absolute;
            left: 0;
            right: 0;
            top: calc(100% + 0.5rem);
            padding: 0.7rem 0.75rem 0.75rem;
            border-radius: 0.75rem;
            background: var(--theme-shelf-hover-background);
            border: 1px solid var(--theme-shelf-hover-border);
            box-shadow: 0 16px 24px rgb(var(--theme-shadow-color-rgb) / 0.34);
            opacity: 0;
            transform: translateY(-0.5rem);
            transition: opacity 0.18s ease, transform 0.18s ease;
            z-index: 80;
            pointer-events: none;
        }

        .shelf-hover-card:hover .shelf-hover-info,
        .shelf-hover-card:focus-visible .shelf-hover-info {
            opacity: 1;
            transform: translateY(0);
        }

        .compact-view-stage {
            position: relative;
            overflow: visible;
            padding: 0 0.65rem;
        }

        .compact-view-row {
            position: absolute;
            left: 0.65rem;
            right: 0.65rem;
            display: grid;
            grid-template-columns: repeat(5, minmax(0, 1fr));
            gap: 1rem;
        }

        .compact-view-row:not(:last-child) .compact-view-album {
            transform: scale(0.95);
            transform-origin: top center;
        }

        .compact-view-album {
            appearance: none;
            border: 0;
            padding: 0;
            background: transparent;
            color: inherit;
            text-align: left;
            cursor: pointer;
            position: relative;
            width: 100%;
            display: block;
            transition: transform 0.24s ease;
        }

        .compact-view-album:hover,
        .compact-view-album:focus-visible {
            z-index: 1000 !important;
            outline: none;
        }

        .compact-view-cover {
            transition: transform 0.26s ease, box-shadow 0.26s ease, filter 0.26s ease;
        }

        .compact-view-album:hover .compact-view-cover,
        .compact-view-album:focus-visible .compact-view-cover {
            transform: translateY(-10.5rem) scale(1.08);
            box-shadow: 0 36px 52px rgb(var(--theme-shadow-color-rgb) / 0.52);
            filter: brightness(1.05);
        }

        .compact-view-cover-info {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 6;
            padding: 3rem 0.75rem 1rem;
            background: linear-gradient(180deg, transparent, rgb(var(--theme-bg-app-rgb) / 0.28) 18%, rgb(var(--theme-bg-app-rgb) / 0.95) 78%);
            opacity: 0;
            transform: translateY(1.1rem);
            transition: opacity 0.2s ease, transform 0.2s ease;
            pointer-events: none;
        }

        .compact-view-album:hover .compact-view-cover-info,
        .compact-view-album:focus-visible .compact-view-cover-info {
            opacity: 1;
            transform: translateY(0);
        }

        .compact-view-album:hover .shelf-project-type-badge,
        .compact-view-album:focus-visible .shelf-project-type-badge {
            opacity: 0;
            transform: translateY(0.4rem);
        }

        .shelf-project-type-badge {
            transition: opacity 0.16s ease, transform 0.16s ease;
        }

        @media (max-width: 1279px) {
            .compact-view-stage {
                height: auto !important;
                padding: 0;
            }

            .compact-view-row {
                position: relative;
                left: auto !important;
                right: auto !important;
                top: auto !important;
                z-index: auto !important;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                margin-bottom: 1rem;
            }

            .compact-view-row:not(:last-child) .compact-view-album {
                transform: none;
            }

            .compact-view-album:hover .compact-view-cover,
            .compact-view-album:focus-visible .compact-view-cover {
                transform: translateY(-2.5rem) scale(1.03);
            }
        }

        @media (max-width: 520px) {
            .compact-view-row {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 767px) {
            body {
                height: var(--bside-mobile-viewport-height, 100dvh) !important;
            }

            /* Installed iOS standalone apps use the document as the page
             * scroller. This avoids WebKit's broken bottom inset when a
             * viewport-height body contains an internal main scroller. */
            html.bside-standalone-document-scroll,
            html.bside-standalone-document-scroll body {
                height: auto !important;
                min-height: 100% !important;
                overflow-x: hidden !important;
                overflow-y: auto !important;
            }

            html.bside-standalone-document-scroll body {
                display: block !important;
            }

            html.bside-standalone-document-scroll #main-content {
                position: static !important;
                width: 100% !important;
                height: auto !important;
                min-height: 100dvh !important;
                flex: none !important;
                overflow: visible !important;
            }

            /* Rating panels previously relied on the fixed-height main
             * scroller: on phones they are absolute children of this wrapper.
             * In standalone document-scroll mode, keep the selected panel in
             * normal flow so it establishes the page height. The animation
             * temporarily restores the absolute two-panel stage in JS. */
            html.bside-standalone-document-scroll .rating-page-shell {
                height: auto !important;
                min-height: 0 !important;
                overflow: visible !important;
            }

            html.bside-standalone-document-scroll #rating-mobile-panels {
                flex: none !important;
                min-height: 0 !important;
                overflow: visible !important;
            }

            html.bside-standalone-document-scroll #rating-mobile-panels > #rating-overview-panel:not(.hidden),
            html.bside-standalone-document-scroll #rating-mobile-panels > #rating-tracks-panel:not(.hidden) {
                position: relative !important;
                inset: auto !important;
                flex: none !important;
                min-height: 0 !important;
                height: auto !important;
                overflow: visible !important;
            }

            html.bside-standalone-document-scroll #rating-mobile-panels.rating-mobile-panels-transitioning > #rating-overview-panel,
            html.bside-standalone-document-scroll #rating-mobile-panels.rating-mobile-panels-transitioning > #rating-tracks-panel {
                position: absolute !important;
                inset: 0 !important;
            }

            html.bside-standalone-document-scroll body.mobile-menu-open,
            html.bside-standalone-document-scroll body.bside-modal-open {
                overflow: hidden !important;
            }

            html.bside-standalone-document-scroll body.mobile-menu-open #main-content,
            html.bside-standalone-document-scroll body.bside-modal-open #main-content {
                overflow: hidden !important;
            }

            #mobile-menu {
                display: flex;
                opacity: 0;
                visibility: hidden;
                pointer-events: none;
                background: rgb(var(--theme-surface-void-rgb) / 0);
                transition:
                    opacity 180ms ease,
                    background-color 180ms ease,
                    visibility 0s linear 220ms;
            }

            #mobile-menu.is-open {
                opacity: 1;
                visibility: visible;
                pointer-events: auto;
                background: rgb(var(--theme-surface-void-rgb) / 0.62);
                transition-delay: 0s;
            }

            #mobile-menu-panel {
                transform: translateX(100%);
                transition: transform 220ms ease;
                will-change: transform;
            }

            #mobile-menu.is-open #mobile-menu-panel {
                transform: translateX(0);
            }

            body.mobile-menu-open #main-content {
                overflow: hidden;
            }

            #modal-container {
                align-items: flex-start;
                overflow-y: auto;
                padding-top: calc(1rem + env(safe-area-inset-top, 0px));
                padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
            }

            #modal-container>* {
                max-width: 100%;
                max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
            }

            .bside-mobile-modal-shell {
                min-height: 0;
            }

            .bside-mobile-modal-header {
                flex: 0 0 auto;
            }

            .bside-mobile-modal-close {
                min-width: 2.75rem !important;
                min-height: 2.75rem !important;
                display: inline-flex !important;
                align-items: center;
                justify-content: center;
                flex: 0 0 auto;
            }

            #toast {
                left: 1rem;
                right: 1rem;
                bottom: 1rem;
                width: auto;
                padding: 0.75rem 1rem;
            }
        }

        @media (max-width: 767px) and (max-height: 600px) {
            #modal-container>* {
                overflow-y: auto !important;
            }

            .selection-current-preview {
                margin-bottom: 0.5rem !important;
                padding: 0.25rem !important;
            }

            .selection-current-preview>.text-xs {
                display: none;
            }

            #sel-preview {
                grid-template-columns: repeat(5, minmax(5rem, 1fr)) !important;
                gap: 0.25rem !important;
                overflow-x: auto;
            }

            #sel-preview>div {
                height: 2.75rem !important;
                aspect-ratio: auto !important;
            }

            #sel-preview button {
                width: 1.5rem !important;
                height: 1.5rem !important;
            }

            #sel-preview>div>button {
                top: auto !important;
                right: 50% !important;
                bottom: 0.25rem !important;
                transform: translateX(50%);
            }
        }

        .rating-track-controls {
            display: contents;
        }

        @media (min-width: 1024px) {
            .rating-track-impression-controls {
                margin-left: auto;
            }
        }

        @media (max-width: 1023px) {
            .rating-track-row {
                display: grid !important;
                grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
                gap: 0.5rem;
                padding: 0.625rem;
            }

            .rating-track-index {
                grid-column: 1;
                grid-row: 1;
                width: 2.25rem;
            }

            .rating-track-meta {
                grid-column: 2;
                grid-row: 1;
            }

            .rating-track-impression-controls {
                grid-column: 3;
                grid-row: 1;
                justify-self: center;
                align-self: center;
                margin-left: 0;
                margin-right: 0;
            }

            .rating-track-title-line {
                padding-right: 0;
            }

            .rating-track-meta>.truncate {
                overflow: visible;
                white-space: normal;
            }

            .rating-track-actions {
                grid-column: 1 / -1;
                grid-row: 2;
                width: 100% !important;
                justify-content: flex-start;
            }

            .rating-track-actions button,
            .rating-track-reference button,
            .rating-track-exclude {
                width: 2.25rem !important;
                height: 2.25rem !important;
                flex: none;
            }

            .rating-track-reference {
                grid-column: 1;
                grid-row: 3;
                width: 2.25rem !important;
            }

            .rating-track-score {
                grid-column: 2;
                grid-row: 3;
                width: 8rem !important;
                justify-self: start;
            }

            .rating-track-score>button {
                width: 2.25rem !important;
                flex: none;
            }

            .rating-track-exclude {
                grid-column: 3;
                grid-row: 3;
            }

            .rating-track-delete {
                grid-column: 1 / -1;
                grid-row: 4;
                justify-self: end;
                min-width: 2.25rem;
                min-height: 2.25rem;
            }

            .rating-track-note,
            .rating-track-references {
                margin-left: 0 !important;
                margin-right: 0 !important;
            }

            .rating-track-row-has-impression {
                grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem 2.25rem;
            }

            .rating-track-row-has-impression .rating-track-exclude {
                grid-column: 4;
                grid-row: 1;
            }

        }

        @media (max-width: 1279px) {

            #rating-overview-panel,
            #rating-tracks-panel {
                flex: 1 1 0% !important;
                min-height: 0 !important;
                position: absolute;
                inset: 0;
                width: 100% !important;
                touch-action: pan-y;
            }

            .rating-mobile-panel-motion {
                transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1),
                    opacity 360ms ease;
                will-change: transform, opacity;
            }

            .rating-mobile-panel-entering-right {
                opacity: 0;
                transform: translateX(10%);
            }

            .rating-mobile-panel-entering-left {
                opacity: 0;
                transform: translateX(-10%);
            }

            .rating-mobile-panel-leaving-left {
                opacity: 0.78;
                transform: translateX(-10%);
            }

            .rating-mobile-panel-leaving-right {
                opacity: 0.78;
                transform: translateX(10%);
            }

            .rating-mobile-panel-entered {
                opacity: 1;
                transform: translateX(0);
            }
        }

        @media (min-width: 1280px) {

            #rating-overview-panel,
            #rating-tracks-panel {
                position: static;
                inset: auto;
            }

            #rating-overview-panel {
                align-self: stretch;
                max-height: none;
                gap: 1rem;
                padding: 1rem 1.25rem 2.75rem;
            }

            #rating-overview-panel .image-drop-target {
                margin-bottom: 0.75rem;
            }

            #rating-overview-panel > .text-center.pt-2 {
                padding-top: 0.25rem;
            }

            #rating-overview-panel #rating-score-display {
                margin-top: 0.25rem;
            }

            #rating-overview-panel .rating-summary {
                padding-top: 0.625rem;
                padding-bottom: 0.625rem;
            }

            #rating-overview-panel .rating-summary .mt-2 {
                margin-top: 0.5rem;
            }

            #rating-overview-panel > .rating-overview-actions {
                padding: 0.75rem;
            }

            .rating-page-shell > #rating-mobile-panels {
                position: relative;
            }

        }

        @media (prefers-reduced-motion: reduce) {
            .rating-mobile-panel-motion {
                transition: none !important;
            }
        }

        .rating-scoring-guide-tray {
            display: none;
        }

        @media (min-width: 1280px) {
            .rating-page-shell {
                position: relative;
            }

            .rating-scoring-guide-tray {
                display: flex;
                position: absolute;
                left: 0;
                bottom: 0;
                top: auto;
                z-index: 50;
                width: min(500px, 100%);
                max-height: 100%;
                overflow: hidden;
                flex-direction: column;
                align-items: flex-start;
                pointer-events: none;
            }

            .rating-scoring-guide-tray .rating-scoring-guide-handle {
                display: none;
            }

            .rating-scoring-guide-tray .rating-scoring-guide-panel {
                order: 2;
                flex: 0 1 auto;
                width: 100%;
                min-height: 0;
                max-height: 0;
                padding: 0 1rem;
                overflow: hidden;
                scrollbar-gutter: stable;
                background: var(--theme-surface-primary);
                border: 0;
                opacity: 0;
                transform: translateY(1rem);
                transition: max-height 280ms ease, padding 280ms ease, opacity 180ms ease, transform 280ms ease;
            }

            .rating-scoring-guide-tray.is-open .rating-scoring-guide-panel {
                max-height: min(80vh, 48rem);
                padding: 1rem;
                border: 1px solid rgb(var(--theme-border-overlay-rgb) / 0.8);
                border-top: 0;
                border-radius: 0 0 0.75rem 0.75rem;
                box-shadow: 0 1.25rem 2.5rem rgb(var(--theme-shadow-color-rgb) / 0.38);
                opacity: 1;
                transform: translateY(0);
            }

            .rating-scoring-guide-tray.is-open.is-scroll-ready .rating-scoring-guide-panel {
                overflow-y: auto;
            }

            .rating-scoring-guide-tray .rating-scoring-guide-toggle {
                order: 1;
                flex: 0 0 auto;
                width: calc(100% - 1.5rem);
                min-height: 2.25rem;
                margin-left: 0.75rem;
                pointer-events: auto;
                border: 1px solid rgb(var(--theme-border-overlay-rgb) / 0.8);
                border-radius: 0.7rem 0.7rem 0 0;
                border-top-color: rgb(var(--theme-border-overlay-rgb) / 0.8);
                background: var(--theme-surface-primary);
                box-shadow: 0 0.75rem 1.5rem rgb(var(--theme-shadow-color-rgb) / 0.24);
                transition: width 280ms ease, margin 280ms ease, background-color 180ms ease;
            }

            .rating-scoring-guide-tray.is-open {
                pointer-events: auto;
            }

            .rating-scoring-guide-tray.is-open .rating-scoring-guide-toggle {
                width: 100%;
                margin-left: 0;
                border-radius: 0.7rem 0.7rem 0 0;
                border-bottom: 0;
                box-shadow: none;
            }

            .rating-scoring-guide-tray.is-open .rating-scoring-guide-chevron {
                transform: rotate(180deg);
            }
        }

        .rating-track-impression-picker-wrap {
            position: relative;
            z-index: 30;
            width: 1.75rem;
            min-width: 1.75rem;
        }

        .rating-track-impression-trigger {
            cursor: pointer;
        }

        .rating-track-impression-picker {
            position: absolute;
            top: calc(100% + 0.25rem);
            right: 0;
            z-index: 60;
            display: inline-flex;
            gap: 0.125rem;
            padding: 0.25rem;
            border: 1px solid var(--theme-border-default);
            border-radius: 0.5rem;
            background: var(--theme-surface-primary);
            box-shadow: 0 0.75rem 1.5rem rgb(var(--theme-shadow-color-rgb) / 0.35);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transform: translateY(-0.125rem);
            transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
        }

        .rating-track-impression-picker-wrap:hover .rating-track-impression-picker,
        .rating-track-impression-picker-wrap:focus-within .rating-track-impression-picker,
        .rating-track-impression-picker-wrap.is-open .rating-track-impression-picker {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
            transform: translateY(0);
        }

        .rating-track-impression-picker button {
            cursor: pointer;
        }

        @media (min-width: 1024px) {
            .rating-track-impression-picker {
                top: 50%;
                right: 100%;
                transform: translateY(-50%) translateX(0.25rem);
            }

            .rating-track-impression-picker-wrap:hover .rating-track-impression-picker,
            .rating-track-impression-picker-wrap:focus-within .rating-track-impression-picker,
            .rating-track-impression-picker-wrap.is-open .rating-track-impression-picker {
                transform: translateY(-50%) translateX(0);
            }
        }

        .rating-impression-option:hover,
        .rating-impression-option:focus-visible {
            outline: none;
        }

        .rating-impression-option.impression-down:hover,
        .rating-impression-option.impression-down:focus-visible {
            color: var(--theme-danger-bright);
            background: rgb(var(--theme-danger-bright-rgb) / 0.1);
        }

        .rating-impression-option.impression-meh:hover,
        .rating-impression-option.impression-meh:focus-visible {
            color: var(--theme-impression-meh);
            background: rgb(var(--theme-impression-meh-rgb) / 0.1);
        }

        .rating-impression-option.impression-smile:hover,
        .rating-impression-option.impression-smile:focus-visible {
            color: var(--theme-impression-smile);
            background: rgb(var(--theme-impression-smile-rgb) / 0.1);
        }

        .rating-impression-option.impression-up:hover,
        .rating-impression-option.impression-up:focus-visible {
            color: var(--theme-success-bright);
            background: rgb(var(--theme-success-bright-rgb) / 0.1);
        }

        .rating-impression-option.impression-double-up:hover,
        .rating-impression-option.impression-double-up:focus-visible {
            color: var(--theme-impression-strong);
            background: rgb(var(--theme-impression-strong-rgb) / 0.1);
        }

        .rating-impression-option.impression-love:hover,
        .rating-impression-option.impression-love:focus-visible {
            color: var(--theme-impression-love);
            background: rgb(var(--theme-impression-love-rgb) / 0.1);
        }

        @media (max-width: 767px) {
            .rating-scoring-guide-overview {
                display: none;
            }

            .rating-scoring-guide-tray {
                display: none;
            }

            .rating-scoring-guide-tray.is-section-active {
                --rating-guide-safe-top: env(safe-area-inset-top, 0px);
                --rating-guide-safe-bottom: env(safe-area-inset-bottom, 0px);
                position: fixed;
                top: var(--rating-scoring-guide-center-y, 50%);
                bottom: auto;
                right: 0;
                z-index: 40;
                display: block;
                width: min(82vw, 22rem);
                height: fit-content;
                max-height: min(70vh, 30rem, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 2rem));
                margin: 0;
                border: 1px solid var(--theme-border-overlay);
                border-radius: 0.85rem 0 0 0.85rem;
                background: var(--theme-surface-primary);
                box-shadow: -1rem 1rem 2rem rgb(var(--theme-shadow-color-rgb) / 0.35);
                transform: translate(100%, -50%);
                transition: transform 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
            }

            .rating-scoring-guide-tray.is-section-active.is-open {
                transform: translate(0, -50%);
            }

            .rating-scoring-guide-handle {
                position: absolute;
                top: 50%;
                left: -2rem;
                display: flex;
                width: 2rem;
                height: 3.5rem;
                align-items: center;
                justify-content: center;
                border: 1px solid var(--theme-border-overlay);
                border-right: 0;
                border-radius: 0.75rem 0 0 0.75rem;
                background: var(--theme-surface-primary);
                color: var(--theme-text-steel);
                transform: translateY(-50%);
            }

            .rating-scoring-guide-tray.is-open .rating-scoring-guide-handle i {
                transform: rotate(180deg);
            }

            .rating-scoring-guide-panel {
                max-height: min(70vh, 30rem, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 2rem));
                padding: 1rem;
                overflow-y: auto;
            }

            @media (prefers-reduced-motion: reduce) {
                .rating-scoring-guide-tray.is-section-active {
                    transition: none;
                }
            }

            .rating-track-row {
                grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
                column-gap: 0.5rem !important;
                row-gap: 0.5rem !important;
                padding: 0.75rem !important;
                align-items: start !important;
            }

            .rating-track-row.rating-track-row-has-impression {
                grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem 2.25rem;
            }

            .rating-track-index {
                width: 2.25rem !important;
                align-self: start;
                padding-top: 0.125rem;
            }

            .rating-track-meta {
                grid-column: 2;
            }

            .rating-track-controls {
                display: flex;
                grid-column: 1 / -1;
                grid-row: 2;
                align-items: center;
                gap: 0 !important;
                width: 100%;
                max-width: 22rem;
                min-width: 0;
                min-height: 2.75rem;
                overflow: hidden;
                border: 1px solid var(--theme-border-default);
                border-radius: 0.625rem;
                background: rgb(var(--theme-surface-void-rgb) / 0.58);
            }

            .rating-track-actions {
                order: 3;
                width: auto !important;
                height: 2.75rem;
                flex: 1 1 0%;
                justify-content: stretch !important;
                gap: 0 !important;
            }

            .rating-track-actions button {
                width: auto !important;
                height: 2.75rem !important;
                min-width: 0;
                flex: 1 1 0%;
                border-radius: 0 !important;
            }

            .rating-track-actions button+button {
                border-left: 1px solid rgb(var(--theme-surface-secondary-rgb) / 0.75);
            }

            .rating-track-reference {
                order: 1;
                width: 2.25rem !important;
                flex: 0 0 2.25rem;
                height: 2.75rem;
                display: flex;
                align-items: center;
                border-right: 1px solid var(--theme-surface-secondary);
            }

            .rating-track-reference button {
                width: 2.25rem !important;
                height: 2.75rem !important;
                margin: 0 !important;
                border-radius: 0 !important;
            }

            .rating-track-reference-empty {
                display: none;
            }

            .rating-track-score {
                order: 2;
                width: 7.5rem !important;
                flex: 0 0 7.5rem;
                height: 2.75rem;
                border: 0 !important;
                border-right: 1px solid var(--theme-surface-secondary) !important;
                border-radius: 0 !important;
                background: rgb(var(--theme-surface-inset-rgb) / 0.62);
            }

            .rating-track-score input {
                width: auto !important;
                min-width: 0;
                flex: 1 1 0%;
            }

            .rating-track-score>button,
            .rating-track-score>input {
                height: 100% !important;
            }

            .rating-track-controls button:focus-visible,
            .rating-track-controls input:focus-visible {
                outline: none;
                box-shadow: inset 0 0 0 2px rgb(var(--theme-info-rgb) / 0.75);
                position: relative;
                z-index: 1;
            }

            .rating-track-exclude {
                grid-column: 3;
                grid-row: 1;
                justify-self: center;
                align-self: start;
            }

            .rating-track-row-has-impression .rating-track-exclude {
                grid-column: 4;
            }

            .rating-track-delete {
                grid-row: 3;
            }

            .shelf-hover-info {
                position: static;
                margin-top: 0.5rem;
                padding: 0.5rem 0;
                border: 0;
                background: transparent;
                box-shadow: none;
                opacity: 1;
                transform: none;
            }

            .shelf-hover-card:hover .shelf-hover-cover,
            .shelf-hover-card:focus-visible .shelf-hover-cover,
            .compact-view-album:hover .compact-view-cover,
            .compact-view-album:focus-visible .compact-view-cover {
                transform: none;
            }

            .compact-view-cover-info {
                opacity: 1;
                transform: none;
            }
        }

        @media (max-width: 374px) {
            .rating-track-controls {
                display: grid;
                grid-template-columns: 2.25rem minmax(0, 1fr);
                column-gap: 0;
                row-gap: 0;
            }

            .rating-track-reference {
                grid-column: 1;
                grid-row: 1;
            }

            .rating-track-score {
                grid-column: 2;
                grid-row: 1;
                width: 100% !important;
                max-width: none;
                border-right: 0 !important;
            }

            .rating-track-reference-empty+.rating-track-score {
                grid-column: 1 / 3;
            }

            .rating-track-actions {
                grid-column: 1 / 3;
                grid-row: 2;
                width: 100% !important;
                border-top: 1px solid var(--theme-surface-secondary);
            }
        }

        .listening-mobile-tabs {
            display: none;
        }

        @media (max-width: 767px) {
            #listening-manager-modal {
                width: calc(100vw - 1rem) !important;
                height: calc(100dvh - 2rem) !important;
                max-height: calc(100dvh - 1rem) !important;
                border-radius: 1rem !important;
            }

            #listening-manager-modal>div:first-child {
                flex: 0 0 auto;
                padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1rem 1rem !important;
            }

            #listening-manager-modal>div:first-child>button {
                min-width: 2.75rem;
                min-height: 2.75rem;
                margin-top: 0.125rem;
            }

            #listening-manager-modal h3 {
                font-size: 1.15rem;
            }

            .listening-manager-help {
                font-size: 0 !important;
            }

            .listening-manager-help::after {
                content: "Choose a list, then use the three-dot menu for album actions.";
                font-size: 0.65rem;
            }

            .listening-mobile-tabs {
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 0.35rem;
                padding: 0.65rem 0.75rem 0;
                background: var(--theme-surface-primary);
            }

            .listening-mobile-tabs button {
                display: flex;
                min-height: 2.75rem;
                align-items: center;
                justify-content: center;
                gap: 0.35rem;
                padding: 0.45rem 0.3rem;
                border: 1px solid var(--theme-border-cool);
                border-radius: 0.6rem;
                background: var(--theme-surface-feature);
                color: var(--theme-text-ui-muted);
                font-size: 0.62rem;
                font-weight: 800;
            }

            .listening-mobile-tabs button.is-active {
                border-color: var(--theme-accent-border);
                background: var(--theme-surface-accent-elevated);
                color: var(--theme-listening-active-text);
            }

            .listening-mobile-tabs button i {
                font-size: 0.65rem;
            }

            .listening-mobile-tabs button b {
                color: var(--theme-text-subdued);
                font-size: 0.55rem;
            }

            .listening-manager-columns {
                display: block !important;
                flex: 1 1 auto;
                height: 0;
                min-height: 0 !important;
                padding: 0.75rem !important;
                overflow: hidden !important;
            }

            .listening-column-section {
                display: none !important;
                height: 100%;
                min-height: 0;
                overflow: hidden;
                padding: 0.65rem !important;
            }

            .listening-column-section.is-mobile-active {
                display: flex !important;
            }

            .listening-column-section>.listening-column {
                min-height: 0;
                height: 100%;
                max-height: none;
                padding-right: 0;
            }

            #listening-manager-modal article {
                min-height: 4.6rem;
                gap: 0.65rem;
                padding: 0.7rem;
            }

            #listening-manager-modal article>img {
                width: 3rem;
                height: 3rem;
            }

            #listening-manager-modal article button {
                min-width: 2.25rem;
                min-height: 2.25rem;
            }

            #listening-manager-modal article [data-listening-menu] {
                min-width: 10.5rem;
            }
        }

        .fantano-rating-overlay {
            position: absolute;
            left: 50%;
            top: 50%;
            z-index: 12;
            display: block;
            width: 36%;
            max-width: 9rem;
            pointer-events: none;
            transform: translate(-50%, -50%);
            filter: drop-shadow(0 0.12rem 0.18rem rgb(var(--theme-shadow-color-rgb) / 0.8));
        }

        #modal-container:has(.listening-manager-drawer-shell) {
            align-items: stretch;
            justify-content: flex-end;
            padding: 0;
            background: rgb(var(--theme-shadow-color-rgb) / 0.62);
        }

        .listening-manager-drawer-shell {
            width: 100%;
            height: 100%;
            min-height: 100%;
            max-height: none !important;
            display: flex;
            justify-content: flex-end;
        }

        .listening-manager-drawer {
            width: min(570px, 100vw);
            height: 100%;
            display: flex;
            flex-direction: column;
            background: var(--theme-surface-primary);
            border-left: 1px solid var(--theme-border-cool);
            box-shadow: -1rem 0 3rem rgb(var(--theme-shadow-color-rgb) / 0.3);
            animation: listening-drawer-in 180ms ease-out both;
        }

        .listening-drawer-queue {
            flex: 0 1 auto;
            max-height: min(42vh, 30rem);
        }

        .listening-drawer-collections {
            flex: 1 1 0%;
        }

        [data-listening-sort-item] {
            transition: margin 160ms ease, opacity 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
            touch-action: pan-y;
            user-select: none;
        }

        [data-listening-sort-item].is-dragging {
            opacity: 1;
            border-color: rgb(var(--theme-info-rgb) / 0.85);
            box-shadow: 0 0 0 1px rgb(var(--theme-info-rgb) / 0.28);
            transition: none !important;
        }

        [data-listening-sort-item].drop-target-top {
            margin-top: 0.65rem;
            border-top-color: rgb(var(--theme-info-rgb) / 0.8);
        }

        [data-listening-sort-item].drop-target-bottom {
            margin-bottom: 0.65rem;
            border-bottom-color: rgb(var(--theme-info-rgb) / 0.8);
        }

        .listening-insertion-line {
            position: relative;
            z-index: 2;
            height: 2px;
            min-height: 2px;
            margin: 0.12rem 0 !important;
            border-radius: 999px;
            background: var(--theme-listening-insertion);
            box-shadow: 0 0 0 1px rgb(var(--theme-listening-insertion-rgb) / 0.18), 0 0 0.45rem rgb(var(--theme-listening-insertion-rgb) / 0.55);
            pointer-events: none;
        }

        .listening-scrollbar {
            scrollbar-width: thin;
            scrollbar-color: var(--theme-scrollbar-thumb) transparent;
        }

        .listening-scrollbar::-webkit-scrollbar {
            width: 6px;
            height: 6px;
        }

        .listening-scrollbar::-webkit-scrollbar-track {
            background: transparent;
        }

        .listening-scrollbar::-webkit-scrollbar-thumb {
            background: var(--theme-scrollbar-thumb);
            border: 1px solid var(--theme-surface-primary);
            border-radius: 999px;
        }

        .listening-scrollbar::-webkit-scrollbar-thumb:hover {
            background: var(--theme-scrollbar-hover);
        }

        @keyframes listening-drawer-in {
            from { transform: translateX(100%); }
            to { transform: translateX(0); }
        }

        @media (max-width: 767px) {
            .listening-manager-drawer {
                width: min(100vw, 34rem);
                padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
                padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
                overflow: hidden;
            }

            .listening-manager-drawer > .p-5 {
                padding: 0.9rem 0.9rem 0.65rem !important;
            }

            .listening-manager-drawer > .p-5 .text-xs.text-gray-500 {
                display: none;
            }

            .listening-manager-drawer-scroll {
                gap: 0.65rem !important;
                padding: 0.65rem !important;
            }

            .listening-drawer-queue {
                max-height: min(32dvh, 21rem);
                padding: 0.65rem !important;
            }

            .listening-drawer-collections {
                padding: 0.65rem !important;
            }

            .listening-drawer-queue > div:first-child,
            .listening-drawer-collections > div:first-child {
                margin-bottom: 0.5rem !important;
            }

            .listening-manager-drawer article {
                min-height: 4.6rem;
                gap: 0.65rem;
                padding: 0.7rem;
            }

            .listening-manager-drawer article > img {
                width: 3rem;
                height: 3rem;
            }

            .listening-manager-drawer article button {
                min-width: 0;
                min-height: 1.5rem;
                padding: 0.125rem 0.375rem;
            }

            .listening-manager-drawer [data-listening-drop-container] {
                overscroll-behavior: contain;
            }

            .listening-manager-drawer [data-listening-sort-item] {
                user-select: text;
                -webkit-user-select: text;
                -webkit-touch-callout: default;
            }

            .listening-manager-drawer [data-listening-sort-item] img {
                -webkit-user-drag: none;
                user-drag: none;
            }

            html.listening-pointer-dragging,
            html.listening-pointer-dragging body,
            html.listening-pointer-dragging [data-listening-sort-item] {
                user-select: none !important;
                -webkit-user-select: none !important;
                -webkit-touch-callout: none !important;
                touch-action: none !important;
            }

            html.listening-pointer-dragging,
            html.listening-pointer-dragging body,
            html.listening-pointer-dragging #modal-container {
                overflow-x: hidden !important;
                overscroll-behavior-x: none !important;
            }

            html.listening-pointer-dragging body {
                cursor: grabbing;
            }

            .listening-manager-drawer [data-listening-sort-item].is-dragging {
                position: relative;
                z-index: 4;
                cursor: grabbing;
                transform: translateY(-2px) scale(1.01);
                background: var(--theme-surface-accent-elevated);
                box-shadow: 0 0.4rem 1rem rgb(var(--theme-shadow-color-rgb) / 0.28), 0 0 0 1px rgb(var(--theme-info-rgb) / 0.28);
            }

            .listening-manager-drawer [data-listening-sort-item].is-drag-source {
                visibility: hidden;
                transform: none !important;
                box-shadow: none !important;
            }

            .listening-drag-preview {
                position: fixed;
                left: 0;
                top: 0;
                z-index: 1000;
                margin: 0 !important;
                pointer-events: none;
                opacity: 0.98;
                transform: translate3d(0, 0, 0);
                box-shadow: 0 0.5rem 1.25rem rgb(var(--theme-shadow-color-rgb) / 0.4), 0 0 0 1px rgb(var(--theme-info-rgb) / 0.55);
                will-change: transform;
            }

            .listening-manager-drawer [data-listening-sort-item]:active:not(.is-dragging) {
                cursor: grab;
            }

            .listening-manager-drawer .listening-insertion-line {
                height: 3px;
                min-height: 3px;
                margin: 0.2rem 0 !important;
            }

        }

        .fantano-rating-overlay img {
            display: block;
            width: 100%;
            height: auto;
            object-fit: contain;
        }

        .fantano-rating-overlay .fantano-rating-qualifier {
            position: absolute;
            top: 50%;
            left: 50%;
            z-index: 2;
            width: 250%;
            max-width: none;
            transform: translate(-50%, -50%);
        }

        .fantano-rating-overlay .fantano-rating-number {
            position: relative;
            left: 50%;
            z-index: 1;
            max-width: none;
            transform: translateX(-50%);
        }

        /* Individual number sizing: adjust only the number you need. */
        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="0"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="1"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="2"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="3"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="4"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="5"] {
            width: 120%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="6"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="7"] {
            width: 135%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="8"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="9"] {
            width: 100%;
        }

        .fantano-rating-overlay .fantano-rating-number[data-fantano-number="10"] {
            width: 200%;
        }

        [data-fantano-overlay-for] {
            pointer-events: none;
        }

        .bside-image-preview img {
            user-select: none;
        }

        @media (prefers-reduced-motion: reduce) {
            .bside-image-preview {
                animation: none !important;
            }
        }
