.csm-catalog,
.csm-blend-gallery,
.csm-songs-page,
.csm-songs-app {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 24px;
}

#left-area:has(.csm-catalog),
#left-area:has(.csm-blend-gallery),
#left-area:has(.csm-muse-wrap),
#left-area:has(.csm-songs-page),
#left-area:has(.csm-songs-app) {
    width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
}

#left-area:has(.csm-catalog) + #sidebar,
#left-area:has(.csm-blend-gallery) + #sidebar,
#left-area:has(.csm-muse-wrap) + #sidebar,
#left-area:has(.csm-songs-page) + #sidebar,
#left-area:has(.csm-songs-app) + #sidebar {
    display: none !important;
}

.container:has(.csm-catalog)::before,
.container:has(.csm-blend-gallery)::before,
.container:has(.csm-muse-wrap)::before,
.container:has(.csm-songs-page)::before,
.container:has(.csm-songs-app)::before {
    display: none !important;
}

.container:has(.csm-catalog) .et_pb_row,
.container:has(.csm-blend-gallery) .et_pb_row,
.container:has(.csm-muse-wrap) .et_pb_row,
.container:has(.csm-songs-page) .et_pb_row,
.container:has(.csm-songs-app) .et_pb_row {
    max-width: 100% !important;
    width: 100% !important;
}

.csm-catalog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.csm-world-map-wrap {
    margin-bottom: 24px;
    border-radius: 16px;
    overflow: hidden;
    background: #f7f2e9;
    border: 1px solid #ebe1cf;
    box-shadow: 0 1px 3px rgba(90, 60, 30, 0.06), 0 6px 24px rgba(90, 60, 30, 0.06);
}

.csm-world-map {
    display: block;
    width: 100%;
    height: auto;
    max-height: 280px;
}

.csm-map-bg {
    fill: #e2d6bc;
    stroke: #c8b999;
    stroke-width: 0.6;
    stroke-linejoin: round;
}

.csm-map-region {
    cursor: pointer;
    transition: transform 0.2s ease;
    transform-origin: center;
    transform-box: fill-box;
}

.csm-map-region.active:hover {
    transform: translateY(-2px);
}

.csm-map-region.active:hover .csm-map-dot,
.csm-map-region.active.selected .csm-map-dot {
    fill: #8b5e3c;
}

.csm-map-selection-ring {
    fill: none;
    stroke: #8b5e3c;
    stroke-width: 3;
    opacity: 0;
    transition: opacity 0.25s ease, r 0.25s ease;
    pointer-events: none;
}

.csm-map-region.active.selected .csm-map-selection-ring {
    opacity: 0.9;
}

.csm-map-hit {
    fill: transparent;
    pointer-events: all;
}

.csm-map-dot {
    fill: #6b4226;
    stroke: #fff;
    stroke-width: 2.5;
    pointer-events: none;
    transition: fill 0.2s ease;
}

.csm-map-count {
    fill: #fff;
    font-size: 14px;
    font-weight: 700;
    text-anchor: middle;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.csm-map-region-label {
    fill: #5c4232;
    font-size: 13px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.2px;
}

.csm-catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.csm-filter-dropdown {
    position: relative;
}

.csm-filter-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.csm-filter-toggle:hover,
.csm-filter-dropdown.open .csm-filter-toggle {
    border-color: #6b4226;
    color: #6b4226;
}

.csm-filter-label {
    font-weight: 600;
}

.csm-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #6b4226;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.csm-filter-count:empty {
    display: none;
}

.csm-filter-chevron {
    font-size: 10px;
    transition: transform 0.2s;
}

.csm-filter-dropdown.open .csm-filter-chevron {
    transform: rotate(180deg);
}

.csm-filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    padding: 8px 0;
    z-index: 100;
}

.csm-filter-dropdown.open .csm-filter-panel {
    display: block;
}

.csm-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 14px;
    color: #374151;
}

.csm-filter-option:hover {
    background: #f9f7f5;
}

.csm-filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    accent-color: #6b4226;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.csm-filter-pill {
    padding: 10px 20px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.csm-filter-pill:hover {
    border-color: #6b4226;
    color: #6b4226;
}

.csm-filter-pill.active {
    background: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

.csm-filter-clear {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: none;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
}

.csm-filter-clear:hover {
    color: #6b4226;
}

.csm-filter-btn {
    padding: 8px 20px;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.csm-filter-btn:hover {
    border-color: #6b4226;
    color: #6b4226;
}

.csm-filter-btn.active {
    background: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

.csm-grid-sizer {
    display: flex;
    gap: 2px;
    margin-left: auto;
    background: #f3f0ec;
    border-radius: 8px;
    padding: 3px;
}

.csm-grid-btn {
    border: none;
    background: none;
    color: #b8a48e;
    font-size: 10px;
    padding: 5px 7px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 1px;
    line-height: 1;
}

.csm-grid-btn:hover {
    color: #6b4226;
}

.csm-grid-btn.active {
    background: #fff;
    color: #6b4226;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.csm-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    transition: gap 0.2s;
}

.csm-catalog-grid.csm-grid-small {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.csm-catalog-grid.csm-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 28px;
}

.csm-catalog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.csm-catalog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.csm-card-image {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f3f4f6;
}

.csm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.csm-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
}

.csm-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 16px;
    background: rgba(45, 80, 60, 0.9);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

.csm-badge-blend {
    background: rgba(140, 80, 30, 0.9);
}

.csm-badge-organic {
    background: rgba(22, 101, 52, 0.85);
    left: auto;
    right: 12px;
}

.csm-badge-decaf {
    background: rgba(30, 64, 175, 0.85);
    top: auto;
    bottom: 12px;
    left: 12px;
    right: auto;
}

.csm-badge-sale {
    background: linear-gradient(135deg, #ff9f43 0%, #ee5a24 100%);
    color: #fff;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: auto;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(238, 90, 36, 0.5);
    animation: csmSaleBadgePulse 2.2s ease-in-out infinite;
    transform-origin: center;
}
@keyframes csmSaleBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .csm-badge-sale { animation: none; }
}

.csm-catalog-card.csm-card-on-sale {
    position: relative;
}
.csm-catalog-card.csm-card-on-sale::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 0 2px rgba(238, 90, 36, 0.35);
    z-index: 1;
}

.csm-price-strike {
    text-decoration: line-through;
    opacity: 0.65;
    margin-right: 6px;
    font-size: 0.85em;
}
.csm-price-sale-value {
    color: #c7572a;
    font-weight: 700;
}

.csm-card-body {
    padding: 16px 18px 18px;
}

.csm-card-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.csm-card-trade-name {
    margin: 0 0 4px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

.csm-card-origin {
    margin: 0 0 8px;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.csm-card-notes {
    margin: 0 0 12px;
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
}

.csm-card-details-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #6b4226;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.csm-card-details-btn:hover {
    background: #8B5E3C;
}

.csm-card-detail {
    border-top: 1px solid #e5e7eb;
    background: #fafaf8;
}

.csm-detail-content {
    padding: 20px 16px;
}

.csm-detail-image {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
}

.csm-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.csm-detail-description {
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.csm-detail-description p:last-child {
    margin-bottom: 0;
}

.csm-detail-meta {
    margin-bottom: 16px;
}

.csm-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}

.csm-meta-label {
    color: #6b7280;
    font-weight: 500;
}

.csm-meta-value {
    color: #1f2937;
    font-weight: 600;
    text-align: right;
}

.csm-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.csm-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f0ec;
    color: #6b4226;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.csm-detail-cart {
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.csm-detail-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.csm-detail-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.csm-detail-option-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.csm-detail-cart .csm-roast-buttons {
    display: flex;
    gap: 4px;
}

.csm-size-buttons {
    display: flex;
    gap: 4px;
}

.csm-size-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.csm-size-btn:hover {
    border-color: #6b4226;
    color: #6b4226;
}

.csm-size-btn.active {
    background: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

.csm-cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.csm-price {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.csm-add-to-cart {
    padding: 10px 24px;
    background: #6b4226;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.csm-add-to-cart:hover {
    background: #8B5E3C;
}

.csm-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.csm-add-to-cart.csm-btn-success {
    background: #16a34a;
}

.csm-detail-close {
    display: block;
    width: 100%;
    padding: 8px;
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
}

.csm-detail-close:hover {
    color: #374151;
}

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

.csm-blend-add-btn {
    padding: 8px 16px;
    background: #fff;
    color: #6b4226;
    border: 1px solid #6b4226;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.csm-blend-add-btn:hover {
    background: #6b4226;
    color: #fff;
}

.csm-blend-add-btn.csm-in-blend {
    background: #f3f0ec;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: default;
}

.csm-blend-tray {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #faf8f5;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(107,66,38,0.04) 1px, transparent 0),
        radial-gradient(circle at 3px 3px, rgba(107,66,38,0.02) 1px, transparent 0);
    background-size: 16px 16px, 24px 24px;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.2), 0 -2px 8px rgba(0,0,0,0.08);
    border-radius: 20px 20px 0 0;
    z-index: 9999;
    max-height: 100dvh;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.csm-detail-added {
    display: flex;
    gap: 8px;
    flex: 1;
}

.csm-detail-added-link {
    flex: 1;
    padding: 10px 16px;
    background: #6b4226;
    color: #fff !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    text-align: center;
    transition: background 0.2s;
}

.csm-detail-added-link:hover {
    background: #8B5E3C;
}

.csm-add-another {
    padding: 10px 12px !important;
    background: #f3f0ec !important;
    color: #6b4226 !important;
    border: 1px solid #d1c4b0 !important;
    font-size: 12px !important;
    white-space: nowrap;
}

.csm-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.csm-drawer-overlay.open {
    display: block;
    opacity: 1;
}

.csm-detail-drawer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    background-color: #faf8f5;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(107,66,38,0.04) 1px, transparent 0),
        radial-gradient(circle at 3px 3px, rgba(107,66,38,0.02) 1px, transparent 0);
    background-size: 16px 16px, 24px 24px;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
    z-index: 10001;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.csm-detail-drawer.open {
    display: flex;
    transform: translateX(-50%) translateY(0);
}

.csm-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    background: #fff;
    border-bottom: 1px solid #e5e1da;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.csm-drawer-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.csm-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}

.csm-drawer-close:hover {
    color: #374151;
}

.csm-drawer-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.csm-drawer-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    max-height: 400px;
    overflow: hidden;
    background: #f3f4f6;
}

.csm-drawer-hero img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.csm-drawer-hero:empty {
    display: none;
}

.csm-drawer-badge {
    position: absolute;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    z-index: 1;
}

.csm-drawer-badge-origin {
    top: 12px;
    left: 12px;
}

.csm-drawer-badge-organic {
    top: 12px;
    right: 12px;
}

.csm-drawer-badge-decaf {
    bottom: 12px;
    left: 12px;
}

.csm-drawer-body {
    padding: 12px 20px 16px;
}

.csm-drawer-body .csm-detail-description {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 16px;
}

.csm-drawer-body .csm-detail-meta {
    margin-bottom: 16px;
}

.csm-drawer-body .csm-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 12px;
}

.csm-drawer-body .csm-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 8px;
    border-bottom: 1px solid #f0ece6;
}

.csm-drawer-body .csm-meta-label {
    font-size: 11px;
    font-weight: 600;
    color: #8b7355;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.csm-drawer-body .csm-meta-value {
    font-size: 12px;
    color: #374151;
    text-align: right;
}

.csm-drawer-body .csm-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.csm-drawer-body .csm-tag {
    padding: 4px 10px;
    background: #f3f0ec;
    color: #6b4226;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.csm-drawer-footer {
    flex-shrink: 0;
    padding: 14px 20px;
    border-top: 1px solid #e5e1da;
    background: #faf8f5;
}


.csm-drawer-footer .csm-detail-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.csm-drawer-footer .csm-cart-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.csm-drawer-footer .csm-price {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.csm-drawer-footer .csm-add-to-cart,
.csm-drawer-footer .csm-detail-added-link {
    flex: 1;
    padding: 12px 20px;
    font-size: 15px;
}

.csm-drawer-blend-btn {
    padding: 12px 18px;
    background: #f3f0ec;
    color: #6b4226;
    border: 1px solid #d1c4b0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.csm-drawer-blend-btn:hover {
    background: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

@media (max-width: 560px) {
    .csm-detail-drawer {
        max-width: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }

    .csm-drawer-hero {
        max-height: 220px;
    }

    .csm-drawer-footer .csm-detail-options {
        flex-direction: column;
        align-items: center;
    }
}

.csm-blend-discard {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s;
}

.csm-blend-discard:hover {
    color: #fff;
}

.csm-blend-tray-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6b1d2a 0%, #8b2d3a 50%, #a33d4a 100%);
    color: #fff;
    cursor: ns-resize;
    -webkit-tap-highlight-color: rgba(255,255,255,0.1);
    user-select: none;
    touch-action: none;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    position: relative;
    z-index: 1;
    transition: box-shadow 0.3s ease;
}

@keyframes csmTrayThrob {
    0%   { box-shadow: 0 -4px 12px rgba(0,0,0,0.15), 0 0 0 0 rgba(255,220,180,0.55); }
    35%  { box-shadow: 0 -4px 18px rgba(107,29,42,0.45), 0 0 0 10px rgba(255,220,180,0.0); }
    100% { box-shadow: 0 -4px 12px rgba(0,0,0,0.15), 0 0 0 0 rgba(255,220,180,0); }
}

.csm-blend-tray-header.csm-throb {
    animation: csmTrayThrob 1.1s ease-out 2;
}

#csm-blend-tray-label {
    transition: opacity 0.28s ease;
    display: inline-block;
}

.csm-blend-tray-label-flash {
    display: inline-block;
    color: #ffe6cf;
    font-style: italic;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.csm-blend-tray-header button {
    cursor: pointer;
    touch-action: auto;
}

.csm-blend-tray-title {
    font-size: 15px;
    font-weight: 600;
}

.csm-blend-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 12px;
    margin-left: 8px;
}

.csm-blend-tray-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

.csm-blend-tray-body {
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 50px);
    transition: max-height 0.3s ease;
}

.csm-blend-tray-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
}

.csm-blend-sticky-footer {
    flex-shrink: 0;
    padding: 12px 20px;
    border-top: 1px solid #e5e1da;
    background: #faf8f5;
}

.csm-blend-items {
    margin-bottom: 12px;
}

.csm-blend-row {
    display: grid;
    grid-template-columns: 140px 1fr auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.csm-blend-name {
    grid-column: 1;
    grid-row: 1;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.csm-blend-name:hover {
    color: #6b4226;
}


.csm-blend-pct-val {
    grid-column: 3;
    grid-row: 1;
}

.csm-blend-remove {
    grid-column: 4;
    grid-row: 1;
}

.csm-blend-notes {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 10px;
    color: #9ca3af;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
    padding-top: 2px;
}

.csm-blend-origin {
    font-style: normal;
    color: #7a6a5a;
}

.csm-blend-slider {
    grid-column: 2;
    grid-row: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e5e1dc;
    outline: none;
    cursor: pointer;
}

.csm-blend-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6b4226;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.csm-blend-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(107,66,38,0.4);
}

.csm-blend-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #6b4226;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

.csm-blend-slider::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: #e5e1dc;
}

.csm-blend-pct-val {
    flex: 0 0 36px;
    font-size: 13px;
    font-weight: 600;
    color: #6b4226;
    text-align: right;
}

.csm-blend-remove {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: #d1d5db;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.15s;
}

.csm-blend-remove:hover {
    color: #ef4444;
    background: #fef2f2;
}

.csm-blend-total-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.csm-blend-total-pct {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    flex: 0 0 auto;
    min-width: 32px;
    text-align: center;
}

.csm-blend-progress {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.csm-blend-progress-fill {
    height: 100%;
    background: #6b4226;
    border-radius: 3px;
    transition: width 0.2s;
}

.csm-blend-progress-fill.csm-over {
    background: #ef4444;
}

.csm-blend-progress-fill.csm-complete {
    background: #16a34a;
}

.csm-blend-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
}

.csm-blend-options-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.csm-blend-option-right {
    margin-left: auto;
}

.csm-blend-option {
    display: flex;
    align-items: center;
    gap: 6px;
}

.csm-blend-option-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    white-space: nowrap;
}

.csm-blend-size-row {
    display: flex;
    gap: 4px;
}

.csm-bsize-btn {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #fff;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.csm-bsize-btn:hover {
    border-color: #6b4226;
    color: #6b4226;
}

.csm-bsize-btn.active {
    background: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

.csm-blend-roast-row {
    display: flex;
    gap: 4px;
}

.csm-broast-btn {
    padding: 4px 10px;
    border: 2px solid var(--roast-color, #d4c4b0);
    border-radius: 14px;
    background: #fff;
    color: var(--roast-color, #6b5344);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.csm-broast-btn:hover {
    background: var(--roast-color, #6b5344);
    color: #fff;
}

.csm-broast-btn.active {
    background: var(--roast-color, #6b5344);
    border-color: var(--roast-color, #6b5344);
    color: #fff;
}

.csm-blend-equalize,
.csm-blend-balance {
    padding: 4px 10px;
    background: #f3f0ec;
    color: #6b4226;
    border: 1px solid #d1c4b0;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
    flex: 0 0 auto;
}

.csm-blend-equalize:hover,
.csm-blend-balance:hover {
    background: #e8e0d5;
}

.csm-blend-balance.csm-needs-balance {
    animation: csm-breathe 2.4s ease-in-out infinite;
}

@keyframes csm-breathe {
    0%, 100% { background: #f3f0ec; border-color: #d1c4b0; color: #6b4226; }
    50% { background: #e0d3c3; border-color: #9a7d5e; color: #5c3520; }
}

.csm-blend-checkout-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.csm-blend-price {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    flex: 0 0 auto;
}

.csm-blend-checkout {
    flex: 1;
    padding: 10px 20px;
    background: linear-gradient(135deg, #8b2d3a 0%, #a33d4a 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.csm-blend-checkout:hover {
    background: linear-gradient(135deg, #a33d4a 0%, #b84d5a 100%);
}

.csm-blend-checkout:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.csm-blend-checkout.csm-btn-success {
    background: #16a34a;
}

.csm-blend-prediction {
    padding: 10px 0;
    min-height: 80px;
    transition: opacity 0.3s;
}

.csm-prediction-hint {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
}

.csm-prediction-loading {
    font-size: 12px;
    color: #8b6f47;
    font-style: italic;
    text-align: center;
}

.csm-prediction-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b6f47;
    animation: csm-pulse 1.2s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 4px;
}

@keyframes csm-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.csm-prediction-result {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #faf8f5;
    border-radius: 10px;
    border-left: 3px solid #d4c4b0;
}

.csm-prediction-swatch {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: inset 0 -2px 4px rgba(0,0,0,0.15), 0 1px 2px rgba(0,0,0,0.1);
    margin-top: 4px;
}

.csm-prediction-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.csm-prediction-name {
    font-family: Georgia, 'Cormorant Garamond', 'Times New Roman', serif;
    font-size: 19px;
    font-weight: 600;
    font-style: italic;
    color: #6b1d2a;
    line-height: 1.2;
    letter-spacing: 0.2px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    position: relative;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}

.csm-prediction-name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, #a33d4a 0%, #d4c4b0 100%);
}

.csm-prediction-name:empty {
    display: none;
}

.csm-prediction-text {
    font-size: 13px;
    font-style: italic;
    color: #6b5344;
    line-height: 1.6;
}

.csm-blend-prediction.stale {
    position: relative;
    cursor: pointer;
}

.csm-blend-prediction.stale .csm-prediction-result {
    filter: blur(3px);
    opacity: 0.4;
    transition: filter 0.4s, opacity 0.4s;
}

.csm-blend-prediction.stale::after {
    content: 'Tap to balance & preview flavor';
    position: absolute;
    inset: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #6b4226;
    letter-spacing: 0.5px;
    border: 1.5px dashed #c4a882;
    border-radius: 8px;
    background: rgba(250,248,245,0.3);
    transition: all 0.2s;
}

.csm-blend-prediction.stale:hover::after {
    background: rgba(250,248,245,0.6);
    border-color: #6b4226;
}

.csm-blend-add-new {
    padding: 10px 14px;
    background: #f3f0ec;
    color: #6b4226;
    border: 1px solid #d1c4b0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.csm-blend-add-new:hover {
    background: #e8e0d5;
}

.csm-blend-added {
    text-align: center;
    padding: 8px 0;
}

.csm-blend-added-msg {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #16a34a;
    margin-bottom: 12px;
}

.csm-blend-added-actions {
    display: flex;
    gap: 10px;
}

.csm-btn-checkout {
    flex: 1;
    padding: 12px 20px;
    background: #6b4226;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.csm-btn-checkout:hover {
    background: #8B5E3C;
    color: #fff;
}

.csm-btn-keep-browsing {
    flex: 1;
    padding: 12px 20px;
    background: #f3f0ec;
    color: #6b4226;
    border: 1px solid #d1c4b0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.csm-btn-keep-browsing:hover {
    background: #e8e0d5;
}

.csm-blender-picker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #6b4226;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 10000;
    padding: 20px;
}

.csm-blender-picker-header {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.csm-blender-picker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.csm-blender-pick-btn {
    padding: 12px 24px;
    background: #6b4226;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.csm-blender-pick-btn:hover {
    background: #8B5E3C;
}

.csm-picker-types {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 2px;
    text-transform: capitalize;
}

.csm-blender-loading {
    padding: 12px;
    color: #6b7280;
    font-size: 14px;
}

.csm-blend-tray-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.csm-blend-change-blender {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.csm-blend-change-blender:hover {
    background: rgba(255,255,255,0.3);
}

.csm-blend-quick-add {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.csm-quick-add-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.csm-quick-add-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.csm-quick-add-btn {
    padding: 6px 14px;
    background: #f3f0ec;
    color: #6b4226;
    border: 1px solid #d1c4b0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.csm-quick-add-btn:hover {
    background: #6b4226;
    color: #fff;
    border-color: #6b4226;
}

@media (max-width: 560px) {
    .csm-catalog {
        padding: 0 12px;
    }

    .csm-catalog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .csm-catalog-filters {
        gap: 6px;
    }

    .csm-filter-btn {
        padding: 6px 14px;
        font-size: 13px;
    }

    .csm-size-buttons {
        flex-wrap: wrap;
    }

    .csm-size-btn {
        flex: 0 0 calc(50% - 4px);
    }

    .csm-blend-row {
        grid-template-columns: 100px 1fr auto auto;
    }

    .csm-blend-name {
        font-size: 12px;
    }

    .csm-blend-checkout {
        flex: 1;
        min-width: 0;
        font-size: 13px;
        padding: 10px 12px;
    }

    .csm-blend-add-new {
        font-size: 12px;
        padding: 10px 10px;
    }

    .csm-prediction-result {
        padding: 12px;
    }

    .csm-prediction-text {
        font-size: 13px;
        line-height: 1.7;
    }

    .csm-blend-options-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .csm-blend-option-right {
        margin-left: 0;
    }
}

/* ===== Blend Gallery Shortcode ===== */
.csm-blend-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 32px 0;
}
.csm-blend-gallery-empty {
    text-align: center;
    padding: 48px 24px;
    font-style: italic;
    color: #8b6f47;
    background: #faf8f5;
    border-radius: 12px;
}
.csm-gallery-card {
    background: #fff;
    border: 1px solid #e5e1da;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(107,66,38,0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.18s, box-shadow 0.18s;
}
.csm-gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107,66,38,0.12);
}
.csm-gallery-card-media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f0eb;
    position: relative;
}

.csm-gallery-admin-edit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(20, 14, 8, 0.78);
    color: #fff7ed !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s;
    border: 1px solid rgba(255, 247, 237, 0.2);
    z-index: 3;
    cursor: pointer;
}
.csm-gallery-card:hover .csm-gallery-admin-edit,
.csm-gallery-admin-edit:focus-visible {
    opacity: 1;
    transform: translateY(0);
}
.csm-gallery-admin-edit:hover {
    background: #6b3e16;
    border-color: #c9a876;
}
.csm-gallery-admin-edit:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}
.csm-gallery-admin-edit svg { display: block; }

@media (hover: none) {
    .csm-gallery-admin-edit { opacity: 1; transform: none; }
}
.csm-gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.csm-gallery-card-swatch {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #8b5a36, #6b4226);
}
.csm-gallery-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.csm-gallery-card-name {
    font-family: Georgia, 'Cormorant Garamond', serif;
    font-size: 19px;
    font-weight: 600;
    font-style: italic;
    color: #6b1d2a;
    margin: 0;
    line-height: 1.2;
    padding-bottom: 6px;
    border-bottom: 1px solid #e5e1da;
}
.csm-gallery-card-meta {
    font-size: 12px;
    color: #8b6f47;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.csm-gallery-card-recipe {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #5c4232;
}
.csm-gallery-card-recipe li {
    padding: 2px 0;
}
.csm-gallery-pct {
    display: inline-block;
    min-width: 36px;
    color: #6b1d2a;
    font-weight: 600;
}
.csm-gallery-card-profile {
    font-size: 13px;
    font-style: italic;
    color: #6b5344;
    line-height: 1.5;
    margin: 4px 0 0 0;
    padding: 8px 10px;
    background: #faf8f5;
    border-left: 2px solid #d4c4b0;
    border-radius: 4px;
}
.csm-gallery-card-song {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f3f0ec;
    border-radius: 8px;
    margin-top: 4px;
}
.csm-gallery-play {
    background: none;
    color: #8b7355;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.csm-gallery-play:hover { opacity: 1; }
.csm-gallery-play.playing {
    color: #c7572a;
    opacity: 1;
}
.csm-gallery-song-style {
    flex: 1;
    font-size: 12px;
    color: #6b5344;
    font-style: italic;
}
.csm-gallery-card-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 2px 0;
}
.csm-gallery-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}
.csm-gallery-bar-name {
    color: #5c4232;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csm-gallery-bar-track {
    height: 8px;
    background: #f3ebe0;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(107, 66, 38, 0.1);
}
.csm-gallery-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5a36, #6b1d2a);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.csm-gallery-bar-pct {
    color: #6b1d2a;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    min-width: 32px;
    text-align: right;
}
.csm-gallery-bar-notes {
    font-size: 10px;
    color: #9ca3af;
    font-style: italic;
    line-height: 1.3;
    margin: -2px 0 4px 0;
    padding-left: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.csm-gallery-bar-origin {
    font-style: normal;
    color: #7a6a5a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 9px;
    margin-right: 2px;
}
.csm-gallery-card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.csm-gallery-btn-edit {
    flex: 0 0 auto;
    background: #f3ebe0;
    color: #6b1d2a;
    border: 1px solid #d4c4b0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.csm-gallery-btn-edit:hover {
    background: #ebe0d0;
    border-color: #b8a48a;
    transform: translateY(-1px);
    text-decoration: none;
    color: #6b1d2a;
}
.csm-gallery-add-cart {
    flex: 1;
    background: linear-gradient(135deg, #6b1d2a, #a33d4a);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s;
}
.csm-gallery-add-cart:hover {
    transform: translateY(-1px);
}
.csm-gallery-add-cart.added {
    background: #4a7c4f;
}
.csm-gallery-songs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}
.csm-gallery-song-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.csm-gallery-song-list:empty {
    display: none;
}
.csm-gallery-music-generate {
    align-self: flex-start;
    background: #f3ebe0;
    color: #6b1d2a;
    border: 1px dashed #c8b89c;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
}
.csm-gallery-music-generate:hover:not(.is-disabled):not(:disabled) {
    background: #ebe0d0;
    border-style: solid;
    border-color: #b8a48a;
    transform: translateY(-1px);
}
.csm-gallery-music-generate.is-disabled,
.csm-gallery-music-generate:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.csm-gallery-music-generate.is-loading {
    opacity: 0.7;
    cursor: wait;
}
.csm-gallery-music-generate-count {
    font-variant-numeric: tabular-nums;
    background: rgba(107, 29, 42, 0.12);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
}
.csm-gallery-size-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0 2px 0;
}
.csm-gallery-size-btn {
    flex: 1 1 auto;
    background: #fff;
    color: #5c4232;
    border: 1px solid #d4c4b0;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
    min-width: 0;
}
.csm-gallery-size-btn:hover {
    border-color: #8b5a36;
    background: #faf8f5;
}
.csm-gallery-size-btn.active {
    background: linear-gradient(135deg, #6b1d2a, #a33d4a);
    border-color: #6b1d2a;
    color: #fff;
}

/* ===== Order Detail Page Blend Perks ===== */
.csm-order-blend-perks {
    margin-top: 16px;
    padding: 16px 18px;
    background: linear-gradient(135deg, #faf8f5, #f3ebe0);
    border: 1px solid #d4c4b0;
    border-radius: 12px;
}
.csm-order-blend-perks-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b1d2a;
    margin-bottom: 12px;
}
.csm-order-blend-clip,
.csm-order-blend-full {
    margin-top: 12px;
}
.csm-order-blend-label,
.csm-order-blend-full-title {
    display: block;
    font-size: 12px;
    color: #8b6f47;
    margin-bottom: 6px;
    font-style: italic;
}
.csm-order-blend-full-title {
    font-size: 13px;
    color: #6b1d2a;
    font-style: normal;
    font-weight: 600;
}
.csm-order-blend-perks audio {
    width: 100%;
    max-width: 420px;
}
.csm-order-blend-generate-full {
    background: linear-gradient(135deg, #6b1d2a, #a33d4a);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(107,29,42,0.25);
    transition: transform 0.15s;
}
.csm-order-blend-generate-full:hover {
    transform: translateY(-1px);
}
.csm-order-blend-generate-full.generating {
    background: #8b6f47;
    pointer-events: none;
}
.csm-order-blend-full-status {
    margin-top: 8px;
    font-size: 13px;
    color: #6b5344;
    font-style: italic;
}
.csm-order-blend-download {
    display: inline-block;
    margin-top: 8px;
    margin-left: 8px;
    color: #6b1d2a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.csm-order-blend-download:hover {
    text-decoration: underline;
}

/* ===== Song Favorite Heart ===== */
.csm-song-favorite {
    background: none;
    border: none;
    color: #c7b8a3;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: color 0.15s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.csm-song-favorite:hover {
    color: #a33d4a;
    transform: scale(1.1);
}
.csm-song-favorite.is-favorite {
    color: #6b1d2a;
}
.csm-song-favorite.is-favorite:hover {
    color: #a33d4a;
}
.csm-fav-count {
    font-size: 11px;
    font-weight: 600;
    color: #8b6f47;
    background: rgba(255,255,255,0.7);
    padding: 1px 5px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.csm-gallery-card-header {
    padding: 8px 10px 0;
}
.csm-gallery-card-header .csm-gallery-card-name {
    margin: 0;
}
.csm-gallery-card-header .csm-gallery-card-meta {
    margin: 0 0 4px;
}

/* ===== Gallery Songs List ===== */
.csm-gallery-songs {
    margin-top: 6px;
    padding: 8px 10px;
    background: #faf8f5;
    border-radius: 0;
    border-left: 3px solid #d4c4b0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.csm-gallery-song-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}
.csm-gallery-song-style {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    font-style: italic;
    color: #8b7355;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csm-gallery-song-row .csm-vibe-mini {
    font-size: 11px;
    padding: 0 2px;
}

/* Override the simpler single-song gallery styles for the new multi-song layout */
.csm-gallery-card-profile {
    font-size: 13px;
    font-style: italic;
    color: #6b5344;
    line-height: 1.6;
    margin: 6px 0 0 0;
    padding: 10px 12px;
    background: #faf8f5;
    border-left: 3px solid #d4c4b0;
    border-radius: 6px;
}
.csm-gallery-card-name {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 4px;
}
.csm-gallery-card-name::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 1px;
    background: linear-gradient(90deg, #a33d4a 0%, #d4c4b0 100%);
}

.csm-catalog-advanced-toggle {
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1.4;
}
.csm-adv-roast-select {
    padding: 4px 8px;
    font-size: 13px;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    min-width: 160px;
}
.csm-catalog-advanced-toggle:hover,
.csm-catalog-advanced-toggle.active {
    background: #8b7355;
    color: #fff;
}

.csm-ingredient-songs {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e7dfd3;
}
.csm-songs-heading {
    font-size: 18px;
    margin: 0 0 14px;
    color: #3c2414;
    font-weight: 600;
}
.csm-songs-loading,
.csm-songs-empty {
    padding: 16px 18px;
    color: #6b5b4a;
    font-style: italic;
    background: #faf6ef;
    border-radius: 10px;
    font-size: 14px;
}
.csm-song-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff8ed 0%, #fff 100%);
    border: 1px solid #ece1cd;
    border-radius: 12px;
}
.csm-song-meta { flex: 0 0 160px; min-width: 0; }
.csm-song-title {
    font-weight: 600;
    color: #3c2414;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csm-song-style {
    font-size: 11px;
    color: #8b6f4d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csm-song-card audio {
    flex: 1;
    min-width: 0;
    height: 36px;
}
.csm-song-vibes {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}
.csm-vibe-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 10px;
    background: #fff;
    border: 1px solid #e0d4bf;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #5c4530;
    transition: all 0.15s;
    min-width: 48px;
}
.csm-vibe-btn:hover { background: #fff3e0; border-color: #c9a876; }
.csm-vibe-btn.active { background: #fef3c7; border-color: #d97706; color: #92400e; }
.csm-vibe-btn .csm-vibe-count {
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}
.csm-vibe-btn .csm-vibe-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1px;
    opacity: 0.7;
}
.csm-songs-footer {
    margin-top: 14px;
    text-align: center;
}
.csm-song-generate-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, #6b3e16, #8b5a2b);
    color: #fff;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.csm-song-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 62, 22, 0.3);
}
.csm-song-generate-btn:disabled { opacity: 0.7; cursor: wait; }
.csm-song-generate-btn.generating { background: #8b7355; }
.csm-song-generate-status {
    margin-top: 8px;
    font-size: 12px;
    color: #8b6f4d;
    font-style: italic;
    min-height: 16px;
}
.csm-songs-count {
    font-size: 13px;
    color: #6b5b4a;
    font-style: italic;
}
@media (max-width: 600px) {
    .csm-song-card { flex-wrap: wrap; }
    .csm-song-meta { flex: 1 1 100%; }
    .csm-song-card audio { flex: 1 1 100%; }
    .csm-song-vibes { flex: 1 1 100%; justify-content: space-between; }
    .csm-vibe-btn { flex: 1; }
}


/* ===== /songs/ — Jitter House Sessions list (iTunes/Tidal-style) ===== */

.csm-songs-app {
    padding-top: 32px;
    padding-bottom: 80px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #1a0f07;
}

.csm-songs-header {
    position: relative;
    text-align: center;
    padding: 48px 24px 40px;
    margin-bottom: 24px;
    border-radius: 24px;
    background:
        radial-gradient(900px 360px at 50% -40%, rgba(217, 119, 6, 0.20), transparent 60%),
        linear-gradient(135deg, #1a0f07 0%, #3c2414 55%, #5c3a1f 100%);
    color: #fff7ed;
    overflow: hidden;
}
.csm-songs-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.18);
    color: #fde68a;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.csm-songs-header-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    animation: csm-live-pulse 1.6s ease-out infinite;
}
@keyframes csm-live-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
.csm-songs-page-title {
    font-size: clamp(28px, 4.5vw, 48px);
    margin: 0 0 12px;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.05;
    color: #fff7ed;
}
.csm-songs-page-sub {
    font-size: 15px;
    color: rgba(255, 247, 237, 0.78);
    margin: 0 auto;
    max-width: 620px;
    line-height: 1.55;
}

.csm-songs-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.csm-songs-tabs {
    display: flex;
    gap: 4px;
    background: #faf6ef;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid #ece1cd;
}
.csm-songs-tab {
    padding: 7px 16px;
    border-radius: 999px;
    background: transparent;
    border: none;
    color: #5c4530;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.csm-songs-tab:hover { background: #fff; color: #2a1a0d; }
.csm-songs-tab.is-active {
    background: #1a0f07;
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 15, 7, 0.25);
}
.csm-songs-tab span { opacity: 0.65; font-size: 11px; margin-left: 3px; font-weight: 500; }
.csm-songs-tab.is-active span { opacity: 0.85; }

.csm-songs-toolbar-right {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1 1 320px;
    justify-content: flex-end;
}
.csm-songs-search {
    flex: 1 1 240px;
    min-width: 200px;
    padding: 9px 14px 9px 36px;
    border: 1.5px solid #ece1cd;
    border-radius: 999px;
    font-size: 13px;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b6f4d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>") 12px center no-repeat;
    transition: all 0.15s;
    font-family: inherit;
}
.csm-songs-search:focus {
    outline: none;
    border-color: #c9a876;
    box-shadow: 0 0 0 3px rgba(201, 168, 118, 0.15);
}
.csm-songs-sort-select {
    padding: 9px 36px 9px 14px;
    border: 1.5px solid #ece1cd;
    border-radius: 999px;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b6f4d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") right 12px center no-repeat;
    font-size: 13px;
    font-weight: 600;
    color: #2a1a0d;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    min-width: 160px;
}

.csm-songs-list-head {
    display: grid;
    grid-template-columns: 56px 1fr 200px 60px 56px 130px 80px;
    gap: 14px;
    align-items: center;
    padding: 8px 16px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b6f4d;
    font-weight: 700;
    border-bottom: 1px solid #ece1cd;
}
.csm-col-art { text-align: center; }
.csm-col-bpm { text-align: right; }
.csm-col-plays { text-align: center; font-size: 14px; }
.csm-col-vibes { text-align: center; }
.csm-col-date { text-align: right; }

.csm-songs-list {
    display: flex;
    flex-direction: column;
}

.csm-songs-row {
    display: grid;
    grid-template-columns: 56px 1fr 200px 60px 56px 130px 80px;
    gap: 14px;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
    contain: layout style;
    content-visibility: auto;
    contain-intrinsic-size: auto 64px;
}
.csm-songs-row:hover {
    background: #faf6ef;
    border-color: #ece1cd;
}
.csm-songs-row.is-playing {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.08), rgba(251, 191, 36, 0.04));
    border-color: rgba(217, 119, 6, 0.35);
}

.csm-songs-art {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: linear-gradient(135deg, #3c2414, #8b5a2b);
    background-size: cover;
    background-position: center;
    margin: 0 auto;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}
.csm-songs-art-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 247, 237, 0.7);
    font-size: 22px;
}
.csm-songs-art::after {
    content: "▶";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.12s;
    border-radius: inherit;
    padding-left: 2px;
}
.csm-songs-row:hover .csm-songs-art::after,
.csm-songs-row.is-playing .csm-songs-art::after { opacity: 1; }
.csm-songs-row.is-playing .csm-songs-art::after { content: "❚❚"; padding-left: 0; }

.csm-songs-title-cell { min-width: 0; }
.csm-songs-title {
    font-weight: 600;
    font-size: 14px;
    color: #1a0f07;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.csm-songs-row.is-playing .csm-songs-title { color: #6b3e16; }
.csm-songs-style {
    font-size: 11px;
    color: #8b6f4d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.csm-songs-source-cell { min-width: 0; }
.csm-songs-source {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 11px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.12s;
}
.csm-songs-source-blend {
    background: #ede9fe;
    color: #5b21b6;
}
.csm-songs-source-blend:hover { background: #ddd6fe; }
.csm-songs-source-ingredient {
    background: #fef3c7;
    color: #92400e;
}
.csm-songs-source-ingredient:hover { background: #fde68a; }
.csm-songs-source-album {
    background: #fee2e2;
    color: #9f1239;
}
.csm-songs-source-album:hover { background: #fecaca; }

.csm-songs-bpm-cell {
    text-align: right;
    font-size: 12px;
    color: #6b5b4a;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.csm-songs-bpm-cell .empty { color: #c7b8a8; font-weight: 400; }

.csm-songs-plays-cell {
    text-align: center;
    font-size: 12px;
    color: #6b5b4a;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.csm-songs-vibes-cell {
    display: flex;
    gap: 3px;
    justify-content: center;
}
.csm-songs-vibe-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 7px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: #5c4530;
    transition: transform 0.12s, background 0.12s, border-color 0.12s;
    font-family: inherit;
    font-weight: 700;
}
.csm-songs-vibe-btn:hover {
    background: #faf6ef;
    border-color: #e0d4bf;
}
.csm-songs-vibe-btn.is-active {
    background: #fef3c7;
    border-color: #d97706;
    color: #92400e;
}
.csm-songs-vibe-btn .vibe-count {
    font-size: 11px;
    font-weight: 700;
    color: #2a1a0d;
    font-variant-numeric: tabular-nums;
}
.csm-songs-vibe-btn.is-active .vibe-count { color: #92400e; }
.csm-songs-vibe-btn.bumping {
    animation: csm-vibe-bump 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes csm-vibe-bump {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.csm-songs-date-cell {
    text-align: right;
    font-size: 11px;
    color: #8b6f4d;
    white-space: nowrap;
}
.csm-songs-share-btn {
    background: transparent;
    border: 1px solid rgba(139, 111, 77, 0.25);
    border-radius: 4px;
    color: #6b4423;
    font-size: 12px;
    line-height: 1;
    padding: 3px 7px;
    margin-left: 6px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
}
.csm-songs-share-btn:hover {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.45);
}
.csm-songs-share-btn:active { transform: scale(0.94); }
.csm-songs-share-btn:disabled { opacity: 0.6; cursor: wait; }

.csm-songs-load-more-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 24px 0 12px;
    margin-top: 12px;
    border-top: 1px solid #ece1cd;
}
.csm-songs-load-more {
    padding: 10px 24px;
    background: linear-gradient(135deg, #6b3e16, #8b5a2b);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: inherit;
}
.csm-songs-load-more:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 62, 22, 0.3);
}
.csm-songs-counter {
    font-size: 12px;
    color: #8b6f4d;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.csm-songs-empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #8b6f4d;
    font-size: 14px;
    background: #faf6ef;
    border: 1px dashed #ece1cd;
    border-radius: 14px;
    line-height: 1.6;
}
.csm-songs-empty-state strong { color: #2a1a0d; font-size: 16px; display: block; margin-bottom: 8px; }
.csm-songs-empty-state a { color: #6b3e16; font-weight: 700; }

@media (max-width: 900px) {
    .csm-songs-list-head { display: none; }
    .csm-songs-row {
        grid-template-columns: 48px 1fr auto;
        grid-template-areas:
            "art title vibes"
            "art source plays";
        gap: 6px 12px;
        padding: 10px 12px;
        contain-intrinsic-size: auto 76px;
    }
    .csm-songs-art { grid-area: art; align-self: center; }
    .csm-songs-title-cell { grid-area: title; align-self: end; }
    .csm-songs-source-cell { grid-area: source; align-self: start; }
    .csm-songs-bpm-cell { display: none; }
    .csm-songs-vibes-cell { grid-area: vibes; justify-content: flex-end; align-self: end; }
    .csm-songs-plays-cell { grid-area: plays; text-align: right; align-self: start; font-size: 11px; }
    .csm-songs-date-cell { display: none; }
}
@media (max-width: 540px) {
    .csm-songs-toolbar { flex-direction: column; align-items: stretch; }
    .csm-songs-toolbar-right { margin-left: 0; }
    .csm-songs-tabs { justify-content: center; }
}

/* ===== Album cards (in /songs/ Albums tab) ===== */
.csm-songs-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    padding: 8px 0;
}
.csm-album-card {
    background: #fff;
    border: 1px solid #f0e6d2;
    border-radius: 14px;
    padding: 14px;
    text-decoration: none !important;
    color: #1a0f07;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.csm-album-card:hover {
    transform: translateY(-3px);
    border-color: #d8c4a3;
    box-shadow: 0 10px 28px rgba(60, 36, 20, 0.12);
}
.csm-album-card-cover {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background: linear-gradient(135deg, #3c2414, #8b5a2b);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: rgba(255, 247, 237, 0.7);
    box-shadow: 0 4px 12px rgba(60, 36, 20, 0.18);
}
.csm-album-card-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.csm-album-card-title {
    font-weight: 700;
    color: #1a0f07;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csm-album-card-meta {
    font-size: 12px;
    color: #8b6f4d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csm-album-card-tracks {
    font-size: 11px;
    color: #6b5b4a;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

/* ===== Single album page (/album/{slug}/) ===== */
.csm-album-page { padding-top: 32px; padding-bottom: 80px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; color: #1a0f07; }

.csm-album-hero {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: end;
    padding: 32px;
    margin-bottom: 28px;
    border-radius: 24px;
    background:
        radial-gradient(900px 360px at 50% -40%, rgba(217, 119, 6, 0.18), transparent 60%),
        linear-gradient(135deg, #1a0f07 0%, #3c2414 55%, #5c3a1f 100%);
    color: #fff7ed;
}
.csm-album-hero-art {
    width: 280px;
    height: 280px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #6b3e16, #8b5a2b);
}
.csm-album-hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csm-album-hero-art-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 96px; color: rgba(255, 247, 237, 0.6);
}
.csm-album-hero-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.csm-album-hero-eyebrow {
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; color: #fde68a;
}
.csm-album-hero-title {
    font-size: clamp(32px, 5vw, 56px);
    margin: 0;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.05;
    color: #fff7ed;
}
.csm-album-hero-meta { font-size: 14px; color: rgba(255, 247, 237, 0.78); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.csm-album-hero-artist { font-weight: 600; color: #fff7ed; }
.csm-album-hero-sep { opacity: 0.4; }
.csm-album-hero-actions { display: flex; gap: 10px; margin-top: 8px; }
.csm-album-play-btn,
.csm-album-shuffle-btn {
    padding: 11px 24px;
    background: #fbbf24;
    color: #1a0f07;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
    font-family: inherit;
}
.csm-album-play-btn:hover { background: #fcd34d; transform: translateY(-1px); }
.csm-album-shuffle-btn {
    background: rgba(255, 247, 237, 0.10);
    color: #fff7ed;
    border: 1px solid rgba(255, 247, 237, 0.20);
}
.csm-album-shuffle-btn:hover { background: rgba(255, 247, 237, 0.16); }

.csm-album-liner-notes {
    padding: 18px 24px;
    background: #faf6ef;
    border-radius: 14px;
    margin-bottom: 18px;
    color: #3c2414;
    font-size: 14px;
    line-height: 1.65;
}
.csm-album-liner-notes p:first-child { margin-top: 0; }
.csm-album-liner-notes p:last-child { margin-bottom: 0; }

.csm-album-tracklist-head,
.csm-album-track-row {
    display: grid;
    grid-template-columns: 40px 1fr 200px 60px 130px;
    gap: 14px;
    align-items: center;
    padding: 10px 16px;
}
.csm-album-tracklist-head {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b6f4d;
    font-weight: 700;
    border-bottom: 1px solid #ece1cd;
}
.csm-album-track-row {
    border-radius: 10px;
    transition: background 0.12s;
}
.csm-album-track-row:hover { background: #faf6ef; }
.csm-album-track-row.is-playing {
    background: linear-gradient(90deg, rgba(217, 119, 6, 0.10), rgba(251, 191, 36, 0.05));
    color: #6b3e16;
}
.csm-album-col-num { text-align: center; color: #8b6f4d; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.csm-album-col-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.csm-album-track-name { font-weight: 600; font-size: 14px; color: #1a0f07; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csm-album-track-row.is-playing .csm-album-track-name { color: #6b3e16; }
.csm-album-col-style { color: #6b5b4a; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csm-album-col-plays { text-align: center; color: #6b5b4a; font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; }
.csm-album-col-vibes { display: flex; gap: 4px; justify-content: flex-end; }

.csm-album-track-play {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid transparent;
    color: #6b3e16;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
    font-family: inherit;
}
.csm-album-track-play:hover {
    background: #fbbf24;
    border-color: #fbbf24;
    color: #1a0f07;
    transform: scale(1.04);
}
.csm-album-track-row.is-playing .csm-album-track-play {
    background: #fbbf24;
    border-color: #fbbf24;
    color: #1a0f07;
}

@media (max-width: 800px) {
    .csm-album-hero { grid-template-columns: 1fr; padding: 24px; gap: 20px; align-items: start; }
    .csm-album-hero-art { width: 100%; height: auto; aspect-ratio: 1; max-width: 320px; margin: 0 auto; }
    .csm-album-tracklist-head { display: none; }
    .csm-album-track-row { grid-template-columns: 32px 1fr auto; gap: 8px; padding: 10px; }
    .csm-album-col-style { display: none; }
    .csm-album-col-plays { display: none; }
}
