.curated-packs { scroll-margin-top: 82px; }
.curated-packs .section-heading { margin-bottom: 14px; }
.curated-packs .section-heading p { margin-top: 5px; }
.curated-pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.curated-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: clamp(12px, 2vw, 20px);
    border: 1px solid #dce2f2;
    border-radius: 14px;
    background: #fff;
}
.curated-card.curated-recommended { border-color: #c2b8e4; }
.curated-card .curated-name { margin: 0; color: #1d2541; font-size: 16px; line-height: 1.35; }
.curated-badge { margin-left: 5px; padding: 2px 5px; border-radius: 5px; background: #eee9fb; color: #50399e; font-size: 11px; white-space: nowrap; }
.curated-total { margin: 8px 0 0; font-size: clamp(27px, 2.8vw, 36px); line-height: 1.18; color: #50389f; font-weight: 800; font-variant-numeric: tabular-nums; }
.curated-unit-price { margin: 4px 0 12px; color: #596680; font-size: 13px; }
.curated-unit-price strong { color: #45387c; font-variant-numeric: tabular-nums; }
.curated-actions { display: grid; gap: 7px; margin-top: auto; }
.curated-actions .curated-buy,
.curated-actions .button-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    min-width: 0;
    padding: 6px 5px;
    border-radius: 9px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}
.curated-actions .curated-buy { background: #5441b2; color: #fff; font-size: 14px; font-weight: 750; }
.curated-actions .curated-buy:not([aria-disabled="true"]):hover { background: #463397; }
.curated-actions .button-secondary { font-size: 13px; font-weight: 650; }
.curated-secondary-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.curated-actions .button-secondary[aria-disabled="true"] { background: #f7f8fc; color: #626d84; border-color: #e0e4ef; cursor: default; }
.curated-actions .button-secondary[aria-disabled="true"]:hover { background: #f7f8fc; }
.curated-panel { margin-top: 15px; padding: clamp(13px, 2vw, 20px); border: 1px solid #dce2f2; border-radius: 14px; background: #fff; scroll-margin-top: 85px; }
.curated-panel h3 { margin: 0; }
.curated-panel .curated-status { margin: 6px 0 12px; color: #596680; font-size: 14px; }
.curated-tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.curated-tracks .listen-track { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "identity play"; box-shadow: none; }
.curated-tracks .listen-track-play:disabled { opacity: .4; cursor: default; }
.curated-track-name, .curated-tracks .curated-track-type {
    white-space: normal;
    overflow-wrap: anywhere;
}
.curated-tracks .curated-track-type { color: #51408d; font-size: 12px; }
.curated-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
}
.curated-pagination .button-secondary { min-height: 44px; padding: 6px 9px; white-space: nowrap; }
.curated-pagination .button-secondary:disabled { opacity: .5; cursor: default; }
.curated-page-number { color: #596680; font-size: 13px; white-space: nowrap; }
.curated-packs [hidden] { display: none !important; }
.curated-downloads { display: flex; flex-wrap: wrap; gap: 0 20px; margin-top: 14px; border-top: 1px solid #dce2f2; }
.curated-downloads a { display: inline-flex; align-items: center; min-height: 44px; color: #4b3c9e; font-size: 14px; font-weight: 650; }
@media (max-width: 850px) {
    .curated-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
}
@media (max-width: 580px) {
    .curated-tracks { grid-template-columns: minmax(0, 1fr); }
}

.listening-tab-layout:has(.listening-notices:not([hidden])) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}
.listening-tab-layout .listening-tabs { max-width: none; }
.listening-notices {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    min-height: 54px;
    padding: 5px 8px 5px 11px;
    border: 1px solid #e8e4f5;
    border-radius: 13px;
    background: #f9f7fe;
}
.listening-notices [hidden], .listening-notices[hidden] { display: none; }
.listening-notice-label { flex: none; color: #523da1; font-size: 12px; font-weight: 750; }
.listening-notice-text { display: grid; align-items: center; min-width: 0; flex: 1; color: #393353; font-size: 13px; line-height: 1.4; }
.listening-notice-text span { grid-area: 1 / 1; visibility: hidden; overflow-wrap: anywhere; }
.listening-notice-text .is-current { visibility: visible; animation: listening-notice-in .23s ease-out; }
.listening-notice-controls { flex: none; display: flex; gap: 2px; }
.listening-notice-controls button {
    width: 33px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #523da1;
    font: 700 17px/1 system-ui, sans-serif;
    cursor: pointer;
}
.listening-notice-controls button:hover { background: #eee9fa; }
.listening-notice-controls button:focus-visible { outline: 2px solid #523da1; outline-offset: 0; }
@keyframes listening-notice-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 760px) {
    .listening-tab-layout:has(.listening-notices:not([hidden])) {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
    .listening-notices { min-height: 40px; padding: 3px 4px 3px 8px; gap: 6px; }
    .listening-notice-text { font-size: 12px; }
    .listening-notice-controls button { width: 31px; min-height: 39px; }
    .listening-browser:has(.listening-notices:not([hidden])) .curated-panel,
    .listening-browser:has(.listening-notices:not([hidden])) #more-downloads { scroll-margin-top: 135px; }
}
@media (prefers-reduced-motion: reduce) {
    .listening-notice-text .is-current { animation: none; }
}

@media (max-width: 420px) {
    .curated-card .curated-name { font-size: 13px; white-space: nowrap; }
    .curated-badge { margin-left: 3px; padding-inline: 3px; font-size: 10px; }
    .curated-secondary-actions { gap: 5px; }
    .curated-secondary-actions .button-secondary { padding-inline: 1px; font-size: 11px; }
}

/* listening-flow-243: pack and ranking panels share the listening workspace. */
.suite-page .listening-browser #top20 {
    color: #172341;
    background: transparent !important;
}
/* listening-top-245: remove the shared theme's white panel wrapper. */
.suite-page .listening-browser #top20 .top-panel {
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}
.suite-page .listening-browser #top20 .top-heading {
    align-items: flex-start;
    gap: 12px 20px;
    margin-bottom: 18px;
}
.suite-page .listening-browser #top20 .top-heading h2 {
    color: #172341;
}
.suite-page .listening-browser #top20 .top-heading p {
    color: #55637f;
    line-height: 1.65;
}
@media (min-width: 1100px) {
    .listening-browser #top20 .top-list {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }
}
.curated-packs #more-downloads {
    display: block;
}
.curated-actions [data-open-curated][aria-expanded="true"] {
    color: #49349c;
    background: #ede8fb;
    border-color: #c8bce8;
}
@media (max-width: 420px) {
    .curated-packs .curated-name {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* listening-flow-244: separate ranking information from playback and selection. */
.listening-browser #top20 .listen-track-ranked {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "identity play" "stats select";
    gap: 5px 10px;
    padding: 9px 12px;
}
#top20 .listen-track-ranked .listen-track-info {
    display: block;
}
#top20 .listen-rank-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
}
#top20 .listen-rank-heading strong {
    min-width: 0;
}
#top20 .listen-rank-badge {
    padding: 1px 6px;
    border-radius: 5px;
    color: #49379e;
    background: #eee9fa;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}
#top20 .listen-rank-stats {
    grid-area: stats;
    display: flex;
    flex-wrap: wrap;
    gap: 3px 10px;
    align-items: center;
    padding-top: 4px;
    color: #55637f;
    font-size: .75rem;
    line-height: 1.4;
}
#top20 .listen-rank-stats > span {
    white-space: nowrap;
}
#top20 .listen-rank-total {
    color: #253657;
}
#top20 .listen-track-ranked .listen-track-select {
    justify-self: end;
    margin: 0;
    min-height: 38px;
}
@media (max-width: 420px) {
    .listening-browser #top20 .listen-track-ranked {
        padding-inline: 10px;
        column-gap: 6px;
    }
    #top20 .listen-rank-stats {
        column-gap: 7px;
    }
}

[data-pack-download][hidden],[data-pack-buy][hidden],[data-pack-price][hidden],[data-pack-unit-price][hidden],[data-pack-checkout-note][hidden],[data-curated-download][hidden]{display:none!important}
.curated-actions .curated-buy[aria-disabled="true"]{cursor:not-allowed}

.listen-track-info {
    min-width: 0;
}
.listen-track-code {
    color: var(--listen-muted, #53617b);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .78rem;
    font-weight: 650;
    letter-spacing: .005em;
    overflow-wrap: anywhere;
}
.curated-tracks .listen-track {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "identity choose play";
}
.curated-track-select {
    grid-area: choose;
    white-space: nowrap;
}
.listen-selection-identity {
    display: grid;
    gap: 2px;
}
.listen-selection-identity small {
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: .74rem;
    font-weight: 500;
}
@media (max-width: 460px) {
    .curated-track-select {
        font-size: .73rem;
    }
}
