/* ═══════════════════════════════════════════════════════════════════════════
   MusicaRoca Streaming App – Dark Streaming UI
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --app-bg:         #0a0a0a;
  --sidebar-bg:     #111111;
  --card-bg:        #181818;
  --card-hover:     #282828;
  --border:         #282828;
  --accent:         #e85d26;
  --accent-dim:     rgba(232,93,38,.15);
  --text:           #ffffff;
  --text-sec:       #b3b3b3;
  --text-dim:       #6a6a6a;
  --player-bg:      #181818;
  --player-border:  #282828;
  --progress-bg:    #4d4d4d;
  --progress-fill:  #e85d26;
  --sidebar-w:      240px;
  --player-h:       90px;
  --radius:         8px;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
#mrpsg-app *,
#mrpsg-app *::before,
#mrpsg-app *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Standalone page shell ────────────────────────────────────────────────── */
body {
  margin: 0;
  padding: 0;
  background: #050505;
}

/* ── App Shell ────────────────────────────────────────────────────────────── */
#mrpsg-app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  grid-template-areas:
    "sidebar main"
    "player  player";

  /* Inset from viewport edges on desktop */
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
  margin: 12px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.05);

  background: var(--app-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  position: relative;
}

/* Full height on mobile – no inset */
@media (max-width: 700px) {
  #mrpsg-app {
    margin: 0;
    border-radius: 0;
    height: 100dvh;
    max-height: 100dvh;
    box-shadow: none;
  }
}

/* When embedded in a WP page, take full viewport height minus header */
.mrpsg-app-fullpage #mrpsg-app {
  height: calc(100vh - var(--wp-admin-bar-height, 0px));
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
#mrpsg-sidebar {
  grid-area: sidebar;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  user-select: none;
}

.mrpsg-sidebar-logo {
  padding: 20px 16px 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
  flex-shrink: 0;
  height: 64px;            /* lock height so topbar can match */
  display: flex;
  align-items: center;
}

.mrpsg-sidebar-logo span { color: var(--accent); }

#mrpsg-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--app-bg);
}

/* Fix 1: topbar matches sidebar logo height + left padding exactly */
.mrpsg-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 0 16px;   /* 16px left = same indent as sidebar logo */
  height: 64px;
  flex-shrink: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,.03) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255,255,255,.03);
}

.mrpsg-sidebar-nav {
  padding: 0 8px;
  flex-shrink: 0;
}

.mrpsg-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-sec);
  transition: color .1s, background .1s;
}

.mrpsg-nav-item:hover { color: var(--text); background: rgba(255,255,255,.06); }
.mrpsg-nav-item.active { color: var(--text); background: rgba(255,255,255,.08); }
.mrpsg-nav-item.active .mrpsg-nav-icon { color: var(--accent); }

.mrpsg-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

/* Playlist section */
.mrpsg-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 8px;
  flex-shrink: 0;
}

.mrpsg-sidebar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-dim);
  flex-shrink: 0;
}

.mrpsg-new-playlist-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 50%;
  transition: color .1s, background .1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mrpsg-new-playlist-btn:hover { color: var(--text); background: rgba(255,255,255,.1); }

.mrpsg-playlist-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.mrpsg-playlist-list::-webkit-scrollbar { width: 4px; }
.mrpsg-playlist-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.mrpsg-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .1s;
  position: relative;
}

.mrpsg-playlist-item:hover { background: rgba(255,255,255,.06); }
.mrpsg-playlist-item.active { background: rgba(255,255,255,.08); }

.mrpsg-playlist-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--text-dim);
}

.mrpsg-playlist-item-info { min-width: 0; flex: 1; }
.mrpsg-playlist-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .1s;
}

.mrpsg-playlist-item:hover .mrpsg-playlist-item-name,
.mrpsg-playlist-item.active .mrpsg-playlist-item-name { color: var(--text); }

.mrpsg-playlist-item-count {
  font-size: 11px;
  color: var(--text-dim);
}

.mrpsg-playlist-item-delete {
  display: none;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color .1s;
  flex-shrink: 0;
}

.mrpsg-playlist-item:hover .mrpsg-playlist-item-delete { display: flex; }
.mrpsg-playlist-item-delete:hover { color: #ef4444; }

/* ── Main ─────────────────────────────────────────────────────────────────── */
/* Search bar */
.mrpsg-search-wrap {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.mrpsg-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 15px;
  pointer-events: none;
}

.mrpsg-search-input {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 8px 12px 8px 34px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}

.mrpsg-search-input::placeholder { color: var(--text-dim); }
.mrpsg-search-input:focus { border-color: var(--border); background: #222; }

/* Content area – Fix 2: never bleeds behind player bar */
.mrpsg-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 28px 32px 28px !important;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.mrpsg-content::-webkit-scrollbar { width: 6px; }
.mrpsg-content::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* Section headers */
.mrpsg-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0 16px;
}

.mrpsg-section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text);
}

.mrpsg-section-link {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  cursor: pointer;
  transition: color .1s;
}
.mrpsg-section-link:hover { color: var(--text); }

/* ── Artist Grid ──────────────────────────────────────────────────────────── */
.mrpsg-artist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.mrpsg-artist-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  position: relative;
}

.mrpsg-artist-card:hover { background: var(--card-hover); transform: translateY(-2px); }

.mrpsg-artist-card-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--border);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}

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

.mrpsg-artist-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--text-dim);
  background: linear-gradient(135deg, #282828 0%, #1a1a1a 100%);
}

.mrpsg-artist-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mrpsg-artist-sub {
  font-size: 12px;
  color: var(--text-sec);
  margin-top: 2px;
}

/* Play button overlay on artist card */
.mrpsg-artist-card-play {
  position: absolute;
  bottom: 52px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 4px 12px rgba(232,93,38,.4);
}

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

.mrpsg-artist-card-play:hover { transform: scale(1.06) translateY(0); }

/* ── Track List Filter Bar ────────────────────────────────────────────────── */
.mrpsg-filter-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 4px 0;
}

.mrpsg-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
  font-family: inherit;
}

.mrpsg-filter-btn:hover {
  background: var(--card-hover);
  color: var(--text);
}

.mrpsg-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.mrpsg-filter-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0;
}

.mrpsg-filter-artist {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-sec);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236a6a6a'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
  transition: color .12s, border-color .12s;
}

.mrpsg-filter-artist:hover,
.mrpsg-filter-artist:focus { color: var(--text); border-color: var(--text-sec); }

.mrpsg-filter-count {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: auto;
}
/* ──────────────────────────────────────────────────────────────────────────
   Track list – 6-column grid
   #   | TITLE (flex) | EARLY (52px) | DOWNLOAD (64px) | ARTIST (140px) | RELEASE (80px) | ⋯ (32px)
   ────────────────────────────────────────────────────────────────────────── */
.mrpsg-track-list-header,
.mrpsg-track-row {
  display: grid;
  grid-template-columns: 32px 1fr 52px 64px 140px 80px 32px;
  gap: 6px;
  align-items: center;
}

.mrpsg-track-list-header {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
}

.mrpsg-track-row {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .1s;
  position: relative;
}

/* Centre the two new status columns */
.mrpsg-col-early,
.mrpsg-col-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.mrpsg-track-row:hover { background: rgba(255,255,255,.05); }

/* Fix 2: active row – dark orange-red gradient with edge glow, zero brown */
.mrpsg-track-row.playing {
  background: linear-gradient(90deg,
    rgba(232,93,38,.22) 0%,
    rgba(220,50,20,.10) 45%,
    transparent 100%);
  box-shadow:
    inset 3px 0 0 var(--accent),          /* left accent bar */
    inset 0 0 30px rgba(232,93,38,.06);  /* very subtle overall glow */
}

.mrpsg-track-row.playing:hover {
  background: linear-gradient(90deg,
    rgba(232,93,38,.28) 0%,
    rgba(220,50,20,.14) 45%,
    transparent 100%);
}

/* Title glow on current track */
.mrpsg-track-row.playing .mrpsg-track-title {
  color: #ff7a45;
  text-shadow: 0 0 20px rgba(255,100,50,.45);
}

/* Fix 3: track number column – all states via CSS, never via JS innerHTML.
   Three elements sit in the same cell:
   - .mrpsg-track-num-text  : the number (always in DOM)
   - .mrpsg-bars            : animated equalizer (always in DOM)
   - .mrpsg-track-play-icon : play arrow (always in DOM)
   CSS opacity controls which one is visible at any time.            */

.mrpsg-track-num {
  font-size: 13px;
  color: var(--text-sec);
  display: grid;          /* stack all children in same cell */
  place-items: center;
  min-width: 32px;
}

/* All three children occupy the same grid cell */
.mrpsg-track-num > * {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .12s;
}

/* Default: show number, hide bars + play icon */
.mrpsg-track-num-text   { opacity: 1; }
.mrpsg-track-num .mrpsg-bars       { opacity: 0; }
.mrpsg-track-num .mrpsg-track-play-icon { opacity: 0; font-size: 13px; color: var(--text); }

/* Hover (not playing): hide number, show play arrow */
.mrpsg-track-row:not(.playing):hover .mrpsg-track-num-text        { opacity: 0; }
.mrpsg-track-row:not(.playing):hover .mrpsg-track-num .mrpsg-track-play-icon { opacity: 1; }

/* Currently playing + audio running: hide number, show bars */
.mrpsg-track-row.playing.audio-playing .mrpsg-track-num-text  { opacity: 0; }
.mrpsg-track-row.playing.audio-playing .mrpsg-bars            { opacity: 1; }

/* Currently playing + paused: hide number, show accent play arrow */
.mrpsg-track-row.playing:not(.audio-playing) .mrpsg-track-num-text { opacity: 0; }
.mrpsg-track-row.playing:not(.audio-playing) .mrpsg-track-num .mrpsg-track-play-icon {
  opacity: 1;
  color: var(--accent);
}

.mrpsg-track-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }

.mrpsg-track-cover {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.mrpsg-track-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mrpsg-track-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-dim);
}

.mrpsg-track-info { min-width: 0; }
.mrpsg-track-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mrpsg-track-row.playing .mrpsg-track-title { color: var(--accent); }

.mrpsg-track-artist {
  font-size: 12px;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .1s;
  cursor: pointer;
}
.mrpsg-track-artist:hover { color: var(--text); text-decoration: underline; }

.mrpsg-track-artist-col {
  font-size: 13px;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color .1s;
}
.mrpsg-track-artist-col:hover { color: var(--text); text-decoration: underline; }

.mrpsg-track-date { font-size: 12px; color: var(--text-dim); }

.mrpsg-track-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

/* Context menu button */
.mrpsg-track-menu-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  transition: opacity .1s, color .1s;
  display: flex;
  align-items: center;
}

.mrpsg-track-row:hover .mrpsg-track-menu-btn { opacity: 1; }
.mrpsg-track-menu-btn:hover { color: var(--text); }

/* ── Column status cells ──────────────────────────────────────────────────── */

/* Dash placeholder */
.mrpsg-col-dash {
  color: var(--text-dim);
  font-size: 13px;
  text-align: center;
}

/* Active EARLY badge in column */
.mrpsg-col-early-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(139,92,246,.16);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,.28);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Locked cell: 🔒 + tier text */
.mrpsg-col-locked {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
  cursor: help;
  opacity: .6;
  transition: opacity .12s;
}

.mrpsg-track-row:hover .mrpsg-col-locked { opacity: .9; }

/* Download button in column */
.mrpsg-col-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(20,184,166,.1);
  color: #5eead4;
  border: 1px solid rgba(20,184,166,.2);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
  font-family: inherit;
}

.mrpsg-col-dl-btn:hover {
  background: rgba(20,184,166,.2);
  border-color: rgba(20,184,166,.4);
}

/* Library re-download button – green tint */
.mrpsg-col-dl-btn--lib {
  background: rgba(34,197,94,.1);
  color: #86efac;
  border-color: rgba(34,197,94,.22);
}

.mrpsg-col-dl-btn--lib:hover {
  background: rgba(34,197,94,.2);
  border-color: rgba(34,197,94,.4);
}

/* Mobile: collapse EARLY+DOWNLOAD into tiny icons next to title */
.mrpsg-title-badges { display: none; }
.mrpsg-track-locked-badge {
  font-size: 10px;
  background: rgba(255,255,255,.06);
  color: var(--text-dim);
  padding: 1px 6px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Context Menu ─────────────────────────────────────────────────────────── */
.mrpsg-context-menu {
  position: fixed;
  background: #282828;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 6px;
  min-width: 220px;
  max-width: 280px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  font-size: 13px;
  max-height: 70vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #444 transparent;
}

.mrpsg-ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  color: var(--text-sec);
  transition: background .1s, color .1s;
  user-select: none;
}

.mrpsg-ctx-item:hover { background: rgba(255,255,255,.08); color: var(--text); }
.mrpsg-ctx-item.danger:hover { color: #ef4444; }

.mrpsg-ctx-label {
  padding: 4px 10px 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
}

.mrpsg-ctx-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── Player Bar ───────────────────────────────────────────────────────────── */
#mrpsg-player {
  grid-area: player;
  height: var(--player-h);
  background: var(--player-bg);
  border-top: 1px solid var(--player-border);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  z-index: 100;
}

/* Now playing info */
.mrpsg-now-playing {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mrpsg-now-playing-cover {
  width: 52px;
  height: 52px;
  border-radius: 4px;
  background: var(--border);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform .18s ease;
}

.mrpsg-now-playing-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mrpsg-now-playing-cover-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-dim);
}

/* ── Badges (unified system) ──────────────────────────────────────────────── */
/* ── Badge components (scoped to #mrpsg-app to avoid conflict with admin.css) ── */
#mrpsg-app .mrpsg-badge,
.mrpsg-dl-modal .mrpsg-badge,
.mrpsg-locked-modal .mrpsg-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
  border: 1px solid transparent;
  line-height: 1.6;
}

/* PATREON – orange-red (brand colour) */
#mrpsg-app .mrpsg-badge--patreon,
.mrpsg-dl-modal .mrpsg-badge--patreon {
  background: rgba(232,93,38,.16);
  color: #ff7a45;
  border-color: rgba(232,93,38,.28);
}

/* EARLY – purple */
#mrpsg-app .mrpsg-badge--early {
  background: rgba(139,92,246,.16);
  color: #c4b5fd;
  border-color: rgba(139,92,246,.28);
  margin-left: 5px;
}

/* DOWNLOAD – teal/green */
#mrpsg-app .mrpsg-badge--dl {
  background: rgba(20,184,166,.12);
  color: #5eead4;
  border-color: rgba(20,184,166,.22);
  margin-left: 4px;
  opacity: .38;
  transition: opacity .15s;
}

#mrpsg-app .mrpsg-track-row:hover .mrpsg-badge--dl { opacity: .75; }

/* DOWNLOAD LOCKED – greyed out hint for lower tiers */
#mrpsg-app .mrpsg-badge--dl-locked {
  background: rgba(255,255,255,.04);
  color: var(--text-dim);
  border-color: rgba(255,255,255,.08);
  margin-left: 4px;
  opacity: .5;
  transition: opacity .15s;
}

#mrpsg-app .mrpsg-track-row:hover .mrpsg-badge--dl-locked { opacity: .8; }

/* LOCKED tier hint */
#mrpsg-app .mrpsg-badge--locked {
  background: rgba(255,255,255,.05);
  color: var(--text-dim);
  border-color: rgba(255,255,255,.1);
  margin-left: 5px;
}

/* ── Now Playing info block ───────────────────────────────────────────────── */
.mrpsg-now-playing-info { min-width: 0; }

.mrpsg-np-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.mrpsg-now-playing-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Patreon badge in player: pill shape */
#mrpsg-np-badge {
  border-radius: 20px;
  flex-shrink: 0;
}

.mrpsg-now-playing-artist {
  font-size: 12px;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color .1s;
}
.mrpsg-now-playing-artist:hover { color: var(--text); text-decoration: underline; }

/* Controls */
.mrpsg-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mrpsg-control-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mrpsg-ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-sec);
  font-size: 18px;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .1s, transform .1s;
  line-height: 1;
}

.mrpsg-ctrl-btn:hover { color: var(--text); }
.mrpsg-ctrl-btn.active { color: var(--accent); }

.mrpsg-play-pause {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text);
  color: var(--app-bg) !important;
  font-size: 16px;
  transition: transform .1s, background .1s;
}

.mrpsg-play-pause:hover { transform: scale(1.06); background: #fff; }
.mrpsg-play-pause:active { transform: scale(.96); }
.mrpsg-play-pause:disabled { opacity: .4; pointer-events: none; }

/* Progress */
.mrpsg-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.mrpsg-time {
  font-size: 11px;
  color: var(--text-dim);
  min-width: 32px;
  font-variant-numeric: tabular-nums;
}

.mrpsg-time.right { text-align: right; }

.mrpsg-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--progress-bg);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height .1s;
  /* expand the click area without changing visual height */
  padding: 8px 0;
  margin: -8px 0;
  box-sizing: content-box;
}

.mrpsg-progress-bar:hover,
.mrpsg-progress-bar.seeking { height: 6px; }

.mrpsg-progress-bar.seeking { cursor: grabbing; }

.mrpsg-progress-fill {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  pointer-events: none;
  position: relative;
  transition: background .1s;
}

.mrpsg-progress-bar:hover .mrpsg-progress-fill,
.mrpsg-progress-bar.seeking .mrpsg-progress-fill { background: var(--accent); }

/* Thumb dot at right edge of fill */
.mrpsg-progress-fill::after {
  content: '';
  position: absolute;
  right: -4px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform .1s;
  pointer-events: none;
}
.mrpsg-progress-bar:hover .mrpsg-progress-fill::after,
.mrpsg-progress-bar.seeking .mrpsg-progress-fill::after { transform: translateY(-50%) scale(1); }

/* Volume & extras */
.mrpsg-player-extras {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.mrpsg-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mrpsg-volume-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-sec);
  font-size: 16px;
  padding: 2px;
  display: flex;
  transition: color .1s;
}

.mrpsg-volume-btn:hover { color: var(--text); }

.mrpsg-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background: var(--progress-bg);
  cursor: pointer;
  outline: none;
}

.mrpsg-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

/* ── Hero / View Headers ──────────────────────────────────────────────────── */
.mrpsg-view-hero {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 24px 0 20px;
  margin-bottom: 4px;
}

.mrpsg-hero-art {
  width: 160px;
  height: 160px;
  border-radius: var(--radius);
  background: var(--card-bg);
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}

.mrpsg-hero-art.circle { border-radius: 50%; }
.mrpsg-hero-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mrpsg-hero-art-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--text-dim);
}

.mrpsg-hero-info { min-width: 0; }
.mrpsg-hero-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-sec);
  margin-bottom: 6px;
}

.mrpsg-hero-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
  color: var(--text);
  margin-bottom: 10px;
  word-break: break-word;
}

.mrpsg-hero-sub {
  font-size: 13px;
  color: var(--text-sec);
}

.mrpsg-hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}

.mrpsg-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s, background .1s;
}

.mrpsg-btn-primary:hover { background: #c94c18; transform: scale(1.02); }

.mrpsg-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-sec);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .1s, border-color .1s;
}
.mrpsg-btn-ghost:hover { color: var(--text); border-color: var(--text); }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.mrpsg-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mrpsg-modal {
  background: #282828;
  border-radius: 12px;
  padding: 28px;
  min-width: 360px;
  max-width: 480px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}

.mrpsg-modal h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 20px;
}

.mrpsg-modal-input {
  width: 100%;
  background: var(--border);
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  margin-bottom: 12px;
  transition: border-color .1s;
}

.mrpsg-modal-input:focus { border-color: var(--text); }
.mrpsg-modal-input::placeholder { color: var(--text-dim); }

.mrpsg-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ── Patreon CTA ──────────────────────────────────────────────────────────── */
.mrpsg-patreon-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  min-height: 300px;
}

.mrpsg-patreon-cta h2 { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.mrpsg-patreon-cta p { color: var(--text-sec); max-width: 380px; margin-bottom: 24px; line-height: 1.6; }

.mrpsg-patreon-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #f96854;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background .1s;
}
.mrpsg-patreon-connect-btn:hover { background: #e05545; }

/* ── Empty states ─────────────────────────────────────────────────────────── */
.mrpsg-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-dim);
}

.mrpsg-empty-icon { font-size: 48px; margin-bottom: 12px; }
.mrpsg-empty h3 { font-size: 18px; font-weight: 700; color: var(--text-sec); margin-bottom: 6px; }
.mrpsg-empty p { font-size: 13px; }

/* ── Download Modal ───────────────────────────────────────────────────────── */
.mrpsg-dl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mrpsg-dl-modal {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  /* mobile: never overflow edge */
  width: min(420px, calc(100vw - 32px));
  box-shadow: 0 24px 64px rgba(0,0,0,.72), 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
}

/* ── Header ── */
.mrpsg-dl-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #2a2a2a;
}

.mrpsg-dl-modal-cover {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #2a2a2a;
}

.mrpsg-dl-modal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mrpsg-dl-modal-cover-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-dim);
}

.mrpsg-dl-modal-meta { min-width: 0; }
.mrpsg-dl-modal-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.mrpsg-dl-modal-artist { font-size: 13px; color: var(--text-sec); }

/* ── Credit meter ── */
.mrpsg-dl-credits { padding: 16px 18px 0; }

.mrpsg-dl-credits-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--text-sec);
  margin-bottom: 7px;
}

.mrpsg-dl-credits-label strong { color: var(--text); font-size: 13px; }

.mrpsg-dl-credits-bar {
  height: 6px; background: #2e2e2e; border-radius: 3px; overflow: hidden;
}

.mrpsg-dl-credits-fill { height: 100%; border-radius: 3px; transition: width .35s; }
.mrpsg-dl-credits-fill.c-ok   { background: #22c55e; }
.mrpsg-dl-credits-fill.c-low  { background: #f59e0b; }
.mrpsg-dl-credits-fill.c-last { background: #ef4444; }

/* Status notes under bar */
.mrpsg-dl-note {
  font-size: 11.5px;
  margin-top: 7px;
  line-height: 1.5;
}
.mrpsg-dl-note--warn  { color: #ef4444; }
.mrpsg-dl-note--amber { color: #f59e0b; }

/* ── Info rows ── */
.mrpsg-dl-info {
  padding: 14px 18px 0;
  display: flex; flex-direction: column; gap: 8px;
}

.mrpsg-dl-info-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}

.mrpsg-dl-info-label { color: var(--text-sec); }
.mrpsg-dl-info-value { color: var(--text); font-weight: 500; text-align: right; }

/* Persönliche Lizenz badge in info row */
.mrpsg-dl-info-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(232,93,38,.12);
  color: #ff7a45;
  border: 1px solid rgba(232,93,38,.22);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}

/* ── Lizenztext ── */
.mrpsg-dl-license {
  margin: 14px 18px 0;
  padding: 10px 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--text-sec);
  line-height: 1.6;
}

.mrpsg-dl-license strong { color: var(--text-dim); }

/* ── Persönliche Lizenzdatei Hinweis ── */
.mrpsg-dl-personal-note {
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 10px 18px 0;
  line-height: 1.5;
}

/* ── Aktionen ── */
.mrpsg-dl-modal-actions {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  margin-top: 14px;
  border-top: 1px solid #2a2a2a;
  background: #181818;
}

.mrpsg-dl-btn-cancel  { flex: 1; justify-content: center; min-height: 38px; }
.mrpsg-dl-btn-confirm { flex: 2; justify-content: center; min-height: 38px; }
.mrpsg-dl-btn-confirm:disabled { opacity: .38; pointer-events: none; }

/* Mobile: stack buttons vertically on very narrow screens */
@media (max-width: 400px) {
  .mrpsg-dl-modal-actions { flex-direction: column; }
  .mrpsg-dl-btn-cancel,
  .mrpsg-dl-btn-confirm { flex: none; width: 100%; }
}
.mrpsg-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: mrpsg-spin .5s linear infinite;
}

@keyframes mrpsg-spin { to { transform: rotate(360deg); } }

.mrpsg-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

/* ── Playing animation ────────────────────────────────────────────────────── */
.mrpsg-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.mrpsg-bars span {
  display: block;
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  animation: mrpsg-bar 1s ease infinite;
}

.mrpsg-bars span:nth-child(2) { animation-delay: .2s; }
.mrpsg-bars span:nth-child(3) { animation-delay: .4s; }

@keyframes mrpsg-bar {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

/* ── Sidebar user footer (Fix 4+5) ───────────────────────────────────────── */
.mrpsg-sidebar-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mrpsg-sf-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: var(--accent);
  font-weight: 700;
}

.mrpsg-sf-info { min-width: 0; flex: 1; }

.mrpsg-sf-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mrpsg-sf-tier {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 1px;
}

.mrpsg-sf-tier span {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 20px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
}

/* ── Responsive / Mobile (Fix 3) ─────────────────────────────────────────── */
@media (max-width: 700px) {
  :root { --player-h: 72px; }

  #mrpsg-app {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr var(--player-h);
    grid-template-areas:
      "main"
      "player";
  }

  #mrpsg-sidebar { display: none; }

  .mrpsg-topbar { padding: 8px 12px; }

  .mrpsg-content { padding: 0 12px 24px; }

  /* Track list: mobile 3-column (num | title+badges | menu) */
  .mrpsg-track-list-header,
  .mrpsg-track-row {
    grid-template-columns: 28px 1fr 28px;
    gap: 6px;
  }

  /* Hide desktop-only columns on mobile */
  .mrpsg-track-row .mrpsg-track-artist-col,
  .mrpsg-track-row .mrpsg-track-date,
  .mrpsg-track-row .mrpsg-col-early,
  .mrpsg-track-row .mrpsg-col-dl,
  .mrpsg-track-list-header .col-artist,
  .mrpsg-track-list-header .col-date,
  .mrpsg-track-list-header .col-early,
  .mrpsg-track-list-header .col-dl { display: none; }

  /* Show compact badges next to title on mobile */
  .mrpsg-title-badges { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 4px; }

  /* Artist grid 2 columns on mobile */
  .mrpsg-artist-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Hero smaller on mobile */
  .mrpsg-view-hero { flex-direction: column; gap: 14px; padding: 16px 0 12px; }
  .mrpsg-hero-art { width: 120px; height: 120px; }
  .mrpsg-hero-title { font-size: 24px; letter-spacing: -.5px; }
  .mrpsg-hero-actions { flex-wrap: wrap; }

  /* Player: hide volume on mobile */
  .mrpsg-player-extras { display: none; }

  /* Player: now-playing smaller */
  .mrpsg-now-playing-cover { width: 44px; height: 44px; }
  #mrpsg-player { padding: 0 10px; gap: 8px; }
}

/* ── Preview / Public Mode ─────────────────────────────────────────────────── */

/* Preview badge in player */
#mrpsg-app .mrpsg-badge--preview,
#mrpsg-player .mrpsg-badge--preview {
  background: rgba(251,146,60,.18);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,.35);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 20px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

#mrpsg-app .mrpsg-badge--preview-coming {
  background: rgba(148,163,184,.12);
  color: var(--text-dim, #94a3b8);
  border: 1px solid rgba(148,163,184,.25);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
}

/* Preview column badge */
#mrpsg-app .mrpsg-col-preview-badge {
  font-size: 11px;
  font-weight: 600;
  color: #fb923c;
  white-space: nowrap;
}

#mrpsg-app .mrpsg-col-preview-coming {
  font-size: 11px;
  color: var(--text-dim, #94a3b8);
  opacity: .65;
}

/* Public welcome banner */
.mrpsg-public-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(251,146,60,.07);
  border: 1px solid rgba(251,146,60,.22);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary, #cbd5e1);
  flex-wrap: wrap;
}

.mrpsg-public-banner-icon { font-size: 22px; flex-shrink: 0; }

.mrpsg-public-banner-text { flex: 1; min-width: 180px; line-height: 1.5; }
.mrpsg-public-banner-text strong { color: #fff; }

/* Sidebar public CTA */
.mrpsg-sf-public-cta {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mrpsg-sf-cta-text {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.mrpsg-sf-cta-sub {
  font-size: 11px;
  color: var(--text-dim, #64748b);
  margin-bottom: 4px;
}

/* Patreon-coloured buttons */
.mrpsg-btn-patreon-sm,
.mrpsg-btn-patreon-full {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f96854;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
  cursor: pointer;
  border: none;
}

.mrpsg-btn-patreon-sm:hover,
.mrpsg-btn-patreon-full:hover { background: #e55a47; }

.mrpsg-btn-patreon-full { width: 100%; justify-content: center; padding: 9px 14px; font-size: 13px; }

/* Unlock button in track row */
.mrpsg-track-unlock-btn {
  background: none;
  border: none;
  color: var(--text-dim, #64748b);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color .15s;
  line-height: 1;
}
.mrpsg-track-unlock-btn:hover { color: #fb923c; }

/* Locked modal */
.mrpsg-locked-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  backdrop-filter: blur(4px);
}

.mrpsg-locked-modal {
  background: #1a1a2e;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  margin: 16px;
  position: relative;
}

.mrpsg-locked-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-dim, #64748b);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
}
.mrpsg-locked-modal-close:hover { color: #fff; }

.mrpsg-locked-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.mrpsg-locked-modal-cover,
.mrpsg-locked-modal-cover img {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255,255,255,.07);
}

.mrpsg-locked-modal-cover-ph {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.mrpsg-locked-modal-song-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.mrpsg-locked-modal-song-artist {
  font-size: 13px;
  color: var(--text-secondary, #94a3b8);
  margin-top: 3px;
}

.mrpsg-locked-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.mrpsg-locked-modal-text {
  font-size: 13.5px;
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.6;
  margin-bottom: 20px;
}

.mrpsg-locked-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mrpsg-locked-modal-actions .mrpsg-btn-patreon-full {
  flex: 1;
  min-width: 130px;
}

.mrpsg-locked-modal-actions .mrpsg-btn-ghost {
  flex: 1;
  min-width: 100px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Preview Lyrics UI ─────────────────────────────────────────────────────── */

/* Banner inside the lyrics box */
.mr-lyrics-preview-banner {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  margin-bottom: 8px;
  background: rgba(251,146,60,.1);
  border: 1px solid rgba(251,146,60,.25);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fb923c;
  letter-spacing: .03em;
}

.mr-lyrics-preview-icon { font-size: 13px; }

/* "Preview not available" message */
.mr-lyrics-preview-unavail {
  display: block;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-dim, #94a3b8);
  font-style: italic;
  text-align: center;
}

/* Locked CTA shown at end of preview */
.mr-lyrics-preview-cta {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  margin-top: 10px;
  background: rgba(249,104,84,.07);
  border: 1px solid rgba(249,104,84,.22);
  border-radius: 10px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}

.mr-lyrics-preview-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mr-lyrics-cta-icon {
  font-size: 22px;
}

.mr-lyrics-cta-text {
  font-size: 12px;
  color: var(--text-secondary, #cbd5e1);
  line-height: 1.55;
}

.mr-lyrics-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f96854;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
}
.mr-lyrics-cta-btn:hover { background: #e55a47; }

/* ── Phase 2: Split Shuffle Button & Player Shuffle ───────────────────────── */

/* ── Shared dropdown items & separator ─────────────────────────────────── */
.mrpsg-sd-item {
  padding: 9px 16px;
  font-size: 13px;
  color: #cbd5e1;
  cursor: pointer;
  white-space: nowrap;
  transition: background .1s;
  display: flex;
  align-items: center;
  gap: 2px;
}
.mrpsg-sd-item:hover { background: rgba(255,255,255,.09); color: #fff; }
.mrpsg-sd-sep {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin: 4px 0;
}

/* ── Hero split-button (ghost style) ───────────────────────────────────── */
.mrpsg-split-shuffle {
  position: relative;
  display: inline-flex;
  align-items: stretch;
}

.mrpsg-split-shuffle__main {
  /* inherits mrpsg-btn-ghost */
  border-right: none !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.mrpsg-split-shuffle__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border, rgba(255,255,255,.15));
  border-left: none;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  cursor: pointer;
  color: var(--text-sec, #94a3b8);
  font-size: 12px;
  padding: 0 10px;
  transition: background .12s, color .12s;
  line-height: 1;
}
.mrpsg-split-shuffle__arrow:hover {
  background: rgba(255,255,255,.07);
  color: #fff;
}

.mrpsg-split-shuffle__menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #16182b;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 5px 0;
  min-width: 185px;
  z-index: 9000;
  box-shadow: 0 10px 32px rgba(0,0,0,.7);
}
.mrpsg-split-shuffle__menu.is-open { display: block; }

/* ── Player bar shuffle split ───────────────────────────────────────────── */
.mrpsg-player-shuffle-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* The main ⇄ is already mrpsg-ctrl-btn */

.mrpsg-player-shuffle-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-sec, #94a3b8);
  font-size: 10px;
  line-height: 1;
  width: 14px;
  height: 22px;
  padding: 0;
  margin-left: -3px;
  border-radius: 3px;
  transition: color .12s;
  flex-shrink: 0;
}
.mrpsg-player-shuffle-arrow:hover { color: #fff; }

.mrpsg-player-shuffle-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  background: #16182b;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  padding: 5px 0;
  min-width: 185px;
  z-index: 9000;
  box-shadow: 0 10px 32px rgba(0,0,0,.7);
}
.mrpsg-player-shuffle-menu.is-open { display: block; }

/* Radio label under artist name */
.mrpsg-radio-label {
  font-size: 10px;
  color: var(--text-dim, #64748b);
  letter-spacing: .04em;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  opacity: .8;
}

/* ── Phase 2.6: Queue View ─────────────────────────────────────────────────── */

/* Queue nav item — pulse when active radio mode */
.mrpsg-nav-queue {
  color: var(--accent, #a855f7) !important;
  font-weight: 600;
}
.mrpsg-nav-queue .mrpsg-nav-icon { font-size: 14px; }
.mrpsg-nav-queue-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

/* Hero art for queue view */
.mrpsg-hero-art--queue {
  background: linear-gradient(135deg, #1e1040 0%, #0d0d22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
}

/* Past-played rows in queue */
.mrpsg-queue-past {
  opacity: 0.4;
}
.mrpsg-queue-past .mrpsg-track-title,
.mrpsg-queue-past .mrpsg-track-artist {
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,.25);
}

/* Flow reason tags */
.col-reason {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 0 8px;
}

.mrpsg-reason-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(168,85,247,.12);
  color: #c084fc;
  border: 1px solid rgba(168,85,247,.25);
  white-space: nowrap;
  letter-spacing: .02em;
}

/* Admin: is-collapsed state — overrides inline display:block */
.mrpsg-admin-panel__body.is-collapsed { display: none !important; }
.mrpsg-admin-panel__arrow.is-collapsed { transform: rotate(-90deg); }

/* ── Queue View: separate grid with reason column ──────────────────────────── */
/* Override default 7-col grid for queue rows to fit an extra reason column    */
.mrpsg-queue-view .mrpsg-track-list-header,
.mrpsg-queue-view .mrpsg-track-row {
  /* #  | title | artist | reason       | date   | actions */
  grid-template-columns: 32px 1fr 110px minmax(120px,180px) 80px 32px;
}

/* Reason tags: wrap cleanly, no overflow into date */
.mrpsg-queue-view .col-reason {
  overflow: hidden;
  flex-wrap: wrap;
  gap: 3px;
  padding: 2px 4px;
  align-content: center;
}
.mrpsg-queue-view .mrpsg-reason-tag {
  font-size: 9px;
  padding: 1px 5px;
}

/* Allow tooltips to overflow track row bounds */
.mrpsg-queue-view .mrpsg-track-row {
  overflow: visible;
}
.mrpsg-queue-view .col-reason {
  overflow: visible;
  position: relative;
}
.mrpsg-queue-view .mrpsg-track-row .col-early,
.mrpsg-queue-view .mrpsg-track-list-header .col-dl,
.mrpsg-queue-view .mrpsg-track-row .col-dl { display: none; }

/* Mobile: collapse reason col */
@media (max-width: 700px) {
  .mrpsg-queue-view .mrpsg-track-list-header,
  .mrpsg-queue-view .mrpsg-track-row {
    grid-template-columns: 28px 1fr 28px;
  }
  .mrpsg-queue-view .col-reason,
  .mrpsg-queue-view .mrpsg-track-artist-col,
  .mrpsg-queue-view .mrpsg-track-date { display: none; }
}

/* ── Phase 2.6: Flow Badge + Tooltip ──────────────────────────────────────── */

/* Remove old multi-tag styles */
.mrpsg-reason-tag { display: none; }

/* Single flow badge */
.mrpsg-flow-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(168,85,247,.10);
  border: 1px solid rgba(168,85,247,.22);
  border-radius: 20px;
  color: #c084fc;
  font-size: 11px;
  font-weight: 600;
  cursor: default;
  user-select: none;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
  outline: none;
  max-width: 170px;
  z-index: 1;
}
.mrpsg-flow-badge:hover,
.mrpsg-flow-badge:focus,
.mrpsg-flow-badge.tt-open {
  background: rgba(168,85,247,.20);
  border-color: rgba(168,85,247,.45);
  z-index: 10001;
}

.mrpsg-flow-badge__emoji { font-size: 12px; line-height: 1; flex-shrink: 0; }
.mrpsg-flow-badge__label { overflow: hidden; text-overflow: ellipsis; }

/* Tooltip popup */
.mrpsg-flow-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  max-width: 88vw;
  background: #111122;
  border: 1px solid rgba(168,85,247,.28);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,.72);
  z-index: 9999;
  pointer-events: none;
  text-align: left;
}

/* Show on hover (desktop) */
.mrpsg-flow-badge:hover .mrpsg-flow-tooltip,
.mrpsg-flow-badge:focus .mrpsg-flow-tooltip,
.mrpsg-flow-badge.tt-open .mrpsg-flow-tooltip {
  display: block;
}

/* Tooltip arrow */
.mrpsg-flow-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(168,85,247,.28);
}

.mrpsg-tt-title {
  font-size: 12px;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 6px;
}
.mrpsg-tt-sep {
  height: 1px;
  background: rgba(168,85,247,.18);
  margin: 0 -4px 6px;
}
.mrpsg-tt-line {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* When tooltip would overflow top of viewport: flip below */
.mrpsg-queue-view .mrpsg-track-row:nth-child(-n+4) .mrpsg-flow-tooltip {
  top: calc(100% + 8px);
  bottom: auto;
}
.mrpsg-queue-view .mrpsg-track-row:nth-child(-n+4) .mrpsg-flow-tooltip::after {
  top: auto;
  bottom: 100%;
  border-top-color: transparent;
  border-bottom-color: rgba(168,85,247,.28);
}

/* Allow tooltip to escape content scroll container */
#mrpsg-content.mrpsg-queue-view {
  overflow-x: visible;
}

/* ── Phase 3: Flow Profiles UI ─────────────────────────────────────────────── */

/* Profile subtitle under queue title */
.mrpsg-queue-subtitle {
  font-size: 13px;
  color: var(--text-secondary, #cbd5e1);
  font-style: italic;
  margin: 3px 0 6px;
  opacity: .85;
}

/* Grouped menu item (non-clickable header) */
.mrpsg-sd-item--group {
  color: #a855f7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 16px 4px;
  cursor: default;
  pointer-events: none;
}
.mrpsg-sd-indent {
  padding-left: 26px;
  font-size: 12px;
}

/* Session metrics debug bar */
.mrpsg-session-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 4px;
  font-size: 10px;
  font-family: monospace;
}
.mrpsg-session-metrics span {
  padding: 2px 7px;
  background: rgba(255,255,255,.06);
  border-radius: 4px;
  color: #64748b;
}
.mrpsg-replay-low  { color: #22c55e !important; }
.mrpsg-replay-medium { color: #f59e0b !important; }
.mrpsg-replay-high { color: #ef4444 !important; }

/* ── Phase 4: Like / Favourite Buttons ────────────────────────────────────── */

.mrpsg-like-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
}

.mrpsg-like-btn,
.mrpsg-fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--text-dim, #64748b);
  transition: color .15s, transform .12s;
  line-height: 1;
}
.mrpsg-like-btn:hover { color: #e05a7b; }
.mrpsg-fav-btn:hover  { color: #f59e0b; }

/* Active: show filled emoji — emoji itself provides the color */
.mrpsg-like-btn.is-active { color: #e05a7b; }
.mrpsg-fav-btn.is-active  { color: #f59e0b; }

@keyframes mrpsg-glow-pulse {
  0%   { transform: scale(1.0); }
  40%  { transform: scale(1.4); }
  100% { transform: scale(1.0); }
}
.mrpsg-like-glow { animation: mrpsg-glow-pulse .5s ease; color: #e05a7b !important; }
.mrpsg-fav-glow  { animation: mrpsg-glow-pulse .5s ease; color: #f59e0b !important; }

/* Mini like/fav in Lieblingssongs view */
.mrpsg-like-mini,
.mrpsg-fav-mini {
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  opacity: .35;
  transition: opacity .15s;
  display: inline-block;
}
.mrpsg-like-mini:hover, .mrpsg-like-mini.is-active { opacity: 1; color: #e05a7b; }
.mrpsg-fav-mini:hover,  .mrpsg-fav-mini.is-active  { opacity: 1; color: #f59e0b; }

/* Lieblingssongs section headers */
.mrpsg-section { margin-bottom: 32px; }
.mrpsg-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary, #94a3b8);
  margin-bottom: 8px;
  padding: 0 8px;
}

/* ── Phase 3: Personalised Homepage ──────────────────────────────────────── */

.mrpsg-home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 8px 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.mrpsg-home-greeting {
  font-size: 22px;
  font-weight: 700;
  color: var(--text, #fff);
  letter-spacing: -.02em;
}
.mrpsg-home-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.mrpsg-home-section { margin-bottom: 32px; }

/* Horizontal scroll row */
.mrpsg-home-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
  -webkit-overflow-scrolling: touch;
}
.mrpsg-home-row::-webkit-scrollbar { height: 4px; }
.mrpsg-home-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }

/* Home card */
.mrpsg-home-card {
  flex: 0 0 148px;
  background: var(--card, rgba(255,255,255,.04));
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .14s, background .14s;
  position: relative;
}
.mrpsg-home-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.08); }

.mrpsg-home-card__cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(255,255,255,.05);
  overflow: hidden;
}
.mrpsg-home-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mrpsg-home-card__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 32px; }

.mrpsg-home-card__badge {
  position: absolute;
  top: 6px; left: 6px;
  background: var(--accent, #a855f7);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.mrpsg-home-card__info { padding: 8px 10px 4px; }
.mrpsg-home-card__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #fff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mrpsg-home-card__artist {
  font-size: 11px;
  color: var(--text-dim, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.mrpsg-home-card__actions {
  display: flex;
  gap: 4px;
  padding: 4px 8px 8px;
}

@media (max-width: 480px) {
  .mrpsg-home-card { flex: 0 0 124px; }
  .mrpsg-home-greeting { font-size: 18px; }
}

/* ════════════════════════════════════════════════════════════════════════
/* ════════════════════════════════════════════════════════════════════════
/* ════════════════════════════════════════════════════════════════════════
/* ════════════════════════════════════════════════════════════════════════
/* ════════════════════════════════════════════════════════════════════════
/* ════════════════════════════════════════════════════════════════════════
/* ════════════════════════════════════════════════════════════════════════
   ATMOSPHERE ENGINE – v2.6.6
   Echte Farben + stärkere Ambient-Wirkung
   ════════════════════════════════════════════════════════════════════════ */

.mrpsg-hero-atm {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 52px;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  background: #0a071a;
  isolation: isolate;
}

/* Basis-Farbhalo – nutzt jetzt sichtbare Flow-Farben */
.mrpsg-hero-atm::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 100% at 105% 115%,
      color-mix(in srgb, var(--atm-c2, #3d1278) 38%, transparent) 0%,
      transparent 55%),
    radial-gradient(ellipse 50% 60% at -5% -5%,
      color-mix(in srgb, var(--atm-c2, #3d1278) 14%, transparent) 0%,
      transparent 50%);
  pointer-events: none;
}

/* Nebel-Glow mit echten Farbtönen */
.mrpsg-hero-atm__glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 58% 72% at 68% 18%,
      color-mix(in srgb, var(--atm-c2, #3d1278) 25%, transparent) 0%,
      transparent 58%),
    radial-gradient(ellipse 38% 50% at 8% 88%,
      color-mix(in srgb, var(--atm-c2, #3d1278) 12%, transparent) 0%,
      transparent 50%);
  animation: mrpsg-nebula 14s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes mrpsg-nebula {
  from { opacity: .65; transform: scale(1) translateX(0); }
  to   { opacity: 1;   transform: scale(1.08) translateX(-7px); }
}

.mrpsg-hero-atm::after {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; border-radius: inherit;
}

/* ─── MORGEN (5–11h) ─── goldener Aufgangs-Glow ─── */
.mrpsg-hero-atm[data-time="morning"]::after {
  background:
    radial-gradient(ellipse 70% 55% at 4% 102%,
      rgba(215,135,22,.42) 0%,
      rgba(190,85,8,.20)   28%,
      transparent           60%),
    radial-gradient(ellipse 35% 28% at 0% 108%,
      rgba(255,195,70,.22) 0%,
      transparent           48%);
  animation: mrpsg-morning 18s ease-in-out infinite alternate;
}
@keyframes mrpsg-morning {
  from { opacity: .6; transform: translateY(0) scale(1); }
  to   { opacity: 1;  transform: translateY(-10px) scale(1.06); }
}

/* ─── TAG (11–17h) ─── diffuses Licht von oben ─── */
.mrpsg-hero-atm[data-time="day"]::after {
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%,
      rgba(140,175,200,.28) 0%,
      rgba(100,140,170,.12) 35%,
      transparent            55%);
  animation: mrpsg-day 22s ease-in-out infinite alternate;
}
@keyframes mrpsg-day {
  from { opacity: .6;  transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.06) translateX(6px); }
}

/* ─── ABEND (17–21h) ─── Dämmerung am Unterrand ─── */
.mrpsg-hero-atm[data-time="evening"]::after {
  background:
    radial-gradient(ellipse 75% 55% at 48% 112%,
      rgba(175,68,25,.40) 0%,
      rgba(110,32,62,.22)  40%,
      transparent           63%),
    radial-gradient(ellipse 32% 32% at 90% 96%,
      rgba(130,42,82,.18) 0%,
      transparent           44%);
  animation: mrpsg-evening 16s ease-in-out infinite alternate;
}
@keyframes mrpsg-evening {
  from { opacity: .6; transform: scale(1) translateX(0); }
  to   { opacity: 1;  transform: scale(1.07) translateX(-5px); }
}

/* ─── NACHT (21–5h) ─── Mondglow + Violett-Nebel ─── */
.mrpsg-hero-atm[data-time="night"]::after {
  background:
    radial-gradient(ellipse 34% 26% at 88% 6%,
      rgba(195,205,255,.22) 0%,
      rgba(110,120,215,.10) 36%,
      transparent            66%),
    radial-gradient(ellipse 65% 55% at 80% 0%,
      rgba(70,38,145,.20) 0%,
      transparent          54%),
    radial-gradient(ellipse 42% 32% at 14% 88%,
      rgba(28,14,75,.18) 0%,
      transparent         50%);
  animation: mrpsg-night 20s ease-in-out infinite alternate;
}
@keyframes mrpsg-night {
  from { opacity: .6;  transform: scale(1) translateY(0); }
  to   { opacity: 1;   transform: scale(1.06) translateY(-7px); }
}

@media (prefers-reduced-motion: reduce) {
  .mrpsg-hero-atm__glow, .mrpsg-hero-atm::after { animation: none !important; }
  .mrpsg-hero-atm[data-time="morning"]::after { opacity: .75; }
  .mrpsg-hero-atm[data-time="day"]::after     { opacity: .70; }
  .mrpsg-hero-atm[data-time="evening"]::after { opacity: .75; }
  .mrpsg-hero-atm[data-time="night"]::after   { opacity: .75; }
}

/* Content immer vorne */
.mrpsg-hero-atm__content {
  position: relative; z-index: 1;
  padding: 30px 30px 28px; width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,.42) 0%, transparent 100%);
}
.mrpsg-hero-atm__icon {
  font-size: 30px; line-height: 1; margin-bottom: 11px;
  filter: drop-shadow(0 0 12px color-mix(in srgb, var(--atm-c2, #3d1278) 80%, transparent));
  opacity: .92;
}
.mrpsg-hero-atm__title {
  font-size: 25px; font-weight: 700; color: rgba(255,255,255,.92);
  line-height: 1.2; margin: 0 0 9px; letter-spacing: -.025em;
}
.mrpsg-hero-atm__sub {
  font-size: 12px; color: rgba(255,255,255,.46);
  margin: 0 0 22px; max-width: 440px; line-height: 1.7;
}
.mrpsg-hero-atm__actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ── Flow Picker ─────────────────────────────────────────────────────── */
.mrpsg-flow-picker {
  display: flex; gap: 7px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 52px;
  scrollbar-width: none;
  mask-image: linear-gradient(to right, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 88%, transparent 100%);
}
.mrpsg-flow-picker::-webkit-scrollbar { display: none; }
.mrpsg-flow-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px; flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--pill-c2, #3d1278) 42%, rgba(255,255,255,.08));
  background: color-mix(in srgb, var(--pill-c2, #3d1278) 18%, rgba(255,255,255,.04));
  color: rgba(255,255,255,.72); font-size: 11px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .12s;
}
.mrpsg-flow-pill:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--pill-c2, #3d1278) 32%, rgba(255,255,255,.09));
  border-color: color-mix(in srgb, var(--pill-c2, #3d1278) 68%, rgba(255,255,255,.20));
  color: rgba(255,255,255,.96);
}
.mrpsg-flow-pill__icon { font-size: 14px; opacity: .88; }
.mrpsg-flow-pill__label { font-size: 10px; }

/* ── Sections ────────────────────────────────────────────────────────── */
.mrpsg-home-section { margin-bottom: 52px; }
.mrpsg-section-header {
  display: flex; align-items: baseline;
  justify-content: space-between;
  margin: 0 0 16px; padding-top: 2px;
}
.mrpsg-section-header--worlds { margin-top: 52px; margin-bottom: 18px; }

/* ── Home Cards ──────────────────────────────────────────────────────── */
.mrpsg-home-row {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent;
  -webkit-overflow-scrolling: touch;
}
.mrpsg-home-row::-webkit-scrollbar { height: 3px; }
.mrpsg-home-row::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }
.mrpsg-home-card {
  flex: 0 0 160px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; overflow: hidden; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .15s;
}
.mrpsg-home-card:hover {
  transform: translateY(-3px); background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.11); box-shadow: 0 10px 30px rgba(0,0,0,.48);
}
.mrpsg-home-card__cover { position: relative; width: 100%; aspect-ratio: 1/1; background: rgba(255,255,255,.04); overflow: hidden; }
.mrpsg-home-card__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mrpsg-home-card:hover .mrpsg-home-card__cover img { transform: scale(1.04); }
.mrpsg-home-card__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 30px; opacity: .4; }
.mrpsg-home-card__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.1) 40%, transparent 70%); pointer-events: none; }
.mrpsg-home-card__badge { position: absolute; top: 6px; left: 6px; background: rgba(168,85,247,.85); color: rgba(255,255,255,.95); font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 3px; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(4px); }
.mrpsg-home-card__info { padding: 10px 12px 6px; }
.mrpsg-home-card__title { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
.mrpsg-home-card__artist { font-size: 10px; color: rgba(255,255,255,.42); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.mrpsg-home-card__actions { display: flex; gap: 3px; padding: 4px 10px 9px; }

/* ── Mood Grid ───────────────────────────────────────────────────────── */
.mrpsg-mood-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(182px, 1fr)); gap: 16px; margin-top: 0; margin-bottom: 56px; }
.mrpsg-mood-card { position: relative; border-radius: 12px; overflow: hidden; padding: 28px 22px 22px; cursor: pointer; background: linear-gradient(145deg, color-mix(in srgb, var(--mc, #3d1278) 14%, #0a0812) 0%, #0a0812 100%); border: 1px solid color-mix(in srgb, var(--mc, #3d1278) 28%, rgba(255,255,255,.05)); transition: transform .16s, box-shadow .16s, border-color .16s; min-height: 156px; display: flex; align-items: flex-end; }
.mrpsg-mood-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px color-mix(in srgb, var(--mc, #3d1278) 24%, rgba(0,0,0,.62)); border-color: color-mix(in srgb, var(--mc, #3d1278) 45%, rgba(255,255,255,.09)); }
.mrpsg-mood-card__glow { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 50% at 50% -10%, color-mix(in srgb, var(--mc) 22%, transparent) 0%, transparent 70%); pointer-events: none; transition: opacity .2s; }
.mrpsg-mood-card:hover .mrpsg-mood-card__glow { opacity: 1.5; }
.mrpsg-mood-card__body { position: relative; z-index: 1; width: 100%; }
.mrpsg-mood-card__icon { font-size: 26px; line-height: 1; margin-bottom: 11px; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--mc) 48%, transparent)); }
.mrpsg-mood-card__label { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9); margin-bottom: 7px; letter-spacing: -.01em; }
.mrpsg-mood-card__desc { font-size: 10px; color: rgba(255,255,255,.4); line-height: 1.65; font-style: italic; }

/* ── Universe ────────────────────────────────────────────────────────── */
.mrpsg-universe-section { margin-top: 16px; margin-bottom: 52px; background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.045); border-radius: 12px; padding: 22px 24px; }
.mrpsg-universe-section .mrpsg-section-header { margin-bottom: 16px; padding-top: 0; }
.mrpsg-universe-blurb { display: flex; align-items: flex-start; gap: 13px; padding: 12px 0; font-size: 13px; color: rgba(255,255,255,.4); border-bottom: 1px solid rgba(255,255,255,.04); line-height: 1.75; letter-spacing: .005em; font-style: italic; }
.mrpsg-universe-blurb:last-child { border-bottom: none; padding-bottom: 0; }
.mrpsg-universe-blurb:first-child { padding-top: 0; }
.mrpsg-universe-icon { color: rgba(168,85,247,.55); font-size: 11px; flex-shrink: 0; margin-top: 5px; }
.mrpsg-home-fallback { font-size: 11px; color: rgba(255,255,255,.2); text-align: center; padding: 8px; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .mrpsg-hero-atm { min-height: 155px; margin-bottom: 32px; }
  .mrpsg-hero-atm__content { padding: 20px 18px 18px; }
  .mrpsg-hero-atm__title { font-size: 20px; }
  .mrpsg-hero-atm__sub { display: none; }
  .mrpsg-flow-picker { margin-bottom: 32px; }
  .mrpsg-home-section { margin-bottom: 32px; }
  .mrpsg-section-header--worlds { margin-top: 32px; }
  .mrpsg-mood-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 36px; }
  .mrpsg-home-card { flex: 0 0 134px; }
  .mrpsg-universe-section { margin-bottom: 32px; }
}

/* ════════════════════════════════════════════════════════════════════════
   HERO FINAL OVERRIDES — v2.6.7
   Alle Werte mit spezifischem Selektor + !important gesetzt,
   damit keine generischen Regeln sie überschreiben können.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1. Hero Grundlayout ─────────────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm {
  position: relative !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  min-height: 200px !important;
  display: flex !important;
  align-items: flex-end !important;
  isolation: isolate !important;
  margin-bottom: 48px !important;
  background: #0a071a !important;
}

/* ── 2. Pseudo-Elemente absichern ────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm::before,
#mrpsg-app .mrpsg-hero-atm::after {
  content: "" !important;
  position: absolute !important;
  pointer-events: none !important;
  border-radius: inherit;
}

/* ── 3. Glow mit mix-blend-mode: screen für echte Sichtbarkeit ────────
   mix-blend-mode: screen macht den Glow auf dunklem Hintergrund
   tatsächlich leuchtend sichtbar, ohne den Hintergrund aufzuhellen.
   ──────────────────────────────────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm .mrpsg-hero-atm__glow {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1 !important;
  pointer-events: none !important;
  mix-blend-mode: screen !important;
  filter: blur(18px) !important;
  opacity: 0.75 !important;
  animation: mrpsg-nebula 14s ease-in-out infinite alternate !important;
}

/* Morgen (5–11h): warmer goldener Aufstieg */
#mrpsg-app .mrpsg-hero-atm[data-time="morning"] .mrpsg-hero-atm__glow {
  background: radial-gradient(
    circle at 20% 70%,
    rgba(255,180,80,.55) 0%,
    rgba(255,120,60,.28) 28%,
    transparent           62%
  ) !important;
  opacity: 0.70 !important;
}

/* Tag (11–17h): sanftes Tageslicht von oben */
#mrpsg-app .mrpsg-hero-atm[data-time="day"] .mrpsg-hero-atm__glow {
  background: radial-gradient(
    ellipse 70% 45% at 50% -5%,
    rgba(150,195,220,.40) 0%,
    rgba(110,160,185,.20) 35%,
    transparent            58%
  ) !important;
  opacity: 0.50 !important;
}

/* Abend (17–21h): orange-violette Dämmerung */
#mrpsg-app .mrpsg-hero-atm[data-time="evening"] .mrpsg-hero-atm__glow {
  background: radial-gradient(
    circle at 55% 100%,
    rgba(220,85,30,.52) 0%,
    rgba(150,35,80,.28) 32%,
    transparent          60%
  ) !important;
  opacity: 0.75 !important;
}

/* Nacht (21–5h): kühler Mondglow */
#mrpsg-app .mrpsg-hero-atm[data-time="night"] .mrpsg-hero-atm__glow {
  background: radial-gradient(
    ellipse 35% 28% at 86% 8%,
    rgba(200,215,255,.42) 0%,
    rgba(120,130,220,.18) 35%,
    transparent            65%
  ),
  radial-gradient(
    ellipse 55% 48% at 80% 0%,
    rgba(80,45,165,.30) 0%,
    transparent          52%
  ) !important;
  opacity: 0.45 !important;
}

/* ── 4. Content über Glow ────────────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm__content {
  position: relative !important;
  z-index: 3 !important;
  padding: 26px 24px 22px !important;
  width: 100% !important;
  background: linear-gradient(to top, rgba(0,0,0,.38) 0%, transparent 100%) !important;
}

/* ── 5. Icon ─────────────────────────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm__icon {
  font-size: 30px !important;
  line-height: 1 !important;
  margin: 0 0 10px !important;
  opacity: 0.92 !important;
  filter: drop-shadow(0 0 12px rgba(255,255,255,.25)) !important;
  display: block !important;
}

/* ── 6. Titel ────────────────────────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm__title {
  font-size: 25px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin: 0 0 8px !important;
  letter-spacing: -0.025em !important;
  color: rgba(255,255,255,.92) !important;
}

/* ── 7. Subtext ──────────────────────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm__sub {
  font-size: 12px !important;
  line-height: 1.7 !important;
  max-width: 440px !important;
  margin: 0 0 20px !important;
  color: rgba(255,255,255,.46) !important;
}

/* ── 8. Actions / Buttons ────────────────────────────────────────────── */

#mrpsg-app .mrpsg-hero-atm__actions {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  padding-bottom: 2px !important;
}

#mrpsg-app .mrpsg-btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: var(--accent, #a855f7) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 24px !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: opacity .15s !important;
}
#mrpsg-app .mrpsg-btn-primary:hover { opacity: .85 !important; }

#mrpsg-app .mrpsg-btn-ghost {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: transparent !important;
  color: rgba(255,255,255,.65) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 24px !important;
  padding: 7px 13px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: border-color .15s, color .15s !important;
}
#mrpsg-app .mrpsg-btn-ghost:hover {
  border-color: rgba(255,255,255,.32) !important;
  color: rgba(255,255,255,.9) !important;
}

/* ── prefers-reduced-motion: Animationen stoppen ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #mrpsg-app .mrpsg-hero-atm .mrpsg-hero-atm__glow {
    animation: none !important;
  }
}

/* ── Save Queue Modal ─────────────────────────────────────────────────── */

.mrpsg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(0,0,0,.72);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  animation: mrpsg-fade-in .18s ease;
}
@keyframes mrpsg-fade-in { from { opacity: 0; } to { opacity: 1; } }

.mrpsg-modal {
  width: min(460px, calc(100vw - 32px));
  background: #0f0c20;
  border: 1px solid rgba(168,85,247,.22);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.8);
  animation: mrpsg-slide-up .2s ease;
}
@keyframes mrpsg-slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mrpsg-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.mrpsg-modal__title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
}
.mrpsg-modal__close {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  font-size: 15px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .12s;
}
.mrpsg-modal__close:hover { color: rgba(255,255,255,.8); }

.mrpsg-modal__body { padding: 16px 20px; }

.mrpsg-modal__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
  margin-top: 12px;
}
.mrpsg-modal__label:first-child { margin-top: 0; }
.mrpsg-modal__opt { text-transform: none; font-weight: 400; opacity: .6; }

.mrpsg-modal__input {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 9px 12px;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color .15s;
}
.mrpsg-modal__input:focus { border-color: rgba(168,85,247,.5); }
.mrpsg-modal__textarea { resize: vertical; min-height: 56px; }

.mrpsg-modal__meta {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(255,255,255,.32);
  font-style: italic;
}

.mrpsg-modal__actions {
  display: flex;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* Save queue button + hint in queue header */
.mrpsg-save-queue-hint {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  align-self: center;
  margin-left: 4px;
}

/* ════════════════════════════════════════════════════════════════════════
   HERO GLOW TERMINAL OVERRIDE — v2.6.9
   Diese Regeln stehen zuletzt und können nicht überschrieben werden.
   ════════════════════════════════════════════════════════════════════════ */

/* Basis: alle Glows bekommen screen + blur */
#mrpsg-app .mrpsg-hero-atm .mrpsg-hero-atm__glow {
  position: absolute !important;
  inset: 0 !important;
  z-index: 2 !important;
  pointer-events: none !important;
  mix-blend-mode: screen !important;
  filter: blur(18px) !important;
  opacity: 0.75 !important;
  animation: mrpsg-nebula 14s ease-in-out infinite alternate !important;
  background: radial-gradient(
    circle at 40% 60%,
    rgba(168, 85, 247, 0.35) 0%,
    transparent 60%
  ) !important;
}

/* MORGEN (5–11h) */
#mrpsg-app .mrpsg-hero-atm[data-time="morning"] .mrpsg-hero-atm__glow {
  background: radial-gradient(
    circle at 20% 70%,
    rgba(255, 180, 80, 0.55) 0%,
    rgba(255, 120, 60, 0.28) 28%,
    transparent 62%
  ) !important;
  opacity: 0.72 !important;
}

/* TAG (11–17h) */
#mrpsg-app .mrpsg-hero-atm[data-time="day"] .mrpsg-hero-atm__glow {
  background: radial-gradient(
    ellipse 75% 50% at 50% -5%,
    rgba(160, 210, 235, 0.42) 0%,
    rgba(120, 175, 200, 0.22) 35%,
    transparent 58%
  ) !important;
  opacity: 0.50 !important;
}

/* ABEND (17–21h) */
#mrpsg-app .mrpsg-hero-atm[data-time="evening"] .mrpsg-hero-atm__glow {
  background: radial-gradient(
    circle at 55% 100%,
    rgba(230, 90, 30, 0.55) 0%,
    rgba(165, 40, 90, 0.30) 32%,
    transparent 60%
  ) !important;
  opacity: 0.78 !important;
}

/* NACHT (21–5h) */
#mrpsg-app .mrpsg-hero-atm[data-time="night"] .mrpsg-hero-atm__glow {
  background:
    radial-gradient(
      ellipse 38% 30% at 86% 7%,
      rgba(205, 220, 255, 0.44) 0%,
      rgba(130, 140, 225, 0.20) 34%,
      transparent 65%
    ),
    radial-gradient(
      ellipse 55% 48% at 78% 0%,
      rgba(90, 52, 180, 0.32) 0%,
      transparent 52%
    ) !important;
  opacity: 0.48 !important;
}

/* Stop all animations when reduced-motion is preferred */
@media (prefers-reduced-motion: reduce) {
  #mrpsg-app .mrpsg-hero-atm .mrpsg-hero-atm__glow {
    animation: none !important;
    opacity: 0.65 !important;
  }
}
