/* AMM 387: Creative Constellation. Decorative motion; live matches only via existing Sonic Match API. */
.amm387-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:-2px 0 19px;padding:5px;border-radius:15px;border:1px solid #8ac9ef35;background:#05142790;width:fit-content;max-width:100%}
.amm387-tabs button{appearance:none;min-height:42px;min-width:0;max-width:100%;border:1px solid transparent;border-radius:10px;padding:9px 16px;background:transparent;color:#afd1e6;font-weight:800;font-size:13px;cursor:pointer;transition:background-color .2s,color .2s}
.amm387-tabs button[aria-selected="true"]{color:#081a2c;background:linear-gradient(115deg,#92e7ff,#b6a7ff);box-shadow:0 6px 18px #0309168f}
.amm387-tabs button:focus-visible,.amm387-cosmos button:focus-visible{outline:3px solid #fff;outline-offset:3px}
.amm386-dial [hidden],.amm387-cosmos [hidden]{display:none!important}
.amm387-cosmos{min-width:0;--amm387-accent:#8cdcff;--amm387-accent2:#ad9eff;--amm387-rhythm:4.6s;display:grid;grid-template-columns:minmax(0,1.26fr) minmax(245px,.74fr);gap:22px;align-items:stretch}
.amm387-space{position:relative;min-width:0;min-height:398px;overflow:hidden;border-radius:21px;border:1px solid #80beed49;background:radial-gradient(ellipse at 50% 49%,#5479d52e,transparent 48%),radial-gradient(ellipse at 88% 18%,#446ba02d,transparent 47%),#061429;isolation:isolate}
.amm387-space::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.5;background-image:linear-gradient(#97d4fc14 1px,transparent 1px),linear-gradient(90deg,#97d4fc14 1px,transparent 1px);background-size:32px 32px;mask-image:radial-gradient(circle at center,#000 45%,transparent 90%)}
.amm387-space::after{content:"";position:absolute;inset:4%;pointer-events:none;border:1px solid #8bc6ff25;border-radius:50%;transform:scaleX(.81);}
.amm387-path{position:absolute;inset:0;height:100%;width:100%;pointer-events:none;overflow:visible;opacity:.88}
.amm387-path line{stroke:#78b5f27c;stroke-width:1.15;stroke-dasharray:2 8;stroke-linecap:round;vector-effect:non-scaling-stroke}
.amm387-path line.amm387-on{stroke:var(--amm387-accent);stroke-width:2.2;stroke-dasharray:4 6;filter:drop-shadow(0 0 3px var(--amm387-accent));animation:amm387-stream var(--amm387-rhythm) linear infinite}
.amm387-orbit{position:absolute;left:50%;top:50%;width:41%;aspect-ratio:1;border-radius:50%;border:1px solid #9ecfff3c;transform:translate(-50%,-50%);pointer-events:none}
.amm387-orbit::after{content:"";position:absolute;inset:-13%;border:1px dashed #83bde53a;border-radius:50%;animation:amm387-orbit 36s linear infinite}
.amm387-heart{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:135px;aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:5px;border:1px solid #a3dfff9c;box-shadow:0 0 0 13px #779bfe11,0 0 60px #7ea6fe45,inset 0 0 25px #8ed0fe35;background:radial-gradient(circle at 35% 20%,#264e78,#10223d 70%);pointer-events:none;z-index:1}
.amm387-heart strong{font-size:37px;font-weight:450;letter-spacing:.12em;color:#e2f8ff;line-height:1.15}
.amm387-heart span{font-size:9px;letter-spacing:.16em;color:#a7c9e7;font-weight:850}
.amm387-node{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);width:min(106px,23%);min-height:52px;padding:7px 6px;border:1px solid #85bcdd69;border-radius:13px;color:#cce8ff;background:#0f2441ee;box-shadow:0 4px 22px #0107139e;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;z-index:2;cursor:pointer;isolation:isolate;transition:border-color .2s,background-color .2s,box-shadow .2s}
.amm387-node span{display:block;color:inherit;font-size:11px;line-height:1.15;font-weight:850;letter-spacing:.01em;text-align:center;overflow-wrap:anywhere}
.amm387-node small{font-size:8px;letter-spacing:.12em;color:#8bbed7;font-weight:800}
.amm387-node:hover{border-color:#aaf3ff;background:#153b58}
.amm387-node[aria-pressed="true"]{border-color:#b8f3ff;color:white;background:linear-gradient(148deg,#236a88,#223565);box-shadow:0 0 0 2px #6de6ff31,0 0 27px #7bcfff4a}
.amm387-node[aria-pressed="true"] small{color:#d4eaff}
.amm387-node[aria-pressed="true"]::after{content:"";position:absolute;inset:-5px;border:1px solid #b9e7ff81;border-radius:16px;pointer-events:none;animation:amm387-glow var(--amm387-rhythm) ease-in-out infinite}
.amm387-overlay-top,.amm387-overlay-foot{position:absolute;z-index:1;left:14px;right:14px;display:flex;justify-content:space-between;gap:8px;font-size:9px;letter-spacing:.14em;color:#8ebfe0;font-weight:800;pointer-events:none}
.amm387-overlay-top{top:12px}.amm387-overlay-foot{bottom:12px}
.amm387-controls{min-width:0;display:flex;flex-direction:column;justify-content:center;gap:14px}
.amm387-micro{margin:0;color:#89dfff;font-size:10px;font-weight:900;letter-spacing:.15em}
.amm387-controls h3{font-size:clamp(24px,3vw,36px);letter-spacing:-.05em;line-height:1.12;margin:0;color:#f0faff}
.amm387-copy{font-size:13px;line-height:1.6;color:#acc5d9;margin:0}
.amm387-choice-label{font-size:10px;letter-spacing:.14em;color:#9fcee4;font-weight:850;display:block;margin-bottom:7px}
.amm387-moods{display:flex;gap:7px;flex-wrap:wrap}
.amm387-moods button{min-height:38px;padding:7px 11px;border:1px solid #9fc1f65d;border-radius:999px;background:#142c49;color:#e2f3ff;font-weight:800;font-size:11px;cursor:pointer;transition:background-color .2s,transform .2s}
.amm387-moods button[aria-pressed="true"]{background:linear-gradient(110deg,#9ae6ff,#a7b8ff);color:#0b1a31;border-color:#b0e9ff}
.amm387-moods button:hover{transform:translateY(-1px)}
.amm387-selected{padding:13px;border:1px solid #85c1e755;border-radius:12px;background:#06182a9e;display:flex;flex-direction:column;gap:4px}
.amm387-selected small{color:#9abbd1;letter-spacing:.13em;font-size:9px;font-weight:850}
.amm387-selected strong{color:#f2fbff;font-size:15px;line-height:1.35}
.amm387-selected span{color:#9db8cf;font-size:12px;line-height:1.4}
.amm387-search{min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 15px;width:100%;border:0;border-radius:12px;background:linear-gradient(112deg,#88e2ff,#a9b5ff);color:#061a30;font-size:13px;font-weight:900;cursor:pointer;text-align:left;box-shadow:0 7px 20px #0004}
.amm387-search:hover{filter:brightness(1.07)}
.amm387-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.amm387-motion{background:transparent;border:1px solid #91c6e85c;color:#bbdff5;border-radius:100px;min-height:34px;padding:7px 12px;font-size:11px;font-weight:750;cursor:pointer}
.amm387-legal{color:#9fbbd0;font-size:10px;line-height:1.5;margin:0;max-width:48ch}
.amm387-status{margin:0;min-height:16px;font-size:11px;color:#a5daef;line-height:1.3}
.amm387-cosmos[data-genre="House"]{--amm387-accent:#92e6fe;--amm387-accent2:#a4aaff}
.amm387-cosmos[data-genre="Garage"]{--amm387-accent:#a6e6d3;--amm387-accent2:#84bbff}
.amm387-cosmos[data-genre="Hip Hop"],.amm387-cosmos[data-genre="Grime"]{--amm387-accent:#e4a8f6;--amm387-accent2:#ac9aff}
.amm387-cosmos[data-genre="R&B"],.amm387-cosmos[data-genre="Latin"]{--amm387-accent:#ffb2d9;--amm387-accent2:#a2b4ff}
.amm387-cosmos[data-genre="Afro"],.amm387-cosmos[data-genre="Electronic"]{--amm387-accent:#9bf0dd;--amm387-accent2:#91beff}
.amm387-cosmos[data-mood="tense"]{--amm387-rhythm:2.1s}.amm387-cosmos[data-mood="dreamy"]{--amm387-rhythm:6.5s}.amm387-cosmos[data-mood="uplifting"]{--amm387-rhythm:3s}
@keyframes amm387-stream{to{stroke-dashoffset:-180}}
@keyframes amm387-glow{50%{opacity:.23;transform:scale(1.09)}}
@keyframes amm387-orbit{to{transform:rotate(360deg)}}
/* Zero movement when offscreen/hidden/paused. Applies to every generated orbital element. */
.amm387-cosmos:not(.amm387-visible) .amm387-space *,.amm387-cosmos.amm387-paused .amm387-space *,html.amm386-motion-paused .amm387-cosmos .amm387-space *,
.amm387-cosmos:not(.amm387-visible) .amm387-space *::after,.amm387-cosmos.amm387-paused .amm387-space *::after,html.amm386-motion-paused .amm387-cosmos .amm387-space *::after{animation-play-state:paused!important}
@media(max-width:880px){.amm387-cosmos{grid-template-columns:minmax(0,1fr)}.amm387-space{min-height:380px}.amm387-controls h3{font-size:29px}.amm387-controls{gap:12px}}
@media(max-width:520px){.amm387-tabs{width:100%}.amm387-tabs button{flex:1 1 42%;padding:10px 6px;font-size:12px}.amm387-space{min-height:360px}.amm387-heart{width:112px}.amm387-heart strong{font-size:31px}.amm387-node{width:min(82px,26%);min-height:50px;padding:5px 3px;border-radius:10px}.amm387-node span{font-size:10px}.amm387-node small{font-size:7px}.amm387-overlay-top,.amm387-overlay-foot{font-size:7px;letter-spacing:.08em;left:8px;right:8px}.amm387-controls h3{font-size:28px}}
@media(max-width:340px){.amm387-node{width:72px}.amm387-space{min-height:352px}.amm387-heart{width:100px}.amm387-heart strong{font-size:28px}.amm387-moods button{padding:7px 9px}}
@media(prefers-reduced-motion:reduce){.amm387-cosmos *,.amm387-cosmos *::before,.amm387-cosmos *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
/* Also correct a pre-existing 320px Sonic Match shortlist grid overflow. */
@media(max-width:740px){
 .shortlist-panel{grid-template-columns:minmax(0,1fr)!important}
 .shortlist-controls{min-width:0;max-width:100%;grid-column:1/-1!important}
 .shortlist-controls .btn{min-width:0;max-width:100%;width:100%}
 .amm387-overlay-foot{display:none}
 .amm386-dial{scroll-margin-top:86px}
}
