@charset "utf-8";

/* ==========================================================================
   milim_cassette v6 — 사이드바(라이브러리/플레이어 토글) + 히어로 플레이어
   - carousel3d / archive 스킨과 동일한 글래스 톤 사용
   - 한 페이지에 꽉 차는 앱 셸 형태
   ========================================================================== */

.mlc-app-wrap {
  --mlc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mlc-glass: #ffffff38;
  --mlc-glass-strong: #ffffff80;
  --mlc-radius: 28px;

  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
  box-sizing: border-box;
  font-family: 'Pretendard', var(--content-font-family, sans-serif);
  color: var(--content-font-color, #222);
  isolation: isolate;
}

/* 셸: 배경/테두리 없는 투명 컨테이너. 사이드바·히어로를 별도 카드로 분리 */
.mlc-shell {
  position: relative;
  display: flex;
  gap: clamp(12px, 1.4vw, 18px);
  /* 세로로 긴 화면에서도 안전: 고정 높이 대신 뷰포트 기준 상한만 둠 */
  min-height: 560px;
  max-height: none;
}

/* 사이드바·히어로 공용 카드 스타일 */
.mlc-sidebar,
.mlc-hero {
  border-radius: var(--mlc-radius);
  background: var(--mlc-glass-strong, #ffffff80);   /* 테마와 무관한 고정 유리 배경 */
  border: 1px solid var(--card-border-color, #cbd5e1);   /* 고정 테두리 (변하지 않음) */
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* --------------------------------------------------------------------------
   사이드바 (좌)
   -------------------------------------------------------------------------- */
.mlc-sidebar {
  position: relative;   /* 관리자/추가 버튼(absolute)의 기준 — 가로 화면에서도 정위치 */
  width: 328px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(18px, 2.5vw, 26px) 16px;
  overflow: hidden;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;   /* flex 자식 스크롤 허용 */
}

.mlc-sidebar-head { display: flex; flex-direction: column; gap: 12px; }

.mlc-board-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--title-font-family, inherit);
  font-size: 16px;
  font-weight: 700;
  color: var(--title-font-color, inherit);
  word-break: keep-all;
}

.mlc-board-title i { color: var(--accent-color, #64748b); transition: color 0.45s var(--mlc-ease); }

.mlc-shell.has-theme .mlc-board-title { color: var(--tape-p1, inherit); transition: color 0.45s var(--mlc-ease); }

/* 제목 + 관리자/추가 버튼을 한 줄에 두어 게시판 제목과 수직 중앙 정렬 */
.mlc-sidebar-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mlc-sidebar-tools {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* 토글 (Library / Player) — 슬라이딩 필 방식 */
.mlc-tabs {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgb(from var(--content-font-color, #444) r g b / 8%);
}

/* 활성 탭을 따라 미끄러지는 필 */
.mlc-tabs::before {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--mlc-glass-strong, #ffffff80);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: translateX(0);
  transition: transform 0.34s var(--mlc-ease), background 0.45s var(--mlc-ease), box-shadow 0.25s;
  z-index: 0;
}

.mlc-tabs.is-player::before { transform: translateX(calc(100% + 2px)); }

.mlc-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 60%));
  cursor: pointer;
  transition: color 0.25s;
}

.mlc-tab.is-active { color: var(--content-font-color, #222); }

.mlc-shell.has-theme .mlc-tabs::before {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgb(from var(--tape-p1, #64748b) r g b / 35%);
}

.mlc-shell.has-theme .mlc-tab.is-active { color: var(--tape-p1, #222); }
.mlc-shell.has-theme .mlc-tab { color: rgb(from var(--tape-p1, #64748b) r g b / 62%); }

.mlc-shell.has-theme .mlc-board-title i { color: var(--tape-p1, #64748b); }

.mlc-tab:disabled { opacity: 0.35; cursor: not-allowed; }

.mlc-cate { margin-top: 2px; }

/* 아이콘 버튼 */
/* 아이콘 버튼(수정·삭제·관리자·추가) — 테두리·배경 없이 아이콘만.
   기본은 연하게(opacity), 호버 시 선명해짐. 크기·색 모두 통일(테마색). */
.mlc-ibtn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--tape-p1, #64748b);   /* 아이콘 = 테마색 (미선택 시 사이트 accent 대신 중립 회색) */
  background: none;                                       /* 배경 없음 */
  border: 0;                                              /* 테두리 없음 */
  text-decoration: none;
  cursor: pointer;
  opacity: 0.5;                                           /* 기본은 연하게 */
  transition: opacity 0.25s var(--mlc-ease), transform 0.2s var(--mlc-ease), color 0.45s var(--mlc-ease);
}

/* 호버 시: 색(hue)은 그대로 두고 불투명해지기만 함.
   (color 를 명시하지 않으면 그누보드 사이트의 a:hover 색이 끼어듦 — <a> 버튼이라 발생) */
.mlc-ibtn:hover,
.mlc-ibtn:focus-visible {
  color: var(--tape-p1, #64748b);
  opacity: 1;
  outline: none;
}

.mlc-ibtn:hover { transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   사이드바 본문 (라이브러리 / 트랙 패널 — 겹쳐서 크로스페이드)
   -------------------------------------------------------------------------- */
.mlc-sidebar-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.mlc-panel-list {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;   /* 확대 애니메이션이 가로 스크롤바를 만들지 않도록 */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--mlc-ease);
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color, #64748b) transparent;
}

.mlc-panel-list::-webkit-scrollbar { width: 5px; }
.mlc-panel-list::-webkit-scrollbar-thumb {
  background: rgb(from var(--accent-color, #64748b) r g b / 50%);
  border-radius: 3px;
}

.mlc-panel-list.is-active { opacity: 1; pointer-events: auto; }

.mlc-list-empty {
  text-align: center;
  margin-top: 40px;
  padding: 24px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
  border: 1px dashed var(--card-border-color, #cbd5e1);
  border-radius: 14px;
}

.mlc-rows { display: flex; flex-direction: column; gap: 6px; padding: 3px 5px; }

.mlc-paging { margin-top: 14px; text-align: center; }
.mlc-paging .pg { display: inline-flex; gap: 4px; }

/* --------------------------------------------------------------------------
   라이브러리 행 (컴팩트)
   -------------------------------------------------------------------------- */
.mlc-row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s, transform 0.15s var(--mlc-ease);
}

/* 밀리지 않고 제자리에서 아주 약간만 확대 (가로 스크롤바 방지) */
.mlc-row-item:hover {
  background: rgb(from var(--tape-main, #64748b) r g b / 14%);
  transform: scale(1.02);
  opacity: 1;   /* 연하게 처리된 항목도 호버 시 선명 */
}

/* 현재 선택된 테이프: 배경 강조 + 살짝 확대 */
.mlc-row-item.is-selected {
  background: rgb(from var(--tape-p1, #64748b) r g b / 24%);
  border-color: rgb(from var(--tape-p1, #64748b) r g b / 42%);
  transform: scale(1.02);
}

.mlc-row-item.is-selected .mlc-row-title { font-weight: 800; }   /* 선택된 글자만 진하게 */

/* 선택된 테이프가 있을 때: 선택되지 않은 행은 연하게 */
.mlc-shell.has-theme .mlc-row-item:not(.is-selected) { opacity: 0.5; }

.mlc-row-swatch {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--tape-p1, #5b8dbf), var(--tape-p3, #2c5d8f));
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.mlc-row-swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--tape-p2, #f5f0e6);
  box-shadow: 0 0 0 3px rgb(from var(--tape-p2, #f5f0e6) r g b / 25%);
}

.mlc-row-item.is-playing .mlc-row-swatch-dot { animation: mlc-swatch-pulse 1.4s ease-in-out infinite; }

@keyframes mlc-swatch-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.7); opacity: 0.6; }
}

.mlc-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mlc-row-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--content-font-color, #222);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mlc-row-artist {
  font-size: 11.5px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mlc-row-count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--tape-p1, #64748b);
  min-width: 18px;
  text-align: right;
}

.mlc-row-item.is-empty .mlc-row-count { color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 45%)); }
.mlc-row-item.is-empty .mlc-row-swatch { opacity: 0.5; filter: grayscale(0.5); }

/* 테이프 재생/선택 중(has-theme): 라이브러리·트랙 텍스트도 테마색을 따름 */
.mlc-shell.has-theme .mlc-row-title,
.mlc-shell.has-theme .mlc-track-title { color: var(--tape-p1, #222); transition: color 0.45s var(--mlc-ease); }

/* 아티스트(부제) 글자도 테마색을 따름 — 살짝 옅게 */
.mlc-shell.has-theme .mlc-row-artist,
.mlc-shell.has-theme .mlc-track-artist { color: rgb(from var(--tape-p1, #64748b) r g b / 60%); transition: color 0.45s var(--mlc-ease); }

/* --------------------------------------------------------------------------
   트랙(수록곡) 리스트 — 사이드바 내부
   -------------------------------------------------------------------------- */
.mlc-tracklist {
  list-style: none;
  margin: 0;
  padding: 3px 5px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mlc-track {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgb(from var(--tape-main, #5b8dbf) r g b / 10%);
  border: 1px solid rgb(from var(--tape-p1, #64748b) r g b / 22%);
  cursor: pointer;
  transition: transform 0.2s var(--mlc-ease), background 0.25s, border-color 0.25s, opacity 0.2s;
}

.mlc-track:hover { transform: scale(1.02); border-color: rgb(from var(--tape-p1, #64748b) r g b / 55%); opacity: 1; }

/* 재생 중인 곡이 아닌 수록곡은 연하게 */
.mlc-track:not(.is-active) { opacity: 0.5; }

.mlc-track-num {
  flex: 0 0 20px;
  text-align: center;
  font-size: 11.5px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 50%));
  font-variant-numeric: tabular-nums;
}

.mlc-track-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.mlc-track-title {
  font-size: 12.5px;
  color: var(--content-font-color, #333);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mlc-track-artist {
  font-size: 10.5px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mlc-track.is-active {
  background: rgb(from var(--tape-p1, #64748b) r g b / 24%);
  border-color: rgb(from var(--tape-p1, #64748b) r g b / 42%);
  transform: scale(1.02);
}

.mlc-track.is-active .mlc-track-title { font-weight: 800; }

.mlc-track-empty {
  text-align: center;
  font-size: 12px;
  padding: 20px 10px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 50%));
}

.mlc-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  flex: 0 0 14px;
}

.mlc-track.is-active.is-playing .mlc-eq { display: flex; }
.mlc-track.is-active.is-playing .mlc-track-num { display: none; }

.mlc-eq span {
  width: 3px;
  background: var(--tape-p1, #64748b);
  border-radius: 2px;
  animation: mlc-eq 0.9s ease-in-out infinite;
}

.mlc-eq span:nth-child(1) { height: 40%; animation-delay: 0s; }
.mlc-eq span:nth-child(2) { height: 90%; animation-delay: 0.2s; }
.mlc-eq span:nth-child(3) { height: 60%; animation-delay: 0.4s; }

@keyframes mlc-eq {
  0%, 100% { transform: scaleY(0.5); }
  50%      { transform: scaleY(1); }
}

/* --------------------------------------------------------------------------
   히어로 (우) — 카세트 테이프 + 컨트롤
   -------------------------------------------------------------------------- */
.mlc-hero {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 36px);
  overflow-y: auto;   /* 세로가 짧을 때 히어로 내부에서 스크롤 */
  box-sizing: border-box;
}

/* ===== 카세트 테이프 (히어로 / 스켈레톤 / 글쓰기 미리보기 공용) ===== */
.mlc-tape {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 8 / 5;          /* 실제 카세트에 가까운 비율 */
  display: flex;
  flex-direction: column;
  gap: 4%;
  border-radius: 16px;
  box-sizing: border-box;
  padding: 5.5%;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02) 55%),
    rgb(from var(--tape-main, #94a3b8) r g b / 80%);
  border: 1px solid rgb(from var(--tape-main, #94a3b8) r g b / 55%);   /* 테두리는 몸체(main) 색 */
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.5s var(--mlc-ease), border-color 0.5s var(--mlc-ease);
}

/* 히어로 카세트: 호버 시 살짝 확대 + 라벨 위로 빛이 흐르는 샤인 */
.mlc-hero-frame {
  transition: background 0.5s var(--mlc-ease), border-color 0.5s var(--mlc-ease),
              transform 0.32s var(--mlc-ease), box-shadow 0.32s var(--mlc-ease);
}

.mlc-hero-frame:hover {
  transform: scale(1.06);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.26);
}

.mlc-tape.is-pulsing { animation: mlc-tape-pulse 0.5s var(--mlc-ease); }

@keyframes mlc-tape-pulse {
  0%   { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
  40%  { box-shadow: 0 0 0 6px rgb(from var(--tape-p1, #64748b) r g b / 30%), 0 10px 26px rgba(0, 0, 0, 0.18); }
  100% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18); }
}

/* 나사 (래퍼를 절대배치해 flex 레이아웃에서 분리) */
.mlc-tape-screws {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.mlc-tape-screws span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.32);
  z-index: 2;
}

.mlc-tape-screws span:nth-child(1) { top: 10px; left: 10px; }
.mlc-tape-screws span:nth-child(2) { top: 10px; right: 10px; }
.mlc-tape-screws span:nth-child(3) { bottom: 10px; left: 10px; }
.mlc-tape-screws span:nth-child(4) { bottom: 10px; right: 10px; }

/* 라벨지 — 상단 양쪽 귀퉁이가 잘린 카세트 라벨 모양 */
.mlc-tape-label {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: rgb(from var(--tape-p2, #f1f5f9) r g b / 92%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.07);
  padding: 5% 7%;
  box-sizing: border-box;
  overflow: hidden;
  clip-path: polygon(8% 0%, 92% 0%, 100% 8%, 100% 100%, 0% 100%, 0% 8%);
  transition: background 0.5s var(--mlc-ease);
}

/* 샤인 띠: 기본은 숨김, 히어로 호버 시 라벨을 가로질러 위로 흘러감 */
.mlc-tape-label::after {
  content: '';
  position: absolute;
  inset: -40% -25%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(202deg, transparent 42%, rgba(255, 255, 255, 0.5) 50%, transparent 58%);
  transform: translateY(60%);
}

.mlc-hero-frame:hover .mlc-tape-label::after { animation: mlc-shine 0.85s ease-out; }

@keyframes mlc-shine {
  0%   { transform: translateY(60%);  opacity: 0; }
  18%  { opacity: 1; }
  100% { transform: translateY(-60%); opacity: 0; }
}

/* 카세트 하단 사다리꼴 데크 (레코드 탭 홀) */
.mlc-tape-deck {
  flex-shrink: 0;
  height: 11%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15%;
  box-sizing: border-box;
  clip-path: polygon(18% 0%, 82% 0%, 94% 100%, 6% 100%);
  background: rgb(from var(--tape-p1, #64748b) r g b / 22%);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.22);
  transition: background 0.5s var(--mlc-ease);
}

.mlc-deck-hole {
  width: 11%;
  aspect-ratio: 1 / 1;
  background: rgb(from var(--tape-text, #2b2b2b) r g b / 40%);
}

.mlc-deck-hole.is-round { border-radius: 50%; }
.mlc-deck-hole.is-square { border-radius: 2px; }

.mlc-tape--skel .mlc-tape-deck { background: rgb(from var(--content-font-color, #666) r g b / 8%); }
.mlc-tape--skel .mlc-deck-hole { background: rgb(from var(--content-font-color, #666) r g b / 22%); }

.mlc-tape-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 0;
  text-align: center;
}

.mlc-tape-title {
  max-width: 100%;
  font-family: var(--title-font-family, inherit);
  font-size: clamp(14px, 1.6vw, 18px);
  font-weight: 700;
  color: var(--tape-text, #2b2b2b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mlc-tape-artist {
  max-width: 100%;
  font-size: clamp(9px, 1vw, 11px);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(from var(--tape-text, #2b2b2b) r g b / 55%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mlc-tape-tick {
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: var(--tape-p1, #64748b);
  margin: 6px auto 0;
  flex-shrink: 0;
}

/* 릴 창 — 뒤로 줄무늬 그라디언트(포인트1→포인트3 3단 블렌딩)가 비쳐 보임 */
.mlc-tape-mid {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4% 0 3%;
  isolation: isolate;
}

.mlc-tape-mid::before {
  content: '';
  position: absolute;
  left: -7%;
  right: -7%;
  top: 50%;
  height: 74%;
  transform: translateY(-50%);
  z-index: 0;
  opacity: 0.9;
  transition: background 0.5s var(--mlc-ease);
  background: linear-gradient(
    180deg,
    var(--tape-p1, #5b8dbf) 0%, var(--tape-p1, #5b8dbf) 33.33%,
    color-mix(in srgb, var(--tape-p1, #5b8dbf) 50%, var(--tape-p3, #2c5d8f) 50%) 33.33%,
    color-mix(in srgb, var(--tape-p1, #5b8dbf) 50%, var(--tape-p3, #2c5d8f) 50%) 66.66%,
    var(--tape-p3, #2c5d8f) 66.66%, var(--tape-p3, #2c5d8f) 100%
  );
}

.mlc-tape-window {
  position: relative;
  z-index: 1;
  width: 84%;
  height: 100%;
  background: rgba(12, 12, 16, 0.32);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  box-sizing: border-box;
  box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* 릴 — 감긴 테이프 분량(콘 그라디언트) + 은색 플랜지, 가운데가 뚫려 테이프가 보이는 창 */
.reel {
  --reel-fill: 140deg;
  height: 82%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: conic-gradient(
    var(--tape-p1, #64748b) 0deg, var(--tape-p1, #64748b) var(--reel-fill),
    rgb(from var(--tape-p2, #fff) r g b / 88%) var(--reel-fill), rgb(from var(--tape-p2, #fff) r g b / 88%) 360deg
  );
  border: 2.5px solid rgb(from var(--tape-p2, #fff) r g b / 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  animation: mlc-spin 6.5s linear infinite;
  animation-play-state: paused;
  box-shadow: 0 0 0 3px rgb(from var(--tape-text, #2b2b2b) r g b / 14%);
}

.mlc-tape-window .reel:first-child { --reel-fill: 110deg; }
.mlc-tape-window .reel:last-child  { --reel-fill: 235deg; }

/* 릴 허브: 중심 캡 + 스프로킷 홀 6개 */
.reel-hub {
  position: relative;
  width: 38%;
  height: 38%;
  border-radius: 50%;
  background: var(--tape-p2, #fff);
  box-shadow: inset 0 0 0 1.5px rgb(from var(--tape-text, #2b2b2b) r g b / 22%);
}

.reel-hub::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.5;
  background:
    radial-gradient(circle at 50% 15%, var(--tape-text, #2b2b2b) 0 8%, transparent 8.5%),
    radial-gradient(circle at 80% 32%, var(--tape-text, #2b2b2b) 0 8%, transparent 8.5%),
    radial-gradient(circle at 80% 68%, var(--tape-text, #2b2b2b) 0 8%, transparent 8.5%),
    radial-gradient(circle at 50% 85%, var(--tape-text, #2b2b2b) 0 8%, transparent 8.5%),
    radial-gradient(circle at 20% 68%, var(--tape-text, #2b2b2b) 0 8%, transparent 8.5%),
    radial-gradient(circle at 20% 32%, var(--tape-text, #2b2b2b) 0 8%, transparent 8.5%);
}

.mlc-tape-strip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44%;
  height: 2px;
  background: rgb(from var(--tape-p2, #fff) r g b / 55%);
  transform: translate(-50%, -50%);
  z-index: 1;
}

/* 재생 중에만 릴 회전 */
.mlc-tape.is-playing .reel { animation-play-state: running; }

@keyframes mlc-spin { to { transform: rotate(360deg); } }

/* 하단: STEREO + 곡 수 */
.mlc-tape-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.mlc-tape-stereo {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: rgb(from var(--tape-text, #2b2b2b) r g b / 38%);
  white-space: nowrap;
}

.mlc-tape-count {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--tape-p2, #fff);
  background: var(--tape-p1, #64748b);
}

/* 정지(X) 버튼 — 테이프 우상단, 호버 시 노출 */
.mlc-hero-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgb(from var(--tape-p1, #64748b) r g b / 45%);
  background: var(--tape-p2, #fff);
  color: var(--tape-p1, #64748b);
  font-size: 13px;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  transition: opacity 0.22s var(--mlc-ease), transform 0.22s var(--mlc-ease), background 0.2s, color 0.2s;
}

.mlc-hero-frame:hover .mlc-hero-close,
.mlc-hero-close:focus-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.mlc-hero-close:hover {
  background: var(--error-color, #d32f2f);
  color: #fff;
  border-color: var(--error-color, #d32f2f);
}

/* 자동재생 차단 오버레이 */
.mlc-tap-overlay {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  z-index: 6;
}

.mlc-hero-frame.needs-tap .mlc-tap-overlay { display: flex; }

/* ===== 스켈레톤 ===== */
.mlc-hero-skeleton {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 1;
  transition: opacity 0.35s var(--mlc-ease);
}

.mlc-hero-skeleton.is-gone { opacity: 0; position: absolute; pointer-events: none; }

.mlc-tape--skel {
  border-style: dashed;
  box-shadow: none;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02) 55%),
    rgb(from var(--content-font-color, #666) r g b / 7%);
  border-color: var(--card-border-color, #cbd5e1);
}

.mlc-tape--skel .mlc-tape-label {
  background: rgb(from var(--content-font-color, #666) r g b / 6%);
  box-shadow: none;
}

.mlc-tape--skel .reel {
  background: rgb(from var(--content-font-color, #666) r g b / 14%);
  border-color: rgb(from var(--content-font-color, #666) r g b / 22%);
  box-shadow: none;
  animation: mlc-spin 16s linear infinite;   /* 아주 느리게 도는 대기 상태 */
  animation-play-state: running;
}

.mlc-tape--skel .reel-hub { background: rgb(from var(--content-font-color, #666) r g b / 22%); }
.mlc-tape--skel .reel-hub::before { background: none; }
.mlc-tape--skel .mlc-tape-strip { background: rgb(from var(--content-font-color, #666) r g b / 18%); }
.mlc-tape--skel .mlc-tape-tick { background: rgb(from var(--content-font-color, #666) r g b / 20%); }
.mlc-tape--skel .mlc-tape-stereo { color: rgb(from var(--content-font-color, #666) r g b / 25%); }
.mlc-tape--skel .mlc-tape-window { background: rgb(from var(--content-font-color, #666) r g b / 10%); box-shadow: none; }
.mlc-tape--skel .mlc-tape-mid::before { background: rgb(from var(--content-font-color, #666) r g b / 8%); }

.mlc-skel {
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgb(from var(--content-font-color, #666) r g b / 10%) 25%,
    rgb(from var(--content-font-color, #666) r g b / 20%) 50%,
    rgb(from var(--content-font-color, #666) r g b / 10%) 75%
  );
  background-size: 200% 100%;
  animation: mlc-shimmer 1.6s ease infinite;
}

@keyframes mlc-shimmer { to { background-position: -200% 0; } }

.mlc-skel-title  { width: 52%; height: 13px; }
.mlc-skel-artist { width: 30%; height: 9px; margin-top: 4px; }
.mlc-skel-count  { width: 34px; height: 14px; }

.mlc-skel-hint {
  margin: 0;
  font-size: 13px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
  text-align: center;
}

/* ===== 히어로 재생 콘텐츠 ===== */
.mlc-hero-content {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.4s var(--mlc-ease), transform 0.4s var(--mlc-ease);
}

.mlc-hero-content.is-visible { opacity: 1; transform: none; }
.mlc-hero-content[hidden] { display: none; }

.mlc-hero-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mlc-hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--tape-p2, #fff);
  background: var(--tape-p1, #64748b);
  transition: background 0.45s var(--mlc-ease), color 0.45s var(--mlc-ease);
}

.mlc-hero-tools { display: inline-flex; gap: 6px; }

/* Now playing 텍스트 */
.mlc-now-playing {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
}

.mlc-now-playing strong {
  font-size: 17px;
  font-weight: 700;
  color: var(--content-font-color, #222);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: block;
  transition: color 0.45s var(--mlc-ease);
}

.mlc-now-playing span {
  font-size: 13px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
  transition: color 0.45s var(--mlc-ease);
}

/* 재생 중: 히어로 곡 제목/아티스트도 테마색 */
.mlc-shell.has-theme .mlc-now-playing strong { color: var(--tape-p1, #222); }
.mlc-shell.has-theme .mlc-now-playing span { color: rgb(from var(--tape-p1, #64748b) r g b / 65%); }

/* 트랙/사운드바 색 전환도 배경 전환과 함께 부드럽게 */
.mlc-soundbar span,
.mlc-eq span,
.mlc-track,
.mlc-row-item { transition-property: transform, background, border-color, color, opacity; }

/* --------------------------------------------------------------------------
   사운드바 (장식용 재생 시각화 — 실시간 오디오 데이터 접근 불가로 CSS 애니메이션)
   -------------------------------------------------------------------------- */
.mlc-soundbar {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 6px;
  box-sizing: border-box;
}

.mlc-soundbar span {
  flex: 1;
  max-width: 5px;
  height: 14%;
  border-radius: 3px;
  background: var(--tape-p1, #64748b);
  opacity: 0.35;
  transition: opacity 0.3s;
  animation: mlc-bar var(--dur, 0.8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  animation-play-state: paused;
}

.mlc-soundbar.is-playing span { opacity: 0.95; animation-play-state: running; }

@keyframes mlc-bar {
  0%, 100% { height: 12%; }
  50%      { height: var(--peak, 70%); }
}

/* --------------------------------------------------------------------------
   히어로 하단: 진행바 / 컨트롤 / 볼륨
   -------------------------------------------------------------------------- */
.mlc-hero-bottom { width: 100%; display: flex; flex-direction: column; gap: 12px; }

.mlc-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
  font-variant-numeric: tabular-nums;
}

.mlc-progress-bar {
  flex: 1;
  height: 6px;
  background: rgb(from var(--tape-p1, #64748b) r g b / 18%);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}

.mlc-progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  background: var(--tape-p1, #64748b);
  border-radius: 4px;
  transition: background 0.45s var(--mlc-ease);
}

/* 3열 그리드: [셔플=좌] [이전·재생·다음=정중앙] [반복·볼륨=우] */
.mlc-controls-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.mlc-controls-row > .mlc-ctl--mode { justify-self: start; }   /* 셔플 = 좌측 */

/* 이전·재생·다음 = 가운데 그룹 */
.mlc-transport { justify-self: center; display: inline-flex; align-items: center; gap: 10px; }

/* 반복 + 볼륨 = 우측 그룹 */
.mlc-right-group { justify-self: end; position: relative; display: inline-flex; align-items: center; gap: 6px; }

.mlc-ctl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgb(from var(--tape-main, #64748b) r g b / 20%);
  border: 1px solid rgb(from var(--tape-p1, #64748b) r g b / 45%);
  color: var(--tape-p1, #64748b);   /* 아이콘 색도 테마를 따름 */
  cursor: pointer;
  position: relative;
  transition: transform 0.2s var(--mlc-ease), box-shadow 0.2s,
              background 0.45s var(--mlc-ease), border-color 0.45s var(--mlc-ease), color 0.45s var(--mlc-ease);
}

.mlc-ctl:hover {
  transform: translateY(-1px);
  background: rgb(from var(--tape-p1, #64748b) r g b / 22%);
  box-shadow: 0 0 10px rgb(from var(--tape-p1, #64748b) r g b / 30%);
}

.mlc-ctl--play {
  width: 50px;
  height: 50px;
  background: var(--tape-p1, var(--btn-primary-bg, #64748b));
  color: var(--tape-p2, var(--btn-primary-text, #fff));
  border: 0;
  font-size: 16px;
}


/* 셔플·반복·볼륨 = 아이콘만 (테두리·배경 없음). 기본은 연하게, 활성 시 진하게 */
.mlc-ctl--mode {
  width: 34px;
  height: 34px;
  font-size: 15px;
  background: none;
  border: 0;
  color: var(--tape-p1, #64748b);
  opacity: 0.4;
  transition: opacity 0.25s var(--mlc-ease), transform 0.2s var(--mlc-ease), color 0.45s var(--mlc-ease);
}

.mlc-ctl--mode:hover { opacity: 0.75; transform: translateY(-1px); background: none; box-shadow: none; }

.mlc-ctl--mode.is-on { opacity: 1; }      /* 셔플/반복 선택 상태: 진하게 */
.mlc-ctl--mode.is-muted { opacity: 0.4; } /* 반복 없음: 다시 연하게 */

/* 볼륨 버튼은 토글이 아니므로 항상 어느 정도 보이게, 열림/호버 시 선명 */
.mlc-vol-btn { opacity: 0.65; }
.mlc-volume.is-open .mlc-vol-btn { opacity: 1; }

.mlc-repeat-one {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 700;
  border-radius: 50%;
  background: var(--tape-p1, #64748b);
  color: var(--tape-p2, #fff);
}

/* 볼륨: 버튼 클릭 시 위로 뜨는 세로 드래그 바 (3초 무조작 시 닫힘) */
.mlc-volume { position: relative; display: inline-flex; }

.mlc-vol-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  transform-origin: bottom center;
  opacity: 0;
  pointer-events: none;
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--mlc-glass-strong, #ffffff80);
  border: 1px solid var(--card-border-color, #cbd5e1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s var(--mlc-ease), transform 0.2s var(--mlc-ease);
  z-index: 30;
}

.mlc-volume.is-open .mlc-vol-pop {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  pointer-events: auto;
}

.mlc-vol-pop input[type="range"] {
  -webkit-appearance: slider-vertical;   /* 구형 웹킷 */
  appearance: slider-vertical;
  writing-mode: vertical-lr;              /* 최신 표준 */
  direction: rtl;                         /* 위=최대, 아래=최소 */
  width: 8px;
  height: 100px;
  margin: 0;
  accent-color: var(--tape-p1, #64748b);
  cursor: pointer;
}

.mlc-empty-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--content-font-color, #333);
  border: 1px dashed rgb(from var(--tape-p1, #64748b) r g b / 40%);
  border-radius: 14px;
  padding: 22px 14px;
  width: 100%;
  box-sizing: border-box;
}

.mlc-empty-msg small {
  font-weight: 400;
  font-size: 11px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
}

.mlc-hero.is-empty .mlc-empty-msg { display: flex; }
.mlc-hero.is-empty .mlc-hero-bottom,
.mlc-hero.is-empty .mlc-soundbar,
.mlc-hero.is-empty .mlc-now-playing { display: none; }

/* --------------------------------------------------------------------------
   플라이 애니메이션 클론
   -------------------------------------------------------------------------- */
.mlc-fly-swatch {
  position: fixed;
  z-index: 999;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--tape-main, #5b8dbf), var(--tape-p1, #2c5d8f));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  transition: transform 0.55s var(--mlc-ease), opacity 0.55s var(--mlc-ease), border-radius 0.55s var(--mlc-ease);
  transform-origin: top left;
}

/* --------------------------------------------------------------------------
   그래디언트 배경 — 재생 시 뚜렷하게
   -------------------------------------------------------------------------- */
.mlc-gradient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s var(--mlc-ease, ease);
  background: linear-gradient(
    118deg,
    var(--tape-main, #5b8dbf) 0%,
    var(--tape-p1, #2c5d8f) 32%,
    var(--tape-p2, #f5f0e6) 62%,
    var(--tape-main, #5b8dbf) 100%
  );
  background-size: 260% 260%;
  animation: mlc-gradient-move 14s ease infinite;
}

.mlc-gradient-bg.is-on { opacity: 0.72; }

.mlc-gradient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(34px);
}

@keyframes mlc-gradient-move {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 유튜브 iframe 숨김 */
.mlc-yt-holder {
  position: fixed;
  left: -9999px;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   글쓰기
   ========================================================================== */
.mlc-write { max-width: 820px; margin: 0 auto; }

.mlc-write .mlc-header { text-align: center; margin-bottom: clamp(16px, 3vw, 28px); }

.mlc-write .mlc-header h2 {
  margin: 0;
  font-family: var(--title-font-family, inherit);
  font-size: clamp(22pt, 4vw, 30pt);
  font-weight: 700;
  color: var(--title-font-color, inherit);
}

.mlc-panel {
  background: var(--mlc-glass-strong, #ffffff80);
  border: 1px solid var(--card-border-color, #cbd5e1);
  border-radius: var(--mlc-radius, 24px);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 16px;
  box-sizing: border-box;
}

.mlc-panel > h3 {
  margin: 0 0 16px;
  font-family: var(--title-font-family, inherit);
  font-size: 15px;
  font-weight: 700;
  color: var(--title-font-color, inherit);
}

.mlc-panel > h3 .mlc-optional {
  font-weight: 400;
  font-size: 11px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
}

.mlc-row { margin-bottom: 12px; }
.mlc-row:last-child { margin-bottom: 0; }
.mlc-row--split { display: flex; gap: 10px; flex-wrap: wrap; }
.mlc-row--split > * { flex: 1; min-width: 140px; }

.mlc-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border-radius: var(--form-border-radius, 10px);
  border: 1px solid var(--card-border-color, #cbd5e1);
  background: var(--form-bg-color, rgba(255, 255, 255, 0.6));
  color: var(--form-text-color, inherit);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mlc-input:focus {
  outline: none;
  border-color: var(--primary-color, var(--accent-color, #64748b));
  box-shadow: 0 0 10px rgb(from var(--primary-color, #64748b) r g b / 25%);
}

.mlc-input::placeholder { color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 45%)); }

select.mlc-input { width: auto; min-width: 160px; cursor: pointer; }
.mlc-input--subject { font-size: 16px; font-weight: 600; }

.mlc-song-rows { display: flex; flex-direction: column; gap: 8px; }
.mlc-song-row { display: flex; gap: 8px; align-items: center; }

.mlc-song-num {
  flex: 0 0 22px;
  text-align: center;
  font-size: 12px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 50%));
  font-variant-numeric: tabular-nums;
}

.mlc-song-row .mlc-song-title  { flex: 0 0 26%; min-width: 0; }
.mlc-song-row .mlc-song-artist { flex: 0 0 20%; min-width: 0; }
.mlc-song-row .mlc-song-url    { flex: 1; min-width: 0; }

.mlc-song-del {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--card-border-color, #cbd5e1);
  background: var(--mlc-glass, #ffffff38);
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.mlc-song-del:hover {
  color: var(--error-color, #d32f2f);
  border-color: rgb(from var(--error-color, #d32f2f) r g b / 50%);
  box-shadow: 0 0 10px rgb(from var(--error-color, #d32f2f) r g b / 20%);
}

.mlc-song-add {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px dashed var(--card-border-color, #cbd5e1);
  background: transparent;
  color: var(--content-font-color, #333);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s var(--mlc-ease), border-color 0.2s, color 0.2s;
}

.mlc-song-add:hover { transform: translateY(-1px); border-color: var(--accent-color, #64748b); color: var(--accent-color, #64748b); }

.mlc-color-panel-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.mlc-preview-wrap { width: min(280px, 100%); }

.mlc-color-rows { display: flex; justify-content: center; gap: clamp(12px, 2.5vw, 24px); flex-wrap: wrap; }

.mlc-color-item { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; text-align: center; }

.mlc-color-item input[type="color"] {
  width: 46px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--card-border-color, #cbd5e1);
  border-radius: 10px;
  background: var(--mlc-glass, #ffffff38);
  cursor: pointer;
}

.mlc-color-item small {
  display: block;
  font-size: 11px;
  color: var(--content-font-color-muted, rgb(from var(--content-font-color, #444) r g b / 55%));
}

.mlc-write-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.mlc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-family: 'Pretendard', var(--content-font-family, sans-serif);
  color: var(--btn-primary-text, #fff);
  background: var(--btn-primary-bg, #64748b);
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--mlc-ease), filter 0.2s, box-shadow 0.2s;
}

.mlc-btn:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 0 10px rgb(from var(--accent-color, #64748b) r g b / 40%); }

.mlc-btn--ghost {
  background: var(--mlc-glass, #ffffff38);
  color: var(--content-font-color, #333);
  border: 1px solid var(--card-border-color, #cbd5e1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* 글쓰기 미리보기 — 히어로와 동일한 .mlc-tape 재사용 */
.mlc-preview-wrap .mlc-tape { max-width: 100%; }
.mlc-preview-wrap .mlc-tape .reel { animation-play-state: running; }

/* --------------------------------------------------------------------------
   반응형 / 접근성
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .mlc-shell { flex-direction: column; min-height: 0; height: auto; }
  /* 히어로(플레이어)를 위로, 라이브러리/플레이어 목록을 아래로 */
  .mlc-hero {
    order: -1;
    flex: 1 1 auto;
    min-height: 380px;
    padding: 24px 18px;
  }
  .mlc-sidebar {
    order: 0;
    width: 100%;
    height: min(48vh, 420px);   /* max-height만으론 flex:1 자식이 0으로 붕괴하므로 명시적 height 지정 */
    flex: 0 0 auto;
  }
}

/* 세로로 긴(폭이 좁고 높은) 화면: 사이드바 비중을 더 확보 */
@media (max-width: 980px) and (max-aspect-ratio: 3/5) {
  .mlc-sidebar { height: min(56vh, 520px); }
}

/* 세로로 긴 화면(가로폭이 980px보다 넓어도 세로가 더 긴 경우):
   플레이어(히어로)를 위로, 라이브러리/플레이어 목록을 아래로 스택 */
@media (min-width: 981px) and (max-aspect-ratio: 1 / 1) {
  .mlc-shell { flex-direction: column; min-height: 0; height: auto; }
  .mlc-hero { order: -1; flex: 1 1 auto; min-height: 440px; }
  .mlc-sidebar {
    order: 0;
    width: 100%;
    height: min(44vh, 480px);
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .mlc-app-wrap { padding: 10px; }
  .mlc-shell { gap: 12px; }
  .mlc-sidebar, .mlc-hero { border-radius: 20px; }
  .mlc-tape { max-width: 340px; }
  .mlc-controls-row { gap: 8px; }

  .mlc-song-row { flex-wrap: wrap; }
  .mlc-song-row .mlc-song-title,
  .mlc-song-row .mlc-song-artist { flex: 1 1 calc(50% - 30px); }
  .mlc-song-row .mlc-song-url { flex: 1 1 100%; margin-left: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .reel { animation: none !important; }
  .mlc-gradient-bg { animation: none; transition: none; }
  .mlc-eq span, .mlc-soundbar span, .mlc-skel { animation: none; }
  .mlc-hero-content, .mlc-hero-skeleton, .mlc-fly-swatch { transition: none !important; }
  .mlc-row-swatch-dot { animation: none !important; }
  .mlc-tape,
  .mlc-hero-frame { transition: background 0.5s var(--mlc-ease), border-color 0.5s var(--mlc-ease); transform: none !important; }
  .mlc-hero-frame:hover { transform: none !important; }
  .mlc-tape-label::after { animation: none !important; }
}
