/* COZONE Web — Music Page (Edition R1: Minimal Dark Gray / Apple TV & Infuse) */

.mz-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  color: var(--text, #F4F4F6);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 18px;
}

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

.mz-page button,
.mz-page input {
  font-family: inherit;
}

/* =========================================================
   Sub-Tab Bar (quiet horizontal text tabs, zero pills)
   ========================================================= */
.mz-subtabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border, #242429);
  min-height: 42px;
  max-width: 100%;
  min-width: 0;
}

.mz-subtab-list {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-right: 8px;
}

.mz-subtab-list::-webkit-scrollbar {
  display: none;
}

.mz-subtabs-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
  padding-bottom: 8px;
}

/* Whisper-quiet monochrome gateway health pill (zero neon/glow) */
.mz-health-pill {
  appearance: none;
  height: 26px;
  max-width: 196px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-elevated, #19191D);
  border: 1px solid var(--border, #242429);
  color: var(--text-secondary, #8E8E93);
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.mz-health-pill:hover {
  background: var(--surface, #1E1E22);
  border-color: var(--border-strong, #323238);
  color: var(--text, #F4F4F6);
}

.mz-health-pill:focus-visible {
  outline: 1.5px solid var(--border-strong, #323238);
  outline-offset: 2px;
}

.mz-health-pill:disabled {
  cursor: progress;
  opacity: 0.78;
}

.mz-health-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--health-idle, #636366);
  transition: background-color 0.18s ease, opacity 0.18s ease;
}

.mz-health-pill[data-state="healthy"] .mz-health-dot {
  background: var(--health-ok, #30D158);
}

.mz-health-pill[data-state="degraded"] .mz-health-dot {
  background: var(--health-warn, #FFD60A);
}

.mz-health-pill[data-state="cooldown"] .mz-health-dot {
  background: var(--health-bad, #FF453A);
}

.mz-health-pill.is-probing .mz-health-dot {
  animation: mz-pulse 1.1s ease-in-out infinite;
}

.mz-health-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.mz-health-ms {
  font-family: var(--font-mono, "SF Mono", "Cascadia Mono", "Consolas", monospace);
  font-size: 11px;
  color: var(--text-muted, #636368);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.mz-health-pill:hover .mz-health-ms {
  color: var(--text-secondary, #8E8E93);
}

.mz-health-ms[hidden] {
  display: none;
}

.mz-subtab {
  position: relative;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0 0 11px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--text-secondary, #8E8E93);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: color 0.16s ease;
}

.mz-subtab:hover {
  color: var(--text, #F4F4F6);
}

.mz-subtab:focus-visible {
  outline: 1px solid var(--border-strong, #323238);
  outline-offset: 2px;
  border-radius: 3px;
}

.mz-subtab.is-active {
  color: var(--text, #F4F4F6);
  font-weight: 600;
}

.mz-subtab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: var(--text, #F4F4F6);
  border-radius: 1px;
}

.mz-subtab-count {
  margin-left: 5px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted, #636368);
  font-variant-numeric: tabular-nums;
}

.mz-subtab-now {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 240px;
  min-width: 0;
  color: var(--text-secondary, #8E8E93);
  font-size: 12px;
  line-height: 18px;
  cursor: pointer;
  transition: color 0.16s ease;
}

.mz-subtab-now:hover {
  color: var(--text, #F4F4F6);
}

.mz-subtab-now-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted, #636368);
  flex-shrink: 0;
}

.mz-subtab-now.is-playing .mz-subtab-now-dot {
  background: var(--text, #F4F4F6);
}

.mz-subtab-now-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-subtab-now[hidden] {
  display: none;
}

/* =========================================================
   Buttons (R1 quiet monochrome hierarchy)
   ========================================================= */
.mz-btn-primary {
  appearance: none;
  border: 0;
  height: 36px;
  padding: 0 20px;
  border-radius: var(--radius-md, 8px);
  background: var(--cta-bg, #FFFFFF);
  color: var(--cta-fg, #141416);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.mz-btn-primary:hover {
  opacity: 0.9;
}

.mz-btn-primary:active {
  transform: scale(0.985);
}

.mz-btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.mz-btn-secondary {
  appearance: none;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #1E1E22);
  border: 1px solid var(--border, #242429);
  color: var(--text, #F4F4F6);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mz-btn-secondary:hover {
  background: var(--surface-hover, #26262B);
  border-color: var(--border-strong, #323238);
}

.mz-btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mz-btn-ghost {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px 2px;
  color: var(--text-secondary, #8E8E93);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.mz-btn-ghost:hover {
  color: var(--text, #F4F4F6);
}

.mz-icon-btn {
  appearance: none;
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm, 6px);
  color: var(--text-secondary, #8E8E93);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.mz-icon-btn:hover {
  color: var(--text, #F4F4F6);
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .mz-icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mz-icon-btn.is-fav {
  color: var(--text, #F4F4F6);
}

/* =========================================================
   Search Toolbar (Compact flat input + quiet source tabs)
   ========================================================= */
.mz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}

.mz-search-form {
  flex: 1 1 360px;
  max-width: 620px;
  min-width: 0;
  height: 38px;
  border-radius: var(--radius-md, 8px);
  background: var(--surface, #1E1E22);
  border: 1px solid var(--border, #242429);
  padding: 0 6px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.mz-search-form:focus-within {
  border-color: var(--border-strong, #323238);
}

.mz-search-icon {
  color: var(--text-muted, #636368);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.mz-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text, #F4F4F6);
  font-size: 13px;
  line-height: 20px;
}

.mz-search-input::placeholder {
  color: var(--text-muted, #636368);
}

.mz-search-clear {
  appearance: none;
  background: transparent;
  border: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--text-muted, #636368);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.mz-search-clear:hover {
  color: var(--text, #F4F4F6);
}

.mz-search-clear[hidden] {
  display: none;
}

.mz-search-submit {
  appearance: none;
  border: 0;
  height: 26px;
  padding: 0 11px;
  border-radius: var(--radius-sm, 6px);
  background: var(--surface-hover, #26262B);
  color: var(--text, #F4F4F6);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.mz-search-submit:hover {
  background: var(--border-strong, #323238);
}

.mz-source-bar {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 3px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-elevated, #19191D);
  border: 1px solid var(--border, #242429);
  flex-shrink: 0;
}

.mz-source-btn {
  appearance: none;
  border: 0;
  background: transparent;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-sm, 6px);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary, #8E8E93);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.mz-source-btn:hover {
  color: var(--text, #F4F4F6);
}

.mz-source-btn.is-active {
  background: var(--surface-hover, #26262B);
  color: var(--text, #F4F4F6);
  font-weight: 500;
}

/* =========================================================
   Sections & Responsive Square Card Grid (6 desktop / 2 mobile)
   ========================================================= */
.mz-view {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
  max-width: 100%;
}

.mz-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.mz-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

.mz-section-title-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.mz-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--text, #F4F4F6);
  letter-spacing: -0.008em;
}

.mz-section-meta {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted, #636368);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mz-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 24px;
  width: 100%;
  max-width: 100%;
}

.mz-card {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-width: 0;
  cursor: pointer;
  color: inherit;
  border-radius: var(--radius-lg, 10px);
}

.mz-card:focus-visible {
  outline: none;
}

.mz-card:focus-visible .mz-cover {
  outline: 1.5px solid var(--text, #F4F4F6);
  outline-offset: 2px;
}

.mz-card-meta {
  margin-top: 9px;
  padding: 0 1px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mz-card-title {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 19px;
  letter-spacing: -0.004em;
  color: var(--text, #F4F4F6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.16s ease;
}

.mz-card:hover .mz-card-title {
  color: #FFFFFF;
}

[data-theme="light"] .mz-card:hover .mz-card-title {
  color: var(--text, #141416);
}

.mz-card-sub {
  font-size: 11.5px;
  font-weight: 400;
  line-height: 16px;
  color: var(--text-secondary, #8E8E93);
  opacity: 0.88;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.16s ease;
}

.mz-card:hover .mz-card-sub {
  opacity: 1;
}

/* =========================================================
   Muted Understated Square Album Covers & Fallbacks
   ========================================================= */
.mz-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg, 10px);
  overflow: hidden;
  background: var(--surface, #1E1E22);
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.22s ease,
              background-color 0.2s ease;
}

.mz-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.075);
  transition: box-shadow 0.2s ease;
  pointer-events: none;
  z-index: 3;
}

.mz-card:hover .mz-cover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

.mz-card:hover .mz-cover::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.mz-card:active .mz-cover {
  transform: translateY(0);
}

[data-theme="light"] .mz-cover::after {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mz-card:hover .mz-cover {
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .mz-card:hover .mz-cover::after {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.mz-cover-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--mz-tone-a, #25262B) 0%, var(--mz-tone-b, #17181C) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 15px;
  color: #EAEAEF;
  user-select: none;
  transition: filter 0.22s ease;
}

.mz-card:hover .mz-cover-fallback {
  filter: brightness(1.07);
}

.mz-cover-motif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mz-cover-kicker {
  position: relative;
  z-index: 1;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 13px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(244, 244, 246, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-cover-label {
  position: relative;
  z-index: 1;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.005em;
  color: rgba(244, 244, 246, 0.9);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.mz-cover-sublabel {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  font-size: 11px;
  line-height: 14px;
  color: rgba(244, 244, 246, 0.48);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.018);
  z-index: 2;
  transition: opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.mz-cover-img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.mz-card:hover .mz-cover-img.is-loaded {
  transform: scale(1.03);
}

.mz-card-hover-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(20, 20, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 4;
  pointer-events: none;
}

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

.mz-cover--sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
}

.mz-cover--sm .mz-cover-fallback {
  padding: 0;
  align-items: center;
  justify-content: center;
}

.mz-cover--sm .mz-cover-kicker,
.mz-cover--sm .mz-cover-sublabel {
  display: none;
}

.mz-cover--sm .mz-cover-label {
  font-size: 12px;
  -webkit-line-clamp: 1;
  color: rgba(244, 244, 246, 0.65);
}

.mz-cover--header {
  width: 132px;
  height: 132px;
  border-radius: var(--radius-lg, 10px);
}

.mz-cover--header .mz-cover-fallback {
  padding: 14px 15px;
}

.mz-cover--header .mz-cover-label {
  font-size: 15px;
}

.mz-cover--stage {
  width: 100%;
  max-width: 348px;
  border-radius: var(--radius-xl, 12px);
}

.mz-cover--stage .mz-cover-fallback {
  padding: 24px 26px;
}

.mz-cover--stage .mz-cover-kicker {
  font-size: 11px;
}

.mz-cover--stage .mz-cover-label {
  font-size: 22px;
  line-height: 1.28;
  -webkit-line-clamp: 3;
}

.mz-cover--stage .mz-cover-sublabel {
  margin-top: 6px;
  font-size: 13px;
  line-height: 18px;
}

/* =========================================================
   Clean Airy Tracklist View
   ========================================================= */
.mz-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mz-back-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 4px 0;
  color: var(--text-secondary, #8E8E93);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.mz-back-btn:hover {
  color: var(--text, #F4F4F6);
}

.mz-detail-header {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border, #242429);
}

.mz-detail-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.mz-detail-kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted, #636368);
  text-transform: uppercase;
}

.mz-detail-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
  color: var(--text, #F4F4F6);
  letter-spacing: 0.01em;
  word-break: break-word;
}

.mz-detail-sub {
  margin: 0;
  font-size: 13px;
  line-height: 19px;
  color: var(--text-secondary, #8E8E93);
  max-width: 680px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mz-detail-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mz-detail-count {
  font-size: 12px;
  color: var(--text-muted, #636368);
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

/* Minimalist Table: # | 标题 | 歌手 | 专辑 | 格式 | 时长 | ♥ */
.mz-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.mz-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mz-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.04em;
  color: var(--text-muted, #636368);
  padding: 0 10px 10px;
  border-bottom: 1px solid var(--border, #242429);
  white-space: nowrap;
  user-select: none;
}

.mz-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  font-size: 13px;
  line-height: 18px;
  color: var(--text-secondary, #8E8E93);
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .mz-table td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.mz-table tbody tr.mz-track-row {
  cursor: pointer;
  transition: background 0.12s ease;
}

.mz-table tbody tr.mz-track-row:hover {
  background: var(--surface, #1E1E22);
}

.mz-table tbody tr.mz-track-row.is-current {
  background: var(--bg-elevated, #19191D);
}

.mz-table tbody tr.mz-track-row.is-current:hover {
  background: var(--surface, #1E1E22);
}

.mz-col-idx {
  width: 46px;
  text-align: center !important;
  font-variant-numeric: tabular-nums;
  font-size: 12px !important;
  color: var(--text-muted, #636368) !important;
}

.mz-col-title {
  width: 38%;
}

.mz-col-artist {
  width: 20%;
}

.mz-col-album {
  width: 20%;
}

.mz-col-format {
  width: 78px;
  text-align: right !important;
}

.mz-col-dur {
  width: 66px;
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  font-size: 12px !important;
  color: var(--text-muted, #636368) !important;
}

.mz-col-fav {
  width: 44px;
  text-align: center !important;
  padding-left: 2px !important;
  padding-right: 4px !important;
}

.mz-idx-num {
  display: inline-block;
}

.mz-idx-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #F4F4F6);
}

.mz-idx-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text, #F4F4F6);
  display: inline-block;
}

.mz-title-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mz-track-name {
  color: var(--text, #F4F4F6);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-track-row.is-current .mz-track-name {
  font-weight: 600;
  color: var(--text, #F4F4F6);
}

.mz-track-mobile-sub {
  display: none;
  font-size: 11px;
  line-height: 15px;
  color: var(--text-secondary, #8E8E93);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-format-text {
  font-family: var(--font-mono, "SF Mono", "Cascadia Mono", "Consolas", monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted, #636368);
}

.mz-format-text.is-lossless {
  color: var(--text-secondary, #8E8E93);
}

.mz-fav-btn {
  width: 28px;
  height: 28px;
}

/* =========================================================
   Sub-Tab 2: Now Playing (Calm 2-column split)
   ========================================================= */
.mz-playing-split {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-top: 8px;
  min-height: 500px;
}

.mz-stage-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
  justify-self: center;
  gap: 18px;
}

.mz-stage-meta {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.mz-stage-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mz-stage-title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 25px;
  color: var(--text, #F4F4F6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-stage-artist {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--text-secondary, #8E8E93);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress scrubber */
.mz-progress-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mz-progress-hit {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.mz-progress-hit:focus-visible {
  outline: 1px solid var(--border-strong, #323238);
  border-radius: 4px;
}

.mz-progress-rail {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  transition: height 0.12s ease;
}

[data-theme="light"] .mz-progress-rail {
  background: rgba(0, 0, 0, 0.14);
}

.mz-progress-hit:hover .mz-progress-rail,
.mz-progress-hit.is-dragging .mz-progress-rail {
  height: 4px;
}

.mz-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--text, #F4F4F6);
  border-radius: 2px;
}

.mz-progress-times {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  line-height: 14px;
  color: var(--text-muted, #636368);
  font-variant-numeric: tabular-nums;
}

/* Simple monochrome transport controls */
.mz-transport {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.mz-transport-side-l {
  justify-self: start;
}

.mz-transport-side-r {
  justify-self: end;
  font-size: 11px;
  color: var(--text-muted, #636368);
  font-family: var(--font-mono, "SF Mono", "Cascadia Mono", "Consolas", monospace);
  letter-spacing: 0.04em;
}

.mz-transport-main {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.mz-ctrl-btn {
  appearance: none;
  background: transparent;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text, #F4F4F6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.mz-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .mz-ctrl-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.mz-ctrl-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.mz-ctrl-play {
  appearance: none;
  border: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cta-bg, #FFFFFF);
  color: var(--cta-fg, #141416);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.mz-ctrl-play:hover {
  opacity: 0.9;
}

.mz-ctrl-play:active {
  transform: scale(0.96);
}

.mz-ctrl-play:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

/* Quality selector */
.mz-quality-bar {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-elevated, #19191D);
  border: 1px solid var(--border, #242429);
}

.mz-quality-btn {
  appearance: none;
  border: 0;
  background: transparent;
  height: 30px;
  min-width: 0;
  padding: 0 6px;
  border-radius: var(--radius-sm, 6px);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary, #8E8E93);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease, background 0.15s ease;
}

.mz-quality-btn:hover {
  color: var(--text, #F4F4F6);
}

.mz-quality-btn.is-active {
  background: var(--surface-hover, #26262B);
  color: var(--text, #F4F4F6);
  font-weight: 500;
}

.mz-quality-note {
  width: 100%;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-muted, #636368);
  padding: 7px 12px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-elevated, #19191D);
  border: 1px solid var(--border, #242429);
}

.mz-stage-status {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md, 8px);
  background: var(--bg-elevated, #19191D);
  border: 1px solid var(--border, #242429);
  font-size: 12px;
  line-height: 17px;
  color: var(--text-secondary, #8E8E93);
}

.mz-stage-status[hidden] {
  display: none;
}

.mz-stage-status-msg {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mz-stage-retry {
  appearance: none;
  border: 1px solid var(--border-strong, #323238);
  background: var(--surface, #1E1E22);
  color: var(--text, #F4F4F6);
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-sm, 6px);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.mz-stage-retry:hover {
  background: var(--surface-hover, #26262B);
}

.mz-stage-retry:disabled {
  opacity: 0.45;
  cursor: progress;
}

/* Right pane: Lyrics & Queue */
.mz-stage-right {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: min(560px, calc(100vh - 210px));
  min-height: 380px;
}

.mz-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #242429);
  flex-shrink: 0;
}

.mz-pane-tabs {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}

.mz-pane-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  color: var(--text-secondary, #8E8E93);
  cursor: pointer;
  transition: color 0.15s ease;
}

.mz-pane-tab:hover {
  color: var(--text, #F4F4F6);
}

.mz-pane-tab.is-active {
  color: var(--text, #F4F4F6);
  font-weight: 600;
}

.mz-pane-clear {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 2px 4px;
  font-size: 12px;
  color: var(--text-secondary, #8E8E93);
  cursor: pointer;
  transition: color 0.15s ease;
}

.mz-pane-clear:hover {
  color: var(--text, #F4F4F6);
}

.mz-pane-clear[hidden] {
  display: none;
}

/* Synced bilingual lyrics (crisp active contrast, soft inactive depth) */
.mz-lyrics-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 132px 16px 164px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong, #323238) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 84%, transparent 100%);
}

.mz-lyrics-scroll.is-empty {
  justify-content: center;
  padding: 36px 16px;
  -webkit-mask-image: none;
  mask-image: none;
}

.mz-lyric-line {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 16px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-md, 8px);
  opacity: 0.46;
  transition: opacity 0.24s ease, background-color 0.16s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.mz-lyric-line.is-near {
  opacity: 0.68;
}

.mz-lyric-line.is-active {
  opacity: 1;
}

.mz-lyric-main {
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.56;
  color: #8E8E96;
  letter-spacing: 0.005em;
  word-break: break-word;
  transition: color 0.22s ease, font-size 0.22s ease;
}

.mz-lyric-trans {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.48;
  color: #6B6B73;
  word-break: break-word;
  transition: color 0.22s ease, font-size 0.22s ease;
}

.mz-lyric-line:not(.is-static):hover {
  opacity: 0.92;
  background: rgba(255, 255, 255, 0.035);
}

.mz-lyric-line:not(.is-static):hover .mz-lyric-main {
  color: #E2E2E8;
}

[data-theme="light"] .mz-lyric-line:not(.is-static):hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .mz-lyric-line:not(.is-static):hover .mz-lyric-main {
  color: var(--text, #141416);
}

.mz-lyric-line.is-active .mz-lyric-main {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.48;
  color: #FFFFFF;
}

[data-theme="light"] .mz-lyric-main {
  color: #5C5C64;
}

[data-theme="light"] .mz-lyric-trans {
  color: #787880;
}

[data-theme="light"] .mz-lyric-line.is-active .mz-lyric-main {
  color: #141416;
}

.mz-lyric-line.is-active .mz-lyric-trans {
  font-size: 13.5px;
  color: rgba(244, 244, 246, 0.78);
}

[data-theme="light"] .mz-lyric-line.is-active .mz-lyric-trans {
  color: rgba(20, 20, 22, 0.68);
}

.mz-lyric-line.is-static {
  cursor: default;
  opacity: 0.72;
}

/* Queue list */
.mz-queue-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 16px;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong, #323238) transparent;
}

.mz-queue-row {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: inherit;
  border-radius: var(--radius-sm, 6px);
  transition: background 0.12s ease;
}

[data-theme="light"] .mz-queue-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.mz-queue-row:hover {
  background: var(--surface, #1E1E22);
}

.mz-queue-row.is-current {
  background: var(--bg-elevated, #19191D);
}

.mz-queue-idx {
  font-size: 11px;
  color: var(--text-muted, #636368);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.mz-queue-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mz-queue-title {
  font-size: 13px;
  line-height: 17px;
  color: var(--text, #F4F4F6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-queue-row.is-current .mz-queue-title {
  font-weight: 600;
}

.mz-queue-artist {
  font-size: 11px;
  line-height: 15px;
  color: var(--text-secondary, #8E8E93);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mz-queue-dur {
  font-size: 11px;
  color: var(--text-muted, #636368);
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Sub-Tab 3: Favorites & Local Lossless Folder
   ========================================================= */
.mz-local-card {
  background: var(--bg-elevated, #19191D);
  border: 1px solid var(--border, #242429);
  border-radius: var(--radius-xl, 12px);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.mz-local-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  max-width: 620px;
}

.mz-local-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  color: var(--text, #F4F4F6);
}

.mz-local-desc {
  margin: 0;
  font-size: 13px;
  line-height: 19px;
  color: var(--text-secondary, #8E8E93);
}

.mz-local-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
   Empty / Error / Skeleton States (Quiet & Restrained)
   ========================================================= */
.mz-state-box {
  padding: 48px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  color: var(--text-secondary, #8E8E93);
  border: 1px solid var(--border, #242429);
  border-radius: var(--radius-xl, 12px);
  background: var(--bg-elevated, #19191D);
}

.mz-state-box--plain {
  border: 0;
  background: transparent;
  padding: 32px 16px;
}

.mz-state-icon {
  color: var(--text-muted, #636368);
  display: inline-flex;
}

.mz-state-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--text, #F4F4F6);
}

.mz-state-desc {
  margin: 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-secondary, #8E8E93);
  max-width: 380px;
}

.mz-state-actions {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mz-skel {
  background: var(--surface, #1E1E22);
  border-radius: var(--radius-sm, 6px);
  animation: mz-pulse 1.6s ease-in-out infinite;
}

.mz-skel-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mz-skel-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg, 10px);
}

.mz-skel-line {
  height: 12px;
  width: 78%;
}

.mz-skel-line--short {
  height: 11px;
  width: 52%;
}

.mz-skel-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.mz-skel-row {
  height: 36px;
  width: 100%;
  border-radius: var(--radius-sm, 6px);
}

@keyframes mz-pulse {
  0%, 100% { opacity: 0.48; }
  50% { opacity: 0.82; }
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */
@media (max-width: 1180px) {
  .mz-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 20px;
  }

  .mz-playing-split {
    gap: 36px;
  }
}

@media (max-width: 900px) {
  .mz-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mz-playing-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    min-height: 0;
  }

  .mz-stage-left {
    max-width: 340px;
  }

  .mz-stage-right {
    height: 380px;
    min-height: 300px;
  }

  .mz-col-album {
    display: none;
  }

  .mz-col-title {
    width: 48%;
  }

  .mz-col-artist {
    width: 24%;
  }
}

@media (max-width: 767px) {
  .mz-page {
    gap: 16px;
    padding-bottom: 12px;
  }

  .mz-subtabs {
    gap: 8px;
    min-height: 38px;
  }

  .mz-subtab-list {
    gap: 16px;
    padding-right: 12px;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 14px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 14px), transparent 100%);
  }

  .mz-subtab {
    font-size: 13px;
    padding-bottom: 9px;
  }

  .mz-subtabs-right {
    gap: 6px;
    padding-bottom: 6px;
  }

  .mz-health-pill {
    height: 24px;
    max-width: 132px;
    padding: 0 8px;
    font-size: 10.5px;
    gap: 5px;
  }

  .mz-health-ms {
    font-size: 10px;
  }

  .mz-subtab-now {
    display: none;
  }

  .mz-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .mz-search-form {
    flex: none;
    max-width: none;
    width: 100%;
    height: 36px;
  }

  .mz-source-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 34px;
  }

  .mz-source-btn {
    height: 26px;
    padding: 0 6px;
  }

  .mz-view {
    gap: 22px;
  }

  .mz-section-title {
    font-size: 14px;
  }

  .mz-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 16px;
  }

  .mz-cover {
    border-radius: var(--radius-md, 8px);
  }

  .mz-cover-fallback {
    padding: 11px 12px;
  }

  .mz-cover-label {
    font-size: 13px;
  }

  .mz-card-hover-play {
    display: none;
  }

  .mz-card-meta {
    margin-top: 6px;
  }

  .mz-card-title {
    font-size: 12.5px;
    line-height: 17px;
  }

  .mz-card-sub {
    font-size: 11px;
    line-height: 15px;
  }

  .mz-detail-header {
    align-items: center;
    gap: 14px;
    padding-bottom: 16px;
  }

  .mz-cover--header {
    width: 84px;
    height: 84px;
    border-radius: var(--radius-md, 8px);
  }

  .mz-cover--header .mz-cover-fallback {
    padding: 9px 10px;
  }

  .mz-cover--header .mz-cover-label {
    font-size: 12px;
  }

  .mz-detail-title {
    font-size: 18px;
    line-height: 23px;
  }

  .mz-detail-sub {
    font-size: 12px;
    line-height: 16px;
  }

  .mz-table th.mz-col-artist,
  .mz-table td.mz-col-artist,
  .mz-table th.mz-col-album,
  .mz-table td.mz-col-album,
  .mz-table th.mz-col-format,
  .mz-table td.mz-col-format {
    display: none;
  }

  .mz-col-idx {
    width: 34px;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .mz-col-title {
    width: auto;
  }

  .mz-col-dur {
    width: 50px;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .mz-col-fav {
    width: 36px;
  }

  .mz-track-mobile-sub {
    display: block;
  }

  .mz-cover--stage {
    max-width: 268px;
  }

  .mz-stage-title {
    font-size: 17px;
    line-height: 22px;
  }

  .mz-lyrics-scroll {
    padding: 72px 8px 96px;
    gap: 14px;
  }

  .mz-local-card {
    padding: 16px;
    gap: 14px;
  }

  .mz-local-actions {
    width: 100%;
  }

  .mz-local-actions .mz-btn-primary,
  .mz-local-actions .mz-btn-secondary {
    width: 100%;
  }

  .mz-card:hover .mz-cover {
    transform: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mz-cover,
  .mz-cover::after,
  .mz-cover-fallback,
  .mz-cover-img,
  .mz-lyric-line,
  .mz-lyric-main,
  .mz-lyric-trans,
  .mz-health-pill,
  .mz-health-dot,
  .mz-card-hover-play {
    transition: none !important;
    animation: none !important;
  }

  .mz-card:hover .mz-cover,
  .mz-card:hover .mz-cover-img.is-loaded {
    transform: none !important;
  }
}
