/* Keep the filter toolbar out of the renderer-owned Rankings playlist. */
#ranking-filter-mount { position:relative; z-index:5; margin:0 10px; }
#ranking-filter-mount[hidden], body.reading #ranking-filter-mount { display:none !important; }
body:not(.reading) #playlist { height:calc(100vh - var(--ranking-playlist-height-offset) - var(--tr-ranking-filter-height,0px)); }
#playlist .track.tr-ranking-filter-hidden { display:none !important; }
#playlist .tr-ranking-filter-group-status {
  grid-column:1 / -1; margin:0; padding:10px 12px;
  color:#a8bcc8; font-family:var(--tr-type-family,"IBM Plex Sans",sans-serif);
  font-size:var(--tr-type-meta-size,12px); line-height:18px; font-weight:400;
  letter-spacing:normal; text-transform:none;
}
html[data-reading-theme="light"] #playlist .tr-ranking-filter-group-status { color:#516d7b; }

/* Reuse the header's existing inset space for the applied filter population. */
#playlist .group-header.has-ranking-filter-badge { padding-top:12px; padding-bottom:4px; }
#playlist .group-header.has-ranking-filter-badge .cap-subtitle { margin-top:6px; }
#playlist .group-header .tr-ranking-filter-badge {
  box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center;
  vertical-align:top; width:max-content; max-width:calc(100% - 48px); min-height:20px;
  margin:4px 3px 0; padding:3px 9px; gap:5px;
  background:#15352f; color:#a3d4ca; border:0; border-radius:0;
  clip-path:polygon(5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px),0 5px);
  font-family:var(--tr-type-family,"IBM Plex Sans",Plex,system-ui,sans-serif);
  font-size:11px; line-height:14px; font-weight:var(--tr-type-label-weight,500);
  letter-spacing:normal; text-transform:none; text-align:center;
}
#playlist .tr-ranking-filter-badge > svg {
  flex:none; width:12px; height:12px; fill:none; stroke:currentColor;
  stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
#playlist .tr-ranking-filter-badge__copy { display:flex; flex-wrap:wrap; justify-content:center; gap:0 5px; min-width:0; }
#playlist .tr-ranking-filter-badge__criterion { white-space:nowrap; }
/* Keep the original unlock cue and its action; short badges share its line. */
#playlist .group-header.has-ranking-filter-badge .lock-pill { display:inline-flex; vertical-align:top; margin:4px 3px 0; }
html[data-reading-theme="light"] #playlist .group-header .tr-ranking-filter-badge { background:#d9eee8; color:#286e66; }
