*, *::before, *::after { box-sizing: border-box; }

body.music-page {
  margin: 0;
  min-height: 100vh;
  background: #0c0c0e;
  font-family: "IBM Plex Sans KR", "Avenir Next", sans-serif;
  overflow: hidden;
}

/* ── 헤더 (inspiration 페이지와 동일) ── */
.music-page .subpage-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 20;
  width: min(86rem, calc(100vw - 2.8rem));
  padding: 1.4rem 0 1.1rem;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%);
}

.music-page .subpage-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: 100vw;
  height: 100%;
  background: rgba(248, 248, 246, 0.22);
  backdrop-filter: blur(2px);
  transform: translateX(-50%);
}

.music-page .subpage-brand,
.music-page .subpage-nav a {
  color: #fff;
  text-shadow: none;
}

.music-page .subpage-brand {
  font-family: "IBM Plex Sans KR", "Avenir Next", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.music-page .subpage-nav {
  color: rgba(255, 255, 255, 0.55);
}

.music-page .subpage-nav a {
  font-family: "IBM Plex Sans KR", "Avenir Next", sans-serif;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.music-page .subpage-nav a[aria-current="page"] {
  color: #fff;
}

/* ── 바이닐 필드 ── */
.vinyl-field {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* ── 레코드 래퍼 ── */
.vinyl-wrapper {
  position: absolute;
  cursor: pointer;
}

.vinyl-wrapper:hover .vinyl-record {
  filter: brightness(1.25);
}

/* ── 레코드 (이미지 기반) ── */
.vinyl-record {
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: #1a1a1a; /* 이미지 로드 전 fallback */
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.85),
    0 4px 16px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: filter 0.2s;
}

.vinyl-record.is-spinning {
  animation: vinyl-spin 1.6s linear infinite;
}

@keyframes vinyl-spin {
  to { transform: rotate(360deg); }
}

/* ── 하단 플레이어 바 ── */
.music-player-bar {
  position: fixed;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 0.75rem 1rem 0.75rem 1.4rem;
  background: rgba(14, 14, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  min-width: 16rem;
  max-width: calc(100vw - 3rem);
}

.music-player-bar[hidden] { display: none; }

.player-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f0f0f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.42);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-controls {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}

.player-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

.player-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.player-btn-stop {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ── 트랙 선택 팝오버 ── */
.track-selector {
  position: fixed;
  z-index: 40;
  width: 16rem;
  max-height: 18rem;
  overflow-y: auto;
  background: rgba(14, 14, 18, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0;
}

.track-selector[hidden] { display: none; }

.track-selector-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  padding: 0.3rem 0.85rem 0.4rem;
  margin: 0;
}

.track-selector-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.track-selector-list li {
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: background 0.1s;
}

.track-selector-list li:hover {
  background: rgba(255, 255, 255, 0.07);
}

.track-selector-list li.is-active {
  background: rgba(255, 255, 255, 0.1);
}

.track-selector-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f0f0f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-selector-artist {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 어드민 툴바 ── */
.admin-toolbar {
  position: fixed;
  top: 0.85rem;
  right: 1.4rem;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── 어드민 버튼 ── */
.admin-btn {
  margin-left: 0;
  padding: 0.28rem 0.72rem;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 5px;
  background: transparent;
  color: rgba(0, 0, 0, 0.38);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.15s;
  font-family: "IBM Plex Sans KR", "Avenir Next", sans-serif;
}

.admin-btn + .admin-btn { margin-left: 0.4rem; }
.admin-btn:hover { color: rgba(0, 0, 0, 0.75); border-color: rgba(0, 0, 0, 0.4); }
.admin-btn.is-active { color: #000; background: rgba(0, 0, 0, 0.07); border-color: rgba(0, 0, 0, 0.5); }
.admin-btn--dim { color: rgba(0, 0, 0, 0.22); }

/* ── 어드민 모드 ── */
body.is-admin-mode .vinyl-wrapper { cursor: grab; }
body.is-admin-mode .vinyl-wrapper:active { cursor: grabbing; }

.resize-handle {
  display: none;
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  cursor: se-resize;
  z-index: 10;
  touch-action: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

body.is-admin-mode .resize-handle { display: block; }

.delete-handle {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(220, 60, 60, 0.85);
  color: #fff;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: background 0.15s;
}

.delete-handle:hover { background: rgba(200, 30, 30, 0.95); }
body.is-admin-mode .delete-handle { display: grid; }

.vinyl-no-player {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
  margin: 0;
  padding: 0.7rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
}
