/* Editorial palette map. Cards and their category filters use the same tokens.
   Keep this scoped to the homepage; the existing masonry owns all column sizes. */
.mp-home :is(.mp-reference-card,.scene-path,.ecosystem-interest-pill) {
 --card-paper:#f3ede2;--card-tint:#e9dfcd;--card-ink:#382e27;
 --card-muted:#685a4a;--card-line:#d8cbb6;--card-accent:#74532b;
}
.mp-home :is([data-content-type="track"],.scene-path--track) {
 --card-paper:#f7efdc;--card-tint:#eee1bd;--card-ink:#3d3029;
 --card-muted:#6d5946;--card-line:#ded0ac;--card-accent:#79572d;
}
.mp-home :is([data-content-type="video"],.scene-path--video) {
 --card-paper:#e5efec;--card-tint:#d0e1dc;--card-ink:#203b3a;
 --card-muted:#48645f;--card-line:#b7d0c7;--card-accent:#286763;
}
.mp-home :is([data-content-type="beat"],.scene-path--beat) {
 --card-paper:#f3e4c9;--card-tint:#e9c98f;--card-ink:#412e24;
 --card-muted:#71523b;--card-line:#d7b982;--card-accent:#864328;
}
.mp-home :is([data-content-type="post"],.scene-path--post) {
 --card-paper:#edf1df;--card-tint:#e0e7c8;--card-ink:#303c2c;
 --card-muted:#56614b;--card-line:#c6cfb1;--card-accent:#536738;
}
.mp-home :is([data-content-type="world"],.scene-path--world) {
 --card-paper:#e4ebe7;--card-tint:#cbdcd2;--card-ink:#263e36;
 --card-muted:#4c6256;--card-line:#b7cbbd;--card-accent:#35684e;
}
.mp-home :is([data-content-type="course"],.scene-path--course) {
 --card-paper:#eee5de;--card-tint:#e4cdbf;--card-ink:#492f29;
 --card-muted:#765347;--card-line:#d3b7a6;--card-accent:#8b4635;
}
.mp-home :is([data-content-type="competition"],.scene-path--competition) {
 --card-paper:#eee3e5;--card-tint:#e1cbd0;--card-ink:#4c2933;
 --card-muted:#75505a;--card-line:#cdb2ba;--card-accent:#813d52;
}
.mp-home :is([data-content-type="concert"],.scene-path--concert) {
 --card-paper:#e6eaed;--card-tint:#d1dbe1;--card-ink:#2b3c46;
 --card-muted:#50616e;--card-line:#b8c9d3;--card-accent:#42637a;
}
/* Dark themes retain the same color families with readable warm ink. */
.mp-home.theme-dark :is(.mp-reference-card,.scene-path,.ecosystem-interest-pill) {
 --card-paper:#332d27;--card-tint:#453b2e;--card-ink:#f5eddc;
 --card-muted:#d0c0a8;--card-line:#64543e;--card-accent:#e5bb73;
}
.mp-home.theme-dark :is([data-content-type="track"],.scene-path--track) {--card-paper:#322d25;--card-tint:#443b2c;--card-line:#625339}
.mp-home.theme-dark :is([data-content-type="video"],.scene-path--video) {--card-paper:#203735;--card-tint:#2b4945;--card-ink:#e2f1e9;--card-muted:#b1d0c4;--card-line:#46685f;--card-accent:#9bcec0}
.mp-home.theme-dark :is([data-content-type="beat"],.scene-path--beat) {--card-paper:#3b2c23;--card-tint:#543a27;--card-ink:#fff0d3;--card-muted:#dec19a;--card-line:#795634;--card-accent:#e9b76c}
.mp-home.theme-dark :is([data-content-type="post"],.scene-path--post) {--card-paper:#30392a;--card-tint:#404b33;--card-ink:#edf2de;--card-muted:#c5cfb0;--card-line:#65714d;--card-accent:#c4d599}
.mp-home.theme-dark :is([data-content-type="world"],.scene-path--world) {--card-paper:#293b30;--card-tint:#354f3f;--card-ink:#e7f0e2;--card-muted:#c2d3b9;--card-line:#536c58;--card-accent:#bdd9a8}
.mp-home.theme-dark :is([data-content-type="course"],.scene-path--course) {--card-paper:#422f2a;--card-tint:#593d34;--card-ink:#f9e9dd;--card-muted:#debaaa;--card-line:#825a49;--card-accent:#edb698}
.mp-home.theme-dark :is([data-content-type="competition"],.scene-path--competition) {--card-paper:#3e2932;--card-tint:#543641;--card-ink:#f5e5eb;--card-muted:#d6b5c0;--card-line:#795361;--card-accent:#e6aaba}
.mp-home.theme-dark :is([data-content-type="concert"],.scene-path--concert) {--card-paper:#2b373d;--card-tint:#394a52;--card-ink:#e8eff0;--card-muted:#becdd2;--card-line:#576e78;--card-accent:#aacbd8}
.mp-home #feedGrid .mp-reference-card {
 --mp-surface:var(--card-paper);--mp-text:var(--card-ink);--mp-muted:var(--card-muted);--mp-line:var(--card-line);
 --scene-surface:var(--card-paper);--scene-ink:var(--card-ink);--scene-muted:var(--card-muted);--scene-line:var(--card-tint);--scene-accent:var(--card-accent);
 --record-paper:var(--card-paper);--record-line:var(--card-line);
 color:var(--card-ink);background:var(--card-paper)!important;
}
.mp-home #feedGrid .mp-reference-card :is(.mp-card-title,.mp-card-title a,.mp-card-title button,.mp-card-creator-copy strong) {color:var(--card-ink)}
.mp-home #feedGrid .mp-reference-card :is(.mp-card-description,.mp-card-creator-copy small,.ecosystem-home-meta span,.mp-view-count) {color:var(--card-muted)!important}
.mp-home #feedGrid .mp-reference-card .mp-card-follow {color:var(--card-accent);background:var(--card-tint);border-color:var(--card-line)}
.mp-home #feedGrid .mp-reference-card .mp-card-follow.following {color:var(--card-paper);background:var(--card-accent);border-color:var(--card-accent)}
.mp-home #feedGrid .mp-reference-card :is(.mp-card-tags span,.mp-card-avatar) {background:var(--card-tint);color:var(--card-ink)}
.mp-home #feedGrid .mp-reference-card .mp-content-action:hover {background:var(--card-tint)}
.mp-home #feedGrid .mp-reference-card :is(a,button):focus-visible {outline-color:var(--card-accent)}
/* The category artwork and existing active/filter behavior stay intact. */
.mp-home .scene-paths .scene-path {background:var(--card-paper);color:var(--card-ink);border-color:var(--card-line)}
.mp-home .scene-paths .scene-path-art {background:var(--card-tint)}
.mp-home .scene-paths .scene-path:is(:hover,.active,[aria-pressed="true"]) {border-color:var(--card-accent);box-shadow:0 0 0 1px var(--card-accent)}
.mp-home .scene-paths .scene-path:focus-visible {outline-color:var(--card-accent)}
.mp-home .ecosystem-filter-sticky {background:transparent}
.mp-home .ecosystem-interest-row .ecosystem-interest-pill {background:var(--card-paper);color:var(--card-muted);box-shadow:inset 0 0 0 1px var(--card-line)}
.mp-home .ecosystem-interest-row .ecosystem-interest-pill:is(.active,[aria-pressed="true"]) {background:var(--card-accent);color:var(--card-paper);box-shadow:none}
.mp-home .ecosystem-interest-row .ecosystem-interest-pill:focus-visible {outline-color:var(--card-accent)}
.mp-home .ecosystem-interest-row .ecosystem-interest-pill:hover {box-shadow:inset 0 0 0 2px var(--card-accent)}
/* Beats: a small physical record, separate from full-size track artwork. */
.mp-home #feedGrid .mp-beat-card .ecosystem-home-media.mp-beat-stage {display:grid;place-items:center;box-sizing:border-box;width:100%;max-width:100%;aspect-ratio:16/10;min-height:130px;padding:24px 12px;background:var(--card-tint)}
.mp-home #feedGrid .mp-beat-stage>.mp-beat-cover {position:absolute;inset:0;display:block;width:100%;height:100%;background:var(--card-tint)}
.mp-home #feedGrid .mp-beat-stage>.mp-beat-cover>img {width:100%;height:100%!important;object-fit:cover;transition:none}
.mp-home #feedGrid .mp-beat-stage>.mp-beat-cover>.mp-media-fallback {display:none!important}
.mp-home #feedGrid .mp-beat-stage>.mp-beat-cover:focus-visible {outline-offset:-4px}
.mp-beat-record {position:relative;isolation:isolate;display:grid;place-items:center;width:clamp(82px,42%,112px);aspect-ratio:1;border-radius:50%}
.mp-beat-record::before {content:"";position:absolute;inset:0;border-radius:50%;background:repeating-radial-gradient(circle,#292621 0 2px,#3d3932 3px,#211f1c 4px);box-shadow:0 3px 5px #0003,inset 0 0 0 1px #ffffff30;transform:translateY(0) scale(1);pointer-events:none}
.mp-beat-record .mp-beat-label {position:absolute;inset:18%;display:grid;place-items:center;border-radius:50%;overflow:hidden;background:var(--card-accent);color:var(--card-paper);box-shadow:0 0 0 2px #ffffff25;font-family:Elsie,Georgia,serif}
.mp-beat-label .mp-beat-artwork {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%}
.mp-beat-label .mp-beat-artwork[hidden] {display:none!important}
.mp-beat-label>.mp-media-fallback {display:none!important}
.mp-home #feedGrid .mp-beat-record>.mp-beat-play {inset:50% auto auto 50%;transform:translate(-50%,-50%);width:44px!important;height:44px!important;min-width:44px;min-height:44px;opacity:1;border:1px solid #ffffff75;background:#292621!important;outline:none;box-shadow:0 0 0 4px #ffffff45}
.mp-home #feedGrid .mp-beat-record>.mp-beat-play img {width:18px!important;height:18px!important}
.mp-home #feedGrid .mp-beat-record>.mp-beat-play:focus-visible {outline:3px solid var(--card-accent);outline-offset:6px}
.mp-home #feedGrid .mp-beat-stage .ecosystem-card-type-label {z-index:2;background:var(--card-paper)!important;color:var(--card-ink)!important;font-size:9px!important;letter-spacing:.12em;padding:4px 6px!important;border:0;top:10px;left:12px}
.mp-home #feedGrid .mp-beat-stage .scene-duration {bottom:5px;left:auto;right:10px;background:var(--card-paper);color:var(--card-muted);padding:2px 4px}
.mp-vinyl-stage>.mp-track-type-label {position:absolute;z-index:2;top:8px;left:8px;pointer-events:none}
.mp-home #feedGrid .scene-directory-actions {display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:8px}
.mp-home #feedGrid .scene-directory-actions .mp-content-actions {flex:0 0 auto;width:auto}
.mp-home #feedGrid .scene-directory-count {font-size:11px;line-height:1.5;color:var(--card-muted)}
.mp-beat-card[data-beat-state="playing"]:not([data-vinyl-visible="false"]) .mp-beat-record::before,
.mp-beat-card[data-beat-state="playing"]:not([data-vinyl-visible="false"]) .mp-beat-label {animation:mp-beat-pulse .8s ease-in-out infinite}
@keyframes mp-beat-pulse {0%,100%{transform:translateY(0) scale(1)}35%{transform:translateY(-.7px) scale(1.018)}65%{transform:translateY(.4px) scale(.996)}}
/* Reuse the track card's metadata rhythm and action arrangement. */
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-card-title {order:0}
.mp-home #feedGrid .mp-beat-card .mp-card-body {padding-top:8px!important}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-card-follow {min-height:36px;justify-self:end}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .scene-actions {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;padding:8px 12px 12px;border-top:1px solid var(--card-line);margin-top:10px}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-content-actions {grid-column:1/-1;display:flex;justify-content:space-between;width:100%;gap:2px}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-content-action {min-height:40px;min-width:32px;gap:4px;padding:4px}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-content-action[data-content-action="like"] b {display:inline}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-view-count {order:0;font-size:10px;padding:0;line-height:1.5}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .scene-collab {order:0;min-height:36px;background:none;padding:5px 0 5px 8px}
.mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .scene-collab span {font-size:10px}
/* Paper details belong to the unopened tile, not its existing post reader. */
.mp-home #feedGrid .mp-paper-card {position:relative;isolation:isolate}
.mp-home #feedGrid .mp-paper-card::before {content:"";position:absolute;z-index:3;right:0;top:0;width:28px;height:28px;background:linear-gradient(45deg,var(--card-line) 0 49%,var(--card-paper) 50%);border-radius:0 0 0 5px;box-shadow:-2px 2px 3px #0002;pointer-events:none}
.mp-home #feedGrid .mp-paper-card::after {content:"";position:absolute;z-index:3;bottom:13px;right:8px;width:9px;height:25px;box-sizing:border-box;border:2px solid var(--card-muted);border-radius:7px;box-shadow:inset -2px 0 0 var(--card-paper),inset -3px 0 0 var(--card-muted);transform:rotate(18deg);opacity:.75;pointer-events:none}
.mp-home #feedGrid .mp-paper-card .post-card-open {background:var(--card-tint)!important;color:var(--card-ink)}
.mp-home #feedGrid .mp-paper-card .post-card-placeholder {color:var(--card-ink);padding-top:44px;padding-right:32px;background:repeating-linear-gradient(transparent 0 31px,var(--card-line) 32px,transparent 33px);line-height:1.5}
.mp-home #feedGrid .mp-paper-card .ecosystem-card-type-label {background:var(--card-paper)!important;color:var(--card-accent)!important}
.mp-home #feedGrid .mp-paper-card .scene-actions {padding-right:28px}
@media(max-width:600px) {
 .mp-home #feedGrid .mp-beat-card .ecosystem-home-media.mp-beat-stage {min-height:120px;padding:26px 10px 12px}
 .mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-card-follow {grid-column:1/-1;min-height:36px}
 .mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .scene-actions {padding:6px 8px 9px;gap:2px}
 .mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .scene-collab {min-width:36px;padding:4px}
 .mp-home #feedGrid :is(.mp-beat-card,.mp-paper-card) .mp-content-action {min-width:28px}
 .mp-home #feedGrid .mp-paper-card .scene-actions {padding-bottom:24px}
 .mp-home #feedGrid .mp-paper-card::before {width:23px;height:23px}
 .mp-home #feedGrid .mp-paper-card::after {bottom:5px;right:10px;width:20px;height:8px;transform:rotate(-12deg)}
}
@media(prefers-reduced-motion:reduce) {.mp-beat-card .mp-beat-record::before,.mp-beat-card .mp-beat-label {animation:none!important;transform:none}}

/* Search results sit inside the themed app body, while the homepage itself puts both classes on body. */
.theme-dark .mp-home :is(.mp-reference-card,.scene-path,.ecosystem-interest-pill) {--card-paper:#332d27;--card-tint:#453b2e;--card-ink:#f5eddc;--card-muted:#d0c0a8;--card-line:#64543e;--card-accent:#e5bb73}
.theme-dark .mp-home :is([data-content-type="track"],.scene-path--track) {--card-paper:#322d25;--card-tint:#443b2c;--card-ink:#f5eddc;--card-muted:#d0c0a8;--card-line:#625339;--card-accent:#e5bb73}
.theme-dark .mp-home :is([data-content-type="video"],.scene-path--video) {--card-paper:#203735;--card-tint:#2b4945;--card-ink:#e2f1e9;--card-muted:#b1d0c4;--card-line:#46685f;--card-accent:#9bcec0}
.theme-dark .mp-home :is([data-content-type="beat"],.scene-path--beat) {--card-paper:#3b2c23;--card-tint:#543a27;--card-ink:#fff0d3;--card-muted:#dec19a;--card-line:#795634;--card-accent:#e9b76c}
.theme-dark .mp-home :is([data-content-type="post"],.scene-path--post) {--card-paper:#30392a;--card-tint:#404b33;--card-ink:#edf2de;--card-muted:#c5cfb0;--card-line:#65714d;--card-accent:#c4d599}
.theme-dark .mp-home :is([data-content-type="world"],.scene-path--world) {--card-paper:#293b30;--card-tint:#354f3f;--card-ink:#e7f0e2;--card-muted:#c2d3b9;--card-line:#536c58;--card-accent:#bdd9a8}
.theme-dark .mp-home :is([data-content-type="course"],.scene-path--course) {--card-paper:#422f2a;--card-tint:#593d34;--card-ink:#f9e9dd;--card-muted:#debaaa;--card-line:#825a49;--card-accent:#edb698}
.theme-dark .mp-home :is([data-content-type="competition"],.scene-path--competition) {--card-paper:#3e2932;--card-tint:#543641;--card-ink:#f5e5eb;--card-muted:#d6b5c0;--card-line:#795361;--card-accent:#e6aaba}
.theme-dark .mp-home :is([data-content-type="concert"],.scene-path--concert) {--card-paper:#2b373d;--card-tint:#394a52;--card-ink:#e8eff0;--card-muted:#becdd2;--card-line:#576e78;--card-accent:#aacbd8}
