/* 음악 탭, 하단 플레이어, 비주얼로 보기. 시안 v2 수치. 줄 맞춤은 상단 메뉴와 같은 폭(--wrap)이다. */
:root {
  --music-player-height: 76px;
  --music-accent: var(--accent, #16d0f0);
  --music-accent-d: var(--accent-d, #0084a8);
  --music-sunken: #dfe5e8;
}

/* 휴대폰 메뉴: 보이는 탭 수만큼 칸을 똑같이 나눈다. 관리자가 숨긴 탭(display:none)은 칸을 차지하지 않는다. */
@media (max-width: 700px) {
  .gnb-nav {
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
  }
  .gnb-tab-btn {
    font-size: var(--fs-micro);
  }
  html[lang="ja"] .gnb-tab-btn,
  html[lang="ja"] .gnb-tab-btn .tab-text,
  html[lang="en"] .gnb-tab-btn,
  html[lang="en"] .gnb-tab-btn .tab-text,
  html[lang="zh"] .gnb-tab-btn,
  html[lang="zh"] .gnb-tab-btn .tab-text {
    font-size: 10px;
    letter-spacing: -0.04em;
  }
}

/* 음악 화면 */
.shell-view-music {
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--paper);
}
.shell-view-music.active,
.music-root.shell-view-music {
  display: block;
}
.shell-view-music.stage-open {
  overflow: hidden;
}
.shell-view-music.stage-open > .music-page,
.shell-view-music.stage-open > .footer-unified,
.shell-view-music.stage-open > iframe,
.shell-view-music.stage-open > .ssr-pane {
  display: none;
}

.music-page {
  min-height: max(84vh, 720px);
}

.music-wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.music-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  height: 46px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.music-tab {
  display: flex;
  align-items: baseline;
  gap: 6px;
  height: 37px;
  margin-right: 32px;
  margin-bottom: -1px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
}
.music-tab em {
  font-style: normal;
  font-size: var(--fs-small);
  font-weight: 500;
}
.music-tab.on {
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--music-accent);
}
.music-tab.on em {
  color: var(--ink-2);
}
.music-ainote {
  margin-left: auto;
  display: flex;
  align-items: center;
  height: 37px;
  font-size: var(--fs-small);
  color: var(--ink-2);
  white-space: nowrap;
}
.music-tab-actions {
  align-self: center;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}
.music-tab-btn,
.music-tab-studio {
  align-self: center;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 4px;
  background: var(--music-accent, #16d0f0);
  color: var(--ink, #0b1215);
  font-size: var(--fs-small);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background-color 140ms ease, color 140ms ease;
}
.music-tab-btn:hover,
.music-tab-studio:hover {
  background: var(--music-accent-d, #0084a8);
  color: #fff;
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 24px;
  padding: 12px 0 24px;
}
@media (min-width: 901px) {
  .music-grid[data-cards-per-row],
  #view-music[data-cards-per-row] .music-grid {
    grid-template-columns: repeat(var(--cards-per-row), minmax(0, 1fr));
  }
}
.music-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  font-size: var(--fs-body);
  color: var(--ink-3);
}

.song {
  min-width: 0;
  margin: 0;
}
.song-hit {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.song-cv {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: var(--music-sunken);
}
.song-cv img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.music-noart {
  position: absolute;
  left: 9px;
  bottom: 8px;
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--ink-2);
}
.song-ai {
  position: absolute;
  left: 5px;
  top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 17px;
  border-radius: 2px;
  background: rgba(11, 18, 21, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.song-t {
  margin: 8px 0 0;
  height: 20px;
  overflow: hidden;
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.song-m {
  margin: 0;
  height: 18px;
  overflow: hidden;
  font-size: var(--fs-small);
  line-height: 18px;
  color: var(--ink-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.song-studio-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 28px;
  margin-top: 6px;
  padding: 0 8px;
  border: 1px solid var(--line-2, #c9d3d8);
  border-radius: 4px;
  background: var(--sunken, #f2f6f8);
  color: var(--ink, #0b1215);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}
.song-studio-btn svg {
  flex: none;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.song-studio-btn:hover {
  background: var(--tint, #e7fafe);
  border-color: var(--music-accent-d, #0084a8);
  color: var(--music-accent-d, #0084a8);
}
.song.now .song-cv::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  box-shadow: inset 0 0 0 3px var(--music-accent);
}
.song-pz {
  display: none;
}
.song-pz svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.song.now .song-pz {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: var(--music-accent);
  color: var(--ink);
}
.song.now .song-m {
  color: var(--music-accent-d);
  font-weight: 600;
}

/* 하단 플레이어: 포털 틀 안의 한 줄이라 본문이 그만큼 줄어든다 */
.music-player {
  flex: none;
  position: relative;
  z-index: 800;
  height: var(--music-player-height);
  background: var(--paper);
  border-top: 1px solid var(--ink);
  color: var(--ink);
  line-height: 1.4;
  word-break: keep-all;
}
.music-player * {
  box-sizing: border-box;
}
.music-player svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.music-player button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
body.koxlo-game-tab .music-player {
  display: none;
}
/* 접기: 플레이어 줄을 비우고 위쪽 손잡이만 남긴다. 손잡이 크기와 자리는 상태와 상관없이 같다. */
.music-player .mp-fold {
  position: absolute;
  right: 24px;
  top: -24px;
  width: 44px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-bottom: 0;
}
body.music-player-folded {
  --music-player-height: 0px;
}
body.music-player-folded .music-player {
  border-top-width: 0;
}
body.music-player-folded .mp-pin {
  display: none;
}
body.music-player-folded .mp-fold svg {
  transform: rotate(180deg);
}

.mp-pin {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 16px;
  align-items: center;
  height: 75px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.mp-now {
  grid-column: 1 / 3;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.mp-cv {
  flex: none;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--music-sunken);
}
.mp-cv img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mp-tx {
  flex: 1;
  min-width: 0;
}
.mp-t {
  height: 21px;
  overflow: hidden;
  font-size: var(--fs-lead);
  font-weight: 700;
  line-height: 21px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mp-a {
  height: 17px;
  margin-top: 2px;
  overflow: hidden;
  font-size: var(--fs-caption);
  line-height: 17px;
  color: var(--ink-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.mp-q {
  flex: none;
  display: flex;
  gap: 2px;
}
.music-player .mp-q-b {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 36px;
  border-radius: 4px;
  color: var(--ink-3);
  font-size: var(--fs-micro);
  line-height: 14px;
}
.mp-q-b b {
  font-weight: 700;
}
.mp-q-b i {
  font-style: normal;
  font-size: 10px;
  line-height: 12px;
  font-variant-numeric: tabular-nums;
}
.music-player .mp-q-b.on {
  background: var(--tint, #e7fafe);
  color: var(--ink);
}
/* MP3 / WAV choose the playback quality: one outlined segmented control, kept apart from the MP4 save button. */
.mp-qs {
  display: flex;
  gap: 0;
  border: 1px solid var(--line, #d5dbe0);
  border-radius: 6px;
  overflow: hidden;
}
.music-player .mp-qs .mp-q-b {
  border-radius: 0;
}
.music-player .mp-qs .mp-q-b + .mp-q-b {
  border-left: 1px solid var(--line, #d5dbe0);
}
.music-player .mp-dl {
  margin-left: 6px;
  width: auto;
  min-width: 50px;
  padding: 0 6px;
  border: 1px solid var(--line, #d5dbe0);
  border-radius: 6px;
}

.mp-ctl {
  grid-column: 3 / 4;
  display: flex;
  align-items: center;
  gap: 6px;
}
.music-player .mp-ic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 42px;
  color: var(--ink-2);
}
.music-player .mp-ic.on {
  color: var(--music-accent-d);
}
.mp-ic.on::after {
  content: '';
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 5px;
  height: 2px;
  background: var(--music-accent);
}
.music-player .mp-rd {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  background: var(--music-accent);
  color: var(--ink);
}

/* 4번째 칸부터: 시각화, 재생 위치, 음량, 비주얼로 보기 */
.mp-viz {
  grid-column: 4 / 5;
  grid-row: 1;
  display: flex;
  gap: 4px;
  width: 144px;
  height: 52px;
}
.mp-canvas {
  display: block;
  width: 118px;
  height: 52px;
  flex: none;
  cursor: pointer;
}
.mp-modes {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 22px;
  flex: none;
}
.music-player .mp-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 24px;
  border-radius: 2px;
  color: var(--ink-3);
}
.music-player .mp-mode.on {
  background: var(--tint, #e7fafe);
  color: var(--ink);
}
.mp-seek {
  grid-column: 4 / 7;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-left: 160px;
  margin-right: 344px;
  font-size: var(--fs-caption);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.mp-seek span {
  flex: none;
  width: 34px;
}
.mp-seek span:last-child {
  text-align: right;
}
.mp-bar {
  position: relative;
  flex: 1;
  height: 4px;
  background: var(--line);
  cursor: pointer;
  touch-action: none;
}
.mp-bar::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  bottom: -10px;
}
.mp-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--music-accent);
  pointer-events: none;
}
.mp-bar b {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 12px;
  background: var(--ink);
  pointer-events: none;
}
.mp-vol {
  grid-column: 4 / 7;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 242px;
  color: var(--ink-2);
}
.mp-vol .mp-bar {
  flex: none;
  width: 64px;
}
.music-player .mp-viz-actions {
  grid-column: 4 / 7;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}
.music-player .mp-vzb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  height: 40px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-small);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}
.music-player .mp-studio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 11px;
  height: 40px;
  border: 1px solid var(--music-accent, #16d0f0);
  border-radius: 4px;
  background: var(--music-accent, #16d0f0);
  color: var(--ink, #0b1215);
  font-size: var(--fs-small);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.music-player .mp-studio svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.music-player .mp-studio:hover {
  background: var(--music-accent-d, #0084a8);
  border-color: var(--music-accent-d, #0084a8);
  color: #fff;
}
.music-player .mp-vzb.act {
  background: var(--tint, #e7fafe);
  border-color: var(--music-accent-d);
}
.mp-vzb span {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 비주얼로 보기 */
.music-stage {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.music-stage[hidden] {
  display: none;
}
.ms-head-wrap {
  flex: none;
}
.ms-head {
  position: relative;
  display: flex;
  align-items: center;
  height: 56px;
}
.ms-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  width: 290px;
  height: 38px;
  margin-right: 20px;
  padding: 0 8px 0 4px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 700;
  cursor: pointer;
}
.ms-pick img {
  display: block;
  flex: none;
  width: 48px;
  height: 30px;
  object-fit: cover;
}
.ms-pick span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ms-pick svg {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ms-presets {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 16px;
  min-width: 0;
  margin-right: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.ms-presets::-webkit-scrollbar {
  display: none;
}
.ms-presets .pb-preset {
  flex: none;
  height: 28px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: var(--fs-small);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.ms-presets .pb-preset.active {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--music-accent);
}
.ms-picker {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(var(--ms-picker-columns, 10), minmax(0, 1fr));
  gap: 10px 8px;
  padding: 12px;
  overflow-y: auto;
  border: 1px solid var(--line-2);
  background: var(--paper);
}
.ms-picker[hidden] {
  display: none;
}
.ms-tile {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.ms-tile img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--line);
}
.ms-tile.on img {
  outline: 2px solid var(--music-accent);
  outline-offset: -2px;
}
.ms-tile b {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  overflow: hidden;
  margin-top: 5px;
  font-size: var(--fs-small);
  line-height: 17px;
  min-height: 34px;
  font-weight: 700;
}
.ms-tile i {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-3);
  font-size: var(--fs-caption);
  line-height: 16px;
  font-style: normal;
}
.ms-stage-wrap {
  flex: 1;
  min-height: 0;
  padding-bottom: 12px;
}
.ms-back {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  width: 170px;
  height: 38px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: var(--fs-body);
  font-weight: 700;
  cursor: pointer;
}
.ms-back svg,
.ms-full svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ms-full {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: var(--fs-body);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.ms-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}
.ms-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.ms-cap {
  position: absolute;
  left: 28px;
  top: 22px;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.ms-stage:fullscreen .ms-cap {
  display: none;
}
.ms-cap small {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
}
.ms-cap h2 {
  margin: 2px 0 0;
  font-size: var(--fs-h1-sm);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: var(--tracking-title);
  color: #fff;
}

@media (max-width: 1100px) {
  .music-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .mp-q-b i {
    display: none;
  }
  .music-player .mp-dl i {
    display: inline;
    margin-left: 3px;
    font-size: 11px;
    font-style: normal;
  }
  .music-player .mp-q-b {
    width: 40px;
  }
  .music-player .mp-dl {
    width: auto;
    min-width: 44px;
    padding: 0 7px;
  }
  /* The 'Save' caption is hidden here, so the arrow tells the MP4 button apart from the MP3 / WAV format choice. */
  .music-player .mp-dl.is-building b::after {
    content: '';
  }
  .music-player .mp-dl b::after {
    content: '\2193';
    margin-left: 1px;
  }
}

/* [19] 모바일·가로모드 플레이어: 4줄(174px) 과다 점유를 2줄(94px)로 압축해 카드·메뉴 가림 해소 */
@media (max-width: 960px), (max-height: 500px) and (orientation: landscape) {
  :root {
    --music-player-height: 94px;
  }
  body:not(.music-player-folded) .shell-view-music,
  body:not(.music-player-folded) .music-wrap {
    padding-bottom: calc(var(--music-player-height, 94px) + 74px + env(safe-area-inset-bottom, 0px));
  }
  .mp-pin {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    grid-template-rows: 46px 42px;
    column-gap: 8px;
    height: 93px;
    padding: 0 12px;
  }
  .mp-now {
    display: contents;
  }
  .mp-cv {
    grid-column: 1;
    grid-row: 1;
    width: 38px;
    height: 38px;
    align-self: center;
  }
  .mp-tx {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    align-self: center;
    padding-right: 0;
  }
  .mp-viz,
  .music-player .mp-viz-actions,
  .mp-vol {
    display: none;
  }
  .mp-q {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    gap: 4px;
    padding-right: 28px;
  }
  .music-player .mp-q-b {
    width: 36px;
    height: 26px;
  }
  .music-player .mp-dl {
    width: auto;
    min-width: 48px;
    padding: 0 6px;
  }
  body:not(.music-player-folded) .music-player .mp-fold {
    top: 0;
    right: 0;
    width: 28px;
    height: 22px;
    z-index: 2;
    border: 0;
    border-left: 1px solid var(--line, #d5dbe0);
    border-bottom: 1px solid var(--line, #d5dbe0);
  }
  body.music-player-folded .shell-view-music {
    padding-bottom: calc(36px + var(--mob-bar-h, 54px));
  }
  body.music-player-folded .ms-stage-wrap {
    padding-bottom: 36px;
  }
  .mp-ctl {
    grid-column: 1 / 4;
    grid-row: 2;
    gap: 2px;
    margin-left: -4px;
    align-self: center;
  }
  .music-player .mp-ic {
    width: 32px;
    height: 32px;
  }
  .music-player .mp-rd {
    width: 34px;
    height: 34px;
  }
  .mp-seek {
    grid-column: 1 / 4;
    grid-row: 2;
    align-self: center;
    margin-left: 172px;
    margin-right: 0;
    gap: 6px;
    font-size: var(--fs-micro);
  }
  .mp-seek span {
    width: 30px;
  }
  .ms-back span,
  .ms-full span {
    display: none;
  }
  .ms-back {
    width: 28px;
  }
}

@media (max-width: 560px) {
  .mp-ctl #mp-shuffle,
  .mp-ctl #mp-repeat {
    display: none;
  }
  .mp-seek {
    margin-left: 108px;
  }
}

@media (max-width: 1200px) {
  .music-tab {
    margin-right: 20px;
  }
  .music-ainote {
    display: none;
  }
  .music-tab-actions {
    margin-left: auto;
  }
}

@media (max-width: 960px) {
  .music-tabs {
    overflow-x: auto;
    scrollbar-width: none;
    gap: 16px;
  }
  .music-tabs::-webkit-scrollbar {
    display: none;
  }
  .music-tab {
    margin-right: 0;
    flex: none;
  }
  .music-ainote {
    display: none;
  }
  .music-tab-actions {
    position: sticky;
    right: 0;
    z-index: 2;
    margin-left: auto;
    padding-left: 6px;
    background: var(--paper);
    box-shadow: -8px 0 8px var(--paper);
  }
}

@media (max-width: 700px) {
  .music-wrap {
    padding: 0 16px;
  }
  .music-tabs {
    height: 44px;
    justify-content: flex-start;
    gap: 14px;
    padding-right: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .music-tabs::-webkit-scrollbar {
    display: none;
  }
  .music-tab-actions {
    position: sticky;
    right: 0;
    z-index: 2;
    gap: 6px;
    margin-left: auto;
    padding-left: 6px;
    background: var(--paper);
    box-shadow: -12px 0 8px var(--paper), 8px 0 0 var(--paper);
  }
  .music-tab-btn,
  .music-tab-studio {
    height: 28px;
    padding: 0 10px;
    font-size: var(--fs-caption);
  }
  .music-tab {
    margin-right: 0;
    font-size: var(--fs-lead);
    flex: none;
  }
  .music-tab em {
    display: none;
  }
  .music-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 12px;
    padding-top: 7px;
  }
  .song-t {
    margin-top: 5px;
    height: 36px;
    font-size: var(--fs-small);
    line-height: 18px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .song-m {
    height: 16px;
    font-size: var(--fs-caption);
    line-height: 16px;
  }
  .ms-head {
    flex-wrap: wrap;
    height: 88px;
    align-content: center;
    gap: 2px 8px;
  }
  .ms-pick {
    flex: 1;
    width: auto;
    min-width: 0;
    margin: 0;
  }
  .ms-presets {
    order: 5;
    flex: none;
    width: 100%;
    height: 34px;
    margin: 0;
    gap: 14px;
  }
  .ms-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ms-tile b {
    display: -webkit-box;
    height: 36px;
    white-space: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .ms-cap {
    left: 14px;
    top: 12px;
  }
  .ms-cap h2 {
    font-size: var(--fs-h3);
  }
}

.card-floating-badges .song-ai {
  position: static;
}

@media (max-width: 700px) {
  html[lang="ja"] .mp-vzb {
    font-size: var(--fs-caption);
  }
}

/* 화면에는 보이지 않는 제목 (검색엔진과 화면 낭독기용) */
.music-wrap > h1.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* MP4 is being made on the server: the button shows the percentage in the accent colour. */
.music-player .mp-dl.is-building {
  color: var(--accent-ink, #0a7f94);
}

/* 회원 곡 탭 (할일 418): 운영자 AI 음악과 구분되는 카드 */
.music-tab-members {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}
.music-member-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}
.music-member-card.is-playing {
  border-color: var(--music-accent);
}
.music-member-badge {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--ink);
  background: var(--sunken, #f2f6f8);
  border: 1px solid var(--line);
}
.music-member-title {
  font-size: 16px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-member-meta {
  font-size: var(--fs-small);
  color: var(--ink-2);
}
.music-member-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.music-member-actions button {
  height: 32px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
}
.music-member-actions .music-member-play {
  min-width: 64px;
  background: var(--music-accent);
  border-color: var(--music-accent);
  color: #ffffff;
}
.music-member-actions .music-member-report {
  margin-left: auto;
  color: var(--ink-2);
}
.music-members-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
  color: var(--ink-2);
}
.music-members-studio {
  padding: 10px 18px;
  border-radius: 4px;
  background: var(--music-accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}
@media (max-width: 900px) {
  .music-member-card {
    grid-column: 1 / -1;
  }
}
