
        /* Preserve sticky behavior: do NOT set overflow on html/body (breaks sticky) */
        html { overflow-x: visible; scroll-behavior: smooth; }
        body { overflow-x: visible; }
        /* Smooth anchor scrolling with fixed-nav offset for all sections with data-anchor */
        [data-anchor] { scroll-margin-top: calc(var(--nav-height, 100px) + 16px); }

        /* Modern Music Catalog Application Styles */
        body {
            background: var(--gray-600);
            padding-top: var(--nav-height, 100px);
        }
        /* Removed top border strip */
        /* Ensure global nav is fixed above content, like media.html */
        .example-1 { position: fixed; top: 0; left: 0; right: 0; z-index: 5000; background: var(--surface, #ffffff); }
        .main-nav { z-index: 6000 !important; }
        /* Dropdown menus: always present for animation; hidden via visibility/opacity */
        .main-nav .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            z-index: 6001 !important;
            display: block !important;
            visibility: hidden;
            opacity: 0;
            transform: translateY(6px) scale(.98);
            transition: opacity .18s ease, transform .18s ease, visibility .18s step-start;
            pointer-events: none;
            will-change: opacity, transform;
        }
        /* Open/hover state: fade + slide-in */
        .main-nav .nav-item { position: relative; }
        .main-nav .nav-item:hover > .dropdown-menu,
        .main-nav .nav-item.open > .dropdown-menu {
            visibility: visible !important;
            opacity: 1 !important;
            transform: translateY(0) scale(1) !important;
            pointer-events: auto;
            transition: opacity .16s ease, transform .16s ease, visibility .16s step-end;
        }
        /* Fade-in content inside menus so text doesn't pop in */
        .main-nav .dropdown-menu > * { opacity: 0; transform: translateY(4px); transition: opacity .18s ease .10s, transform .18s ease .10s; will-change: opacity, transform; }
        .main-nav .nav-item:hover > .dropdown-menu > *,
        .main-nav .nav-item.open > .dropdown-menu > * { opacity: 1; transform: translateY(0); }
        .example-1 .header-base::after { display: none; }

        /* Page-scoped color variables (light defaults, overridden in dark) */
        :root {
            --page-bg: var(--gray-50);
            --surface: #ffffff;
            --border: var(--gray-200);
            --border-subtle: var(--gray-200);
        }
        body.dark-mode,
        body[data-theme="dark"] {
            --page-bg: #0b1220;
            --surface: #0f172a;
            --border: #1f2937;
            --border-subtle: #1f2937;
        }

        /* Main Header Section */
        .catalog-header {
            background: var(--surface);
            padding: 1.25rem 0; /* reduced vertical padding to sit closer to nav */
            width: 100%;
        }
        /* Subtle header sky gradient */
        .catalog-header{
            background:
                radial-gradient(1200px 420px at 50% -220px, rgba(59,130,246,.08), transparent 60%),
                var(--surface);
        }
        body.dark-mode .catalog-header,
        body[data-theme="dark"] .catalog-header{
            background:
                radial-gradient(1200px 420px at 50% -220px, rgba(59,130,246,.16), transparent 60%),
                #0f172a;
        }

        .header-content {
            max-width: 1100px; /* significantly inward from full width */
            margin: 0 auto;     /* center the block */
            padding: 0 1.5rem;  /* comfortable inner gutters */
            text-align: center; /* center the header title */
            padding-bottom: 1.25rem;
        }

        .header-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--gray-900);
            margin-bottom: 0.5rem;
        }

        .header-description {
            font-size: 1rem;
            color: var(--gray-600);
            max-width: 800px;
            line-height: 1.6;
            margin-left: auto;
            margin-right: auto;
            text-align: left;   /* keep paragraph alignment left */
        }

        /* Advanced Filter Panel - Desktop Sticky */
        .filter-panel {
            background: var(--surface);
            position: sticky !important;
            top: var(--nav-height, 100px) !important;
            z-index: 400 !important;
            width: 100%;
            border-top: 1px solid var(--gray-100);
            border-bottom: 1px solid var(--gray-100);
            box-shadow: 0 12px 24px -18px rgba(2,6,23,.22);
            overflow: visible !important;
            scroll-margin-top: calc(var(--nav-height, 100px) + 20px);
            /* Ensure it sticks properly */
            transform: translateZ(0);
            will-change: transform;
        }

        /* Force sticky positioning with maximum specificity for desktop */
        @media (min-width: 1025px) {
            div.filter-panel#catalog-filters {
                position: sticky !important;
                top: 0 !important;
                z-index: 400 !important;
                background: var(--surface);
                width: 100%;
                transform: translateZ(0) !important;
                will-change: transform !important;
            }
        }
        
        /* Force sticky positioning with maximum specificity - now using div */
        div.filter-panel#catalog-filters {
            position: sticky !important;
            top: 0 !important;
            z-index: 400 !important;
            background: var(--surface);
            width: 100%;
        }

        .filter-content {
            max-width: 100%;
            margin: 0 auto;
            box-sizing: content-box;
            padding: 1.5rem 2rem;
        }



        /* Filter Controls Row */
        .filter-controls {
            max-width: 1320px;
            margin: 0 auto;
            padding: 1rem 1.5rem;
            display: flex;
            flex-direction: column;
            gap: .75rem;
            overflow: visible;
        }
        /* Opt-in frosted look for catalog filter rail */
        #catalog-filters .filter-controls.u-glass-rail { border-bottom-left-radius:12px; border-bottom-right-radius:12px; background: rgba(243, 247, 248, 0.261); border-top: 2px solid white;; border-bottom: 1px solid var(--glass-border); -webkit-backdrop-filter: saturate(1.1) blur(calc(var(--glass-blur) - 8px)); backdrop-filter: saturate(1.1) blur(calc(var(--glass-blur) - 8px)); box-shadow: var(--glass-shadow); }
        /* Catalog filter content: softly frosted like Media/News */
        #catalog-filters .filter-content.u-glass-bare.u-glass-soft { background: rgba(16, 41, 54, 0.267); -webkit-backdrop-filter: saturate(1.1) blur(var(--glass-blur)); backdrop-filter: saturate(1.1) blur(var(--glass-blur)); }

        /* Top Row: Combined Category and Filter Controls */
        .top-controls {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        /* Left Side: Category Group */
        .category-group {
            display: flex;
            align-items: center;
        }

        /* Right Side: Filter and View Group */
        .filter-view-group {
            display: flex;
            align-items: center;
            gap: 1.5rem;
        }

        .filter-group {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .filter-divider {
            width: 1px;
            height: 24px;
            background: var(--border, var(--gray-200));
            margin: 0 0.5rem;
        }

        /* Button Group Filters */
        .button-group {
            display: flex;
            border-radius: 6px;
            border: 1px solid var(--border, var(--gray-300));
            background: var(--surface, #ffffff);
            overflow-x: auto;
            overflow-y: hidden;
            scrollbar-width: none;
            -ms-overflow-style: none;
            gap: 0.125rem;
            padding: 0.125rem;
            max-width: 100%;
        }

        .button-group::-webkit-scrollbar {
            display: none;
        }

        .button-group.carousel-enabled {
            gap: 0.125rem;
            padding: 0.125rem;
        }

        .button-group button {
            padding: 0.5rem 0.875rem;
            border: none;
            background: var(--surface, #ffffff);
            color: var(--gray-700);
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
            border-radius: 6px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .button-group.carousel-enabled button {
            padding: 0.4rem 0.75rem;
            font-size: 0.75rem;
        }

        .button-group button:hover { background: var(--gray-50); color: #0f172a; }
        body.dark-mode .button-group button:hover,
        body[data-theme="dark"] .button-group button:hover { background: #1f2937; color: #e5e7eb; }

        .button-group button.active {
            background: var(--primary-500);
            color: white;
        }
        /* Gradient underline for active filter */
        /* Remove gradient underline to match media.html */

        /* Dropdown Filters */
        .dropdown-filter {
            position: relative;
            display: inline-block;
        }
        /* Ensure category group visually matches media */
        .button-group.btn-group button { padding:.6rem 1rem; background: #ffffff; border:1px solid var(--gray-200); border-radius:10px; color: #0f172a; font-weight:500; font-size:1rem; letter-spacing:-0.005em; }
        .button-group.btn-group button.active { color:white; background: color-mix(in srgb, var(--gray-900) 90%, white); }
        body.dark-mode .button-group.btn-group button,
        body[data-theme="dark"] .button-group.btn-group button { background: #ffffff; color: #0f172a; border-color: #e2e8f0; }

        /* === Media-page style rows for filters === */
        .row { display:flex; align-items:center; justify-content:space-between; gap:.75rem; flex-wrap:wrap; }
        .filters-r1 { align-items:center; }
        .filters-r1 .r1-right { margin-left:auto; display:flex; align-items:center; gap:.5rem; }
        .filters-r2 { align-items:flex-start; justify-content:space-between; }
        .filters-r2 .l { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
        .filters-r2 .r { display:flex; gap:.5rem; align-items:center; }
        .btn-group { display:inline-flex; gap:.35rem; background: transparent; border:0; }
        .btn-group button { padding:.55rem .9rem; background: transparent; border:0; cursor:pointer; color: var(--gray-700); font-weight:500; }
        .btn-group button.active { color:white; background: color-mix(in srgb, var(--gray-900) 90%, white); border-radius:10px; }
        .btn-group button:not(.active){ border:1px solid var(--gray-200); border-radius:10px; }
        .btn-group button:not(.active):hover { background: var(--gray-50); }

        /* Clear all button aligned with media page style */
        #clear-all-filters-top { padding:.5rem .9rem; border-radius:10px; border:1px solid var(--gray-300); background: var(--surface); color: var(--gray-800); font-weight:600; font-size:.95rem; letter-spacing:-0.005em; }
        #clear-all-filters-top:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(2,6,23,.08); background: var(--gray-50); }
        #resultCount { color: var(--gray-300); font-weight: 500;}
        .search-compact { display:flex; align-items:center; gap:.5rem; }
        .icon-btn { background:none; border:0; padding:0; line-height:0; cursor:pointer; color:#475569; }
        .icon-btn:hover { color:#0f172a; }
        .search-compact input { width:0; opacity:0; padding:.6rem 0; border:1px solid transparent; transition: width .2s ease, opacity .15s ease, padding .2s ease, border-color .2s ease; border-radius:10px; }
        .search-compact.open input { width:260px; opacity:1; padding:.6rem .75rem; border-color: var(--gray-300); }

        .dropdown-button {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .6rem;
            padding: .45rem .7rem;
            border: 1px solid var(--gray-200);
            border-radius: 10px;
            background: var(--surface, #ffffff);
            color: var(--gray-800);
            font-size: .98rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
            min-width: 160px;
            width: 160px;
        }

        .dropdown-button:hover { border-color: var(--primary-300); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }

        .dropdown-button.active { border-color: var(--primary-400); background: var(--surface, #ffffff); color: var(--gray-800); }
        /* Dropdown content */
        .dropdown-content {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--surface, #ffffff);
            border: 1px solid var(--gray-200);
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            z-index: 1000;
            display: none;
            max-height: 320px;
            overflow-y: auto;
            padding: .5rem;
            transform: translateY(4px) scale(.98);
            transform-origin: top left;
            opacity: .98;
            transition: transform .12s ease, opacity .12s ease;
            min-width: 200px;
        }

        .dropdown-content.show {
            display: block;
            transform: translateY(0) scale(1);
            opacity: 1;
        }

        .dropdown-option { padding: .6rem .75rem; cursor: pointer; font-size: .98rem; transition: background-color .15s ease, color .15s ease, border-color .15s ease; border-radius: 8px; margin: 0.125rem 0.5rem; }
        .dropdown-option:hover { background: var(--gray-100); }

        .dropdown-option.selected { background: var(--gray-100); color: var(--gray-900); font-weight: 600; }

        /* Multi-Select Dropdown */
        .multi-select-dropdown {
            position: relative;
            display: inline-block;
        }

        .multi-select-button {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: .6rem;
            padding: .45rem .7rem;
            border: 1px solid var(--gray-200);
            border-radius: 10px;
            background: var(--surface, #ffffff);
            color: var(--gray-800);
            font-size: .98rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
            min-width: 160px;
            width: 160px;
        }

        .multi-select-button:hover { border-color: var(--primary-300); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }

        .multi-select-button.active { border-color: var(--primary-400); color: var(--gray-800); background: var(--surface, #ffffff); }

        .multi-select-content {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--surface, #ffffff);
            border: 1px solid var(--gray-200);
            border-radius: 12px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
            z-index: 1000;
            display: none;
            max-height: 320px;
            overflow-y: auto;
            margin-top: 0.5rem;
            padding: .5rem;
            transform: translateY(4px) scale(.98);
            transform-origin: top left;
            opacity: .98;
            transition: transform .12s ease, opacity .12s ease;
            min-width: 200px;
        }

        .multi-select-content.show {
            display: block;
            transform: translateY(0) scale(1);
            opacity: 1;
        }

        /* Subtle item reveal animation on menu open */
        @keyframes dropdownItemIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
        @media (prefers-reduced-motion: no-preference) {
            .dropdown-content.show .dropdown-option,
            .multi-select-content.show .multi-select-option { animation: dropdownItemIn .14s ease both; animation-delay: .10s; }
            .dropdown-content.show .dropdown-option:nth-child(1), .multi-select-content.show .multi-select-option:nth-child(1) { animation-delay: 0s; }
            .dropdown-content.show .dropdown-option:nth-child(2), .multi-select-content.show .multi-select-option:nth-child(2) { animation-delay: .02s; }
            .dropdown-content.show .dropdown-option:nth-child(3), .multi-select-content.show .multi-select-option:nth-child(3) { animation-delay: .04s; }
            .dropdown-content.show .dropdown-option:nth-child(4), .multi-select-content.show .multi-select-option:nth-child(4) { animation-delay: .06s; }
            .dropdown-content.show .dropdown-option:nth-child(5), .multi-select-content.show .multi-select-option:nth-child(5) { animation-delay: .08s; }
        }
        @media (prefers-reduced-motion: reduce) {
            .dropdown-content.show .dropdown-option,
            .multi-select-content.show .multi-select-option { animation: none !important; }
        }

        .multi-select-option {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: .6rem .75rem;
            cursor: pointer;
            font-size: .98rem;
            transition: background-color .15s ease, color .15s ease, border-color .15s ease;
            border-radius: 8px;
            margin: 0.125rem 0.25rem;
        }

        .multi-select-option:hover { background: var(--gray-100); }

        /* Selected option should not hide text — only indicate via checkbox and subtle background */
        .multi-select-option.selected {
            background: var(--gray-50);
            color: var(--gray-900);
            font-weight: 600;
        }

        .multi-select-checkbox {
            width: 16px;
            height: 16px;
            border: 2px solid var(--gray-300);
            border-radius: 3px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
            flex-shrink: 0;
            background: var(--surface, #ffffff);
            position: relative;
            overflow: hidden;
        }

        /* When selected, fill the checkbox with brand color */
        .multi-select-option.selected .multi-select-checkbox {
            background: #ffffff;
            border-color: var(--gray-900);
        }

        /* Reset any previous after-tick implementation */
        .multi-select-checkbox::after {
            content: none;
        }

        /* Single source of truth for the checkmark */
        .multi-select-checkbox::before {
            content: '✓';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -58%) scale(0.8);
            color: var(--gray-900);
            font-weight: 800;
            font-size: 12px;
            line-height: 1;
            opacity: 0;
            transition: opacity 140ms ease, transform 140ms ease;
        }

        .multi-select-option.selected .multi-select-checkbox::before {
            opacity: 1;
            transform: translate(-50%, -58%) scale(1);
        }

        /* Active Filters Dropdown */
        .active-filters-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: auto;
            background: white;
            border: 1px solid var(--gray-200);
            border-radius: 8px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            z-index: 50;
            display: none;
            min-width: 200px;
            padding: 0.75rem;
            margin-top: 0.5rem;
        }

        .active-filters-dropdown.show {
            display: block;
        }

        .active-filters-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        .active-filter-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.5rem;
            background: var(--gray-50);
            border-radius: 6px;
            font-size: 0.875rem;
        }

        .active-filter-label {
            color: var(--gray-700);
            font-weight: 500;
        }
        .active-filter-value {
            color: var(--gray-900);
            font-weight: 600;
        }
        .remove-filter-btn {
            background: none;
            border: none;
            color: var(--gray-400);
            cursor: pointer;
            padding: 0.25rem;
            border-radius: 4px;
            transition: background-color .15s ease, color .15s ease;
        }

        .remove-filter-btn:hover {
            color: var(--red-500);
            background: var(--red-50);
        }

        .active-filters-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid var(--gray-200);
        }
        /* Gallery View Styles */
        .compositions-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 2rem;
            margin-top: 1rem;
        }
        .composition-card {
            background: var(--surface, #ffffff);
            border: 1px solid var(--gray-200);
            border-radius: 16px;
            padding: 1.5rem;
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        /* Card list visual separation when stacked */
        #gallery-view .composition-card { border-bottom: 1px solid var(--border-subtle, var(--gray-200)); }
        #gallery-view .composition-card:last-child { border-bottom-color: transparent; }

        .composition-card:hover {
            border-color: var(--primary-300);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            transform: translateY(-4px);
        }

        .composition-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .composition-card:hover::before {
            opacity: 1;
        }

        /* Hover overlay for composition cards (shows prominent info) */
        .composition-card .composition-hover-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: flex-start;
            justify-content: flex-start;
            padding: .75rem 1rem;
            background: linear-gradient(180deg, rgba(2,6,23,.85) 0%, rgba(2,6,23,.65) 35%, rgba(2,6,23,.9) 100%);
            color: #fff;
            opacity: 0;
            transition: opacity .18s ease;
            pointer-events: none;
            border-radius: inherit;
        }
        .composition-card:hover .composition-hover-overlay { opacity: 1; pointer-events: auto; }
        .composition-card .composition-overlay-content { width: 100%; height: 100%; display: flex; flex-direction: column; }
        .composition-card .ov-title { font-weight: 900; letter-spacing: -0.01em; margin: 0; line-height: 1.05; font-size: 1.05rem; }
        .composition-card .ov-instrument { margin-top: .25rem; font-weight: 700; font-size: .95rem; color: #e6edf7; }
        .composition-card .ov-row { display: flex; gap: .45rem; margin-top: .6rem; align-items: center; flex-wrap: wrap; }
        .composition-card .ov-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .55rem; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); font-weight: 800; font-size: .85rem; }
        .composition-card .ov-description { margin-top: .55rem; color: #e5e7eb; font-size: .9rem; line-height: 1.35; display: block; flex: 1 1 auto; overflow: hidden; position: relative; }
        .composition-card .ov-description::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3rem; pointer-events: none; background: linear-gradient(180deg, rgba(2,6,23,0) 0%, rgba(2,6,23,.45) 55%, rgba(2,6,23,.85) 100%); }
        .composition-card .ov-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; margin-top: auto; padding: .5rem .85rem; border-radius: 10px; background: #fff; color: #0f172a; text-decoration: none; font-weight: 800; }

        .composition-card-header {
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .composition-card-cover {
            width: 80px;
            height: 80px;
            border-radius: 12px;
            overflow: hidden;
            flex-shrink: 0;
            background: var(--gray-100);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        .card-cover-hover-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background: linear-gradient(180deg, rgba(2,6,23,0), rgba(2,6,23,.6)); color:#fff; opacity:0; transition: opacity .18s ease; border-radius: inherit; pointer-events: none; z-index: 1; }
        .composition-card-cover:hover .card-cover-hover-overlay { opacity:1; pointer-events:auto; }
        .card-cover-learn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.98); opacity: 0; pointer-events: none; z-index: 2; display:inline-flex; align-items:center; gap:.4rem; padding:.5rem .8rem; border-radius:10px; border:1px solid rgba(255,255,255,.25); background: rgba(15,23,42,.6); color:#fff; font-weight:800; font-size:.85rem; text-decoration:none; transition: opacity .18s ease, transform .18s ease; }
        .composition-card-cover:hover .card-cover-learn { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
        .card-cover-learn:hover { background: rgba(15,23,42,.54); box-shadow: 0 8px 18px rgba(2,6,23,.28); }

        .composition-card-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .composition-card-cover .silo-placeholder,
        .composition-card-cover .feature-media,
        .composition-card-cover .catalog-placeholder-target { width:100%; height:100%; display:block; border-radius: inherit; }

        .composition-card-cover-placeholder {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 2rem;
            font-weight: 600;
        }

        .composition-card-text {
            flex: 1;
        }

        .composition-card-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--gray-900);
            margin: 0 0 0.5rem 0;
        }

        .composition-card-instrumentation {
            font-size: 0.875rem;
            color: var(--gray-600);
            margin: 0;
        }

        .composition-card-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .composition-card-action {
            margin-top: 1rem;
        }

        /* Meta Badges */
        .meta-badge {
            padding: 0.125rem 0.5rem;
            background: var(--gray-100);
            color: var(--gray-600);
            border-radius: 12px;
            font-size: 0.75rem;
            font-weight: 500;
        }
        /* Results Section */
        .results-section {
            max-width: 100%;
            padding: 1.25rem 2rem 1.25rem 2rem;
            background: linear-gradient(180deg, var(--gray-700), var(--gray-800));
            border-top: 1px solid var(--gray-200);
            border-bottom: 1px solid var(--gray-200);
            box-shadow: inset 0 16px -8px rgba(0, 0, 0, 0.7);
        }

        .results-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .results-info {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .results-count {
            font-size: 0.875rem;
            color: var(--gray-600);
        }

        .view-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .view-toggle {
            display: inline-flex;
            border-radius: 6px;
            border: 1px solid var(--border, var(--gray-300));
            background: var(--surface, #ffffff);
            overflow: hidden;
        }

        .view-toggle button {
            padding: 0.5rem;
            border: none;
            background: var(--surface, #ffffff);
            color: var(--gray-500);
            cursor: pointer;
            transition: background-color .15s ease, color .15s ease, border-color .15s ease;
        }

        .view-toggle button:hover {
            background: var(--gray-50);
        }

        .view-toggle button.active {
            background: var(--primary-500);
            color: white;
        }

        .sort-dropdown {
            position: relative;
        }

        .sort-button {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.8rem;
            border: 1px solid var(--border, var(--gray-300));
            background: var(--surface, #ffffff);
            color: var(--gray-600);
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
            border-radius: 8px;
        }

        .sort-button:hover {
            color: var(--gray-800);
        }

        /* Compositions Grid */
        .compositions-container {
            background: var(--surface, #ffffff);
            border-radius: 12px;
            overflow: hidden;
        }

        .compositions-table {
            width: 100%;
        }
        /* Add subtle row separators for readability */
        .compositions-table tbody tr.composition-row { border-bottom: 1px solid var(--border-subtle, var(--gray-200)); }
        .compositions-table tbody tr.composition-row:last-child { border-bottom: none; }

        .table-header {
            background: var(--surface, #ffffff);
            border-top: 1px solid var(--border, var(--gray-200));
            border-left: 1px solid var(--border, var(--gray-200));
            border-right: 1px solid var(--border, var(--gray-200));
            border-bottom: none;
        }

        .table-header-row {
                display: grid;
            grid-template-columns: 3fr 0.6fr 0.6fr 200px;
            gap: 1rem;
            padding: 0.75rem 1.5rem;
            align-items: center;
        }
        .table-header-cell {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--gray-500);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .table-header-cell:first-child {
            text-align: left;
            justify-content: flex-start;
        }

        .composition-row {
                display: grid;
            grid-template-columns: 3fr 0.6fr 0.6fr 200px;
            gap: 1rem;
            padding: 0.75rem 1.5rem;
            align-items: center;
            transition: background-color .18s ease;
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            background: var(--primary-50)
        }

        .composition-row > td:first-child {
            display: flex;
            align-items: center;
            justify-content: flex-start;
        }

        .composition-row:hover {
            transition: transform .18s ease;
            background: var(--hover-bg, var(--primary-200));
            transform: translateY(-3px);
        }
        /* Accent line on hover */
        .composition-row{ position: relative; }
        .composition-row::before{
            content: '';
            position: absolute; left: 0; top: 0; bottom: 0; width: 0;
            background: linear-gradient(180deg,#5B86F9,#7C3AED); border-radius: 0 2px 2px 0;
            transition: width .18s ease;
        }
        .composition-row:hover::before{ width: 3px; }
        body.dark-mode .composition-row:hover,
        body[data-theme="dark"] .composition-row:hover { background: rgba(59,130,246,0.10); }

        /* Keep inner cells and text block from popping out on hover */
        .composition-row > td { background: transparent; }
        .composition-text, .composition-main { background: transparent; box-shadow: none; }
        .composition-row:hover > td { background: inherit; }
        body.dark-mode .composition-row > td,
        body[data-theme="dark"] .composition-row > td,
        body.dark-mode .composition-row:hover > td,
        body[data-theme="dark"] .composition-row:hover > td,
        body.dark-mode .composition-text,
        body[data-theme="dark"] .composition-text,
        body.dark-mode .composition-row:hover .composition-text,
        body[data-theme="dark"] .composition-row:hover .composition-text { background: transparent; box-shadow: none; }

        .composition-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            gap: 1rem;
        }

        .composition-main {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex: 1;
        }

        .composition-cover {
            width: 60px;
            height: 60px;
            border-radius: 8px;
            overflow: hidden;
            flex-shrink: 0;
            background: var(--gray-100);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        .cover-hover-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background: linear-gradient(180deg, rgba(2,6,23,0), rgba(2,6,23,.6)); color:#fff; opacity:0; transition: opacity .18s ease; border-radius: inherit; pointer-events: none; z-index: 1; }
        .composition-cover:hover .cover-hover-overlay { opacity:1; pointer-events:auto; }
        .cover-learn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.98); opacity: 0; pointer-events: none; z-index: 2; display:inline-flex; align-items:center; gap:.35rem; padding:.4rem .7rem; border-radius:8px; border:1px solid rgba(255,255,255,.25); background: rgba(15,23,42,.6); color:#fff; font-weight:800; font-size:.8rem; text-decoration:none; transition: opacity .18s ease, transform .18s ease; }
        .composition-cover:hover .cover-learn { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
        .cover-learn:hover { background: rgba(15,23,42,.54); box-shadow: 0 8px 18px rgba(2,6,23,.28); }

        .composition-cover img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .composition-cover .silo-placeholder,
        .composition-cover .feature-media,
        .composition-cover .catalog-placeholder-target { width:100%; height:100%; display:block; border-radius: inherit; }

        .composition-cover-placeholder {
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
                align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.5rem;
            font-weight: 600;
        }

        .composition-text {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            align-items: flex-start;
            flex: 1;
        }

        .composition-title {
            font-size: 1rem;
            font-weight: 500;
            color: var(--gray-900);
            margin: 0;
            line-height: 1.4;
        }
        body.dark-mode .composition-title,
        body[data-theme="dark"] .composition-title { color: #f8fafc; }

        .composition-instrumentation {
            font-size: 0.875rem;
            color: var(--gray-600);
            margin: 0;
        }

        .composition-meta {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .composition-duration,
        .composition-year {
            font-size: 0.875rem;
            color: var(--gray-700);
            font-weight: 500;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 0.25rem;
        }

        /* Brighter meta text in dark mode for readability */
        body.dark-mode .composition-duration,
        body[data-theme="dark"] .composition-duration,
        body.dark-mode .composition-year,
        body[data-theme="dark"] .composition-year { color: #e2e8f0; }

        .composition-action { display: flex; justify-content: center; align-items: center; gap: 0rem; flex-wrap: wrap; }

        .buy-button {
            padding: 0.5rem 1rem;
            background: linear-gradient(135deg, #5B86F9 0%, #7C3AED 100%);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 700;
            cursor: pointer;
            transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
            box-shadow: 0 8px 22px rgba(92, 105, 245, 0.35);
        }

        .buy-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 28px rgba(92, 105, 245, 0.45);
            filter: saturate(1.05);
        }
        /* Free download state styling when purchase-button markup gets class replaced */
        .buy-button.free-download-btn {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
            color: #ffffff;
            font-size: 0.875rem; /* Slightly smaller font to balance the longer text */
            padding: 0.45rem 0.9rem; /* Slightly less padding to match Buy Now button proportions */
        }
        .buy-button.free-download-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45);
            filter: saturate(1.05);
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
        }
        
        /* Free download button styling for btn primary class */
        .btn.primary.free-download-btn {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25) !important;
            color: #ffffff !important;
            border-color: #059669 !important;
        }
        .btn.primary.free-download-btn:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45) !important;
            filter: saturate(1.05) !important;
            background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
            border-color: #047857 !important;
        }
        
        /* Free download button styling for composition-buy-btn class */
        .composition-buy-btn.free-download-btn {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25) !important;
            color: #ffffff !important;
            border-color: #059669 !important;
        }
        .composition-buy-btn.free-download-btn:hover {
            transform: translateY(-2px) !important;
            box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45) !important;
            filter: saturate(1.05) !important;
            background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
            border-color: #047857 !important;
        }
        .view-score-button {
            padding: 0.5rem 0.9rem;
            background: var(--surface, #ffffff);
            color: var(--gray-800);
            border: 1px solid var(--gray-300);
            border-radius: 6px;
            font-size: 0.875rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
        }
        .view-score-button:hover { background: var(--gray-50); border-color: var(--gray-400); transform: translateY(-1px); color: #0f172a; }
        body.dark-mode .view-score-button:hover,
        body[data-theme="dark"] .view-score-button:hover { background: #1f2937; border-color: #334155; color: #e5e7eb; }

        /* Loading and Empty States */
        .loading-state,
        .empty-state {
            text-align: center;
            padding: 2rem;
            color: var(--gray-500);
            display: none; /* Keep hidden unless truly slow/error */
        }

        .loading-state p {
            font-size: 0.9rem;
            margin: 0;
        }

        /* Smooth transitions for skeleton to content */
        .compositions-container,
        #compositions-container-skeleton,
        #gallery-skeleton {
            transition: opacity 0.2s ease-in-out;
        }

        /* Ensure real content matches skeleton dimensions initially */
        .compositions-container {
            min-height: 400px; /* Match skeleton height */
        }

        /* Prevent browser scroll anchoring from shifting viewport during content swaps */
        #results-host,
        #compositions-container-skeleton,
        #gallery-skeleton,
        .compositions-container { overflow-anchor: none; }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        /* Responsive Design */
        @media (max-width: 1024px) {
            .filter-controls {
                flex-direction: column;
                align-items: stretch;
                gap: 1rem;
            }

            .filter-group {
                justify-content: center;
            }

            .table-header-row,
            .composition-row {
                grid-template-columns: 2fr 1fr 120px;
                gap: 0.75rem;
            }

            .composition-duration,
            .composition-year {
                display: none;
            }
        }

        @media (max-width: 1024px) {
            .results-section {
                padding: 0.75rem;
            }

            .filter-content {
                padding: 1rem;
            }



            .results-header {
                flex-direction: column;
                align-items: stretch;
                gap: 1rem;
            }

            .table-header {
                display: none;
            }

            .composition-row {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                gap: 1rem;
                padding: 1.5rem 1rem;
            }

            .composition-info {
                order: 1;
            }
            
            .composition-meta {
                order: 2;
            }
            
            .composition-year {
                order: 3;
                text-align: left;
                font-size: 0.75rem;
            }

            .composition-year::before {
                content: "Year: ";
                color: var(--gray-500);
            }

            .composition-action {
                order: 4;
                justify-content: stretch;
            }

            .buy-button {
                width: 100%;
                padding: 0.75rem;
            }
        }

        .hero-section::before {
            background-image: 
                linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
            background-size: 50px 50px;
        }

        .hero-media, .content-media, .tmtc-media {
            /* No transform - images stay fixed */
            position: relative;
            /* Static positioning for clean look */
        }

        /* Modern refresh overrides for filter UI (theme-aware) */
        .dropdown-button, .multi-select-button {
            border-radius: 10px;
            border: 1px solid var(--border, var(--gray-200));
            background: var(--surface, #ffffff);
            box-shadow: 0 1px 2px rgba(17, 24, 39, 0.05), inset 0 0 0 1px rgba(17, 24, 39, 0.02);
        }
        .dropdown-button svg, .multi-select-button svg { opacity: 0.7; }
        .dropdown-button:hover, .multi-select-button:hover {
            border-color: var(--primary-300);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
        }
        .dropdown-button.active, .multi-select-button.active { border-color: var(--primary-400); background: var(--surface, #ffffff); color: var(--gray-800); }
        body.dark-mode .dropdown-button.active,
        body[data-theme="dark"] .dropdown-button.active,
        body.dark-mode .multi-select-button.active,
        body[data-theme="dark"] .multi-select-button.active { background: #1f2937; color: #e5e7eb; }

        .dropdown-content, .multi-select-content {
            border-radius: 12px;
            padding: 0.5rem;
            transform: translateY(6px) scale(0.98);
            opacity: 0;
            transition: transform 160ms ease, opacity 160ms ease, box-shadow 200ms ease;
            background: var(--surface, #ffffff);
            border: 1px solid var(--border, var(--gray-200));
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
        }
        .dropdown-content.show, .multi-select-content.show {
            transform: translateY(0) scale(1);
            opacity: 1;
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
        }

        .dropdown-option, .multi-select-option {
            border-radius: 8px;
            padding: 0.6rem 0.75rem;
        }
        .dropdown-option:hover, .multi-select-option:hover {
            background: var(--gray-100);
        }
        .multi-select-option.selected {
            background: rgba(17, 24, 39, 0.04);
        }
        .multi-select-checkbox {
            border-color: var(--gray-400);
            border-radius: 4px;
        }
        .multi-select-option:hover .multi-select-checkbox {
            border-color: var(--primary-400);
        }
        .multi-select-option.selected .multi-select-checkbox {
            background: #ffffff;
            border-color: var(--gray-900);
        }

        /* Inline active filter chips */
        .filter-chips {
            display: none;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-left: 0.75rem;
        }
        .filter-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.6rem; background: var(--chip-bg, var(--gray-100)); border: 1px solid var(--chip-border, var(--gray-300)); color: var(--gray-900); border-radius: 999px; font-size: 0.82rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease; line-height: 1; }
        body.dark-mode .filter-chip,
        body[data-theme="dark"] .filter-chip { background: #334155; border-color: #475569; color: #e5e7eb; }
        .filter-chip::before { content: ''; width: 6px; height: 6px; background: var(--primary-500); border-radius: 50%; display: inline-block; box-shadow: 0 0 0 0 rgba(59,130,246,.40); transition: box-shadow .25s ease; }
        .filter-chip:hover::before{ box-shadow: 0 0 0 6px rgba(59,130,246,.08); }
        .filter-chip:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
        .chip-label { padding-left: 0.1rem; }
        .chip-remove { appearance: none; border: none; background: var(--gray-200); cursor: pointer; color: var(--gray-800); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.15s ease, color 0.15s ease; padding: 0.15rem; line-height: 1; }
        .chip-remove:hover { background: var(--gray-300); color: var(--gray-900); }
        body.dark-mode .chip-remove,
        body[data-theme="dark"] .chip-remove { background: #475569; color: #e2e8f0; }
        body.dark-mode .chip-remove:hover,
        body[data-theme="dark"] .chip-remove:hover { background: #64748b; color: #0b1220; }

        /* ===== Restored Bottom Filtered Sort Row Styling (for compatibility) ===== */
        .filter-sort-row {
            display: none;
            grid-template-columns: 1fr auto 1fr;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem 0.5rem;
            border-top: 1px solid var(--gray-200);
        }
        .filter-container { display: flex; align-items: center; gap: 0.75rem; position: relative; }
        .filter-icon { appearance: none; border: none; background: transparent; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--gray-700); font-size: 0.9rem; cursor: pointer; padding: 0.25rem 0.35rem; border-radius: 6px; }
        .filter-icon:hover { color: var(--gray-900); background: var(--gray-50); }
        .filter-icon svg { opacity: 0.8; }
        .filter-count { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 20px; padding: 0 0.4rem; border-radius: 999px; background: var(--primary-500); color: white; font-size: 0.75rem; font-weight: 600; }

        .results-container { display: flex; justify-content: center; align-items: center; }
        .filter-results-count { color: var(--gray-600); font-size: 0.9rem; }

        .controls-container { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end; }
        .controls-container::before { content: ''; display: inline-block; width: 1px; height: 24px; background: var(--gray-200); margin-right: 1rem; }

        /* Search: icon with expandable input */
        .inline-search { display: flex; align-items: center; margin-left: 0.25rem; }
        .search-icon { appearance: none; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 6px; border-radius: 8px; color: white; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
        .search-icon:hover { background: rgba(255, 255, 255, 0.1); color: var(--gray-100); }
        .search-icon svg { width: 18px; height: 18px; }
        .search-icon svg, .search-icon path { stroke: white !important; }
        .search-icon:hover svg, .search-icon:hover path { stroke: var(--gray-100) !important; }

        .search-expanded { display: inline-flex; align-items: center; gap: 0.5rem; overflow: hidden; padding-left: 0; }
        .search-input-inline { width: 0; opacity: 0; border: 1px solid var(--gray-300); border-radius: 6px; padding: 0.35rem 0; font-size: 0.875rem; transition: width 180ms ease, opacity 150ms ease, padding 150ms ease; background: #fff; color: var(--gray-800); }
        .search-expanded.expanded .search-input-inline { width: 220px; opacity: 1; padding: 0.35rem 0.6rem; }
        .search-input-inline::placeholder { color: var(--gray-400); }

        /* Accessible focus rings */
        .dropdown-button:focus-visible,
        .multi-select-button:focus-visible,
        .view-score-button:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(92,105,245,.25), 0 0 0 1px var(--primary-400) inset;
        }

        /* Sort button baseline look (kept) */
        .sort-dropdown .sort-button { color: var(--gray-600); }
        .sort-dropdown .sort-button:hover { color: var(--gray-800); }
        .sort-dropdown .dropdown-content { min-width: 300px; white-space: nowrap; overflow-x: hidden; left: auto; right: 0; max-width: min(360px, calc(100vw - 2rem)); }
        .sort-dropdown .dropdown-option { white-space: nowrap; }

        /* Responsive tweaks for bottom row */
        @media (max-width: 1024px) {
            .filter-sort-row { grid-template-columns: 1fr; gap: 0.75rem; }
            .controls-container::before { display: none; }
            .results-container { justify-content: flex-start; }
        }
        /* legacy filter-sort-row styles removed */

        /* Search: icon with expandable input */
        .inline-search { display: flex; align-items: center; margin-left: 0.25rem; }
        .search-icon { appearance: none; border: none; background: transparent; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 6px; border-radius: 8px; color: white; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
        .search-icon:hover { background: rgba(255, 255, 255, 0.1); color: var(--gray-100); }
        .search-icon svg { width: 18px; height: 18px; }
        .search-icon svg, .search-icon path { stroke: white !important; }
        .search-icon:hover svg, .search-icon:hover path { stroke: var(--gray-100) !important; }
        /* Ensure white icon in the sticky filter rail contexts */
        .filter-panel .search-compact .icon-btn { color: #fff; }
        .filter-panel .search-compact .icon-btn:hover { color: #e5e7eb; }
        .filter-panel .search-compact .icon-btn svg,
        .filter-panel .search-compact .icon-btn path { stroke: #fff !important; }

        .search-expanded { display: inline-flex; align-items: center; gap: 0.5rem; overflow: hidden; padding-left: 0; }
        .search-input-inline { width: 0; opacity: 0; border: 1px solid var(--gray-300); border-radius: 6px; padding: 0.35rem 0; font-size: 0.875rem; transition: width 180ms ease, opacity 150ms ease, padding 150ms ease; background: #fff; color: var(--gray-800); }
        .search-expanded.expanded .search-input-inline { width: 220px; opacity: 1; padding: 0.35rem 0.6rem; }
        .search-input-inline::placeholder { color: var(--gray-400); }
        /* Accessible focus rings */
        .dropdown-button:focus-visible,
        .multi-select-button:focus-visible,
        .view-score-button:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(92,105,245,.25), 0 0 0 1px var(--primary-400) inset;
        }

        /* Sort button baseline look (kept) */
        .sort-dropdown .sort-button { color: var(--gray-600); }
        .sort-dropdown .sort-button:hover { color: var(--gray-800); }
        .sort-dropdown .dropdown-content { min-width: 300px; white-space: nowrap; overflow-x: hidden; left: auto; right: 0; max-width: min(360px, calc(100vw - 2rem)); }
        .sort-dropdown .dropdown-option { white-space: nowrap; }

        /* Responsive tweaks removed with legacy row */

        /* ===== (Removed legacy catalog overlay styles) ===== */
        /* Inline Related Works cards (catalog overlay) */
        .related-inline-card {
            transition: transform 160ms ease, box-shadow 160ms ease;
            will-change: transform, box-shadow;
        }
        .related-inline-card:hover {
            transform: translateY(-6px) scale(1.02);
            box-shadow: 0 12px 28px rgba(0,0,0,0.18), 0 6px 12px rgba(59,130,246,0.18);
        }
        .related-inline-card:focus-visible {
            outline: 2px solid var(--primary-500);
            outline-offset: 2px;
        }
        /* ===== Collections layout (catalog page overrides) ===== */
        #catalog-collections-section {
            /* Match composition.html minimal container styling */
            background: var(--primary-200);
            border: 0;
            border-radius: 0;
            padding: 0 1rem;
            margin: 0 0 0.75rem 0;
            box-shadow: none;
            box-sizing: border-box;
            overflow: visible !important; /* Ensure sticky context is never broken */
            scroll-margin-top: calc(var(--nav-height, 100px) + 20px);
        }
        /* Background shell present at first load */
        #catalog-collections-section #collections-bg-shell {
            display: block;
            background: #ffffff8f;
            border: 3px solid white;
            border-radius: 12px;
            padding: 1.5rem;
            max-width: 1400px;
            margin: .5rem auto .75rem auto; /* center, not edge-to-edge */
            box-sizing: border-box;
        }
        /* Hide shell when expanded panel opens */
        #catalog-collections-section:has(#collections-expanded-host[style*="display: block"]) #collections-bg-shell,
        #catalog-collections-section.expanded-panel-open #collections-bg-shell {
            display: none !important;
        }
        /* Avoid double styling: remove inner container background when inside shell */
        #catalog-collections-section #collections-bg-shell #collections-container,
        #catalog-collections-section #collections-bg-shell .collections-container {
            background: transparent !important;
            border: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            max-width: none !important;
            width: 100% !important;
        }
        
        /* Collections section background styling - more specific selector */
        #catalog-collections-section #collections-container {
            background: #ffffff8f !important;
            border: 3px solid white !important;
            border-radius: 12px !important;
            padding: 1.5rem !important;
            transition: all 0.3s ease;
        }
        
        /* Also target by class for extra specificity */
        #catalog-collections-section .collections-container {
            background: #ffffff8f !important;
            border: 3px solid white !important;
            border-radius: 12px !important;
            padding: 1.5rem !important;
            transition: all 0.3s ease;
        }
        
        /* Hide Collections background when expanded panel is open */
        #catalog-collections-section:has(#collections-expanded-host[style*="display: block"]) #collections-container,
        #catalog-collections-section:has(#collections-expanded-host:not([style*="display: none"])) #collections-container,
        #catalog-collections-section:has(#collections-expanded-host[style*="display: block"]) .collections-container,
        #catalog-collections-section:has(#collections-expanded-host:not([style*="display: none"])) .collections-container {
            background: transparent !important;
            border: none !important;
            padding: 0 !important;
        }
        
        /* Fallback class for JavaScript control */
        #catalog-collections-section.expanded-panel-open #collections-container,
        #catalog-collections-section.expanded-panel-open .collections-container {
            background: transparent !important;
            border: none !important;
            padding: 0 !important;
        }
        #catalog-collections-section .collections-section-title {
            max-width: 1200px;
            margin: .25rem auto .75rem auto;
            padding: 0 .25rem;
            font-size: 2rem;
            font-weight: 900;
            letter-spacing: -0.01em;
            text-align: center;
            color: var(--gray-800);
        }
        #catalog-collections-section .collections-container {
            display: grid !important;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 1rem 1.25rem;
            align-items: stretch;
            width: 100%;
            margin: 0.5rem auto 0.75rem auto;
            max-width: 1400px; /* constrain content for symmetry */
            box-sizing: border-box;
            overflow: visible;
        }
        #catalog-collections-section .collections-card {
            width: 100%;
            background: transparent; /* remove white layer entirely */
            border: none; /* remove outer border line */
            border-radius: 14px; /* keep radius for hit area */
            box-shadow: none; /* no blocky outer shadow */
            transition: transform .18s ease;
            overflow: visible;
            position: relative;
            margin-left: .12rem; /* tiny nudge to avoid anti-alias clipping across reflows */
            margin-right: .12rem;
        }
        #catalog-collections-section .collections-card::before { display: none; }
        #catalog-collections-section .collections-card:hover { /* subtle lift with deeper, tighter shadow */
            transform: translateY(-2px);
        }
        #catalog-collections-section .collections-card-header {
            /* Use the dark gradient header like composition.html */
            background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-900) 100%);
            padding: 1rem 1rem;
            border: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 64px;
            border-radius: 12px;
            box-shadow: none;
            overflow: visible;
            will-change: transform;
        }
        #catalog-collections-section .collections-card-header:hover { background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-950, var(--primary-900)) 100%); }
        /* Spotlight overlay for collections headers */
        #catalog-collections-section .collections-card-header{ position: relative; }
        #catalog-collections-section .collections-card-header::after{ content: none; }
        #catalog-collections-section .collections-card-title { gap: .6rem; }
        #catalog-collections-section .collection-name { font-weight: 700; color: #ffffff; letter-spacing: -0.01em; font-size: 1.02rem; }
        /* Header subtitle and badges inside the header area */
        #catalog-collections-section .catalog-collection-subtitle { font-size: .95rem; line-height: 1.4; color: rgba(255,255,255,.9); font-weight: 400; }
        #catalog-collections-section .catalog-badges { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }
        #catalog-collections-section .catalog-pieces-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border-radius: 999px; font-weight: 700; font-size: .82rem; background: #ffffff; color: var(--primary-800); border: 1px solid var(--primary-200); }
        #catalog-collections-section .collections-toggle {
            width: 28px; height: 28px; background: rgba(255,255,255,.9); box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1px solid rgba(255,255,255,.5); border-radius: 8px;
        }
        #catalog-collections-section .toggle-arrow { color: var(--primary-600); }
        #catalog-collections-section .collections-card-content { background: #fff; }
        /* Hide list-view content to avoid large white block under headers */
        #catalog-collections-section .collections-card .collections-card-content { display: none !important; }
        #catalog-collections-section .collection-info { padding: 1.1rem 1.25rem .8rem 1.25rem; }
        #catalog-collections-section .collection-description {
            color: var(--gray-700);
            font-size: .96rem;
            line-height: 1.55;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            line-clamp: 4;
            overflow: hidden;
        }
        #catalog-collections-section .collection-compositions { background: #fff; padding-top: .25rem; }
        #catalog-collections-section .compositions-list-title {
            color: var(--gray-700);
            letter-spacing: .06em;
        }
        #catalog-collections-section .composition-item {
            background: #fff;
            border: 1px solid var(--gray-200);
            border-left: 3px solid var(--primary-500);
            padding: 0.7rem 0.9rem;
        }
        #catalog-collections-section .composition-item:hover {
            background: var(--primary-50);
            border-color: var(--primary-500);
        }
        #catalog-collections-section .collection-actions { background: #fff; padding: .9rem 1.25rem 1.1rem 1.25rem; border-top: 1px solid var(--gray-100); }
        #catalog-collections-section .collection-actions-flex { align-items: stretch; }
        #catalog-collections-section .buy-now-btn {
            background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
            box-shadow: 0 8px 20px rgba(59,130,246,0.25);
            border: none;
            padding: .85rem 1.2rem;
            margin: 0; /* neutralize global margins so it doesn't push layout */
            font-weight: 800;
            letter-spacing: .02em;
            min-height: 44px;
            font-size: 1rem;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .35rem;
        }
        #catalog-collections-section .buy-now-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 26px rgba(59,130,246,0.35);
        }
        #catalog-collections-section .learn-more-btn {
            border: 1px solid var(--primary-300);
            color: var(--gray-900);
            background: #ffffff;
            font-weight: 800;
            padding: .85rem 1.2rem;
            min-height: 44px;
            font-size: 1rem;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: .35rem;
            text-decoration: none;
            cursor: pointer;
            box-shadow: 0 6px 20px rgba(2,6,23,.08);
            transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
        }
        #catalog-collections-section .learn-more-btn:hover { background: var(--primary-50); border-color: var(--primary-400); color: var(--gray-900); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(2,6,23,.12); }
        /* Dark mode variant for Learn More */
        body.dark-mode #catalog-collections-section .learn-more-btn,
        body[data-theme="dark"] #catalog-collections-section .learn-more-btn { background: transparent; color: #e5e7eb; border-color: #475569; text-decoration: none; box-shadow: 0 6px 20px rgba(15,23,42,.45); }
        body.dark-mode #catalog-collections-section .learn-more-btn:hover,
        body[data-theme="dark"] #catalog-collections-section .learn-more-btn:hover { background: rgba(255,255,255,.06); border-color: #93c5fd; color: #ffffff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,23,42,.6); }
        body.dark-mode #catalog-collections-section .catalog-collection-subtitle,
        body[data-theme="dark"] #catalog-collections-section .catalog-collection-subtitle { color: #cbd5e1; }
        body.dark-mode #catalog-collections-section .catalog-pieces-badge,
        body[data-theme="dark"] #catalog-collections-section .catalog-pieces-badge { background: rgba(255,255,255,.12); color: #e5edff; border-color: rgba(255,255,255,.25); }

        /* Cards collapse and reveal animations */
        @keyframes popIn { 0% { opacity: 0; transform: translateY(8px) scale(.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
        @keyframes fadeShrink { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-6px) scale(.98); } }
        @keyframes fadeInList { 0% { opacity: 0; } 100% { opacity: 1; } }
        /* Bottom-origin crop animations */
        @keyframes clipOut { 0% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 100% 0); opacity: 0; } }
        @keyframes clipIn { 0% { clip-path: inset(0 0 100% 0); opacity: 0; } 100% { clip-path: inset(0 0 0 0); opacity: 1; } }
        #catalog-collections-section.cards-collapsed #catalog-collections-placeholder { height: 0 !important; margin: 0 !important; padding: 0 !important; }
        #collections-container.clip-out { animation: clipOut .32s cubic-bezier(.2,.65,.2,1) forwards; }
        #collections-container.clip-in { animation: clipIn .38s cubic-bezier(.2,.65,.2,1) forwards; }
        .collection-expanded-panel.clip-in { animation: clipIn .38s cubic-bezier(.2,.65,.2,1) forwards; }
        .collection-expanded-panel.clip-out { animation: clipOut .28s cubic-bezier(.2,.65,.2,1) forwards; }
        #catalog-collections-section.cards-revealing #collections-container .collections-card { animation: popIn .32s cubic-bezier(.2,.65,.2,1) both; }

        /* When the expanded panel is open, hide the card headers immediately
           so they don't stack visually under/over the expanded panel */
        #catalog-collections-section.cards-collapsed .collections-card-header { display: none !important; }

        /* ===== Inline Expanded (inside card) ===== */
        #catalog-collections-section .collections-card.is-inline-expanded .collections-card-header { display: none; }
        #catalog-collections-section .collections-card.is-inline-expanded .collections-card-content { display: none; }
        .inline-expanded-panel { display: none; opacity: 0; transform: translateY(16px); transition: opacity .28s ease, transform .28s ease; background: var(--surface, #ffffff); }
        .inline-expanded-panel.active { display: block; opacity: 1; transform: translateY(0); }
        .inline-expanded-hero { background: linear-gradient(135deg, var(--primary-600), var(--primary-700)); color: #fff; padding: 1rem; text-align: center; position: relative; }
        .inline-expanded-title { font-size: 1.25rem; font-weight: 800; margin: 0; letter-spacing: .005em; }
        .inline-expanded-sub { margin-top: .3rem; color: #e5edff; font-weight: 500; font-size: .92rem; }
        .inline-expanded-close { position: absolute; right: 10px; top: 10px; background: rgba(255,255,255,.15); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius: 8px; padding: .35rem .55rem; cursor: pointer; font-weight: 700; }
        .inline-expanded-close:hover { background: rgba(255,255,255,.25); }
        .inline-expanded-body { padding: 1rem; }
        .inline-expanded-desc { color: var(--gray-700); max-width: 900px; margin: .25rem auto .85rem auto; line-height: 1.6; font-size: .96rem; text-align: center; }
        .inline-expanded-actions { display:flex; justify-content:center; gap:.75rem; margin-bottom: .75rem; flex-wrap: wrap; }
        /* Make Learn More width match Buy Now within inline-expanded actions */
        .inline-expanded-actions .learn-more-btn { min-width: 180px; }
        .inline-expanded-list-title { text-align:center; color: var(--gray-700); font-weight: 700; letter-spacing: .06em; margin: .4rem 0 .5rem; }
        .inline-expanded-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem .75rem; }
        .inline-expanded-item { background: var(--surface, #ffffff); border:1px solid var(--gray-200); border-radius:8px; padding:.65rem .85rem; cursor:pointer; transition: border-color .2s ease, background .2s ease; }
        .inline-expanded-item:hover { background: var(--primary-50); border-color: var(--primary-400); }
        .inline-expanded-item .t { font-weight: 600; color: var(--gray-900); font-size: .94rem; }
        .inline-expanded-item .i { color: var(--gray-500); font-size: .8rem; margin-top: .1rem; }

        /* ===== Expanded Collection Preview (full-width within section) ===== */
        #catalog-collections-section .collection-expanded-panel {
            display: none;
            background: var(--surface, #ffffff);
            border: 1px solid var(--gray-200);
            border-radius: 14px;
            box-shadow: 0 10px 30px rgba(17,24,39,0.10);
            margin-bottom: 1rem;
            overflow: hidden;
            opacity: 0;
            transform: translateY(18px);
            transition: opacity .28s ease, transform .28s ease;
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
        }
        #catalog-collections-section .collection-expanded-panel.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }
        .expanded-hero {
            background: linear-gradient(180deg, var(--primary-800), var(--primary-900));
            color: #fff;
            padding: 1.25rem 1rem;
            text-align: center;
            position: relative;
        }
        .expanded-title { font-size: 1.4rem; font-weight: 800; letter-spacing: .01em; margin: 0; }
        .expanded-sub {
            margin-top: .35rem; color: #e2e8f0; font-weight: 500; font-size: .95rem;
        }
        .expanded-close {
            position: absolute; right: 8px; top: 8px;
            background: rgba(255,255,255,.12); color:#fff;
            border:1px solid rgba(255,255,255,.3);
            border-radius: 6px;
            padding: .22rem .4rem; /* smaller footprint */
            font-size: .8rem; /* reduce text size */
            line-height: 1; /* tighten box height */
            cursor: pointer; font-weight: 700; transition: background .2s ease;
        }
        .expanded-close:hover { background: rgba(255,255,255,.25); }
        .expanded-body { padding: 1rem; background: var(--surface, #ffffff); }
        /* Related collections rail at bottom of expanded body */
        .expanded-related-wrap { margin-top: 1rem; }
        .expanded-related-divider { height: 1px; background: var(--border, var(--gray-200)); border: none; margin: 1rem 0; }
        .expanded-related-rail { position: relative; display: flex; align-items: center; gap: 1.25rem; overflow-x: auto; padding: .25rem .25rem; scrollbar-width: none; scroll-behavior: smooth; }
        .expanded-related-rail::-webkit-scrollbar { display: none; }
        .expanded-related-link { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; cursor: pointer; font-size: .9rem; color: var(--gray-500); padding: .35rem .6rem; border-radius: 999px; transition: color .15s ease, background .15s ease; }
        .expanded-related-link::before { content: ''; width: 6px; height: 6px; background: var(--gray-300); border-radius: 50%; }
        .expanded-related-link:hover { color: var(--primary-700); background: var(--gray-50); }
        .expanded-related-link.active { color: var(--primary-800); background: var(--primary-50); }
        body.dark-mode .expanded-related-link,
        body[data-theme="dark"] .expanded-related-link { color: #cbd5e1; }
        body.dark-mode .expanded-related-link::before,
        body[data-theme="dark"] .expanded-related-link::before { background: #475569; }
        body.dark-mode .expanded-related-link:hover,
        body[data-theme="dark"] .expanded-related-link:hover { color: #93c5fd; background: rgba(255,255,255,.06); }
        body.dark-mode .expanded-related-link.active,
        body[data-theme="dark"] .expanded-related-link.active { color: #ffffff; background: rgba(59,130,246,.20); }

        /* Slide animations for expanded panel navigation */
        @keyframes slideInFromRight { from { opacity: 0; transform: translateX(28px);} to { opacity: 1; transform: translateX(0);} }
        @keyframes slideInFromLeft  { from { opacity: 0; transform: translateX(-28px);} to { opacity: 1; transform: translateX(0);} }
        @keyframes slideOutToLeft   { from { opacity: 1; transform: translateX(0);}   to { opacity: 0; transform: translateX(-28px);} }
        @keyframes slideOutToRight  { from { opacity: 1; transform: translateX(0);}   to { opacity: 0; transform: translateX(28px);} }
        .panel-slide-in-right { animation: slideInFromRight .32s ease both; }
        .panel-slide-in-left  { animation: slideInFromLeft .32s ease both; }
        .panel-slide-out-left { animation: slideOutToLeft .24s ease both; }
        .panel-slide-out-right{ animation: slideOutToRight .24s ease both; }
        .expanded-desc { max-width: 900px; margin: .25rem auto 1rem auto; color: var(--gray-700); line-height: 1.6; font-size: .98rem; }
        /* Brighter description in dark mode */
        body.dark-mode .expanded-desc,
        body[data-theme="dark"] .expanded-desc { color: #f1f5f9; }
        .expanded-actions { display:flex; justify-content:center; gap:.75rem; margin-bottom: 1rem; flex-wrap: wrap; align-items: center; }
        /* Ensure equal widths/heights inside expanded actions */
        .expanded-actions .learn-more-btn,
        .expanded-actions .buy-now-btn { 
            display: inline-flex; /* do not fill available space */
            align-items: center;
            justify-content: center;
            padding: .9rem 1.2rem;
            min-height: 48px;
            border-radius: 10px;
            font-size: 1rem;
            margin: 0;
            box-sizing: border-box; /* include borders */
        }
        .expanded-list-title { display:flex; justify-content: space-between; align-items:center; gap:.5rem; color: var(--gray-700); font-weight: 700; letter-spacing: .06em; margin: 0 0 .25rem 0; }
        .expanded-list-title-left { text-align:left; font-size: 1.06rem; font-weight: 600; }
        .expanded-list-title-right { font-weight: 300; font-size: 1.05rem; color: var(--gray-800); display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
        .expanded-list-title-right .sum-price { color: var(--primary-800); font-weight: 500; }
        .expanded-savings { text-align: right; font-weight: 700; color: var(--primary-700); margin: 0 .25rem .0rem .25rem; font-size: 1.1rem; }
        body.dark-mode .expanded-savings,
        body[data-theme="dark"] .expanded-savings { color: #93c5fd; }
        .expanded-list-block {
            max-width: 1100px;
            margin: 0 auto 1rem auto;
            background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 50%, var(--primary-200) 100%);
            padding: .5rem 1.25rem .75rem 1.25rem; /* tighter match with surrounding gutters */
            border-radius: 12px;
        }
        .expanded-divider {
            height: 1px;
            background: var(--primary-200);
            margin: .25rem 0 .5rem 0;
            border-radius: 1px;
        }
        .expanded-compositions {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: .5rem .75rem;
            margin: 0; /* inside block */
        }
        .expanded-item {
            background: rgba(255,255,255,.98);
            border:1px solid var(--primary-200);
            border-radius:8px;
            padding:.7rem .85rem; 
            cursor:pointer; 
            transition: background .2s ease, border-color .2s ease, transform .18s ease, box-shadow .18s ease; 
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: .75rem;
        }
        .expanded-item:hover { background: var(--primary-50); border-color: var(--primary-400); transform: translateY(-2px) scale(1.01); box-shadow: 0 8px 18px rgba(17,24,39,.12); }
        .expanded-item .t { font-weight: 500; color: var(--gray-900); font-size: .9rem; }
        .expanded-item .p { color: var(--gray-700); font-weight: 700; }
        @media (max-width: 1024px) {
            .expanded-title { font-size: 1.2rem; }
            .expanded-desc { padding: 0 .25rem; }
            /* Prevent title/close collision on small screens in collections expanded panel */
            #catalog-collections-section .expanded-title { 
                padding-right: 84px !important; /* reserve space for "Close ✕" button */
                line-height: 1.3 !important;
                font-size: 1.08rem !important; /* slightly smaller to reduce wrapping */
            }
            /* Make right-side savings/cost block more compact on mobile */
            #catalog-collections-section .expanded-list-title-right { 
                font-size: 0.95rem !important; 
                line-height: 1.35rem !important;
            }
            #catalog-collections-section .expanded-savings { 
                font-size: 1rem !important; 
            }
            #catalog-collections-section .expanded-list-title-right .sum-price { 
                font-size: 0.95rem !important; 
            }
        }
        @media (max-width: 900px) {
            #catalog-collections-section .collections-container { grid-template-columns: 1fr; }
        }
        @media (max-width: 1024px) {
            #catalog-collections-section .collections-section-title { font-size: 1.25rem; margin-bottom: .6rem; }
        }

        /* ===== Page Dark Mode (linked to global nav toggle) ===== */
        body.dark-mode .catalog-header,
        body[data-theme="dark"] .catalog-header {
            background:
                radial-gradient(1200px 420px at 50% -220px, rgba(59,130,246,.16), transparent 60%),
                #0f172a;
        }
        body.dark-mode .header-title,
        body[data-theme="dark"] .header-title { color: #f3f4f6; }
        body.dark-mode .header-description,
        body[data-theme="dark"] .header-description { color: #cbd5e1; }

        body.dark-mode .filter-panel,
        body[data-theme="dark"] .filter-panel { background: #0f172a; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
        /* Ensure frosted rail wins over base/dark backgrounds */
        div.filter-panel#catalog-filters.u-glass-rail,
        body.dark-mode div.filter-panel#catalog-filters.u-glass-rail,
        body[data-theme="dark"] div.filter-panel#catalog-filters.u-glass-rail {
            background: transparent;
            border-top-color: transparent;
            border-bottom-color: transparent;
            box-shadow: none;
        }
        body.dark-mode .header-content,
        body[data-theme="dark"] .header-content { border-bottom-color: #1f2937; }
        body.dark-mode .filter-controls,
        body[data-theme="dark"] .filter-controls { border-bottom-color: #1f2937; }
        body.dark-mode .button-group,
        body[data-theme="dark"] .button-group { background: #0f172a; border-color: #1f2937; }
        body.dark-mode .dropdown-content,
        body[data-theme="dark"] .dropdown-content,
        body.dark-mode .multi-select-content,
        body[data-theme="dark"] .multi-select-content { background: #111827; border-color: #1f2937; }

        body.dark-mode #catalog-collections-section,
        body[data-theme="dark"] #catalog-collections-section { background: transparent; border-color: transparent; box-shadow: none; }
        body.dark-mode #catalog-collections-section .collections-card-header,
        body[data-theme="dark"] #catalog-collections-section .collections-card-header { background: linear-gradient(180deg, #1e3a8a, #172554); border-color: transparent; box-shadow: none; }
        body.dark-mode #catalog-collections-section .collection-actions,
        body[data-theme="dark"] #catalog-collections-section .collection-actions { background: #0f172a; border-top-color: #1f2937; }
        body.dark-mode #catalog-collections-section .collection-expanded-panel,
        body[data-theme="dark"] #catalog-collections-section .collection-expanded-panel { background: #0b1220; border-color: #1f2937; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
        body.dark-mode .expanded-hero,
        body[data-theme="dark"] .expanded-hero { background: linear-gradient(180deg, #1e3a8a, #0b2451); }
        body.dark-mode .expanded-list-block,
        body[data-theme="dark"] .expanded-list-block { background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(99,102,241,.10)); }
        body.dark-mode .expanded-divider,
        body[data-theme="dark"] .expanded-divider { background: #334155; }
        /* Brighten expanded list items in dark mode for readability */
        body.dark-mode .expanded-item,
        body[data-theme="dark"] .expanded-item { background: rgba(255,255,255,.06); border-color: #475569; }
        body.dark-mode .expanded-item:hover,
        body[data-theme="dark"] .expanded-item:hover { background: rgba(255,255,255,.12); border-color: #93c5fd; box-shadow: 0 10px 20px rgba(15,23,42,.35); }
        body.dark-mode .expanded-item .t,
        body[data-theme="dark"] .expanded-item .t { color: #f3f4f6; }
        body.dark-mode .expanded-item .p,
        body[data-theme="dark"] .expanded-item .p { color: #e5e7eb; }
        body.dark-mode .expanded-list-title,
        body[data-theme="dark"] .expanded-list-title,
        body.dark-mode .expanded-list-title-left,
        body[data-theme="dark"] .expanded-list-title-left,
        body.dark-mode .expanded-list-title-right,
        body[data-theme="dark"] .expanded-list-title-right { color: #e5e7eb; }
        body.dark-mode .expanded-list-title-right .sum-price,
        body[data-theme="dark"] .expanded-list-title-right .sum-price { color: #ffffff; }

        body.dark-mode .compositions-container,
        body[data-theme="dark"] .compositions-container { background: #0f172a; }
        body.dark-mode .compositions-container, 
        body[data-theme="dark"] .compositions-container, 
        body.dark-mode .results-count, 
        body[data-theme="dark"] .results-count, 
        body.dark-mode .filter-results-count, 
        body[data-theme="dark"] .filter-results-count { color: #e5e7eb; }
        body.dark-mode .compositions-table tbody tr.composition-row,
        body[data-theme="dark"] .compositions-table tbody tr.composition-row { border-bottom-color: #1f2937; }
        body.dark-mode .composition-title,
        body[data-theme="dark"] .composition-title { color: #e5e7eb; }
        body.dark-mode .composition-meta,
        body[data-theme="dark"] .composition-meta { color: #94a3b8; }
    