/* 음악공유 — 앨범형 화면과 아래 재생 막대 (routes/www/music.js · /assets/music.js).
 *
 * 음악 방은 사이트 테마(밝음/어두움)와 상관없이 늘 어둡다 — 표지 그림이 돋보이게.
 * .mu 안에서 ssok.css 의 색 변수를 갈아 끼우므로 댓글 · 입력칸 · 단추 같은 기존 부품도 그대로 어둡게 보인다.
 */
.mu {
  --bg: #121212; --bg-2: #181818; --card: #181818; --card-2: #222;
  --line: #2a2a2a; --line-2: #3e3e3e;
  --ink: #fff; --ink-2: #b3b3b3; --ink-3: #8f8f8f;
  --brand: #1ed760; --brand-2: #1db954; --brand-ink: #000;
  --grad: #1ed760; --grad-soft: rgba(30,215,96,.14);
  --tint-brand: rgba(30,215,96,.14);
  --ok: #1ed760; --warn: #f5b544; --bad: #f4726a;
  --shadow: 0 8px 24px rgba(0,0,0,.5);
  --mu-c: 83, 56, 160;                 /* 표지에서 뽑은 색(music.js 가 바꾼다) */
  color-scheme: dark;
  background: var(--bg);
  color: var(--ink);
  min-height: 60vh;
}
.mu .crumb, .mu .crumb a { color: rgba(255,255,255,.7); }
.mu .crumb a:hover { color: #fff; }
.mu .btn-p { background: var(--brand); color: #000; border-radius: 999px; font-weight: 700; }
.mu .btn-p:hover { background: #3be477; filter: none; transform: scale(1.03); }
.mu .btn-g { border-radius: 999px; }
.mu .btn-like { border-radius: 999px; background: transparent; }
.mu .note { background: rgba(255,255,255,.06); }
.mu .list > a:hover { background: #2a2a2a; }
.mu .field { background: #242424; border-color: #3a3a3a; }
.mu .field:focus { border-color: #fff; }
.mu select.field option { background: #242424; color: #fff; }
.mu .prose a { color: var(--brand); }
.mu .sec-t { border-top: 0; }

/* ── 머리(그러데이션) ── */
.mu-hero {
  padding: 22px 0 26px;
  background: linear-gradient(180deg, rgba(var(--mu-c), .95) 0%, rgba(var(--mu-c), .45) 62%, #121212 100%);
  transition: background .6s;
}
.mu-hero-home { background: linear-gradient(180deg, rgba(var(--mu-c), .55) 0%, #121212 100%); padding-bottom: 6px; }
.mu-hero-in { display: flex; align-items: flex-end; gap: 26px; margin-top: 10px; }
.mu-hero-cv { flex: 0 0 auto; width: 232px; height: 232px; box-shadow: 0 10px 40px rgba(0,0,0,.55); border-radius: 6px; overflow: hidden; }
.mu-hero-cv.mu-round { border-radius: 50%; }
.mu-hero-cv .mu-img { width: 100%; height: 100%; border-radius: 0; font-size: 80px; }
.mu-hero-tx { min-width: 0; }
.mu-kicker { font-size: 13px; font-weight: 700; color: #fff; }
.mu-h1 { font-size: clamp(30px, 6vw, 72px); line-height: 1.05; font-weight: 900; letter-spacing: -.03em;
  margin: 8px 0 14px; color: #fff; word-break: keep-all; overflow-wrap: anywhere; }
.mu-h1s { font-size: 32px; font-weight: 900; letter-spacing: -.02em; color: #fff; }
.mu-sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.mu-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; color: rgba(255,255,255,.85); }
.mu-meta a.b { color: #fff; font-weight: 700; }
.mu-meta a.b:hover { text-decoration: underline; }
.mu-meta .dot { color: rgba(255,255,255,.6); }
.mu-by { margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.7); }
.mu-by .avatar { width: 22px; height: 22px; font-size: 11px; }

.mu-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.mu-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.mu-tabs { display: flex; gap: 8px; }
.mu-tab { padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font-size: 14px; font-weight: 600; }
.mu-tab:hover { background: rgba(255,255,255,.14); }
.mu-tab.on { background: #fff; color: #000; }
.mu-search input { width: min(340px, 100%); padding: 10px 16px 10px 38px; border-radius: 999px; border: 1px solid transparent;
  background: #242424 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 14px 50% no-repeat;
  color: #fff; font: inherit; font-size: 14px; }
.mu-search input:focus { outline: none; border-color: #fff; }
.mu-search { flex: 0 1 340px; }

/* ── 본문 ── */
.mu-body { padding: 8px 0 40px; }
.mu-more-sec { padding-top: 0; }
.mu-h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 26px 0 14px; color: #fff; }
.mu-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.mu-more { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.mu-more:hover { color: #fff; text-decoration: underline; }
.mu-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px 0 10px; }
.mu-actions .btn-like { margin: 0; }
.mu-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.mu-desc { margin-top: 30px; max-width: 760px; color: var(--ink-2); }
.mu-legal { margin-top: 26px; font-size: 12px; color: var(--ink-3); }

/* 큰 초록 재생 단추 */
.mu-big, .mu-fab { display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--brand);
  color: #000; cursor: pointer; box-shadow: 0 8px 18px rgba(0,0,0,.35); transition: transform .15s, background .15s; }
.mu-big { width: 56px; height: 56px; }
.mu-big svg { width: 26px; height: 26px; fill: currentColor; }
.mu-big:hover, .mu-fab:hover { transform: scale(1.06); background: #3be477; }

/* ── 표지 ── */
.mu-img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #282828; }
.mu-ph { display: grid; place-items: center; color: rgba(255,255,255,.9); font-size: 46px; font-weight: 800;
  background: linear-gradient(135deg, hsl(var(--h, 260) 65% 48%), hsl(calc(var(--h, 260) + 50) 70% 22%)); }
.mu-img-s { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 4px; font-size: 16px; }

/* ── 앨범 · 아티스트 카드 ── */
.mu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
.mu-card { position: relative; padding: 12px; border-radius: 8px; background: #181818; transition: background .2s; min-width: 0; }
.mu-card:hover { background: #282828; }
.mu-cv { position: relative; margin-bottom: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.5); border-radius: 6px; }
.mu-fab { position: absolute; right: 8px; bottom: 8px; z-index: 2; width: 46px; height: 46px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s, background .15s; }
.mu-fab svg { width: 22px; height: 22px; fill: currentColor; }
.mu-card:hover .mu-fab, .mu-fab:focus-visible, .mu-fab.on { opacity: 1; transform: none; }
@media (hover: none) { .mu-fab { opacity: 1; transform: none; width: 40px; height: 40px; } }
.mu-card-t { display: block; font-weight: 700; color: #fff; font-size: 15px; }
.mu-card-t::after { content: ""; position: absolute; inset: 0; z-index: 1; }    /* 카드 전체를 누를 수 있게 */
.mu-card-s { display: block; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.mu-card-s a { position: relative; z-index: 2; color: var(--ink-2); }
.mu-card-s a:hover { color: #fff; text-decoration: underline; }

.mu-artist { display: block; padding: 12px; border-radius: 8px; background: #181818; transition: background .2s; text-align: left; min-width: 0; }
.mu-artist:hover { background: #282828; }
.mu-artist b { display: block; color: #fff; font-size: 15px; margin-top: 12px; }
.mu-av { display: block; aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.mu-av img, .mu-av .mu-ph { width: 100%; height: 100%; object-fit: cover; font-size: 48px; }
.mu-row1 { grid-auto-flow: column; grid-auto-columns: minmax(150px, 176px); grid-template-columns: none;
  overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }

/* ── 곡 목록 ── */
.mu-tracks { --cols: 36px minmax(0, 1fr) 90px 64px; }
.mu-tracks-al { --cols: 36px minmax(0, 1.4fr) minmax(0, 1fr) 90px 64px; }
.mu-th, .mu-tr { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 14px; padding: 0 14px; }
.mu-th { height: 36px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid #2a2a2a; margin-bottom: 8px; }
.mu-th svg { width: 16px; height: 16px; fill: currentColor; }
.mu-tr { height: 56px; border-radius: 4px; cursor: pointer; color: var(--ink-2); font-size: 14px; outline: none; }
.mu-tr:hover, .mu-tr:focus-visible { background: rgba(255,255,255,.08); }
.mu-tr:focus-visible { box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.mu-n { position: relative; text-align: right; font-variant-numeric: tabular-nums; }
.mu-n svg { display: none; width: 14px; height: 14px; fill: #fff; margin-left: auto; }
.mu-tr:hover .mu-i { display: none; }
.mu-tr:hover .mu-n svg { display: block; }
.mu-eq { display: none; height: 14px; align-items: flex-end; gap: 2px; justify-content: flex-end; }
.mu-eq i { width: 3px; background: var(--brand); animation: mu-eq 1s ease-in-out infinite; }
.mu-eq i:nth-child(2) { animation-delay: -.4s; }
.mu-eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes mu-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.mu-tr.on b { color: var(--brand); }
.mu-tr.on .mu-i { display: none; }
.mu-tr.on.playing .mu-eq { display: flex; }
.mu-tr.on.playing:hover .mu-eq { display: none; }
.mu-tr.on:not(.playing) .mu-n svg { display: block; fill: var(--brand); }
.mu-tt { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mu-tt-tx { min-width: 0; }
.mu-tt b { display: block; color: #fff; font-weight: 500; font-size: 15px; }
.mu-tt .mu-sub { display: block; margin: 0; font-size: 13px; }
.mu-col-al { color: var(--ink-2); font-size: 14px; }
a.mu-col-al:hover { color: #fff; text-decoration: underline; }
.mu-col-p, .mu-col-d { text-align: right; font-variant-numeric: tabular-nums; }
.mu-col-d { padding-right: 4px; }

/* ── 아래 재생 막대 ── */
.mu-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7900; height: 76px;
  display: grid; grid-template-columns: minmax(180px, 30%) minmax(0, 40%) minmax(140px, 30%); align-items: center;
  gap: 12px; padding: 0 16px; background: #000; border-top: 1px solid #282828; color: #fff;
  transform: translateY(100%); transition: transform .25s; }
.mu-player.show { transform: none; }
.mu-player { --brand: #1ed760; }
.mu-rep { position: relative; }
.mu-rep.one::after { content: "1"; position: absolute; top: 3px; right: 2px; font-size: 9px; font-weight: 800; color: var(--brand); }
body.mu-on { padding-bottom: 76px; }
body.mu-on .skt-fab { bottom: 92px; }
body.mu-on .skt-panel { bottom: 162px; }
body.mu-on .toast { bottom: 96px; }
.mu-now { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mu-now img, .mu-now .mu-ph { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 4px; object-fit: cover; font-size: 20px; }
.mu-now-tx { min-width: 0; }
.mu-now-t { display: block; font-size: 14px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-now-t:hover { text-decoration: underline; }
.mu-now-a { display: block; font-size: 12px; color: #b3b3b3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-ctl { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.mu-btns { display: flex; align-items: center; gap: 18px; }
.mu-ib { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent;
  color: #b3b3b3; cursor: pointer; font-size: 15px; }
.mu-ib:hover { color: #fff; }
.mu-ib svg { width: 18px; height: 18px; fill: currentColor; }
.mu-ib.on { color: var(--brand, #1ed760); }
.mu-pp { width: 36px; height: 36px; background: #fff; color: #000; }
.mu-pp:hover { color: #000; transform: scale(1.06); }
.mu-pp svg { width: 18px; height: 18px; }
.mu-prog { display: flex; align-items: center; gap: 8px; width: 100%; font-size: 11px; color: #b3b3b3; font-variant-numeric: tabular-nums; }
.mu-prog span { flex: 0 0 38px; text-align: center; }
.mu-range { -webkit-appearance: none; appearance: none; flex: 1 1 auto; height: 4px; border-radius: 2px; cursor: pointer;
  background: linear-gradient(to right, #fff var(--p, 0%), #4d4d4d var(--p, 0%)); }
.mu-range:hover { background: linear-gradient(to right, #1ed760 var(--p, 0%), #4d4d4d var(--p, 0%)); }
.mu-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; }
.mu-range:hover::-webkit-slider-thumb { opacity: 1; }
.mu-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.mu-vol { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.mu-vol .mu-range { flex: 0 1 110px; }

/* ── 올리기 폼 ── */
.mu-form { display: grid; gap: 22px; margin-top: 22px; }
.mu-form-top { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.mu-form-fields { display: grid; gap: 14px; }
.mu-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mu-cover-pick { display: grid; gap: 8px; justify-items: start; }
.mu-cover-prev { width: 200px; height: 200px; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.mu-cover-prev .mu-img { width: 100%; height: 100%; border-radius: 0; font-size: 70px; }
.mu-cover-prev.busy { opacity: .5; }
.mu-file { position: relative; overflow: hidden; cursor: pointer; }
.mu-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.mu-drop { border: 2px dashed #3e3e3e; border-radius: 10px; padding: 22px; text-align: center; color: var(--ink-2); transition: border-color .15s, background .15s; }
.mu-drop p { margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.mu-drop .help { display: block; margin-top: 10px; }
.mu-drop.over { border-color: var(--brand); background: rgba(30,215,96,.06); }
.mu-up { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: mu; }
.mu-up-i { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) 54px auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; background: #1f1f1f; counter-increment: mu; overflow: hidden; }
.mu-up-n::before { content: counter(mu); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mu-up-i .field { padding: 8px 10px; }
.mu-up-d { font-size: 13px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.mu-up-btns { display: flex; gap: 2px; }
.mu-up-bar { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--brand); width: 0; transition: width .2s; }
.mu-up-i.fail { background: rgba(244,114,106,.12); }
.mu-up-i.fail .mu-up-d { color: var(--bad); }

/* ── 좁은 화면 ── */
@media (max-width: 760px) {
  .mu-hero-in { flex-direction: column; align-items: flex-start; gap: 16px; }
  .mu-hero-cv { width: min(220px, 62vw); height: min(220px, 62vw); align-self: center; }
  .mu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mu-card, .mu-artist { padding: 8px; }
  .mu-row1 { grid-template-columns: none; grid-auto-columns: 130px; }
  .mu-tracks, .mu-tracks-al { --cols: 26px minmax(0, 1fr) 48px; }
  .mu-col-p, .mu-col-al { display: none; }
  .mu-th, .mu-tr { gap: 10px; padding: 0 6px; }
  .mu-tools { margin-left: 0; }
  .mu-form-top { grid-template-columns: 1fr; }
  .mu-cover-pick { justify-items: center; }
  .mu-up-i { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .mu-up-d { display: none; }

  .mu-player { height: 64px; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 10px; }
  body.mu-on { padding-bottom: 64px; }
  body.mu-on .skt-fab { bottom: 78px; }
  body.mu-on .toast { bottom: 80px; }
  .mu-now img, .mu-now .mu-ph { width: 44px; height: 44px; flex-basis: 44px; }
  .mu-ctl { flex-direction: row; }
  .mu-btns { gap: 4px; }
  .mu-btns [data-shuffle], .mu-btns [data-repeat], .mu-vol { display: none; }
  .mu-prog { position: absolute; left: 0; right: 0; top: -2px; gap: 0; }
  .mu-prog span { display: none; }
  .mu-prog .mu-range { height: 3px; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mu-eq i { animation: none; height: 10px; }
}
