/* ─────────────────────────────────────────────────────────
   Joyn Church Music — Frontend CSS (Light only)
   "Hymnal book meets modern editorial"
   ───────────────────────────────────────────────────────── */

.jcm-scope {
  /* Surface */
  --jcm-bg:           #faf7f2;
  --jcm-bg-deep:      #f3ede3;
  --jcm-surface:      #ffffff;
  --jcm-surface-2:    #f8f3eb;
  --jcm-surface-3:    #efe7d7;

  /* Brand */
  --jcm-primary:      #6e1a2a;
  --jcm-primary-dark: #4d0f1c;
  --jcm-primary-soft: #f4e6e9;
  --jcm-accent:       #b8902f;
  --jcm-accent-soft:  #f5ecd6;
  --jcm-accent-line:  #d4b061;

  /* Text */
  --jcm-ink:        #1f1a17;
  --jcm-ink-soft:   #4a4138;
  --jcm-ink-muted:  #8c8275;
  --jcm-ink-faint:  #b8ad9c;

  /* Border */
  --jcm-line:         #e8dfd3;
  --jcm-line-strong:  #cfc1a8;

  /* Status */
  --jcm-ok:   #4a7c3f;
  --jcm-warn: #b8702f;
  --jcm-err:  #a13838;

  /* Shape */
  --jcm-r-sm: 6px;
  --jcm-r-md: 10px;
  --jcm-r-lg: 16px;

  /* Shadow (warm tinted) */
  --jcm-shadow-1: 0 1px 2px rgba(110, 26, 42, 0.04);
  --jcm-shadow-2: 0 6px 18px rgba(110, 26, 42, 0.06), 0 1px 2px rgba(0,0,0,0.04);
  --jcm-shadow-3: 0 18px 45px rgba(110, 26, 42, 0.10), 0 2px 6px rgba(0,0,0,0.04);

  /* Type — 웹폰트는 Pretendard 만 로드 (class-assets.php) */
  --jcm-font-display: 'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  --jcm-font-serif:   'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, sans-serif;
  --jcm-font-body:    'Pretendard', -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;

  font-family: var(--jcm-font-body);
  color: var(--jcm-ink);
}

/* 스코프 내부 자식들 */
.jcm-scope * { box-sizing: border-box; }
.jcm-scope img { max-width: 100%; display: block; }

/*
 * 테마 격리 — WP 테마가 button / a.button / svg 전역 규칙으로
 * 탭·배지·장식 SVG를 망가뜨리는 경우를 막는다.
 */
.jcm-scope .jcm-tabs-bar,
.jcm-scope .jcm-lang-toggle,
.jcm-scope .jcm-song-cover-large,
.jcm-scope .jcm-song-card-cover {
  isolation: isolate;
}

/* 장식 SVG: 테마의 svg { width:100% } 등 무력화 */
.jcm-scope svg.jcm-song-cover-large-decor {
  display: block;
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  flex: 0 0 auto;
  fill: none;
}
.jcm-scope svg.jcm-song-card-decor {
  display: block;
  width: 48px !important;
  height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  flex: 0 0 auto;
  fill: none;
}

/* 탭 버튼: 테마 pill 배경·거대한 ::after/::before 제거, 본 플러그인 스타일만 유지 */
.jcm-scope button.jcm-tab-btn {
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  min-height: 0 !important;
  width: auto !important;
  max-width: none !important;
  line-height: normal;
  text-transform: none;
  letter-spacing: normal;
}
.jcm-scope button.jcm-tab-btn::before {
  content: none !important;
  display: none !important;
}
.jcm-scope button.jcm-tab-btn:not(.is-active)::after {
  content: none !important;
  display: none !important;
}
.jcm-scope button.jcm-tab-btn.is-active {
  background: transparent !important;
  background-image: none !important;
  color: var(--jcm-primary) !important;
}
.jcm-scope button.jcm-tab-btn:not(.is-active) {
  color: var(--jcm-ink-muted) !important;
}
.jcm-scope button.jcm-lyrics-yt-thumb {
  appearance: none;
  background-color: var(--jcm-surface-3) !important;
  box-shadow: var(--jcm-shadow-2) !important;
  filter: none !important;
}
.jcm-scope button.jcm-lyrics-yt-thumb::before,
.jcm-scope button.jcm-lyrics-yt-thumb::after {
  content: none !important;
  display: none !important;
}
.jcm-scope button.jcm-tab-btn:hover {
  color: var(--jcm-ink) !important;
  background: transparent !important;
}
.jcm-scope button.jcm-tab-btn.is-active:hover {
  color: var(--jcm-primary) !important;
}
.jcm-scope button.jcm-tab-btn.is-active::after {
  content: "" !important;
  position: absolute !important;
  display: block !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -1px !important;
  top: auto !important;
  width: auto !important;
  height: 2px !important;
  min-height: 0 !important;
  max-height: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  box-shadow: none !important;
  background: var(--jcm-primary) !important;
  background-image: none !important;
  opacity: 1 !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  pointer-events: none;
  z-index: 1;
}

.jcm-scope .jcm-lang-toggle button {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  border: 0 !important;
  min-height: 0 !important;
}
.jcm-scope .jcm-lang-toggle button::before,
.jcm-scope .jcm-lang-toggle button::after {
  content: none !important;
  display: none !important;
}
.jcm-scope .jcm-lang-toggle button.is-active {
  box-shadow: none !important;
}

/* 플러그인 주요 버튼·링크: 테마가 삽입한 pseudo 장식 제거 */
.jcm-scope a.jcm-btn::before,
.jcm-scope a.jcm-btn::after,
.jcm-scope button.jcm-btn::before,
.jcm-scope button.jcm-btn::after {
  content: none !important;
  display: none !important;
}
.jcm-scope a.jcm-btn,
.jcm-scope button.jcm-btn {
  text-decoration: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

/*
 * 찬송가 유튜브 모달 — mainpage-mini 방송 섹션 인라인(mpb-popup)과 동일 레이아웃.
 * #jcm-mpb-popup 으로 스코프해 메인 #mpb-popup 과 id 충돌 없음.
 */
#jcm-mpb-popup.mpb-popup,
.jcm-scope #jcm-mpb-popup.mpb-popup {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 999999 !important;
  padding: 20px;
  box-sizing: border-box !important;
  pointer-events: none;
  margin: 0 !important;
  transform: none !important;
  filter: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
#jcm-mpb-popup.mpb-popup *,
.jcm-scope #jcm-mpb-popup.mpb-popup * {
  box-sizing: border-box !important;
}
#jcm-mpb-popup.mpb-popup.active,
.jcm-scope #jcm-mpb-popup.mpb-popup.active {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  animation: jcm-mpb-fadein 0.2s ease;
  pointer-events: auto !important;
}
#jcm-mpb-popup .mpb-overlay,
.jcm-scope #jcm-mpb-popup .mpb-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  z-index: 1 !important;
  pointer-events: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  width: auto !important;
  height: auto !important;
}
#jcm-mpb-popup .mpb-overlay::before,
#jcm-mpb-popup .mpb-overlay::after,
.jcm-scope #jcm-mpb-popup .mpb-overlay::before,
.jcm-scope #jcm-mpb-popup .mpb-overlay::after {
  content: none !important;
  display: none !important;
}
#jcm-mpb-popup .mpb-content,
.jcm-scope #jcm-mpb-popup .mpb-content {
  position: relative !important;
  width: 90% !important;
  max-width: 800px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
  animation: jcm-mpb-scalein 0.25s ease;
  z-index: 2 !important;
  background: #000 !important;
  pointer-events: auto !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  transform: none !important;
}
#jcm-mpb-popup .mpb-close,
.jcm-scope #jcm-mpb-popup .mpb-close {
  position: absolute !important;
  top: -48px !important;
  right: 0 !important;
  width: 40px !important;
  height: 40px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: none !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  padding: 0 !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.2s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  pointer-events: auto !important;
  margin: 0 !important;
  appearance: none !important;
  line-height: 0 !important;
  font: inherit !important;
  color: #333 !important;
  text-shadow: none !important;
  filter: none !important;
}
#jcm-mpb-popup .mpb-close::before,
#jcm-mpb-popup .mpb-close::after,
.jcm-scope #jcm-mpb-popup .mpb-close::before,
.jcm-scope #jcm-mpb-popup .mpb-close::after {
  content: none !important;
  display: none !important;
}
#jcm-mpb-popup .mpb-close:hover,
#jcm-mpb-popup .mpb-close:active,
.jcm-scope #jcm-mpb-popup .mpb-close:hover,
.jcm-scope #jcm-mpb-popup .mpb-close:active {
  transform: scale(1.1);
}
#jcm-mpb-popup .mpb-close svg,
.jcm-scope #jcm-mpb-popup .mpb-close svg {
  width: 20px !important;
  height: 20px !important;
  color: #333 !important;
  display: block !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  max-width: none !important;
  max-height: none !important;
}
#jcm-mpb-popup .mpb-player,
.jcm-scope #jcm-mpb-popup .mpb-player {
  aspect-ratio: 16 / 9;
  background: #000;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin: 0 !important;
  padding: 0 !important;
}
#jcm-mpb-popup .mpb-player iframe,
.jcm-scope #jcm-mpb-popup .mpb-player iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
  transform: none !important;
  filter: none !important;
}
@keyframes jcm-mpb-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes jcm-mpb-scalein {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@media (max-width: 768px) {
  #jcm-mpb-popup.mpb-popup,
  .jcm-scope #jcm-mpb-popup.mpb-popup { padding: 16px !important; }
  #jcm-mpb-popup .mpb-content,
  .jcm-scope #jcm-mpb-popup .mpb-content {
    width: 95% !important;
    max-width: 100% !important;
    border-radius: 12px !important;
  }
  #jcm-mpb-popup .mpb-player,
  .jcm-scope #jcm-mpb-popup .mpb-player { border-radius: 12px; }
  #jcm-mpb-popup .mpb-close,
  .jcm-scope #jcm-mpb-popup .mpb-close {
    top: -44px !important;
    width: 36px !important;
    height: 36px !important;
  }
  #jcm-mpb-popup .mpb-close svg,
  .jcm-scope #jcm-mpb-popup .mpb-close svg {
    width: 18px !important;
    height: 18px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #jcm-mpb-popup.mpb-popup.active,
  .jcm-scope #jcm-mpb-popup.mpb-popup.active,
  #jcm-mpb-popup .mpb-content,
  .jcm-scope #jcm-mpb-popup .mpb-content {
    animation: none !important;
  }
}

/* 가상 라우트 곡 상세: 헤더~본문 사이 빈 공간 (Astra 히어로/배너·#content·#primary 여백·flex gap) */
body.jcm-virtual-song-page #content.site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body.jcm-virtual-song-page #content.site-content > .ast-container {
  padding-top: 0 !important;
  margin-top: 0 !important;
  row-gap: 0 !important;
  column-gap: 0 !important;
  gap: 0 !important;
}
body.jcm-virtual-song-page .site-main.jcm-virtual-page,
body.jcm-virtual-song-page #primary.site-main.jcm-virtual-page {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.jcm-virtual-song-page .site-content > .ast-container > section.ast-archive-description,
body.jcm-virtual-song-page .site-content > .ast-container > .ast-archive-entry-banner,
body.jcm-virtual-song-page .site-content > .ast-container > section.ast-single-entry-banner {
  display: none !important;
}

/* ────────── Container & Hero ────────── */
.jcm-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
.jcm-page-hero {
  padding: 56px 0 40px;
  position: relative;
}
.jcm-page-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--jcm-line-strong) 20%, var(--jcm-line-strong) 80%, transparent);
}
.jcm-crumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--jcm-accent);
  margin-bottom: 18px;
}
.jcm-crumb-mark { width: 24px; height: 1px; background: var(--jcm-accent-line); }

.jcm-page-title {
  font-family: var(--jcm-font-serif);
  font-weight: 600;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--jcm-ink);
  margin: 0 0 16px;
}
.jcm-page-title em {
  font-family: var(--jcm-font-display);
  font-style: italic; font-weight: 500;
  color: var(--jcm-primary);
}
.jcm-page-sub {
  font-size: 16px; color: var(--jcm-ink-soft);
  max-width: 640px; line-height: 1.65;
}
.jcm-random-yt-hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ─── 곡 목록: 유튜브 랜덤 재생 모달 ─── */
.jcm-random-yt-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* 토탈/카테고리 재생 공통: 상단 60px + 노치 안전영역 */
  padding: calc(60px + env(safe-area-inset-top, 0px)) 16px 24px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.jcm-random-yt-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.jcm-random-yt-modal__bg {
  position: absolute;
  inset: 0;
  background: rgba(15, 12, 14, 0.82);
  backdrop-filter: blur(6px);
}
.jcm-random-yt-modal__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--jcm-surface);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--jcm-line);
  padding: 20px 22px 24px;
}
.jcm-random-yt-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.jcm-random-yt-modal__title {
  margin: 0;
  font-family: var(--jcm-font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--jcm-ink);
}
.jcm-random-yt-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--jcm-surface-2);
  color: var(--jcm-ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.jcm-random-yt-modal__close:hover {
  background: var(--jcm-line);
}
.jcm-random-yt-modal__now {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--jcm-ink-muted);
  min-height: 1.4em;
}
.jcm-random-yt-modal__player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0a0a0a;
  border-radius: 12px;
  overflow: hidden;
}
.jcm-random-yt-modal__player-wrap #jcm-random-yt-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.jcm-random-yt-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.jcm-random-yt-modal__meta {
  font-size: 13px;
  color: var(--jcm-ink-muted);
}
.jcm-random-yt-modal__loading {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--jcm-ink-soft);
}
.jcm-random-yt-modal__loading.is-hidden {
  display: none;
}

@media (max-width: 768px) {
  .jcm-random-yt-modal {
    padding: calc(100px + env(safe-area-inset-top, 0px)) 16px 24px;
  }
}

/*
 * Astra / 자식 테마 등 전역 button 규칙 분리
 * — 토탈·카테고리 재생(히어로) + 랜덤 재생 모달 내부 버튼
 */
.jcm-scope .jcm-random-yt-hero-actions button.jcm-btn,
#jcm-random-yt-modal.jcm-scope button.jcm-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: var(--jcm-font-body) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  padding: 12px 20px !important;
  border-radius: 100px !important;
  min-height: 0 !important;
  width: auto !important;
  max-width: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
}
.jcm-scope .jcm-random-yt-hero-actions button.jcm-btn::before,
.jcm-scope .jcm-random-yt-hero-actions button.jcm-btn::after,
#jcm-random-yt-modal.jcm-scope button.jcm-btn::before,
#jcm-random-yt-modal.jcm-scope button.jcm-btn::after {
  content: none !important;
  display: none !important;
}
.jcm-scope .jcm-random-yt-hero-actions button.jcm-btn-primary,
#jcm-random-yt-modal.jcm-scope button.jcm-btn-primary {
  background: var(--jcm-primary) !important;
  border: 1px solid var(--jcm-primary) !important;
  color: #fff !important;
}
.jcm-scope .jcm-random-yt-hero-actions button.jcm-btn-primary:hover,
#jcm-random-yt-modal.jcm-scope button.jcm-btn-primary:hover {
  background: var(--jcm-primary-dark) !important;
  border-color: var(--jcm-primary-dark) !important;
  color: #fff !important;
}
#jcm-random-yt-modal.jcm-scope button.jcm-btn-ghost {
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--jcm-ink-soft) !important;
}
#jcm-random-yt-modal.jcm-scope button.jcm-btn-ghost:hover {
  background: var(--jcm-surface-2) !important;
  border-color: transparent !important;
  color: var(--jcm-ink) !important;
  transform: none !important;
}
#jcm-random-yt-modal.jcm-scope .jcm-random-yt-modal__close {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: var(--jcm-surface-2) !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  color: var(--jcm-ink) !important;
  width: 40px !important;
  height: 40px !important;
  min-height: 0 !important;
  padding: 0 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  text-transform: none !important;
}
#jcm-random-yt-modal.jcm-scope .jcm-random-yt-modal__close::before,
#jcm-random-yt-modal.jcm-scope .jcm-random-yt-modal__close::after {
  content: none !important;
  display: none !important;
}
#jcm-random-yt-modal.jcm-scope .jcm-random-yt-modal__close:hover {
  background: var(--jcm-line) !important;
  color: var(--jcm-ink) !important;
}

/* ────────── Buttons ────────── */
.jcm-btn {
  appearance: none;
  border: 1px solid var(--jcm-line-strong);
  background: var(--jcm-surface);
  color: var(--jcm-ink);
  font: inherit; font-weight: 500; font-size: 14px;
  padding: 12px 20px;
  border-radius: 100px;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.jcm-btn:hover {
  border-color: var(--jcm-primary);
  color: var(--jcm-primary);
  transform: translateY(-1px);
}
.jcm-btn-primary {
  background: var(--jcm-primary);
  border-color: var(--jcm-primary);
  color: #fff;
}
.jcm-btn-primary:hover {
  background: var(--jcm-primary-dark);
  border-color: var(--jcm-primary-dark);
  color: #fff;
}
.jcm-btn.jcm-btn--yt-play .jcm-yt-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}
.jcm-btn.jcm-btn--yt-play .jcm-yt-play-icon svg {
  display: block;
  margin-left: 2px;
}
.jcm-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--jcm-ink-soft);
}
.jcm-btn-ghost:hover {
  background: var(--jcm-surface-2);
  color: var(--jcm-ink);
  transform: none;
}

/* ────────── Search box ────────── */
.jcm-search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}
.jcm-search-box input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  font: inherit; font-size: 15px;
  color: var(--jcm-ink);
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: 100px;
  box-shadow: var(--jcm-shadow-1);
  transition: all 0.15s ease;
}
.jcm-search-box input::placeholder { color: var(--jcm-ink-muted); }
.jcm-search-box input:focus {
  outline: none;
  border-color: var(--jcm-primary);
  box-shadow: 0 0 0 4px var(--jcm-primary-soft);
}
.jcm-search-box::before {
  content: "";
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  background: var(--jcm-ink-muted);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>") no-repeat center / contain;
  pointer-events: none;
}

/* ────────── Toolbar / Category chips ────────── */
.jcm-toolbar {
  display: flex; gap: 16px; align-items: flex-start;
  margin: 32px 0 28px; flex-wrap: wrap;
}
.jcm-toolbar-actions {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 곡 목록 — 관리자 신규 곡(글쓰기) 모달 (body 로 이동 시에도 .jcm-scope 로 토큰·버튼 스타일 유지) */
.jcm-compose-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  overflow: hidden;
  margin: 0;
  font-family: var(--jcm-font-body);
  color: var(--jcm-ink);
}
.jcm-compose-modal,
.jcm-compose-modal *,
.jcm-compose-modal *::before,
.jcm-compose-modal *::after {
  box-sizing: border-box;
}
body.admin-bar .jcm-compose-modal {
  padding-top: max(12px, calc(32px + env(safe-area-inset-top, 0px)));
}
@media screen and (max-width: 782px) {
  body.admin-bar .jcm-compose-modal {
    padding-top: max(12px, calc(46px + env(safe-area-inset-top, 0px)));
  }
}
.jcm-compose-modal[hidden] {
  display: none !important;
}
.jcm-compose-modal__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(20, 14, 10, 0.6);
  backdrop-filter: blur(4px);
}
.jcm-compose-modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, calc(100vw - 32px));
  max-height: min(85dvh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* body 밖에서도 토큰 미적용 시에도 카드가 보이도록 실색 폴백 */
  background: var(--jcm-surface, #ffffff);
  border: 1px solid var(--jcm-line, #e8dfd3);
  border-radius: var(--jcm-r-lg, 16px);
  box-shadow:
    var(--jcm-shadow-3, 0 18px 45px rgba(110, 26, 42, 0.12), 0 8px 24px rgba(0, 0, 0, 0.12));
}
.jcm-compose-modal__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--jcm-line, #e8dfd3);
  background: var(--jcm-surface, #ffffff);
}
.jcm-compose-modal__title {
  margin: 0;
  font-family: var(--jcm-font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--jcm-ink);
}
.jcm-compose-modal__close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--jcm-ink-muted);
  padding: 4px 8px;
  border-radius: 8px;
}
.jcm-compose-modal__close:hover {
  background: var(--jcm-surface-2);
  color: var(--jcm-ink);
}
.jcm-compose-modal__form {
  padding: 16px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-height: 0;
}
.jcm-compose-modal__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--jcm-ink-muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.jcm-compose-modal__req { color: #c44; }
.jcm-compose-modal__input,
.jcm-compose-modal__textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-sm);
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--jcm-ink);
}
.jcm-compose-modal__textarea { resize: vertical; min-height: 64px; }
.jcm-compose-modal__hint-inline {
  margin: -4px 0 2px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--jcm-ink-muted, #8c8275);
}
.jcm-compose-modal__file {
  width: 100%;
  font-size: 14px;
  color: var(--jcm-ink-soft, #4a4138);
}
.jcm-compose-modal__err {
  margin: 0;
  font-size: 14px;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  padding: 10px 12px;
}
.jcm-compose-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 8px;
}

.jcm-cat-rail {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 32px;
  scrollbar-width: thin;
}
.jcm-cat-rail::-webkit-scrollbar { height: 4px; }
.jcm-cat-rail::-webkit-scrollbar-thumb { background: var(--jcm-line-strong); border-radius: 4px; }
.jcm-cat-chip {
  white-space: nowrap;
  padding: 8px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--jcm-ink-soft);
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: 100px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.jcm-cat-chip:hover {
  border-color: var(--jcm-accent);
  color: var(--jcm-ink);
}
.jcm-cat-chip.is-active {
  background: var(--jcm-ink);
  color: #fff;
  border-color: var(--jcm-ink);
}
.jcm-cat-chip-count {
  font-size: 11px; opacity: 0.7;
  font-family: var(--jcm-font-display); font-style: italic;
}

/* ────────── Song Card Grid ────────── */
.jcm-song-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  margin-bottom: 80px;
}
.jcm-song-card {
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  display: block;
  /* 뷰포트 밖 카드 레이아웃·페인트 지연 → /songs/ 첫 페인트·스크롤 부담 완화 */
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}
.jcm-song-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--jcm-shadow-3);
  border-color: var(--jcm-line-strong);
}
.jcm-song-card-cover {
  aspect-ratio: 4/3;
  position: relative;
  overflow: hidden;
}
.jcm-song-card-cover::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15), transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(184, 144, 47, 0.2), transparent 50%);
}
/* 카테고리별 6가지 색상 (모듈러 — id mod 6) */
.jcm-song-card[data-color="0"] .jcm-song-card-cover { background: linear-gradient(135deg, #6e1a2a, #4d0f1c); }
.jcm-song-card[data-color="1"] .jcm-song-card-cover { background: linear-gradient(135deg, #2c4a6e, #1a3050); }
.jcm-song-card[data-color="2"] .jcm-song-card-cover { background: linear-gradient(135deg, #6e4a1a, #4d300f); }
.jcm-song-card[data-color="3"] .jcm-song-card-cover { background: linear-gradient(135deg, #4a6e3a, #2d4a25); }
.jcm-song-card[data-color="4"] .jcm-song-card-cover { background: linear-gradient(135deg, #6e1a5a, #4d0f3e); }
.jcm-song-card[data-color="5"] .jcm-song-card-cover { background: linear-gradient(135deg, #1a5a6e, #0f3d4d); }

.jcm-song-card-num {
  position: absolute;
  top: 16px; left: 18px;
  font-family: var(--jcm-font-display);
  font-style: italic; font-weight: 500;
  font-size: 56px; line-height: 1;
  color: rgba(255,255,255,0.9);
}
.jcm-song-card-num small {
  font-size: 11px; font-style: normal;
  font-family: var(--jcm-font-body);
  letter-spacing: 0.15em; text-transform: uppercase;
  display: block; opacity: 0.6; margin-bottom: 4px;
}
.jcm-song-card-decor {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 48px; height: 48px;
  opacity: 0.3;
  color: #fff;
}

/* 데스크톱: 목록 카드 커버(색상 영역) 세로를 4/3 대비 약 50% (aspect-ratio 8/3) */
@media (min-width: 601px) {
  .jcm-song-card-cover {
    aspect-ratio: 8/3;
  }
  .jcm-song-card-num {
    top: 12px;
    left: 14px;
    font-size: 40px;
  }
  .jcm-song-card-num small {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .jcm-song-card-decor {
    bottom: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
}

.jcm-song-card-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--jcm-accent);
  color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.jcm-song-card-body { padding: 18px 20px 20px; }
.jcm-song-card-cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--jcm-accent);
  margin-bottom: 6px;
}
.jcm-song-card-title {
  font-family: var(--jcm-font-serif);
  font-weight: 600; font-size: 18px;
  line-height: 1.3; letter-spacing: -0.01em;
  color: var(--jcm-ink);
  margin: 0 0 4px;
}
.jcm-song-card-meta {
  font-size: 12px; color: var(--jcm-ink-muted);
  display: flex; gap: 12px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--jcm-line);
}
.jcm-song-card-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.jcm-dot { color: var(--jcm-ink-faint); }

.jcm-song-card-assets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.jcm-song-card-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  line-height: 0;
  color: var(--jcm-ink-muted);
  background: rgba(31, 26, 23, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.jcm-song-card:hover .jcm-song-card-icon {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.jcm-song-card-icon--video {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.12);
}
.jcm-song-card-icon--lyrics {
  color: #1d4ed8;
  background: rgba(29, 78, 216, 0.1);
}
.jcm-song-card-icon--score {
  color: #7c4a12;
  background: rgba(124, 74, 18, 0.12);
}
.jcm-song-card-icon--attach {
  color: #475569;
  background: rgba(71, 85, 105, 0.12);
}
.jcm-song-card-icon svg { display: block; }

/* ────────── Pagination ────────── */
.jcm-pager {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  margin: 40px 0 80px;
  font-family: var(--jcm-font-display);
}
.jcm-pager a, .jcm-pager span {
  padding: 8px 14px; min-width: 40px; text-align: center;
  border-radius: 100px; text-decoration: none;
  color: var(--jcm-ink-soft); font-size: 14px; font-weight: 500;
}
.jcm-pager a:hover { background: var(--jcm-surface-2); color: var(--jcm-primary); }
.jcm-pager .is-current { background: var(--jcm-primary); color: #fff; }
.jcm-pager .is-disabled { color: var(--jcm-ink-faint); pointer-events: none; }

/* ────────── Empty state ────────── */
.jcm-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--jcm-ink-muted);
  font-family: var(--jcm-font-display);
  font-style: italic;
  font-size: 18px;
}

/* ────────── Detail page ────────── */
.jcm-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  margin: 16px 0 80px;
}
@media (max-width: 900px) {
  .jcm-detail-grid { grid-template-columns: 1fr; gap: 32px; }
}

.jcm-song-info { position: sticky; top: 100px; align-self: start; }
@media (max-width: 900px) { .jcm-song-info { position: static; } }

.jcm-song-cover-large {
  /* 기존 3/4 대비 세로 높이 약 50% (w/h: 3/4 → 3/2) */
  aspect-ratio: 3/2;
  border-radius: var(--jcm-r-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
  box-shadow: var(--jcm-shadow-3);
  background: linear-gradient(135deg, var(--jcm-primary), var(--jcm-primary-dark));
}
.jcm-song-cover-large[data-color="0"] { background: linear-gradient(135deg, #6e1a2a, #4d0f1c); }
.jcm-song-cover-large[data-color="1"] { background: linear-gradient(135deg, #2c4a6e, #1a3050); }
.jcm-song-cover-large[data-color="2"] { background: linear-gradient(135deg, #6e4a1a, #4d300f); }
.jcm-song-cover-large[data-color="3"] { background: linear-gradient(135deg, #4a6e3a, #2d4a25); }
.jcm-song-cover-large[data-color="4"] { background: linear-gradient(135deg, #6e1a5a, #4d0f3e); }
.jcm-song-cover-large[data-color="5"] { background: linear-gradient(135deg, #1a5a6e, #0f3d4d); }

.jcm-song-cover-large::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(184, 144, 47, 0.25), transparent 50%);
}
.jcm-song-cover-large-num {
  position: absolute; top: 18px; left: 22px;
  color: rgba(255,255,255,0.95);
}
.jcm-song-cover-large-num small {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.6; display: block; margin-bottom: 6px;
}
.jcm-song-cover-large-num strong {
  font-family: var(--jcm-font-display);
  font-style: italic; font-weight: 500;
  font-size: clamp(40px, 14vw, 58px);
  line-height: 1; display: block;
}
.jcm-song-cover-large-decor {
  position: absolute; bottom: 16px; right: 18px;
  width: 52px; height: 52px;
  opacity: 0.25; color: #fff;
}
.jcm-song-cover-large-tag {
  position: absolute; bottom: 16px; left: 22px;
  font-family: var(--jcm-font-display);
  font-style: italic;
  color: rgba(255,255,255,0.7);
  font-size: 14px; letter-spacing: 0.05em;
}
.jcm-song-cover-large-tag::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--jcm-accent-line);
  vertical-align: middle;
  margin-right: 10px;
}

.jcm-song-meta-list {
  list-style: none;
  margin: 0; padding: 0;
}
.jcm-song-meta-list li {
  display: flex; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--jcm-line);
  font-size: 14px;
}
.jcm-song-meta-list li:last-child { border-bottom: 0; }
.jcm-song-meta-list .k {
  color: var(--jcm-ink-muted);
  font-size: 12px; letter-spacing: 0.05em;
  text-transform: uppercase; font-weight: 500;
}
.jcm-song-meta-list .v {
  color: var(--jcm-ink); font-weight: 500;
  font-family: var(--jcm-font-serif);
}
.jcm-song-meta-list .v-mono {
  font-family: var(--jcm-font-display);
  font-style: italic; font-size: 16px;
  color: var(--jcm-primary);
}

.jcm-song-actions {
  display: flex; gap: 8px; margin-top: 20px;
}
.jcm-song-actions .jcm-btn { flex: 1; justify-content: center; padding: 12px 16px; }
.jcm-song-actions--slide {
  margin-top: 8px;
}
.jcm-song-actions--slide .jcm-btn {
  flex: 1 1 100%;
}
.jcm-song-actions--ppt-view .jcm-btn {
  flex: 1 1 100%;
}

.jcm-detail-main { min-width: 0; }
.jcm-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-top: 15px;
  margin-bottom: 12px;
  font-family: var(--jcm-font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--jcm-ink-soft);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.jcm-detail-back:hover,
.jcm-detail-back:focus-visible {
  color: var(--jcm-primary);
  outline: none;
}
.jcm-detail-back:active {
  opacity: 0.88;
}
.jcm-detail-title {
  font-family: var(--jcm-font-serif);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  color: var(--jcm-ink);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}
.jcm-detail-title em {
  font-family: var(--jcm-font-display);
  font-style: italic; font-weight: 500;
  color: var(--jcm-primary);
  font-size: 0.92em;
}
.jcm-detail-subtitle {
  font-size: 16px; color: var(--jcm-ink-muted);
  font-style: italic;
  font-family: var(--jcm-font-display);
  margin-bottom: 28px;
}

/* Tabs */
.jcm-tabs-bar {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--jcm-line);
  margin-bottom: 32px;
  overflow-x: auto;
  scrollbar-width: none;
}
.jcm-tabs-bar::-webkit-scrollbar { display: none; }
.jcm-tab-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 14px 4px;
  margin-right: 32px;
  font: inherit; font-weight: 500; font-size: 14px;
  color: var(--jcm-ink-muted);
  position: relative;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.15s ease;
}
.jcm-tab-btn:hover { color: var(--jcm-ink); }
.jcm-tab-btn.is-active { color: var(--jcm-primary); font-weight: 600; }
.jcm-tab-btn.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--jcm-primary);
}
.jcm-tab-btn .jcm-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--jcm-surface-3);
  color: var(--jcm-ink-soft);
  font-weight: 600;
  font-family: var(--jcm-font-display);
  font-style: italic;
}
.jcm-tab-btn.is-active .jcm-badge { background: var(--jcm-primary-soft); color: var(--jcm-primary); }

.jcm-tab-panel { display: none; }
.jcm-tab-panel.is-active { display: block; animation: jcm-fade 0.25s ease; }
@keyframes jcm-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Lyrics */
.jcm-lyrics-tools {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 24px; flex-wrap: wrap;
}
.jcm-lang-toggle {
  display: inline-flex;
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: 100px; padding: 3px;
  box-shadow: var(--jcm-shadow-1);
}
.jcm-lang-toggle button {
  appearance: none;
  border: 0; background: transparent;
  padding: 6px 16px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--jcm-ink-muted);
  border-radius: 100px;
  cursor: pointer;
}
.jcm-lang-toggle button.is-active {
  background: var(--jcm-ink); color: #fff;
}

.jcm-lyrics-paper {
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-lg);
  padding: 56px 48px;
  position: relative;
  box-shadow: var(--jcm-shadow-2);
}
.jcm-lyrics-copy {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-md);
  background: var(--jcm-surface-2);
  color: var(--jcm-ink-muted);
  cursor: pointer;
  box-shadow: var(--jcm-shadow-1);
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.jcm-lyrics-copy:hover {
  color: var(--jcm-primary);
  background: var(--jcm-primary-soft);
  border-color: var(--jcm-primary-soft);
}
.jcm-lyrics-copy:active { transform: scale(0.96); }
.jcm-lyrics-copy.is-done {
  color: var(--jcm-ok);
  border-color: rgba(74, 124, 63, 0.35);
  background: rgba(74, 124, 63, 0.08);
}
.jcm-lyrics-copy svg { display: block; flex-shrink: 0; }

/* 전역 토스트 (가사 복사 등) */
.jcm-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
  z-index: 1000001;
  max-width: min(92vw, 360px);
  padding: 14px 22px;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: #fff;
  background: rgba(31, 26, 23, 0.92);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.jcm-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.jcm-lyrics-paper::before, .jcm-lyrics-paper::after {
  content: "";
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--jcm-accent-line), transparent);
}
.jcm-lyrics-paper::before { top: 28px; left: 48px; right: 88px; }
.jcm-lyrics-paper::after  { bottom: 28px; left: 48px; right: 48px; }
@media (max-width: 600px) {
  .jcm-lyrics-paper { padding: 32px 24px; }
  .jcm-lyrics-copy { top: 14px; right: 14px; width: 38px; height: 38px; }
  .jcm-lyrics-paper::before { left: 24px; right: 72px; }
  .jcm-lyrics-paper::after  { left: 24px; right: 24px; }
}

.jcm-lyric-section { margin-bottom: 32px; }
.jcm-lyric-section:last-child { margin-bottom: 0; }
.jcm-lyric-section-label {
  display: inline-block;
  font-family: var(--jcm-font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--jcm-accent);
  margin-bottom: 16px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--jcm-accent-line);
  letter-spacing: 0.02em;
}
.jcm-lyric-line {
  font-family: var(--jcm-font-serif);
  font-size: 19px;
  line-height: 1.95;
  color: var(--jcm-ink);
  letter-spacing: -0.005em;
  cursor: pointer;
  padding: 4px 12px;
  margin: 0 -12px;
  border-radius: var(--jcm-r-sm);
  transition: background 0.15s ease;
  position: relative;
}
.jcm-lyric-line:hover { background: var(--jcm-accent-soft); }

/* 가사 버전별 편집(관리자·편집자) */
.jcm-lyric-version {
  position: relative;
}
.jcm-lyric-version--editable {
  padding-bottom: 52px;
}
.jcm-lyric-version-actions {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}
.jcm-lyric-version-actions .jcm-btn {
  padding: 8px 14px;
  font-size: 13px;
}
.jcm-lyric-delete-btn {
  border-color: var(--jcm-err) !important;
  color: var(--jcm-err) !important;
}
.jcm-lyric-delete-btn:hover {
  background: rgba(161, 56, 56, 0.08) !important;
}

/* 가사 모달 열릴 때 배경 스크롤 방지 (JS 가 html/body 에 클래스 부여) */
html.jcm-modal-scroll-lock,
html.jcm-modal-scroll-lock body {
  overflow: hidden !important;
}

/* 음원 탭 */
.jcm-audio-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
}
.jcm-audio-card {
  padding: 16px 18px;
  border-radius: var(--jcm-r-md);
  border: 1px solid var(--jcm-line);
  background: var(--jcm-surface);
}
.jcm-audio-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.jcm-audio-card-title { font-size: 15px; color: var(--jcm-ink); }
.jcm-audio-el { width: 100%; height: 40px; }

/* 곡 상세 — 편집 탭 (R2 업로드 등) */
.jcm-song-media-edit-lead {
  font-size: 13px;
  color: var(--jcm-ink-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}
.jcm-song-media-edit-block {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--jcm-line);
}
.jcm-song-media-edit-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.jcm-song-media-edit-h {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--jcm-ink);
}
.jcm-media-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.jcm-media-upload-form input[type="file"] {
  max-width: 100%;
  font-size: 13px;
}
.jcm-media-upload-form input[type="text"] {
  flex: 1;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-sm);
  font-size: 14px;
}
.jcm-youtube-add-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.jcm-youtube-url-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-sm);
  font-size: 14px;
}
.jcm-youtube-add-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.jcm-song-media-edit-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.jcm-song-media-edit-list li {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--jcm-line);
  font-size: 14px;
}
.jcm-song-media-edit-list li:last-child { border-bottom: 0; }
.jcm-song-media-edit-kind {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--jcm-ink-muted);
  min-width: 48px;
}
.jcm-song-media-edit-title { flex: 1; min-width: 0; color: var(--jcm-ink); }

/* YouTube Tab */
.jcm-yt-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
@media (max-width: 800px) { .jcm-yt-grid { grid-template-columns: 1fr; } }

.jcm-yt-main {
  border-radius: var(--jcm-r-lg);
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  position: relative;
  box-shadow: var(--jcm-shadow-3);
}
.jcm-yt-main iframe { width: 100%; height: 100%; border: 0; display: block; }
.jcm-yt-main-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #2c1820, #4a1a2a);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  font-family: var(--jcm-font-display);
  font-style: italic;
}

.jcm-yt-list {
  display: flex; flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.jcm-yt-item {
  display: flex; gap: 12px;
  padding: 8px;
  border-radius: var(--jcm-r-md);
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  cursor: pointer;
  transition: all 0.15s ease;
}
.jcm-yt-item:hover {
  border-color: var(--jcm-primary);
  transform: translateX(-2px);
}
.jcm-yt-item.is-active { border-color: var(--jcm-primary); background: var(--jcm-primary-soft); }
.jcm-yt-item-thumb {
  width: 100px; aspect-ratio: 16/9;
  border-radius: var(--jcm-r-sm);
  background: linear-gradient(135deg, var(--jcm-primary), var(--jcm-primary-dark));
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
/* 네이티브 loading="lazy" — background-image 대신 <img.jcm-thumb-img> 사용 */
.jcm-scope .jcm-thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}
.jcm-yt-item-body { flex: 1; min-width: 0; }
.jcm-yt-item-title {
  font-size: 13px; font-weight: 500;
  color: var(--jcm-ink);
  margin: 2px 0 4px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jcm-yt-item-channel {
  font-size: 11px; color: var(--jcm-ink-muted);
  display: flex; align-items: center; gap: 6px;
}
.jcm-yt-item-official {
  background: var(--jcm-accent-soft);
  color: var(--jcm-accent);
  font-size: 9px; font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* 가사 패널 아래 — 관련 영상 썸네일 */
.jcm-lyrics-youtube-block {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px dashed var(--jcm-line);
}
.jcm-lyrics-youtube-heading {
  font-family: var(--jcm-font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--jcm-ink);
  margin: 0 0 6px;
}
.jcm-lyrics-youtube-hint {
  font-size: 13px;
  color: var(--jcm-ink-muted);
  margin: 0 0 16px;
}
.jcm-lyrics-youtube-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.jcm-lyrics-yt-thumb {
  position: relative;
  width: 160px;
  aspect-ratio: 16/9;
  border: 0;
  padding: 0;
  border-radius: var(--jcm-r-md);
  cursor: pointer;
  overflow: hidden;
  background-color: var(--jcm-surface-3);
  box-shadow: var(--jcm-shadow-2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.jcm-lyrics-yt-thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--jcm-shadow-3);
}
.jcm-lyrics-yt-thumb-play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
  background: rgba(30, 20, 24, 0.35);
  border-radius: inherit;
  pointer-events: none;
}

/* ────────── Search results ────────── */
.jcm-search-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  margin: 32px 0 80px;
}
@media (max-width: 800px) { .jcm-search-layout { grid-template-columns: 1fr; } }

.jcm-search-filters { position: sticky; top: 100px; align-self: start; }
@media (max-width: 800px) { .jcm-search-filters { position: static; } }
.jcm-filter-group { margin-bottom: 28px; }
.jcm-filter-group-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--jcm-ink-muted);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--jcm-line);
}
.jcm-filter-list { list-style: none; margin: 0; padding: 0; }
.jcm-filter-list li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--jcm-ink-soft);
  display: flex; justify-content: space-between;
  cursor: pointer;
  transition: color 0.15s ease;
}
.jcm-filter-list li:hover { color: var(--jcm-primary); }
.jcm-filter-list li.is-active {
  color: var(--jcm-primary);
  font-weight: 600;
}
.jcm-filter-list li .count {
  font-size: 12px;
  color: var(--jcm-ink-faint);
  font-family: var(--jcm-font-display);
  font-style: italic;
}
.jcm-filter-list li.is-active .count { color: var(--jcm-primary); }

.jcm-search-results-head {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--jcm-line);
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 12px;
}
.jcm-search-results-head h3 {
  font-family: var(--jcm-font-serif);
  font-size: 22px; font-weight: 600;
  margin: 0;
}
.jcm-search-results-head .total {
  font-family: var(--jcm-font-display);
  font-style: italic;
  color: var(--jcm-primary);
  font-size: 24px;
  margin: 0 4px;
}
.jcm-search-results-head .small {
  color: var(--jcm-ink-muted);
  font-size: 13px;
}

.jcm-search-result-list {
  display: flex; flex-direction: column;
  gap: 12px;
}
.jcm-result-item {
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-md);
  padding: 20px 24px;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  align-items: center;
}
@media (max-width: 600px) {
  .jcm-result-item { grid-template-columns: 44px 1fr; padding: 16px 18px; }
}
.jcm-result-item:hover {
  border-color: var(--jcm-line-strong);
  box-shadow: var(--jcm-shadow-2);
  transform: translateX(4px);
}
.jcm-result-item-num {
  font-family: var(--jcm-font-display);
  font-style: italic; font-weight: 500;
  font-size: 36px;
  color: var(--jcm-primary);
  line-height: 1; text-align: center;
}
.jcm-result-item-num small {
  font-family: var(--jcm-font-body);
  font-size: 10px; font-style: normal;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--jcm-ink-muted);
  display: block; margin-bottom: 2px;
}
.jcm-result-item-body { min-width: 0; }
.jcm-result-item-cat {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--jcm-accent);
  margin-bottom: 4px;
}
.jcm-result-item-title {
  font-family: var(--jcm-font-serif);
  font-size: 18px; font-weight: 600;
  color: var(--jcm-ink);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.jcm-result-item-snippet {
  font-size: 13px;
  color: var(--jcm-ink-soft);
  line-height: 1.55;
  margin: 6px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jcm-result-item-snippet mark {
  background: var(--jcm-accent-soft);
  color: var(--jcm-primary-dark);
  font-weight: 600;
  padding: 1px 3px;
  border-radius: 2px;
}
.jcm-result-item-tags {
  display: flex; gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.jcm-result-item-tag {
  font-size: 11px;
  color: var(--jcm-ink-muted);
  display: inline-flex; align-items: center; gap: 4px;
}
.jcm-result-item-tag::before {
  content: ""; width: 4px; height: 4px;
  border-radius: 50%; background: var(--jcm-accent);
}
.jcm-result-item-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--jcm-surface-2);
  color: var(--jcm-primary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
@media (max-width: 600px) { .jcm-result-item-arrow { display: none; } }
.jcm-result-item:hover .jcm-result-item-arrow {
  background: var(--jcm-primary);
  color: #fff;
  transform: rotate(-45deg);
}

/* ────────────────────────────────────────────────────────────────────────
   PPT Viewer
   ──────────────────────────────────────────────────────────────────────── */
.jcm-ppt-viewer {
  position: relative;
  background: #000;
  border-radius: var(--jcm-r-lg);
  overflow: hidden;
  box-shadow: var(--jcm-shadow-3);
  margin: 32px 0 80px;
}
.jcm-ppt-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.jcm-ppt-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  display: flex; align-items: center; justify-content: center;
}
.jcm-ppt-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.jcm-ppt-slide-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.jcm-ppt-slide-bg-fallback[data-color="0"] { background: linear-gradient(135deg, #6e1a2a, #4d0f1c); }
.jcm-ppt-slide-bg-fallback[data-color="1"] { background: linear-gradient(135deg, #2c4a6e, #1a3050); }
.jcm-ppt-slide-bg-fallback[data-color="2"] { background: linear-gradient(135deg, #6e4a1a, #4d300f); }
.jcm-ppt-slide-bg-fallback[data-color="3"] { background: linear-gradient(135deg, #4a6e3a, #2d4a25); }
.jcm-ppt-slide-bg-fallback[data-color="4"] { background: linear-gradient(135deg, #6e1a5a, #4d0f3e); }
.jcm-ppt-slide-bg-fallback[data-color="5"] { background: linear-gradient(135deg, #1a5a6e, #0f3d4d); }
.jcm-ppt-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.5) 100%);
}
.jcm-ppt-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 6vh 5vw;
  max-width: 1100px;
  width: 100%;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.jcm-ppt-slide-title {
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}
.jcm-ppt-slide-title-line:first-child {
  font-family: var(--jcm-font-serif);
  font-weight: 600;
  font-size: clamp(36px, 6vw, 80px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.jcm-ppt-slide-title-line:nth-child(2) {
  font-family: var(--jcm-font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 3vw, 36px);
  color: var(--jcm-accent-line);
  opacity: 0.9;
}
.jcm-ppt-slide-title-cat {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

.jcm-ppt-slide-section {
  font-family: var(--jcm-font-display);
  font-style: italic;
  color: var(--jcm-accent-line);
  font-size: clamp(14px, 1.4vw, 18px);
  letter-spacing: 0.15em;
  margin-bottom: 28px;
  opacity: 0.85;
}
.jcm-ppt-slide-lines {
  display: flex; flex-direction: column;
  gap: 18px;
  font-family: var(--jcm-font-serif);
  font-weight: 500;
}
.jcm-ppt-slide-line {
  font-size: clamp(28px, 4.5vw, 56px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.jcm-ppt-controls {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 8px;
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 6px;
  border-radius: 100px;
  z-index: 10;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}
.jcm-ppt-viewer:hover .jcm-ppt-controls,
.jcm-ppt-controls:focus-within { opacity: 1; }
.jcm-ppt-btn {
  background: transparent;
  border: 0;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.jcm-ppt-btn:hover { background: rgba(255,255,255,0.15); }
.jcm-ppt-btn.is-active { background: var(--jcm-primary); }
.jcm-ppt-progress {
  color: rgba(255,255,255,0.85);
  font-family: var(--jcm-font-display);
  font-style: italic;
  font-size: 14px;
  padding: 0 12px;
  white-space: nowrap;
}

/* Fullscreen */
.jcm-ppt-viewer.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  margin: 0;
  border-radius: 0;
  z-index: 99999;
}
.jcm-ppt-viewer.is-fullscreen .jcm-ppt-stage {
  height: 100vh; aspect-ratio: auto;
}

/* ────────────────────────────────────────────────────────────────────────
   PPT Builder
   ──────────────────────────────────────────────────────────────────────── */
.jcm-ppt-builder { padding: 24px 0 80px; }
.jcm-ppt-builder-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--jcm-line);
  margin-bottom: 32px;
}
.jcm-ppt-builder-actions { display: flex; gap: 8px; }

.jcm-notice {
  padding: 14px 20px;
  border-radius: var(--jcm-r-md);
  margin-bottom: 24px;
  font-size: 14px;
}
.jcm-notice-warning { background: var(--jcm-accent-soft); color: var(--jcm-warn); }

.jcm-ppt-builder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}
.jcm-ppt-builder-slide {
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-lg);
  overflow: hidden;
  box-shadow: var(--jcm-shadow-1);
  transition: box-shadow 0.2s ease;
}
.jcm-ppt-builder-slide:hover { box-shadow: var(--jcm-shadow-2); }

.jcm-ppt-builder-preview {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}
.jcm-ppt-builder-preview .jcm-ppt-slide-content {
  /* 미리보기 안에서는 반응형으로 더 작게 */
  padding: 18px 16px;
}
.jcm-ppt-builder-preview .jcm-ppt-slide-title-line:first-child { font-size: clamp(18px, 3vw, 28px); }
.jcm-ppt-builder-preview .jcm-ppt-slide-title-line:nth-child(2) { font-size: clamp(11px, 1.6vw, 16px); }
.jcm-ppt-builder-preview .jcm-ppt-slide-line { font-size: clamp(14px, 2.2vw, 22px); }
.jcm-ppt-builder-preview .jcm-ppt-slide-section { font-size: 11px; margin-bottom: 12px; }

.jcm-ppt-builder-meta {
  padding: 14px 16px 16px;
}
.jcm-ppt-builder-num {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--jcm-ink-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.jcm-ppt-builder-imgs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.jcm-ppt-builder-img {
  aspect-ratio: 1/1;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
}
.jcm-ppt-builder-img img { width: 100%; height: 100%; object-fit: cover; }
.jcm-ppt-builder-img:hover { transform: scale(1.05); }
.jcm-ppt-builder-img.is-selected {
  border-color: var(--jcm-primary);
  box-shadow: 0 0 0 2px var(--jcm-primary-soft);
}

/* ────────────────────────────────────────────────────────────────────────
   Member Youtube Grid (Phase 4)
   ──────────────────────────────────────────────────────────────────────── */
.jcm-myt-section { padding: 32px 0 64px; }
.jcm-myt-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px; margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--jcm-line);
}

.jcm-myt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}
.jcm-myt-card {
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}
.jcm-myt-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--jcm-shadow-3);
  border-color: var(--jcm-line-strong);
}
.jcm-myt-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: #1a1a1a;
}
.jcm-myt-card-thumb::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.6) 100%);
}
.jcm-myt-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.jcm-myt-card:hover .jcm-myt-play { opacity: 1; }
.jcm-myt-duration {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 2px 8px;
  font-size: 11px; font-weight: 600;
  border-radius: 4px;
  z-index: 2;
}
.jcm-myt-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  z-index: 2;
}
.jcm-myt-badge-featured {
  background: var(--jcm-accent);
  color: #fff;
}
.jcm-myt-card-body { padding: 14px 16px 16px; }
.jcm-myt-card-title {
  font-family: var(--jcm-font-serif);
  font-weight: 600;
  font-size: 15px; line-height: 1.4;
  margin: 0 0 8px;
  color: var(--jcm-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.jcm-myt-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--jcm-ink-muted);
}
.jcm-myt-card-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.jcm-myt-card-author { font-weight: 500; }
.jcm-myt-card-tag {
  margin-left: auto;
  background: var(--jcm-surface-2);
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  color: var(--jcm-ink-soft);
}
.jcm-myt-card-song {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--jcm-line);
  font-size: 12px;
  color: var(--jcm-primary);
  text-decoration: none;
  font-family: var(--jcm-font-display);
  font-style: italic;
}
.jcm-myt-card-song:hover { text-decoration: underline; }

/* Submit form */
.jcm-myt-submit {
  background: var(--jcm-surface);
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-lg);
  padding: 28px 32px;
  margin: 32px 0 64px;
  box-shadow: var(--jcm-shadow-2);
}
.jcm-myt-submit-title {
  font-family: var(--jcm-font-serif);
  font-size: 22px; font-weight: 600;
  margin: 0 0 6px;
  color: var(--jcm-ink);
}
.jcm-myt-submit-help {
  color: var(--jcm-ink-muted);
  font-size: 13px;
  margin: 0 0 18px;
}
.jcm-myt-submit-fields {
  display: grid;
  grid-template-columns: 1fr 180px 120px;
  gap: 8px;
  align-items: stretch;
}
.jcm-myt-submit-file-label {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--jcm-ink-muted);
}
.jcm-myt-submit-file-label input[type="file"] {
  padding: 8px 0;
  font: inherit;
  border: 0;
  background: transparent;
  color: var(--jcm-ink);
}
.jcm-myt-submit-attach-hint {
  font-size: 12px;
  color: var(--jcm-ink-muted);
  margin: 8px 0 0;
}
@media (max-width: 700px) { .jcm-myt-submit-fields { grid-template-columns: 1fr; } }
.jcm-myt-submit-fields input {
  padding: 12px 16px;
  font: inherit;
  border: 1px solid var(--jcm-line);
  border-radius: 100px;
  background: var(--jcm-surface);
  color: var(--jcm-ink);
}
.jcm-myt-submit-fields input:focus {
  outline: none;
  border-color: var(--jcm-primary);
  box-shadow: 0 0 0 3px var(--jcm-primary-soft);
}
.jcm-myt-submit-result {
  margin-top: 14px;
  font-size: 13px;
  min-height: 18px;
}
.jcm-myt-submit-result.is-success { color: var(--jcm-ok); }
.jcm-myt-submit-result.is-error   { color: var(--jcm-err); }
.jcm-myt-submit-note {
  font-size: 12px; color: var(--jcm-ink-muted);
  margin: 14px 0 0;
}
.jcm-myt-card-attachment {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--jcm-primary);
  text-decoration: none;
}
.jcm-myt-card-attachment:hover { text-decoration: underline; }

/* ────────────────────────────────────────────────────────────────────────
   Sheets — 악보 뷰어 (Phase 5)
   ──────────────────────────────────────────────────────────────────────── */
/* 악보: 1단(미리보기 전체 폭), 복수 악보는 상단 칩으로만 선택 */
.jcm-sheets-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: auto;
}
.jcm-sheets-layout--single { min-height: auto; }
.jcm-sheets-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.jcm-sheets-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--jcm-line);
  border-radius: 100px;
  background: var(--jcm-surface);
  color: var(--jcm-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  max-width: 100%;
}
.jcm-sheets-chip:hover {
  background: var(--jcm-surface-2);
  border-color: var(--jcm-primary);
}
.jcm-sheets-chip.is-active {
  background: var(--jcm-primary-soft);
  border-color: var(--jcm-primary);
  box-shadow: 0 0 0 1px var(--jcm-primary);
}
.jcm-sheets-chip-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: var(--jcm-surface-2);
  border-radius: 8px;
}
.jcm-sheets-chip.is-active .jcm-sheets-chip-icon {
  background: var(--jcm-primary);
  color: #fff;
}
.jcm-sheets-chip-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
.jcm-sheets-chip-default {
  font-size: 9px;
  font-weight: 700;
  background: var(--jcm-accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.jcm-sheets-viewer {
  background: var(--jcm-bg-deep);
  border: 1px solid var(--jcm-line);
  border-radius: var(--jcm-r-md);
  overflow: hidden;
  position: relative;
}
.jcm-sheets-viewer-inner {
  position: relative;
}

.jcm-sheets-viewer-frame {
  width: 100%;
  min-height: 540px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #fff;
}
.jcm-sheets-viewer-frame iframe,
.jcm-sheets-viewer-frame img {
  border: 0;
  display: block;
}
.jcm-sheets-viewer-frame iframe {
  width: 100%;
  min-height: 540px;
}
/* 세로형 GIF: max-height+contain 이 가로를 과도하게 줄이므로, 표시 폭 600px 기준으로 두고 스크롤로 길이 수용 */
.jcm-sheets-viewer-frame img {
  width: 600px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.jcm-sheets-viewer-fallback {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 30px;
  color: var(--jcm-ink-muted);
  font-style: italic;
  font-family: var(--jcm-font-display);
  font-size: 16px;
  gap: 18px;
  width: 100%;
}

/* ────────────────────────────────────────────────────────────────────────
   Phase 6 — 모바일 최적화
   ──────────────────────────────────────────────────────────────────────── */

/* iOS safe-area */
@supports (padding: max(0px)) {
  .jcm-scope { padding-bottom: env(safe-area-inset-bottom); }
}

/* 곡 목록: 모바일 가로 2열 카드 */
@media (max-width: 600px) {
  .jcm-container { padding: 0 16px; }
  .jcm-page-hero { padding: 36px 0 24px; }
  /* 곡 목록 히어로 안내 문단만 숨김 (검색 등 다른 페이지 .jcm-page-sub 는 유지) */
  .jcm-page-sub--hide-sm { display: none !important; }
  .jcm-toolbar   { gap: 12px; margin: 20px 0 16px; }
  .jcm-song-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 48px;
  }
  /* 기존 모바일 16/9 대비 커버 세로 약 50% → 32/9 (갈색 영역 높이 축소) */
  .jcm-song-card-cover { aspect-ratio: 32/9; }
  .jcm-song-card-num {
    top: 10px;
    left: 10px;
    font-size: clamp(28px, 10vw, 36px);
  }
  .jcm-song-card-num small { font-size: 9px; margin-bottom: 2px; }
  /* 음표 아이콘: 기본 48px 대비 모바일 50% → 24px (.jcm-scope svg 규칙 덮어씀) */
  .jcm-scope svg.jcm-song-card-decor {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
  }
  .jcm-song-card-decor { bottom: 6px; right: 6px; }
  .jcm-song-card-badge { top: 8px; right: 8px; font-size: 9px; padding: 2px 6px; }
  .jcm-song-card-body { padding: 10px 12px 12px; }
  .jcm-song-card-title { font-size: 14px; line-height: 1.25; }
  .jcm-song-card-cat { font-size: 10px; margin-bottom: 4px; }
  .jcm-song-card-meta {
    font-size: 10px;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    flex-wrap: wrap;
  }
  .jcm-song-card-assets { gap: 4px; margin-top: 6px; }
  .jcm-song-card-icon { width: 26px; height: 26px; }
  .jcm-song-card-icon svg { width: 14px; height: 14px; }
}

/* 곡 상세: 모바일 stack */
@media (max-width: 900px) {
  .jcm-detail-grid { gap: 24px; margin-bottom: 56px; }
  /* 모바일: 기존 16/9 대비 세로 약 절반 → 32/9 */
  .jcm-song-cover-large { aspect-ratio: 32/9; }
  .jcm-song-cover-large-num strong { font-size: clamp(36px, 11vw, 48px); }
  .jcm-detail-title { font-size: clamp(28px, 7vw, 36px); }
  .jcm-tabs-bar { margin-bottom: 22px; }
  .jcm-tab-btn { margin-right: 22px; padding: 12px 2px; font-size: 13px; }
  .jcm-lyrics-paper { padding: 32px 20px; }
  .jcm-lyric-line { font-size: 17px; }
}

/* 곡 상세 — 모바일: 본문 컨테이너 좌우 10px, 가사창 내부 왼쪽 10px, 14px 글자·줄바꿈 */
@media (max-width: 767px) {
  /* 슬라이드 스튜디오 진입 CTA — 모바일에서 숨김 */
  .jcm-song-actions--slide {
    display: none !important;
  }

  /* 히어로(커버)·버튼·제목·탭·가사 박스까지 동일 외곽 여백 */
  .jcm-container:has(.jcm-detail-grid) {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  /* 가상 라우트: 외곽 .jcm-virtual-inner 인라인 padding:0 32px… 덮어씀 */
  body.jcm-virtual-song-page main#primary.site-main.jcm-virtual-page > .jcm-container.jcm-virtual-inner:has(.jcm-detail-grid),
  body.jcm-virtual-song-page main.site-main.jcm-virtual-page > .jcm-container.jcm-virtual-inner:has(.jcm-detail-grid) {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .jcm-detail-main .jcm-tab-panel[data-tab="lyrics"] .jcm-lyrics-tools {
    padding-left: 0;
    padding-right: 0;
  }
  .jcm-detail-main .jcm-lyrics-paper {
    padding-left: 10px !important;
    padding-right: 0 !important;
    padding-top: 28px;
    padding-bottom: 28px;
    border-radius: var(--jcm-r-md);
  }
  .jcm-detail-main .jcm-lyrics-paper::before {
    left: 10px;
    right: 48px;
  }
  .jcm-detail-main .jcm-lyrics-paper::after {
    left: 10px;
    right: 0;
  }
  .jcm-detail-main .jcm-lyrics-copy {
    top: 10px;
    right: 2px;
  }
  .jcm-detail-main .jcm-lyric-section {
    margin-bottom: 22px;
  }
  .jcm-detail-main .jcm-lyric-line {
    font-size: 14px !important;
    line-height: 1.72;
    letter-spacing: 0;
    padding: 3px 0;
    margin-left: 0;
    margin-right: 0;
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-hyphens: none;
    hyphens: none;
  }
  .jcm-detail-main .jcm-lyric-version[data-lang="en"] .jcm-lyric-line {
    word-break: normal;
    overflow-wrap: break-word;
  }
}

/* PPT 뷰어: 모바일 풀스크린 + 큰 컨트롤 */
@media (max-width: 768px) {
  .jcm-ppt-controls { bottom: 16px; gap: 4px; padding: 4px; opacity: 0.7; }
  .jcm-ppt-btn { width: 44px; height: 44px; font-size: 18px; } /* 손가락 친화 */
  .jcm-ppt-progress { font-size: 13px; padding: 0 10px; }
  .jcm-ppt-slide-content { padding: 4vh 4vw; }
  .jcm-ppt-slide-line { font-size: clamp(22px, 6vw, 32px); }
  .jcm-ppt-slide-section { font-size: 12px; margin-bottom: 18px; }
}

/* PPT viewer 풀스크린 — iOS Safari 대응 (CSS only) */
.jcm-ppt-viewer.is-css-fullscreen {
  position: fixed !important;
  top: 0; left: 0; right: 0; bottom: 0;
  margin: 0;
  border-radius: 0;
  z-index: 99999;
  background: #000;
}
.jcm-ppt-viewer.is-css-fullscreen .jcm-ppt-stage {
  height: 100vh !important;
  height: 100dvh !important; /* dynamic viewport */
  aspect-ratio: auto;
}

/* 검색: 모바일에서 사이드 필터 → 상단 칩 */
@media (max-width: 800px) {
  .jcm-search-layout { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
  .jcm-search-filters {
    position: static;
    background: var(--jcm-surface);
    border: 1px solid var(--jcm-line);
    border-radius: var(--jcm-r-md);
    padding: 12px;
  }
  .jcm-filter-group { margin-bottom: 12px; }
  .jcm-filter-group:last-child { margin-bottom: 0; }
  .jcm-filter-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 4px 0 8px;
    scrollbar-width: thin;
  }
  .jcm-filter-list li {
    flex: 0 0 auto;
    padding: 6px 12px;
    background: var(--jcm-surface-2);
    border-radius: 100px;
    white-space: nowrap;
  }
  .jcm-filter-list li.is-active { background: var(--jcm-primary); color: #fff; }
  .jcm-filter-list li.is-active .count { color: rgba(255,255,255,0.85); }
}

/* 회원 유튜브: 모바일에서 2열 → 1열 */
@media (max-width: 480px) {
  .jcm-myt-grid { grid-template-columns: 1fr; gap: 16px; }
  .jcm-myt-submit { padding: 18px 18px 22px; }
  .jcm-myt-submit-fields { grid-template-columns: 1fr; }
}

/* PPT 빌더: 모바일 터치 친화 */
@media (max-width: 768px) {
  .jcm-ppt-builder-grid { grid-template-columns: 1fr; gap: 16px; }
  .jcm-ppt-builder-imgs { grid-template-columns: repeat(4, 1fr); }
  .jcm-ppt-builder-img { min-height: 44px; min-width: 44px; }
}

/* 악보: 모바일 */
@media (max-width: 800px) {
  .jcm-sheets-strip { gap: 6px; }
  .jcm-sheets-chip-label { max-width: 56vw; }
  .jcm-sheets-viewer-frame { min-height: 60vh; }
  .jcm-sheets-viewer-frame iframe { min-height: 60vh; }
}

/* 모바일 탭바 가로 스크롤 강화 */
@media (max-width: 600px) {
  .jcm-tabs-bar {
    margin-left: -16px;
    margin-right: -16px;
    padding: 0 16px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}

/* 가로 모드 (landscape) - PPT 풀스크린 강화 */
@media (max-width: 900px) and (orientation: landscape) {
  .jcm-ppt-controls { bottom: 8px; opacity: 0.5; }
  .jcm-ppt-slide-content { padding: 2vh 6vw; }
}

/* ────────── Full bleed: 테마 본문(예: 680px) 안의 숏코드를 화면 폭까지 확장 ──────────
 * .jcm-container 는 여전히 max-width:1280px 로 내부 콘텐츠 정렬
 * 좁은 박스에 두려면: [jcm_song_list contained="1"] 또는 상위에 overflow:hidden 금지
 */
.jcm-scope.jcm-scope--full-bleed {
  isolation: isolate;
}
@media (max-width: 782px) {
  .jcm-scope.jcm-scope--full-bleed {
    position: relative;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
  }
}
@media (min-width: 783px) {
  .jcm-scope.jcm-scope--full-bleed {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    transform: translateX(-50%);
  }
}
