/* ============================================================
   Arcirius Music Dashboard — Player Híbrido (vista + burbuja)
   ============================================================ */

/* ---------- Vista ---------- */
.ams-root {
  --am-color: 88, 101, 242;
  position: relative;
}

.ams-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(160deg, rgba(18, 20, 29, 0.9), rgba(10, 11, 16, 0.95));
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.ams-hero {
  position: relative;
  display: flex;
  gap: 22px;
  padding: 22px 22px 20px;
  align-items: center;
}

.ams-glow {
  position: absolute;
  inset: -40%;
  z-index: 0;
  background: radial-gradient(120% 120% at 20% 10%, rgba(88, 101, 242, 0.35), transparent 70%);
  pointer-events: none;
  transition: background 0.6s ease;
}

.ams-art {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: clamp(96px, 22vw, 170px);
  height: clamp(96px, 22vw, 170px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #0e1017;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

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

.ams-art-flat {
  opacity: 0.85;
  padding: 14px;
}

.ams-main {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
}

.ams-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.ams-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.05em;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.ams-badge-sync {
  color: #5eead4;
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(20, 100, 90, 0.18);
}

.ams-badge-local {
  color: #93c5fd;
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.16);
}

.ams-badge-idle {
  color: var(--text-muted);
}

.ams-notplayable {
  font-size: 11px;
  color: #fca5a5;
}

.ams-title {
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ams-author {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ams-seek {
  margin-bottom: 12px;
}

.ams-seekbar {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent-primary) 0%, var(--accent-primary) var(--am-fill, 0%), rgba(255, 255, 255, 0.12) var(--am-fill, 0%), rgba(255, 255, 255, 0.12) 100%);
  outline: none;
  cursor: pointer;
}

.ams-seekbar.is-idle {
  opacity: 0.45;
  cursor: default;
}

.ams-seekbar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.35), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.ams-seekbar::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 4px rgba(88, 101, 242, 0.35);
}

.ams-times {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-muted);
}

.ams-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ams-tuning {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px 14px;
  margin-top: 14px;
}

.ams-tune {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 11px;
}

.ams-tune input[type="range"] {
  width: 96px;
  accent-color: var(--accent-primary);
}

.ams-select {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(12, 14, 22, 0.76);
  color: var(--text-main);
  padding: 5px 7px;
  outline: none;
}

.ams-select:disabled,
.ams-cbtn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.ams-cbtn,
.ams-playbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.ams-cbtn {
  width: 40px;
  height: 40px;
}

.ams-cbtn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

.ams-cbtn.is-active {
  color: var(--accent-primary);
}

.ams-cbtn:active,
.ams-playbtn:active {
  transform: scale(0.94);
}

.ams-playbtn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.ams-playbtn:hover {
  filter: brightness(1.08);
}

.ams-playbtn.is-disabled {
  opacity: 0.5;
  cursor: default;
  filter: grayscale(0.6);
}

.ams-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px 22px 22px;
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 920px) {
  .ams-cols {
    grid-template-columns: 1fr;
  }
}

.ams-col-title {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ams-queue-wrap,
.ams-tools {
  min-width: 0;
}

.ams-queue {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.ams-qitem {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.ams-qitem-current {
  border-color: rgba(129, 140, 248, 0.52);
  background: rgba(99, 102, 241, 0.13);
}

.ams-qidx {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-muted);
  width: 18px;
  text-align: right;
  flex: 0 0 auto;
}

.ams-qart {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  flex: 0 0 auto;
  background: #0e1017;
}

.ams-qmeta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.ams-qtitle {
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ams-qauthor {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ams-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 2px 6px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ams-history-head small {
  font-size: 10px;
  opacity: .72;
  letter-spacing: 0;
  text-transform: none;
}

.ams-history-list { display: flex; flex-direction: column; gap: 8px; }
.ams-history-item { opacity: .86; }

.ams-qdur {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.ams-muted {
  color: var(--text-muted);
  font-size: 13px;
}

.ams-search-loading {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 3.25rem;
  padding: .8rem .95rem;
  border: 1px solid rgba(139, 92, 246, .24);
  border-radius: .85rem;
  background: rgba(16, 18, 36, .62);
  color: rgba(241, 245, 249, .88);
}
.ams-search-loading small {
  margin-left: auto;
  color: rgba(196, 181, 253, .7);
  font-size: .74rem;
}
.ams-search-loading-dot {
  width: .62rem;
  height: .62rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 0 .28rem rgba(168, 85, 247, .14);
  animation: ams-search-pulse 1.8s ease-in-out infinite;
}
@keyframes ams-search-pulse {
  0%, 100% { opacity: .45; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .ams-search-loading-dot { animation: none; }
}

.ams-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ams-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
}

.ams-input:focus {
  border-color: var(--border-active);
}

.ams-btn {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ams-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ams-btn-primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: #fff;
  font-weight: 600;
}

.ams-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 5px 9px;
  font-size: 12px;
}

.ams-btn-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.07);
}

.ams-btn.is-saving,
.ams-cbtn.is-saving {
  cursor: wait;
  opacity: .72;
}

.ams-btn.is-saving:disabled,
.ams-cbtn.is-saving:disabled {
  transform: none;
}

.ams-vc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.ams-web-help {
  margin: -2px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.ams-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ams-retry-note {
  font-size: 12px;
  color: #fca5a5;
  margin: 0 0 10px;
}

.ams-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.ams-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.ams-result-art {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #0e1017;
}

.ams-result-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.ams-result-title {
  font-size: 13px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ams-result-author {
  font-size: 11px;
  color: var(--text-muted);
}

.ams-error {
  font-size: 13px;
  color: #fca5a5;
}

.ams-ok {
  font-size: 13px;
  color: #86efac;
}

/* ---------- Biblioteca local de la dashboard ---------- */
.ams-library {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--border-subtle);
}

.ams-library-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.ams-library-head .ams-col-title {
  margin-bottom: 4px;
}

.ams-library-head p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.ams-library-actions,
.ams-item-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ams-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.ams-library-grid h5 {
  margin: 0 0 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.ams-library-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
  padding-right: 3px;
}

.ams-library-item {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.ams-playlist-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 8px;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
}

.ams-mini-btn {
  display: inline-flex;
  width: 25px;
  height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.ams-mini-btn:hover {
  color: #fff;
  background: rgba(99, 102, 241, 0.35);
}

.ams-mini-btn.is-liked {
  color: #fb7185;
}

.ams-mini-btn.is-danger:hover {
  background: rgba(248, 113, 113, 0.3);
}

.ams-library-error {
  margin: -3px 0 10px;
  color: #fca5a5;
  font-size: 12px;
}

@media (max-width: 720px) {
  .ams-library-head {
    flex-direction: column;
  }
  .ams-library-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Cartel de diagnóstico dinámico (snapshot.reason) ---------- */
.ams-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  font-size: 13px;
  line-height: 1.4;
}

.ams-alert[hidden] {
  display: none;
}

.ams-alert-icon {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1.2;
}

.ams-alert-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ams-alert-body strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ams-alert.is-error {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  color: #fca5a5;
}

.ams-alert.is-error strong {
  color: #f87171;
}

.ams-alert.is-info {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.08);
  color: #bfdbfe;
}

.ams-alert.is-info strong {
  color: #60a5fa;
}

.ams-alert.is-ok {
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
  color: #86efac;
}

.ams-alert.is-ok strong {
  color: #4ade80;
}

/* ---------- Burbuja flotante ---------- */
.amb-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(14, 16, 23, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 22px rgba(88, 101, 242, 0.22);
  backdrop-filter: blur(12px);
  max-width: min(92vw, 380px);
  animation: amb-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.amb-bubble[hidden] {
  display: none;
}

@keyframes amb-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.amb-thumb {
  flex: 0 0 auto;
}

.amb-thumb img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  display: block;
  background: #0e1017;
}

.amb-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: pointer;
}

.amb-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amb-author {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amb-state {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-bottom: 2px;
}

.amb-state-playing {
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
  animation: amb-pulse 1.4s ease-in-out infinite;
}

.amb-state-paused {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.8);
}

.amb-state-error {
  background: #f87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.8);
}

@keyframes amb-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.amb-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.amb-btn:hover {
  background: rgba(99, 102, 241, 0.28);
}

.amb-btn:active {
  transform: scale(0.93);
}

/* El panel compacto deja de ser una notificación pasiva: es el Quick Player
   persistente para cualquier vista de la dashboard. */
.amb-bubble {
  display: block;
  width: min(420px, calc(100vw - 24px));
  max-width: none;
  overflow: hidden;
  padding: 0;
  color: var(--text-main);
  background:
    radial-gradient(170px 100px at 6% 0%, rgba(139,92,246,.2), transparent 75%),
    rgba(10, 12, 26, .96);
  border-color: rgba(196,181,253,.2);
  border-radius: 18px;
  box-shadow: 0 16px 46px rgba(0,0,0,.62), 0 0 30px rgba(88,101,242,.18), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}
.amb-bubble.is-positioned { animation: none; }
.amb-bubble.is-idle { opacity:.28; filter:saturate(.72); transition:opacity .35s ease,filter .35s ease; }
.amb-bubble.is-idle:hover,.amb-bubble.is-idle:focus-within { opacity:1; filter:none; }
.amb-bubble.is-dragging { cursor: grabbing; user-select: none; box-shadow: 0 22px 62px rgba(0,0,0,.72), 0 0 38px rgba(167,139,250,.34); }
.amb-bar { display: flex; align-items: center; gap: 9px; min-height: 68px; padding: 10px; }
.amb-collapse { order: 5; flex: 0 0 auto; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.1); border-radius: 9px; color: rgba(226,232,240,.72); background: rgba(255,255,255,.05); font: 700 18px/1 Arial,sans-serif; cursor: pointer; }
.amb-collapse:hover { color: #fff; background: rgba(139,92,246,.3); border-color: rgba(196,181,253,.4); }
.amb-bubble.is-collapsed { width: 56px; height: 56px; border-radius: 18px; }
.amb-bubble.is-collapsed .amb-bar { min-height: 56px; height: 56px; padding: 0; justify-content: center; }
.amb-bubble.is-collapsed .amb-drag,.amb-bubble.is-collapsed .amb-thumb,.amb-bubble.is-collapsed .amb-body,.amb-bubble.is-collapsed .amb-actions { display: none; }
.amb-bubble.is-collapsed .amb-collapse { order: 0; width: 38px; height: 38px; font-size: 21px; }
.amb-drag,
.amb-icon-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border: 0; color: rgba(203,213,225,.5); background: transparent; }
.amb-drag { width: 18px; padding: 4px 1px; cursor: grab; touch-action: none; }
.amb-drag:hover { color: #c4b5fd; }
.amb-bubble.is-dragging .amb-drag { cursor: grabbing; }
.amb-icon-btn { width: 28px; height: 28px; border-radius: 9px; cursor: pointer; }
.amb-icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.amb-thumb img { width: 44px; height: 44px; border-radius: 12px; border-color: rgba(255,255,255,.13); background: #080914; }
.amb-body { padding: 2px; border: 0; text-align: left; font: inherit; background: transparent; }
.amb-body:hover .amb-title { color: #ddd6fe; }
.amb-actions { display: inline-flex; align-items: center; gap: 4px; }
.amb-btn { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; }
.amb-btn:hover { color: #fff; background: rgba(139,92,246,.29); border-color: rgba(196,181,253,.32); }
.amb-btn-primary { color: #fff; background: linear-gradient(135deg, #7c3aed, #db2777); box-shadow: 0 5px 13px rgba(124,58,237,.34); }
.amb-btn-primary:hover { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.amb-search-toggle.is-active { color: #fff; border-color: rgba(167,139,250,.62); background: rgba(124,58,237,.34); }

.amb-quick { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); background: linear-gradient(150deg, rgba(23,18,49,.78), rgba(5,6,17,.7)); }
.amb-quick[hidden] { display: none; }
.amb-quick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.amb-quick-head > div { display: flex; flex-direction: column; gap: 2px; }
.amb-quick-head span { color: #a78bfa; font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.amb-quick-head strong { color: rgba(241,245,249,.82); font-size: 11px; font-weight: 650; }
.amb-quick-search { display: flex; gap: 7px; }
.amb-quick-search input { min-width: 0; flex: 1; height: 35px; padding: 0 11px; border: 1px solid rgba(196,181,253,.19); border-radius: 10px; outline: 0; color: #f8fafc; background: rgba(4,5,15,.64); font: inherit; font-size: 12px; }
.amb-quick-search input:focus { border-color: rgba(167,139,250,.68); box-shadow: 0 0 0 3px rgba(139,92,246,.14); }
.amb-quick-search button { flex: 0 0 auto; height: 35px; padding: 0 12px; border: 0; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #7c3aed, #a855f7); box-shadow: 0 6px 14px rgba(109,40,217,.28); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.amb-quick-search button:hover { filter: brightness(1.12); }
.amb-quick-modes { display: flex; gap: 5px; margin: 10px 0 8px; }
.amb-quick-mode { height: 24px; padding: 0 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 999px; color: rgba(203,213,225,.62); background: rgba(255,255,255,.035); font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.amb-quick-mode:hover { color: #fff; border-color: rgba(196,181,253,.36); }
.amb-quick-mode.is-active { color: #f5f3ff; border-color: rgba(167,139,250,.62); background: rgba(124,58,237,.29); }
.amb-quick-results { display: grid; gap: 6px; max-height: min(300px, 36vh); overflow: auto; padding-right: 2px; }
.amb-quick-hint,
.amb-quick-feedback { margin: 2px 0; color: rgba(203,213,225,.6); font-size: 11px; line-height: 1.4; }
.amb-quick-feedback { color: #c4b5fd; }
.amb-quick-hint.is-error,
.amb-quick-feedback.is-error { color: #fda4af; }
.amb-result { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.035); }
.amb-result:hover { border-color: rgba(196,181,253,.23); background: rgba(124,58,237,.11); }
.amb-result-art { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: #080914; }
.amb-result-copy { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.amb-result-copy strong,
.amb-result-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amb-result-copy strong { color: #f1f5f9; font-size: 11px; }
.amb-result-copy span { color: rgba(203,213,225,.58); font-size: 10px; }
.amb-result-action { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; color: #ddd6fe; background: rgba(6,7,18,.45); cursor: pointer; }
.amb-result-action:hover { color: #fff; border-color: rgba(167,139,250,.5); background: rgba(124,58,237,.28); }

@media (max-width: 520px) {
  .amb-bubble { width: calc(100vw - 20px); }
  .amb-bar { gap: 7px; padding: 8px; }
  .amb-drag { width: 14px; }
  .amb-thumb img { width: 40px; height: 40px; }
  .amb-previous { display: none; }
  .amb-btn { width: 29px; height: 29px; }
}

/* ---------- Premium refresh: experiencia de escucha local ---------- */
.ams-root {
  --ams-purple: #8b5cf6;
  --ams-indigo: #6366f1;
  --ams-pink: #ec4899;
  --ams-ink: #090a16;
  --ams-panel: rgba(14, 15, 32, 0.78);
  isolation: isolate;
}

.ams-card {
  border-radius: 28px;
  border-color: rgba(177, 148, 255, 0.2);
  background:
    radial-gradient(1000px 480px at -8% -30%, rgba(116, 81, 255, 0.28), transparent 55%),
    radial-gradient(700px 350px at 110% 3%, rgba(236, 72, 153, 0.12), transparent 55%),
    linear-gradient(145deg, rgba(23, 24, 50, 0.96), rgba(7, 8, 19, 0.98));
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.07);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}

.ams-card::before,
.ams-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.ams-card::before {
  width: 520px;
  height: 520px;
  right: -250px;
  top: -290px;
  border-radius: 50%;
  background: conic-gradient(from 45deg, transparent, rgba(147, 51, 234, .2), transparent, rgba(59, 130, 246, .15), transparent);
  filter: blur(8px);
  transform: rotate(0deg);
}

.ams-root.is-playing .ams-card::before {
  animation: ams-aurora 17s linear infinite;
}

.ams-card::after {
  inset: 0;
  opacity: .22;
  background-image: radial-gradient(rgba(255,255,255,.7) .7px, transparent .8px);
  background-size: 24px 24px;
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 70%, transparent);
}

.ams-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, .42);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .58), 0 0 50px rgba(124, 58, 237, .13), inset 0 1px rgba(255,255,255,.09);
}

.ams-hero,
.ams-cols,
.ams-library,
.ams-alert {
  position: relative;
  z-index: 1;
}

.ams-hero {
  min-height: 238px;
  gap: clamp(22px, 4vw, 42px);
  padding: clamp(24px, 4vw, 38px);
}

.ams-glow {
  inset: -50%;
  opacity: .9;
  filter: saturate(1.2);
}

.ams-orbits {
  position: absolute;
  left: clamp(15px, 3vw, 42px);
  top: 50%;
  width: clamp(138px, 25vw, 218px);
  height: clamp(138px, 25vw, 218px);
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}

.ams-orbits i {
  position: absolute;
  inset: 2%;
  border: 1px solid rgba(196, 181, 253, .17);
  border-radius: 50%;
  animation: ams-orbit 14s linear infinite;
}

.ams-orbits i:nth-child(2) { inset: 13%; border-style: dashed; animation-direction: reverse; animation-duration: 18s; }
.ams-orbits i:nth-child(3) { inset: 25%; border-color: rgba(236, 72, 153, .17); animation-duration: 11s; }

.ams-art-stage {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: clamp(110px, 22vw, 178px);
  height: clamp(110px, 22vw, 178px);
}

.ams-art {
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 23px;
  border-color: rgba(255,255,255,.18);
  background: #0e1017;
  box-shadow: 0 20px 36px rgba(0,0,0,.48), 0 0 0 7px rgba(139,92,246,.08);
  transition: transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .6s ease;
  overflow: hidden;
  isolation: isolate;
}

/* El arte es una PORTADA DE ÁLBUM, nunca la vista de un video: se recorta a
   cuadrado redondeado y las miniaturas 16:9 de YouTube no se ven como un
   reproductor de video incrustado. */
.ams-art img {
  border-radius: inherit;
  background: #0e1017;
}

.ams-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 90% at 50% 108%, rgba(20, 7, 38, .55), transparent 62%);
  pointer-events: none;
  z-index: 2;
}

.ams-art-badge {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(9, 8, 23, .72);
  border: 1px solid rgba(255,255,255,.16);
  color: #e6e1fa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ams-art-badge::before { content: "♪"; font-size: 12px; line-height: 1; }
.ams-art-badge.is-youtube { color: #ffde9e; border-left-color: rgba(255, 215, 130, .65); }
.ams-art-badge.is-audio { color: #bff0ff; }

.ams-root.is-playing .ams-art {
  transform: translateX(-7px) scale(.98);
  box-shadow: 0 24px 46px rgba(0,0,0,.55), 0 0 0 7px rgba(139,92,246,.16), 0 0 44px rgba(139,92,246,.27);
}

.ams-vinyl {
  position: absolute;
  z-index: 1;
  width: 92%;
  height: 92%;
  right: -14%;
  top: 4%;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #17132b 0 11%, #9b7af4 11.7% 13%, #17132b 13.6% 21%, transparent 21.5%),
    repeating-radial-gradient(circle at center, #0a0a13 0 3px, #222034 4px 5px, #100f1e 6px 8px);
  box-shadow: 8px 10px 24px rgba(0,0,0,.55), inset 0 0 15px rgba(255,255,255,.1);
  transition: transform .5s ease;
}

.ams-root.is-playing .ams-vinyl { animation: ams-vinyl-spin 3.6s linear infinite; }

.ams-main { z-index: 2; }

.ams-meta-top { gap: 9px; margin-bottom: 11px; }

.ams-badge,
.ams-live-status {
  min-height: 27px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .11em;
  font-weight: 750;
  padding: 4px 10px;
}

.ams-badge { backdrop-filter: blur(12px); }
.ams-badge-local { color: #ddd6fe; border-color: rgba(167,139,250,.4); background: rgba(124,58,237,.18); }

.ams-live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(226,232,240,.66);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
}

.ams-equalizer { display: inline-flex; align-items: end; gap: 2px; height: 12px; }
.ams-equalizer i { display: block; width: 2px; height: 4px; border-radius: 8px; background: #7dd3fc; opacity: .55; }
.ams-root.is-playing .ams-equalizer i { animation: ams-eq .78s ease-in-out infinite alternate; opacity: 1; }
.ams-root.is-playing .ams-equalizer i:nth-child(2) { animation-delay: -.3s; }
.ams-root.is-playing .ams-equalizer i:nth-child(3) { animation-delay: -.55s; }
.ams-root.is-playing .ams-equalizer i:nth-child(4) { animation-delay: -.15s; }

.ams-title {
  font-size: clamp(1.26rem, 2.8vw, 1.88rem);
  letter-spacing: -.035em;
  text-shadow: 0 3px 18px rgba(0,0,0,.32);
  margin-bottom: 6px;
}

.ams-author { margin-bottom: 18px; color: rgba(203,213,225,.67); }

.ams-seek { margin-bottom: 16px; }
.ams-seekbar { height: 7px; box-shadow: inset 0 1px 2px rgba(0,0,0,.65); transition: filter .2s ease; }
.ams-seekbar:hover { filter: brightness(1.23); }
.ams-times { margin-top: 7px; font-size: 10px; letter-spacing: .07em; }

.ams-controls { gap: 7px; }
.ams-cbtn {
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  color: rgba(226,232,240,.73);
}

.ams-cbtn:hover { border-color: rgba(196,181,253,.22); background: rgba(139,92,246,.14); color: #fff; transform: translateY(-1px); }
.ams-cbtn.is-active { color: #c4b5fd; background: rgba(139,92,246,.16); }
.ams-playbtn {
  width: 60px;
  height: 60px;
  margin: 0 2px;
  background: linear-gradient(135deg, #a78bfa, #6d5dfc 48%, #ec4899);
  box-shadow: 0 12px 30px rgba(109,93,252,.42), inset 0 1px rgba(255,255,255,.35);
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, filter .2s ease;
}
.ams-playbtn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 17px 36px rgba(109,93,252,.6), 0 0 25px rgba(236,72,153,.25); }

.ams-tuning {
  align-items: center;
  gap: 10px;
  margin-top: 19px;
}

.ams-sounddock { display: inline-flex; align-items: center; }
.ams-volume-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px 0 7px;
  border: 1px solid rgba(196,181,253,.26);
  border-radius: 12px;
  color: #e9e2ff;
  background: linear-gradient(120deg, rgba(17,18,42,.82), rgba(65,39,112,.34));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 5px 16px rgba(0,0,0,.15);
}
.ams-mute-btn {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: #d8ceff;
  background: rgba(255,255,255,.08);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.ams-mute-btn:hover { color: #fff; background: rgba(236,72,153,.3); transform: scale(1.05); }
.ams-mute-btn.is-muted { color: rgba(226,232,240,.55); background: rgba(255,255,255,.04); }
.ams-volume-label { font-size: 11px; font-weight: 700; }
.ams-volume-inline strong { color: #a5f3fc; font-size: 10px; min-width: 30px; text-align: right; font-variant-numeric: tabular-nums; }

/* Riel horizontal propio: misma geometría en Chrome, Firefox y el navegador integrado. */
.ams-volume-dial {
  --ams-volume-fill: 100%;
  appearance: none;
  -webkit-appearance: none;
  width: clamp(70px, 8vw, 122px);
  height: 18px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.ams-volume-dial::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border: 1px solid rgba(196,181,253,.24);
  border-radius: 999px;
  background: linear-gradient(90deg, #a78bfa 0 var(--ams-volume-fill), rgba(255,255,255,.14) var(--ams-volume-fill) 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.48), 0 0 9px rgba(167,139,250,.2);
}

.ams-volume-dial::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border: 2px solid #ede9fe;
  border-radius: 50%;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(124,58,237,.2), 0 3px 9px rgba(0,0,0,.55);
  -webkit-appearance: none;
}

.ams-volume-dial::-moz-range-track {
  height: 6px;
  border: 1px solid rgba(196,181,253,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.48);
}

.ams-volume-dial::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #a78bfa, #d946ef);
  box-shadow: 0 0 9px rgba(167,139,250,.28);
}

.ams-volume-dial::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid #ede9fe;
  border-radius: 50%;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  box-shadow: 0 0 0 3px rgba(124,58,237,.2), 0 3px 9px rgba(0,0,0,.55);
}
@media (max-width: 720px) {
  .ams-volume-label { display: none; }
  .ams-volume-dial { width: 76px; }
}

.ams-tune { min-height: 34px; padding: 0 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(9,10,24,.38); }
.ams-tune > span { font-size: 10px; letter-spacing: .04em; }
.ams-select { border: 0; background: transparent; padding: 5px 2px; font-size: 11px; cursor: pointer; }

.ams-cols { gap: 18px; padding: 24px clamp(24px, 4vw, 38px) 28px; border-top-color: rgba(255,255,255,.08); }
.ams-queue-wrap,
.ams-tools { padding: 17px; border: 1px solid rgba(255,255,255,.075); border-radius: 18px; background: rgba(5,6,18,.23); box-shadow: inset 0 1px rgba(255,255,255,.035); }
.ams-col-title { color: rgba(203,213,225,.66); font-size: 10px; letter-spacing: .14em; }
.ams-qitem,
.ams-result,
.ams-library-item { border-color: rgba(255,255,255,.075); background: rgba(255,255,255,.026); transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.ams-qitem:hover,
.ams-result:hover,
.ams-library-item:hover { background: rgba(139,92,246,.11); border-color: rgba(196,181,253,.22); transform: translateX(2px); }
.ams-qitem-current { border-color: rgba(167,139,250,.46); background: linear-gradient(90deg, rgba(124,58,237,.2), rgba(99,102,241,.07)); }
.ams-qitem-current .ams-qidx { color: #a5f3fc; }
.ams-input { border-radius: 12px; border-color: rgba(196,181,253,.17); background: rgba(5,6,18,.5); padding: 11px 13px; }
.ams-input:focus { border-color: rgba(167,139,250,.7); box-shadow: 0 0 0 3px rgba(139,92,246,.13); }
.ams-btn { border-radius: 11px; transition: transform .16s ease, background .16s ease, box-shadow .16s ease; }
.ams-btn:hover { transform: translateY(-1px); }
.ams-btn-primary { box-shadow: 0 7px 20px rgba(109,93,252,.28); }
.ams-btn-primary:hover { box-shadow: 0 10px 24px rgba(109,93,252,.42); }
.ams-web-help { color: rgba(203,213,225,.57); }

.ams-library { margin: 0 clamp(24px, 4vw, 38px) clamp(24px, 4vw, 38px); padding: 20px; border-radius: 20px; border: 1px solid rgba(255,255,255,.08); background: linear-gradient(120deg, rgba(139,92,246,.08), rgba(5,6,18,.32) 45%, rgba(236,72,153,.05)); }
.ams-library-head p { color: rgba(203,213,225,.54); }
.ams-library-grid { gap: 18px; }
.ams-library-list { border-radius: 13px; }

/* ---------- Entrada global ---------- */
.arc-global-music-shell {
  position: relative;
}

.arc-global-music-head,
.arc-global-music-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 18px;
  padding: 22px 24px;
  border: 1px solid rgba(196,181,253,.18);
  border-radius: 20px;
  background:
    radial-gradient(550px 230px at 0% 0%, rgba(139,92,246,.18), transparent 70%),
    linear-gradient(135deg, rgba(21,20,47,.88), rgba(9,10,22,.92));
  box-shadow: inset 0 1px rgba(255,255,255,.07), 0 15px 42px rgba(0,0,0,.25);
}

.arc-global-music-head h2,
.arc-global-music-empty h2 {
  margin: 4px 0 6px;
  color: var(--text-main);
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
}

.arc-global-music-head p,
.arc-global-music-empty p {
  max-width: 660px;
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.arc-global-music-kicker {
  color: #c4b5fd;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
}

.arc-global-music-picker {
  display: grid;
  gap: 7px;
  min-width: min(100%, 250px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.arc-global-music-picker select {
  min-width: 230px;
  padding: 11px 36px 11px 13px;
  border: 1px solid rgba(196,181,253,.28);
  border-radius: 12px;
  outline: none;
  color: var(--text-main);
  background: rgba(4,5,16,.62);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.arc-global-music-picker select:focus {
  border-color: rgba(196,181,253,.75);
  box-shadow: 0 0 0 3px rgba(139,92,246,.16);
}

.arc-global-music-empty {
  display: block;
  max-width: 680px;
}

.arc-global-music-empty .btn { margin-top: 18px; }

@keyframes ams-aurora { to { transform: rotate(1turn); } }
@keyframes ams-orbit { to { transform: rotate(1turn); } }
@keyframes ams-vinyl-spin { to { transform: rotate(1turn); } }
@keyframes ams-eq { from { height: 3px; } to { height: 12px; } }
@keyframes ams-pop { from { opacity: 0; transform: translateY(6px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 720px) {
  .ams-card { border-radius: 22px; }
  .ams-hero { align-items: flex-start; padding: 22px; }
  .ams-art-stage { width: 104px; height: 104px; }
  .ams-vinyl { right: -10%; }
  .ams-orbits { left: 4px; }
  .ams-cols { padding: 18px 16px 20px; }
  .ams-library { margin: 0 16px 16px; }
  .arc-global-music-head { align-items: stretch; flex-direction: column; padding: 18px; }
  .arc-global-music-picker,
  .arc-global-music-picker select { width: 100%; min-width: 0; }
}

@media (max-width: 520px) {
  .ams-hero { flex-direction: column; align-items: center; text-align: center; }
  .ams-main { width: 100%; }
  .ams-meta-top,
  .ams-controls,
  .ams-tuning { justify-content: center; }
  .ams-times { text-align: left; }
  .ams-art-stage { width: 136px; height: 136px; }
  .ams-orbits { left: 50%; top: 87px; transform: translate(-50%, -50%); width: 168px; height: 168px; }
  .ams-result { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ams-card,
  .ams-vinyl,
  .ams-orbits i,
  .ams-equalizer i,
  .ams-volume-inline { transition: none !important; }
}

/* ---------- Studio controls + búsqueda precisa ---------- */
.ams-playback-context {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  margin: 5px 0 0 4px;
  color: rgba(196,181,253,.72);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ams-playback-context::before {
  content: '';
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: #a78bfa;
  box-shadow: 0 0 10px rgba(167,139,250,.85);
}

.ams-tuning {
  display: flex;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(196,181,253,.14);
  border-radius: 17px;
  background: linear-gradient(110deg, rgba(6,7,22,.7), rgba(35,23,68,.32));
  box-shadow: inset 0 1px rgba(255,255,255,.055), 0 10px 24px rgba(0,0,0,.13);
}

.ams-sounddock { display: flex; align-items: stretch; }
.ams-volume-trigger { min-height: 38px; border-radius: 11px; }

.ams-studio-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 6px 0 10px;
  border-left: 1px solid rgba(255,255,255,.08);
}

.ams-studio-label {
  color: rgba(203,213,225,.58);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ams-choice-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(2,3,13,.5);
}

.ams-choice {
  position: relative;
  min-width: 33px;
  height: 26px;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  color: rgba(226,232,240,.58);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -.01em;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.ams-choice:hover:not(:disabled) { color: #fff; background: rgba(167,139,250,.14); transform: translateY(-1px); }
.ams-choice.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(139,92,246,.95), rgba(236,72,153,.74));
  box-shadow: 0 5px 14px rgba(109,93,252,.4), inset 0 1px rgba(255,255,255,.25);
}
.ams-choice:disabled { cursor: not-allowed; opacity: .32; }
.ams-studio-control.is-unavailable .ams-studio-label::after {
  content: ' · YT';
  color: rgba(125,211,252,.72);
}

.ams-search-refiner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -2px 0 11px;
  flex-wrap: wrap;
}

.ams-search-refiner > span {
  margin-right: 2px;
  color: rgba(203,213,225,.5);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ams-search-filter {
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(196,181,253,.13);
  border-radius: 999px;
  color: rgba(226,232,240,.65);
  background: rgba(255,255,255,.025);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.ams-search-filter:hover { color: #fff; border-color: rgba(196,181,253,.38); transform: translateY(-1px); }
.ams-search-filter.is-active { color: #ede9fe; border-color: rgba(167,139,250,.68); background: rgba(124,58,237,.23); box-shadow: 0 0 16px rgba(124,58,237,.16); }

.ams-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 24px;
  max-width: min(90vw, 360px);
  padding: 11px 15px;
  border: 1px solid rgba(167,139,250,.42);
  border-radius: 14px;
  color: #f5f3ff;
  background: rgba(18,14,39,.96);
  box-shadow: 0 17px 45px rgba(0,0,0,.48), 0 0 28px rgba(124,58,237,.23);
  backdrop-filter: blur(16px);
  font-size: 12px;
  font-weight: 700;
  transform: translateX(-50%);
  animation: ams-toast-in .26s cubic-bezier(.2,.8,.2,1);
}
.ams-toast[hidden] { display: none; }
.ams-toast.is-error { border-color: rgba(251,113,133,.5); color: #fecdd3; background: rgba(64,12,31,.96); }

.ams-playlist-modal[hidden] { display: none; }
.ams-playlist-modal {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 13, .66);
  backdrop-filter: blur(10px);
  animation: ams-modal-in .18s ease-out;
}

.ams-playlist-dialog {
  position: relative;
  width: min(100%, 460px);
  padding: 25px;
  border: 1px solid rgba(196,181,253,.3);
  border-radius: 20px;
  color: var(--text-main);
  background:
    radial-gradient(440px 210px at 0 0, rgba(124,58,237,.2), transparent 70%),
    linear-gradient(145deg, rgba(24,20,50,.98), rgba(8,9,22,.98));
  box-shadow: 0 28px 85px rgba(0,0,0,.62), inset 0 1px rgba(255,255,255,.08);
}

.ams-playlist-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: rgba(226,232,240,.78);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.ams-playlist-close:hover { color: #fff; background: rgba(255,255,255,.1); }
.ams-playlist-kicker { color: #c4b5fd; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.ams-playlist-dialog h4 { margin: 7px 34px 7px 0; font-size: 19px; }
.ams-playlist-dialog p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.ams-playlist-label { display: block; margin: 18px 0 7px; color: rgba(226,232,240,.78); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.ams-playlist-dialog .ams-input { width: 100%; box-sizing: border-box; }

.ams-playlist-existing {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.ams-playlist-existing > span {
  flex: 0 0 100%;
  color: var(--text-muted);
  font-size: 11px;
}

.ams-playlist-existing button {
  max-width: 100%;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid rgba(196,181,253,.22);
  border-radius: 999px;
  color: #ddd6fe;
  background: rgba(124,58,237,.12);
  cursor: pointer;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ams-playlist-existing button:hover { border-color: rgba(196,181,253,.58); background: rgba(124,58,237,.25); }
.ams-playlist-form-error { min-height: 18px; margin-top: 9px !important; color: #fda4af !important; font-size: 12px !important; }
.ams-playlist-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

@keyframes ams-modal-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes ams-toast-in { from { opacity: 0; transform: translate(-50%, 12px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

@media (max-width: 720px) {
  .ams-tuning { align-items: stretch; flex-wrap: wrap; }
  .ams-studio-control { border-left: 0; padding-left: 4px; }
}

@media (max-width: 520px) {
  .ams-tuning { justify-content: center; }
  .ams-studio-control { justify-content: center; }
  .ams-search-refiner { justify-content: center; }
}
