/* ================================================================
   TTS Studio — Apple Music-inspired design system
   ================================================================ */

:root {
  --bg: #000000;
  --bg-elevated: #0e0e11;
  --panel: rgba(255, 255, 255, 0.052);
  --panel-2: rgba(255, 255, 255, 0.08);
  --panel-3: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5f7;
  --muted: rgba(235, 235, 245, 0.6);
  --muted-2: rgba(235, 235, 245, 0.35);
  --accent: #fa2d48;
  --accent-2: #ff5c74;
  --accent-grad: linear-gradient(135deg, #fa233b, #fb5c74);
  --danger: #ff453a;
  --ok: #30d158;
  --radius: 18px;
  --radius-sm: 12px;
  --pill: 980px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --blur: saturate(180%) blur(22px);
}

* { box-sizing: border-box; }
::selection { background: rgba(250, 45, 72, 0.35); }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(250, 35, 59, 0.13), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(88, 86, 214, 0.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-2); text-decoration: none; }

h1, h2, h3 { letter-spacing: -0.02em; }

/* ---------------- buttons ---------------- */

button {
  font: inherit;
  font-weight: 590;
  cursor: pointer;
  border: none;
  border-radius: var(--pill);
  padding: 9px 18px;
  background: var(--accent-grad);
  color: #fff;
  transition: transform 0.12s ease, filter 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
button:hover { filter: brightness(1.08); }
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

button.secondary {
  background: var(--panel-2);
  color: var(--text);
}
button.secondary:hover { background: var(--panel-3); filter: none; }

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

button.danger { background: rgba(255, 69, 58, 0.16); color: var(--danger); }
button.danger:hover { background: rgba(255, 69, 58, 0.26); filter: none; }

button.small { padding: 6px 13px; font-size: 13px; }

button.tint { background: rgba(250, 45, 72, 0.14); color: var(--accent-2); }
button.tint:hover { background: rgba(250, 45, 72, 0.22); filter: none; }

button svg { vertical-align: -3px; }

/* icon-only round button */
button.icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--muted);
  border-radius: 50%;
}
button.icon:hover { color: var(--text); background: var(--panel-2); filter: none; }
button.icon.active { color: var(--accent); }
button.icon svg { vertical-align: 0; }

/* ---------------- form controls ---------------- */

input, select, textarea {
  font: inherit;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  border-color: rgba(250, 45, 72, 0.65);
  box-shadow: 0 0 0 3.5px rgba(250, 45, 72, 0.18);
  background: var(--panel-2);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='rgba(235,235,245,.6)'%3E%3Cpath d='M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  cursor: pointer;
}
select option { background: #1c1c1e; color: var(--text); }

label { display: block; font-size: 13px; font-weight: 590; color: var(--muted); margin: 16px 0 7px; }

/* iOS-style switch */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .knob {
  position: absolute;
  inset: 0;
  background: var(--panel-3);
  border-radius: var(--pill);
  transition: background 0.2s ease;
  cursor: pointer;
}
.switch .knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.6, 1);
}
.switch input:checked + .knob { background: var(--ok); }
.switch input:checked + .knob::after { transform: translateX(18px); }

.toggle { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; user-select: none; cursor: pointer; }

/* ---------------- login ---------------- */

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 32px 32px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  text-align: center;
}
.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--accent-grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 24px rgba(250, 35, 59, 0.35);
}
.login-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.login-card p.sub { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.login-card label { text-align: left; }
.login-card button { width: 100%; margin-top: 24px; padding: 12px; font-size: 15px; }

/* ---------------- app shell ---------------- */

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 13, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  position: sticky;
  top: 0;
  z-index: 10;
}
header .brand {
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
header nav { display: flex; gap: 10px; align-items: center; min-width: 0; }

/* segmented control */
.seg {
  display: flex;
  gap: 2px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 3px;
}
.tab {
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  padding: 7px 16px;
  border-radius: var(--pill);
}
.tab:hover { color: var(--text); filter: none; }
.tab.active { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }

.user-chip { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13px; }

main { max-width: 960px; margin: 0 auto; padding: 28px 22px 90px; }
.view { display: none; }
.view.active { display: block; animation: viewIn 0.3s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > .col { flex: 1; min-width: 200px; }

textarea#text { min-height: 170px; resize: vertical; line-height: 1.6; }

.controls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.spacer { flex: 1; }
.charcount { color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; }

.page-title { font-size: 28px; font-weight: 700; margin: 4px 0 18px; letter-spacing: -0.03em; }
.section-title { margin: 0 0 14px; font-size: 17px; font-weight: 700; }
.muted { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted-2); margin-top: 8px; line-height: 1.55; }

.gen-btn { padding: 12px 32px; font-size: 15px; box-shadow: 0 6px 20px rgba(250, 35, 59, 0.3); }

/* ---------------- speed slider ---------------- */

.slider-row { display: flex; align-items: center; gap: 14px; }
.slider-end { color: var(--muted-2); font-size: 12px; white-space: nowrap; }
.slider-val {
  color: var(--text);
  font-size: 13px;
  font-weight: 590;
  font-variant-numeric: tabular-nums;
  min-width: 46px;
  text-align: right;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: auto;
  flex: 1;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: var(--pill);
  background: var(--panel-3);
  background-image: linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  cursor: pointer;
  box-shadow: none;
}
input[type="range"]:focus { box-shadow: none; border: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ---------------- custom player ---------------- */

.player-ui {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}
.player-ui .pp {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.player-ui .pp:hover { transform: scale(1.05); filter: none; }
.player-ui .pp:active { transform: scale(0.96); }
.player-ui.mini .pp { width: 36px; height: 36px; box-shadow: none; }
.player-ui .pp svg { vertical-align: 0; }

.player-track { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-time {
  font-size: 11.5px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 34px;
}
.player-time.right { text-align: right; }

.player-bar {
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.player-bar .rail {
  position: relative;
  width: 100%;
  height: 5px;
  border-radius: var(--pill);
  background: var(--panel-3);
  overflow: visible;
}
.player-bar .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.85);
}
.player-bar .dot {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease;
}
.player-bar:hover .dot, .player-bar.drag .dot { transform: translate(-50%, -50%) scale(1); }

/* transport (album player) */
.transport {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 18px 0;
}
.transport-title {
  text-align: center;
  font-size: 13.5px;
  font-weight: 590;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.transport-sub { text-align: center; font-size: 12px; color: var(--muted-2); }
.transport-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 6px 0 2px;
}
.transport-buttons .pp {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}
.transport-buttons .pp:hover { transform: scale(1.05); filter: none; }
.transport-buttons .skip { width: 44px; height: 44px; color: var(--text); }
.transport-buttons .mode { width: 40px; height: 40px; }

/* ---------------- result & actions ---------------- */

.player-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.voice-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.voice-preview .player-ui { flex: 1; padding: 0; }

.share-box { display: flex; gap: 8px; margin-top: 12px; }
.share-box input { font-size: 13px; }

.hidden { display: none !important; }

/* ---------------- lyrics / subtitles ---------------- */

.subs {
  margin-top: 18px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  max-height: 300px;
  overflow: auto;
  padding: 8px 0;
  scroll-behavior: smooth;
}
.sub-line {
  padding: 10px 18px;
  color: var(--muted-2);
  font-size: 16px;
  font-weight: 590;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  border-radius: 8px;
  line-height: 1.45;
}
.sub-line:hover { color: var(--muted); }
.sub-line .t {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.55;
  margin-right: 12px;
}
.sub-line.active {
  color: var(--text);
  transform: scale(1.012);
  transform-origin: left center;
}

/* ---------------- history ---------------- */

.hist {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: background 0.15s ease;
}
.hist:hover { background: var(--panel-2); }
.hist-text { font-size: 14.5px; line-height: 1.5; }
.hist-meta { font-size: 12px; color: var(--muted-2); margin-top: 5px; }
.hist-audio:not(:empty) { margin: 6px 0 2px; }
.hist-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hist-share { display: flex; gap: 8px; margin-top: 10px; }
.hist-share input { font-size: 12px; }

/* ---------------- albums ---------------- */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 18px;
}
.album-card { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.album-cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.album-card:hover .album-cover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5); }
.album-cover svg { opacity: 0.9; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)); }
.album-cover .cover-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.album-card:hover .cover-play { opacity: 1; transform: none; }
.album-name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 590;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.album-count { font-size: 12.5px; color: var(--muted-2); margin-top: 1px; }

.album-new { display: flex; gap: 10px; align-items: center; }
.album-new input { flex: 1; }

/* album detail hero */
.album-hero {
  display: flex;
  gap: 26px;
  align-items: flex-end;
  margin: 6px 0 22px;
  flex-wrap: wrap;
}
.album-hero .album-cover {
  width: 190px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}
.album-hero-info { flex: 1; min-width: 220px; }
.album-hero-info .kicker {
  font-size: 12px;
  font-weight: 590;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.album-hero-info h2 {
  font-size: 32px;
  font-weight: 800;
  margin: 4px 0 6px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.album-hero-info .desc { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.album-hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* track rows — Apple Music style */
.track {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.13s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.track:hover { background: var(--panel-2); }
.track.playing { background: rgba(250, 45, 72, 0.12); }
.track.playing .track-text { color: var(--accent-2); }
.track-idx {
  width: 26px;
  flex-shrink: 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.track-idx .num { display: block; }
.track-idx .hover-play { display: none; color: var(--text); }
.track:hover .track-idx .num { display: none; }
.track:hover .track-idx .hover-play { display: block; }
.track.playing:hover .track-idx .hover-play { color: var(--accent-2); }

/* animated equalizer bars for the playing track */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; background: var(--accent-2); border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { animation-delay: 0s; }
.eq i:nth-child(2) { animation-delay: 0.25s; }
.eq i:nth-child(3) { animation-delay: 0.5s; }
@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}
.track.playing:hover .eq { display: none; }

.track-main { flex: 1; min-width: 0; }
.track-text {
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-meta { font-size: 12px; color: var(--muted-2); margin-top: 1px; }
.track-dur { font-size: 12.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.track-actions { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s ease; }
.track:hover .track-actions { opacity: 1; }
.track-actions button.icon { width: 32px; height: 32px; }

.track-divider { height: 1px; background: var(--border); margin: 0 14px; }

/* ---------------- providers ---------------- */

.provider {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: var(--panel);
}
.provider .meta { flex: 1; min-width: 0; }
.provider .meta .name { font-weight: 590; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.provider .meta .desc {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.provider-actions { display: flex; gap: 6px; flex-shrink: 0; }

.badge {
  font-size: 11px;
  font-weight: 590;
  padding: 3px 9px;
  border-radius: var(--pill);
  background: rgba(250, 45, 72, 0.16);
  color: var(--accent-2);
}
.badge.type { background: var(--panel-2); color: var(--muted); }

/* ---------------- modal ---------------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow: auto;
  background: rgba(28, 28, 32, 0.92);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  animation: sheetIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes sheetIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.picker-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 500;
  margin-bottom: 2px;
}
.picker-item:hover { background: var(--panel-2); filter: none; }
.picker-item .mini-cover {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.picker-item .sub { font-size: 12px; color: var(--muted-2); font-weight: 400; }

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(40, 40, 46, 0.9);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-strong);
  padding: 11px 22px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 40;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { color: #ff8a80; }
.toast.ok { color: #86efac; }

/* ---------------- empty state ---------------- */

.empty {
  text-align: center;
  color: var(--muted-2);
  font-size: 13.5px;
  padding: 34px 10px;
}
.empty svg { display: block; margin: 0 auto 10px; opacity: 0.4; }

/* ---------------- scrollbars ---------------- */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 5px; border: 2.5px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- responsive ---------------- */

@media (max-width: 640px) {
  header.topbar { padding: 10px 12px; }
  header .brand span.brand-text { display: none; }
  .tab { padding: 7px 11px; font-size: 12.5px; }
  #who { display: none; }
  main { padding: 18px 14px 70px; }
  .card { padding: 18px 16px; }
  .row { gap: 10px; }
  .page-title { font-size: 23px; }
  .album-hero { gap: 18px; }
  .album-hero .album-cover { width: 128px; }
  .album-hero-info h2 { font-size: 24px; }
  .album-grid { grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 14px; }
  .transport-buttons { gap: 10px; }
  .track-actions { opacity: 1; }
  .track:hover .track-idx .num { display: block; }
  .track:hover .track-idx .hover-play { display: none; }
}
