/*
  style.css

  역할:
  - 모든 화면의 공통 디자인을 담당한다.
  - 왼쪽 사이드바(#nav), 가운데 본문(main), 오른쪽 재생 패널(.now-panel)의 3단 구성.
  - 화면 자체는 무채색으로 두고, 색은 앨범 아트(유튜브 썸네일)와 초록 재생 버튼에만 쓴다.
*/

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --black: #000000;
  --bg: #121212;
  --surface: #181818;
  --raised: #1f1f1f;
  --raised-2: #2a2a2a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: #7c7c7c;
  --text: #ffffff;
  --text-2: #b3b3b3;
  --text-3: #8f8f8f;
  --accent: #1ed760;
  --accent-hover: #3be477;
  --negative: #f3727f;
  --warning: #ffa42b;
  --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--black);
  color-scheme: dark;
}

/* 사이드바 + 본문 (+ 재생 패널) 격자 */
body {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  max-width: 1600px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 8px;
  background: var(--black);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

body:has(> .now-panel:not([hidden])) {
  grid-template-columns: 264px minmax(0, 1fr) 320px;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-fill {
  fill: currentColor;
  stroke: none;
}

/* ───── 사이드바 ───── */

#nav {
  position: sticky;
  top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: calc(100vh - 16px);
  min-height: 0;
}

.side-panel {
  padding: 8px;
  border-radius: 8px;
  background: var(--bg);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--text);
  color: var(--black);
}

.wordmark-mark .icon {
  width: 12px;
  height: 12px;
  margin-left: 1px;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color 150ms var(--ease);
}

.side-nav a:hover,
.side-nav a[aria-current] {
  color: var(--text);
}

.side-nav .icon {
  width: 20px;
  height: 20px;
}

.side-library {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.side-library h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  margin: 0;
  padding: 0 4px 0 12px;
  color: var(--text-2);
  font-size: 15px;
}

.library-list {
  display: grid;
  gap: 2px;
  list-style: none;
}

.library-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 150ms var(--ease);
}

.library-list a:hover {
  background: var(--raised);
}

.library-list a[aria-current] {
  background: var(--raised-2);
}

.library-text {
  display: grid;
  min-width: 0;
}

.library-text strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-text small {
  color: var(--text-2);
  font-size: 13px;
}

.library-empty {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 8px 12px 12px;
  color: var(--text-2);
}

.side-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: #535353;
  font-weight: 700;
}

.account {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-account .feedback {
  flex-basis: 100%;
}

/* ───── 본문 ───── */

main {
  min-width: 0;
  min-height: calc(100vh - 16px);
  padding: 24px 24px 48px;
  border-radius: 8px;
  /* 같은 회색 안에서만 밝기가 바뀌는 머리 부분 */
  background: linear-gradient(#232323, var(--bg) 320px);
}

main section + section {
  margin-top: 40px;
}

h1 {
  margin-bottom: 24px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  margin-bottom: 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
  font-weight: 700;
}

.section-note {
  margin: -8px 0 16px;
  color: var(--text-2);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0;
}

.preserve-lines {
  white-space: pre-wrap;
}

.feedback {
  margin-block: 12px;
  color: var(--text-2);
}

.feedback:empty {
  margin: 0;
}

.error {
  color: var(--negative);
  white-space: pre-line;
}

/* ───── 버튼 ───── */

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 9999px;
  background: var(--text);
  color: var(--black);
  font: 700 14px/1 var(--font);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease),
    box-shadow 150ms var(--ease), transform 150ms var(--ease);
}

button:hover,
.button:hover {
  background: #e6e6e6;
}

button:active,
.button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.compact {
  height: 32px;
  padding: 0 16px;
}

/* 테두리만 있는 알약 버튼 */
.sub-button {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.sub-button:hover {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--text);
}

/* 회색 면 버튼 */
.soft-button {
  background: var(--raised);
  color: var(--text);
}

.soft-button:hover {
  background: var(--raised-2);
}

.ghost-button {
  padding: 0 12px;
  background: transparent;
  color: var(--text-2);
}

.ghost-button:hover {
  background: transparent;
  color: var(--text);
}

.icon-button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
}

.icon-button:hover {
  background: var(--raised-2);
  color: var(--text);
}

.icon-button:disabled:hover {
  background: transparent;
}

/* 초록 원형 재생 버튼: 재생 동작에만 쓴다 */
.play-button {
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--black);
  box-shadow: var(--shadow-heavy);
}

.play-button:hover {
  background: var(--accent-hover);
}

.play-button .icon {
  width: 24px;
  height: 24px;
  margin-left: 2px;
}

.play-small {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}

.play-small .icon {
  width: 14px;
  height: 14px;
  margin-left: 1px;
}

tr:hover .play-small,
.play-small:hover,
.play-small:focus-visible {
  background: var(--accent);
  color: var(--black);
}

.text-link {
  color: var(--text-2);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ───── 입력 ───── */

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--raised);
  color: var(--text);
  font: 400 15px var(--font);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: box-shadow 150ms var(--ease);
}

input:hover,
select:hover,
textarea:hover {
  box-shadow: inset 0 0 0 1px var(--text-2);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--text);
}

textarea {
  height: auto;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}

select {
  padding-right: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23b3b3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
  cursor: pointer;
}

input[type="search"] {
  height: 40px;
  padding-left: 44px;
  border-radius: 9999px;
  box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-position: 16px center;
  background-repeat: no-repeat;
}

input[type="search"]:hover {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

input[type="search"]:focus {
  box-shadow: inset 0 0 0 2px var(--text);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  box-shadow: none;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.filters label {
  flex: 1 1 200px;
  min-width: 0;
}

.filters label.sort-label {
  flex: 0 1 160px;
}

.filters select,
.sort-form select {
  height: 40px;
  border-radius: 9999px;
  box-shadow: none;
  font-weight: 700;
  font-size: 14px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* 로그인·회원가입·플레이리스트 등록 폼 */
.auth {
  max-width: 400px;
  margin: 48px auto 0;
}

.auth h1 {
  margin-bottom: 32px;
  font-size: 32px;
}

.auth .form-actions {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 8px;
}

.auth .form-actions button {
  width: 100%;
  height: 48px;
}

.auth .form-actions a {
  color: var(--text-2);
  font-weight: 700;
  text-decoration: none;
}

.auth .form-actions a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ───── 트랙 표 ───── */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
}

/* 머리글과 첫 줄 사이 간격 */
tbody tr:first-child td {
  border-top: 8px solid transparent;
  background-clip: padding-box;
}

td {
  height: 56px;
  padding: 8px 12px;
  vertical-align: middle;
  transition: background-color 120ms var(--ease);
}

td:first-child {
  border-radius: 6px 0 0 6px;
}

td:last-child {
  border-radius: 0 6px 6px 0;
}

tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.07);
}

tbody tr.is-playing td {
  background-color: rgba(255, 255, 255, 0.1);
}

.col-num {
  width: 48px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.col-figure {
  width: 96px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.col-action {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

tr.is-playing .col-num,
tr.is-playing .track-title {
  color: var(--accent);
}

.track {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.track-text {
  display: grid;
  min-width: 0;
}

.track-title {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-artist {
  overflow: hidden;
  color: var(--text-2);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.track-title:hover,
a.track-artist:hover {
  color: var(--text);
  text-decoration: underline;
}

.thumb {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 4px;
  background: var(--raised);
  object-fit: cover;
}

.thumb-lg {
  width: 64px;
  height: 64px;
}

.row-tools {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  opacity: 0;
  transition: opacity 120ms var(--ease);
}

tr:hover .row-tools,
tr:focus-within .row-tools,
tr.is-playing .row-tools {
  opacity: 1;
}

@media (hover: none) {
  .row-tools {
    opacity: 1;
  }
}

/* ───── 커버 (수록곡 썸네일 2×2) ───── */

.cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 192px;
  aspect-ratio: 1;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  background: var(--raised-2);
  box-shadow: var(--shadow-heavy);
}

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

.cover-single {
  grid-template-columns: 1fr;
}

/* 고화질 썸네일(4:3)의 위아래 검은 띠를 잘라 낸다 */
.cover img.letterboxed {
  transform: scale(1.34);
}

.cover-empty {
  grid-template-columns: 1fr;
  place-items: center;
  color: var(--text-3);
}

.cover-empty .icon {
  width: 40%;
  height: 40%;
  stroke-width: 1.25;
}

.mini-cover {
  width: 48px;
  border-radius: 4px;
  box-shadow: none;
}

/* ───── 플레이리스트·곡 상세 머리 ───── */

.detail-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 24px;
  padding: 40px 0 24px;
}

.hero-text {
  min-width: 0;
  flex: 1 1 280px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-weight: 700;
}

.hero-title {
  margin: 8px 0 12px;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-meta {
  color: var(--text-2);
}

.hero-meta strong {
  color: var(--text);
  font-weight: 700;
}

.hero-description {
  max-width: 640px;
  margin-bottom: 8px;
  color: var(--text-2);
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px 0 24px;
}

.owner-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.sort-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-inline-end: auto;
}

.sort-form label {
  display: block;
}

.sort-form select {
  width: auto;
}

.order-status {
  color: var(--warning);
}

.order-status:empty {
  display: none;
}

.hint {
  margin: -8px 0 16px;
  color: var(--text-3);
  font-size: 13px;
}

.empty-state {
  padding: 32px 0;
  color: var(--text-2);
}

.empty-state a {
  color: var(--text);
  font-weight: 700;
}

/* ───── 재생 패널 ───── */

.now-panel {
  position: sticky;
  top: 8px;
  display: grid;
  align-content: start;
  gap: 16px;
  max-height: calc(100vh - 16px);
  padding: 16px;
  overflow-y: auto;
  border-radius: 8px;
  background: var(--bg);
}

.now-panel h2 {
  margin: 0;
  font-size: 16px;
}

.player-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: var(--black);
}

.empty-player {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 16px;
  color: var(--text-3);
  text-align: center;
}

iframe {
  display: none;
  width: 100%;
  height: 100%;
  border: 0;
}

.now-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.now-artist {
  color: var(--text-2);
}

.up-next {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  background: var(--raised);
}

.up-next h3 {
  font-size: 14px;
}

/* ───── 곡 목록 화면 ───── */

#playlist-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--surface);
}

#playlist-hint {
  color: var(--text-2);
}

#playlist-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  color: var(--text-2);
}

#playlist-label select {
  width: auto;
  min-width: 200px;
  height: 32px;
  border-radius: 9999px;
  box-shadow: none;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

#playlist-feedback {
  margin: 0;
}

.songs-table {
  min-width: 560px;
}

/* ───── 목록 화면 (내 플레이리스트·내 리뷰) ───── */

.entry-list,
.recommendation-grid,
#reviews {
  list-style: none;
}

.entry-list {
  display: grid;
  gap: 2px;
}

.playlist-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 150ms var(--ease);
}

.playlist-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.playlist-row .mini-cover {
  width: 56px;
}

.playlist-row h2 {
  margin: 0;
  font-size: 16px;
}

.playlist-row h2 a {
  text-decoration: none;
}

.playlist-row h2 a:hover {
  text-decoration: underline;
}

.row-meta {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  font-weight: 400;
}

.visibility-badge .icon {
  width: 14px;
  height: 14px;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
  gap: 16px;
}

.recommendation-grid > li {
  position: relative;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface);
  transition: background-color 150ms var(--ease);
}

.recommendation-grid > li:hover {
  background: var(--raised-2);
}

.recommendation-grid .cover {
  width: 100%;
  margin-bottom: 12px;
}

.recommendation-grid h3 a {
  text-decoration: none;
}

/* 카드 전체를 눌러도 상세로 이동 */
.recommendation-grid h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.recommendation-grid p {
  color: var(--text-2);
  font-size: 13px;
}

.recommendation-grid .figure {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* 리뷰 (곡 상세·내 리뷰) */
#reviews {
  display: grid;
}

#reviews > li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

#reviews > li:last-child {
  border-bottom: 0;
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.stars {
  color: var(--text);
  letter-spacing: 0.1em;
}

.stars-label {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

#reviews time {
  color: var(--text-3);
  font-size: 13px;
}

#reviews p {
  white-space: pre-wrap;
}

.review-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
}

.review-body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.review-body h2 {
  margin: 0;
  font-size: 16px;
}

.review-body h2 a {
  text-decoration: none;
}

.review-body h2 a:hover {
  text-decoration: underline;
}

.review-body .form-actions {
  margin-top: 8px;
}

.review-body form {
  max-width: 560px;
  margin-top: 12px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
}

.muted {
  color: var(--text-2);
}

/* 곡 상세 리뷰 작성 */
.review-panel {
  max-width: 640px;
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
}

.review-panel form label select {
  width: 160px;
}

/* ───── 반응형 ───── */

/* 좁은 화면에서는 재생 패널이 화면 아래에 붙는 재생 막대가 된다. 재생 전에는 숨긴다. */
@media (max-width: 1100px) {
  body,
  body:has(> .now-panel:not([hidden])) {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .now-panel {
    position: sticky;
    top: auto;
    bottom: 8px;
    grid-column: 2;
    grid-template-columns: 224px minmax(0, 1fr);
    align-items: center;
    gap: 4px 16px;
    max-height: none;
    padding: 12px;
    background: var(--raised);
    box-shadow: var(--shadow-heavy);
  }

  .now-panel.is-idle {
    display: none;
  }

  .now-panel h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .now-panel .player-box {
    grid-row: span 2;
  }

  .now-panel > :not(h2, .player-box) {
    grid-column: 2;
  }

  .now-title {
    font-size: 16px;
  }

  .up-next {
    padding: 0;
    background: none;
  }
}

@media (max-width: 768px) {
  body,
  body:has(> .now-panel:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
    gap: 0;
  }

  #nav {
    position: static;
    height: auto;
    gap: 0;
  }

  #nav .side-panel {
    border-radius: 0;
  }

  .side-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
  }

  .side-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .side-nav a {
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
  }

  .side-nav .icon {
    width: 18px;
    height: 18px;
  }

  .side-library {
    display: none;
  }

  .side-account {
    padding: 4px 16px 12px;
  }

  .now-panel {
    bottom: 0;
    grid-column: 1;
    grid-template-columns: 160px minmax(0, 1fr);
    border-radius: 0;
  }

  .now-panel .up-next {
    display: none;
  }

  main {
    min-height: 0;
    padding: 16px 16px 40px;
    border-radius: 0;
  }

  .detail-hero {
    padding-top: 16px;
  }

  .detail-hero .cover {
    width: 160px;
  }

  .songs-table {
    min-width: 0;
  }

  .songs-table .col-figure {
    display: none;
  }

  td {
    padding: 8px;
  }

  .col-num {
    width: 32px;
  }

  .order-status {
    flex-basis: 100%;
    margin: 0;
  }
}
