.tbs-store,
.tbs-store * {
    box-sizing: border-box;
}

.tbs-store [hidden],
.tbs-store .is-filtered-out {
    display: none !important;
}

.tbs-store {
    --tbs-bg: #0d111a;
    --tbs-panel: #151b27;
    --tbs-panel-2: #1b2332;
    --tbs-text: #ffffff;
    --tbs-muted: #a7b0c3;
    --tbs-border: rgba(255, 255, 255, 0.1);
    --tbs-row-hover: rgba(255, 255, 255, 0.045);
    --tbs-slider-bg: rgba(255, 255, 255, 0.16);
    --tbs-license-button-bg: var(--tbs-accent);
    --tbs-license-option-bg: #05070b;
    --tbs-license-text: #ffffff;
    --tbs-shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
    width: var(--tbs-player-width, 100%);
    max-width: 100%;
    height: var(--tbs-player-height, 600px);
    min-height: 250px;
    margin: 24px auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--tbs-text);
    background: var(--tbs-bg);
    border: 1px solid var(--tbs-border);
    border-radius: 18px;
    font-family: inherit;
    box-shadow: var(--tbs-shadow);
}

.tbs-theme-light {
    --tbs-bg: #f5f8fc;
    --tbs-panel: #ffffff;
    --tbs-panel-2: #ecf2f9;
    --tbs-text: #151a24;
    --tbs-muted: #5e6a7d;
    --tbs-border: rgba(20, 27, 45, 0.12);
    --tbs-row-hover: rgba(20, 27, 45, 0.04);
    --tbs-slider-bg: rgba(20, 27, 45, 0.14);
    --tbs-license-button-bg: var(--tbs-accent);
    --tbs-license-option-bg: #101722;
    --tbs-license-text: #ffffff;
    --tbs-shadow: 0 20px 45px rgba(24, 31, 50, 0.12);
}

.tbs-theme-custom:not(.tbs-custom-base-dark):not(.tbs-custom-base-light) {
    --tbs-panel-2: color-mix(in srgb, var(--tbs-panel) 88%, var(--tbs-text) 12%);
    --tbs-border: color-mix(in srgb, var(--tbs-text) 11%, transparent);
    --tbs-row-hover: color-mix(in srgb, var(--tbs-text) 4.5%, transparent);
    --tbs-slider-bg: color-mix(in srgb, var(--tbs-text) 16%, transparent);
    --tbs-shadow: 0 22px 55px color-mix(in srgb, var(--tbs-text) 10%, transparent);
}

.tbs-empty,
.tbs-no-results {
    flex: 0 0 auto;
    padding: 18px;
    border-radius: 12px;
    background: var(--tbs-panel);
    border: 1px solid var(--tbs-border);
    color: var(--tbs-text);
}

.tbs-player {
    flex: 0 0 auto;
    padding: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--tbs-panel), var(--tbs-panel-2));
    border: 1px solid var(--tbs-border);
    border-radius: 16px;
}

.tbs-now-playing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.tbs-now-label {
    color: var(--tbs-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.tbs-current-title {
    min-width: 0;
    font-size: 17px;
    line-height: 1.25;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbs-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.tbs-transport-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.tbs-timeline {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 220px;
}

.tbs-controls button,
.tbs-play-beat,
.tbs-toggle-licenses {
    border: none;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
    transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tbs-controls button,
.tbs-play-beat {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: var(--tbs-accent);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--tbs-accent) 26%, transparent);
}

.tbs-play-main {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    font-size: 15px !important;
}

.tbs-transport-icon {
    width: 19px;
    height: 19px;
    display: block;
    flex: 0 0 auto;
    fill: currentColor;
}

.tbs-play-main .tbs-transport-icon {
    width: 23px;
    height: 23px;
}

.tbs-icon-pause {
    display: none;
}

.tbs-play-main.is-playing .tbs-icon-play,
.tbs-play-beat.is-playing .tbs-icon-play {
    display: none;
}

.tbs-play-main.is-playing .tbs-icon-pause,
.tbs-play-beat.is-playing .tbs-icon-pause {
    display: block;
}

.tbs-controls button:hover,
.tbs-play-beat:hover,
.tbs-toggle-licenses:hover {
    transform: translateY(-1px);
    opacity: 0.94;
}

.tbs-volume-wrap {
    min-width: 128px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--tbs-accent);
}

.tbs-controls button.tbs-volume-toggle {
    width: 24px;
    height: 34px;
    min-width: 24px;
    padding: 0;
    background: transparent;
    color: var(--tbs-accent);
    border-radius: 0;
    box-shadow: none;
}

.tbs-controls button.tbs-volume-toggle:hover,
.tbs-controls button.tbs-volume-toggle.is-muted {
    background: transparent;
    color: var(--tbs-accent);
    box-shadow: none;
}

.tbs-controls button.tbs-volume-toggle:focus-visible {
    outline: 2px solid var(--tbs-accent);
    outline-offset: 3px;
}

.tbs-volume-toggle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    overflow: visible;
}

.tbs-volume-toggle .tbs-mute-mark {
    display: none;
}

.tbs-volume-toggle.is-low .tbs-wave-high {
    display: none;
}

.tbs-volume-toggle.is-muted .tbs-wave-low,
.tbs-volume-toggle.is-muted .tbs-wave-high {
    display: none;
}

.tbs-volume-toggle.is-muted .tbs-mute-mark {
    display: block;
}

.tbs-volume {
    width: 104px;
    height: 8px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(to right, var(--tbs-accent) 0%, var(--tbs-accent) var(--tbs-volume-percent, 100%), var(--tbs-slider-bg) var(--tbs-volume-percent, 100%), var(--tbs-slider-bg) 100%);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.tbs-volume::-webkit-slider-runnable-track {
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
}

.tbs-volume::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    margin-top: -4px;
    border: 0;
    border-radius: 999px;
    background: var(--tbs-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tbs-accent) 18%, transparent), 0 3px 8px rgba(0, 0, 0, 0.24);
    appearance: none;
    -webkit-appearance: none;
}

.tbs-volume::-moz-range-track {
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--tbs-slider-bg);
}

.tbs-volume::-moz-range-progress {
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--tbs-accent);
}

.tbs-volume::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 999px;
    background: var(--tbs-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--tbs-accent) 18%, transparent), 0 3px 8px rgba(0, 0, 0, 0.24);
}

.tbs-volume:focus-visible::-webkit-slider-thumb,
.tbs-volume:focus-visible::-moz-range-thumb {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--tbs-accent) 32%, transparent), 0 3px 8px rgba(0, 0, 0, 0.24);
}

.tbs-current-time,
.tbs-duration {
    min-width: 42px;
    color: var(--tbs-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.tbs-progress {
    flex: 1 1 0;
    min-width: 120px;
    height: 10px;
    background: var(--tbs-slider-bg);
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    touch-action: none;
}

.tbs-progress-bar {
    display: block;
    width: 0%;
    height: 100%;
    background: var(--tbs-accent);
    border-radius: inherit;
    box-shadow: 0 0 16px color-mix(in srgb, var(--tbs-accent) 55%, transparent);
}

.tbs-filters {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.tbs-filters input,
.tbs-filters select {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    border: 1px solid var(--tbs-border);
    background: var(--tbs-panel);
    color: var(--tbs-text);
    border-radius: 12px;
    padding: 9px 12px;
    outline: none;
}

.tbs-filters input::placeholder {
    color: var(--tbs-muted);
}

.tbs-filters input:focus,
.tbs-filters select:focus {
    border-color: var(--tbs-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--tbs-accent) 30%, transparent);
}

.tbs-beat-list {
    flex: 1 1 auto;
    min-height: 0;
    background: var(--tbs-panel);
    border: 1px solid var(--tbs-border);
    border-radius: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--tbs-accent) var(--tbs-panel-2);
}

.tbs-beat-list::-webkit-scrollbar {
    width: 9px;
}

.tbs-beat-list::-webkit-scrollbar-track {
    background: var(--tbs-panel-2);
}

.tbs-beat-list::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--tbs-accent) 78%, var(--tbs-panel-2));
    border: 2px solid var(--tbs-panel-2);
    border-radius: 999px;
}

.tbs-beat-list-header,
.tbs-beat-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tbs-beat-list-header {
    position: sticky;
    top: 0;
    z-index: 5;
    min-height: 44px;
    padding: 0 16px;
    background: var(--tbs-panel-2);
    color: var(--tbs-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--tbs-border);
}

.tbs-header-title,
.tbs-title-cell {
    flex: 1 1 260px;
    min-width: 180px;
}

.tbs-header-time,
.tbs-time-cell {
    flex: 0 0 72px;
}

.tbs-header-bpm,
.tbs-bpm-cell {
    flex: 0 0 70px;
}

.tbs-header-key,
.tbs-key-cell {
    flex: 0 0 82px;
}

.tbs-header-genre,
.tbs-genre-cell {
    flex: 0 0 122px;
}

.tbs-header-license,
.tbs-card-actions {
    flex: 0 0 142px;
}

.tbs-beat-card {
    background: transparent;
    border-bottom: 1px solid var(--tbs-border);
}

.tbs-beat-card:last-child {
    border-bottom: none;
}

.tbs-beat-card.is-active {
    background: color-mix(in srgb, var(--tbs-accent) 10%, transparent);
}

.tbs-beat-row {
    min-height: 70px;
    padding: 10px 16px;
}

.tbs-beat-row:hover {
    background: var(--tbs-row-hover);
}

.tbs-title-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
}

.tbs-play-beat {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    font-size: 11px;
}

.tbs-cover {
    width: 48px;
    height: 48px;
    min-width: 48px;
    aspect-ratio: 1 / 1;
    background: var(--tbs-panel-2);
    border: 1px solid var(--tbs-border);
    border-radius: 10px;
    overflow: hidden;
}

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

.tbs-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tbs-accent);
    font-size: 22px;
    background: radial-gradient(circle at top left, color-mix(in srgb, var(--tbs-accent) 24%, transparent), transparent 44%), var(--tbs-panel-2);
}

.tbs-card-text {
    min-width: 0;
    flex: 1;
}

.tbs-card-text h3 {
    margin: 0;
    color: var(--tbs-text);
    font-size: 15px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbs-producer {
    margin: 3px 0 0;
    color: var(--tbs-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbs-time-cell,
.tbs-bpm-cell,
.tbs-key-cell,
.tbs-genre-cell {
    color: var(--tbs-muted);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.tbs-card-actions {
    display: flex;
    justify-content: flex-end;
}

.tbs-toggle-licenses {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--tbs-license-button-bg);
    color: var(--tbs-license-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--tbs-license-button-bg) 24%, transparent);
}

.tbs-license-panel {
    padding: 16px 16px 18px 109px;
    background: color-mix(in srgb, var(--tbs-accent) 7%, transparent);
    border-top: 1px solid var(--tbs-border);
}

.tbs-license-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.tbs-license-option {
    width: 100%;
    min-height: 82px;
    padding: 11px 14px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tbs-border);
    border-radius: 12px;
    background: var(--tbs-license-option-bg);
    color: var(--tbs-license-text);
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    touch-action: manipulation;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.tbs-license-option:hover,
.tbs-license-option:focus-visible,
.tbs-license-option:active {
    transform: translateY(-1px);
    background: var(--tbs-accent);
    color: var(--tbs-license-text);
    border-color: var(--tbs-accent);
    outline: none;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--tbs-accent) 30%, transparent);
}

.tbs-license-option.is-disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.tbs-license-option.is-disabled:hover {
    transform: none;
    background: #05070b;
    border-color: var(--tbs-border);
    box-shadow: none;
}

.tbs-license-name,
.tbs-license-price,
.tbs-license-detail {
    display: block;
    width: 100%;
    text-align: center;
}

.tbs-license-name {
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.tbs-license-price {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.tbs-license-detail {
    margin-top: 9px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    line-height: 1.4;
}

.tbs-disabled-buy {
    color: var(--tbs-muted);
    font-size: 12px;
}

/* Device-specific visibility: desktop */
@media (min-width: 901px) {
    .tbs-hide-volume-desktop .tbs-volume-wrap,
    .tbs-hide-cover-desktop .tbs-cover,
    .tbs-hide-producer-desktop .tbs-producer,
    .tbs-hide-search-desktop .tbs-search,
    .tbs-hide-filter-producer-desktop .tbs-filter-producer,
    .tbs-hide-filter-genre-desktop .tbs-filter-genre,
    .tbs-hide-filter-key-desktop .tbs-filter-key,
    .tbs-hide-filter-bpm-min-desktop .tbs-filter-bpm-min,
    .tbs-hide-filter-bpm-max-desktop .tbs-filter-bpm-max,
    .tbs-hide-filterbar-desktop .tbs-filters {
        display: none !important;
    }

    .tbs-hide-time-desktop .tbs-header-time,
    .tbs-hide-time-desktop .tbs-time-cell,
    .tbs-hide-bpm-desktop .tbs-header-bpm,
    .tbs-hide-bpm-desktop .tbs-bpm-cell,
    .tbs-hide-key-desktop .tbs-header-key,
    .tbs-hide-key-desktop .tbs-key-cell,
    .tbs-hide-genre-desktop .tbs-header-genre,
    .tbs-hide-genre-desktop .tbs-genre-cell {
        display: none !important;
    }
}

/* Tablet layout and visibility */
@media (min-width: 701px) and (max-width: 900px) {
    .tbs-store {
        padding: 14px;
        border-radius: 16px;
    }

    .tbs-controls {
        flex-wrap: wrap;
    }

    .tbs-timeline {
        flex: 1 0 100%;
        width: 100%;
    }

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

    .tbs-search {
        grid-column: span 2;
    }

    .tbs-beat-list-header,
    .tbs-beat-row {
        gap: 9px;
    }

    .tbs-header-title,
    .tbs-title-cell {
        flex-basis: 220px;
        min-width: 170px;
    }

    .tbs-header-time,
    .tbs-time-cell {
        flex-basis: 62px;
    }

    .tbs-header-bpm,
    .tbs-bpm-cell {
        flex-basis: 56px;
    }

    .tbs-header-key,
    .tbs-key-cell {
        flex-basis: 64px;
    }

    .tbs-header-genre,
    .tbs-genre-cell {
        flex-basis: 88px;
    }

    .tbs-header-license,
    .tbs-card-actions {
        flex-basis: 118px;
    }

    .tbs-license-panel {
        padding-left: 95px;
    }

    .tbs-license-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 9px;
    }

    .tbs-hide-volume-tablet .tbs-volume-wrap,
    .tbs-hide-cover-tablet .tbs-cover,
    .tbs-hide-producer-tablet .tbs-producer,
    .tbs-hide-search-tablet .tbs-search,
    .tbs-hide-filter-producer-tablet .tbs-filter-producer,
    .tbs-hide-filter-genre-tablet .tbs-filter-genre,
    .tbs-hide-filter-key-tablet .tbs-filter-key,
    .tbs-hide-filter-bpm-min-tablet .tbs-filter-bpm-min,
    .tbs-hide-filter-bpm-max-tablet .tbs-filter-bpm-max,
    .tbs-hide-filterbar-tablet .tbs-filters {
        display: none !important;
    }

    .tbs-hide-time-tablet .tbs-header-time,
    .tbs-hide-time-tablet .tbs-time-cell,
    .tbs-hide-bpm-tablet .tbs-header-bpm,
    .tbs-hide-bpm-tablet .tbs-bpm-cell,
    .tbs-hide-key-tablet .tbs-header-key,
    .tbs-hide-key-tablet .tbs-key-cell,
    .tbs-hide-genre-tablet .tbs-header-genre,
    .tbs-hide-genre-tablet .tbs-genre-cell {
        display: none !important;
    }
}

/* Phone layout and visibility */
@media (max-width: 700px) {
    .tbs-store {
        min-height: 360px;
        margin: 12px auto;
        padding: 10px;
        border-radius: 14px;
    }

    .tbs-player {
        margin-bottom: 10px;
        padding: 12px;
        border-radius: 13px;
    }

    .tbs-now-playing {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 11px;
    }

    .tbs-current-title {
        width: 100%;
        font-size: 15px;
        text-align: left;
    }

    .tbs-controls {
        display: grid;
        grid-template-columns: max-content minmax(94px, 1fr);
        gap: 9px 10px;
        align-items: center;
    }

    .tbs-transport-group {
        grid-column: 1;
        grid-row: 1;
        gap: 6px;
    }

    .tbs-controls button,
    .tbs-play-main {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }

    .tbs-play-main {
        width: 44px !important;
        min-width: 44px !important;
    }

    .tbs-controls .tbs-transport-icon {
        width: 20px;
        height: 20px;
    }

    .tbs-play-main .tbs-transport-icon {
        width: 24px;
        height: 24px;
    }

    .tbs-volume-wrap {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        width: 100%;
    }

    .tbs-volume {
        width: auto;
        min-width: 54px;
        flex: 1 1 auto;
    }

    .tbs-timeline {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
    }

    .tbs-current-time,
    .tbs-duration {
        min-width: 32px;
        font-size: 11px;
    }

    .tbs-current-time {
        text-align: left;
    }

    .tbs-duration {
        text-align: right;
    }

    .tbs-progress {
        width: 100%;
        min-width: 0;
    }

    .tbs-hide-volume-phone .tbs-transport-group {
        grid-column: 1 / -1;
        justify-self: center;
    }

    .tbs-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 10px;
    }

    .tbs-single-visible-filter .tbs-filters {
        grid-template-columns: minmax(0, 1fr);
    }

    .tbs-search {
        grid-column: 1 / -1;
    }

    .tbs-filters input,
    .tbs-filters select {
        min-height: 40px;
        padding: 7px 9px;
        border-radius: 10px;
        font-size: 16px;
    }

    .tbs-beat-list {
        border-radius: 13px;
    }

    .tbs-beat-list-header {
        display: none;
    }

    .tbs-beat-row {
        min-height: 0;
        padding: 10px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 7px;
    }

    .tbs-title-cell {
        order: 1;
        flex: 1 1 100%;
        min-width: 0;
        gap: 8px;
    }

    .tbs-play-beat {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }

    .tbs-cover {
        width: 42px;
        height: 42px;
        min-width: 42px;
        border-radius: 8px;
    }

    .tbs-card-text h3 {
        font-size: 14px;
    }

    .tbs-producer {
        margin-top: 2px;
        font-size: 11px;
    }

    .tbs-time-cell,
    .tbs-bpm-cell,
    .tbs-key-cell,
    .tbs-genre-cell {
        order: 2;
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 7px;
        color: var(--tbs-text);
        background: var(--tbs-panel-2);
        border: 1px solid var(--tbs-border);
        border-radius: 999px;
        font-size: 11px;
        line-height: 1.15;
    }

    .tbs-time-cell::before,
    .tbs-bpm-cell::before,
    .tbs-key-cell::before,
    .tbs-genre-cell::before {
        color: var(--tbs-muted);
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .tbs-time-cell::before {
        content: "Time";
    }

    .tbs-bpm-cell::before {
        content: "BPM";
    }

    .tbs-key-cell::before {
        content: "Key";
    }

    .tbs-genre-cell::before {
        content: "Genre";
    }

    .tbs-card-actions {
        order: 2;
        flex: 0 0 auto;
        margin-left: auto;
        justify-content: flex-end;
    }

    .tbs-toggle-licenses {
        min-height: 32px;
        padding: 8px 11px;
        font-size: 11px;
    }

    .tbs-license-panel {
        padding: 9px 10px 11px;
    }

    .tbs-license-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .tbs-license-option {
        min-width: 0;
        min-height: 68px;
        padding: 9px 7px 6px;
        border-radius: 10px;
    }

    .tbs-license-name {
        margin-bottom: 5px;
        font-size: 11px;
        line-height: 1.15;
    }

    .tbs-license-price {
        font-size: 22px;
    }

    .tbs-license-detail {
        margin-top: 6px;
        display: -webkit-box;
        overflow: hidden;
        font-size: 10px;
        line-height: 1.25;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .tbs-hide-volume-phone .tbs-volume-wrap,
    .tbs-hide-cover-phone .tbs-cover,
    .tbs-hide-producer-phone .tbs-producer,
    .tbs-hide-search-phone .tbs-search,
    .tbs-hide-filter-producer-phone .tbs-filter-producer,
    .tbs-hide-filter-genre-phone .tbs-filter-genre,
    .tbs-hide-filter-key-phone .tbs-filter-key,
    .tbs-hide-filter-bpm-min-phone .tbs-filter-bpm-min,
    .tbs-hide-filter-bpm-max-phone .tbs-filter-bpm-max,
    .tbs-hide-filterbar-phone .tbs-filters {
        display: none !important;
    }

    .tbs-hide-time-phone .tbs-time-cell,
    .tbs-hide-bpm-phone .tbs-bpm-cell,
    .tbs-hide-key-phone .tbs-key-cell,
    .tbs-hide-genre-phone .tbs-genre-cell {
        display: none !important;
    }
}

@media (max-width: 390px) {
    .tbs-store {
        padding: 8px;
    }

    .tbs-player {
        padding: 10px;
    }

    .tbs-controls {
        grid-template-columns: max-content minmax(82px, 1fr);
        gap: 8px;
    }

    .tbs-transport-group {
        gap: 5px;
    }

    .tbs-controls button,
    .tbs-play-main {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
    }


    .tbs-controls .tbs-transport-icon {
        width: 18px;
        height: 18px;
    }

    .tbs-play-main .tbs-transport-icon {
        width: 22px;
        height: 22px;
    }

    .tbs-play-main {
        width: 40px !important;
        min-width: 40px !important;
    }

    .tbs-volume-toggle svg {
        width: 18px;
        height: 18px;
    }

    .tbs-license-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .tbs-license-option {
        padding-right: 5px;
        padding-left: 5px;
    }

    .tbs-license-name {
        font-size: 10px;
    }

    .tbs-license-price {
        font-size: 20px;
    }
}

/* A plain cart summary and one checkout action, aligned with track information. */
.tbs-store .tbs-now-playing { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
.tbs-store .tbs-track-heading { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.tbs-store .tbs-now-label { max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tbs-store .tbs-current-title { display: block; width: 100%; text-align: left; }
.tbs-store .tbs-cart-actions { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 12px; margin-left: auto; max-width: 100%; }
.tbs-store .tbs-cart-summary { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--tbs-text); font-size: 13px; line-height: 1.3; font-weight: 600; cursor: default; }
.tbs-store .tbs-cart-summary svg { flex-shrink: 0; }
.tbs-store .tbs-cart-summary > span { overflow-wrap: anywhere; }
.tbs-store .tbs-buy-now {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 38px; padding: 8px 14px; border: 1px solid var(--tbs-checkout-button-bg, var(--tbs-accent)); border-radius: 8px;
    background: var(--tbs-checkout-button-bg, var(--tbs-accent)); color: var(--tbs-checkout-text, var(--tbs-license-text));
    font-size: 13px; line-height: 1.25; font-weight: 700; text-decoration: none; text-align: center;
    max-width: 100%; overflow-wrap: anywhere;
}
.tbs-store .tbs-buy-now:hover { filter: brightness(1.08); }
.tbs-store .tbs-buy-now:focus-visible,
.tbs-store a.tbs-license-option:focus-visible { outline: 2px solid var(--tbs-accent); outline-offset: 3px; }
/* Invisible grid content reserves both labels' natural widths, including custom text. */
.tbs-store .tbs-toggle-licenses { display: inline-grid; }
.tbs-store .tbs-toggle-licenses::before { content: attr(data-original-label); visibility: hidden; }
.tbs-store .tbs-toggle-licenses::after { content: attr(data-cart-label); visibility: hidden; }
.tbs-store .tbs-toggle-licenses::before,
.tbs-store .tbs-toggle-licenses::after,
.tbs-store .tbs-toggle-licenses .tbs-button-label { grid-area: 1 / 1; }
.tbs-store .tbs-cart-status { flex: 0 0 auto; margin: -4px 0 12px; font-size: 13px; line-height: 1.45; color: var(--tbs-text); }
.tbs-store .tbs-cart-status:empty { display: none; }
.tbs-store .tbs-in-cart { font-size: 11px; font-weight: 700; }
.tbs-store a.tbs-license-option[aria-busy="true"] { opacity: 0.65; cursor: wait; }
.tbs-store a.tbs-license-option:not(.is-in-cart):hover,
.tbs-store a.tbs-license-option:not(.is-in-cart):focus-visible,
.tbs-store a.tbs-license-option:not(.is-in-cart):active { background: var(--tbs-license-option-bg); }
.tbs-store a.tbs-license-option.is-in-cart { background: var(--tbs-accent); border-color: var(--tbs-accent); color: var(--tbs-license-text); }
@media (max-width: 700px) {
    .tbs-store .tbs-now-playing { gap: 10px; }
    .tbs-store .tbs-track-heading { flex-basis: 120px; }
    .tbs-store .tbs-cart-actions { gap: 8px; }
    .tbs-store .tbs-cart-summary, .tbs-store .tbs-buy-now { font-size: 12px; }
    .tbs-store .tbs-buy-now { padding: 8px 10px; }
}

/* Optional typography overrides leave responsive defaults intact when blank. */
.tbs-store .tbs-now-label { font-size: var(--tbs-header-font-size, 11px); text-transform: none; }
.tbs-store .tbs-buy-now { text-transform: none; border-radius: var(--tbs-checkout-border-radius, 8px); }
.tbs-store .tbs-toggle-licenses { text-transform: none; border-radius: var(--tbs-cart-border-radius, 999px); }
.tbs-store[style*="--tbs-checkout-font-size:"] .tbs-buy-now { font-size: var(--tbs-checkout-font-size); }
.tbs-store[style*="--tbs-cart-font-size:"] .tbs-toggle-licenses { font-size: var(--tbs-cart-font-size); }

/* Mobile player header: compact two-row layout.
   Row 1: producer/header text + cart summary.
   Row 2: track title + checkout button.
   Desktop and tablet layouts are intentionally unchanged. */
@media (max-width: 700px) {
    .tbs-store .tbs-player {
        padding: 10px 12px 12px;
    }

    .tbs-store .tbs-now-playing {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "producer cart"
            "title checkout";
        column-gap: 12px;
        row-gap: 7px;
        align-items: center;
        margin-bottom: 12px;
    }

    .tbs-store .tbs-track-heading,
    .tbs-store .tbs-cart-actions {
        display: contents;
    }

    .tbs-store .tbs-now-label {
        grid-area: producer;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        align-self: center;
    }

    .tbs-store .tbs-current-title {
        grid-area: title;
        min-width: 0;
        width: 100%;
        margin: 0;
        font-size: 16px;
        line-height: 1.25;
        text-align: left;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tbs-store .tbs-cart-summary {
        grid-area: cart;
        justify-self: end;
        margin: 0;
        gap: 5px;
        white-space: nowrap;
        font-size: 12px;
        line-height: 1.2;
    }

    .tbs-store .tbs-cart-summary svg {
        width: 16px;
        height: 16px;
    }

    .tbs-store .tbs-cart-count::after {
        content: " ·";
    }

    .tbs-store .tbs-buy-now {
        grid-area: checkout;
        justify-self: end;
        min-height: 34px;
        padding: 7px 11px;
        margin: 0;
        font-size: 12px;
        line-height: 1.15;
        white-space: nowrap;
    }
}
