/* R-ADV-1206-0331 찬양하기 - 홈(행별 가로 카드)·재생 화면·가사 시트·재생목록 시트.
   유튜브 뮤직 배치를 참고한 새 마크업/새 그림(복제 0). 홈은 사이트 색(라이트/다크), 재생 화면은 항상 어두운 바탕. */

/* ---------- 홈 ---------- */
.pr-home { padding-bottom: 88px; }
.pr-home-h1 { font: 800 1.5rem/1.2 var(--font-family); color: var(--ink); margin: 0 0 6px; letter-spacing: -.3px; }
.pr-row { margin: 22px 0 4px; }
.pr-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.pr-row-title { margin: 0; font: 800 1.25rem/1.3 var(--font-family); color: var(--ink); letter-spacing: -.4px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-row-emoji { margin-right: 6px; font-size: 1.05em; }
.pr-row[data-recent="1"] .pr-row-title::after { content: "최근"; margin-left: 8px; padding: 2px 7px; border-radius: 999px; vertical-align: 3px;
  font: 700 .6875rem/1.4 var(--font-family); color: var(--brand); border: 1px solid var(--brand); }
.pr-playall { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line, #d0d4dc);
  background: transparent; color: var(--ink); font: 700 .875rem/1 var(--font-family); cursor: pointer; position: relative; }
.pr-playall::after { content: ""; position: absolute; inset: -4px 0; }
.pr-playall:hover { border-color: var(--brand); color: var(--brand); }
.pr-cards { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 320px); gap: 12px; overflow-x: auto; overflow-y: hidden;
  margin: 0 -12px; padding: 0 12px 6px; scroll-snap-type: x mandatory; scroll-padding-inline: 12px; scrollbar-width: none;
  overscroll-behavior-x: contain; }
.pr-cards::-webkit-scrollbar { display: none; }
.pr-row:first-of-type .pr-cards { grid-auto-columns: min(88%, 380px); }
.pr-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left;
  color: var(--ink); cursor: pointer; scroll-snap-align: start; font: inherit; }
.pr-card-thumb { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg2, #eef1f6); }
.pr-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.pr-card:hover .pr-card-thumb img { transform: scale(1.03); }
.pr-card:active .pr-card-thumb { transform: scale(.985); }
.pr-card-title { margin-top: 6px; font: 700 .9375rem/1.35 var(--font-family); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-card-sub { font: 500 .8125rem/1.35 var(--font-family); color: var(--caption, #6b7280); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-card:focus-visible, .pr-playall:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 10px; }
@media (min-width: 1024px) {
  .pr-cards { grid-auto-columns: 280px; margin: 0; padding: 0 0 6px; }
  .pr-row:first-of-type .pr-cards { grid-auto-columns: 360px; }
}

/* ---------- 내렸을 때 = 아래 미니 재생줄(재생 화면 자체가 60px 줄로 줄어듦, 영상은 썸네일 자리에 계속 보임) ---------- */
body.pr-has-mini .pr-home { padding-bottom: 150px; }

/* ---------- 재생 화면(공통) ---------- */
.pr-player { position: fixed; inset: 0; z-index: 1070; background: #000; color: #fff; overflow: hidden; overscroll-behavior: contain;
  touch-action: none; transform: translateY(0); transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s; font-family: var(--font-family); }
.pr-player[hidden] { display: block !important; transform: translateY(100%); pointer-events: none; visibility: hidden; transition: transform .3s, visibility 0s .3s; }
.pr-player.pr-entering { transform: translateY(100%); }
.pr-ibtn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #fff; cursor: pointer; flex: none; text-decoration: none; position: relative; }
.pr-ibtn svg { width: 24px; height: 24px; fill: currentColor; }
.pr-ibtn svg[fill="none"] { fill: none; }
.pr-ibtn:hover { background: rgba(255,255,255,.08); color: #fff; }
.pr-ibtn:focus-visible, .pr-pill:focus-visible, .pr-playbtn:focus-visible, .pr-chip:focus-visible, .pr-sheet-peek:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pr-i-play { display: none; }
.pr-paused .pr-i-pause { display: none; }
.pr-paused .pr-i-play { display: inline; }

.pr-backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(28px) saturate(1.2) brightness(.45);
  transform: scale(1.15); opacity: 0; pointer-events: none; }
.pr-top { position: absolute; left: 0; right: 0; top: 0; height: 56px; padding: env(safe-area-inset-top) 8px 0; display: flex; align-items: center; justify-content: space-between; z-index: 3; }
.pr-top-label { font: 700 .9375rem/1 var(--font-family); color: #ddd; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.08); }
.pr-fullbar { position: absolute; left: 0; right: 0; top: 0; height: 64px; padding: env(safe-area-inset-top) 8px 0 16px; display: flex; align-items: center; gap: 12px;
  background: #000; z-index: 6; opacity: 0; pointer-events: none; }
.pr-fullbar.on { pointer-events: auto; }
.pr-fullbar-slot { width: 64px; height: 36px; flex: none; }
.pr-fullbar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: transparent; color: #fff; text-align: left; cursor: pointer; }
.pr-fullbar-title { font: 700 .9375rem/1.25 var(--font-family); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-fullbar-artist { font: 500 .8125rem/1.2 var(--font-family); color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pr-video { position: absolute; left: 0; top: 0; transform-origin: 0 0; background: #000; z-index: 2; border-radius: 0; overflow: hidden; will-change: transform; }
.pr-video iframe, .pr-video #prYT { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.pr-video-shield { position: absolute; inset: 0; display: none; }
.pr-dragging .pr-video-shield { display: block; }
.pr-video.pr-video-small { z-index: 7; border-radius: 4px; }

.pr-dock { position: absolute; left: 0; right: 0; top: 0; padding: 0 20px; z-index: 3; will-change: transform; }
.pr-meta { padding-top: 6px; will-change: transform; }
.pr-title { font: 800 1.375rem/1.3 var(--font-family); letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-artist { margin-top: 2px; font: 500 1rem/1.3 var(--font-family); color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-actions { display: flex; gap: 8px; margin: 16px -20px 0; padding: 0 20px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
.pr-actions::-webkit-scrollbar { display: none; }
.pr-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; padding: 0 14px; border-radius: 999px; border: 0;
  background: rgba(255,255,255,.12); color: #fff; font: 700 .875rem/1 var(--font-family); text-decoration: none; cursor: pointer; }
.pr-pill:hover { background: rgba(255,255,255,.18); color: #fff; }
.pr-pill svg { width: 20px; height: 20px; flex: none; }
.pr-pill[hidden] { display: none; }
.pr-pill-like { padding: 0; gap: 0; }
.pr-pill-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 14px; border: 0; background: transparent; color: #fff;
  font: 700 .875rem/1 var(--font-family); cursor: pointer; border-radius: 999px; }
.pr-pill-btn + .pr-pill-sep + .pr-pill-btn { padding: 0 14px 0 12px; }
.pr-pill-btn svg { width: 20px; height: 20px; }
.pr-pill-btn[aria-pressed="true"] svg, .pr-pill[aria-pressed="true"] svg { fill: currentColor; }
.pr-pill-sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); }
.pr-progress { margin-top: 18px; }
#prSeek { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; touch-action: pan-x; --pr-pct: 0%; }
#prSeek::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, #fff var(--pr-pct), rgba(255,255,255,.25) var(--pr-pct)); }
#prSeek::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); }
#prSeek::-moz-range-progress { height: 4px; border-radius: 2px; background: #fff; }
#prSeek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #fff; }
#prSeek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.pr-times { display: flex; justify-content: space-between; font: 500 .8125rem/1 var(--font-family); color: #aaa; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pr-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pr-ctl svg { width: 28px; height: 28px; }
#prShuffle svg, #prRepeat svg { width: 24px; height: 24px; }
.pr-ctl[aria-pressed="true"], #prRepeat:not([data-mode="off"]) { color: #fff; }
#prShuffle[aria-pressed="false"], #prRepeat[data-mode="off"] { color: rgba(255,255,255,.55); }
.pr-repeat-one { position: absolute; top: 9px; right: 7px; font: 800 9px/1 var(--font-family); display: none; }
#prRepeat[data-mode="one"] .pr-repeat-one { display: block; }
.pr-playbtn { width: 72px; height: 72px; border-radius: 50%; border: 0; background: #fff; color: #000; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.pr-playbtn svg { width: 34px; height: 34px; fill: currentColor; }
.pr-playbtn:active { transform: scale(.95); }

/* 재생목록 시트 */
.pr-sheet { position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; flex-direction: column; background: #0f0f0f;
  border-radius: 16px 16px 0 0; will-change: transform; }
.pr-anim { transition: transform .34s cubic-bezier(.2,.8,.2,1), opacity .34s ease; }
.pr-sheet-drag { flex: none; touch-action: none; cursor: grab; position: relative; }
.pr-dragging .pr-sheet-drag { cursor: grabbing; }
.pr-grip { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); margin: 10px auto 0; }
.pr-sheet-peek { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; padding: 8px 20px 10px; border: 0; background: transparent; color: #fff; cursor: pointer; }
.pr-peek-label { font: 700 .8125rem/1.2 var(--font-family); color: #aaa; }
.pr-peek-name { font: 700 .9375rem/1.3 var(--font-family); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-sheet-head { position: absolute; left: 0; right: 0; top: 18px; padding: 8px 20px 0; opacity: 0; pointer-events: none; }
.pr-sheet-title { font: 800 1.125rem/1.3 var(--font-family); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-chips { flex: none; display: flex; gap: 10px; padding: 2px 16px 12px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
.pr-chips::-webkit-scrollbar { display: none; }
.pr-chip { flex: none; width: 56px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: #cfcfcf; cursor: pointer; }
.pr-chip-ring { box-sizing: border-box; width: 46px; height: 46px; border-radius: 50%; padding: 2.5px; background: #3a3a3a; display: flex; }
.pr-chip-face { box-sizing: border-box; width: 100%; height: 100%; border-radius: 50%; background: #1e2638; border: 2px solid #0f0f0f;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem; line-height: 1; }
.pr-chip-lbl { font: 500 .75rem/1.1 var(--font-family); white-space: nowrap; }
.pr-chip[aria-pressed="true"] .pr-chip-ring { background: conic-gradient(from 220deg, #7492ca, #d9598c, #f0a04b, #7492ca); }
.pr-chip[aria-pressed="true"] .pr-chip-lbl { color: #fff; font-weight: 800; }
.pr-queue { flex: 1 1 auto; min-height: 0; margin: 0; padding: 0 0 24px; list-style: none; overflow: hidden; overscroll-behavior: contain; }
.pr-sheet.pr-full .pr-queue { overflow-y: auto; touch-action: pan-y; }
.pr-q { display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 16px; cursor: pointer; }
.pr-q:hover { background: rgba(255,255,255,.05); }
.pr-q-thumb { position: relative; width: 56px; height: 56px; flex: none; border-radius: 4px; overflow: hidden; background: #222; }
.pr-q-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-q-eq { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 3px; background: rgba(0,0,0,.5); }
.pr-q-eq i { width: 3px; height: 12px; background: #fff; border-radius: 1px; animation: prEq .9s ease-in-out infinite; }
.pr-q-eq i:nth-child(2) { animation-delay: -.3s; height: 18px; }
.pr-q-eq i:nth-child(3) { animation-delay: -.6s; }
.pr-paused .pr-q-eq i { animation-play-state: paused; }
@keyframes prEq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
.pr-q.cur { background: rgba(255,255,255,.08); }
.pr-q.cur .pr-q-eq { display: flex; }
.pr-q-text { flex: 1; min-width: 0; }
.pr-q-title { font: 700 .9375rem/1.3 var(--font-family); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-q-sub { font: 500 .8125rem/1.3 var(--font-family); color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-q-handle { width: 24px; height: 24px; color: #bbb; flex: none; }

/* 가사 시트 */
.pr-lyrics { position: absolute; left: 0; right: 0; bottom: 0; top: 64px; z-index: 8; display: flex; flex-direction: column;
  background: linear-gradient(160deg, #3a3532 0%, #1d1d1d 55%, #2a2526 100%); border-radius: 16px 16px 0 0;
  transform: translateY(105%); transition: transform .34s cubic-bezier(.2,.8,.2,1); }
.pr-lyrics.open { transform: translateY(0); }
.pr-lyrics-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.pr-lyrics-head h2 { margin: 0; font: 800 1.125rem/1 var(--font-family); }
.pr-lyrics-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 24px; touch-action: pan-y; overscroll-behavior: contain; }
.pr-lyrics-body p { margin: 0 0 18px; font: 800 1.375rem/1.4 var(--font-family); letter-spacing: -.3px; word-break: keep-all; }
.pr-lyrics-body p.gap { margin: 0 0 14px; height: 4px; }
.pr-lyrics-src { flex: none; margin: 0; padding: 10px 24px calc(14px + env(safe-area-inset-bottom)); font: 500 .75rem/1.4 var(--font-family); color: #bbb; border-top: 1px solid rgba(255,255,255,.08); }

.pr-toast { position: absolute; left: 50%; bottom: 32px; z-index: 20; transform: translate(-50%, 20px); opacity: 0; padding: 10px 16px; border-radius: 8px;
  background: #fff; color: #111; font: 700 .875rem/1.3 var(--font-family); transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.pr-toast.on { opacity: 1; transform: translate(-50%, 0); }

body.pr-open { overflow: hidden; }
.pr-fullbar-close { display: none; }
.pr-player.pr-min { top: auto; bottom: calc(var(--tp-tabbar-height, 58px) + env(safe-area-inset-bottom)); height: 60px; z-index: 1045;
  background: #212121; border-top: 1px solid #2d2d2d; touch-action: auto; transition: none; }
.pr-player.pr-min > :not(.pr-fullbar):not(.pr-video) { display: none !important; }
.pr-player.pr-min .pr-fullbar { opacity: 1 !important; pointer-events: auto; height: 60px; padding: 0 4px 0 12px; background: transparent; }
.pr-player.pr-min .pr-fullbar-close { display: inline-flex; }
.pr-player.pr-min .pr-video { position: absolute !important; left: 12px; top: 12px; width: 64px !important; height: 36px !important;
  transform: none !important; margin: 0; aspect-ratio: auto; border-radius: 4px; z-index: 7; }
@media (min-width: 1024px) { .pr-player.pr-min { display: block; bottom: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pr-player, .pr-lyrics, .pr-anim { transition: none; }
}

/* ---------- 데스크톱(>=1024px): 왼쪽 영상·조작, 오른쪽 재생목록(늘 펼침) ---------- */
@media (min-width: 1024px) {
  .pr-player { display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: 64px minmax(0, 1fr) auto; touch-action: auto; }
  .pr-top { position: relative; grid-column: 1 / -1; grid-row: 1; height: 64px; padding: 0 16px; }
  .pr-fullbar { display: none; }
  .pr-video { position: relative; grid-column: 1; grid-row: 2; transform: none !important; width: auto !important; height: auto !important;
    margin: 8px 32px 0; align-self: center; aspect-ratio: 16 / 9; max-height: 100%; border-radius: 12px; }
  .pr-dock { position: relative; grid-column: 1; grid-row: 3; transform: none !important; padding: 8px 32px 28px; max-width: 860px; width: 100%; justify-self: center; }
  .pr-meta { transform: none !important; }
  .pr-actions { opacity: 1 !important; }
  .pr-sheet { position: relative; grid-column: 2; grid-row: 2 / 4; transform: none !important; height: auto !important; border-radius: 0;
    background: #121212; border-left: 1px solid #222; }
  .pr-sheet-drag { cursor: default; }
  .pr-grip, .pr-sheet-peek { display: none; }
  .pr-sheet-head { position: static; opacity: 1 !important; padding: 16px 20px 10px; pointer-events: auto; }
  .pr-queue { overflow-y: auto; }
  .pr-lyrics { left: auto; width: 420px; top: 64px; border-radius: 0; }
}
