/* ===== Cadence — dark warm, studio at night ===== */

:root {
  --bg: #1a1410;
  --bg-2: #15100c;
  --surface: #25201b;
  --surface-2: #2d2722;
  --surface-3: #38302a;
  --ink: #f0e5d4;
  --ink-soft: #b8a98e;
  --ink-mute: #7d6f5a;
  --amber: #d6a35a;
  --amber-dark: #a47e3e;
  --amber-soft: rgba(214, 163, 90, 0.14);
  --amber-line: rgba(214, 163, 90, 0.28);
  --warm-red: #c5634d;
  --green: #7ba066;
  --border: rgba(214, 163, 90, 0.14);
  --border-strong: rgba(214, 163, 90, 0.28);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, 0.55);
  --display: 'Fraunces', 'Georgia', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --radius: 6px;
}

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

html, body { min-height: 100vh; }

body {
  font-family: var(--body);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 15%, rgba(214, 163, 90, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 85%, rgba(197, 99, 77, 0.04) 0%, transparent 50%);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15.5px;
  min-height: 100vh;
  padding: 36px 24px 60px;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

a { color: var(--amber); text-decoration: none; }
a:hover { color: var(--ink); }

/* ===== Login ===== */
.login-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 60px 50px 50px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-modal);
}

.ornament {
  font-family: var(--display);
  font-size: 38px;
  color: var(--amber);
  margin-bottom: 12px;
  line-height: 1;
}

.ornament-line {
  height: 1px;
  width: 80px;
  margin: 22px auto;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}

.ornament-line-soft {
  height: 1px;
  width: 60%;
  margin: 22px 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.brand-title {
  font-family: var(--display);
  font-size: 56px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  line-height: 1;
}

.brand-subtitle {
  font-family: var(--display);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.btn-google {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 24px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.btn-google:hover {
  background: var(--amber-soft);
  border-color: var(--amber);
  transform: translateY(-1px);
}

.login-error {
  color: var(--warm-red);
  margin-top: 16px;
  font-size: 13px;
  font-style: italic;
  min-height: 1.2em;
}

.login-or {
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-mute);
  font-size: 13px;
  margin: 18px 0 12px;
  letter-spacing: 0.08em;
  position: relative;
}
.login-or::before,
.login-or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 28%;
  height: 1px;
  background: var(--border);
}
.login-or::before { left: 12%; }
.login-or::after { right: 12%; }

.btn-readonly {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink-soft);
  padding: 10px 22px;
  font-family: var(--body);
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-readonly:hover {
  border-color: var(--amber);
  color: var(--ink);
  background: var(--amber-soft);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover {
  border-color: var(--warm-red);
  color: var(--warm-red);
  background: rgba(197, 99, 77, 0.08);
}

.readonly-banner {
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  color: var(--ink);
  text-align: center;
  font-family: var(--body);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.readonly-banner.hidden { display: none; }
.readonly-banner a {
  color: var(--amber);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}
.readonly-banner a:hover { color: var(--ink); }

/* Read-only hides every edit affordance */
body.read-only .edit-only { display: none !important; }

/* ===== App ===== */
.app {
  max-width: 1100px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.header-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  line-height: 1;
}

.header-subtitle {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sync-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-mute);
  transition: background 0.3s;
}
.sync-status.synced { background: var(--green); }
.sync-status.syncing { background: var(--amber); }
.sync-status.error { background: var(--warm-red); }

/* ===== Controls ===== */
.controls {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

#search {
  flex: 1;
  min-width: 220px;
  font-family: var(--body);
  font-size: 14px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s;
}
#search:focus { border-color: var(--amber); }
#search::placeholder { color: var(--ink-mute); }

.group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}
.group-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  padding: 0 8px 0 6px;
}
.group-toggle button {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.group-toggle button:hover { color: var(--ink); }
.group-toggle button.active {
  background: var(--amber-soft);
  color: var(--amber);
}

/* ===== Songs list ===== */
.songs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.song-group {
  margin-bottom: 18px;
}
.song-group-header {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.song-group-count {
  color: var(--ink-mute);
  font-weight: 400;
  letter-spacing: 0.1em;
}
.song-group-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.song-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-soft);
}
.song-card:hover {
  background: var(--surface-2);
  border-color: var(--amber-line);
  transform: translateX(2px);
  box-shadow: var(--shadow-card);
}

.song-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.song-card-title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}
.song-card-play {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--amber-line);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding-left: 2px;
}
.song-card-play:hover { background: var(--amber); color: var(--bg); }
.song-card-play.playing {
  background: var(--amber);
  color: var(--bg);
  padding-left: 0;
}
.song-card-audio-mark {
  color: var(--amber);
  font-size: 16px;
  flex-shrink: 0;
}

.song-card-snippet {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 10px;
  font-family: var(--display);
  font-style: italic;
}

.song-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
  color: var(--ink-mute);
}

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pill.genre  { background: rgba(214, 163, 90, 0.16); color: #e7c280; }
.pill.album  { background: rgba(123, 160, 102, 0.18); color: #a8c592; }
.pill.mood   { background: rgba(197, 99, 77, 0.20);   color: #e2937c; }
.pill:empty { display: none; }

.song-card-date { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; }
.song-card-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
}
.song-card-tag::before { content: '#'; }

/* ===== Empty ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-mute);
  font-style: italic;
  font-family: var(--display);
  font-size: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ===== Modals ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeIn 0.2s ease;
}
.modal.open { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 30px 34px;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  position: relative;
  animation: slideUp 0.25s ease;
}
.modal-content.modal-large { max-width: 720px; }

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

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 26px;
  color: var(--ink-mute);
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 4px;
  transition: all 0.2s;
  font-family: var(--display);
}
.modal-close:hover { color: var(--ink); background: var(--amber-soft); }

.modal-content h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}

/* ===== Form ===== */
.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}

.form .hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-mute);
  font-size: 12px;
}

.form input[type="text"],
.form input[type="date"],
.form input[type="number"] {
  font-family: var(--body);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 14px;
  outline: none;
  transition: border-color 0.2s;
  font-weight: 400;
}
.form input:focus { border-color: var(--amber); }
.form input::placeholder { color: var(--ink-mute); }
.form input[type="date"] { color-scheme: dark; }

.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 140px; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}
.form-actions .btn-danger { margin-right: auto; }

/* Rich editor */
.rich-toolbar {
  display: flex;
  gap: 2px;
  padding: 5px 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
}
.rich-toolbar button {
  background: transparent;
  border: 1px solid transparent;
  padding: 3px 10px;
  cursor: pointer;
  font-family: var(--body);
  font-size: 13px;
  color: var(--ink-soft);
  border-radius: 3px;
  min-width: 28px;
  transition: all 0.15s;
}
.rich-toolbar button:hover { background: var(--amber-soft); color: var(--ink); }
.rich-toolbar button.active { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }

.rich-editor {
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 14px 16px;
  min-height: 200px;
  outline: none;
  transition: border-color 0.2s;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.rich-editor:focus { border-color: var(--amber); }
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-mute);
  font-style: italic;
  pointer-events: none;
}
.rich-editor strong, .rich-editor b { font-weight: 700; color: var(--ink); }
.rich-editor em, .rich-editor i { font-style: italic; }

/* ===== Buttons ===== */
.btn-primary, .btn-secondary, .btn-danger {
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 9px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}
.btn-secondary:hover {
  background: var(--amber-soft);
  border-color: var(--amber);
}
.btn-danger {
  background: transparent;
  border-color: var(--warm-red);
  color: var(--warm-red);
}
.btn-danger:hover { background: rgba(197, 99, 77, 0.12); }
.btn-sm { font-size: 12px; padding: 6px 12px; }

/* ===== Audio URL + repo browse ===== */
.audio-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.audio-input-row input { flex: 1; }
.audio-input-row .btn-secondary { white-space: nowrap; }

.audio-browse-list {
  margin-top: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 240px;
  overflow-y: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.browse-loading,
.browse-empty {
  padding: 14px 16px;
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 14px;
}
.browse-empty.error { color: var(--warm-red); }
.browse-empty button { margin-top: 8px; }
.browse-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.browse-link {
  background: transparent;
  border: none;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 6px;
}
.browse-link:hover { color: var(--ink); }
.browse-items {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.browse-items li {
  padding: 8px 14px;
  font-family: var(--body);
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.12s;
}
.browse-items li:hover { background: var(--amber-soft); color: var(--amber); }

/* (Legacy upload-area styles — kept harmless in case stale HTML lingers) */
.upload-area {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--amber);
  background: var(--amber-soft);
}
.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-family: var(--body);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.upload-icon {
  font-family: var(--display);
  font-size: 32px;
  color: var(--amber);
  line-height: 1;
}
.upload-prompt strong { color: var(--amber); font-weight: 500; }
.upload-hint {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.audio-preview {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.audio-preview audio { width: 100%; }
.audio-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.audio-progress {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.audio-progress-bar {
  height: 100%;
  background: var(--amber);
  width: 0%;
  transition: width 0.2s;
}
#audio-progress-pct {
  position: absolute;
  right: 4px;
  top: -16px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-mute);
}

/* ===== Song view ===== */
.song-view-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.song-view h2, #v-title {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}

.song-view-audio { margin-bottom: 14px; }
.song-view-audio audio { width: 100%; }

.song-view-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.song-view-tags span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}
.song-view-tags span::before { content: '#'; }

.song-view-text {
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.8;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.song-view-text strong { font-weight: 700; }
.song-view-text em { font-style: italic; }

/* ===== Mini player ===== */
.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--amber-line);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  padding: 12px 18px;
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) 2fr auto;
  align-items: center;
  gap: 18px;
  z-index: 90;
  animation: slideFromBottom 0.25s ease;
}
@keyframes slideFromBottom {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
body.player-open { padding-bottom: 130px; }

.mp-info { min-width: 0; }
.mp-title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mp-context {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-top: 2px;
}

.mp-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mp-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  min-width: 36px;
  text-align: center;
}
.mp-seek {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.mp-seek::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(to right, var(--amber) 0%, var(--amber) var(--pct, 0%), var(--surface-3) var(--pct, 0%));
  border-radius: 2px;
}
.mp-seek::-moz-range-track {
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
}
.mp-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: var(--amber);
  border-radius: 50%;
  margin-top: -4px;
  cursor: pointer;
}
.mp-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--amber);
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.mp-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mp-btn {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  font-family: var(--body);
}
.mp-btn:hover { background: var(--amber-soft); color: var(--ink); }
.mp-play-btn {
  background: var(--amber);
  color: var(--bg);
  width: 40px;
  height: 40px;
  font-size: 14px;
  padding-left: 2px;
}
.mp-play-btn:hover { background: var(--amber-dark); color: var(--bg); }
.mp-play-btn.playing { padding-left: 0; }
.mp-toggle {
  font-size: 14px;
  opacity: 0.45;
}
.mp-toggle.active {
  opacity: 1;
  color: var(--amber);
  background: var(--amber-soft);
}

@media (max-width: 720px) {
  .mini-player {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 14px 12px;
  }
  .mp-controls { justify-content: center; }
  body.player-open { padding-bottom: 180px; }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--amber);
  color: var(--bg);
  padding: 11px 22px;
  border-radius: var(--radius);
  font-family: var(--body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-modal);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 200;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--warm-red); color: var(--ink); }

/* ===== Responsive ===== */
@media (max-width: 720px) {
  body { padding: 22px 14px 60px; }
  .header { flex-direction: column; align-items: stretch; }
  .header-left { text-align: center; }
  .header-right { justify-content: space-between; }
  .brand-title { font-size: 44px; }
  .song-view h2, #v-title { font-size: 28px; }
  .modal-content { padding: 24px 20px; }
  .form-row { flex-direction: column; }
  .group-toggle { width: 100%; flex-wrap: wrap; }
}
