/* 미리보기 무대 — 1920x1080 을 카드 너비에 맞춰 축소해서 보여준다. */
#stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #14161a;
}

#stageInner {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
}

#stagePoster {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
  object-fit: cover;
  display: none;
}

#stageOverlay {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
  border: 0;
  background: transparent;
}

/* ── 로그인 ─────────────────────────────────── */
.login-wrap {
  max-width: 380px;
  margin: 12vh auto 0;
  padding: 0 16px;
}

/* ── 배경 목록 ─────────────────────────────── */
.bg-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bs-body-bg);
}

.bg-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 4px;
  background: #14161a;
}

.bg-order {
  flex: 0 0 auto;
  width: 22px;
  text-align: center;
  color: var(--bs-secondary-color);
  font-size: .875rem;
}

/* ── 곡 카드 ───────────────────────────────── */
.track-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bs-body-bg);
  cursor: pointer;
}

.track-item.active {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 1px var(--bs-primary);
}

.track-cover {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px dashed var(--bs-border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: .75rem;
  line-height: 1.2;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
}

.track-cover:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.track-cover.has-image {
  border-style: solid;
}

.track-body {
  flex: 1 1 auto;
  min-width: 0;
}

.track-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-item.active .track-title {
  color: var(--bs-primary);
}

.track-attach {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: .8125rem;
  margin-top: 4px;
}

.track-attach .attach-name {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Lyric Creator 가사 줄 ─────────────────── */
.lyric-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
}

.lyric-row:hover {
  background: var(--bs-tertiary-bg);
}

.lyric-row.active {
  border-color: var(--bs-primary);
  background: var(--bs-tertiary-bg);
}

/* 재생 위치에 해당하는 줄 — 선택된 줄과 별개로 표시한다. */
.lyric-row.playing .lyric-text {
  font-weight: 700;
  color: var(--bs-primary);
}

.lyric-time {
  flex: 0 0 auto;
  width: 84px;
  font-variant-numeric: tabular-nums;
  font-size: .8125rem;
}

.lyric-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyric-tools {
  flex: 0 0 auto;
  visibility: hidden;
}

.lyric-row:hover .lyric-tools,
.lyric-row.active .lyric-tools {
  visibility: visible;
}

.btn-xs {
  --bs-btn-padding-y: 0;
  --bs-btn-padding-x: .4rem;
  --bs-btn-font-size: .75rem;
}
