*{box-sizing:border-box}
:root{
  --navy-0:#06101a;
  --navy-1:#0b1825;
  --navy-2:#11283a;
  --line:rgba(211,233,246,.20);
  --line-soft:rgba(211,233,246,.09);
  --text:#f3f7f8;
  --muted:rgba(231,241,245,.58);
  --sky:#b9dff2;
  --sand:#e7d8b6;
}
body{margin:0;min-height:100vh;background:#030b12;color:var(--text);font-family:"Malgun Gothic","Noto Sans KR",sans-serif;overflow-x:hidden}
#bg{position:fixed;inset:-35px;background-size:cover;background-position:center;filter:blur(64px) brightness(.30) saturate(.82);z-index:0;transition:background-image 2s ease-in-out;animation:ambientParallax 18s linear infinite alternate;will-change:transform,filter}
#bg::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(2,11,18,.18),rgba(2,11,18,.72) 72%,rgba(2,8,13,.94))}
@keyframes ambientParallax{0%{transform:scale(1.10) translate(0,0)}50%{transform:scale(1.15) translate(-16px,-12px)}100%{transform:scale(1.10) translate(0,0)}}
.player{position:relative;z-index:1;width:100%;max-width:430px;min-height:100vh;margin:0 auto;padding:18px 14px 28px;background:linear-gradient(180deg,rgba(8,21,32,.76),rgba(3,11,18,.96));box-shadow:0 0 90px rgba(0,0,0,.60);border-left:1px solid rgba(255,255,255,.03);border-right:1px solid rgba(255,255,255,.03)}
.cover{position:relative;overflow:hidden;isolation:isolate;aspect-ratio:16/9;border-radius:26px;border:1px solid var(--line);background:var(--navy-1);box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 18px 55px rgba(0,0,0,.40),0 0 40px rgba(120,190,220,.08)}
.cover::after{content:"";position:absolute;right:-18px;bottom:-2px;display:block;width:116px;aspect-ratio:1408/321;border:0;border-radius:999px;background:radial-gradient(circle at 14% 50%,#1c0b0b 0 6.5%,#050505 7% 11%,transparent 11.5%),radial-gradient(circle at 29% 50%,#1c1809 0 6.5%,#050505 7% 11%,transparent 11.5%),radial-gradient(circle at 44% 50%,#0b1a0c 0 6.5%,#050505 7% 11%,transparent 11.5%),linear-gradient(180deg,#151515 0%,#030303 50%,#0c0c0c 100%);box-shadow:none;transform:none;animation:none;transition:none;pointer-events:none;z-index:19}
@keyframes kenburns{from{transform:scale(1)}to{transform:scale(1.10)}}
.cover>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:25px;animation:kenburns 9s linear forwards;transition:opacity 1.5s ease-in-out}
.song-info{display:none!important}
.song-nav{margin:16px 3px 18px;padding:13px 15px;border:1px solid var(--line);border-radius:19px;background:linear-gradient(135deg,rgba(11,27,41,.86),rgba(18,43,61,.58));box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 12px 30px rgba(0,0,0,.18);text-align:center;font-size:11px;line-height:1.55;color:var(--muted);backdrop-filter:blur(14px)}
.song-nav div{margin:3px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#currentTitle{color:var(--sand);font-weight:700;font-size:12px}
.progress{margin:25px 3px 26px}.time-row{display:flex;align-items:center;gap:12px;padding:0 3px}.progress input{width:100%;height:4px;accent-color:var(--sky);cursor:pointer}#currentTime,#remainTime{min-width:45px;text-align:center;color:rgba(220,237,245,.53);font-size:11px;font-variant-numeric:tabular-nums}
.controls{display:flex;justify-content:center;align-items:center;gap:15px;margin-bottom:29px}.controls button{width:52px;height:52px;border-radius:50%;border:1px solid var(--line);background:linear-gradient(145deg,rgba(19,43,60,.86),rgba(7,20,31,.82));color:#eef7fa;font-size:20px;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 8px 18px rgba(0,0,0,.22);transition:transform .2s ease,border-color .2s ease,background .2s ease}.controls button:hover{transform:translateY(-1px);border-color:rgba(185,223,242,.38);background:linear-gradient(145deg,rgba(26,57,78,.95),rgba(10,28,42,.90))}#play{width:72px;height:72px;font-size:27px;color:var(--sand);border-color:rgba(231,216,182,.34)}
.playlist{padding:17px 5px 10px}.playlist h2{margin:0 0 14px;padding:0 8px;font-size:11px;letter-spacing:2.4px;color:var(--sky);opacity:.78}.notice{margin:0 3px 14px;padding:9px 12px;border:1px solid var(--line-soft);border-radius:13px;background:rgba(255,255,255,.025);font-size:11px;line-height:1.45;color:rgba(232,242,246,.46);text-align:center;letter-spacing:-.2px}.tabs{display:flex;justify-content:center;gap:8px;margin:0 0 13px}.tab-btn{background:rgba(10,25,38,.68);border:1px solid var(--line);color:rgba(211,233,246,.66);padding:6px 14px;cursor:pointer;border-radius:999px;font-size:10px;transition:.25s}.tab-btn.active{background:linear-gradient(135deg,var(--sky),#d9ebf2);color:#0a1822;font-weight:800;border-color:transparent;box-shadow:0 4px 15px rgba(130,195,225,.16)}
#playlist{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:22px;overflow:hidden;background:linear-gradient(180deg,rgba(10,26,39,.78),rgba(5,17,27,.72));box-shadow:inset 0 1px 0 rgba(255,255,255,.05)}
.playlist li{display:grid;grid-template-columns:42px 30px minmax(0,1fr);align-items:center;gap:12px;padding:12px 13px;border-bottom:1px solid rgba(211,233,246,.055);cursor:pointer;transition:background .22s ease,transform .22s ease}.playlist li:last-child{border-bottom:0}.playlist li:hover{background:rgba(185,223,242,.055)}.playlist li.active{background:linear-gradient(90deg,rgba(185,223,242,.15),rgba(231,216,182,.06));box-shadow:inset 3px 0 0 var(--sky)}.playlist-thumb{width:42px;height:42px;object-fit:cover;border-radius:10px;border:1px solid rgba(255,255,255,.11);box-shadow:0 5px 14px rgba(0,0,0,.24)}.playlist-index{font-size:11px;color:rgba(211,233,246,.37);font-variant-numeric:tabular-nums}.playlist-name{min-width:0;color:rgba(239,246,248,.76);font-size:12px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playlist li.active .playlist-index{color:var(--sky);font-weight:700}.playlist li.active .playlist-name{color:#fff;font-weight:700}
.cover-video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;opacity:0;z-index:3;transition:opacity 1.5s ease-in-out;pointer-events:none;background:#07131d}.cover-video.is-active{opacity:1}.video-logo{position:absolute;right:-20px;bottom:-2px;display:block;width:118px;height:auto;padding:0;margin:0;background:transparent;border:0;box-shadow:none;opacity:1;transform:translate3d(0,0,0);transition:opacity .25s ease;pointer-events:none;z-index:20;overflow:hidden}.video-logo-image{position:relative!important;inset:auto!important;display:block;width:100%;height:auto!important;object-fit:contain!important;object-position:center;opacity:1!important;transition:none!important;animation:none!important;transform:none!important;border-radius:0!important;aspect-ratio:auto!important;pointer-events:none;user-select:none}.video-logo.show{opacity:1}
.srt-overlay{position:absolute;left:0;bottom:0;width:100%;padding:20px 16px 9px;border-radius:0 0 25px 25px;background:linear-gradient(180deg,transparent,rgba(3,12,18,.72));text-align:center;pointer-events:none;z-index:15;text-shadow:0 1px 5px rgba(0,0,0,.95)}.srt-current{min-height:18px;color:#f7fbfc;font-size:14px;line-height:1.3;font-weight:700;letter-spacing:-.2px}.srt-next{min-height:14px;margin-top:2px;color:rgba(225,239,244,.57);font-size:11px;line-height:1.3;font-weight:400;letter-spacing:-.2px}
@media(max-width:430px){.player{padding-top:14px}.srt-overlay{padding:18px 12px 7px}.srt-current{font-size:13px}.srt-next{font-size:10px}}

/* ===== INTERNAL QA FULLSCREEN — F9, internal server only ===== */
.cover:fullscreen,
.cover:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  aspect-ratio: auto;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

.cover:fullscreen > img,
.cover:fullscreen > video,
.cover:-webkit-full-screen > img,
.cover:-webkit-full-screen > video {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
  background: #000;
}

.cover:fullscreen .srt-overlay,
.cover:-webkit-full-screen .srt-overlay {
  border-radius: 0;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

/* ===== DISTRIBUTION FULLSCREEN ENTRY ===== */
.theater-entry{
  display:flex;
  justify-content:center;
  margin:-10px 0 14px;
}
#theaterBtn{
  border:1px solid rgba(217,168,91,.28);
  border-radius:999px;
  padding:7px 18px;
  background:rgba(20,18,15,.44);
  color:rgba(244,234,220,.72);
  font-size:11px;
  letter-spacing:.08em;
  cursor:pointer;
}
#theaterBtn:hover{color:#f4eadc;border-color:rgba(217,168,91,.52);}

/* ===== FULLSCREEN VISUAL SCALE FIX v2 =====
   F9 QA와 배포용 전체화면이 같은 기준 화면을 사용한다.
   영상/이미지는 16:9 전체 화면, SRT와 신호등은 검수 기준 크기로 고정한다. */
.cover:fullscreen .video-logo,
.cover:-webkit-full-screen .video-logo{
  right:-34px;
  bottom:-8px;
  width:clamp(180px, 14vw, 300px);
  z-index:60;
}

.cover:fullscreen .srt-overlay,
.cover:-webkit-full-screen .srt-overlay{
  left:0;
  bottom:0;
  width:100%;
  padding:clamp(14px,1.25vw,24px) clamp(22px,2vw,38px) clamp(24px,2vw,38px);
  background:rgba(7,5,3,.16);
  z-index:45;
  text-shadow:0 2px 8px rgba(0,0,0,.96);
}

.cover:fullscreen .srt-current,
.cover:-webkit-full-screen .srt-current{
  min-height:1.35em;
  font-size:clamp(30px,2.55vw,46px);
  line-height:1.22;
  font-weight:500;
  letter-spacing:-.7px;
}

.cover:fullscreen .srt-next,
.cover:-webkit-full-screen .srt-next{
  min-height:1.25em;
  margin-top:clamp(4px,.45vw,8px);
  font-size:clamp(22px,1.9vw,34px);
  line-height:1.22;
  font-weight:400;
  letter-spacing:-.5px;
}

/* ===== FULLSCREEN MINI PLAYLIST — SINGLE SOURCE ===== */
.fullscreen-ui-layer {
  position: absolute;
  inset: 0;
  z-index: 2147482000;
  overflow: visible;
  pointer-events: none;
  isolation: isolate;
}

.fullscreen-playlist-trigger {
  display: none;
}

.fullscreen-mini-playlist {
  position: absolute;
  left: clamp(26px, 3vw, 58px);
  bottom: clamp(76px, 9.5vh, 128px);
  z-index: 2147483000;
  width: max-content;
  max-width: min(420px, 38vw);
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-align: left;
  text-shadow: 0 2px 7px rgba(0,0,0,1);
}

.fullscreen-mini-playlist.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fullscreen-mini-transport {
  position: absolute;
  left: clamp(26px, 3vw, 58px);
  bottom: clamp(42px, 6vh, 92px);
  z-index: 2147483000;
  display: flex;
  align-items: center;
  width: min(315px, 28.5vw);
  gap: 9px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  color: rgba(255,255,255,.9);
  text-shadow: 0 2px 7px rgba(0,0,0,1);
}

.fullscreen-mini-transport.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fullscreen-mini-transport button {
  flex: 0 0 auto;
  width: 18px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  line-height: 22px;
  cursor: pointer;
}

.fullscreen-mini-transport input {
  flex: 1 1 auto;
  min-width: 0;
  height: 2px;
  margin: 0;
  accent-color: rgba(255,255,255,.92);
  cursor: pointer;
}

.fullscreen-mini-playlist li {
  margin: 0;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.48);
  font-size: clamp(14px,1.05vw,20px);
  line-height: 1.42;
  font-weight: 400;
  letter-spacing: -.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.fullscreen-mini-playlist li:hover {
  color: rgba(255,255,255,.72);
}

.fullscreen-mini-playlist li.is-current {
  color: rgba(255,255,255,.98);
  font-weight: 600;
}

.cover:fullscreen .fullscreen-ui-layer,
.cover:-webkit-full-screen .fullscreen-ui-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

.cover:fullscreen .fullscreen-playlist-trigger,
.cover:-webkit-full-screen .fullscreen-playlist-trigger {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 25vw;
  height: 100%;
  z-index: 2147482999;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

/* 기존 하단 전체화면 버튼은 숨기고 워십 마스터의 커버 버튼을 사용한다. */
.theater-entry,
#theaterBtn {
  display: none !important;
}

/* ===== COVER USER FULLSCREEN BUTTON — WORSHIP MASTER ===== */
.cover-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2147483100;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(0,0,0,.34);
  color: rgba(255,255,255,.88);
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,.9);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  opacity: .82;
  transition: opacity .18s ease, background .18s ease, border-color .18s ease;
}
.cover-fullscreen-btn:hover,
.cover-fullscreen-btn:focus-visible {
  opacity: 1;
  background: rgba(0,0,0,.56);
  border-color: rgba(255,255,255,.34);
  outline: none;
}
.cover:fullscreen .cover-fullscreen-btn,
.cover:-webkit-full-screen .cover-fullscreen-btn {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  font-size: 30px;
  background: rgba(0,0,0,.36);
}
@media (max-width: 430px) {
  .cover-fullscreen-btn {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 20px;
  }
  .cover:fullscreen .cover-fullscreen-btn,
  .cover:-webkit-full-screen .cover-fullscreen-btn {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
    font-size: 26px;
  }
}

/* 세로 전체화면 진입 안내: 글씨만 1초 표시 */
.portrait-orientation-hint {
  position: fixed;
  left: 50%;
  top: max(68px, calc(env(safe-area-inset-top) + 58px));
  z-index: 2147483200;
  display: none;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 48px);
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -.3px;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
@media (orientation: portrait) {
  .cover:fullscreen .portrait-orientation-hint,
  .cover:-webkit-full-screen .portrait-orientation-hint {
    display: block;
  }
}
.portrait-orientation-hint.is-visible {
  opacity: 1;
}
