/* 운영 CMS — Entrance LED Pillar 화면 */
.pm { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; align-items: start; }
.pm__main, .pm__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.pm-viewport { position: relative; height: 500px; border-radius: 14px; overflow: hidden; background: #DCE1E2; }
.pm-viewport canvas { display: block; width: 100%; height: 100%; }
.pm-hint { margin-top: 8px; }

/* 세그먼트 버튼 */
.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--f-card-soft, #f2f3f6); }
.seg-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; cursor: pointer;
  padding: 4px 12px; border-radius: 999px; font-size: var(--fs-sm); color: var(--c-sub);
}
.seg-btn .lucide { width: 14px; height: 14px; }
.seg-btn.is-on { background: var(--f-primary, var(--c-primary)); color: #fff; }

/* 지금 재생 */
.pm-now { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-line); }
.pm-now__row { display: flex; align-items: center; gap: 12px; }
.pm-now__info { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pm-now__info strong { font-weight: 500; }
.pm-now__label { font-size: 11px; color: var(--f-primary, var(--c-primary)); letter-spacing: .04em; }
.pm-now__progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.pm-now__progress .bar { flex: 1; }
.pm-now__time { font-size: var(--fs-xs); color: var(--c-sub); font-variant-numeric: tabular-nums; }
.pm-ctrl { display: flex; gap: 6px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  border: 0; background: var(--f-card-soft, #f2f3f6); color: var(--c-text);
}
.icon-btn .lucide { width: 16px; height: 16px; }
.icon-btn--main { width: 40px; height: 40px; background: var(--f-primary, var(--c-primary)); color: #fff; }
.icon-btn--xs { width: 22px; height: 22px; background: transparent; }
.icon-btn--xs .lucide { width: 14px; height: 14px; }

/* 썸네일 (좌·우 기둥 두 줄) — 영상처럼 보이도록 CSS 애니메이션 */
.pm-thumb { display: inline-flex; gap: 3px; flex: none; --tw: 11px; --th: 62px; }
.pm-thumb--sm { --tw: 9px; --th: 50px; }
.pm-thumb--lg { --tw: 26px; --th: 148px; }
.pm-strip {
  position: relative; display: block; overflow: hidden;
  width: var(--tw); height: var(--th); border-radius: 3px; background: #111;
}
.pm-thumb--lg .pm-strip { border-radius: 5px; }
.pm-strip img {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover;
  transform-origin: 50% 50%;
  animation: pm-drift 9s ease-in-out infinite alternate, pm-hue 14s ease-in-out infinite alternate;
}
.pm-strip + .pm-strip img { animation-delay: -4.5s, -7s; }
/* 빛줄기가 위로 훑고 지나감 */
.pm-strip::after {
  content: ""; position: absolute; left: -50%; right: -50%; height: 45%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: rotate(-18deg); mix-blend-mode: screen;
  animation: pm-sweep 4.8s linear infinite;
}
.pm-strip + .pm-strip::after { animation-delay: -2.4s; }

@keyframes pm-drift { from { transform: scale(1.35) translateY(-11%); } to { transform: scale(1.35) translateY(11%); } }
@keyframes pm-hue { from { filter: hue-rotate(-12deg) brightness(.95); } to { filter: hue-rotate(14deg) brightness(1.1); } }
@keyframes pm-sweep { from { top: 110%; } to { top: -60%; } }

/* 레이어별 분위기 */
.is-live .pm-strip img { animation: pm-drift 14s linear infinite alternate, pm-twinkle 1.6s steps(2) infinite; }
@keyframes pm-twinkle { 0% { filter: brightness(.9); } 50% { filter: brightness(1.25) saturate(1.2); } 100% { filter: brightness(.9); } }
.is-live .pm-strip::after { animation-duration: 7s; opacity: .5; }
.is-interactive .pm-strip img { animation: pm-drift 6s ease-in-out infinite alternate, pm-pulse 2.4s ease-in-out infinite; }
@keyframes pm-pulse { 0%, 100% { filter: brightness(.9); } 50% { filter: brightness(1.3); } }
.is-season .pm-strip::after { background: linear-gradient(180deg, transparent, rgba(255, 220, 170, .6), transparent); }

/* 목록에서 꺼진 콘텐츠·움직임 줄이기 설정은 멈춤 */
.pm-list li.is-off .pm-strip img, .pm-list li.is-off .pm-strip::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .pm-strip img, .pm-strip::after { animation: none; }
}

.pm-thumb--video { width: 25px; height: 62px; border-radius: 4px; display: grid; place-items: center; background: var(--f-card-soft, #eee); }
.pm-thumb--video .lucide { width: 14px; height: 14px; }

/* 재생 목록 */
.pm-list li.pm-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; margin: 0 -8px; border-radius: 12px; cursor: pointer;
}
.pm-list li.pm-item:hover { background: var(--f-card-soft, #f5f6f8); }
.pm-list li.is-current { background: var(--c-primary-soft); }
.pm-list li.is-off { opacity: .5; }
.pm-item__order { width: 16px; font-size: var(--fs-xs); color: var(--c-muted); text-align: center; }
.pm-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pm-item__body strong { font-weight: 400; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-item__meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--c-sub); }
.pm-item__tools { display: flex; align-items: center; gap: 4px; }
.pm-item__move { display: flex; flex-direction: column; }
.pm-total { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-line); font-size: var(--fs-xs); color: var(--c-sub); }

/* 스위치 */
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--c-line-strong, #ccc); transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--f-primary, var(--c-primary)); }
.switch input:checked + span::after { transform: translateX(14px); }

/* 등록 폼 */
.pm-form { margin-bottom: 14px; padding: 14px; border-radius: 14px; background: var(--f-card-soft, #f5f6f8); }
.pm-form__grid { display: flex; flex-direction: column; gap: 10px; }
.pm-form__row { display: grid; grid-template-columns: 1fr 100px; gap: 10px; }
.pm-field { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); color: var(--c-sub); }
.pm-field input, .pm-field select {
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--c-line);
  background: var(--c-surface); color: var(--c-text); font-size: var(--fs-sm);
}
.pm-field input[type="file"] { padding: 5px; font-size: var(--fs-xs); }
.pm-field small { color: var(--c-muted); }
.pm-check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--c-sub); }
.pm-form__actions { display: flex; justify-content: flex-end; gap: 8px; }

/* 정보 */
.pm-info__head { display: flex; gap: 16px; align-items: flex-start; }
.pm-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: var(--fs-sm); flex: 1; }
.pm-dl dt { color: var(--c-sub); }
.pm-dl dd { margin: 0; }
.pm-checks { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-xs); color: var(--c-sub); }
.pm-checks li { display: flex; gap: 8px; }
.pm-checks .lucide { width: 15px; height: 15px; flex: none; color: var(--c-warn); margin-top: 1px; }
.callout--err { background: var(--c-err-soft); color: var(--c-err); }

@media (max-width: 1180px) {
  .pm { grid-template-columns: 1fr; }
}

/* 라이브 데이터 */
.pm-strip--live canvas { width: 100%; height: 100%; display: block; }
.pm-kind { font-size: 10px; padding: 0 6px; border-radius: 999px; line-height: 17px; background: var(--c-off-soft); color: var(--c-sub); }
.pm-kind--video { background: var(--c-info-soft); color: var(--c-info); }
.pm-kind--live { background: #161616; color: #fff; }
.pm-kind--live::before { content: "● "; color: #ff4d4d; font-size: 8px; }
.pm-kindseg { align-self: flex-start; }
.pm-form__grid[hidden] { display: none; }
.pm-live-prev { display: flex; justify-content: center; padding: 8px; border-radius: 10px; background: #111; }
.pm-live-prev__cv { width: 40px; height: 227px; border-radius: 3px; }
