/* ═══════════════════════════════════════════════════════════════
   MOA MUSIC — 메인 스타일시트 v4.7 (완전 반응형)
   Breakpoints: xs(~479) / sm(480) / md(768) / lg(1024)
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════
   1. CSS 변수
   ══════════════════════════════════════════════ */
:root {
  /* ── 라이트 모드 기본값 ────────────────────────── */
  --mm-bg:        #f5f4f0;      /* 아주 연한 웜그레이 */
  --mm-surface:   #ffffff;
  --mm-surface2:  #eeece6;
  --mm-border:    #dbd8d0;
  --mm-primary:   #7c3aed;      /* 메인 퍼플 유지 */
  --mm-primary2:  #6d28d9;
  --mm-text:      #1a1714;
  --mm-muted:     #7a746c;
  --mm-shadow:    rgba(0,0,0,.10);
  --mm-bar-bg:    rgba(255,255,255,.97);
  --mm-header-bg: rgba(255,255,255,.94);
  --mm-track-playing-bg: rgba(124,58,237,.1);
  --mm-chart-row-border: rgba(219,216,208,.6);
  --mm-hero-bg:   linear-gradient(135deg, rgba(124,58,237,.08) 0%, rgba(255,255,255,.96) 55%, rgba(238,236,230,.9) 100%);
  /* 치수 */
  --mm-bar-h:    64px;
  --mm-hdr-h:    58px;
  --mm-radius:   12px;
  --mm-pad:      20px;
  /* 헤더 글꼴 */
  --mm-nav-fs:   .875rem;
  --mm-logo-fs:  1.05rem;
}

/* ── 베이지 모드 ─────────────────────────────────── */
[data-mm-theme="beige"] {
  --mm-bg:        #f2ede4;      /* 따뜻한 크림 베이지 */
  --mm-surface:   #faf7f2;
  --mm-surface2:  #e8e0d2;
  --mm-border:    #d4c9b8;
  --mm-primary:   #92400e;      /* 번트 앰버 — 베이지와 어울리는 주색 */
  --mm-primary2:  #b45309;
  --mm-text:      #1c1208;
  --mm-muted:     #8a7660;
  --mm-shadow:    rgba(0,0,0,.10);
  --mm-bar-bg:    rgba(242,237,228,.97);
  --mm-header-bg: rgba(250,247,242,.94);
  --mm-track-playing-bg: rgba(146,64,14,.1);
  --mm-chart-row-border: rgba(212,201,184,.6);
  --mm-hero-bg:   linear-gradient(135deg, rgba(180,83,9,.09) 0%, rgba(250,247,242,.96) 55%, rgba(232,224,210,.9) 100%);
}

/* 모바일 치수 조정 */
@media (max-width:767px) {
  :root { --mm-hdr-h:52px; --mm-pad:14px; }
}

/* ══════════════════════════════════════════════
   2. 리셋 & 기본
   ══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-text-size-adjust:100%; overflow-x:hidden; }
body {
  font-family:'Noto Sans KR','Apple SD Gothic Neo',-apple-system,sans-serif;
  background:var(--mm-bg);
  color:var(--mm-text);
  padding-bottom:calc(var(--mm-bar-h) + 20px);
  min-height:100vh;
  line-height:1.5;
  overflow-x:hidden;
}
a  { color:inherit; text-decoration:none; }
img { max-width:100%; display:block; }
button { font-family:inherit; cursor:pointer; }

/* ══════════════════════════════════════════════
   3. 공방.org 상단 바 & 메인 헤더
   ══════════════════════════════════════════════ */
.mm-site-topbar {
  background:var(--mm-surface2);
  border-bottom:1px solid var(--mm-border);
  font-size:.76rem;
  color:var(--mm-muted);
}
.mm-site-topbar-inner {
  max-width:1200px;
  margin:0 auto;
  padding:6px var(--mm-pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.mm-site-topbar-left,
.mm-site-topbar-right {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.mm-site-home-link {
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-weight:700;
  color:var(--mm-primary2);
  padding:2px 8px;
  border-radius:999px;
  background:var(--mm-surface);
  border:1px solid var(--mm-border);
  transition:border-color .15s, background .15s, transform .15s;
}
.mm-site-home-link:hover {
  border-color:var(--mm-primary);
  background:var(--mm-bg);
  transform:translateY(-1px);
}
.mm-site-tagline {
  font-size:.74rem;
  color:var(--mm-muted);
}
.mm-site-user {
  font-size:.75rem;
  color:var(--mm-muted);
}
.mm-site-user strong {
  color:var(--mm-text);
  font-weight:700;
}
.mm-site-top-btn {
  display:inline-flex;
  align-items:center;
  padding:3px 9px;
  border-radius:999px;
  background:var(--mm-surface);
  border:1px solid var(--mm-border);
  color:var(--mm-text);
  font-size:.73rem;
  font-weight:600;
  line-height:1.2;
  transition:background .15s, border-color .15s, color .15s;
}
.mm-site-top-btn:hover {
  background:var(--mm-primary);
  border-color:var(--mm-primary);
  color:#fff;
}
@media (max-width:599px) {
  .mm-site-tagline { display:none; }
  .mm-site-topbar-inner { padding:5px var(--mm-pad); gap:6px; }
}

.mm-header {
  position:sticky; top:0; z-index:100;
  background:var(--mm-header-bg);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--mm-border);
  box-shadow:0 4px 16px var(--mm-shadow);
}
.mm-header-inner {
  max-width:1200px; margin:0 auto;
  padding:0 var(--mm-pad);
  height:var(--mm-hdr-h);
  display:flex; align-items:center; gap:6px;
}

/* 로고 */
.mm-logo {
  font-size:var(--mm-logo-fs); font-weight:800;
  color:var(--mm-primary2); white-space:nowrap;
  flex-shrink:0; letter-spacing:-.015em;
  padding:6px 10px; border-radius:10px;
  transition:background .15s, opacity .15s;
}
.mm-logo:hover { background:var(--mm-surface2); opacity:.95; }

/* 데스크톱 네비 */
.mm-nav {
  display:flex; align-items:center; gap:3px;
  margin-left:auto; flex-wrap:nowrap;
}
.mm-nav a {
  display:inline-flex; align-items:center; gap:4px;
  padding:7px 10px; border-radius:9px;
  font-size:var(--mm-nav-fs); font-weight:500; line-height:1;
  color:var(--mm-muted); white-space:nowrap;
  transition:background .15s, color .15s, border-color .15s;
}
.mm-nav a:hover,
.mm-nav a.active {
  background:var(--mm-surface2);
  color:var(--mm-text);
  font-weight:600;
}

.mm-nav-site {
  background:var(--mm-bg) !important;
  color:var(--mm-text) !important;
  border:1px solid var(--mm-border);
  font-weight:600 !important;
}
.mm-nav-site:hover {
  background:var(--mm-surface2) !important;
  border-color:var(--mm-primary) !important;
  color:var(--mm-primary2) !important;
}
.mm-nav-sep {
  width:1px; height:16px;
  background:var(--mm-border);
  margin:0 4px; flex-shrink:0;
}

.mm-nav-adm {
  background:rgba(124,58,237,.14) !important;
  color:var(--mm-primary2) !important;
  font-weight:600 !important;
}
.mm-nav-adm:hover { background:rgba(124,58,237,.24) !important; }

/* 구분선 — 모바일 드롭다운에서만 */
.mm-nav-divider { display:none; }

/* 다크/베이지 토글 */
.mm-theme-btn {
  flex-shrink:0;
  width:34px; height:34px; border-radius:9px;
  border:1px solid var(--mm-border);
  background:var(--mm-surface); color:var(--mm-text);
  font-size:.95rem;
  display:flex; align-items:center; justify-content:center;
  transition:background .15s, border-color .15s, transform .15s;
  margin-left:6px;
}
.mm-theme-btn:hover {
  background:var(--mm-surface2);
  border-color:var(--mm-primary);
  transform:translateY(-1px);
}

/* 햄버거 — 기본 숨김 */
.mm-nav-toggle {
  display:none; flex-shrink:0;
  align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:9px;
  border:1px solid var(--mm-border);
  background:var(--mm-surface); color:var(--mm-text);
  font-size:1.1rem;
  transition:background .15s, border-color .15s;
  margin-left:4px;
}
.mm-nav-toggle:hover {
  background:var(--mm-surface2);
  border-color:var(--mm-primary);
}

/* 태블릿: 글자 살짝 축소 */
@media (min-width:768px) and (max-width:1024px) {
  :root { --mm-nav-fs:.8rem; }
  .mm-nav a { padding:6px 8px; }
}

/* 모바일 드롭다운 */
@media (max-width:767px) {
  .mm-nav-toggle { display:flex; }
  .mm-nav-sep { display:none; }

  .mm-nav {
    display:none;
    position:fixed;
    top:calc(var(--mm-hdr-h) + 34px); left:0; right:0;
    flex-direction:column; align-items:stretch; gap:4px;
    padding:10px 12px 16px;
    background:var(--mm-surface);
    border-bottom:1px solid var(--mm-border);
    box-shadow:0 12px 28px var(--mm-shadow);
    z-index:99;
    max-height:calc(100svh - var(--mm-hdr-h) - 34px);
    overflow-y:auto;
  }
  .mm-nav.open { display:flex; }

  .mm-nav a {
    width:100%; padding:11px 14px;
    font-size:.9375rem; border-radius:10px; color:var(--mm-muted);
  }
  .mm-nav-site {
    background:var(--mm-bg) !important;
    margin-bottom:2px;
  }
  .mm-nav-adm { font-size:.9375rem !important; }
  .mm-nav-divider {
    display:block;
    height:1px; background:var(--mm-border); margin:4px 0; width:100%;
  }
}

/* ══════════════════════════════════════════════
   4. 레이아웃 & 인덱스 히어로/패널
   ══════════════════════════════════════════════ */
.mm-wrap {
  max-width:1260px; margin:0 auto;
  padding:24px var(--mm-pad);
}

.mm-hero {
  text-align:center;
  padding:36px 20px 32px;
  margin-bottom:22px;
  border-radius:18px;
  background:var(--mm-hero-bg);
  border:1px solid var(--mm-border);
  box-shadow:0 6px 24px var(--mm-shadow);
}
.mm-hero-badge {
  display:inline-block;
  padding:4px 12px;
  border-radius:999px;
  font-size:.75rem;
  font-weight:700;
  color:var(--mm-primary2);
  background:var(--mm-surface);
  border:1px solid var(--mm-border);
  margin-bottom:12px;
}
.mm-hero-title {
  font-size:clamp(1.55rem, 3.2vw, 2.2rem);
  font-weight:800;
  letter-spacing:-.02em;
  color:var(--mm-text);
  margin-bottom:8px;
}
.mm-hero-desc {
  color:var(--mm-muted);
  font-size:.9rem;
  max-width:540px;
  margin:0 auto 22px;
}
.mm-hero-search {
  display:flex;
  align-items:center;
  gap:8px;
  max-width:500px;
  margin:0 auto;
  padding:6px 6px 6px 14px;
  border-radius:999px;
  background:var(--mm-surface);
  border:1.5px solid var(--mm-border);
  box-shadow:0 4px 16px var(--mm-shadow);
  transition:border-color .15s, box-shadow .15s;
}
.mm-hero-search:focus-within {
  border-color:var(--mm-primary);
  box-shadow:0 6px 20px var(--mm-shadow);
}
.mm-hero-search input {
  flex:1;
  min-width:0;
  border:none;
  background:transparent;
  color:var(--mm-text);
  font-family:inherit;
  font-size:.875rem;
  padding:6px 4px;
}
.mm-hero-search input:focus { outline:none; }
.mm-hero-search .mm-btn {
  border-radius:999px;
  padding:8px 16px;
}

.mm-filter-bar {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:18px;
  font-size:.84rem;
  color:var(--mm-muted);
}
.mm-filter-chip {
  color:var(--mm-primary2);
  background:var(--mm-surface);
  border:1px solid var(--mm-border);
  padding:2px 10px;
  border-radius:999px;
}
.mm-filter-reset {
  font-size:.78rem;
  color:var(--mm-muted);
  padding:2px 8px;
  border-radius:6px;
}
.mm-filter-reset:hover {
  background:var(--mm-surface2);
  color:var(--mm-text);
}

.mm-panel {
  background:var(--mm-surface);
  border:1px solid var(--mm-border);
  border-radius:16px;
  padding:18px;
  box-shadow:0 4px 16px var(--mm-shadow);
}
@media (max-width:479px) {
  .mm-panel { padding:14px 12px; border-radius:14px; }
  .mm-hero { padding:26px 14px 24px; border-radius:14px; }
}

/* ══════════════════════════════════════════════
   5. 섹션 타이틀
   ══════════════════════════════════════════════ */
.mm-section-title {
  font-size:1.02rem; font-weight:800;
  margin-bottom:14px;
  padding-bottom:10px;
  border-bottom:1px solid var(--mm-border);
  display:flex; align-items:center;
  justify-content:space-between; gap:8px;
}
.mm-section-title a {
  font-size:.78rem; font-weight:600;
  color:var(--mm-muted); white-space:nowrap;
  padding:3px 8px; border-radius:6px;
  transition:background .15s, color .15s;
}
.mm-section-title a:hover {
  background:var(--mm-surface2);
  color:var(--mm-primary2);
}

/* ══════════════════════════════════════════════
   6. 홈 2단 그리드 (TOP10 | 최신곡)
   ══════════════════════════════════════════════ */
.mm-home-grid {
  display:grid;
  grid-template-columns:1fr 1.55fr;
  gap:22px;
  align-items:start;
}
@media (max-width:860px) {
  .mm-home-grid { grid-template-columns:1fr; gap:24px; }
}

/* ══════════════════════════════════════════════
   7. 장르 탭 + 화살표 버튼
   ══════════════════════════════════════════════ */
.mm-tabs-outer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
}
.mm-tabs-arrow-left,
.mm-tabs-arrow-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--mm-border);
  background: var(--mm-surface);
  color: var(--mm-text);
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, opacity .15s, border-color .15s;
  user-select: none;
  z-index: 1;
}
.mm-tabs-arrow-left:hover,
.mm-tabs-arrow-right:hover {
  background: var(--mm-surface2);
  border-color: var(--mm-primary);
  color: var(--mm-primary);
}
.mm-tabs-arrow-left.disabled,
.mm-tabs-arrow-right.disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}

@media (min-width: 768px) {
  .mm-tabs-arrow-left,
  .mm-tabs-arrow-right { display: none; }
  .mm-tabs-outer { flex-wrap: wrap; gap: 0; }
}

.mm-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap !important;
}
.mm-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: .82rem; font-weight:600;
  border: 1px solid var(--mm-border);
  background: var(--mm-surface); color: var(--mm-muted);
  white-space: nowrap; flex-shrink: 0;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.mm-tab.active {
  background: var(--mm-primary); color: #fff; border-color: var(--mm-primary);
  box-shadow:0 3px 10px var(--mm-shadow);
}
.mm-tab:hover:not(.active) {
  background: var(--mm-surface2); color: var(--mm-text);
  border-color: var(--mm-border);
}

@media (max-width: 767px) {
  .mm-tabs-outer {
    flex-wrap: nowrap;
    margin-bottom: 14px;
  }
  .mm-tabs {
    flex: 1;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0;
  }
  .mm-tabs::-webkit-scrollbar { display: none; }
  .mm-tabs::after {
    content: ''; display: block;
    flex-shrink: 0; width: 8px;
  }
  .mm-tab {
    scroll-snap-align: start;
    padding: 5px 12px; font-size: .8rem;
  }
}

/* ══════════════════════════════════════════════
   8. 카드 그리드 (앨범·트랙 등)
   ══════════════════════════════════════════════ */
.mm-card-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(135px,1fr));
  gap:14px;
}
@media (min-width:480px) {
  .mm-card-grid { grid-template-columns:repeat(auto-fill, minmax(155px,1fr)); }
}
@media (min-width:768px) {
  .mm-card-grid { grid-template-columns:repeat(auto-fill, minmax(170px,1fr)); gap:16px; }
}
@media (min-width:1024px) {
  .mm-card-grid { grid-template-columns:repeat(auto-fill, minmax(185px,1fr)); gap:18px; }
}

.mm-card {
  display:block;
  background:var(--mm-bg); border:1px solid var(--mm-border);
  border-radius:var(--mm-radius); overflow:hidden; cursor:pointer;
  transition:transform .2s, box-shadow .2s, border-color .2s;
}
.mm-card:hover {
  transform:translateY(-4px);
  box-shadow:0 10px 24px var(--mm-shadow);
  border-color:var(--mm-primary);
}
.mm-card-thumb { position:relative; padding-top:100%; background:var(--mm-surface2); overflow:hidden; }
.mm-card-thumb img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .25s ease;
}
.mm-card:hover .mm-card-thumb img { transform:scale(1.04); }
.mm-card-thumb .mm-play-btn {
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.42); opacity:0; transition:opacity .2s;
  font-size:1.3rem; color:#fff;
}
.mm-card:hover .mm-play-btn { opacity:1; }
.mm-card-body { padding:10px 12px 13px; background:var(--mm-surface); }
.mm-card-title { font-size:.85rem; font-weight:700; margin-bottom:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-card-sub   { font-size:.74rem; color:var(--mm-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ══════════════════════════════════════════════
   9. 아티스트 그리드 & 상세 소개
   ══════════════════════════════════════════════ */
.mm-artist-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); gap:14px; }
@media (min-width:480px) { .mm-artist-grid { grid-template-columns:repeat(auto-fill, minmax(140px,1fr)); } }
@media (min-width:768px)  { .mm-artist-grid { grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); } }

.mm-artist-toolbar {
  display:flex;
  gap:10px;
  margin-bottom:16px;
  flex-wrap:wrap;
}
.mm-artist-search {
  flex:1;
  min-width:220px;
  margin-bottom:0;
}
.mm-artist-placeholder {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:3rem;
  background:linear-gradient(135deg, var(--mm-surface2), var(--mm-bg));
}
.mm-detail-placeholder {
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:3.5rem;
  background:var(--mm-surface2);
}
.mm-artist-bio {
  margin-bottom:24px;
}
.mm-artist-bio-text {
  color:var(--mm-muted);
  font-size:.88rem;
  line-height:1.8;
}

/* 앨범 상세 보조 스타일 */
.mm-album-artist-link {
  color:var(--mm-primary2);
  font-weight:700;
}
.mm-album-artist-link:hover {
  text-decoration:underline;
}
.mm-album-desc {
  color:var(--mm-muted);
  font-size:.84rem;
  line-height:1.65;
  margin-bottom:14px;
}
.mm-track-plays {
  font-size:.76rem;
  color:var(--mm-muted);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  flex-shrink:0;
}
@media (max-width:599px) {
  .mm-track-plays { display:none; }
}

/* ══════════════════════════════════════════════
   10. 트랙 리스트
   ══════════════════════════════════════════════ */
.mm-track-list { display:flex; flex-direction:column; gap:4px; }
.mm-track-item {
  display:flex; align-items:center; gap:10px;
  padding:8px 10px; border-radius:10px;
  border:1px solid transparent;
  cursor:pointer; transition:background .15s, border-color .15s, transform .15s; min-width:0;
}
.mm-track-item:hover {
  background:var(--mm-bg);
  border-color:var(--mm-border);
}
.mm-track-item.playing {
  background:var(--mm-track-playing-bg);
  border-color:var(--mm-primary);
}
.mm-track-no {
  width:24px; text-align:center; font-size:.82rem; font-weight:700;
  color:var(--mm-muted); flex-shrink:0;
}
.mm-track-no.mm-rank-1 { color:#d97706; font-size:.95rem; }
.mm-track-no.mm-rank-2 { color:#64748b; font-size:.9rem; }
.mm-track-no.mm-rank-3 { color:#b45309; font-size:.88rem; }
.mm-track-thumb {
  width:42px; height:42px; border-radius:8px; object-fit:cover; flex-shrink:0;
  border:1px solid var(--mm-border);
}
.mm-track-info  { flex:1; min-width:0; }
.mm-track-title {
  font-size:.875rem; font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  display:flex; align-items:center; gap:5px;
}
.mm-track-artist { font-size:.75rem; color:var(--mm-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-track-dur    { font-size:.75rem; color:var(--mm-muted); flex-shrink:0; font-variant-numeric:tabular-nums; }
.mm-track-like {
  font-size:.9rem; color:var(--mm-muted); flex-shrink:0;
  padding:5px 8px; border-radius:8px; border:1px solid transparent; background:none;
  transition:color .15s, background .15s, border-color .15s;
}
.mm-track-like.liked { color:#e11d48; }
.mm-track-like:hover {
  background:var(--mm-surface2);
  border-color:var(--mm-border);
}

@media (max-width:479px) {
  .mm-track-item { padding:7px 6px; gap:8px; }
  .mm-track-no   { width:18px; font-size:.74rem; }
  .mm-track-dur  { display:none; }
}

/* ══════════════════════════════════════════════
   11. 버튼
   ══════════════════════════════════════════════ */
.mm-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:8px 16px; border-radius:8px;
  font-weight:600; font-size:.875rem;
  border:none; transition:all .2s; white-space:nowrap;
}
.mm-btn-primary { background:var(--mm-primary); color:#fff; }
.mm-btn-primary:hover { background:var(--mm-primary2); }
.mm-btn-ghost  { background:var(--mm-surface2); color:var(--mm-text); }
.mm-btn-ghost:hover { background:var(--mm-border); }
.mm-btn-danger { background:rgba(239,68,68,.15); color:#dc2626; }
.mm-btn-danger:hover { background:rgba(239,68,68,.26); }
.mm-btn-sm { padding:5px 12px; font-size:.78rem; }
.mm-btn-xs { padding:3px 8px;  font-size:.73rem; border-radius:6px; }

/* ══════════════════════════════════════════════
   12. 배지
   ══════════════════════════════════════════════ */
.mm-badge { display:inline-block; padding:2px 7px; border-radius:50px; font-size:.66rem; font-weight:700; }
.mm-badge-genre { background:rgba(124,58,237,.16); color:var(--mm-primary2); }
.mm-badge-title { background:rgba(239,68,68,.15);  color:#dc2626; }
.mm-badge-type  { background:rgba(16,185,129,.15); color:#059669; }

/* ══════════════════════════════════════════════
   13. 검색창 & 14. 입력 공통
   ══════════════════════════════════════════════ */
.mm-search-box { display:flex; gap:8px; margin-bottom:20px; flex-wrap:wrap; }
.mm-search-box input {
  flex:1; min-width:160px;
  background:var(--mm-surface); border:1px solid var(--mm-border);
  color:var(--mm-text); padding:9px 14px; border-radius:10px;
  font-family:inherit; font-size:.875rem;
}
.mm-search-box input:focus { outline:none; border-color:var(--mm-primary2); }

.mm-input {
  width:100%; background:var(--mm-surface); border:1.5px solid var(--mm-border);
  color:var(--mm-text); padding:9px 14px; border-radius:8px;
  font-family:inherit; font-size:.875rem; transition:border-color .15s;
}
.mm-input:focus { outline:none; border-color:var(--mm-primary2); }
textarea.mm-input { resize:vertical; }
.mm-select {
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' fill='none' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center; padding-right:32px;
}

/* ══════════════════════════════════════════════
   15. 빈 상태 & 16. 페이지네이션
   ══════════════════════════════════════════════ */
.mm-empty { text-align:center; color:var(--mm-muted); padding:32px 0; font-size:.875rem; }

.mm-pagination { display:flex; justify-content:center; margin-top:24px; }
.mm-pagination ul { display:flex; gap:4px; list-style:none; flex-wrap:wrap; justify-content:center; }
.mm-pagination li a,
.mm-pagination li.active {
  display:flex; align-items:center; justify-content:center;
  width:32px; height:32px; border-radius:8px;
  font-size:.82rem; font-weight:600; color:var(--mm-muted);
  background:var(--mm-surface); border:1px solid var(--mm-border);
}
.mm-pagination li.active { background:var(--mm-primary); color:#fff; border-color:var(--mm-primary); }
.mm-pagination li a:hover { background:var(--mm-surface2); }
.mm-pagination li.dots { display:flex; align-items:center; color:var(--mm-muted); padding:0 4px; }

/* ══════════════════════════════════════════════
   17. 상세 히어로 & 18. 하단 플레이어 바
   ══════════════════════════════════════════════ */
.mm-detail-hero {
  display:flex; gap:20px; align-items:flex-end; flex-wrap:wrap;
  padding:22px; border-radius:16px;
  background:var(--mm-hero-bg);
  border:1px solid var(--mm-border);
  box-shadow:0 6px 20px var(--mm-shadow);
  margin-bottom:24px;
}
.mm-detail-cover {
  width:120px; height:120px; flex-shrink:0;
  border-radius:12px; overflow:hidden;
  border:1px solid var(--mm-border);
  box-shadow:0 8px 24px var(--mm-shadow);
}
.mm-detail-cover img { width:100%; height:100%; object-fit:cover; }
.mm-detail-info { flex:1; min-width:180px; }
.mm-detail-info h1 { font-size:1.35rem; font-weight:800; margin-bottom:6px; }
.mm-detail-info .mm-meta { color:var(--mm-muted); font-size:.85rem; margin-bottom:14px; }
.mm-detail-actions { display:flex; gap:8px; flex-wrap:wrap; }
@media (min-width:768px) {
  .mm-detail-cover { width:176px; height:176px; }
  .mm-detail-info h1 { font-size:1.85rem; }
  .mm-detail-hero { padding:28px; gap:28px; }
}

.mm-player-bar {
  position:fixed; bottom:0; left:0; right:0; z-index:200;
  height:var(--mm-bar-h);
  background:var(--mm-bar-bg);
  border-top:1px solid var(--mm-border);
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  display:flex; align-items:center; gap:10px; padding:0 14px;
}
.mm-hidden { display:none !important; }
#mm-yt-wrap {
  position:absolute; top:-5px; left:-5px;
  width:1px; height:1px; overflow:hidden; opacity:0; pointer-events:none;
}
.mm-bar-cover { flex-shrink:0; position:relative; }
.mm-bar-cover img { width:42px; height:42px; border-radius:6px; object-fit:cover; }
.mm-bar-info   { min-width:0; flex:0 1 180px; }
.mm-bar-title  { font-size:.82rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-bar-artist { font-size:.7rem; color:var(--mm-muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-bar-controls { display:flex; gap:2px; flex-shrink:0; }
.mm-bar-controls button {
  background:none; border:none; color:var(--mm-text);
  font-size:1.15rem; padding:6px 8px; border-radius:6px;
}
.mm-bar-controls button:hover { background:var(--mm-surface2); }
.mm-bar-progress { flex:1; display:flex; align-items:center; gap:6px; min-width:0; }
.mm-bar-progress span { font-size:.68rem; color:var(--mm-muted); flex-shrink:0; width:30px; text-align:center; }
.mm-bar-progress input[type=range] { flex:1; accent-color:var(--mm-primary); height:4px; min-width:40px; }
.mm-bar-right { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.mm-bar-right button { background:none; border:none; color:var(--mm-muted); font-size:1rem; padding:4px 6px; border-radius:6px; }
.mm-bar-right button:hover { color:var(--mm-text); }
.mm-vol-wrap { display:flex; align-items:center; gap:4px; }
.mm-vol-wrap input[type=range] { width:70px; accent-color:var(--mm-primary); }
.mm-bar-video-badge {
  position:absolute; bottom:2px; right:2px;
  font-size:.58rem; background:rgba(0,0,0,.55);
  border-radius:3px; padding:1px 3px; line-height:1.4; pointer-events:none;
}
@media (max-width:599px) {
  .mm-player-bar { gap:6px; padding:0 8px; }
  .mm-bar-info   { flex:0 1 90px; }
  .mm-bar-progress span { display:none; }
  .mm-vol-wrap   { display:none; }
}
@media (max-width:479px) {
  .mm-bar-info { display:none; }
}

/* ══════════════════════════════════════════════
   19. 가사 패널
   ══════════════════════════════════════════════ */
.mm-lyrics-panel {
  position:fixed; right:12px; bottom:calc(var(--mm-bar-h) + 10px); z-index:201;
  width:min(320px, calc(100vw - 24px));
  max-height:min(420px, calc(100vh - var(--mm-bar-h) - 70px));
  background:var(--mm-surface); border:1px solid var(--mm-border);
  border-radius:14px; box-shadow:0 8px 32px rgba(0,0,0,.5);
  display:flex; flex-direction:column; overflow:hidden;
}
.mm-lyrics-inner { display:flex; flex-direction:column; height:100%; }
.mm-lyrics-inner h3 { padding:14px 16px 0; font-size:.875rem; font-weight:700; color:var(--mm-primary2); }
.mm-lyrics-close { position:absolute; top:10px; right:12px; background:none; border:none; color:var(--mm-muted); font-size:1rem; }
.mm-lyrics-body  { flex:1; overflow-y:auto; padding:12px 16px 16px; font-size:.82rem; line-height:1.9; color:var(--mm-muted); }

/* ══════════════════════════════════════════════
   20. 차트 테이블
   ══════════════════════════════════════════════ */
.mm-chart-switch {
  display:flex;
  gap:6px;
  align-items:center;
}
.mm-chart-wrap {
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.mm-chart-table {
  width:100%;
  border-collapse:separate;
  border-spacing:0 4px;
}
.mm-chart-table th {
  font-size:.78rem;
  color:var(--mm-muted);
  font-weight:700;
  padding:8px 10px;
  text-align:left;
  border-bottom:1px solid var(--mm-border);
  white-space:nowrap;
}
.mm-chart-row {
  cursor:pointer;
  transition:background .15s, transform .15s;
}
.mm-chart-row td {
  padding:9px 10px;
  background:var(--mm-bg);
  border-top:1px solid transparent;
  border-bottom:1px solid var(--mm-chart-row-border);
  vertical-align:middle;
}
.mm-chart-row td:first-child {
  border-top-left-radius:10px;
  border-bottom-left-radius:10px;
}
.mm-chart-row td:last-child {
  border-top-right-radius:10px;
  border-bottom-right-radius:10px;
}
.mm-chart-row:hover td {
  background:var(--mm-surface2);
  border-color:var(--mm-border);
}
.mm-chart-thumb {
  width:42px;
  height:42px;
  border-radius:8px;
  object-fit:cover;
  border:1px solid var(--mm-border);
}
.mm-chart-title-wrap {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:.88rem;
}
.mm-chart-artist {
  color:var(--mm-muted);
  font-size:.82rem;
}
.mm-chart-album {
  color:var(--mm-muted);
  font-size:.8rem;
}
.mm-chart-plays {
  color:var(--mm-primary2);
  font-size:.82rem;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.mm-chart-likes {
  color:#e11d48;
  font-size:.82rem;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.mm-chart-footer {
  margin-top:18px;
  display:flex;
  justify-content:flex-start;
  align-items:center;
  gap:10px;
}

.mm-rank-no {
  font-size:.92rem;
  font-weight:800;
  color:var(--mm-primary2);
  width:38px;
  text-align:center;
}
.mm-rank-1 { color:#d97706; font-size:1.05rem; }
.mm-rank-2 { color:#64748b; font-size:1rem; }
.mm-rank-3 { color:#b45309; font-size:.98rem; }

@media (max-width:599px) {
  .mm-chart-hide-mobile { display:none; }
  .mm-chart-table td, .mm-chart-table th { padding:8px 6px; }
  .mm-chart-thumb { width:36px; height:36px; }
}

/* ══════════════════════════════════════════════
   21. 플레이리스트 / 22. 알림 / 23. 유틸리티
   ══════════════════════════════════════════════ */
.mm-pl-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px,1fr)); gap:14px; }
@media (min-width:480px) { .mm-pl-grid { grid-template-columns:repeat(auto-fill, minmax(160px,1fr)); } }
.mm-pl-card { background:var(--mm-surface); border:1px solid var(--mm-border); border-radius:12px; overflow:hidden; cursor:pointer; transition:transform .2s; }
.mm-pl-card:hover { transform:translateY(-2px); }
.mm-pl-cover { aspect-ratio:1; background:var(--mm-surface2); display:flex; align-items:center; justify-content:center; font-size:2.5rem; }
.mm-pl-cover img { width:100%; height:100%; object-fit:cover; }
.mm-pl-body { padding:10px 12px; }
.mm-pl-name { font-size:.875rem; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-pl-meta { font-size:.72rem; color:var(--mm-muted); }

/* 마이뮤직 플레이리스트 레이아웃 (사이드바 + 선택된 곡 목록) */
.mm-pl-layout {
  display:grid;
  grid-template-columns:minmax(260px, 340px) 1fr;
  gap:20px;
  align-items:start;
}
@media (max-width:820px) {
  .mm-pl-layout { grid-template-columns:1fr; gap:18px; }
}
.mm-pl-sidebar {
  display:flex;
  flex-direction:column;
  gap:8px;
  background:var(--mm-surface);
  border:1px solid var(--mm-border);
  border-radius:14px;
  padding:12px;
  box-shadow:0 4px 16px var(--mm-shadow);
}
.mm-pl-item {
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:10px;
  background:var(--mm-bg);
  border:1px solid transparent;
  transition:background .15s, border-color .15s, transform .15s;
  min-width:0;
}
.mm-pl-item:hover {
  background:var(--mm-surface2);
  border-color:var(--mm-border);
}
.mm-pl-item.active {
  background:var(--mm-track-playing-bg);
  border-color:var(--mm-primary);
}
.mm-pl-item-icon {
  font-size:1.25rem;
  flex-shrink:0;
}
.mm-pl-item-info {
  flex:1;
  min-width:0;
}
.mm-pl-item-name {
  font-size:.88rem;
  font-weight:700;
  color:var(--mm-text);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.mm-pl-item-meta {
  font-size:.74rem;
  color:var(--mm-muted);
  margin-top:2px;
}
.mm-pl-tracks {
  background:var(--mm-surface);
  border:1px solid var(--mm-border);
  border-radius:14px;
  padding:16px;
  box-shadow:0 4px 16px var(--mm-shadow);
}

.mm-alert { padding:12px 16px; border-radius:10px; font-size:.875rem; font-weight:600; }
.mm-alert-ok  { background:rgba(16,185,129,.15); color:#059669; border:1px solid rgba(16,185,129,.35); }
.mm-alert-err { background:rgba(239,68,68,.15);  color:#dc2626; border:1px solid rgba(239,68,68,.35); }

.mm-flex-row { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.mm-mt-8  { margin-top:8px;  }
.mm-mt-16 { margin-top:16px; }
.mm-mt-24 { margin-top:24px; }
.mm-mt-32 { margin-top:32px; }
