:root {
  --bg: #080808;
  --surface: #070708;
  --surface-2: #0f1013;
  --line: rgb(24, 44, 30);
  --text: #e8ecf2;
  --muted: rgb(72, 173, 86);
  --white: #ffffff;
  --grey: #777c8b;
  --accent: rgb(29, 185, 84); 
  --action: rgb(26, 145, 67);
  --darkG: rgb(22, 102, 50);
  --blackG: rgb(14, 39, 27);
  --yellow: #d29922;
  --red: #da3633;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --np-art: 340px;
  --fast: .12s ease;
  --scndry1: rgb(155, 165, 175);
  --scndry2: rgb(110, 120, 130);
  --scndry3: rgb(70, 78, 86);
  --scndry4: rgb(22, 26, 30);
  --darkGrad: linear-gradient(135deg, var(--surface-2), var(--bg));
  --darkGrad2: linear-gradient(135deg, var(--bg), var(--surface-2));
  --primaryGrad: linear-gradient(135deg, var(--accent), var(--action));
  --secondaryGrad: linear-gradient(135deg, var(--scndry1), var(--scndry2));
  --backgroundGrad: linear-gradient(90deg, var(--surface), color-mix(in srgb, var(--scndry4) 50%, transparent), var(--surface)),
    var(--surface);
  --backgroundGrad2: linear-gradient(90deg, var(--scndry4), color-mix(in srgb, var(--surface) 50%, transparent), var(--scndry4)),
    var(--surface);
  --backgroundGrad3: linear-gradient(90deg, var(--darkG), color-mix(in srgb, var(--surface) 50%, transparent), var(--darkG)),
    var(--surface);
  --backgroundGrad4: linear-gradient(90deg, var(--darkG), color-mix(in srgb, var(--surface) 50%, transparent), var(--scndry4)),
  var(--surface);
}

@keyframes ani-your_css_selector_here {
    0% {
        --x-0: 93%;
        --y-0: 93%;
        --s-start-0: 14.489998991212337%;
        --s-end-0: 72%;
        --x-1: 26%;
        --y-1: 9%;
        --s-start-1: 0%;
        --s-end-1: 45%;
        --x-2: 15%;
        --y-2: 79%;
        --s-start-2: 2.9253667596993065%;
        --s-end-2: 22.388851682060018%;
        --x-3: 40%;
        --y-3: 104%;
        --s-start-3: 3.985353824694249%;
        --s-end-3: 47.580278608924694%;
        --x-4: 0%;
        --y-4: 60%;
        --s-start-4: 2.391200382592061%;
        --s-end-4: 29.307684556768592%;
        --x-5: 92%;
        --y-5: 37%;
        --s-start-5: 2.9253667596993065%;
        --s-end-5: 22.388851682060018%;
        --x-6: 101%;
        --y-6: 16%;
        --s-start-6: 13.173642363290591%;
        --s-end-6: 31.747336520355095%;
        --x-7: 90%;
        --y-7: 13%;
        --s-start-7: 1%;
        --s-end-7: 31%;
        --x-8: 104%;
        --y-8: 56%;
        --s-start-8: 3.985353824694249%;
        --s-end-8: 13.103042116379756%;
        --x-9: 97%;
        --y-9: 19%;
        --s-start-9: 18.597054544690312%;
        --s-end-9: 31%;
    }

    100% {
        --x-0: 7%;
        --y-0: 9%;
        --s-start-0: 2.391200382592061%;
        --s-end-0: 43.902064173373226%;
        --x-1: 96%;
        --y-1: 93%;
        --s-start-1: 9%;
        --s-end-1: 54.805582404585024%;
        --x-2: -2%;
        --y-2: 103%;
        --s-start-2: 3%;
        --s-end-2: 26.722813338714598%;
        --x-3: 33%;
        --y-3: 82%;
        --s-start-3: 2.391200382592061%;
        --s-end-3: 32.0689540200964%;
        --x-4: 37%;
        --y-4: 81%;
        --s-start-4: 4.40642490323111%;
        --s-end-4: 37.23528104246256%;
        --x-5: 54%;
        --y-5: 99%;
        --s-start-5: 3%;
        --s-end-5: 32.537089799783296%;
        --x-6: 104%;
        --y-6: 43%;
        --s-start-6: 6%;
        --s-end-6: 42.501105312974815%;
        --x-7: 104%;
        --y-7: -16%;
        --s-start-7: 5%;
        --s-end-7: 13.10107024898374%;
        --x-8: 97%;
        --y-8: 30%;
        --s-start-8: 2.391200382592061%;
        --s-end-8: 27.141813016850573%;
        --x-9: 78%;
        --y-9: 4%;
        --s-start-9: 5%;
        --s-end-9: 21.32164536610654%;
    }
}

/* Retain property definitions only for coordinates/percentages so animation works smoothly */
@property --x-0 { syntax: '<percentage>'; inherits: false; initial-value: 93%; }
@property --y-0 { syntax: '<percentage>'; inherits: false; initial-value: 93%; }
@property --s-start-0 { syntax: '<percentage>'; inherits: false; initial-value: 14.49%; }
@property --s-end-0 { syntax: '<percentage>'; inherits: false; initial-value: 72%; }

@property --x-1 { syntax: '<percentage>'; inherits: false; initial-value: 26%; }
@property --y-1 { syntax: '<percentage>'; inherits: false; initial-value: 9%; }
@property --s-start-1 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --s-end-1 { syntax: '<percentage>'; inherits: false; initial-value: 45%; }

@property --x-2 { syntax: '<percentage>'; inherits: false; initial-value: 15%; }
@property --y-2 { syntax: '<percentage>'; inherits: false; initial-value: 79%; }
@property --s-start-2 { syntax: '<percentage>'; inherits: false; initial-value: 2.93%; }
@property --s-end-2 { syntax: '<percentage>'; inherits: false; initial-value: 22.39%; }

@property --x-3 { syntax: '<percentage>'; inherits: false; initial-value: 40%; }
@property --y-3 { syntax: '<percentage>'; inherits: false; initial-value: 104%; }
@property --s-start-3 { syntax: '<percentage>'; inherits: false; initial-value: 3.99%; }
@property --s-end-3 { syntax: '<percentage>'; inherits: false; initial-value: 47.58%; }

@property --x-4 { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
@property --y-4 { syntax: '<percentage>'; inherits: false; initial-value: 60%; }
@property --s-start-4 { syntax: '<percentage>'; inherits: false; initial-value: 2.39%; }
@property --s-end-4 { syntax: '<percentage>'; inherits: false; initial-value: 29.31%; }

@property --x-5 { syntax: '<percentage>'; inherits: false; initial-value: 92%; }
@property --y-5 { syntax: '<percentage>'; inherits: false; initial-value: 37%; }
@property --s-start-5 { syntax: '<percentage>'; inherits: false; initial-value: 2.93%; }
@property --s-end-5 { syntax: '<percentage>'; inherits: false; initial-value: 22.39%; }

@property --x-6 { syntax: '<percentage>'; inherits: false; initial-value: 101%; }
@property --y-6 { syntax: '<percentage>'; inherits: false; initial-value: 16%; }
@property --s-start-6 { syntax: '<percentage>'; inherits: false; initial-value: 13.17%; }
@property --s-end-6 { syntax: '<percentage>'; inherits: false; initial-value: 31.75%; }

@property --x-7 { syntax: '<percentage>'; inherits: false; initial-value: 90%; }
@property --y-7 { syntax: '<percentage>'; inherits: false; initial-value: 13%; }
@property --s-start-7 { syntax: '<percentage>'; inherits: false; initial-value: 1%; }
@property --s-end-7 { syntax: '<percentage>'; inherits: false; initial-value: 31%; }

@property --x-8 { syntax: '<percentage>'; inherits: false; initial-value: 104%; }
@property --y-8 { syntax: '<percentage>'; inherits: false; initial-value: 56%; }
@property --s-start-8 { syntax: '<percentage>'; inherits: false; initial-value: 3.99%; }
@property --s-end-8 { syntax: '<percentage>'; inherits: false; initial-value: 13.10%; }

@property --x-9 { syntax: '<percentage>'; inherits: false; initial-value: 97%; }
@property --y-9 { syntax: '<percentage>'; inherits: false; initial-value: 19%; }
@property --s-start-9 { syntax: '<percentage>'; inherits: false; initial-value: 18.60%; }
@property --s-end-9 { syntax: '<percentage>'; inherits: false; initial-value: 31%; }

html {
    background-color: var(--bg);
    background-image: 
        radial-gradient(circle at var(--x-0) var(--y-0), var(--bg) var(--s-start-0), transparent var(--s-end-0)), 
        radial-gradient(circle at var(--x-1) var(--y-1), var(--bg) var(--s-start-1), transparent var(--s-end-1)), 
        radial-gradient(circle at var(--x-2) var(--y-2), var(--darkG) var(--s-start-2), transparent var(--s-end-2)), 
        radial-gradient(circle at var(--x-3) var(--y-3), var(--darkG) var(--s-start-3), transparent var(--s-end-3)), 
        radial-gradient(circle at var(--x-4) var(--y-4), var(--scndry4) var(--s-start-4), transparent var(--s-end-4)), 
        radial-gradient(circle at var(--x-5) var(--y-5), var(--darkG) var(--s-start-5), transparent var(--s-end-5)), 
        radial-gradient(circle at var(--x-6) var(--y-6), var(--scndry4) var(--s-start-6), transparent var(--s-end-6)), 
        radial-gradient(circle at var(--x-7) var(--y-7), var(--scndry3) var(--s-start-7), transparent var(--s-end-7)), 
        radial-gradient(circle at var(--x-8) var(--y-8), var(--darkG) var(--s-start-8), transparent var(--s-end-8)), 
        radial-gradient(circle at var(--x-9) var(--y-9), var(--blackG) var(--s-start-9), transparent var(--s-end-9));
    animation: ani-your_css_selector_here 15s linear infinite alternate;
    background-blend-mode: normal;
    background-attachment: fixed;
    contain: none;
}



body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.15;
  mix-blend-mode: exclusion;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='turbulence' baseFrequency='.5' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}



body {
  isolation: isolate;
}


* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px;
  min-height: 100vh;
  background-attachment: fixed;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;

  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: var(--primaryGrad);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);

  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}

button:hover {
  background: var(--backgroundGrad);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}

.button-scndry {
  background: var(--secondaryGrad);
  border: 1px solid var(--scndry1);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}

.button-scndry:hover {
  background: var(--backgroundGrad);
  border: 1px solid var(--scndry1);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}

#app-custom-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

button:disabled {
  opacity: .5;
  cursor: default;
  transform: none;
}

select, input[type="text"], input[type="password"], textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  outline: none;
  transition: border-color var(--fast);
}

select:focus, input:focus, textarea:focus {
  border-color: var(--action);
}

.hidden { display: none !important; }

#auth-box {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text);
}

#auth-box label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

#status-line {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
}

#feedback {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

#feedback.error { color: var(--red); }

.songs-row, .ui-toolbar {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 0px 0;

  max-width: 100%;
  border-radius: 8px;
}



.zoom-group {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
  background: var(--darkGrad2);
  border: 1px solid var(--scndry4);
  border-radius: var(--r-sm);
}

.zoom-group i {
  font-size: 11px;
  color: var(--scndry1);
  margin-right: 2px;
}

.zoom-group button {
  padding: 2px 9px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
}

#player-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  width: 100%;
}

#player-view .np-card {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 780px;
  padding: 0 120px;
}

#player-view .np-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  max-width: 480px;
}

@keyframes ani-player-view-np-art {
    0% {
        --c-0: var(--aura-c0);
        --x-0: 1%;
        --y-0: 1%;
        --s-start-0: 10%;
        --s-end-0: 30%;
        --b: 3px;
    }

    25% {
        --c-0: var(--aura-c1);
        --x-0: 99%;
        --y-0: 1%;
        --s-start-0: 10%;
        --s-end-0: 30%;
        --b: 36px;
    }

    50% {
        --c-0: var(--aura-c2);
        --x-0: 99%;
        --y-0: 99%;
        --s-start-0: 10%;
        --s-end-0: 30%;
        --b: 8px;
    }

    75% {
        --c-0: var(--aura-c3);
        --x-0: 1%;
        --y-0: 99%;
        --s-start-0: 10%;
        --s-end-0: 30%;
        --b: 8px;
    }

    100% {
        --c-0: var(--aura-c0);
        --x-0: 1%;
        --y-0: 1%;
        --s-start-0: 10%;
        --s-end-0: 30%;
        --b: 3px;
    }
}

@property --c-0 {
    syntax: '<color>';
    inherits: false;
    initial-value: rgb(29, 185, 84);
}

@property --x-0 {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 1%;
}

@property --y-0 {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 1%;
}

@property --s-start-0 {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 10%;
}

@property --s-end-0 {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 30%;
}

@property --b {
    syntax: '<length>';
    inherits: false;
    initial-value: 3px;
}

#player-view .np-art-wrap {
    position: relative;
    width: var(--np-art);
    height: var(--np-art);
    border-radius: var(--r-lg);
    isolation: isolate;
    --aura-c0: var(--accent);
    --aura-c1: var(--scndry1);
    --aura-c2: var(--action);
    --aura-c3: var(--scndry2);
}

#player-view .np-art-wrap::after {
    content: "";
    position: absolute;
    inset: -9px;
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    --c-0: var(--aura-c0);
    --x-0: 1%;
    --y-0: 1%;
    background-color: var(--scndry4);
    background-image: radial-gradient(circle at var(--x-0) var(--y-0), var(--c-0) var(--s-start-0), transparent var(--s-end-0));
    animation: ani-player-view-np-art 15s linear infinite normal;
    animation-play-state: paused;
    filter: blur(var(--b));
    background-blend-mode: normal;
    will-change: transform, opacity;
    contain: paint;
}

#player-view .np-art-wrap.playing::after {
    opacity: 1;
    animation-play-state: running;
}

#player-view .np-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--r-lg);
    background: var(--surface);
    display: block;
}


#player-view .np-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#player-view .np-artists {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#player-view .np-progress {
  width: 100%;
}

#player-view .np-controls,
#player-view .np-seeks {
  display: flex;
  gap: 8px;
  align-items: center;
}

#player-view .np-controls button,
#player-view .np-seeks button {
  min-width: 72px;
  z-index: 10;
  padding: 14px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  border: none;
}

#player-view .np-toggle {
  background: var(--primaryGrad);
  color: var(--white);
  width: 72px;
}

#player-view .np-toggle:hover {
  color: var(--darkG);
}

.songs-tools .np-toggle:hover,
.songs-tools .np-toggle:active {
  color: var(--darkG);
}

#player-view .np-seeks button {
  background: var(--surface-2);
  color: var(--text);
  border: transparent;
  font-size: 14px;
}

#player-view .np-seeks button:hover {
  background: var(--accent);
  color: var(--white);
}

#player-view .np-controls .np-nav {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--accent);
  box-shadow: none;
  position: absolute;
  top: calc(var(--np-art) + 50px);
  transform: translateY(-120%);
  height: 270px;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background var(--fast), border-color var(--fast), color var(--fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#player-view .np-controls .np-nav:hover,
#player-view .np-controls .np-nav:active {
  color: var(--accent);
  transform: translateY(-120%);
}

#player-view .np-nav-prev { left: 0; }
#player-view .np-nav-next { right: 0; }

#track-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-content: start;
  padding: 10px;
  background: var(--backgroundGrad2);
  border-radius: 8px;

  margin-top: 12px;
}

#track-list .track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}

#track-list .track:hover {
  background: var(--surface-2);
  border-color: var(--line);
}

#track-list .track.current {
  background: var(--primaryGrad);
  border-color: transparent;
}

#track-list .track.current .track-name,
#track-list .track.current .track-artists,
#track-list .track.current .track-dur {
  color: var(--bg);
}

#track-list .track > div {
  min-width: 0;
  overflow: hidden;
}

#track-list .track img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}

#track-list .track p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#track-list .track-name {
  font-size: 12px;
  font-weight: 600;
}

#track-list .track-artists {
  font-size: 11px;
  color: var(--scndry1);
}

#track-list .track-dur {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .04em;
}

#track-list .track.dimmed img,
#track-list .track.dimmed p {
  opacity: .35;
}

#track-list .track .track-unhide {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--scndry4);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

#target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 5px;
  margin-top: 5px;
  
  
}

#target-grid button {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  background: var(--darkGrad);
  border: 1px solid var(--scndry4);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#target-grid button img {
  pointer-events: none;
  -webkit-user-drag: none;
}

#target-grid button:hover {
  background: var(--surface-2);
  border-color: var(--action);
}

#target-grid button.ok { border-color: var(--accent); }
#target-grid button.err { border-color: var(--red); }
#target-grid button.pending { opacity: .6; }
#target-grid button.hidden-tile {
  opacity: .4;
}

#target-grid button.hidden-tile img,
#target-grid button.hidden-tile span:not(.grid-minus):not(.grid-sync) {
  opacity: .4;
}

#target-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}

#target-grid span {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

#target-grid .grid-minus {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1px;
  background: var(--darkG);
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

#target-grid .grid-minus:hover { color: var(--accent); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--surface-2);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--action);
  cursor: pointer;
}

#offline-mode-badge {
  width: 99.76vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);

  margin-top: -20px;
  margin-bottom: 10px;

  background: var(--backgroundGrad3);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 6px 24px;
  text-align: center;
  letter-spacing: 0.05em;
  box-sizing: border-box;
}

#offline-mode-badge.offline-badge-hidden {
  display: none;
}

#pip-mode-btn,
#track-list-pip-btn {
  display: inline-flex;
}

@media (max-width: 720px) {
  #pip-mode-btn,
  #track-list-pip-btn {
    display: none !important;
  }
  body { padding: 14px; }
  #player-view { padding: 24px 0; }
  #player-view .np-card { padding: 0; }
  #offline-mode-badge { width: 100vw; }
#player-view .np-controls .np-nav {
    position: absolute;
    top: 159px; 
    transform: translateY(-50%);
    height: 240px;
    min-width: 50px;
    padding: 10px 8px;
    font-size: 14px;
  }
  #player-view .np-controls .np-nav:hover,
  #player-view .np-controls .np-nav:active { 
    transform: translateY(-50%); 
    color: var(--white);
  }
  :root { --np-art: 250px; }
  #player-view .np-controls,
  #player-view .np-seeks { flex-wrap: wrap; justify-content: center; }
  #track-list { min-height: 700px !important; } 
  #target-grid { grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); }
  #app-header .header-signout,.header-version {
    display: none !important;
  }
  #player-view .np-controls button{
    min-width: 50px;
  }
  .songs-panel {
    max-height: 88vh!important;
  }
  .songs-header {
    gap: 6px;
    padding: 6px 8px;
  }
  .songs-row,
  .songs-tools,
  .songs-filters {
    gap: 6px;
    row-gap: 6px;
  }
  .songs-header .outline-btn,
  .songs-header .songs-toggle,
  .songs-header .zoom-group {
    padding: 6px 10px;
    font-size: 12px;
  }

}

#player-view .np-progress {
  width: 100%;
  height: 6px;
  background: var(--backgroundGrad2);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}
#player-view .np-progress #progress-bar {
  height: 100%;
  width: 0;
  background: var(--white);
  border-radius: 3px;
  z-index: 4;
  transition: width .1s linear;
}
#player-view .np-controls button,
#player-view .np-seeks button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#player-view .np-shuffle {
  background: var(--scndry4);
  color: var(--scndry3);
  border:1px solid var(--accent);
  box-shadow: none;
  min-width: 72px;
  padding: 14px 12px;
  border-radius: var(--r-sm);
  position: relative;
  font-size: 14px;
  font-weight: 800;
  transition: background var(--fast), color var(--fast);
}



#player-view .np-shuffle:hover {
  background: var(--scndry2);
}


#player-view .np-shuffle.active {
  background: var(--secondaryGrad);
  color: var(--white);
}

#source-select {
  display: none;
  
}

#source-grid {
  display: grid;
  background: 
    var(--backgroundGrad);
  border-radius: var(--r-md);
  padding: 8px;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.source-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  background: var(--darkGrad);
  border: 1px solid var(--scndry4);
  border-radius: var(--r-sm);
  overflow: hidden;
  min-width: 0;
}
.source-tile:hover {
  background: var(--surface-2);
  border-color: var(--scndry1);
}
.source-tile.active {
  background: var(--primaryGrad);
  border: 1px solid var(--accent);
}
.source-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.source-tile span {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
@media (max-width: 720px) {
  #source-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
}

#player-view .np-preset-pill {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: transparent;
}
#player-view .np-preset-pill button.np-preset {
  min-width: 56px;
  height: 30px;
  padding: 0;
  color: transparent;
  border: none;
  border-right: 1px solid var(--scndry3);
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
#player-view .np-preset-pill button.np-preset:last-child {
  border-right: none;
}
#player-view .np-preset-pill button.np-preset:hover {
  background: var(--scndry3);
}
#player-view .np-preset-pill button.np-preset.active {
  background: var(--white);
}

.skip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.skip-toggle:hover {
  background: var(--surface-2);
  border-color: var(--action);
}
.skip-toggle.on {
  background: var(--action);
  color: var(--white);
  border-color: transparent;
}
.skip-toggle.on:hover {
  background: var(--darkG);
}

#target-grid button.has-track {
  background: var(--primaryGrad);
  border-color: var(--accent);
}

#target-grid button.has-track .grid-minus {
  color: var(--white);
}

#app-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  color: var(--bg);
  width: calc(100% + 48px);
  margin: -24px -24px 20px -24px;
  box-sizing: border-box;
}

#app-header {
  --x-0: 14%;
  --y-0: 22%;
  --x-2: 48%;
  --y-2: 76%;
  --x-4: 82%;
  --y-4: 18%;
  --x-6: 31%;
  --y-6: 88%;
  --x-8: 67%;
  --y-8: 42%;
  background-color: var(--accent);
  background-image:
    radial-gradient(circle at var(--x-0) var(--y-0), var(--darkG) var(--s-start-0), transparent var(--s-end-0)),
    radial-gradient(circle at var(--x-1) var(--y-1), var(--accent) var(--s-start-1), transparent var(--s-end-1)),
    radial-gradient(circle at var(--x-2) var(--y-2), var(--accent) var(--s-start-2), transparent var(--s-end-2)),
    radial-gradient(circle at var(--x-3) var(--y-3), var(--action) var(--s-start-3), transparent var(--s-end-3)),
    radial-gradient(circle at var(--x-4) var(--y-4), var(--accent) var(--s-start-4), transparent var(--s-end-4)),
    radial-gradient(circle at var(--x-5) var(--y-5), var(--accent) var(--s-start-5), transparent var(--s-end-5)),
    radial-gradient(circle at var(--x-6) var(--y-6), var(--accent) var(--s-start-6), transparent var(--s-end-6)),
    radial-gradient(circle at var(--x-7) var(--y-7), var(--darkG) var(--s-start-7), transparent var(--s-end-7)),
    radial-gradient(circle at var(--x-8) var(--y-8), var(--darkG) var(--s-start-8), transparent var(--s-end-8)),
    radial-gradient(circle at var(--x-9) var(--y-9), var(--accent) var(--s-start-9), transparent var(--s-end-9));
  animation: ani-your_css_selector_here 20s linear infinite alternate;
  background-blend-mode: normal;
  background-attachment: fixed;
  contain: none;
}

#app-header .header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 45px;
  color: var(--bg);
  flex-shrink: 0;
}
#app-header .header-logo svg {
  width: 200%;
  height: 200%;
  display: block;
}

#app-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.1;
}

#app-header #status-line {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .02em;
}

@media (max-width: 720px) {
  #app-header {
    padding: 12px 18px;
    gap: 10px;
    width: calc(100% + 28px);
    height: 80px;
    margin: -14px -14px 16px -14px;
  }

  #app-header h1 { font-size: 17px; }

  #app-header .header-logo { 
    align-items: center;
    justify-content: center;
    margin: 0;
    width: 100%;
    height:30px;
  }
}

.songs-panel {
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

#track-list .songs-zoom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 2px 0;
  background: var(--surface);
}
#track-list .songs-zoom button {
  padding: 2px 9px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.4;
}

#tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.tool-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--darkGrad2);
  border: 1px solid var(--scndry3);
  border-radius: var(--r-sm);
  font-size: 11px;
  text-align: center;
}
.tool-tile:hover {
  background: var(--surface-2);
  border-color: var(--scndry1);
}
.tool-tile i {
  font-size: 22px;
  color: var(--scndry1);
}
.tool-panel {
  margin: 12px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--scndry2);
  border-radius: var(--r-md);
  display: flex;
  flex-direction: column;
  order: -1;
  gap: 12px;
  max-width: 520px;
}
.tool-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tool-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.tool-close {
  padding: 4px 8px;
  border-radius: 4px;
}
.tool-hint {
  margin: 0;
  font-size: 12px;
  color: var(--scndry1);
}
.tool-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.tool-row:hover {
  background: var(--surface-2);
}
.tool-preview {
  margin: 0;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}
.tool-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.tool-create {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-weight: 700;
}
.tool-create:hover {
  background: var(--accent);
}

.hierarchy-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.hierarchy-toggle-row > span {
  font-size: 13px;
  font-weight: 600;
}
.hierarchy-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 340px;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px;
}
.hierarchy-row {
  border-radius: 4px;
}
.hierarchy-row:hover {
  background: var(--surface);
}
.hierarchy-header {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.hierarchy-header > span:first-child {
  font-weight: 600;
  flex-shrink: 0;
}
.hierarchy-summary {
  flex: 1;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hierarchy-chevron {
  font-size: 10px;
  color: var(--muted);
  transition: transform var(--fast);
}
.hierarchy-body {
  padding: 4px 10px 10px 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 4px;
}
.hierarchy-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--muted);
}
.hierarchy-option:hover {
  background: var(--surface-2);
  color: var(--text);
}
.hierarchy-option input:checked + span {
  color: var(--accent);
  font-weight: 600;
}
.hierarchy-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--white);
  margin-left: 6px;
  vertical-align: middle;
}



body.auth-mode {
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.auth-mode #auth-box {
  margin: 0;
  flex: 0 0 460px;
  max-width: calc(100vw - 48px);
}

#auth-box {
  margin: 0;
  width: 100%;
  flex-shrink: 0;
  background: var(--darkGrad);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text);
}

#auth-box .auth-logo {
  align-self: center;
  width: 250px;
  height: 70px;
  display: inline-flex;
  color: var(--accent);
}
#auth-box .auth-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

#auth-box h2 {
  margin: 0;
  font-size: 22px;
  text-align: center;
  font-weight: 800;
}

#auth-box .auth-sub {
  margin: -6px 0 8px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

#auth-box label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: -6px;
}

#auth-box .auth-help {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 12px;
}

#auth-box .auth-help summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
  list-style: none;
}

#auth-box .auth-help summary::-webkit-details-marker { display: none; }

#auth-box .auth-help summary::before {
  content: "+";
  margin-right: 8px;
  font-weight: 800;
  color: var(--accent);
}

#auth-box .auth-help[open] summary::before { content: "-"; }

#auth-box .auth-help ol {
  margin: 10px 0 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
  line-height: 1.5;
}

#auth-box .auth-help a {
  color: var(--accent);
  text-decoration: none;
}

#auth-box .auth-help a:hover { text-decoration: underline; }

#auth-box .auth-help input,
#auth-box .auth-help button {
  margin-top: 8px;
  width: 100%;
}

#auth-box .auth-redirect {
  display: block;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--text);
  word-break: break-all;
}

#auth-box .auth-login {
  background: var(--accent);
  color: var(--bg);
  border: none;
  font-weight: 800;
  padding: 14px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#auth-box .auth-login:hover { background: var(--bg); }

#app-header .header-signout {
  margin: -16px -24px -16px 10px;
  align-self: stretch;
  background: var(--darkGrad);
  color: var(--white);
  border: none;
  border-radius: 0 0 0 0;
  font-weight: 700;
  font-size: 12px;
  transition: background var(--fast), color var(--fast);
}

#app-header .header-signout:hover {
  background: var(--primaryGrad);
  border-color: transparent;
}

body.auth-mode #app {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 48px);
}

body.auth-mode #auth-box {
  margin: 0;
  flex: 0 0 460px;
  max-width: calc(100vw - 48px);
}

.sources-bar {
  padding-left: 11px;
}

.sources-bar,
.target-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  
}
.sources-label,
.target-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--white);
}
.sources-hint {
  font-size: 11px;
  color: var(--scndry2);
  opacity: 1;
}
.sources-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  background: var(--scndry1);
  border: 1px solid var(--scndry1);
  color: var(--bg);
  font-size: 15px;
}
.sources-collapse:hover {
  border-color: var(--white);
  background: var(--white);
}
.target-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}

.target-right {

  display: flex;
  align-items: center;
  gap: 8px;
}
.target-toggle:hover {
  border-color: var(--action);
  color: var(--text);
}
.target-toggle.on {
  background: var(--action);
  color: var(--white);
}
.tool-tile.cascade-on {
  background: var(--primaryGrad);
  border-color: var(--accent);
  color: var(--bg);
}
.tool-tile.cascade-on i {
  color: var(--bg);
}

.target-bar #status-line {
  margin: 0 0 0 4px;
  font-size: 11px;
  color: var(--white);
  letter-spacing: .02em;
}

#target-grid .grid-sync {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--darkG);
  color: var(--text);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--fast);
}
#target-grid .grid-sync:hover {
  color: var(--action);
}
#target-grid .grid-sync.busy i {
  animation: grid-sync-spin .7s linear infinite;
}
@keyframes grid-sync-spin {
  to { transform: rotate(360deg); }
}

.outline-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--darkGrad2);
  padding: 8px 16px;
  color: var(--accent);
  border: 1px solid var(--darkG);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
}
.outline-btn:hover {
  color: var(--accent);
  background: var(--blackG);
  border-color: var(--accent);
}
.outline-btn.on {
  background: var(--primaryGrad);
  color: var(--white);
}
.outline-btn.active {
  color: var(--white);
  background: var(--primaryGrad);
}

.outline-btn-scndry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--darkGrad2);
  padding: 8px 16px;
  color: var(--scndry1);
  border: 1px solid var(--scndry4);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
}
.outline-btn-scndry:hover {
  color: var(--scndry1);
  background: var(--scndry4);
  border-color: var(--scndry1);
}
.outline-btn-scndry.on {
  background: var(--secondaryGrad);
  color: var(--white);
}
.outline-btn-scndry.active {
  color: var(--scndry3);
  background: var(--secondaryGrad);
}


.songs-panel {
  max-height: 60vh;
  overflow-y: auto;
  background: transparent;
  border: 1px solid transparent;
  overflow-x: hidden;
  margin-top: 5px;
  
}

.songs-panel.pinned {
  position: fixed;
  top: 12px;
  left: 24px;
  right: 24px;
  z-index: 40;
  margin-top: 0;
}

@keyframes songs-panel-dock-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.songs-panel.pinned {
  animation: songs-panel-dock-in 0.18s ease-out;
}

.songs-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--backgroundGrad);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: var(--r-md);
}

.songs-header .songs-row {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  
  row-gap: 5px;
}
.songs-header .songs-row > button,
.songs-header .songs-row > .zoom-group {
  flex-shrink: 0;
}
.songs-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.songs-tools-spacer {
  flex: 1;
  min-width: 0;
}

.api-counter {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}
#app-header .header-signout {
  margin-left: 10px;
}
.api-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  cursor: default;
}
.api-pill.warn { background: var(--yellow); color: var(--bg); }
.api-pill.danger { background: var(--red); color: var(--white); }
.api-pill.hold {
  background: var(--bg);
  color: var(--white);
  animation: api-pulse 1.2s ease-in-out infinite;
}
@keyframes api-pulse {
  50% { opacity: .55; }
}
@media (max-width: 720px) {
  .api-pill { font-size: 10px; padding: 4px 8px; }
}

#player-view .np-center {
  position: relative;
}
#player-view .np-versions-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--fast), border-color var(--fast);
}
#player-view .np-versions-btn:hover {
  color: var(--text);
  border-color: var(--action);
}
.versions-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, 92vw);
  max-height: 340px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}
.version-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--text);
}
.version-row:hover {
  background: var(--surface-2);
  border-color: var(--line);
}
.version-row.active {
  border-color: var(--accent);
}
.version-row img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.version-row > div {
  min-width: 0;
  flex: 1;
}
.version-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.version-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.version-play {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--action);
  color: var(--white);
  border: none;
  font-size: 12px;
}
.version-play:hover {
  background: var(--action);
}
.versions-close {
  margin-top: 4px;
  font-size: 12px;
  padding: 6px;
}

#app-header .header-text {
  flex: 1;
  min-width: 0;
}

.songs-filters {
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}
.songs-filter-input {
  flex: 1;
  min-width: 140px;
  
  padding: 6px 10px;
  font-size: 12px;
}
.songs-filter-select {
  padding: 6px 8px;
  font-size: 12px;
}
.songs-progress {
  font-size: 11px;
  font-weight: 700;
  color: var(--scndry1);
  white-space: nowrap;

}

#player-view .np-volume {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--accent);
  width: 100%;
  max-width: 220px;
}
#player-view .np-volume input[type="range"] {
  flex: 1;
  height: 4px;
}

.songs-filters .outline-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.songs-filter-wrap {
  position: relative;
  flex: 1;

}
.songs-filter-input {
  width: 100%;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  box-sizing: border-box;
}
.songs-filter-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.songs-filter-clear:hover {
  color: var(--text);
}

#player-view #recently-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 780px;
  max-height: 240px;
  overflow-y: auto;
  margin: 12px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
#recently-grid .track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  transition: background var(--fast), border-color var(--fast), transform var(--fast);
}
#recently-grid .track:hover {
  background: var(--surface-2);
  border-color: var(--line);
  transform: translateY(-1px);
}
#recently-grid .track img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}
#recently-grid .track p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#recently-grid .track-name {
  font-size: 11px;
  font-weight: 600;
}
#recently-grid .track-artists {
  font-size: 10px;
  color: var(--scndry1);
}
#recently-grid .recent-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
}

#target-grid.has-moving button:not(.moving) {
  opacity: 0.75;
  pointer-events: none;
}
#target-grid button.moving {
  pointer-events: none;
  border-color: var(--accent);
  z-index: 4;
}
#target-grid button.reordering {
  border-color: var(--action);
}

#target-grid .reorder-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--action);
  color: var(--white);
  font-size: 12px;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .6);
  transition: background var(--fast), transform var(--fast);
}
#target-grid .reorder-arrow:hover {
  transform: translateX(-50%) scale(1.1);
}
#target-grid .reorder-up { top: 30%; }
#target-grid .reorder-down { top: 55%; }

#target-grid .grid-minus {
  border-radius: 10px;
}

#target-grid .grid-sync {
  border-radius: var(--r-sm);
}

#track-list .track .track-unhide {
  border-radius: var(--r-sm);
}

.sources-collapse {
  border-radius: var(--r-sm);
}

.target-toggle {
  border-radius: var(--r-sm);
}

#player-view .np-controls button {
  border-radius: var(--r-sm);
}

#player-view .np-versions-btn {
  border-radius: var(--r-sm);
}

#player-view .np-nav {
  border-radius: var(--r-sm);
}

#player-view .np-seeks {
  margin-top: 8px;
}

.version-play {
  border-radius: var(--r-sm);
}

#target-grid .reorder-arrow {
  border-radius: var(--r-sm);
}

.target-bar.target-bottom {
  margin-top: 10px;
  margin-bottom: 16px;
}

#player-view .np-seeks button.np-preset-adj {
  min-width: 40px;
  height: 30px;
  padding: 0;
  background: var(--action);
  color: transparent;
  box-shadow: none;
  font-size: 0;
  opacity: 1;
  cursor: pointer;
  transition: opacity var(--fast);
}
#player-view .np-seeks button.np-preset-adj:hover {
  background: var(--scndry1);
}

#player-view .np-seeks button.np-preset-back {
  margin-right: -20px;
  z-index: 1;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
}

#player-view .np-seeks button.np-preset-fwd {
  margin-left: -20px;
  z-index: 1;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scndry1);
}

::-webkit-scrollbar-thumb {
  background: var(--scndry1);
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scndry1);
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

#status-line.error { color: var(--red) }

#player-view #np-grid {
  width: 100%;
  max-width: 780px;
  margin: 16px auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.np-grid-header {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: center;
}
.np-grid-header button {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--muted);
}
.np-grid-header button.active {
  background: var(--accent);
  color: var(--bg);
  border-color: transparent;
}
.np-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.np-grid-list .track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.np-grid-list .track:hover {
  background: var(--surface-2);
  border-color: var(--line);
}
.np-grid-list .track img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}
.np-grid-list .track p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-grid-list .track-name {
  font-size: 11px;
  font-weight: 600;
}
.np-grid-list .track-artists {
  font-size: 10px;
  color: var(--scndry1);
}
.np-grid-list .recent-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 20px;
}


.np-rep-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 9px;
  font-weight: 800;
  background: var(--bg);
  color: var(--accent);
  border-radius: 4px;
  padding: 1px 3px;
  line-height: 1;
}

.np-next-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  z-index: 2;
}

.preview-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  width: 100%;
  max-width: 380px;
  margin-top: 10px;
}
.preview-setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.preview-setting-row > span:first-child {
  min-width: 110px;
}
.preview-setting-row input[type="range"] {
  flex: 1;
}
.preview-setting-val {
  min-width: 36px;
  text-align: right;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid transparent;
}

.preview-setting-val:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

.preview-setting-input {
  width: 48px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  padding: 2px 4px;
  outline: none;
  font-variant-numeric: tabular-nums;
}
.preview-preset-pill {
  display: inline-flex;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.preview-preset-pill button {
  min-width: 36px;
  height: 30px;
  padding: 0;
  background: var(--scndry2);
  color: var(--scndry3);
  border: none;
  border-right: 1px solid var(--line);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: background var(--fast), color var(--fast);
}
.preview-preset-pill button:last-child {
  border-right: none;
}
.preview-preset-pill button.on {
  background: var(--text);
  color: var(--bg);
}
#player-view .np-shuffle {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

.track-context-menu {
  position: fixed;
  z-index: 10000;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

.track-context-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  text-align: left;
  border-radius: 4px;
}

.track-context-menu button:hover {
  background: var(--accent);
  color: var(--bg);
}




.np-grid-list .np-tile-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: var(--r-sm);
  background: var(--darkG);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.np-grid-list .np-tile-btn:hover {
  color: var(--accent);
}

.np-grid-list.has-moving .track:not(.moving) {
  opacity: 0.45;
}

.np-grid-list .track.moving {
  pointer-events: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
  transform: scale(1.04);
  z-index: 4;
}

.np-grid-list .track img {
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Tools Button (Yellow) */
.outline-btn.tool-btn-custom {
  color: var(--yellow);
  border-color: var(--yellow);
}
.outline-btn.tool-btn-custom i {
  color: var(--yellow);
}
.outline-btn.tool-btn-custom:hover {
  background: var(--yellow);
  color: var(--bg);
  border-color: var(--yellow);
}
.outline-btn.tool-btn-custom:hover i {
  color: var(--bg);
}

/* Reload Grid Button (Grey) */
.outline-btn.reload-btn-custom {
  color: var(--grey);
  border-color: var(--grey);
}
.outline-btn.reload-btn-custom i {
  color: var(--grey);
}
.outline-btn.reload-btn-custom:hover {
  background: var(--grey);
  color: var(--bg);
  border-color: var(--grey);
}
.outline-btn.reload-btn-custom:hover i {
  color: var(--bg);
}

/* Unfilter All Button (White) */
.outline-btn.unfilter-btn-custom {
  color: var(--white);
  border-color: var(--white);
}
.outline-btn.unfilter-btn-custom i {
  color: var(--white);
}
.outline-btn.unfilter-btn-custom:hover {
  background: var(--white);
  color: var(--bg);
  border-color: var(--white);
}
.outline-btn.unfilter-btn-custom:hover i {
  color: var(--bg);
}

/* Undo Button (Red) */
.outline-btn.undo-btn-custom {
  color: var(--red);
  border-color: var(--red);
}
.outline-btn.undo-btn-custom i {
  color: var(--red);
}
.outline-btn.undo-btn-custom:hover {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.outline-btn.undo-btn-custom:hover i {
  color: var(--white);
}

/* Reverse Button (Yellow) */
.outline-btn.reverse-btn-custom {
  color: var(--yellow);
  border-color: var(--yellow);
}
.outline-btn.reverse-btn-custom i {
  color: var(--yellow);
}
.outline-btn.reverse-btn-custom:hover {
  background: var(--yellow);
  color: var(--bg);
  border-color: var(--yellow);
}
.outline-btn.reverse-btn-custom:hover i {
  color: var(--bg);
}

/* Ensure recents and queue grid card images are strictly constrained */
#recently-grid .track img,
.np-grid-list .track img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  display: block;
}

/* Ensure track card wrappers inside recents/queue prevent flex blowout */
#recently-grid .track,
.np-grid-list .track {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

#recently-grid .track > div,
.np-grid-list .track > div {
  min-width: 0;
  overflow: hidden;
}

#source-grid .source-tile {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}

#source-grid .source-tile.hidden-tile {
  opacity: .4;
}

#source-grid .source-tile.hidden-tile img,
#source-grid .source-tile.hidden-tile span {
  opacity: .4;
}

#source-grid.has-moving .source-tile:not(.moving) {
  opacity: 0.75;
}

#source-grid .source-tile.moving {
  border-color: var(--accent);
  z-index: 4;
}

#source-grid .grid-minus,
#source-grid .grid-edit {
  position: absolute;
  top: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: var(--r-sm);
  background: var(--darkG);
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

#source-grid .grid-minus {
  right: 6px;
}

#source-grid .grid-edit {
  right: 32px;
}

#source-grid .grid-minus:hover,
#source-grid .grid-edit:hover {
  color: var(--accent);
}

#np-preview-btn {
  position: relative;
  overflow: hidden;
}

.np-preview-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  background: var(--surface-2);
  color: var(--surface);
  border-radius: 0 0 0 5px;
  cursor: pointer;
}

#np-preview-btn.active .np-preview-badge {
  background: var(--primaryGrad);
  color: var(--white);
}

/* PIP MODE STYLES */ 

.pip-preset-seg.is-active {
  background: transparent;
}

body.pip-body {
  padding: 8px;
  margin: 0;
  width: 100%;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.pip-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}


.pip-left {
  flex: 0 0 120px;
  width: 120px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

#player-view .pip-art-wrap,
.pip-art-wrap {
  width: 80x;
  height: 80px;
  border-radius: 5px;
  flex-shrink: 0;
}

.pip-art-wrap .np-art {
  width: 100%;
  height: 100%;
  border-radius: 14px;
}

.pip-meta {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.pip-right {
  flex: 1;
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

#player-view.pip-top-section {
  padding: 0;
  margin: 0;
  width: 100%;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
}

#player-view .np-controls.pip-controls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 5px;
  width: 100%;
}

#player-view .np-controls.pip-controls button.pip-ctrl-btn {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  height: 28px;
  padding: 4px 6px;
  font-size: 11px;
}

#player-view .np-progress.pip-progress {
  position: relative;
  flex: 1;
  min-width: 0;
  width: auto;
  height: 14px;
  margin: 0;
  overflow: visible;
  border-radius: 3px;
  background: var(--backgroundGrad2);
}

#player-view .np-progress.pip-progress #pip-progress-bar {
  position: relative;
  z-index: 4;
  height: 6px;
  width: 0;
  background: var(--white);
  border-radius: 3px;
  transition: width .1s linear;
  pointer-events: none;
}

#target-grid.pip-target-grid {
  flex: 1;
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
}

#target-grid.pip-target-grid button {
  width: 100%;
  height: auto;
  padding: 3px;
  gap: 2px;
  justify-content: flex-start;
  border-radius: var(--r-sm);
  scroll-snap-align: start;
}

#target-grid.pip-target-grid button img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 4px;
}

#target-grid.pip-target-grid span {
  font-size: 9px;
  line-height: 1.15;
}

#player-view .pip-title,
.pip-title {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

#player-view .pip-artists,
.pip-artists {
  font-size: 9px;
  color: var(--muted);
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

#player-view .np-controls.pip-controls button.pip-prev-btn,
#player-view .np-controls.pip-controls button.pip-next-btn {
  background: var(--darkG);
  color: var(--white);
}

#player-view .np-controls.pip-controls button.pip-prev-btn:hover,
#player-view .np-controls.pip-controls button.pip-next-btn:hover {
  color: var(--action);
}

#pip-mode-btn {
  position: relative;
  overflow: hidden;
  padding-right: 26px;
}


.pip-card-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.pip-config-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  background: var(--primaryGrad);
  color: var(--white);
  border-radius: 0 0 0 5px;
  cursor: pointer;
}

#pip-mode-btn.active .pip-config-badge {
  background: var(--white);
  color: var(--darkG);
}

.pip-progress-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pip-time-label {
  flex: 0 0 auto;
  font-size: 9px;
  color: var(--white);
  white-space: nowrap;
}

#player-view .np-progress.pip-progress {
  position: relative;
  flex: 1;
  min-width: 0;
  width: auto;
  height: 6px;
  margin: 0;
  overflow: hidden;
}



.pip-preset-splits {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  pointer-events: none;
}

.pip-preset-seg {
  height: 100%;
  border-right: 1px solid var(--accent);
  pointer-events: none;
  z-index: 2;
}

.pip-preset-seg.is-hover {
  border-right-width: 3px;
}

.pip-preset-seg:last-child {
  border-right: none;
}




.pip-volume-overlay {
  position: fixed;
  z-index: 5;
  padding: 0 6px;
  background: var(--darkG);
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
}

.pip-volume-icon-btn {
  background: transparent;
  border: none;
  padding: 0;
  z-index: 99;
  color: var(--white);
  font-size: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pip-volume-slider {
  flex: 1;
  min-width: 0;
  height: 10px;
  background: var(--darkG);
  margin: 0;
  cursor: pointer;
  accent-color: var(--darkG);
}



.pip-status-line {
  width: 100%;
  margin-top: -5px;
  min-height: 10px;
  font-size: 9px;
  line-height: 1;
  color: var(--scndry1);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pip-status-line.error {
  color: var(--red);
}

.pip-songs-progress {
  width: 100%;
  font-size: 10px;
  line-height: 1;
  color: var(--scndry1);
  text-align: center;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-time-range-highlight {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--blackG);
}

.fill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--secondaryGrad);
  padding: 8px 16px;
  color: var(--white);
  border: 1px solid var(--scndry1);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
}
.fill-btn:hover {
  border-color: var(--white);
}
.fill-btn.on {
  color: var(--scndry4);
  background: var(--white);
  border-color: var(--white);
}
.fill-btn.active {
  color: var(--scndry4);
  background: var(--white);
  border-color: var(--white);
}

/* Filter toggle */
.stage-toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--backgroundGrad2);
  flex-shrink: 0;
  min-height: 35px;
}

.stage-toggle-btn {
  border: none;
  border-radius: calc(var(--r-sm));
  padding: 4px 8px;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  cursor: pointer;
  transition: var(--fast);
}

.stage-toggle-btn:hover {
  color: var(--scndry1);
}

.stage-toggle-btn.active {
  background: var(--secondaryGrad);
  color: var(--bg);
}

.np-rating-pill {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 10px;
  pointer-events: auto;
}

.np-rating-dot {
  width: 25px;
  height: 25px;
  min-width: 25px;
  padding: 0;
  border-radius: 50%;
  background: var(--darkGrad);
  border: 2px solid color-mix(in srgb, var(--white) 10%, transparent);
  cursor: pointer;
}

.np-rating-dot.active.rating-2 {
  background: var(--primaryGrad);
  border-color: var(--accent);
  opacity: 1;
}

.np-rating-dot.active.rating-3 {
  background: var(--primaryGrad);
  border-color: var(--accent);
  opacity: 1;
}

.np-rating-pill:not(:has(.active)) .np-rating-dot[data-rating="1"]:hover,
.np-rating-pill:not(:has(.active)) .np-rating-dot[data-rating="2"]:hover ~ .np-rating-dot[data-rating="1"],
.np-rating-pill:not(:has(.active)) .np-rating-dot[data-rating="2"]:hover,
.np-rating-pill:not(:has(.active)) .np-rating-dot[data-rating="3"]:hover ~ .np-rating-dot,
.np-rating-pill:not(:has(.active)) .np-rating-dot[data-rating="3"]:hover,
.np-rating-pill:has(.np-rating-dot.active.rating-1) .np-rating-dot[data-rating="1"]:hover,
.np-rating-pill:has(.np-rating-dot.active.rating-1) .np-rating-dot[data-rating="2"]:hover ~ .np-rating-dot[data-rating="1"],
.np-rating-pill:has(.np-rating-dot.active.rating-1) .np-rating-dot[data-rating="2"]:hover,
.np-rating-pill:has(.np-rating-dot.active.rating-1) .np-rating-dot[data-rating="3"]:hover ~ .np-rating-dot,
.np-rating-pill:has(.np-rating-dot.active.rating-1) .np-rating-dot[data-rating="3"]:hover,
.np-rating-pill:has(.np-rating-dot.active.rating-2) .np-rating-dot:hover,
.np-rating-pill:has(.np-rating-dot.active.rating-3) .np-rating-dot:hover {
  background: var(--darkGrad);
  border-color: var(--accent);
  opacity: 1;
}

.np-rating-slash {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--scndry1);
  opacity: 1;
  user-select: none;
  pointer-events: none;
}

.rating-cover-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rating-cover-label {
  position: relative;
  z-index: 2;
  font-weight: 700;
  color: var(--darkG);
  pointer-events: none;
}

.rating-cover-card.rating-list-2 span {
  color: var(--scndry4);
}

.rating-cover-card.rating-list-3 span {
  color: var(--darkG);
}

.rating-cover-card:hover,
.rating-cover-card.active,
.rating-cover-card.selected,
.rating-cover-card.current {
  border-color: var(--white);
}

.rating-cover-card:hover span,
.rating-cover-card.active span,
.rating-cover-card.selected span,
.rating-cover-card.current span {
  color: var(--white);
}


#player-view .np-controls.pip-controls button.pip-ctrl-btn.pip-prev-btn,
#player-view .np-controls.pip-controls button.pip-ctrl-btn.pip-next-btn,
#player-view .np-controls.pip-controls button.pip-ctrl-btn#pip-toggle-btn {
  flex: 1.35 1 0;
}

.pip-art-wrap .np-rating-pill {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  gap: 3px;
  padding: 2px 4px;
}

.pip-art-wrap .np-rating-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-width: 1px;
}

.pip-art-wrap .np-rating-slash {
  font-size: 15px;
}

.rating-cover-spacer {
  width: 100%;
  aspect-ratio: 1 / 1;
  opacity: 0;
  pointer-events: none;
  flex-shrink: 0;
}



#auth-import-btn,
#auth-import-btn:hover {
  padding: 8px 16px;
}