/* JiCHO Music UI around the cassette: the Add Music picker (public/music-picker.js), the composer's
   song chip (public/wall.js), the Cockpit Music tab (public/music-clip.js) and the Music page's
   featured artists, now-playing badge and Studio licence form (public/music.js). */

/* ---- Add Music picker ---- */
dialog.jmp{border:0;padding:0;margin:auto auto 0;width:min(100%,480px);max-width:100vw;max-height:min(92dvh,760px);background:transparent;overflow:visible}
dialog.jmp::backdrop{background:#0b0620b3}
@media(min-width:700px){dialog.jmp{margin:auto}}
.jmp-box{display:flex;flex-direction:column;max-height:min(92dvh,760px);background:#fff;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom,0px);box-shadow:0 -12px 40px #0006;overflow:hidden;color:#1e1530}
@media(min-width:700px){.jmp-box{border-radius:22px}}
.jmp-head{flex:none;display:grid;grid-template-columns:44px 1fr 44px;align-items:center;padding:10px 8px;background:linear-gradient(135deg,#2a0f5c,#5b1f9e 55%,#c2185b);color:#fff}
.jmp-head h3{margin:0;text-align:center;font-size:17px;font-weight:900}
.jmp-back,.jmp-x{width:40px;height:40px;border:0;border-radius:50%;background:#ffffff22;color:#fff;font-size:22px;line-height:1;cursor:pointer}
.jmp-back[hidden]{visibility:hidden;display:block}
.jmp-list-view{display:flex;flex-direction:column;min-height:0;flex:1}
.jmp-search{padding:10px 12px 6px}
.jmp-search input{width:100%;box-sizing:border-box;height:42px;padding:0 14px;border-radius:999px;border:1.5px solid #e2d9f1;font:inherit;font-size:16px}
.jmp-tabs{display:flex;gap:6px;padding:4px 12px 8px;overflow-x:auto;scrollbar-width:none}
.jmp-tabs::-webkit-scrollbar{display:none}
.jmp-tabs button{flex:none;min-height:36px;padding:0 14px;border-radius:999px;border:1.5px solid #e2d9f1;background:#fff;color:#40108a;font:inherit;font-size:13.5px;font-weight:800;cursor:pointer}
.jmp-tabs button[aria-selected=true]{background:#2a0f5c;border-color:#2a0f5c;color:#ffd65a}
.jmp-list{flex:1;min-height:0;overflow-y:auto;padding:2px 8px 8px;overscroll-behavior:contain}
.jmp-row{display:flex;align-items:center;gap:10px;padding:7px 6px;border-radius:14px}
.jmp-row.chosen{background:#f6f0ff}
.jmp-sleeve{position:relative;flex:0 0 54px;width:54px;height:54px;padding:0;border:0;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#7b2ff7,#f107a3);box-shadow:3px 3px 0 #2a0f5c22;cursor:pointer;display:grid;place-items:center;color:#fff;font-size:22px}
.jmp-sleeve img{width:100%;height:100%;object-fit:cover;display:block}
.jmp-sleeve i{position:absolute;right:3px;bottom:3px;width:20px;height:20px;border-radius:50%;background:#000a;color:#fff;font-size:10px;font-style:normal;display:grid;place-items:center}
.jmp-info{flex:1;min-width:0;display:grid;gap:2px;text-align:left;border:0;background:none;padding:4px 0;color:inherit;font:inherit;cursor:pointer}
.jmp-info b{font-size:15px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jmp-info small{font-size:12.5px;color:#6b5f86;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jmp-save{flex:none;width:40px;height:40px;border:0;border-radius:50%;background:#f4effa;color:#c2185b;font-size:19px;cursor:pointer}
.jmp-save.on{background:#ffe4ef}
.jmp-note{padding:22px 14px;text-align:center;color:#6b5f86;font-size:14px}
.jmp-retry,.jmp-btn{min-height:44px;padding:0 18px;border-radius:999px;border:1.5px solid #e2d9f1;background:#fff;color:#40108a;font:inherit;font-size:15px;font-weight:800;cursor:pointer}
.jmp-btn.hot{border:0;background:linear-gradient(180deg,#ffd65a,#f3a61b);color:#2a0f5c;box-shadow:0 6px 16px #f3a61b55}
.jmp-foot{flex:none;margin:0;padding:8px 14px 12px;font-size:12.5px;color:#6b5f86;text-align:center;border-top:1px solid #f0eaf8}
.jmp-preview{flex:1;min-height:0;overflow-y:auto;padding:12px}
.jmp-ex{margin:14px 2px 4px}
.jmp-ex-head{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;color:#6b5f86;margin-bottom:6px}
.jmp-ex-head b{color:#1e1530;font-size:14px}
.jmp-ex-track{position:relative;height:34px;border-radius:10px;background:#f1ecf8;overflow:hidden}
.jmp-ex-wave{position:absolute;inset:6px 4px;background:repeating-linear-gradient(90deg,#c9b8ec 0 3px,transparent 3px 6px);-webkit-mask:linear-gradient(0deg,#000 20%,#0006 50%,#000 80%);mask:linear-gradient(0deg,#000 20%,#0006 50%,#000 80%)}
.jmp-ex-win{position:absolute;top:0;bottom:0;border-radius:10px;border:3px solid #f107a3;background:#f107a322;box-sizing:border-box}
.jmp-ex-range{width:100%;margin:8px 0 0;accent-color:#f107a3;height:28px}
.jmp-use-row{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}
.jmp-use-row .hot{flex:1}
.jmp-sleeve:focus-visible,.jmp-info:focus-visible,.jmp-save:focus-visible,.jmp-tabs button:focus-visible,.jmp-btn:focus-visible,.jmp-back:focus-visible,.jmp-x:focus-visible{outline:3px solid #1d4ed8;outline-offset:2px}

/* ---- composer: Add Music and the chosen song chip ---- */
.wlc-addmusic{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 16px;margin:2px 0 6px;border-radius:999px;border:1.5px dashed #c9b8ec;background:#faf7ff;color:#40108a;font:inherit;font-size:14.5px;font-weight:800;cursor:pointer}
.wlc-addmusic small{font-weight:600;color:#8a7aa8;font-size:12px}
.wlc-mchip{display:flex;align-items:center;gap:10px;padding:6px;border-radius:16px;background:linear-gradient(135deg,#f6f0ff,#fff3e6);border:1px solid #eadff7;min-width:0}
.wlc-mart{position:relative;flex:0 0 46px;width:46px;height:46px;padding:0;border:0;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#7b2ff7,#f107a3);color:#fff;display:grid;place-items:center;cursor:pointer}
.wlc-mart img{width:100%;height:100%;object-fit:cover;display:block}
.wlc-mart i{position:absolute;inset:auto 3px 3px auto;width:18px;height:18px;border-radius:50%;background:#000a;font-size:9px;font-style:normal;display:grid;place-items:center}
.wlc-mtext{flex:1;min-width:0;display:grid;gap:1px}
.wlc-mtext b{font-size:14.5px;font-weight:800;color:#1e1530;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wlc-mtext small{font-size:12px;color:#6b5f86;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wlc-mbtn{flex:none;height:32px;padding:0 12px;border-radius:999px;border:1px solid #e2d9f1;background:#fff;color:#40108a;font:inherit;font-size:13px;font-weight:800;cursor:pointer}

/* ---- posts: the song line with artwork and the now-playing badge ---- */
.wl-song-art{flex:none;width:26px;height:26px;border-radius:5px;object-fit:cover}
.wl-song-track{background:linear-gradient(135deg,#f6f0ff,#fff3e6)}

/* ---- Cockpit: Music section and the Music tab ---- */
.jcp-clip{background:linear-gradient(135deg,#2a0f5c,#7b2ff7 55%,#f107a3)!important;color:#fff!important}
.jcp-tab{padding:4px 2px 10px}
.jcl{color:#f3eaff}
.jcl-head{display:flex;gap:12px;align-items:flex-start;margin-bottom:10px}
.jcl-head h3{margin:0 0 2px;font-size:18px;color:#ffd65a}
.jcl-head p{margin:0;font-size:13px;line-height:1.4;color:#d9cdf2}
.jcl-disco{flex:none;width:42px;height:42px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff 0 6%,transparent 7%),repeating-conic-gradient(#b9c6ff 0 10deg,#6b4bd6 10deg 20deg);box-shadow:0 0 18px #9b7bff99}
@media (prefers-reduced-motion:no-preference){.jcl-disco{animation:jclSpin 6s linear infinite}}
@keyframes jclSpin{to{transform:rotate(360deg)}}
.jcl-note{margin:8px 0;font-size:14px;color:#d9cdf2}.jcl-note.small{font-size:12.5px}
.jcl-sources{display:flex;gap:8px;overflow-x:auto;padding:2px 0 8px;scrollbar-width:none}
.jcl-sources::-webkit-scrollbar{display:none}
.jcl-src{flex:none;display:inline-flex;align-items:center;gap:6px;max-width:210px;min-height:38px;padding:0 12px;border-radius:999px;border:1.5px solid #ffffff3d;background:#ffffff12;color:#fff;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.jcl-src span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jcl-src[aria-selected=true]{border-color:#ffd65a;background:#ffd65a26;color:#ffd65a}
.jcl-up{border-style:dashed}
.jcl-stage{display:grid;gap:10px}
.jcl-stage[hidden]{display:none}
.jcl-preview{position:relative;justify-self:center;height:min(34dvh,300px);aspect-ratio:9/16;border-radius:18px;overflow:hidden;background:#0b0620;box-shadow:0 0 0 2px #b38cff66,0 0 26px #9b7bff55}
.jcl-video{width:100%;height:100%;object-fit:cover;display:block}
.jcl-len,.jcl-loop{position:absolute;top:8px;padding:3px 8px;border-radius:999px;font:900 11.5px/1 Inter,system-ui,sans-serif;letter-spacing:.06em}
.jcl-len{right:8px;background:#ffd65a;color:#2a0f5c}.jcl-loop{left:8px;background:#f107a3;color:#fff}
.jcl-strip{position:relative;height:48px;border-radius:10px;overflow:hidden;background:repeating-linear-gradient(90deg,#2a1a52 0 14px,#3a2670 14px 28px);touch-action:none;cursor:pointer}
.jcl-thumbs{width:100%;height:100%;display:block;opacity:.85}
.jcl-win{position:relative;margin-top:-58px;height:58px;box-sizing:border-box;border:3px solid #ffd65a;border-radius:12px;background:#ffd65a14;box-shadow:0 0 14px #ffd65a88;cursor:grab;touch-action:none;display:flex;justify-content:space-between;align-items:center;min-width:44px}
.jcl-win.drag{cursor:grabbing}
.jcl-win i{width:4px;height:22px;margin:0 4px;border-radius:2px;background:#ffd65a}
.jcl-win:focus-visible{outline:3px solid #fff;outline-offset:2px}
.jcl-times{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:#d9cdf2}
.jcl-times b{color:#fff}
.jcl-state{margin-left:auto;color:#9ff0c2;font-weight:700}.jcl-state.bad{color:#ffb4b4}
.jcl-ctrl{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.jcl-btn{min-height:44px;padding:0 16px;border-radius:999px;border:1.5px solid #ffffff4d;background:#ffffff14;color:#fff;font:inherit;font-size:14.5px;font-weight:800;cursor:pointer}
.jcl-btn.gold{border:0;background:linear-gradient(180deg,#ffd65a,#f3a61b);color:#2a0f5c;margin-left:auto}
.jcl-btn:disabled{opacity:.5}
.jcl-song{display:grid;gap:2px;font-size:11.5px;color:#d9cdf2}
.jcl-song select{min-height:38px;border-radius:10px;border:1px solid #ffffff4d;background:#1b1036;color:#fff;font:inherit;font-size:13.5px;padding:0 8px}
.jcl-mine h4{margin:14px 0 6px;font-size:14px;color:#ffd65a}
.jcl-mine ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.jcl-mine li{display:flex;justify-content:space-between;align-items:center;padding:6px 10px;border-radius:10px;background:#ffffff10;font-size:13px}
.jcl-del{border:0;background:none;color:#ffb4b4;font:inherit;font-weight:800;cursor:pointer;min-height:36px}
.jcl-btn:focus-visible,.jcl-src:focus-visible,.jcl-del:focus-visible{outline:3px solid #ffd65a;outline-offset:2px}

/* ---- Music page ---- */
.jm-row .jc-np{display:none}
.jm-row.current .jc-np{display:inline-flex}
.jm-pl-art{cursor:pointer}
.jm-featured{margin:10px 0;padding:12px;border-radius:18px;background:radial-gradient(120% 120% at 50% 0%,#3a1e6e,#170c33);color:#fff}
.jm-featured-tag{display:block;margin:0 0 8px;font-size:12px;font-weight:900;letter-spacing:.08em;color:#ffd65a;text-transform:uppercase}
.jm-featured-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:10px}
.jm-feat{display:grid;justify-items:center;gap:4px;border:0;background:none;color:#fff;font:inherit;cursor:pointer;padding:4px}
.jm-feat img{width:72px;height:72px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 3px #ffd65a,0 6px 16px #0008}
.jm-feat b{font-size:13.5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jm-feat small{font-size:11.5px;color:#ffd65a;font-weight:800}
.jm-licence .jm-check{display:flex;gap:10px;align-items:flex-start;margin:8px 0;font-size:14.5px;line-height:1.35}
.jm-licence .jm-check input{width:20px;height:20px;flex:none;accent-color:#7b2ff7}
.jm-licence .jm-fs{border:1px solid #e9e1f6;border-radius:12px;padding:6px 10px;margin:8px 0;display:flex;gap:14px}
.jm-licence .jm-fs legend{font-size:12.5px;font-weight:800;padding:0 4px}
.jm-licence .jm-lbl{display:grid;gap:4px;margin:8px 0;font-size:13.5px;font-weight:700}
.jm-licence .jm-lbl small{font-weight:500;color:#6b5f86}
.jm-licence .jm-lbl input{min-height:44px;border-radius:10px;border:1.5px solid #e2d9f1;padding:0 10px;font:inherit;font-size:16px}
.jm-licence .jm-err{color:#b91c1c;font-weight:800}
.jmp-list-view[hidden],.jmp-preview[hidden]{display:none}

/* Music hub: five-second clip tool opens inside Music, not as a separate Cockpit tile. */
.jm-clip-entry{background:linear-gradient(110deg,#2a0f5c,#7b2ff7 55%,#f107a3)!important;color:#fff!important;border-color:#a978ff!important}
dialog.jm-clip-dialog{width:min(100% - 20px,760px);max-width:760px;max-height:92dvh;margin:auto;padding:0;border:1px solid #d6a928;border-radius:22px;background:#050b14;color:#f3eaff;box-shadow:0 0 34px #d6a92844;overflow:hidden}
dialog.jm-clip-dialog::backdrop{background:#000b;backdrop-filter:blur(3px)}
.jm-clip-box{display:flex;flex-direction:column;max-height:92dvh;overflow:auto;padding:12px;background:linear-gradient(180deg,#08111f,#03070d)}
.jm-clip-top{position:sticky;top:-12px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 2px 12px;background:#08111f;border-bottom:1px solid #d6a92855;color:#ffd65a}
.jm-clip-top b{font-size:16px;font-weight:900}
.jm-clip-close{width:40px;height:40px;border:1px solid #d6a928;border-radius:12px;background:#0d192a;color:#fff;font-size:26px}
.jm-clip-host{min-height:0}
.jm-clip-host .jcl{padding:10px 0;color:#f3eaff}
/* JiCHO Radio: the New Member Welcome, a small note while it plays (never blocks the page). */
.jm-welcome{position:fixed;left:50%;top:calc(env(safe-area-inset-top,0px) + 12px);transform:translateX(-50%);z-index:9000;pointer-events:none;
  background:linear-gradient(135deg,#6d28d9,#f59e0b);color:#fff;font-weight:700;font-size:14px;padding:8px 16px;border-radius:999px;
  box-shadow:0 6px 20px rgba(0,0,0,.25);animation:jmWelcomeIn .4s ease-out}
@keyframes jmWelcomeIn{from{opacity:0;transform:translate(-50%,-8px)}to{opacity:1;transform:translate(-50%,0)}}
@media (prefers-reduced-motion:reduce){.jm-welcome{animation:none}}
