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

    :root {
      --primary-color: #0f9d58;
      --primary-dark: #0b7a43;
      --bg-dark: #ffffff;
      --bg-secondary: #f6f7f8;
      --bg-tertiary: #eceff1;
      --text-primary: #1a1a1a;
      --text-secondary: #666666;
      --text-tertiary: #999999;
      --border-color: #e4e6e8;
      --accent-purple: #8b5cf6;
      --accent-pink: #e0357f;
      --accent-cyan: #0891b2;
      --success: #0f9d58;
      --warning: #e08600;
      --error: #d9304a;

      /* 반투명 서피스(헤더/하단내비/플레이어바) 및 카드 위 버튼 색상 - 다크모드에서 함께 전환됨 */
      --surface-92: rgba(255, 255, 255, 0.92);
      --surface-96: rgba(255, 255, 255, 0.96);
      --card-btn-bg: rgba(255, 255, 255, 0.92);
      --card-btn-color: #111111;
    }

    [data-theme="dark"] {
      --primary-color: #1db954;
      --primary-dark: #17a34a;
      --bg-dark: #121212;
      --bg-secondary: #1a1a1a;
      --bg-tertiary: #242424;
      --text-primary: #f2f2f2;
      --text-secondary: #b3b3b3;
      --text-tertiary: #808080;
      --border-color: #2e2e2e;
      --accent-purple: #a78bfa;
      --accent-pink: #ff5c93;
      --accent-cyan: #22d3ee;
      --success: #1db954;
      --warning: #f0a83f;
      --error: #f0546a;

      --surface-92: rgba(24, 24, 24, 0.88);
      --surface-96: rgba(24, 24, 24, 0.92);
      --card-btn-bg: rgba(20, 20, 20, 0.85);
      --card-btn-color: #f2f2f2;
    }

    body {
      font-family: 'Pretendard', sans-serif;
      background: var(--bg-dark);
      color: var(--text-primary);
      overflow-x: hidden;
      min-height: 100vh;
      transition: background-color 0.25s ease, color 0.25s ease;
    }

    /* ===== 다크모드 토글 버튼 (헤더) ===== */
    .theme-toggle-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: 1px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-primary);
      cursor: pointer;
      font-size: 15px;
      flex-shrink: 0;
      transition: background 0.2s ease, transform 0.2s ease;
    }
    .theme-toggle-btn:hover {
      background: var(--bg-tertiary);
      transform: scale(1.06);
    }

    /* ===== 다크모드 설정 (프로필 모달 내 수동 설정 UI) ===== */
    .theme-setting-group {
      margin-bottom: 18px;
    }
    .theme-setting-label {
      font-size: 13px;
      color: var(--text-secondary);
      margin-bottom: 8px;
      font-weight: 600;
    }
    .theme-setting-options {
      display: flex;
      gap: 8px;
    }
    .theme-setting-option {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      padding: 10px 6px;
      border-radius: 10px;
      border: 1.5px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-secondary);
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      transition: all 0.15s ease;
    }
    .theme-setting-option i {
      font-size: 15px;
    }
    .theme-setting-option.active {
      border-color: var(--primary-color);
      color: var(--primary-color);
      background: rgba(15, 157, 88, 0.12);
    }

    /* ===== 내 정보 보기 모달 ===== */
    .mydata-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 0;
      border-bottom: 1px solid var(--border-color);
      gap: 12px;
    }
    .mydata-row:last-child { border-bottom: none; }
    .mydata-label {
      font-size: 13px;
      color: var(--text-secondary);
      flex-shrink: 0;
    }
    .mydata-value {
      font-size: 13px;
      color: var(--text-primary);
      font-weight: 600;
      text-align: right;
      word-break: break-all;
    }
    .mydata-section-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-primary);
      margin: 18px 0 4px;
    }
    .mydata-note {
      font-size: 12px;
      color: var(--text-tertiary);
      margin-top: 14px;
      line-height: 1.6;
    }

    /* ===== 이스터에그: 무지개 비 ===== */
    #rainbowEasterEgg {
      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 99999;
      overflow: hidden;
    }
    #rainbowEasterEgg .rainbow-arc {
      position: absolute;
      top: -14vw;
      left: 50%;
      transform: translateX(-50%);
      width: 130vw;
      height: 65vw;
      max-width: 1400px;
      max-height: 700px;
      border-radius: 50%;
      border: 10px solid transparent;
      border-top-color: #ff3b3b;
      box-shadow:
        0 0 0 10px #ff9900 inset,
        0 0 0 20px #ffee00 inset,
        0 0 0 30px #33cc33 inset,
        0 0 0 40px #3399ff inset,
        0 0 0 50px #9933ff inset;
      opacity: 0;
      animation: rainbowFadeIn 1s ease forwards;
    }
    @keyframes rainbowFadeIn {
      from { opacity: 0; top: -20vw; }
      to { opacity: 0.9; top: -14vw; }
    }
    #rainbowEasterEgg .rain-drop {
      position: absolute;
      top: -5%;
      width: 2px;
      height: 60px;
      background: linear-gradient(180deg, rgba(120,180,255,0) 0%, rgba(120,180,255,0.8) 100%);
      animation-name: rainbowDropFall;
      animation-timing-function: linear;
      animation-iteration-count: infinite;
    }
    @keyframes rainbowDropFall {
      from { transform: translateY(-10vh); opacity: 0.9; }
      to { transform: translateY(110vh); opacity: 0.5; }
    }

    /* ===== HEADER ===== */
    header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: var(--surface-92);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border-color);
      padding: 16px 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    }

    .header-left {
      display: flex;
      align-items: center;
      gap: 20px;
      flex: 0 0 auto;
    }

    .logo {
      display: flex;
      align-items: center;
    }

    .logo img {
      display: block;
      height: 32px;
      width: auto;
    }

    .search-container {
      flex: 1;
      max-width: 400px;
    }

    .search-container input {
      width: 100%;
      padding: 12px 16px;
      border: 1px solid var(--border-color);
      outline: none;
      border-radius: 999px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 14px;
      transition: all 0.3s ease;
    }

    .search-container input:focus {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
      box-shadow: 0 0 0 3px rgba(15, 157, 88, 0.12);
    }

    .search-container input::placeholder {
      color: var(--text-tertiary);
    }

    .header-right {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 0 0 auto;
    }

    .nav-btn {
      height: 40px;
      padding: 0 16px;
      border: none;
      border-radius: 999px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      transition: all 0.3s ease;
      position: relative;
    }

    .nav-btn i {
      font-size: 14px;
    }

    .nav-btn:hover {
      background: var(--bg-tertiary);
      transform: scale(1.05);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .nav-btn.active {
      background: var(--primary-color);
      color: #fff;
    }

    .badge {
      position: absolute;
      top: -5px;
      right: -5px;
      background: var(--accent-pink);
      color: white;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
    }

    /* ===== AUTH / ADMIN ===== */
    .auth-area {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .google-login-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 16px;
      border: 1px solid var(--border-color);
      border-radius: 999px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s ease;
      white-space: nowrap;
    }

    .google-login-btn:hover {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
    }

    .user-chip {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      object-fit: cover;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-color);
    }

    .user-name {
      font-size: 13px;
      color: var(--text-secondary);
      max-width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    #adminBtn.nav-btn {
      background: var(--primary-color);
      color: #fff;
    }

    .admin-form label {
      display: block;
      margin-bottom: 16px;
      font-size: 13px;
      color: var(--text-secondary);
      font-weight: 600;
    }

    .admin-form input,
    .admin-form select {
      width: 100%;
      margin-top: 6px;
      padding: 12px 14px;
      border: 1px solid var(--border-color);
      outline: none;
      border-radius: 10px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 14px;
      transition: all 0.3s ease;
    }

    .admin-form input:focus,
    .admin-form select:focus {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
    }

    .admin-form button[type="submit"] {
      margin-top: 8px;
    }

    .admin-form-msg {
      margin-top: 12px;
      font-size: 13px;
      color: var(--error);
      min-height: 18px;
    }

    /* ===== ADMIN MODAL: 음원/배너/공지 탭 ===== */
    .admin-modal-tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 24px;
    }

    .admin-modal-tab-btn {
      padding: 8px 16px;
      border-radius: 999px;
      border: 1px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-secondary);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .admin-modal-tab-btn.active {
      background: var(--primary-color);
      border-color: var(--primary-color);
      color: #fff;
    }

    .admin-section {
      display: none;
    }

    .admin-section.active {
      display: block;
    }

    .admin-form textarea {
      width: 100%;
      margin-top: 6px;
      padding: 12px 14px;
      border: 1px solid var(--border-color);
      outline: none;
      border-radius: 10px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 14px;
      font-family: inherit;
      resize: vertical;
      min-height: 70px;
      transition: all 0.3s ease;
    }

    .admin-form textarea:focus {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
    }

    .admin-form small {
      display: block;
      margin-top: 4px;
      font-weight: 400;
      color: var(--text-tertiary);
      font-size: 12px;
    }

    .admin-list {
      margin-top: 24px;
      border-top: 1px solid var(--border-color);
      padding-top: 20px;
    }

    .admin-list-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-secondary);
      margin-bottom: 12px;
    }

    .admin-list-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px;
      border: 1px solid var(--border-color);
      border-radius: 10px;
      margin-bottom: 8px;
    }

    .admin-list-item img {
      width: 48px;
      height: 27px;
      object-fit: cover;
      border-radius: 4px;
      background: var(--bg-tertiary);
      flex-shrink: 0;
    }

    .admin-list-item-info {
      flex: 1;
      min-width: 0;
    }

    .admin-list-item-title {
      font-size: 13px;
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .admin-list-item-sub {
      font-size: 11px;
      color: var(--text-tertiary);
    }

    .admin-list-item-delete {
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 50%;
      background: var(--bg-tertiary);
      color: var(--error);
      cursor: pointer;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .admin-list-item-delete:hover {
      background: var(--error);
      color: #fff;
    }

    .admin-list-empty {
      font-size: 12px;
      color: var(--text-tertiary);
    }

    .admin-list-search {
      width: 100%;
      margin-bottom: 12px;
      padding: 10px 14px;
      border: 1px solid var(--border-color);
      outline: none;
      border-radius: 10px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 13px;
      transition: all 0.3s ease;
    }

    .admin-list-search:focus {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
    }

    .admin-form-btn-row {
      display: flex;
      gap: 8px;
    }

    .admin-form-btn-row .control-btn {
      flex: 1;
    }

    .admin-list-item-edit {
      background: var(--bg-tertiary);
      color: var(--primary-color);
    }

    .admin-list-item-edit:hover {
      background: var(--primary-color);
      color: #fff;
    }

    /* ===== 공지 배너 ===== */
    .announcement-bar {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border-color);
      padding: 10px 24px;
      font-size: 13px;
      color: var(--text-primary);
    }

    .announcement-bar i.fa-bullhorn {
      color: var(--primary-color);
      flex-shrink: 0;
    }

    .announcement-bar-text {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .announcement-bar-close {
      border: none;
      background: none;
      color: var(--text-tertiary);
      cursor: pointer;
      font-size: 14px;
      flex-shrink: 0;
    }

    .announcement-bar-close:hover {
      color: var(--text-primary);
    }

    /* ===== MOBILE BOTTOM NAV (Spotify 스타일) ===== */
    .mobile-bottom-nav {
      display: none;
      position: fixed;
      left: 0;
      bottom: 0;
      width: 100%;
      z-index: 1001;
      background: var(--surface-96);
      backdrop-filter: blur(12px);
      border-top: 1px solid var(--border-color);
      padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
      justify-content: space-around;
      align-items: center;
    }

    .bn-item {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      background: none;
      border: none;
      color: var(--text-tertiary);
      font-size: 10px;
      font-weight: 600;
      padding: 6px 2px;
      cursor: pointer;
      transition: color 0.2s ease, transform 0.2s ease;
    }

    .bn-item i {
      font-size: 18px;
    }

    .bn-item img.bn-avatar {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      object-fit: cover;
    }

    .bn-item.active {
      color: var(--primary-color);
      transform: translateY(-2px);
    }

    /* ===== PROFILE MODAL 내부 요소 ===== */
    .profile-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 24px;
    }

    .profile-row-info {
      flex: 1 1 auto;
      min-width: 0;
    }

    .profile-edit-name-btn {
      flex: 0 0 auto;
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 50%;
      background: var(--bg-tertiary);
      color: var(--text-secondary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      transition: all 0.2s ease;
    }

    .profile-edit-name-btn:hover {
      background: var(--primary-color);
      color: #fff;
    }

    .profile-edit-name-form {
      display: flex;
      gap: 8px;
      margin-top: -12px;
      margin-bottom: 16px;
    }

    .profile-edit-name-form input {
      flex: 1 1 auto;
      min-width: 0;
      padding: 10px 12px;
      border: 1px solid var(--border-color);
      border-radius: 10px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 14px;
      outline: none;
    }

    .profile-edit-name-form input:focus {
      border-color: var(--primary-color);
    }

    .profile-edit-name-save,
    .profile-edit-name-cancel {
      flex: 0 0 auto;
      width: 40px;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      transition: all 0.2s ease;
    }

    .profile-edit-name-save {
      background: var(--primary-color);
      color: #fff;
    }

    .profile-edit-name-save:hover {
      background: var(--primary-dark);
    }

    .profile-edit-name-cancel {
      background: var(--bg-tertiary);
      color: var(--text-secondary);
    }

    .profile-edit-name-cancel:hover {
      background: var(--bg-tertiary);
      color: var(--error);
    }

    .profile-avatar {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      object-fit: cover;
      background: var(--bg-tertiary);
      border: 1px solid var(--border-color);
    }

    .profile-name {
      font-weight: 700;
      font-size: 16px;
    }

    .profile-admin-badge {
      color: var(--primary-color);
      font-size: 12px;
      font-weight: 700;
      margin-top: 2px;
    }

    .profile-btn {
      width: 100%;
      padding: 14px;
      border-radius: 12px;
      border: none;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      margin-bottom: 12px;
      transition: all 0.3s ease;
    }

    .profile-btn.primary {
      background: var(--primary-color);
      color: #fff;
    }

    .profile-btn.primary:hover {
      background: var(--primary-dark);
    }

    .profile-btn.secondary {
      background: var(--bg-tertiary);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
    }

    .profile-btn.secondary:hover {
      border-color: var(--primary-color);
    }

    .profile-btn.google {
      background: #fff;
      color: #1f1f1f;
      border: 1px solid var(--border-color);
    }

    .profile-btn.google:hover {
      background: var(--bg-tertiary);
    }

    .profile-btn.danger {
      background: none;
      color: var(--error);
      border: 1px solid var(--error);
    }

    .profile-btn.danger:hover {
      background: var(--error);
      color: #fff;
    }

    .profile-tos-link {
      display: block;
      width: 100%;
      text-align: center;
      padding: 10px;
      background: none;
      border: none;
      color: var(--text-tertiary);
      font-size: 12px;
      cursor: pointer;
    }

    .profile-tos-link:hover {
      color: var(--primary-color);
    }

    /* ===== MAIN CONTAINER ===== */
    main {
      padding: 24px;
      padding-bottom: 220px;
      max-width: 1400px;
      margin: 0 auto;
    }

    /* ===== 배너 캐러셀 ===== */
    .banner-section {
      margin-bottom: 32px;
    }

    .banner-track {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      padding-bottom: 4px;
    }

    .banner-track::-webkit-scrollbar {
      height: 6px;
    }

    .banner-card {
      position: relative;
      flex: 0 0 auto;
      width: min(560px, 82vw);
      aspect-ratio: 16 / 9;
      border-radius: 16px;
      overflow: hidden;
      cursor: pointer;
      border: 1px solid var(--border-color);
      scroll-snap-align: start;
      background: var(--bg-secondary);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    /* 배너가 1개뿐일 때는 캐러셀 폭 대신 컨테이너를 양쪽 끝까지 꽉 채움 */
    .banner-track.single-banner {
      overflow-x: visible;
    }

    .banner-track.single-banner .banner-card {
      width: 100%;
      aspect-ratio: 21 / 6;
    }

    @media (max-width: 640px) {
      .banner-track.single-banner .banner-card {
        aspect-ratio: 16 / 9;
      }
    }

    .banner-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    }

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

    .banner-card-caption {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      padding: 20px 22px;
      background: linear-gradient(0deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0) 100%);
      color: #fff;
    }

    .banner-card-title {
      font-weight: 700;
      font-size: clamp(1.5rem, 6vw, 5rem);
      line-height: 1.15;
    }

    .banner-card-desc {
      margin-top: 6px;
      font-size: clamp(0.8rem, 1.6vw, 1.05rem);
      font-weight: 500;
      color: rgba(255, 255, 255, 0.85);
      overflow: hidden;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      max-width: 90%;
    }

    .playlist-back-btn {
      border: 1px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-secondary);
      border-radius: 999px;
      padding: 8px 16px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      margin-left: auto;
      transition: all 0.2s ease;
    }

    .playlist-back-btn:hover {
      color: var(--text-primary);
      border-color: var(--primary-color);
    }

    /* ===== TABS ===== */
    .tabs {
      display: flex;
      gap: 12px;
      margin-bottom: 32px;
      border-bottom: 1px solid var(--border-color);
      padding-bottom: 16px;
    }

    .tab-btn {
      padding: 12px 24px;
      border: none;
      background: none;
      color: var(--text-secondary);
      cursor: pointer;
      font-size: 15px;
      font-weight: 600;
      transition: all 0.3s ease;
      position: relative;
    }

    .tab-btn:hover {
      color: var(--text-primary);
    }

    .tab-btn.active {
      color: var(--primary-color);
    }

    .tab-btn.active::after {
      content: '';
      position: absolute;
      bottom: -16px;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--primary-color);
      border-radius: 999px;
    }

    /* ===== SECTION TITLE ===== */
    .tab-content {
      display: none;
    }

    .tab-content.active {
      display: block;
    }

    .section-title {
      font-size: 32px;
      font-weight: 700;
      margin-bottom: 28px;
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .section-title i {
      color: var(--primary-color);
    }

    .chart-reset-note {
      margin-left: auto;
      font-size: 13px;
      font-weight: 500;
      color: var(--text-tertiary);
      white-space: nowrap;
    }

    .daily-playlist-subtitle {
      font-size: 13.5px;
      font-weight: 700;
      color: var(--text-secondary);
      margin-bottom: 10px;
    }

    .daily-playlist-row {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      scroll-behavior: smooth;
      padding-bottom: 8px;
      margin-bottom: 18px;
    }

    .daily-playlist-row::-webkit-scrollbar {
      height: 6px;
    }

    .daily-playlist-row .my-playlist-card {
      flex: 0 0 190px;
      width: 190px;
    }

    .daily-playlist-row .my-playlist-card-count {
      color: #fff;
      background: var(--primary-color);
    }

    .chart-reset-timer {
      font-weight: 700;
      color: var(--primary-color);
      font-variant-numeric: tabular-nums;
    }

    @media (max-width: 480px) {
      .chart-reset-note {
        margin-left: 0;
        font-size: 11.5px;
      }
    }

    /* ===== MUSIC GRID ===== */
    .music-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 20px;
      animation: fadeIn 0.5s ease;
    }

    /* ===== 곡 가로 목록 (검색 결과 / 전체 곡) ===== */
    .music-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      animation: fadeIn 0.5s ease;
    }

    .music-list-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 8px 14px 8px 8px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      cursor: pointer;
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    }

    .music-list-item:hover {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
      transform: translateX(2px);
    }

    .music-list-item-thumb-wrap {
      position: relative;
      flex: 0 0 auto;
      width: 52px;
      height: 52px;
      border-radius: 8px;
      overflow: hidden;
    }

    .music-list-item-thumb {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .music-list-item-play-icon {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.45);
      color: #fff;
      font-size: 14px;
      opacity: 0;
      transition: opacity 0.2s ease;
    }

    .music-list-item:hover .music-list-item-play-icon {
      opacity: 1;
    }

    .music-list-item-info {
      flex: 1 1 auto;
      min-width: 0;
    }

    .music-list-item-title {
      font-size: 14.5px;
      font-weight: 600;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .music-list-item-artist {
      margin-top: 2px;
      font-size: 12.5px;
      color: var(--text-secondary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .genre-tag {
      display: inline-block;
      padding: 1px 8px;
      margin-left: 6px;
      border-radius: 999px;
      background: rgba(15, 157, 88, 0.12);
      color: var(--primary-color);
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
      vertical-align: middle;
    }

    .album-tag {
      display: inline-block;
      padding: 1px 8px;
      margin-left: 6px;
      border-radius: 999px;
      background: rgba(120, 120, 128, 0.14);
      color: var(--text-secondary);
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
      vertical-align: middle;
    }

    .music-title .album-tag,
    .music-title .genre-tag {
      font-size: 10.5px;
    }

    /* 장르 필터 칩 (전체 곡 목록 상단) */
    .genre-filter-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 14px;
    }

    .genre-filter-chip {
      padding: 6px 14px;
      border-radius: 999px;
      border: 1px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-secondary);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }

    .genre-filter-chip:hover {
      border-color: var(--primary-color);
      color: var(--text-primary);
    }

    .genre-filter-chip.active {
      background: var(--primary-color);
      border-color: var(--primary-color);
      color: #fff;
    }

    .music-list-item-ranked {
      gap: 4px;
    }

    /* 최근재생 / 추천 목록: 3.2줄 정도만 보이고 나머지는 마우스 휠로 스크롤 */
    .home-scroll-list {
      max-height: 254px;
      overflow-y: auto;
      padding-right: 4px;
    }

    .home-scroll-list::-webkit-scrollbar {
      width: 6px;
    }

    .home-scroll-list::-webkit-scrollbar-thumb {
      background: var(--border-color);
      border-radius: 3px;
    }

    .music-list-item-rank {
      flex: 0 0 auto;
      width: 32px;
      text-align: center;
      font-size: 16px;
      font-weight: 800;
      color: var(--text-tertiary);
      font-variant-numeric: tabular-nums;
    }

    .music-list-item-rank.top1 {
      color: #f0b400;
    }

    .music-list-item-rank.top2 {
      color: #9aa5b1;
    }

    .music-list-item-rank.top3 {
      color: #c97b3d;
    }

    @media (max-width: 640px) {
      .music-list-item-rank {
        width: 22px;
        font-size: 14px;
      }
    }

    .music-list-item-fav-count {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 12px;
      font-weight: 600;
      color: var(--text-tertiary);
    }

    .music-list-item-fav-count i {
      color: var(--accent-pink, #ff4d6d);
    }

    .music-list-item-actions {
      flex: 0 0 auto;
      display: flex;
      gap: 6px;
    }

    .music-list-item-btn {
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 50%;
      background: var(--bg-tertiary);
      color: var(--text-secondary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      transition: all 0.2s ease;
    }

    .music-list-item-btn:hover {
      background: var(--primary-color);
      color: #fff;
    }

    .music-list-item-btn.active {
      background: var(--accent-pink, #ff4d6d);
      color: #fff;
    }

    @media (max-width: 640px) {
      .music-list-item-fav-count {
        display: none;
      }
    }

    /* ===== 재생목록 상세 (가로 목록형 + 순서 드래그) ===== */
    .music-list-item-playlist {
      cursor: default;
    }

    .music-list-item-playlist .music-list-item-thumb-wrap,
    .music-list-item-playlist .music-list-item-info {
      cursor: pointer;
    }

    .music-list-item-drag-handle {
      flex: 0 0 auto;
      width: 26px;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-tertiary);
      font-size: 15px;
      border-radius: 8px;
      cursor: grab;
      touch-action: none;
      transition: color 0.2s ease, background 0.2s ease;
    }

    .music-list-item-drag-handle:hover {
      color: var(--primary-color);
      background: var(--bg-tertiary);
    }

    .music-list-item-drag-handle:active {
      cursor: grabbing;
    }

    .music-list-item-btn.danger:hover {
      background: var(--accent-pink, #ff4d6d);
      color: #fff;
    }

    /* 드래그 정렬 중(SortableJS) 부드러운 이동 애니메이션 */
    .music-list .music-list-item {
      transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    }

    .music-list-item.sortable-chosen {
      cursor: grabbing;
      border-color: var(--primary-color);
      box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
    }

    .music-list-item.sortable-ghost {
      opacity: 0.35;
      background: var(--bg-tertiary);
      border: 1.5px dashed var(--primary-color);
    }

    .music-list-item.sortable-drag,
    .music-list-item.sortable-fallback {
      opacity: 0.95;
      box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
      transform: scale(1.02);
    }

    @media (max-width: 640px) {
      .music-list-item-drag-handle {
        width: 22px;
        font-size: 13px;
      }
    }

    /* ===== 홈 화면 섹션 (인기차트 / 최근 들은 곡 / 추천) ===== */
    .home-row-section {
      margin-bottom: 40px;
    }

    .home-row-section .section-title {
      font-size: 22px;
      margin-bottom: 16px;
    }

    .music-row {
      display: flex;
      gap: 16px;
      overflow-x: auto;
      scroll-behavior: smooth;
      padding-bottom: 8px;
      animation: fadeIn 0.5s ease;
    }

    .music-row::-webkit-scrollbar {
      height: 6px;
    }

    .music-row .music-card {
      flex: 0 0 180px;
      width: 180px;
    }

    .home-row-empty {
      color: var(--text-tertiary);
      font-size: 13px;
      padding: 12px 0;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .music-card {
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 16px;
      overflow: hidden;
      transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
      position: relative;
      group: card;
    }

    .music-card:hover {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    }

    .music-card-image {
      width: 100%;
      aspect-ratio: 1/1;
      object-fit: cover;
      display: block;
      background: var(--border-color);
      position: relative;
    }

    .music-card-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      transition: all 0.35s ease;
    }

    .music-card:hover .music-card-overlay {
      opacity: 1;
    }

    .music-card-play-icon {
      width: 56px;
      height: 56px;
      background: var(--primary-color);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      font-size: 22px;
      transform: scale(0.8);
      transition: transform 0.3s ease;
    }

    .music-card:hover .music-card-play-icon {
      transform: scale(1);
    }

    /* ===== 즐겨찾기 버튼 옆 카운트 뱃지 (카드에 마우스를 올렸을 때만 표시) ===== */
    .music-card-fav-count {
      position: absolute;
      top: 8px;
      left: 44px;
      height: 32px;
      display: flex;
      align-items: center;
      color: #fff;
      font-size: 12px;
      font-weight: 700;
      text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
      white-space: nowrap;
      z-index: 2;
      opacity: 0;
      transition: opacity 0.25s ease;
    }

    .music-card:hover .music-card-fav-count {
      opacity: 1;
    }

    .music-info {
      padding: 16px;
    }

    .music-title {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 8px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .music-artist {
      color: var(--text-secondary);
      font-size: 13px;
      margin-bottom: 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .music-card-actions {
      display: flex;
      gap: 8px;
    }

    .card-action-btn {
      flex: 1;
      padding: 10px;
      border: none;
      border-radius: 8px;
      background: var(--bg-tertiary);
      color: var(--text-primary);
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }

    .card-action-btn:hover {
      background: var(--primary-color);
      color: #fff;
      transform: scale(1.02);
    }

    .card-action-btn.favorite.active {
      background: var(--accent-pink);
      color: white;
    }

    /* ===== 카드 위 '재생목록에 추가' 버튼 ===== */
    .music-card-add-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 50%;
      background: var(--card-btn-bg);
      color: var(--card-btn-color);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
      transition: all 0.2s ease;
      z-index: 2;
    }

    .music-card-add-btn:hover {
      background: var(--primary-color);
      color: #fff;
      transform: scale(1.08);
    }

    /* ===== 카드 위 '즐겨찾기' 버튼 ===== */
    .music-card-fav-btn {
      position: absolute;
      top: 8px;
      left: 8px;
      width: 32px;
      height: 32px;
      border: none;
      border-radius: 50%;
      background: var(--card-btn-bg);
      color: var(--card-btn-color);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 13px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
      transition: all 0.2s ease;
      z-index: 2;
    }

    .music-card-fav-btn:hover {
      background: var(--accent-pink, #ff4d6d);
      color: #fff;
      transform: scale(1.08);
    }

    .music-card-fav-btn.active {
      background: var(--accent-pink, #ff4d6d);
      color: #fff;
    }

    /* ===== 내 재생목록 ===== */
    .my-playlist-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 24px;
    }

    .my-playlist-card {
      position: relative;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 18px;
      overflow: hidden;
      cursor: pointer;
      padding: 10px 10px 0;
      transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    }

    .my-playlist-card:hover {
      transform: translateY(-6px);
      border-color: transparent;
      box-shadow: 0 16px 32px rgba(15, 157, 88, 0.16), 0 4px 10px rgba(0, 0, 0, 0.06);
    }

    .my-playlist-card-thumbs {
      position: relative;
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      aspect-ratio: 1/1;
      background: var(--bg-tertiary);
      border-radius: 12px;
      overflow: hidden;
    }

    .my-playlist-card-thumbs.single {
      grid-template-columns: 1fr;
    }

    .my-playlist-card-thumbs img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 0.5s ease;
    }

    .my-playlist-card:hover .my-playlist-card-thumbs img {
      transform: scale(1.06);
    }

    .my-playlist-card-thumbs::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.35) 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .my-playlist-card:hover .my-playlist-card-thumbs::after {
      opacity: 1;
    }

    .my-playlist-card-empty {
      aspect-ratio: 1/1;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text-tertiary);
      font-size: 36px;
      background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
      border-radius: 12px;
    }

    .my-playlist-card-play {
      position: absolute;
      right: 10px;
      bottom: 10px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--primary-color);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      box-shadow: 0 6px 16px rgba(15, 157, 88, 0.4);
      opacity: 0;
      transform: translateY(8px) scale(0.9);
      transition: all 0.3s ease;
      pointer-events: none;
    }

    .my-playlist-card:hover .my-playlist-card-play {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    .my-playlist-card-info {
      padding: 14px 6px 16px;
    }

    .my-playlist-card-title {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 5px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .my-playlist-card-count {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11.5px;
      font-weight: 600;
      color: var(--primary-dark);
      background: rgba(15, 157, 88, 0.1);
      padding: 3px 10px;
      border-radius: 999px;
    }

    .playlist-header-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
    }

    .playlist-back-btn.danger {
      color: var(--error);
      border-color: var(--error);
    }

    .playlist-back-btn.danger:hover {
      background: var(--error);
      color: #fff;
    }

    .playlist-picker-toggle.active {
      background: var(--success);
      color: #fff;
    }

    /* ===== EMPTY STATE ===== */
    .empty-state {
      text-align: center;
      padding: 80px 40px;
      color: var(--text-tertiary);
    }

    .empty-state i {
      font-size: 64px;
      margin-bottom: 20px;
      opacity: 0.5;
    }

    .empty-state p {
      font-size: 18px;
      margin-bottom: 10px;
    }

    /* ===== PLAYER ===== */
    .player {
      position: fixed;
      left: 0;
      bottom: 0;
      width: 100%;
      background: var(--surface-96);
      backdrop-filter: blur(12px);
      border-top: 1px solid var(--border-color);
      padding: 16px 24px;
      z-index: 999;
      display: flex;
      align-items: center;
      gap: 20px;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
    }

    /* 모바일 미니 플레이어 맨 위에 붙는 얇은 재생 진행선 (탭하면 펼치기와 동일하게 전체 플레이어로 이동) */
    .mini-progress-line {
      display: none;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 3px;
      background: var(--border-color);
      overflow: hidden;
    }
    .mini-progress-fill {
      height: 100%;
      width: 0%;
      background: var(--primary-color);
    }

    .player-tap-area {
      display: flex;
      align-items: center;
      gap: 20px;
      min-width: 0;
      cursor: pointer;
    }

    .player-cover {
      width: 72px;
      height: 72px;
      border-radius: 12px;
      object-fit: cover;
      background: var(--border-color);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      animation: playerPulse 0.5s ease;
      flex-shrink: 0;
    }

    @keyframes playerPulse {
      0% { transform: scale(0.95); opacity: 0; }
      100% { transform: scale(1); opacity: 1; }
    }

    .player-info {
      min-width: 220px;
    }

    .player-title {
      font-weight: 700;
      font-size: 15px;
      margin-bottom: 6px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .player-artist {
      color: var(--text-secondary);
      font-size: 13px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .controls {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .buttons {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
    }

    /* ===== 플레이어 펼치기 버튼 (PC/모바일 공통) ===== */
    .expand-player-btn {
      width: 38px;
      height: 38px;
      font-size: 13px;
      flex-shrink: 0;
    }

    /* ===== NOW PLAYING (플레이어 펼치기 전체화면 뷰) ===== */
    .now-playing-overlay {
      position: fixed;
      inset: 0;
      z-index: 1500;
      background: var(--bg-dark);
      display: flex;
      flex-direction: column;
      transform: translateY(100%);
      transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
      overflow-y: auto;
    }
    .now-playing-overlay.show {
      transform: translateY(0);
    }

    .np-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      flex-shrink: 0;
    }
    .np-icon-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      border: none;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 15px;
      cursor: pointer;
    }
    .np-topbar-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text-secondary);
      letter-spacing: 0.02em;
    }

    .np-content {
      flex: 1;
      width: 100%;
      max-width: 460px;
      margin: 0 auto;
      padding: 12px 28px 48px;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .np-main {
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    /* ===== PC(넓은 화면): 앨범/컨트롤은 왼쪽에 고정하고,
       남는 공간을 "다음 재생" 목록이 오른쪽에서 꽉 채우도록 2단 레이아웃으로 전환 ===== */
    @media (min-width: 900px) {
      .np-content {
        flex-direction: row;
        align-items: stretch;
        justify-content: center;
        gap: 72px;
        max-width: 1200px;
        width: 100%;
        padding: 48px 48px 56px;
        text-align: left;
      }

      .np-main {
        flex: 0 0 auto;
        width: 400px;
        align-items: center;
        text-align: center;
        align-self: flex-start;
      }

      .np-cover-wrap {
        width: min(400px, 26vw);
        height: min(400px, 26vw);
      }

      .np-queue-section {
        flex: 1;
        max-width: none;
        margin-top: 0;
        display: flex;
        flex-direction: column;
        min-height: 0;
      }

      .np-queue-list {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding-right: 6px;
      }
    }

    .np-cover-wrap {
      position: relative;
      width: min(340px, 70vw);
      height: min(340px, 70vw);
      border-radius: 16px;
      overflow: hidden;
      background: var(--bg-tertiary);
      box-shadow: 0 20px 44px rgba(0, 0, 0, 0.18);
      margin-bottom: 28px;
      flex-shrink: 0;
    }

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

    /* 플레이어를 펼쳤을 때는 앨범 커버 대신 이 자리에 유튜브 플레이어(영상)를 그대로 보여준다.
       #youtubePlayer는 DOM 부모를 바꾸지 않고(iframe reload 방지) position:fixed를 유지한 채,
       top/left/width/height 좌표만 JS가 매 프레임 npCoverWrap 위치에 맞춰 겹쳐지도록 동기화한다.
       now-playing-overlay(z-index:1500)보다 위에 보이도록 z-index만 여기서 올려준다. */
    #youtubePlayer.np-embedded {
      border-radius: 16px;
      box-shadow: 0 20px 44px rgba(0, 0, 0, 0.18);
      transform: none;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      z-index: 1600;
      transition: none;
    }

    #youtubePlayer.np-embedded.yt-player-hidden {
      transform: none;
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: none;
    }

    #youtubePlayer.np-embedded iframe {
      width: 100%;
      height: 100%;
    }

    .np-title {
      font-size: 21px;
      font-weight: 800;
      margin-bottom: 8px;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .np-artist {
      font-size: 14px;
      color: var(--text-secondary);
      margin-bottom: 18px;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* ===== 지금 재생 중인 곡: 즐겨찾기 / 재생목록 추가 버튼 ===== */
    .np-song-actions {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      margin-bottom: 24px;
    }
    .np-action-btn {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 9px 16px;
      border-radius: 999px;
      border: 1px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .np-action-btn:hover {
      border-color: var(--primary-color);
      background: var(--bg-tertiary);
    }
    .np-action-btn#npFavBtn.active {
      background: var(--accent-pink, #ff4d6d);
      border-color: var(--accent-pink, #ff4d6d);
      color: #fff;
    }
    .np-action-btn#npAddPlaylistBtn.active {
      background: var(--primary-color);
      border-color: var(--primary-color);
      color: #fff;
    }

    .np-progress-wrapper {
      width: 100%;
      margin-bottom: 24px;
    }
    .np-progress-wrapper .progress-track-wrap {
      width: 100%;
      margin-bottom: 6px;
    }
    .np-time-row {
      display: flex;
      justify-content: space-between;
      font-size: 12px;
      color: var(--text-tertiary);
      font-weight: 500;
    }

    .np-controls {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 18px;
      margin-bottom: 30px;
    }
    .np-controls .control-btn {
      width: 46px;
      height: 46px;
      font-size: 16px;
    }
    .np-controls .np-play-btn {
      width: 62px;
      height: 62px;
      font-size: 20px;
    }

    .np-volume-row {
      display: flex;
      align-items: center;
      gap: 12px;
      width: 100%;
      max-width: 260px;
    }
    .np-volume-row .control-btn {
      width: 36px;
      height: 36px;
      font-size: 13px;
      flex-shrink: 0;
    }
    .np-volume-row .seek-range {
      flex: 1;
    }

    /* ===== NOW PLAYING: 다음 재생 목록 ===== */
    .np-queue-section {
      width: 100%;
      max-width: 460px;
      margin-top: 36px;
      text-align: left;
    }
    .np-queue-header {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
      font-size: 14px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .np-queue-note {
      font-size: 11px;
      font-weight: 500;
      color: var(--text-tertiary);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .np-queue-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .np-queue-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 8px;
      border-radius: 10px;
      cursor: pointer;
      transition: background 0.15s ease;
    }
    .np-queue-item:hover {
      background: var(--bg-secondary);
    }
    .np-queue-item-thumb {
      width: 44px;
      height: 44px;
      border-radius: 8px;
      object-fit: cover;
      flex-shrink: 0;
      background: var(--bg-tertiary);
    }
    .np-queue-item-info {
      min-width: 0;
      flex: 1;
    }
    .np-queue-item-title {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .np-queue-item-artist {
      font-size: 12px;
      color: var(--text-secondary);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .np-queue-empty {
      padding: 20px 4px;
      text-align: center;
      font-size: 13px;
      color: var(--text-tertiary);
    }

    .control-btn {
      width: 44px;
      height: 44px;
      border: none;
      border-radius: 50%;
      background: var(--primary-color);
      color: #fff;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .control-btn:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 12px rgba(15, 157, 88, 0.25);
    }

    .control-btn.secondary {
      background: var(--bg-secondary);
      color: var(--text-primary);
      border: 1px solid var(--border-color);
    }

    .control-btn.secondary:hover {
      background: var(--bg-tertiary);
      border-color: var(--primary-color);
    }

    .control-btn.active {
      background: var(--accent-cyan);
      color: #fff;
    }

    /* 원형 아이콘 버튼(control-btn)을 폼 제출용 넓은 버튼으로 쓸 때 */
    .control-btn.wide {
      width: 100%;
      height: 48px;
      border-radius: 12px;
      padding: 0 20px;
      font-size: 14px;
      gap: 8px;
    }

    .progress-wrapper {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .time {
      width: 45px;
      text-align: center;
      font-size: 12px;
      color: var(--text-tertiary);
      font-weight: 500;
    }

    .seek-range {
      flex: 1;
      height: 4px;
      accent-color: var(--primary-color);
      cursor: pointer;
      border-radius: 999px;
      -webkit-appearance: none;
      appearance: none;
      background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) var(--value, 0%), var(--border-color) var(--value, 0%), var(--border-color) 100%);
    }

    /* 네이티브 슬라이더의 동그란 핸들(thumb)은 브라우저가 자체적으로 그려서
       매 프레임 갱신해도 매끄럽게 따라오지 못하고 끊겨 보일 수 있음(트랙 그라데이션은 매끄러움).
       그래서 네이티브 thumb은 투명하게 감추고(클릭/드래그 영역은 그대로 유지),
       위에 순수 CSS로 그린 원(.progress-thumb-visual)을 JS에서 left(%)로 직접 움직여
       두 요소가 항상 같은 프레임에 같이 부드럽게 움직이도록 함. */
    .progress-track-wrap {
      position: relative;
      flex: 1;
      display: flex;
      align-items: center;
    }

    .progress-thumb-visual {
      position: absolute;
      top: 50%;
      left: 0%;
      width: 12px;
      height: 12px;
      background: var(--primary-color);
      border-radius: 50%;
      box-shadow: 0 2px 6px rgba(15, 157, 88, 0.35);
      transform: translate(-50%, -50%);
      pointer-events: none;
      will-change: left;
    }

    .seek-range::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 12px;
      height: 12px;
      background: transparent;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: none;
    }

    .seek-range::-moz-range-thumb {
      width: 12px;
      height: 12px;
      background: transparent;
      border: none;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: none;
    }

    .volume-control {
      display: flex;
      align-items: center;
      gap: 10px;
      flex: 0 0 auto;
    }

    .volume-control .control-btn {
      width: 36px;
      height: 36px;
      font-size: 13px;
      flex-shrink: 0;
    }

    #volumeSlider, #npVolumeSlider {
      width: 100px;
      height: 4px;
      cursor: pointer;
      border-radius: 999px;
      -webkit-appearance: none;
      appearance: none;
      background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) var(--value, 100%), var(--border-color) var(--value, 100%), var(--border-color) 100%);
    }

    #volumeSlider::-webkit-slider-thumb, #npVolumeSlider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 12px;
      height: 12px;
      background: var(--primary-color);
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(15, 157, 88, 0.35);
    }

    #volumeSlider::-moz-range-thumb, #npVolumeSlider::-moz-range-thumb {
      width: 12px;
      height: 12px;
      background: var(--primary-color);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(15, 157, 88, 0.35);
    }

    /* ===== MODAL (PC 기본값: 화면 중앙에 뜨는 일반 팝업) ===== */
    .modal-overlay {
      position: fixed;
      top: 50%;
      left: 50%;
      z-index: 20000;
      display: flex;
      flex-direction: column;
      width: min(560px, 92vw);
      max-height: 85vh;
      background: var(--bg-dark);
      border-radius: 20px;
      box-shadow: 0 0 0 100vmax rgba(10, 10, 15, 0.55), 0 30px 70px rgba(0, 0, 0, 0.3);
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
      transform: translate(-50%, -46%) scale(0.96);
      transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s;
    }

    .modal-overlay.show {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
      transform: translate(-50%, -50%) scale(1);
    }

    .modal-header {
      padding: 26px 24px;
      border-bottom: 1px solid var(--border-color);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      flex-shrink: 0;
    }

    .modal-title {
      font-size: 22px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .modal-title i {
      color: var(--primary-color);
      font-size: 24px;
    }

    .modal-subtitle {
      color: var(--text-secondary);
      font-size: 13px;
      margin-top: 6px;
    }

    .close-btn {
      width: 44px;
      height: 44px;
      border: none;
      border-radius: 50%;
      background: var(--bg-secondary);
      color: var(--text-primary);
      cursor: pointer;
      font-size: 18px;
      transition: all 0.3s ease;
      flex-shrink: 0;
    }

    .close-btn:hover {
      background: var(--bg-tertiary);
      transform: scale(1.1);
      color: var(--primary-color);
    }

    .modal-content {
      flex: 1;
      overflow-y: auto;
      padding: 32px;
    }

    /* ===== CUSTOM DIALOG (alert/confirm/prompt 대체) ===== */
    .custom-dialog-overlay {
      width: min(420px, 92vw);
      z-index: 30000;
    }

    .custom-dialog-overlay .modal-content {
      padding: 24px 28px 28px;
    }

    .custom-dialog-message {
      color: var(--text-primary);
      font-size: 15px;
      line-height: 1.6;
      margin: 0 0 20px;
      white-space: pre-line;
    }

    .custom-dialog-input {
      width: 100%;
      padding: 12px 14px;
      margin-bottom: 20px;
      border-radius: 10px;
      border: 1px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-size: 14px;
      font-family: inherit;
    }

    .custom-dialog-input:focus {
      outline: none;
      border-color: var(--primary-color);
    }

    .custom-dialog-actions {
      display: flex;
      gap: 10px;
    }

    .custom-dialog-actions .control-btn.wide {
      flex: 1;
      width: auto;
    }

    /* ===== TERMS AGREEMENT MODAL (회원가입 약관 동의) ===== */
    /* 실제로 화면 전체 클릭/터치/스크롤을 막는 잠금 배경.
       .modal-overlay의 box-shadow는 시각적 효과일 뿐 실제 클릭을 막지 않으므로 별도로 둔다. */
    .terms-lock-backdrop {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 19999;
      background: transparent;
    }

    .terms-lock-backdrop.show {
      display: block;
    }

    body.terms-locked {
      overflow: hidden;
    }

    .terms-intro {
      color: var(--text-secondary);
      font-size: 14px;
      line-height: 1.6;
      margin-bottom: 20px;
    }

    .terms-check-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 4px;
      cursor: pointer;
    }

    .terms-check-row input[type="checkbox"] {
      width: 20px;
      height: 20px;
      accent-color: var(--primary-color);
      cursor: pointer;
      flex-shrink: 0;
    }

    .terms-check-label {
      flex: 1;
      font-size: 14.5px;
      color: var(--text-primary);
    }

    .terms-check-all .terms-check-label strong {
      font-size: 15.5px;
    }

    .terms-check-divider {
      height: 1px;
      background: var(--border-color);
      margin: 4px 0 6px;
    }

    .terms-required-badge {
      display: inline-block;
      background: rgba(233, 30, 99, 0.15);
      color: var(--primary-color);
      font-size: 11px;
      font-weight: 700;
      padding: 2px 7px;
      border-radius: 6px;
      margin-right: 6px;
      vertical-align: middle;
    }

    .terms-view-btn {
      border: 1px solid var(--border-color);
      background: var(--bg-secondary);
      color: var(--text-secondary);
      font-size: 12.5px;
      padding: 6px 12px;
      border-radius: 8px;
      cursor: pointer;
      flex-shrink: 0;
      transition: all 0.2s ease;
    }

    .terms-view-btn:hover {
      background: var(--bg-tertiary);
      color: var(--text-primary);
    }

    .terms-agree-msg {
      min-height: 18px;
      font-size: 12.5px;
      color: var(--primary-color);
      margin-top: 6px;
    }

    .terms-agree-actions {
      display: flex;
      gap: 10px;
      margin-top: 20px;
    }

    .terms-agree-actions .control-btn.wide {
      flex: 1;
      width: auto;
    }

    #termsAgreeBtn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      filter: grayscale(0.3);
    }

    /* ===== TOS MODAL ===== */
    .tos-content {
      line-height: 1.8;
      color: var(--text-secondary);
    }

    .tos-content strong {
      color: var(--text-primary);
      display: block;
      margin-top: 20px;
      margin-bottom: 10px;
      font-size: 15px;
    }

    .tos-content p {
      margin-bottom: 12px;
    }

    /* ===== YOUTUBE PLAYER ===== */
    /* 표시/숨김은 .yt-player-hidden 클래스 + transition으로 처리한다.
       z-index를 하단 플레이어 바(.player, 999)보다 낮게 잡아서,
       숨겨진 상태일 때는 플레이어 바 뒤에 가려져 있다가
       그 뒤에서 위로 올라오며 나타나는 것처럼 보이게 함.

       ⚠️ 등장(재생 시작)과 퇴장(일시정지)의 트랜지션 시간을 다르게 둔 이유:
       재생이 시작되면 오디오는 즉시 나오는데 영상 박스가 늦게 올라오면
       "영상은 안 보이는데 소리만 나는" 짧은 구간이 생길 수 있어
       (유튜브 iframe API 이용약관상 플레이어를 가리는 사용을 금지) 등장은 빠르게,
       반대로 일시정지 시점엔 오디오도 함께 멈춰 있으니 퇴장은 천천히 슬라이드해도 무방함 */
    #youtubePlayer {
      position: fixed;
      right: 20px;
      bottom: 130px;
      width: 240px;
      height: 200px;
      border-radius: 12px;
      overflow: hidden;
      z-index: 900;
      pointer-events: auto;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      transform: translateY(0);
      opacity: 1;
      /* 등장(재생 시작): 거의 즉시 보이도록 아주 짧게 */
      transition: transform 0.12s ease-out,
                  opacity 0.12s ease-out,
                  visibility 0.12s;
    }

    /* 곡을 처음 재생하기 전 기본 상태 + 일시정지됐을 때:
       하단 플레이어 바 높이만큼 내려가 그 뒤에 숨겨짐.
       퇴장(일시정지)은 이 시점에만 적용되는 느린 트랜지션으로 여유 있게 슬라이드 다운 */
    #youtubePlayer.yt-player-hidden {
      transform: translateY(190px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
                  opacity 0.35s ease,
                  visibility 0.45s;
    }

    #youtubePlayer iframe {
      width: 100%;
      height: 100%;
    }

    /* ===== FOOTER INFO ===== */
    .footer-info {
      position: fixed;
      right: 24px;
      bottom: 20px;
      z-index: 10000;
      font-size: 11px;
      color: var(--text-tertiary);
      display: flex;
      gap: 8px;
      align-items: center;
      transition: bottom 0.2s ease;
    }

    body.player-active .footer-info {
      bottom: 80px;
    }

    .tos-link {
      color: var(--text-secondary);
      text-decoration: none;
      cursor: pointer;
      background: none;
      border: none;
      font-size: 11px;
      transition: all 0.3s ease;
    }

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

    /* ===== RESPONSIVE ===== */
    @media (max-width: 1024px) {
      .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      }

      header {
        padding: 12px 16px;
        gap: 12px;
      }

      .search-container {
        max-width: none;
      }

      .logo img {
        height: 26px;
      }
    }

    @media (max-width: 768px) {
      header {
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        gap: 8px;
      }

      .header-left {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex: 1;
        min-width: 0;
      }

      .logo img {
        height: 22px;
      }

      .search-container {
        max-width: none;
        flex: 1;
        min-width: 0;
      }

      .search-container input {
        padding: 9px 14px;
        font-size: 13px;
      }

      /* 즐겨찾기/최근/약관/로그인 버튼은 하단 내비게이션으로 이동 */
      .header-right {
        display: none;
      }

      /* 상단 탭(모든 곡 / TOP CHART)도 하단 내비게이션(홈/차트)으로 대체 */
      .tabs {
        display: none;
      }

      .mobile-bottom-nav {
        display: flex;
      }

      .music-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
      }

      main {
        padding: 16px;
        padding-bottom: 190px;
      }

      /* 하단 미니 플레이어: 한 줄로 압축 (Spotify 모바일 스타일) */
      .player {
        flex-direction: row;
        align-items: center;
        padding: 8px 12px;
        gap: 12px;
        bottom: 58px;
      }

      .mini-progress-line {
        display: block;
      }

      .player-cover {
        width: 44px;
        height: 44px;
        border-radius: 8px;
      }

      .player-tap-area {
        flex: 1;
        min-width: 0;
      }

      .player-info {
        min-width: 0;
        flex: 1;
        text-align: left;
      }

      .controls {
        flex: 0 0 auto;
        gap: 0;
        margin-left: auto;
      }

      .progress-wrapper {
        display: none;
      }

      #shuffleBtn, #repeatBtn, .volume-control {
        display: none;
      }

      .buttons {
        gap: 6px;
      }

      .control-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
      }

      .expand-player-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
      }

      #youtubePlayer {
        width: 200px;
        height: 200px;
        bottom: 160px;
        right: 8px;
      }

      .footer-info {
        display: none;
      }

      /* 모바일: 화면 아래에서 위로 올라오는 팝업(바텀시트) */
      .modal-overlay {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 0 0 100vmax rgba(10, 10, 15, 0.55);
        transform: translateY(100%);
      }

      .modal-overlay.show {
        transform: translateY(0);
      }

      .modal-content {
        padding: 20px;
      }
    }

    @media (max-width: 480px) {
      .section-title {
        font-size: 22px;
      }

      .music-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
      }

      .player-cover {
        width: 40px;
        height: 40px;
      }

      .player-title {
        font-size: 13px;
      }

      .player-artist {
        font-size: 11px;
      }

      .bn-item span {
        font-size: 9px;
      }

      .bn-item i {
        font-size: 16px;
      }

      .modal-header {
        padding: 20px 16px;
      }

      .modal-title {
        font-size: 22px;
      }

      .modal-content {
        padding: 16px;
      }
    }

    /* ===== SCROLLBAR ===== */
    ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border-color);
      border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--primary-color);
    }
  
