/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #16213e;
  --card: #1e1e35;
  --border: #2a2a4a;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --success: #059669;
  --success-hover: #047857;
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --player-h: 90px;
  --player-lyrics-h: 240px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: calc(var(--player-h) + 16px);
  min-height: 100vh;
}

/* ===== Layout ===== */
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }

/* ===== Header ===== */
.header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
}
.header .container { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo { font-size: 18px; font-weight: 700; color: var(--accent); white-space: nowrap; }
/* PC/데스크톱 기본: 앱 다운로드 버튼 완전 숨김 */
.apk-download-badge {
  display: none !important;
}

/* 모바일 환경(JS 감지 또는 터치 모바일 화면)에서만 표시 */
body.is-mobile .apk-download-badge,
html.is-mobile .apk-download-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #c084fc;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
body.is-mobile .apk-download-badge:hover,
html.is-mobile .apk-download-badge:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
}
body.is-mobile .apk-download-badge .apk-icon,
html.is-mobile .apk-download-badge .apk-icon {
  font-size: 14px;
}

@media (max-width: 768px) and (pointer: coarse) {
  .apk-download-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.4);
    color: #c084fc;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
  }
}
.search-wrapper { display: flex; gap: 8px; flex: 1; min-width: 200px; }
.search-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--text-dim); }

/* ===== Buttons ===== */
.btn {
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: var(--success-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--danger-hover); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.btn-icon:hover { color: var(--text); background: var(--border); }

/* ===== Main Content ===== */
.main-content { padding-top: 20px; display: flex; flex-direction: column; gap: 24px; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title { font-size: 16px; font-weight: 700; color: var(--text); }
.result-count { font-size: 12px; color: var(--text-muted); }

/* ===== Loading ===== */
.loading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); padding: 20px 0; }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Search Results ===== */
.results-list { display: flex; flex-direction: column; gap: 8px; }

.result-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.result-item:hover { border-color: var(--accent); background: var(--bg2); }
.result-item.active { border-color: var(--accent); background: #1e1040; }

.result-num { color: var(--text-dim); font-size: 13px; min-width: 20px; text-align: center; }
.result-thumb {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg3);
  flex-shrink: 0;
}
.result-thumb-placeholder { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.result-info { flex: 1; min-width: 0; }
.result-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-duration { color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.result-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(124,58,237,0.2);
  color: #a78bfa;
  white-space: nowrap;
}

/* ===== Pagination ===== */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.page-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}
.page-btn:hover { border-color: var(--accent); color: var(--text); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Editor ===== */
.editor-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.editor-body {
  display: flex;
  gap: 24px;
  padding: 20px;
  flex-wrap: wrap;
}
.editor-art-col { display: flex; flex-direction: column; gap: 10px; align-items: center; min-width: 150px; }
.art-preview-wrap { position: relative; width: 150px; height: 150px; border-radius: var(--radius); overflow: hidden; background: var(--bg3); }
.art-preview { width: 100%; height: 100%; object-fit: cover; }
.art-placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 48px; }
.editor-art-col .field-label, .editor-art-col .field-input { width: 150px; }
.editor-fields-col { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 12px; }

.field-group { display: flex; flex-direction: column; gap: 4px; }
.field-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.field-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.field-label-row .field-label { margin-bottom: 0; }
.field-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
}
.field-input:focus { border-color: var(--accent); }
.field-textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  width: 100%;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s;
  line-height: 1.7;
}
.field-textarea:focus { border-color: var(--accent); }
.input-with-btn { display: flex; gap: 8px; }
.input-with-btn .field-input { flex: 1; }
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.save-progress-wrap {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.save-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
#saveProgressText {
  color: var(--text);
  font-weight: 500;
}
#saveProgressPercent {
  color: var(--accent);
  font-weight: 700;
  font-family: monospace, sans-serif;
  font-size: 14px;
}
.save-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg3);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
.save-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.25s ease-out;
  animation: progressPulse 2s ease infinite;
}
@keyframes progressPulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Files List & Cards ===== */
.files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.files-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 36px 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}

.file-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  position: relative;
}
.file-item:hover {
  border-color: var(--accent);
  background: var(--bg2);
}
.file-item.playing {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.14) !important;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.25);
}
.file-item.playing .file-title {
  color: #a78bfa !important;
  font-weight: 700;
}
.file-item.playing .file-title::before {
  content: '▶ ';
  color: var(--accent);
  display: inline-block;
  margin-right: 2px;
}

/* 썸네일 영역 */
.file-thumb-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg3);
}
.file-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.file-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.file-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}
.file-thumb-wrap:hover .file-play-overlay {
  opacity: 1;
}
.file-item.playing .file-play-overlay {
  opacity: 0.9;
  background: rgba(124, 58, 237, 0.55);
}

/* 곡 정보 영역 (제목, 가수/앨범/용량, 파일명) */
.file-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.file-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  transition: color 0.2s;
}
.file-info:hover .file-title {
  color: var(--accent);
}
.file-meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-subname {
  color: var(--text-dim);
  font-size: 11px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
  opacity: 0.65;
}

/* 제어 버튼 영역 */
.file-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.file-download-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-content {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-art-wrap { display: flex; justify-content: center; }
.modal-art { width: 100px; height: 100px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg3); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--border); }

/* ===== Audio Player ===== */
.audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}
.player-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  height: var(--player-h);
  flex-wrap: nowrap;
  overflow: hidden;
}
.player-art-wrap { flex-shrink: 0; }
.player-art { width: 54px; height: 54px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg3); }
.player-info { min-width: 0; flex: 0 0 160px; }
.player-title { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ctrl-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}
.ctrl-btn:hover { color: var(--accent); background: rgba(124,58,237,0.1); }
.ctrl-play { font-size: 22px; }
.ctrl-mode {
  font-size: 16px;
  position: relative;
  opacity: 0.45;
  transition: opacity 0.2s, transform 0.15s, color 0.2s;
}
.ctrl-mode:hover {
  opacity: 0.85;
}
.ctrl-mode.active {
  opacity: 1;
  color: #c084fc;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}
.ctrl-mode.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.player-timeline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  touch-action: none;
}
.time-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}
.progress-bar {
  flex: 1;
  height: 24px;
  padding: 8px 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  touch-action: none;
}
.progress-bar::-webkit-slider-runnable-track {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  transition: background 0.2s;
}
.progress-bar:hover::-webkit-slider-runnable-track {
  background: #3b3b5c;
}
.progress-bar::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.7);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.progress-bar:active::-webkit-slider-thumb {
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(124, 58, 237, 1);
}
.progress-bar::-moz-range-track {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
}
.progress-bar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.7);
  cursor: pointer;
}
.player-volume { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-right: 6px; }
.vol-icon { font-size: 14px; }
.volume-bar { width: 70px; height: 4px; appearance: none; background: var(--border); border-radius: 2px; cursor: pointer; outline: none; }
.volume-bar::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); cursor: pointer; }
.lyrics-toggle-btn {
  font-size: 15px;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg3);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.lyrics-toggle-btn:hover {
  background: rgba(124, 58, 237, 0.2);
  border-color: var(--accent);
}
.lyrics-toggle-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== Lyrics Panel ===== */
.lyrics-panel {
  max-height: var(--player-lyrics-h);
  overflow-y: auto;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  padding: 12px 20px;
}
.lyrics-content { text-align: center; }
.lyrics-mode-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg3);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}
.plain-lyrics-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lyric-line {
  padding: 3px 0;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.8;
  transition: color 0.3s, font-size 0.3s;
}
.lyric-line.clickable {
  cursor: pointer;
  border-radius: 4px;
}
.lyric-line.clickable:hover {
  color: #fff;
  background: rgba(124, 58, 237, 0.15);
}
.lyric-line.active {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.lyric-line.near { color: var(--text-muted); }
.lyric-line.plain {
  color: var(--text);
  font-size: 13.5px;
  line-height: 2.0;
  user-select: text;
}

/* ===== Responsive ===== */
/* 태블릿 및 터치 디바이스: 볼륨 조절바 완전 제거 (가사 버튼과의 겹침 원천 방지) */
@media (max-width: 900px) {
  .player-volume {
    display: none !important;
  }
}
@media (pointer: coarse) {
  .player-volume {
    display: none !important;
  }
}
@media (hover: none) {
  .player-volume {
    display: none !important;
  }
}

/* 모바일 및 소형 태블릿 화면 (768px 이하) - 2단 그리드 미니 플레이어 */
@media (max-width: 768px) {
  :root {
    --player-h: 104px;
  }

  .header-brand {
    width: 100%;
    justify-content: space-between;
  }
  .apk-download-badge {
    padding: 4px 10px;
    font-size: 11px;
  }

  .logo { font-size: 15px; }
  .search-wrapper { flex: 1 1 100%; }
  .editor-body { flex-direction: column; }
  .editor-art-col { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .art-preview-wrap { width: 100px; height: 100px; }
  .col-size { display: none; }

  .player-main {
    height: auto;
    min-height: var(--player-h);
    padding: 8px 12px 10px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    row-gap: 6px;
    align-items: center;
    overflow: visible;
  }

  /* 1단: 가로 전체 타임라인 */
  .player-timeline {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    margin-bottom: 2px;
  }
  .progress-bar {
    min-width: 0;
    height: 32px;
    padding: 10px 0;
  }
  .progress-bar::-webkit-slider-runnable-track {
    height: 6px;
  }
  .progress-bar::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    margin-top: -7px;
  }
  .progress-bar::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }

  /* 2단: 앨범 커버 */
  .player-art-wrap {
    grid-column: 1;
    grid-row: 2;
  }
  .player-art {
    width: 44px;
    height: 44px;
  }

  /* 2단: 곡 정보 */
  .player-info {
    grid-column: 2;
    grid-row: 2;
    flex: none;
    min-width: 0;
    max-width: 100%;
  }
  .player-title {
    font-size: 13px;
  }
  .player-artist {
    font-size: 11px;
  }

  /* 2단: 가사 토글 버튼 (독립된 터치 영역, 절대 겹치지 않음) */
  .lyrics-toggle-btn {
    grid-column: 3;
    grid-row: 2;
    width: 34px;
    height: 34px;
    margin: 0;
  }

  /* 2단: 재생 컨트롤 (셔플, 이전, 재생, 다음, 반복) */
  .player-controls {
    grid-column: 4;
    grid-row: 2;
    gap: 1px;
  }
  .ctrl-btn {
    padding: 4px 4px;
    font-size: 15px;
  }
  .ctrl-play {
    font-size: 19px;
  }
  .ctrl-mode {
    font-size: 13px;
  }

  /* 가사 패널 모바일 최적화 */
  .lyrics-panel {
    max-height: min(220px, 45vh);
    padding: 10px 14px;
  }

  /* 모바일 저장 파일 카드 최적화 */
  .file-item {
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .file-thumb-wrap {
    width: 48px;
    height: 48px;
  }
  .file-info {
    flex: 1 1 calc(100% - 60px);
    min-width: 0;
  }
  .file-actions {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }
  .file-actions .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
    padding: 7px 0;
    font-size: 12px;
    font-weight: 500;
  }
}
